Merge remote-tracking branch 'remotes/origin/master' into builtins

# Conflicts:
#	lib/Runtime/Library/InJavascript/Intl.js.bc.32b.h
#	lib/Runtime/Library/InJavascript/Intl.js.bc.64b.h
#	lib/Runtime/Library/InJavascript/Intl.js.nojit.bc.32b.h
#	lib/Runtime/Library/InJavascript/Intl.js.nojit.bc.64b.h
diff --git a/.gitignore b/.gitignore
index ce35da3..acb62a7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -101,3 +101,6 @@
 android-toolchain-arm/
 cc-toolchain/
 /TraceOutput.txt
+Build/VcBuild
+Build/VcBuild.NoJIT
+Build/VcBuild.SWB
diff --git a/Build/Chakra.Build.Default.props b/Build/Chakra.Build.Default.props
index 54b51c4..c474469 100644
--- a/Build/Chakra.Build.Default.props
+++ b/Build/Chakra.Build.Default.props
@@ -2,11 +2,21 @@
 <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <Import Project="Common.Build.Default.props"/>
   <Import Condition="'$(Clang)'!=''" Project="Chakra.Build.Clang.Default.props"/>
+  <PropertyGroup Condition="'$(WindowsTargetPlatformVersion)'==''">
+      <!-- Default the installed latest Win10 SDK -->
+      <WindowsSdkInstallFolder_10 Condition="'$(WindowsSdkInstallFolder_10)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@InstallationFolder)</WindowsSdkInstallFolder_10>
+      <WindowsSdkInstallFolder_10 Condition="'$(WindowsSdkInstallFolder_10)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0@InstallationFolder)</WindowsSdkInstallFolder_10>
+      <WindowsTargetPlatformVersion_10 Condition="'$(WindowsTargetPlatformVersion_10)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion)</WindowsTargetPlatformVersion_10>
+      <WindowsTargetPlatformVersion_10 Condition="'$(WindowsTargetPlatformVersion_10)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion)"</WindowsTargetPlatformVersion_10>      
+      <!-- Sometimes the version in the registry has to .0 suffix, and sometimes it doesn't. Check and add it -->
+      <WindowsTargetPlatformVersion_10 Condition="'$(WindowsTargetPlatformVersion_10)' != '' and !$(WindowsTargetPlatformVersion_10.EndsWith('.0'))">$(WindowsTargetPlatformVersion_10).0</WindowsTargetPlatformVersion_10>
+      
+      <WindowsTargetPlatformVersion>$(WindowsTargetPlatformVersion_10)</WindowsTargetPlatformVersion>
+      
+      <!-- Default back to 10.0.10240.0 if the ARM version of the Win10 SDK is not installed -->
+      <WindowsTargetPlatformVersion Condition="'$(Platform)'=='ARM' and !Exists('$(WindowsSdkInstallFolder_10)\Include\$(WindowsTargetPlatformVersion_10)\shared\ksarm.h')">10.0.10240.0</WindowsTargetPlatformVersion>
+  </PropertyGroup>
   <PropertyGroup>
-    <WindowsTargetPlatformVersion Condition="'$(Platform)'=='ARM'">10.0.10240.0</WindowsTargetPlatformVersion>
-
-    <!-- Always use Platform SDK for core builds -->
-    <EventManifestXmlPath>$(WindowsSDK80Path)Include\um</EventManifestXmlPath>    
     <!-- Unless indicated otherwise, statically link the C++ Runtime into ChakraCore.dll -->
     <RuntimeLib Condition="'$(RuntimeLib)'==''">static_library</RuntimeLib>
 
diff --git a/Build/Chakra.Build.props b/Build/Chakra.Build.props
index 07856b7..ea9d95c 100644
--- a/Build/Chakra.Build.props
+++ b/Build/Chakra.Build.props
@@ -5,6 +5,10 @@
     <Win32_WinNTVersion Condition="'$(NtTargetVersion)'=='$(NtTargetVersion_Win7)'">0x0601</Win32_WinNTVersion>
     <Win32_WinNTVersion Condition="'$(NtTargetVersion)'=='$(NtTargetVersion_Win8)'">0x0602</Win32_WinNTVersion>
     <Win32_WinNTVersion Condition="'$(NtTargetVersion)'=='$(NtTargetVersion_Win10)'">0x0A00</Win32_WinNTVersion>
+
+    <!-- Always use Platform SDK for core builds -->
+    <EventManifestXmlPath Condition="'$(TargetPlatformVersion)'=='8.1'">$(WindowsSdkDir)Include\um</EventManifestXmlPath>
+    <EventManifestXmlPath Condition="'$(TargetPlatformVersion)'!='8.1'">$(WindowsSdkDir)Include\$(TargetPlatformVersion)\um</EventManifestXmlPath>
   </PropertyGroup>
   <PropertyGroup>
     <NoThrowNewLib>nothrownew.obj</NoThrowNewLib>
@@ -16,6 +20,7 @@
     <ClCompile>
       <PreprocessorDefinitions>
         %(PreprocessorDefinitions);
+        _CHAKRACOREBUILD;
         _WIN32_WINNT=$(Win32_WinNTVersion);
         WINVER=$(Win32_WinNTVersion);
         WIN32_LEAN_AND_MEAN=1
@@ -45,6 +50,9 @@
       </AdditionalIncludeDirectories>
     </ClCompile>
 
+    <ResourceCompile>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions);_CHAKRACOREBUILD</PreprocessorDefinitions>
+    </ResourceCompile>
   </ItemDefinitionGroup>
 
   <!-- Link dependencies for projects that link with Chakra libraries -->
@@ -58,7 +66,7 @@
         ole32.lib
     </RLCommonLinkDependencies>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(OptimizedBuild)'!='true'">
+  <PropertyGroup Condition="'$(DebugBuild)'=='true'">
     <ChakraCommonLinkDependencies>
         $(ChakraCommonLinkDependencies);
         dbghelp.lib;
diff --git a/Build/Common.Build.Default.props b/Build/Common.Build.Default.props
index 2e0a608..5447bfd 100644
--- a/Build/Common.Build.Default.props
+++ b/Build/Common.Build.Default.props
@@ -29,8 +29,9 @@
 
   <!-- Common build settings -->
   <PropertyGroup>
-    <OptimizedBuild />
-    <OptimizedBuild Condition="'$(Configuration)'=='Release' or '$(Configuration)'=='Test'">true</OptimizedBuild>
+    <DebugBuild />
+    <DebugBuild Condition="'$(Configuration)'!='Release' and '$(Configuration)'!='Test'">true</DebugBuild>
+    <OptimizedBuild Condition="'$(OptimizedBuild)'=='' and '$(DebugBuild)'!='true'">true</OptimizedBuild>
     <WindowsSDKDesktopARMSupport Condition="'$(Platform)'=='ARM'">true</WindowsSDKDesktopARMSupport>
   </PropertyGroup>
   <PropertyGroup Label="Configuration">
diff --git a/Build/Common.Build.props b/Build/Common.Build.props
index 6e297e1..71a475f 100644
--- a/Build/Common.Build.props
+++ b/Build/Common.Build.props
@@ -31,7 +31,7 @@
       <AdditionalOptions>%(AdditionalOptions) -sal_local</AdditionalOptions>
     </Midl>
     <ClCompile>
-      <PreprocessorDefinitions>%(PreprocessorDefinitions);_CHAKRACOREBUILD;NOMINMAX;USE_EDGEMODE_JSRT</PreprocessorDefinitions>
+      <PreprocessorDefinitions>%(PreprocessorDefinitions);NOMINMAX;USE_EDGEMODE_JSRT</PreprocessorDefinitions>
       <!-- Some of our STDMETHOD can throw
            TODO: Code review STDMETHOD and separate out API that can throw and those that can't -->
       <PreprocessorDefinitions>%(PreprocessorDefinitions);COM_STDMETHOD_CAN_THROW</PreprocessorDefinitions>
@@ -109,9 +109,15 @@
 
       <!-- Always set the checksum -->
       <AdditionalOptions>%(AdditionalOptions) /release</AdditionalOptions>
+      <!-- Ignore Linker warning: This object file does not define any previously undefined public symbols -->
+      <AdditionalOptions>%(AdditionalOptions) /ignore:4221</AdditionalOptions>
       <!-- ======== For Code Covearge ======== -->
       <AdditionalOptions Condition="'$(ENABLE_CODECOVERAGE)'=='true'">%(AdditionalOptions) /DEBUGTYPE:CV,FIXUP</AdditionalOptions>
     </Link>
+    <Lib>
+      <!-- Ignore Linker warning: This object file does not define any previously undefined public symbols -->
+      <AdditionalOptions>%(AdditionalOptions) /ignore:4221</AdditionalOptions>
+    </Lib>
   </ItemDefinitionGroup>
 
   <!--Optimization flags-->
@@ -128,7 +134,7 @@
   </ItemDefinitionGroup>
   
     <!-- chk build flags -->  
-  <ItemDefinitionGroup Condition="'$(OptimizedBuild)'!='true'">
+  <ItemDefinitionGroup Condition="'$(DebugBuild)'=='true'">
     <ClCompile>
       <PreprocessorDefinitions>%(PreprocessorDefinitions);_DEBUG;DBG;DBG_DUMP</PreprocessorDefinitions>
     </ClCompile>
@@ -140,7 +146,7 @@
     </Midl>
   </ItemDefinitionGroup>
   <!-- fre and fretest build flags -->
-  <ItemDefinitionGroup Condition="'$(OptimizedBuild)'=='true'">
+  <ItemDefinitionGroup Condition="'$(DebugBuild)'!='true'">
     <ClCompile>
       <PreprocessorDefinitions>%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="'$(Configuration)'=='Test'">%(PreprocessorDefinitions);ENABLE_DEBUG_CONFIG_OPTIONS=1</PreprocessorDefinitions>
diff --git a/Build/NuGet/.pack-version b/Build/NuGet/.pack-version
index 227cea2..bd8bf88 100644
--- a/Build/NuGet/.pack-version
+++ b/Build/NuGet/.pack-version
@@ -1 +1 @@
-2.0.0
+1.7.0
diff --git a/Build/scripts/add_msbuild_path.cmd b/Build/scripts/add_msbuild_path.cmd
index 546ab6a..e53f1a3 100644
--- a/Build/scripts/add_msbuild_path.cmd
+++ b/Build/scripts/add_msbuild_path.cmd
@@ -21,7 +21,12 @@
 REM Try Dev15 first

 

 set MSBUILD_VERSION=15.0

-set "MSBUILD_PATH=%ProgramFiles%\Microsoft Visual Studio\2017\Enterprise\MSBuild\%MSBUILD_VERSION%\Bin\x86"

+

+set "MSBUILD_PATH=%ProgramFiles(x86)%\Microsoft Visual Studio\Preview\Enterprise\MSBuild\15.0\Bin"

+

+if not exist "%MSBUILD_PATH%\msbuild.exe" (

+    set "MSBUILD_PATH=%ProgramFiles%\Microsoft Visual Studio\2017\Enterprise\MSBuild\%MSBUILD_VERSION%\Bin\x86"

+)

 

 if not exist "%MSBUILD_PATH%\msbuild.exe" (

     set "MSBUILD_PATH=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\MSBuild\%MSBUILD_VERSION%\Bin"

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 84158aa..30c10ed 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -164,9 +164,12 @@
     add_definitions(-D__arm__)
     add_definitions(-D_M_IX86_OR_ARM32)
     add_definitions(-D_M_ARM32_OR_ARM64)
-  if(CC_TARGET_OS_OSX)
-    add_compile_options(-arch arm)
-  endif()
+    if(CC_TARGET_OS_OSX)
+        add_compile_options(-arch arm)
+    elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+        # reduce link time memory usage
+        set(LINKER_REDUCED_MEMORY "-Xlinker --no-keep-memory")
+    endif()
 else()
     clr_unknown_arch()
 endif()
@@ -200,7 +203,9 @@
         -DPLATFORM_UNIX
     )
 
-    if(NOT ICULIB)
+    # in case ICU path was given but it doesn't exist, build script will fail.
+    # so, fallback only if ICU path wasn't given
+    if(NOT ICU_INCLUDE_PATH)
       set(NO_ICU_PATH_GIVEN 1)
       message("-- Couldn't find ICU. Falling back to --no-icu build")
     endif()
diff --git a/THIRD-PARTY-NOTICES.txt b/THIRD-PARTY-NOTICES.txt
index f84d999..92270cd 100644
--- a/THIRD-PARTY-NOTICES.txt
+++ b/THIRD-PARTY-NOTICES.txt
@@ -45,6 +45,8 @@
 28.  The Computer Language Shootout
 29.  WebAssembly/testsuite (https://github.com/WebAssembly/testsuite)
 30.  zlib-data.js
+31.  yargs-parser.js (https://github.com/yargs/yargs-parser)
+32.  camelcase.js (https://github.com/sindresorhus/camelcase)
 
 %% backbone.suggestions NOTICES, INFORMATION, AND LICENSE BEGIN HERE
 =========================================
@@ -1952,6 +1954,51 @@
 =========================================
 END OF zlib-data.js NOTICES, INFORMATION, AND LICENSE
 
+%% yargs-parser.js NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+Copyright (c) 2016, Contributors
+
+Permission to use, copy, modify, and/or distribute this software
+for any purpose with or without fee is hereby granted, provided
+that the above copyright notice and this permission notice
+appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE
+LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+=========================================
+END OF yargs-parser.js NOTICES, INFORMATION, AND LICENSE
+
+%% camelcase.js NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+=========================================
+END OF camelcase.js NOTICES, INFORMATION, AND LICENSE
+
 ---------------------------------------------------------------------------
 Wabt
 
diff --git a/bin/ChakraCore/CMakeLists.txt b/bin/ChakraCore/CMakeLists.txt
index 4689345..a82300b 100644
--- a/bin/ChakraCore/CMakeLists.txt
+++ b/bin/ChakraCore/CMakeLists.txt
@@ -55,8 +55,7 @@
 if(CC_TARGET_OS_ANDROID OR CC_TARGET_OS_LINUX)
   set(lib_target "${lib_target}"
     -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libChakraCoreLib.version
-    # reduce link time memory usage
-    -Xlinker --no-keep-memory
+    ${LINKER_REDUCED_MEMORY}
     )
 elseif(CC_TARGET_OS_OSX)
   if(CC_TARGETS_X86)
diff --git a/bin/ChakraCore/ChakraCore.def b/bin/ChakraCore/ChakraCore.def
index 9221a85..1602aa1 100644
--- a/bin/ChakraCore/ChakraCore.def
+++ b/bin/ChakraCore/ChakraCore.def
@@ -2,7 +2,6 @@
 
 EXPORTS
 #include "JsrtCommonExports.inc"
-
 JsDiagEvaluate
 JsDiagGetBreakOnException
 JsDiagGetBreakpoints
@@ -52,3 +51,7 @@
 JsSetModuleHostInfo
 JsGetModuleHostInfo
 JsInitializeJITServer
+
+JsCreateSharedArrayBufferWithSharedContent
+JsGetSharedArrayBufferContent
+JsReleaseSharedArrayBufferContentHandle
diff --git a/bin/GCStress/GCStress.vcxproj b/bin/GCStress/GCStress.vcxproj
index e361b7e..9e31987 100644
--- a/bin/GCStress/GCStress.vcxproj
+++ b/bin/GCStress/GCStress.vcxproj
@@ -23,7 +23,8 @@
       <DisableSpecificWarnings>
         %(DisableSpecificWarnings);
         4458; <!-- Declaration hides class member -->
-        4477; <!-- TODO: Format string specifier incorrect on x64 --></DisableSpecificWarnings>
+        4477; <!-- TODO: Format string specifier incorrect on x64 -->
+      </DisableSpecificWarnings>
     </ClCompile>
     <Link>
       <AdditionalDependencies>
@@ -70,4 +71,4 @@
   </ItemGroup>
   <Import Project="$(BuildConfigPropsPath)Chakra.Build.targets" Condition="exists('$(BuildConfigPropsPath)Chakra.Build.targets')" />
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-</Project>
\ No newline at end of file
+</Project>
diff --git a/bin/NativeTests/CodexTests.cpp b/bin/NativeTests/CodexTests.cpp
index bb57a6e..c521bfd 100644
--- a/bin/NativeTests/CodexTests.cpp
+++ b/bin/NativeTests/CodexTests.cpp
@@ -212,4 +212,72 @@
             CHECK(sourceBuffer[i] == (const char16)encodedBuffer[i]);
         }
     }
+
+    template <typename TTestCase, typename TDecodeFunc>
+    void RunUtf8DecodeTestCase(const TTestCase &testCases, const TDecodeFunc func)
+    {
+        const int numTestCases = _countof(testCases);
+        const charcount_t charCount = _countof(testCases[0].result);
+        char16 decodedBuffer[charCount + 1]; // +1 in case a null-terminating func is passed in
+
+        for (int i = 0; i < numTestCases; i++)
+        {
+            bool chunkEndsInTruncatedSequence = false;
+            size_t decodedCount = func(decodedBuffer, testCases[i].utf8Encoding, testCases[i].utf8Encoding + testCases[i].bytesToDecode, utf8::DecodeOptions::doChunkedEncoding, &chunkEndsInTruncatedSequence);
+            CHECK(decodedCount == testCases[i].expectedDecodedChars);
+
+            for (size_t j = 0; j < decodedCount; j++)
+            {
+                CHECK(decodedBuffer[j] == testCases[i].result[j]);
+            }
+
+            CHECK(testCases[i].shouldEndInTruncation == chunkEndsInTruncatedSequence);
+        }
+    }
+
+    TEST_CASE("CodexTest_DecodeUnitsInto_ChunkEndsInTruncatedSequence", "[CodexTest]")
+    {
+        struct TestCase
+        {
+            int bytesToDecode;
+            size_t expectedDecodedChars;
+            bool shouldEndInTruncation;
+            char16 result[8];
+            utf8char_t utf8Encoding[8];
+        };
+
+        TestCase testCases[] = {
+            { 2, 1, false, { 0xc1 }, { 0xc3, 0x81 } }, // Valid 2-byte sequence
+            { 1, 0, true, { 0x0 }, { 0xc3, 0x81 } }, // Valid 2-byte sequence truncated at the end of the chunk
+            { 2, 2, false, { 0xfffd, 0x79 },{ 0xc3, 0x79 } }, // Invalid 2-byte sequence
+            { 1, 0, true, { 0x0 }, { 0xc3, 0x79 } }, // Invalid 2-byte sequence truncated at the end of the chunk
+            { 3, 1, false, { 0x3042 },{ 0xe3, 0x81, 0x82 } }, // Valid 3-byte sequence
+            { 1, 0, true, { 0x0 }, { 0xe3, 0x81, 0x82 } }, // Valid 3-byte sequence truncated at the end of the chunk
+            { 2, 0, true, { 0x0 }, { 0xe3, 0x81, 0x82 } }, // Valid 3-byte sequence truncated at the end of the chunk
+            { 3, 3, false, { 0xfffd, 0x79, 0xfffd }, { 0xe3, 0x79, 0x82 } }, // Invalid 3-byte sequence
+            { 1, 0, true, { 0x0 }, { 0xe3, 0x79, 0x82 } }, // Invalid 3-byte sequence truncated at the end of the chunk
+            { 2, 0, true, { 0x0 }, { 0xe3, 0x79, 0x82 } }, // Invalid 3-byte sequence truncated at the end of the chunk
+            { 3, 3, false, { 0xfffd, 0xfffd, 0x79 }, { 0xe3, 0x81, 0x79 } }, // Invalid 3-byte sequence
+            { 1, 0, true, { 0x0 }, { 0xe3, 0x81, 0x79 } }, // Invalid 3-byte sequence truncated at the end of the chunk
+            { 2, 0, true, { 0x0 }, { 0xe3, 0x81, 0x79 } }, // Invalid 3-byte sequence truncated at the end of the chunk
+            { 4, 2, false, { 0xd9c4, 0xdc83 }, { 0xf2, 0x81, 0x82, 0x83 } }, // Valid 4-byte sequence
+            { 1, 0, true, { 0x0 }, { 0xf2, 0x81, 0x82, 0x83 } }, // Valid 4-byte sequence truncated at the end of the chunk
+            { 2, 0, true, { 0x0 }, { 0xf2, 0x81, 0x82, 0x83 } }, // Valid 4-byte sequence truncated at the end of the chunk
+            { 3, 0, true, { 0x0 }, { 0xf2, 0x81, 0x82, 0x83 } }, // Valid 4-byte sequence truncated at the end of the chunk
+            { 4, 4, false, { 0xfffd, 0x79, 0xfffd, 0xfffd }, { 0xf2, 0x79, 0x82, 0x83 } }, // Invalid 4-byte sequence
+            { 1, 0, true, { 0x0 }, { 0xf2, 0x79, 0x82, 0x83 } }, // Invalid 4-byte sequence truncated at the end of the chunk
+            { 2, 0, true, { 0x0 }, { 0xf2, 0x79, 0x82, 0x83 } }, // Invalid 4-byte sequence truncated at the end of the chunk
+            { 3, 0, true, { 0x0 }, { 0xf2, 0x79, 0x82, 0x83 } }, // Invalid 4-byte sequence truncated at the end of the chunk
+            { 4, 4, false, { 0xfffd, 0xfffd, 0x79, 0xfffd }, { 0xf2, 0x81, 0x79, 0x83 } }, // Invalid 4-byte sequence
+            { 1, 0, true, { 0x0 }, { 0xf2, 0x81, 0x79, 0x83 } }, // Invalid 4-byte sequence truncated at the end of the chunk
+            { 2, 0, true, { 0x0 }, { 0xf2, 0x81, 0x79, 0x83 } }, // Invalid 4-byte sequence truncated at the end of the chunk
+            { 3, 0, true, { 0x0 }, { 0xf2, 0x81, 0x79, 0x83 } }, // Invalid 4-byte sequence truncated at the end of the chunk
+            { 4, 4, false, { 0xfffd, 0xfffd, 0xfffd, 0x79 }, { 0xf2, 0x81, 0x82, 0x79 } }, // Invalid 4-byte sequence
+            { 1, 0, true, { 0x0 }, { 0xf2, 0x81, 0x82, 0x79 } }, // Invalid 4-byte sequence truncated at the end of the chunk
+            { 2, 0, true, { 0x0 }, { 0xf2, 0x81, 0x82, 0x79 } }, // Invalid 4-byte sequence truncated at the end of the chunk
+            { 3, 0, true, { 0x0 }, { 0xf2, 0x81, 0x82, 0x79 } }, // Invalid 4-byte sequence truncated at the end of the chunk
+        };
+        
+        RunUtf8DecodeTestCase(testCases, utf8::DecodeUnitsIntoAndNullTerminateNoAdvance);
+    }
 };
\ No newline at end of file
diff --git a/bin/ch/262.js b/bin/ch/262.js
new file mode 100644
index 0000000..3a4b665
--- /dev/null
+++ b/bin/ch/262.js
@@ -0,0 +1,29 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+LR"====(
+
+var $262 = {
+  agent: {
+    start: function (src) {
+      WScript.LoadScript(        
+        `
+        $262 = {
+          agent:{
+            receiveBroadcast: function(callback){ WScript.ReceiveBroadcast(callback); },
+            report: function(value){ WScript.Report(value); },
+            leaving: function(){ WScript.Leaving(); }
+          }
+        };
+        ${src}
+        `, 'crossthread');
+    },
+    broadcast: function (sab) { WScript.Broadcast(sab); },
+    sleep: function (timeout) { WScript.Sleep(timeout); },
+    getReport: function () { return WScript.GetReport(); },
+  }
+}
+
+)===="
\ No newline at end of file
diff --git a/bin/ch/CMakeLists.txt b/bin/ch/CMakeLists.txt
index 41c2175..e15fcc1 100644
--- a/bin/ch/CMakeLists.txt
+++ b/bin/ch/CMakeLists.txt
@@ -6,6 +6,7 @@
   Helpers.cpp
   HostConfigFlags.cpp
   WScriptJsrt.cpp
+  RuntimeThreadData.cpp
   )
 
 if (STATIC_LIBRARY)
@@ -95,8 +96,7 @@
 if(CC_TARGET_OS_ANDROID OR CC_TARGET_OS_LINUX)
   set(lib_target "${lib_target}"
     -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/ch.version
-    # reduce link time memory usage
-    -Xlinker --no-keep-memory
+    ${LINKER_REDUCED_MEMORY}
     )
 elseif(CC_TARGET_OS_OSX)
   if(CC_TARGETS_X86)
diff --git a/bin/ch/ChakraRtInterface.cpp b/bin/ch/ChakraRtInterface.cpp
index 7f177f6..e2f2940 100644
--- a/bin/ch/ChakraRtInterface.cpp
+++ b/bin/ch/ChakraRtInterface.cpp
@@ -86,6 +86,7 @@
     m_jsApiHooks.pfJsrtSetProperty = (JsAPIHooks::JsrtSetPropertyPtr)GetChakraCoreSymbol(library, "JsSetProperty");
     m_jsApiHooks.pfJsrtGetGlobalObject = (JsAPIHooks::JsrtGetGlobalObjectPtr)GetChakraCoreSymbol(library, "JsGetGlobalObject");
     m_jsApiHooks.pfJsrtGetUndefinedValue = (JsAPIHooks::JsrtGetUndefinedValuePtr)GetChakraCoreSymbol(library, "JsGetUndefinedValue");
+    m_jsApiHooks.pfJsrtGetNullValue = (JsAPIHooks::JsrtGetUndefinedValuePtr)GetChakraCoreSymbol(library, "JsGetNullValue");
     m_jsApiHooks.pfJsrtGetTrueValue = (JsAPIHooks::JsrtGetUndefinedValuePtr)GetChakraCoreSymbol(library, "JsGetTrueValue");
     m_jsApiHooks.pfJsrtGetFalseValue = (JsAPIHooks::JsrtGetUndefinedValuePtr)GetChakraCoreSymbol(library, "JsGetFalseValue");
     m_jsApiHooks.pfJsrtConvertValueToString = (JsAPIHooks::JsrtConvertValueToStringPtr)GetChakraCoreSymbol(library, "JsConvertValueToString");
@@ -99,8 +100,12 @@
     m_jsApiHooks.pfJsrtNumberToInt = (JsAPIHooks::JsrtNumberToIntPtr)GetChakraCoreSymbol(library, "JsNumberToInt");
     m_jsApiHooks.pfJsrtDoubleToNumber = (JsAPIHooks::JsrtDoubleToNumberPtr)GetChakraCoreSymbol(library, "JsDoubleToNumber");
     m_jsApiHooks.pfJsrtGetExternalData = (JsAPIHooks::JsrtGetExternalDataPtr)GetChakraCoreSymbol(library, "JsGetExternalData");
+    m_jsApiHooks.pfJsrtSetExternalData = (JsAPIHooks::JsrtSetExternalDataPtr)GetChakraCoreSymbol(library, "JsSetExternalData");
     m_jsApiHooks.pfJsrtCreateArray = (JsAPIHooks::JsrtCreateArrayPtr)GetChakraCoreSymbol(library, "JsCreateArray");
     m_jsApiHooks.pfJsrtCreateArrayBuffer = (JsAPIHooks::JsrtCreateArrayBufferPtr)GetChakraCoreSymbol(library, "JsCreateArrayBuffer");
+    m_jsApiHooks.pfJsrtCreateSharedArrayBufferWithSharedContent = (JsAPIHooks::JsrtCreateSharedArrayBufferWithSharedContentPtr)GetChakraCoreSymbol(library, "JsCreateSharedArrayBufferWithSharedContent");
+    m_jsApiHooks.pfJsrtGetSharedArrayBufferContent = (JsAPIHooks::JsrtGetSharedArrayBufferContentPtr)GetChakraCoreSymbol(library, "JsGetSharedArrayBufferContent");
+    m_jsApiHooks.pfJsrtReleaseSharedArrayBufferContentHandle = (JsAPIHooks::JsrtReleaseSharedArrayBufferContentHandlePtr)GetChakraCoreSymbol(library, "JsReleaseSharedArrayBufferContentHandle");
     m_jsApiHooks.pfJsrtGetArrayBufferStorage = (JsAPIHooks::JsrtGetArrayBufferStoragePtr)GetChakraCoreSymbol(library, "JsGetArrayBufferStorage");
     m_jsApiHooks.pfJsrtHasException = (JsAPIHooks::JsrtHasExceptionPtr)GetChakraCoreSymbol(library, "JsHasException");
     m_jsApiHooks.pfJsrtSetException = (JsAPIHooks::JsrtSetExceptionPtr)GetChakraCoreSymbol(library, "JsSetException");
@@ -140,6 +145,7 @@
     m_jsApiHooks.pfJsrtSerialize = (JsAPIHooks::JsrtSerialize)GetChakraCoreSymbol(library, "JsSerialize");
     m_jsApiHooks.pfJsrtRunSerialized = (JsAPIHooks::JsrtRunSerialized)GetChakraCoreSymbol(library, "JsRunSerialized");
     m_jsApiHooks.pfJsrtCreateString = (JsAPIHooks::JsrtCreateString)GetChakraCoreSymbol(library, "JsCreateString");
+    m_jsApiHooks.pfJsrtCreateStringUtf16 = (JsAPIHooks::JsrtCreateStringUtf16)GetChakraCoreSymbol(library, "JsCreateStringUtf16");
     m_jsApiHooks.pfJsrtCopyString = (JsAPIHooks::JsrtCopyString)GetChakraCoreSymbol(library, "JsCopyString");
     m_jsApiHooks.pfJsrtCreatePropertyId = (JsAPIHooks::JsrtCreatePropertyId)GetChakraCoreSymbol(library, "JsCreatePropertyId");
     m_jsApiHooks.pfJsrtCreateExternalArrayBuffer = (JsAPIHooks::JsrtCreateExternalArrayBuffer)GetChakraCoreSymbol(library, "JsCreateExternalArrayBuffer");
diff --git a/bin/ch/ChakraRtInterface.h b/bin/ch/ChakraRtInterface.h
index 7f47fb7..9eb39e4 100644
--- a/bin/ch/ChakraRtInterface.h
+++ b/bin/ch/ChakraRtInterface.h
@@ -36,8 +36,12 @@
     typedef JsErrorCode (WINAPI *JsrtNumberToIntPtr)(JsValueRef value, int *intValue);
     typedef JsErrorCode (WINAPI *JsrtDoubleToNumberPtr)(double doubleValue, JsValueRef* value);
     typedef JsErrorCode (WINAPI *JsrtGetExternalDataPtr)(JsValueRef object, void **data);
+    typedef JsErrorCode (WINAPI *JsrtSetExternalDataPtr)(JsValueRef object, void *data);
     typedef JsErrorCode (WINAPI *JsrtCreateArrayPtr)(unsigned int length, JsValueRef *result);
     typedef JsErrorCode (WINAPI *JsrtCreateArrayBufferPtr)(unsigned int byteLength, JsValueRef *result);
+    typedef JsErrorCode (WINAPI *JsrtCreateSharedArrayBufferWithSharedContentPtr)(JsSharedArrayBufferContentHandle sharedContent, JsValueRef *result);
+    typedef JsErrorCode (WINAPI *JsrtGetSharedArrayBufferContentPtr)(JsValueRef sharedArrayBuffer, JsSharedArrayBufferContentHandle *sharedContents);
+    typedef JsErrorCode (WINAPI *JsrtReleaseSharedArrayBufferContentHandlePtr)(JsSharedArrayBufferContentHandle sharedContent);
     typedef JsErrorCode (WINAPI *JsrtGetArrayBufferStoragePtr)(JsValueRef instance, BYTE **buffer, unsigned int *bufferLength);
     typedef JsErrorCode (WINAPI *JsrtCreateErrorPtr)(JsValueRef message, JsValueRef *error);
     typedef JsErrorCode (WINAPI *JsrtHasExceptionPtr)(bool *hasException);
@@ -75,6 +79,8 @@
     typedef JsErrorCode(WINAPI *JsrtRunSerialized)(JsValueRef buffer, JsSerializedLoadScriptCallback scriptLoadCallback, JsSourceContext sourceContext, JsValueRef sourceUrl, JsValueRef * result);
     typedef JsErrorCode(WINAPI *JsrtCopyString)(JsValueRef value, char* buffer, size_t bufferSize, size_t* written);
     typedef JsErrorCode(WINAPI *JsrtCreateString)(const char *content, size_t length, JsValueRef *value);
+    typedef JsErrorCode(WINAPI *JsrtCreateStringUtf16)(const uint16_t *content, size_t length, JsValueRef *value);
+    
     typedef JsErrorCode(WINAPI *JsrtCreateExternalArrayBuffer)(void *data, unsigned int byteLength, JsFinalizeCallback finalizeCallback, void *callbackState, JsValueRef *result);
     typedef JsErrorCode(WINAPI *JsrtCreatePropertyId)(const char *name, size_t length, JsPropertyIdRef *propertyId);
 
@@ -107,6 +113,7 @@
     JsrtSetPropertyPtr pfJsrtSetProperty;
     JsrtGetGlobalObjectPtr pfJsrtGetGlobalObject;
     JsrtGetUndefinedValuePtr pfJsrtGetUndefinedValue;
+    JsrtGetUndefinedValuePtr pfJsrtGetNullValue;
     JsrtGetUndefinedValuePtr pfJsrtGetTrueValue;
     JsrtGetUndefinedValuePtr pfJsrtGetFalseValue;
     JsrtConvertValueToStringPtr pfJsrtConvertValueToString;
@@ -125,8 +132,12 @@
     JsrtNumberToIntPtr pfJsrtNumberToInt;
     JsrtDoubleToNumberPtr pfJsrtDoubleToNumber;
     JsrtGetExternalDataPtr pfJsrtGetExternalData;
+    JsrtSetExternalDataPtr pfJsrtSetExternalData;
     JsrtCreateArrayPtr pfJsrtCreateArray;
     JsrtCreateArrayBufferPtr pfJsrtCreateArrayBuffer;
+    JsrtCreateSharedArrayBufferWithSharedContentPtr pfJsrtCreateSharedArrayBufferWithSharedContent;
+    JsrtGetSharedArrayBufferContentPtr pfJsrtGetSharedArrayBufferContent;    
+    JsrtReleaseSharedArrayBufferContentHandlePtr pfJsrtReleaseSharedArrayBufferContentHandle;
     JsrtGetArrayBufferStoragePtr pfJsrtGetArrayBufferStorage;
     JsrtCreateErrorPtr pfJsrtCreateError;
     JsrtHasExceptionPtr pfJsrtHasException;
@@ -162,6 +173,7 @@
     JsrtSerialize pfJsrtSerialize;
     JsrtRunSerialized pfJsrtRunSerialized;
     JsrtCreateString pfJsrtCreateString;
+    JsrtCreateStringUtf16 pfJsrtCreateStringUtf16;
     JsrtCopyString pfJsrtCopyString;
     JsrtCreatePropertyId pfJsrtCreatePropertyId;
     JsrtCreateExternalArrayBuffer pfJsrtCreateExternalArrayBuffer;
@@ -306,6 +318,7 @@
     static JsErrorCode WINAPI JsSetProperty(JsValueRef object, JsPropertyIdRef property, JsValueRef value, bool useStrictRules) { return HOOK_JS_API(SetProperty(object, property, value, useStrictRules)); }
     static JsErrorCode WINAPI JsGetGlobalObject(JsValueRef *globalObject) { return HOOK_JS_API(GetGlobalObject(globalObject)); }
     static JsErrorCode WINAPI JsGetUndefinedValue(JsValueRef *globalObject) { return HOOK_JS_API(GetUndefinedValue(globalObject)); }
+    static JsErrorCode WINAPI JsGetNullValue(JsValueRef *globalObject) { return HOOK_JS_API(GetNullValue(globalObject)); }
     static JsErrorCode WINAPI JsGetTrueValue(JsValueRef *globalObject) { return HOOK_JS_API(GetTrueValue(globalObject)); }
     static JsErrorCode WINAPI JsGetFalseValue(JsValueRef *globalObject) { return HOOK_JS_API(GetFalseValue(globalObject)); }
     static JsErrorCode WINAPI JsConvertValueToString(JsValueRef value, JsValueRef *stringValue) { return HOOK_JS_API(ConvertValueToString(value, stringValue)); }
@@ -319,8 +332,12 @@
     static JsErrorCode WINAPI JsNumberToInt(JsValueRef value, int* intValue) { return HOOK_JS_API(NumberToInt(value, intValue)); }
     static JsErrorCode WINAPI JsDoubleToNumber(double doubleValue, JsValueRef* value) { return HOOK_JS_API(DoubleToNumber(doubleValue, value)); }
     static JsErrorCode WINAPI JsGetExternalData(JsValueRef object, void **data) { return HOOK_JS_API(GetExternalData(object, data)); }
+    static JsErrorCode WINAPI JsSetExternalData(JsValueRef object, void *data)  { return HOOK_JS_API(SetExternalData(object, data)); }
     static JsErrorCode WINAPI JsCreateArray(unsigned int length, JsValueRef *result) { return HOOK_JS_API(CreateArray(length, result)); }
     static JsErrorCode WINAPI JsCreateArrayBuffer(unsigned int byteLength, JsValueRef *result) { return HOOK_JS_API(CreateArrayBuffer(byteLength, result)); }
+    static JsErrorCode WINAPI JsCreateSharedArrayBufferWithSharedContent(JsSharedArrayBufferContentHandle sharedContent, JsValueRef *result) { return HOOK_JS_API(CreateSharedArrayBufferWithSharedContent(sharedContent, result)); }
+    static JsErrorCode WINAPI JsGetSharedArrayBufferContent(JsValueRef sharedArrayBuffer, JsSharedArrayBufferContentHandle *sharedContents) { return HOOK_JS_API(GetSharedArrayBufferContent(sharedArrayBuffer, sharedContents)); }
+    static JsErrorCode WINAPI JsReleaseSharedArrayBufferContentHandle(JsSharedArrayBufferContentHandle sharedContent) { return HOOK_JS_API(ReleaseSharedArrayBufferContentHandle(sharedContent)); }
     static JsErrorCode WINAPI JsGetArrayBufferStorage(JsValueRef instance, BYTE **buffer, unsigned int *bufferLength) { return HOOK_JS_API(GetArrayBufferStorage(instance, buffer, bufferLength)); }
     static JsErrorCode WINAPI JsCreateError(JsValueRef message, JsValueRef *error) { return HOOK_JS_API(CreateError(message, error)); }
     static JsErrorCode WINAPI JsHasException(bool *hasException) { return HOOK_JS_API(HasException(hasException)); }
@@ -381,6 +398,7 @@
     static JsErrorCode WINAPI JsRunSerialized(JsValueRef buffer, JsSerializedLoadScriptCallback scriptLoadCallback, JsSourceContext sourceContext, JsValueRef sourceUrl, JsValueRef * result) { return HOOK_JS_API(RunSerialized(buffer, scriptLoadCallback, sourceContext, sourceUrl, result)); }
     static JsErrorCode WINAPI JsCopyString(JsValueRef value, char* buffer, size_t bufferSize, size_t* written) { return HOOK_JS_API(CopyString(value, buffer, bufferSize, written)); }
     static JsErrorCode WINAPI JsCreateString(const char *content, size_t length, JsValueRef *value) { return HOOK_JS_API(CreateString(content, length, value)); }
+    static JsErrorCode WINAPI JsCreateStringUtf16(const uint16_t *content, size_t length, JsValueRef *value) { return HOOK_JS_API(CreateStringUtf16(content, length, value)); }
     static JsErrorCode WINAPI JsCreatePropertyId(const char *name, size_t length, JsPropertyIdRef *propertyId) { return HOOK_JS_API(CreatePropertyId(name, length, propertyId)); }
     static JsErrorCode WINAPI JsCreateExternalArrayBuffer(void *data, unsigned int byteLength, JsFinalizeCallback finalizeCallback, void *callbackState, JsValueRef *result)  { return HOOK_JS_API(CreateExternalArrayBuffer(data, byteLength, finalizeCallback, callbackState, result)); }
 };
diff --git a/bin/ch/DbgController.js b/bin/ch/DbgController.js
index 381143d..cdad6e4 100644
--- a/bin/ch/DbgController.js
+++ b/bin/ch/DbgController.js
@@ -66,6 +66,7 @@
             "ArrayBuffer",
             "Atomics",
             "Boolean",
+            "chWriteTraceEvent",
             "CollectGarbage",
             "console",
             "DataView",
diff --git a/bin/ch/Helpers.cpp b/bin/ch/Helpers.cpp
index 6083f39..e673a49 100644
--- a/bin/ch/Helpers.cpp
+++ b/bin/ch/Helpers.cpp
@@ -139,7 +139,7 @@
     //
     if (fopen_s(&file, filename, "rb") != 0)
     {
-        if (!HostConfigFlags::flags.AsyncModuleLoadIsEnabled)
+        if (!HostConfigFlags::flags.MuteHostErrorMsgIsEnabled)
         {
 #ifdef _WIN32
             DWORD lastError = GetLastError();
diff --git a/bin/ch/HostConfigFlagsList.h b/bin/ch/HostConfigFlagsList.h
index 538cf79..c4f6287 100644
--- a/bin/ch/HostConfigFlagsList.h
+++ b/bin/ch/HostConfigFlagsList.h
@@ -11,6 +11,9 @@
 FLAG(BSTR, Serialized,                      "If source is UTF8, deserializes from bytecode file", NULL)
 FLAG(bool, OOPJIT,                          "Run JIT in a separate process", false)
 FLAG(bool, EnsureCloseJITServer,            "JIT process will be force closed when ch is terminated", true)
-FLAG(bool, AsyncModuleLoad,                 "Silence host error output for module load failures to enable promise testing", false)
+FLAG(bool, IgnoreScriptErrorCode,           "Don't return error code on script error", false)
+FLAG(bool, MuteHostErrorMsg,                "Mute host error output, e.g. module load failures", false)
+FLAG(bool, TraceHostCallback,               "Output traces for host callbacks", false)
+FLAG(bool, $262,                            "load $262 harness", false)
 #undef FLAG
 #endif
diff --git a/bin/ch/RuntimeThreadData.cpp b/bin/ch/RuntimeThreadData.cpp
new file mode 100644
index 0000000..51258d0
--- /dev/null
+++ b/bin/ch/RuntimeThreadData.cpp
@@ -0,0 +1,144 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft Corporation and contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+#include "stdafx.h"
+
+#ifndef _WIN32
+HANDLE CreateSemaphoreW(LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, LONG lInitialCount, LONG lMaximumCount, LPCWSTR lpName)
+{
+    // xplat-todo: implement this in PAL
+    Assert(false);
+    return INVALID_HANDLE_VALUE;
+}
+BOOL ReleaseSemaphore(HANDLE hSemaphore, LONG lReleaseCount, LPLONG lpPreviousCount)
+{
+    // xplat-todo: implement this in PAL
+    Assert(false);
+    return FALSE;
+}
+
+#endif
+
+void RuntimeThreadLocalData::Initialize(RuntimeThreadData* threadData)
+{
+    this->threadData = threadData;
+}
+
+void RuntimeThreadLocalData::Uninitialize()
+{
+}
+
+
+THREAD_LOCAL RuntimeThreadLocalData threadLocalData;
+
+RuntimeThreadLocalData& GetRuntimeThreadLocalData()
+{
+    return threadLocalData;
+}
+
+RuntimeThreadData::RuntimeThreadData()
+{
+    this->hevntInitialScriptCompleted = CreateEvent(NULL, TRUE, FALSE, NULL);
+    this->hevntReceivedBroadcast = CreateEvent(NULL, FALSE, FALSE, NULL);
+    this->hevntShutdown = CreateEvent(NULL, TRUE, FALSE, NULL);
+
+    this->sharedContent = nullptr;
+    this->receiveBroadcastCallbackFunc = nullptr;
+
+    this->leaving = false;
+
+    InitializeCriticalSection(&csReportQ);
+
+}
+
+RuntimeThreadData::~RuntimeThreadData()
+{
+    CloseHandle(this->hevntInitialScriptCompleted);
+    CloseHandle(this->hevntReceivedBroadcast);
+    CloseHandle(this->hevntShutdown);
+    CloseHandle(this->hThread);
+    DeleteCriticalSection(&csReportQ);
+}
+
+DWORD RuntimeThreadData::ThreadProc()
+{
+    JsValueRef scriptSource;
+    JsValueRef fname;
+    const char* fullPath = "agent source";
+    HRESULT hr = S_OK;
+
+    threadLocalData.Initialize(this);
+
+    IfJsErrorFailLog(ChakraRTInterface::JsCreateRuntime(JsRuntimeAttributeNone, nullptr, &runtime));
+    IfJsErrorFailLog(ChakraRTInterface::JsCreateContext(runtime, &context));
+    IfJsErrorFailLog(ChakraRTInterface::JsSetCurrentContext(context));
+
+
+    if (!WScriptJsrt::Initialize())
+    {
+        IfFailGo(E_FAIL);
+    }
+
+
+    IfJsErrorFailLog(ChakraRTInterface::JsCreateExternalArrayBuffer((void*)this->initialSource.c_str(),
+        (unsigned int)this->initialSource.size(), nullptr, nullptr, &scriptSource));
+
+
+    ChakraRTInterface::JsCreateString(fullPath, strlen(fullPath), &fname);
+
+    ChakraRTInterface::JsRun(scriptSource, WScriptJsrt::GetNextSourceContext(), fname, JsParseScriptAttributeNone, nullptr);
+
+    SetEvent(this->parent->hevntInitialScriptCompleted);
+
+    // loop waiting for work;
+
+    while (true)
+    {
+        HANDLE handles[] = { this->hevntReceivedBroadcast, this->hevntShutdown };
+        DWORD waitRet = WaitForMultipleObjects(_countof(handles), handles, false, INFINITE);
+
+        if (waitRet == WAIT_OBJECT_0)
+        {
+            JsValueRef args[3];
+            ChakraRTInterface::JsGetGlobalObject(&args[0]);
+            ChakraRTInterface::JsCreateSharedArrayBufferWithSharedContent(this->parent->sharedContent, &args[1]);
+            ChakraRTInterface::JsDoubleToNumber(1, &args[2]);
+
+            // notify the parent we received the data
+            ReleaseSemaphore(this->parent->hSemaphore, 1, NULL);
+
+            if (this->receiveBroadcastCallbackFunc)
+            {
+                ChakraRTInterface::JsCallFunction(this->receiveBroadcastCallbackFunc, args, 3, nullptr);
+            }
+        }
+
+        if (waitRet == WAIT_OBJECT_0 + 1 || this->leaving)
+        {
+            WScriptJsrt::Uninitialize();
+
+            if (this->receiveBroadcastCallbackFunc)
+            {
+                ChakraRTInterface::JsRelease(this->receiveBroadcastCallbackFunc, nullptr);
+            }
+            ChakraRTInterface::JsSetCurrentContext(nullptr);
+            ChakraRTInterface::JsDisposeRuntime(runtime);
+
+            threadLocalData.Uninitialize();
+            return 0;
+        }
+        else if (waitRet != WAIT_OBJECT_0)
+        {
+            Assert(false);
+            break;
+        }
+    }
+
+Error:
+
+    ChakraRTInterface::JsSetCurrentContext(nullptr);
+    ChakraRTInterface::JsDisposeRuntime(runtime);
+    threadLocalData.Uninitialize();
+    return 0;
+}
diff --git a/bin/ch/RuntimeThreadData.h b/bin/ch/RuntimeThreadData.h
new file mode 100644
index 0000000..534ee94
--- /dev/null
+++ b/bin/ch/RuntimeThreadData.h
@@ -0,0 +1,52 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft Corporation and contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+#pragma once
+#include <list>
+
+class RuntimeThreadData
+{
+public:
+    RuntimeThreadData();
+    ~RuntimeThreadData();
+    HANDLE hevntInitialScriptCompleted;
+    HANDLE hevntReceivedBroadcast;
+    HANDLE hevntShutdown;
+    HANDLE hSemaphore;
+    HANDLE hThread;
+
+    JsSharedArrayBufferContentHandle sharedContent;
+    JsValueRef receiveBroadcastCallbackFunc;
+
+
+    JsRuntimeHandle runtime;
+    JsContextRef context;
+
+
+    std::string initialSource;
+
+    RuntimeThreadData* parent;
+    
+    std::list<RuntimeThreadData*> children;
+
+    CRITICAL_SECTION csReportQ;
+    std::list<std::string> reportQ;
+
+    bool leaving;
+
+
+    DWORD ThreadProc();
+
+};
+
+struct RuntimeThreadLocalData
+{
+    // can't use ctor/dtor because it's not supported in VS2012
+    // error C2483: 'threadLocalData' : object with constructor or destructor cannot be declared 'thread' 
+    void Initialize(RuntimeThreadData* threadData);
+    void Uninitialize();
+    RuntimeThreadData* threadData;
+};
+
+RuntimeThreadLocalData& GetRuntimeThreadLocalData();
diff --git a/bin/ch/WScriptJsrt.cpp b/bin/ch/WScriptJsrt.cpp
index 28db362..9e3587d 100644
--- a/bin/ch/WScriptJsrt.cpp
+++ b/bin/ch/WScriptJsrt.cpp
@@ -3,6 +3,7 @@
 // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
 //-------------------------------------------------------------------------------------------------------
 #include "stdafx.h"
+#include <vector>
 
 #if defined(_X86_) || defined(_M_IX86)
 #define CPU_ARCH_TEXT "x86"
@@ -362,7 +363,7 @@
     unsigned int fileContentLength = (fileContent == nullptr) ? 0 : (unsigned int)strlen(fileContent);
     errorCode = ChakraRTInterface::JsParseModuleSource(requestModule, dwSourceCookie, (LPBYTE)fileContent,
         fileContentLength, JsParseModuleSourceFlags_DataIsUTF8, &errorObject);
-    if ((errorCode != JsNoError) && errorObject != JS_INVALID_REFERENCE && fileContent != nullptr)
+    if ((errorCode != JsNoError) && errorObject != JS_INVALID_REFERENCE && fileContent != nullptr && !HostConfigFlags::flags.IgnoreScriptErrorCode)
     {
         ChakraRTInterface::JsSetException(errorObject);
         return errorCode;
@@ -370,6 +371,7 @@
     return JsNoError;
 }
 
+
 JsValueRef WScriptJsrt::LoadScript(JsValueRef callee, LPCSTR fileName,
     LPCSTR fileContent, LPCSTR scriptInjectType, bool isSourceModule, JsFinalizeCallback finalizeCallback)
 {
@@ -473,6 +475,30 @@
         // Set the context back to the old one
         ChakraRTInterface::JsSetCurrentContext(currentContext);
     }
+    else if (strcmp(scriptInjectType, "crossthread") == 0)
+    {
+        auto& threadData = GetRuntimeThreadLocalData().threadData;
+        if (threadData == nullptr) 
+        {
+            threadData = new RuntimeThreadData();
+        }
+
+        RuntimeThreadData* child = new RuntimeThreadData();
+        child->initialSource = fileContent;
+        threadData->children.push_back(child);
+        child->parent = threadData;
+                
+        // TODO: need to add a switch in case we don't need to wait for 
+        // child initial script completion
+        ResetEvent(threadData->hevntInitialScriptCompleted);
+
+        child->hThread = ::CreateThread(NULL, NULL, [](void* param) -> DWORD
+        {
+            return ((RuntimeThreadData*)param)->ThreadProc();
+        }, (void*)child, NULL, NULL);
+
+        WaitForSingleObject(threadData->hevntInitialScriptCompleted, INFINITE);
+    }
     else
     {
         errorCode = JsErrorInvalidArgument;
@@ -886,6 +912,30 @@
 
     IfJsrtErrorFail(InitializeModuleCallbacks(), false);
 
+    if (HostConfigFlags::flags.$262)
+    {
+        IfFalseGo(WScriptJsrt::InstallObjectsOnObject(wscript, "Broadcast", BroadcastCallback));
+        IfFalseGo(WScriptJsrt::InstallObjectsOnObject(wscript, "ReceiveBroadcast", ReceiveBroadcastCallback));
+        IfFalseGo(WScriptJsrt::InstallObjectsOnObject(wscript, "Report", ReportCallback));
+        IfFalseGo(WScriptJsrt::InstallObjectsOnObject(wscript, "GetReport", GetReportCallback));
+        IfFalseGo(WScriptJsrt::InstallObjectsOnObject(wscript, "Leaving", LeavingCallback));
+        IfFalseGo(WScriptJsrt::InstallObjectsOnObject(wscript, "Sleep", SleepCallback));
+
+
+        // OSX does build does not support $262 as filename
+        const wchar_t $262[] =
+            #include "262.js"
+            ;
+
+        JsValueRef $262ScriptRef;
+        IfJsrtErrorFailLogAndRetFalse(ChakraRTInterface::JsCreateStringUtf16((uint16_t*)$262, _countof($262), &$262ScriptRef));
+
+        JsValueRef fname;
+        IfJsrtErrorFailLogAndRetFalse(ChakraRTInterface::JsCreateString("$262", strlen("$262"), &fname));
+        IfJsrtErrorFailLogAndRetFalse(ChakraRTInterface::JsRun($262ScriptRef, WScriptJsrt::GetNextSourceContext(), fname, JsParseScriptAttributeNone, nullptr));
+
+    }
+
 Error:
     return hr == S_OK;
 }
@@ -908,6 +958,32 @@
     // "operator delete" / global HeapAllocator::Instance. Clear it manually here
     // to avoid worrying about global destructor order.
     moduleRecordMap.clear();
+
+    auto& threadData = GetRuntimeThreadLocalData().threadData;
+    if (threadData && !threadData->children.empty())
+    {
+        LONG count = (LONG)threadData->children.size();
+        std::vector<HANDLE> childrenHandles;
+        
+        //Clang does not support "for each" yet
+        for(auto i = threadData->children.begin(); i!= threadData->children.end(); i++)
+        {
+            auto child = *i;
+            childrenHandles.push_back(child->hThread);
+            SetEvent(child->hevntShutdown);
+        }
+
+        DWORD waitRet = WaitForMultipleObjects(count, &childrenHandles[0], TRUE, INFINITE);
+        Assert(waitRet == WAIT_OBJECT_0);
+
+        for (auto i = threadData->children.begin(); i != threadData->children.end(); i++)
+        {
+            delete *i;
+        }
+
+        threadData->children.clear();
+    }
+
     return true;
 }
 
@@ -1037,11 +1113,188 @@
     return returnValue;
 }
 
+JsValueRef __stdcall WScriptJsrt::BroadcastCallback(JsValueRef callee, bool isConstructCall, JsValueRef *arguments, unsigned short argumentCount, void *callbackState)
+{
+    HRESULT hr = E_FAIL;
+    JsValueRef returnValue = JS_INVALID_REFERENCE;
+    JsErrorCode errorCode = JsNoError;
+
+    IfJsrtErrorSetGo(ChakraRTInterface::JsGetUndefinedValue(&returnValue));
+
+    if (argumentCount > 1)
+    {
+        auto& threadData = GetRuntimeThreadLocalData().threadData;
+        if (threadData)
+        {
+            ChakraRTInterface::JsGetSharedArrayBufferContent(arguments[1], &threadData->sharedContent);
+
+            LONG count = (LONG)threadData->children.size();
+            threadData->hSemaphore = CreateSemaphore(NULL, 0, count, NULL);
+            if (threadData->hSemaphore)
+            {
+                //Clang does not support "for each" yet
+                for (auto i = threadData->children.begin(); i != threadData->children.end(); i++)
+                {
+                    auto child = *i;
+                    SetEvent(child->hevntReceivedBroadcast);
+                }
+
+                WaitForSingleObject(threadData->hSemaphore, INFINITE);
+                CloseHandle(threadData->hSemaphore);
+                threadData->hSemaphore = INVALID_HANDLE_VALUE;
+            }
+            else
+            {
+                fwprintf(stderr, _u("Couldn't create semaphore.\n"));
+                fflush(stderr);
+            }
+
+            ChakraRTInterface::JsReleaseSharedArrayBufferContentHandle(threadData->sharedContent);
+        }
+    }
+
+Error:
+    return returnValue;
+}
+
+JsValueRef __stdcall WScriptJsrt::ReceiveBroadcastCallback(JsValueRef callee, bool isConstructCall, JsValueRef *arguments, unsigned short argumentCount, void *callbackState)
+{
+    HRESULT hr = E_FAIL;
+    JsValueRef returnValue = JS_INVALID_REFERENCE;
+    JsErrorCode errorCode = JsNoError;
+
+    IfJsrtErrorSetGo(ChakraRTInterface::JsGetUndefinedValue(&returnValue));
+
+    if (argumentCount > 1)
+    {
+        auto& threadData = GetRuntimeThreadLocalData().threadData;
+        if (threadData)
+        {
+            if (threadData->receiveBroadcastCallbackFunc)
+            {
+                ChakraRTInterface::JsRelease(threadData->receiveBroadcastCallbackFunc, nullptr);
+            }
+            threadData->receiveBroadcastCallbackFunc = arguments[1];
+            ChakraRTInterface::JsAddRef(threadData->receiveBroadcastCallbackFunc, nullptr);
+        }
+    }
+
+Error:
+    return returnValue;
+}
+
+JsValueRef __stdcall WScriptJsrt::ReportCallback(JsValueRef callee, bool isConstructCall, JsValueRef *arguments, unsigned short argumentCount, void *callbackState)
+{
+    HRESULT hr = E_FAIL;
+    JsValueRef returnValue = JS_INVALID_REFERENCE;
+    JsErrorCode errorCode = JsNoError;
+
+    IfJsrtErrorSetGo(ChakraRTInterface::JsGetUndefinedValue(&returnValue));
+
+    if (argumentCount > 1)
+    {
+        JsValueRef stringRef;
+        ChakraRTInterface::JsConvertValueToString(arguments[1], &stringRef);
+
+        AutoString autoStr(stringRef);
+
+        if (autoStr.GetError() == JsNoError)
+        {
+            std::string str(autoStr.GetString());
+            auto& threadData = GetRuntimeThreadLocalData().threadData;
+
+            if (threadData && threadData->parent)
+            {
+                EnterCriticalSection(&threadData->parent->csReportQ);
+                threadData->parent->reportQ.push_back(str);
+                LeaveCriticalSection(&threadData->parent->csReportQ);
+            }
+        }
+    }
+
+Error:
+    return returnValue;
+}
+
+JsValueRef __stdcall WScriptJsrt::GetReportCallback(JsValueRef callee, bool isConstructCall, JsValueRef *arguments, unsigned short argumentCount, void *callbackState)
+{
+    HRESULT hr = E_FAIL;
+    JsValueRef returnValue = JS_INVALID_REFERENCE;
+    JsErrorCode errorCode = JsNoError;
+
+    IfJsrtErrorSetGo(ChakraRTInterface::JsGetNullValue(&returnValue));
+
+    if (argumentCount > 0)
+    {
+        auto& threadData = GetRuntimeThreadLocalData().threadData;
+        if (threadData)
+        {
+            EnterCriticalSection(&threadData->csReportQ);
+
+            if (threadData->reportQ.size() > 0)
+            {
+                auto str = threadData->reportQ.front();
+                threadData->reportQ.pop_front();
+                ChakraRTInterface::JsCreateString(str.c_str(), str.size(), &returnValue);
+            }
+            LeaveCriticalSection(&threadData->csReportQ);
+        }
+    }
+
+Error:
+    return returnValue;
+}
+
+JsValueRef __stdcall WScriptJsrt::LeavingCallback(JsValueRef callee, bool isConstructCall, JsValueRef *arguments, unsigned short argumentCount, void *callbackState)
+{
+    HRESULT hr = E_FAIL;
+    JsValueRef returnValue = JS_INVALID_REFERENCE;
+    JsErrorCode errorCode = JsNoError;
+
+    IfJsrtErrorSetGo(ChakraRTInterface::JsGetUndefinedValue(&returnValue));
+
+    if (argumentCount > 0)
+    {
+        auto& threadData = GetRuntimeThreadLocalData().threadData;
+        if (threadData)
+        {
+            threadData->leaving = true;
+        }
+    }
+
+Error:
+    return returnValue;
+}
+
+JsValueRef __stdcall WScriptJsrt::SleepCallback(JsValueRef callee, bool isConstructCall, JsValueRef *arguments, unsigned short argumentCount, void *callbackState)
+{
+    HRESULT hr = E_FAIL;
+    JsValueRef returnValue = JS_INVALID_REFERENCE;
+    JsErrorCode errorCode = JsNoError;
+
+    IfJsrtErrorSetGo(ChakraRTInterface::JsGetUndefinedValue(&returnValue));
+
+    if (argumentCount > 1)
+    {
+        double timeout = 0.0;
+        ChakraRTInterface::JsNumberToDouble(arguments[1], &timeout);
+        Sleep((DWORD)timeout);
+    }
+
+Error:
+    return returnValue;
+}
+
 bool WScriptJsrt::PrintException(LPCSTR fileName, JsErrorCode jsErrorCode)
 {
     LPCWSTR errorTypeString = ConvertErrorCodeToMessage(jsErrorCode);
     JsValueRef exception;
     ChakraRTInterface::JsGetAndClearException(&exception);
+    if (HostConfigFlags::flags.MuteHostErrorMsgIsEnabled)
+    {
+        return false;
+    }
+
     if (exception != nullptr)
     {
         if (jsErrorCode == JsErrorCode::JsErrorScriptCompile || jsErrorCode == JsErrorCode::JsErrorScriptException)
@@ -1240,7 +1493,7 @@
             hr = Helpers::LoadScriptFromFile(specifierStr.GetString(), fileContent);
             if (FAILED(hr))
             {
-                if (!HostConfigFlags::flags.AsyncModuleLoadIsEnabled)
+                if (!HostConfigFlags::flags.MuteHostErrorMsgIsEnabled)
                 {
                     fprintf(stderr, "Couldn't load file.\n");
                 }
@@ -1325,6 +1578,12 @@
         {
             fileName.Initialize(specifier);
         }
+
+        if (HostConfigFlags::flags.TraceHostCallbackIsEnabled)
+        {
+            printf("NotifyModuleReadyCallback(exception) %s\n", fileName.GetString());
+        }
+
         PrintException(*fileName, JsErrorScriptException);
     }
     else
@@ -1348,4 +1607,4 @@
 
     WScriptJsrt::CallbackMessage *msg = new WScriptJsrt::CallbackMessage(0, task);
     messageQueue->InsertSorted(msg);
-}
+}
\ No newline at end of file
diff --git a/bin/ch/WScriptJsrt.h b/bin/ch/WScriptJsrt.h
index c6f1b9c..266a08e 100644
--- a/bin/ch/WScriptJsrt.h
+++ b/bin/ch/WScriptJsrt.h
@@ -3,6 +3,7 @@
 // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
 //-------------------------------------------------------------------------------------------------------
 #pragma once
+#include <list>
 
 class WScriptJsrt
 {
@@ -118,6 +119,13 @@
     static JsValueRef CALLBACK LoadTextFileCallback(JsValueRef callee, bool isConstructCall, JsValueRef *arguments, unsigned short argumentCount, void *callbackState);
     static JsValueRef CALLBACK FlagCallback(JsValueRef callee, bool isConstructCall, JsValueRef *arguments, unsigned short argumentCount, void *callbackState);
 
+    static JsValueRef CALLBACK BroadcastCallback(JsValueRef callee, bool isConstructCall, JsValueRef *arguments, unsigned short argumentCount, void *callbackState);
+    static JsValueRef CALLBACK ReceiveBroadcastCallback(JsValueRef callee, bool isConstructCall, JsValueRef *arguments, unsigned short argumentCount, void *callbackState);
+    static JsValueRef CALLBACK ReportCallback(JsValueRef callee, bool isConstructCall, JsValueRef *arguments, unsigned short argumentCount, void *callbackState);
+    static JsValueRef CALLBACK GetReportCallback(JsValueRef callee, bool isConstructCall, JsValueRef *arguments, unsigned short argumentCount, void *callbackState);
+    static JsValueRef CALLBACK LeavingCallback(JsValueRef callee, bool isConstructCall, JsValueRef *arguments, unsigned short argumentCount, void *callbackState);
+    static JsValueRef CALLBACK SleepCallback(JsValueRef callee, bool isConstructCall, JsValueRef *arguments, unsigned short argumentCount, void *callbackState);
+
     static JsErrorCode FetchImportedModuleHelper(JsModuleRecord referencingModule, JsValueRef specifier, __out JsModuleRecord* dependentModuleRecord);
 
     static MessageQueue *messageQueue;
diff --git a/bin/ch/ch.vcxproj b/bin/ch/ch.vcxproj
index ecdc0f7..e07267a 100644
--- a/bin/ch/ch.vcxproj
+++ b/bin/ch/ch.vcxproj
@@ -57,6 +57,7 @@
     <ClInclude Include="HostConfigFlagsList.h" />
     <ClInclude Include="JITProcessManager.h" />
     <ClInclude Include="MessageQueue.h" />
+    <ClInclude Include="RuntimeThreadData.h" />
     <ClInclude Include="stdafx.h" />
     <ClInclude Include="WScriptJsrt.h" />
   </ItemGroup>
@@ -68,6 +69,7 @@
     <ClCompile Include="Helpers.cpp" />
     <ClCompile Include="HostConfigFlags.cpp" />
     <ClCompile Include="JITProcessManager.cpp" />
+    <ClCompile Include="RuntimeThreadData.cpp" />
     <ClCompile Include="WScriptJsrt.cpp" />
   </ItemGroup>
   <ItemGroup>
@@ -88,6 +90,7 @@
     </ProjectReference>
   </ItemGroup>
   <ItemGroup>
+    <None Include="262.js" />
     <None Include="ch.def" />
   </ItemGroup>
   <ItemGroup>
@@ -103,4 +106,4 @@
   </ItemGroup>
   <Import Project="$(BuildConfigPropsPath)Chakra.Build.targets" Condition="exists('$(BuildConfigPropsPath)Chakra.Build.targets')" />
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-</Project>
+</Project>
\ No newline at end of file
diff --git a/bin/ch/stdafx.h b/bin/ch/stdafx.h
index a838d5d..f88785a 100644
--- a/bin/ch/stdafx.h
+++ b/bin/ch/stdafx.h
@@ -153,6 +153,7 @@
 #include "ChakraRtInterface.h"
 #include "HostConfigFlags.h"
 #include "MessageQueue.h"
+#include "RuntimeThreadData.h"
 #include "WScriptJsrt.h"
 #include "Debugger.h"
 
diff --git a/build.sh b/build.sh
index bcd2dc2..2208ab5 100755
--- a/build.sh
+++ b/build.sh
@@ -79,7 +79,9 @@
     echo ""
 }
 
-CHAKRACORE_DIR=`dirname $0`
+pushd `dirname $0` > /dev/null
+CHAKRACORE_DIR=`pwd -P`
+popd > /dev/null
 _CXX=""
 _CC=""
 _VERBOSE=""
@@ -182,7 +184,17 @@
 
     --icu=*)
         ICU_PATH=$1
-        ICU_PATH="-DICU_INCLUDE_PATH_SH=${ICU_PATH:6}"
+        ICU_PATH="${ICU_PATH:6}"
+        if [[ ! -d ${ICU_PATH} ]]; then
+            if [[ -d "${CHAKRACORE_DIR}/${ICU_PATH}" ]]; then
+                ICU_PATH="${CHAKRACORE_DIR}/${ICU_PATH}"
+            else
+                # if ICU_PATH is given, do not fallback to no-icu
+                echo "!!! couldn't find ICU at $ICU_PATH"
+                exit 1
+            fi
+        fi
+        ICU_PATH="-DICU_INCLUDE_PATH_SH=${ICU_PATH}"
         ;;
 
     --libs-only)
@@ -303,6 +315,10 @@
         VALGRIND="-DENABLE_VALGRIND_SH=1"
         ;;
 
+    -y | -Y)
+        ALWAYS_YES=1
+        ;;
+
     *)
         echo "Unknown option $1"
         PRINT_USAGE
@@ -320,7 +336,7 @@
         echo -e "\nThis script will download ICU-LIB from\n${ICU_URL}\n"
         echo "It is licensed to you by its publisher, not Microsoft."
         echo "Microsoft is not responsible for the software."
-        echo "Your installation and use of ICU-LIB is subject to the publisher’s terms available here:"
+        echo "Your installation and use of ICU-LIB is subject to the publisher's terms available here:"
         echo -e "http://www.unicode.org/copyright.html#License\n"
         echo -e "----------------------------------------------------------------\n"
         echo "If you don't agree, press Ctrl+C to terminate"
@@ -375,10 +391,26 @@
 fi
 
 # if LTO build is enabled and cc-toolchain/clang was compiled, use it instead
-if [[ $HAS_LTO == 1 && -f cc-toolchain/build/bin/clang++ ]]; then
-    SELF=`pwd`
-    _CXX="$SELF/cc-toolchain/build/bin/clang++"
-    _CC="$SELF/cc-toolchain/build/bin/clang"
+if [[ $HAS_LTO == 1 ]]; then
+    if [[ -f cc-toolchain/build/bin/clang++ ]]; then
+        SELF=`pwd`
+        _CXX="$CHAKRACORE_DIR/cc-toolchain/build/bin/clang++"
+        _CC="$CHAKRACORE_DIR/cc-toolchain/build/bin/clang"
+    else
+        # Linux LD possibly doesn't support LLVM LTO, check.. and compile clang if not
+        if [[ $OS_LINUX == 1 ]]; then
+            if [[ ! `ld -v` =~ 'GNU gold' ]]; then
+                $CHAKRACORE_DIR/tools/compile_clang.sh
+                if [[ $? != 0 ]]; then
+                  echo -e "tools/compile_clang.sh has failed.\n"
+                  echo "Try with 'sudo' ?"
+                  exit 1
+                fi
+                _CXX="$CHAKRACORE_DIR/cc-toolchain/build/bin/clang++"
+                _CC="$CHAKRACORE_DIR/cc-toolchain/build/bin/clang"
+            fi
+        fi
+    fi
 fi
 
 if [ "${HAS_LTO}${OS_LINUX}" == "11" ]; then
diff --git a/jenkins/check_copyright.sh b/jenkins/check_copyright.sh
index addacbf..afccc36 100755
--- a/jenkins/check_copyright.sh
+++ b/jenkins/check_copyright.sh
@@ -39,6 +39,7 @@
     grep -v -E '\.man$' |
     grep -v -E 'lib/wabt/.*' |
     grep -v -E 'test/WasmSpec/.*$' |
+    grep -v -E 'test/UnitTestFramework/yargs.js$' |
     grep -v -E 'test/benchmarks/.*\.js$' |
     grep -v -E 'test/benchmarks/.*\.js_c$' |
     grep -v -E 'bin/External/.*$' |
diff --git a/jenkins/check_file_eol.sh b/jenkins/check_file_eol.sh
index 0eef11e..d4e48d0 100755
--- a/jenkins/check_file_eol.sh
+++ b/jenkins/check_file_eol.sh
@@ -20,7 +20,7 @@
 # We can't rely on dos2unix being installed, so simply grep for the CR octet 0x0d via xxd.
 # We don't want to simply detect a literal 0d in the file or output so configure xxd to emit
 # octets in such a way that we can grep for the CR octet and not accidentally detect
-# text of the file or 0d spanning 2 octets in xxd output, e.g., 20d1 (' Ñ').
+# text of the file or 0d spanning 2 octets in xxd output (e.g. the 0d in 20d1)
 xxd -i -c 16 $1 | grep '0x0d' > $ERRFILETEMP
 if [ $? -eq 0 ]; then # grep found matches ($?==0), so we found CR (0x0d) in the file
     echo "ERROR: CR (0x0d) was introduced in $1" >> $ERRFILE
diff --git a/lib/Backend/AgenPeeps.h b/lib/Backend/AgenPeeps.h
index 3a92b5f..9f5981d 100644
--- a/lib/Backend/AgenPeeps.h
+++ b/lib/Backend/AgenPeeps.h
@@ -22,9 +22,6 @@
     bool AlwaysDependent(IR::Instr *instr);
     bool DependentOpnds(IR::Opnd *opnd1, IR::Opnd *opnd2);
     bool AgenDependentInstrs(IR::Instr *instr1, IR::Instr *instr2);
-    bool IsMemoryInstr(IR::Instr *instr);
-    bool IsLoad(IR::Instr *instr);
-    bool IsStore(IR::Instr *instr);
     bool IsMemoryOpnd(IR::Opnd *opnd);
 };
 
diff --git a/lib/Backend/AsmJsJITInfo.cpp b/lib/Backend/AsmJsJITInfo.cpp
index 1eab14d..fd3f59f 100644
--- a/lib/Backend/AsmJsJITInfo.cpp
+++ b/lib/Backend/AsmJsJITInfo.cpp
@@ -81,12 +81,6 @@
 #endif
 
 bool
-AsmJsJITInfo::IsHeapBufferConst() const
-{
-    return m_data.isHeapBufferConst != FALSE;
-}
-
-bool
 AsmJsJITInfo::UsesHeapBuffer() const
 {
     return m_data.usesHeapBuffer != FALSE;
@@ -95,7 +89,6 @@
 bool
 AsmJsJITInfo::AccessNeedsBoundCheck(uint offset) const
 {
-    // Normally, heap has min size of 0x10000, but if you use ChangeHeap, min heap size is increased to 0x1000000
-    return offset >= 0x1000000 || (IsHeapBufferConst() && offset >= 0x10000);
+    return offset >= 0x10000;
 }
 #endif
\ No newline at end of file
diff --git a/lib/Backend/AsmJsJITInfo.h b/lib/Backend/AsmJsJITInfo.h
index 2b03a2c..3ce4ace 100644
--- a/lib/Backend/AsmJsJITInfo.h
+++ b/lib/Backend/AsmJsJITInfo.h
@@ -36,7 +36,6 @@
     intptr_t GetWasmSignatureAddr(uint index) const;
 #endif
 
-    bool IsHeapBufferConst() const;
     bool UsesHeapBuffer() const;
     bool AccessNeedsBoundCheck(uint offset) const;
 
diff --git a/lib/Backend/Backend.h b/lib/Backend/Backend.h
index 9ccdbea..4c74b33 100644
--- a/lib/Backend/Backend.h
+++ b/lib/Backend/Backend.h
@@ -174,6 +174,7 @@
 #include "Encoder.h"
 #include "EmitBuffer.h"
 #include "InterpreterThunkEmitter.h"
+#include "JITThunkEmitter.h"
 #include "InliningHeuristics.h"
 #include "InliningDecider.h"
 #include "Inline.h"
diff --git a/lib/Backend/BackwardPass.cpp b/lib/Backend/BackwardPass.cpp
index b6c9d8f..98b4752 100644
--- a/lib/Backend/BackwardPass.cpp
+++ b/lib/Backend/BackwardPass.cpp
@@ -191,8 +191,7 @@
 {
     return
         !PHASE_OFF(Js::TrackCompoundedIntOverflowPhase, func) &&
-        DoTrackIntOverflow() &&
-        (!func->HasProfileInfo() || !func->GetReadOnlyProfileInfo()->IsTrackCompoundedIntOverflowDisabled());
+        DoTrackIntOverflow() && !func->IsTrackCompoundedIntOverflowDisabled();
 }
 
 bool
@@ -5575,8 +5574,6 @@
             case Js::OpCode::Coerce_Regex:
             case Js::OpCode::Coerce_StrOrRegex:
             case Js::OpCode::Conv_PrimStr:
-
-            case Js::OpCode::Add_Ptr:
                 // These instructions don't generate -0, and their behavior is the same for any src that is -0 or +0
                 SetNegativeZeroDoesNotMatterIfLastUse(instr->GetSrc1());
                 SetNegativeZeroDoesNotMatterIfLastUse(instr->GetSrc2());
diff --git a/lib/Backend/BackwardPass.h b/lib/Backend/BackwardPass.h
index e6fdaa4..b0dd5ef 100644
--- a/lib/Backend/BackwardPass.h
+++ b/lib/Backend/BackwardPass.h
@@ -38,10 +38,9 @@
     void ProcessFieldKills(IR::Instr * instr);
     template<typename T> void ClearBucketsOnFieldKill(IR::Instr *instr, HashTable<T> *table);
     void ProcessFieldHoistKills(IR::Instr * instr);
-    bool ProcessBailOutInfo(IR::Instr * instr, bool preOpBailout);
     bool ProcessBailOutInfo(IR::Instr * instr);
-    void ProcessPendingPreOpBailOutInfo(IR::Instr *const currentInstr);
     void ProcessBailOutInfo(IR::Instr * instr, BailOutInfo * bailOutInfo);
+    void ProcessPendingPreOpBailOutInfo(IR::Instr *const currentInstr);
     void ProcessBailOutArgObj(BailOutInfo * bailOutInfo, BVSparse<JitArenaAllocator> * byteCodeUpwardExposedUsed);
     void ProcessBailOutConstants(BailOutInfo * bailOutInfo, BVSparse<JitArenaAllocator> * byteCodeUpwardExposedUsed, BVSparse<JitArenaAllocator>* argSymsBv);
     void ProcessBailOutCopyProps(BailOutInfo * bailOutInfo, BVSparse<JitArenaAllocator> * byteCodeUpwardExposedUsed, BVSparse<JitArenaAllocator>* argSymsBv);
diff --git a/lib/Backend/BailOut.cpp b/lib/Backend/BailOut.cpp
index 4245e5d..d169084 100644
--- a/lib/Backend/BailOut.cpp
+++ b/lib/Backend/BailOut.cpp
@@ -2199,6 +2199,20 @@
                     profileInfo->DisablePowIntIntTypeSpec();
                     rejitReason = RejitReason::PowIntIntTypeSpecDisabled;
                 }
+                break;
+            }
+            case IR::BailOutOnEarlyExit:
+            {
+                if (profileInfo->IsOptimizeTryFinallyDisabled())
+                {
+                    reThunk = true;
+                }
+                else
+                {
+                    profileInfo->DisableOptimizeTryFinally();
+                    rejitReason = RejitReason::OptimizeTryFinallyDisabled;
+                }
+                break;
             }
         }
 
@@ -2218,6 +2232,13 @@
         if (profileInfo->GetRejitCount() >= 100 ||
             (profileInfo->GetBailOutOffsetForLastRejit() == actualBailOutOffset && function->IsNewEntryPointAvailable()))
         {
+#ifdef REJIT_STATS
+            Js::ScriptContext* scriptContext = executeFunction->GetScriptContext();
+            if (scriptContext->rejitReasonCountsCap != nullptr)
+            {
+                scriptContext->rejitReasonCountsCap[static_cast<byte>(rejitReason)]++;
+            }
+#endif
             reThunk = true;
             rejitReason = RejitReason::None;
         }
@@ -2230,12 +2251,27 @@
 
     REJIT_KIND_TESTTRACE(bailOutKind, _u("Bailout from function: function: %s, bailOutKindName: (%S), bailOutCount: %d, callCount: %d, reJitReason: %S, reThunk: %s\r\n"),
         function->GetFunctionBody()->GetDisplayName(), ::GetBailOutKindName(bailOutKind), bailOutRecord->bailOutCount, callsCount,
-        RejitReasonNames[rejitReason], reThunk ? trueString : falseString);
+        GetRejitReasonName(rejitReason), reThunk ? trueString : falseString);
 
 #ifdef REJIT_STATS
-    if(PHASE_STATS(Js::ReJITPhase, executeFunction))
+    executeFunction->GetScriptContext()->LogBailout(executeFunction, bailOutKind);
+    if (bailOutRecord->bailOutCount > 500)
     {
-        executeFunction->GetScriptContext()->LogBailout(executeFunction, bailOutKind);
+        Js::ScriptContext* scriptContext = executeFunction->GetScriptContext();
+        auto bailoutReasonCountsCap = scriptContext->bailoutReasonCountsCap;
+        if (bailoutReasonCountsCap != nullptr)
+        {
+            if (!bailoutReasonCountsCap->ContainsKey(bailOutKind))
+            {
+                bailoutReasonCountsCap->Item(bailOutKind, 1);
+            }
+            else
+            {
+                uint val = bailoutReasonCountsCap->Item(bailOutKind);
+                ++val;
+                bailoutReasonCountsCap->Item(bailOutKind, val);
+            }
+        }
     }
 #endif
 
@@ -2255,10 +2291,7 @@
     else if (rejitReason != RejitReason::None)
     {
 #ifdef REJIT_STATS
-        if(PHASE_STATS(Js::ReJITPhase, executeFunction))
-        {
-            executeFunction->GetScriptContext()->LogRejit(executeFunction, rejitReason);
-        }
+        executeFunction->GetScriptContext()->LogRejit(executeFunction, rejitReason);
 #endif
         executeFunction->ClearDontRethunkAfterBailout();
 
@@ -2284,7 +2317,7 @@
                 bailOutRecord->bailOutCount);
 
             Output::Print(_u(" callCount: %u"), callsCount);
-            Output::Print(_u(" reason: %S"), RejitReasonNames[rejitReason]);
+            Output::Print(_u(" reason: %S"), GetRejitReasonName(rejitReason));
             if(bailOutKind != IR::BailOutInvalid)
             {
                 Output::Print(_u(" (%S)"), ::GetBailOutKindName(bailOutKind));
@@ -2411,7 +2444,16 @@
                 break;
 
             case IR::BailOutOnNotNativeArray:
-                rejitReason = RejitReason::ExpectingNativeArray;
+                // REVIEW: We have an issue with array profile info.  The info on the type of array we have won't
+                //         get fixed by rejitting.  For now, just give up after 50 rejits.
+                if (loopHeader->GetRejitCount() >= 50)
+                {
+                    rejitReason = RejitReason::None;
+                }
+                else
+                {
+                    rejitReason = RejitReason::ExpectingNativeArray;
+                }
                 break;
 
             case IR::BailOutConvertedNativeArray:
@@ -2567,27 +2609,22 @@
 
     REJIT_KIND_TESTTRACE(bailOutKind, _u("Bailout from loop: function: %s, loopNumber: %d, bailOutKindName: (%S), reJitReason: %S\r\n"),
         function->GetFunctionBody()->GetDisplayName(), executeFunction->GetLoopNumber(loopHeader),
-        ::GetBailOutKindName(bailOutKind), RejitReasonNames[rejitReason]);
+        ::GetBailOutKindName(bailOutKind), GetRejitReasonName(rejitReason));
 
 #ifdef REJIT_STATS
-    if(PHASE_STATS(Js::ReJITPhase, executeFunction))
-    {
-        executeFunction->GetScriptContext()->LogBailout(executeFunction, bailOutKind);
-    }
+    executeFunction->GetScriptContext()->LogBailout(executeFunction, bailOutKind);
 #endif
 
     if (rejitReason != RejitReason::None)
     {
 #ifdef REJIT_STATS
-        if(PHASE_STATS(Js::ReJITPhase, executeFunction))
-        {
-            executeFunction->GetScriptContext()->LogRejit(executeFunction, rejitReason);
-        }
+        executeFunction->GetScriptContext()->LogRejit(executeFunction, rejitReason);
 #endif
         // Single bailout triggers re-JIT of loop body. the actual codegen scheduling of the new
         // loop body happens in the interpreter
         loopHeader->interpretCount = executeFunction->GetLoopInterpretCount(loopHeader) - 2;
         loopHeader->CreateEntryPoint();
+        loopHeader->IncRejitCount();
 
 #if ENABLE_DEBUG_CONFIG_OPTIONS
         if(PHASE_TRACE(Js::ReJITPhase, executeFunction))
@@ -2599,7 +2636,7 @@
                 executeFunction->GetDebugNumberSet(debugStringBuffer),
                 executeFunction->GetLoopNumber(loopHeader),
                 bailOutRecord->bailOutCount,
-                RejitReasonNames[rejitReason]);
+                GetRejitReasonName(rejitReason));
             if(bailOutKind != IR::BailOutInvalid)
             {
                 Output::Print(_u(" (%S)"), ::GetBailOutKindName(bailOutKind));
diff --git a/lib/Backend/BailOut.h b/lib/Backend/BailOut.h
index 9c97bea..2e00961 100644
--- a/lib/Backend/BailOut.h
+++ b/lib/Backend/BailOut.h
@@ -200,9 +200,6 @@
     }
 
 public:
-    template <size_t N>
-    void FillNativeRegToByteCodeRegMap(uint (&nativeRegToByteCodeRegMap)[N]);
-
     void IsOffsetNativeIntOrFloat(uint offsetIndex, int argOutSlotStart, bool * pIsFloat64, bool * pIsInt32,
         bool * pIsSimd128F4, bool * pIsSimd128I4, bool * pIsSimd128I8, bool * pIsSimd128I16,
         bool * pIsSimd128U4, bool * pIsSimd128U8, bool * pIsSimd128U16, bool * pIsSimd128B4, bool * pIsSimd128B8, bool * pIsSimd128B16) const;
@@ -267,7 +264,6 @@
         uint regSlot, int offset, bool isLocal, bool isFloat64, bool isInt32,
         bool isSimd128F4, bool isSimd128I4, bool isSimd128I8, bool isSimd128I16,
         bool isSimd128U4, bool isSimd128U8, bool isSimd128U16, bool isSimd128B4, bool isSimd128B8, bool isSimd128B16 ) const;
-    void RestoreInlineFrame(InlinedFrameLayout *inlinedFrame, Js::JavascriptCallStackLayout * layout, Js::Var * registerSaves);
 
     void AdjustOffsetsForDiagMode(Js::JavascriptCallStackLayout * layout, Js::ScriptFunction * function) const;
 
diff --git a/lib/Backend/BailOutKind.h b/lib/Backend/BailOutKind.h
index c73c0d2..84bc500 100644
--- a/lib/Backend/BailOutKind.h
+++ b/lib/Backend/BailOutKind.h
@@ -3,8 +3,8 @@
 // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
 //-------------------------------------------------------------------------------------------------------
 
-#if !defined(BAIL_OUT_KIND) || !defined(BAIL_OUT_KIND_LAST) || !defined(BAIL_OUT_KIND_VALUE) || !defined(BAIL_OUT_KIND_VALUE_LAST)
-    #error BAIL_OUT_KIND, BAIL_OUT_KIND_LAST, BAIL_OUT_KIND_VALUE, and BAIL_OUT_KIND_VALUE_LAST must be defined before including this file.
+#if !defined(BAIL_OUT_KIND) || !defined(BAIL_OUT_KIND_VALUE) || !defined(BAIL_OUT_KIND_VALUE_LAST)
+    #error BAIL_OUT_KIND, BAIL_OUT_KIND_VALUE, and BAIL_OUT_KIND_VALUE_LAST must be defined before including this file.
 #endif
                /* kind */                           /* allowed bits */
 BAIL_OUT_KIND(BailOutInvalid,                       IR::BailOutOnResultConditions | IR::BailOutForArrayBits | IR::BailOutForDebuggerBits | IR::BailOutMarkTempObject)
@@ -139,7 +139,6 @@
 BAIL_OUT_KIND_VALUE_LAST(BailOutKindBits, BailOutMarkTempObject | BailOutOnDivSrcConditions | BailOutOnResultConditions | BailOutForArrayBits | BailOutForDebuggerBits)
 
 // Help caller undefine the macros
-#undef BAIL_OUT_KIND_LAST
 #undef BAIL_OUT_KIND
 #undef BAIL_OUT_KIND_VALUE_LAST
 #undef BAIL_OUT_KIND_VALUE
diff --git a/lib/Backend/CMakeLists.txt b/lib/Backend/CMakeLists.txt
index 85041d7..bc6c371 100644
--- a/lib/Backend/CMakeLists.txt
+++ b/lib/Backend/CMakeLists.txt
@@ -40,6 +40,7 @@
     InliningHeuristics.cpp
     IntBounds.cpp
     InterpreterThunkEmitter.cpp
+    JITThunkEmitter.cpp
     JITOutput.cpp
     JITTimeConstructorCache.cpp
     JITTimeFunctionBody.cpp
diff --git a/lib/Backend/Chakra.Backend.vcxproj b/lib/Backend/Chakra.Backend.vcxproj
index d14bdc6..a2ab5df 100644
--- a/lib/Backend/Chakra.Backend.vcxproj
+++ b/lib/Backend/Chakra.Backend.vcxproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <Import Condition="'$(ChakraBuildPathImported)'!='true'" Project="$(SolutionDir)Chakra.Build.Paths.props" />
   <Import Project="$(BuildConfigPropsPath)Chakra.Build.ProjectConfiguration.props" />
@@ -217,6 +217,7 @@
     <ClCompile Include="$(MSBuildThisFileDirectory)FunctionCodeGenJitTimeData.cpp" />
     <ClCompile Include="$(MSBuildThisFileDirectory)GlobOptBlockData.cpp" />
     <ClCompile Include="$(MSBuildThisFileDirectory)ValueInfo.cpp" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)JITThunkEmitter.cpp" />
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="AgenPeeps.h" />
@@ -390,6 +391,7 @@
     <ClInclude Include="IRViewer.h" />
     <ClInclude Include="IRType.h" />
     <ClInclude Include="IRTypeList.h" />
+    <ClInclude Include="JITThunkEmitter.h" />
     <ClInclude Include="ObjTypeSpecFldInfo.h" />
     <ClInclude Include="JITOutput.h" />
     <ClInclude Include="JITRecyclableObject.h" />
@@ -480,4 +482,4 @@
     <Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
     <Import Project="$(BuildConfig_ARMASM_Path)armasm.targets" />
   </ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
diff --git a/lib/Backend/Chakra.Backend.vcxproj.filters b/lib/Backend/Chakra.Backend.vcxproj.filters
index 9e89b74..3d97d9a 100644
--- a/lib/Backend/Chakra.Backend.vcxproj.filters
+++ b/lib/Backend/Chakra.Backend.vcxproj.filters
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup>
     <ClCompile Include="$(MSBuildThisFileDirectory)AgenPeeps.cpp" />
@@ -127,8 +127,9 @@
     <ClCompile Include="$(MSBuildThisFileDirectory)FixedFieldInfo.cpp" />
     <ClCompile Include="$(MSBuildThisFileDirectory)ObjTypeSpecFldInfo.cpp" />
     <ClCompile Include="$(MSBuildThisFileDirectory)PageAllocatorPool.cpp" />
-    <ClCompile Include="GlobOptBlockData.cpp" />
-    <ClCompile Include="ValueInfo.cpp" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)GlobOptBlockData.cpp" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)ValueInfo.cpp" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)JITThunkEmitter.cpp" />
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="AgenPeeps.h" />
@@ -343,6 +344,7 @@
     <ClInclude Include="PageAllocatorPool.h" />
     <ClInclude Include="GlobOptBlockData.h" />
     <ClInclude Include="ValueInfo.h" />
+    <ClInclude Include="JITThunkEmitter.h" />
   </ItemGroup>
   <ItemGroup>
     <MASM Include="$(MSBuildThisFileDirectory)amd64\LinearScanMdA.asm">
diff --git a/lib/Backend/CodeGenWorkItem.cpp b/lib/Backend/CodeGenWorkItem.cpp
index 3b45778..968537f 100644
--- a/lib/Backend/CodeGenWorkItem.cpp
+++ b/lib/Backend/CodeGenWorkItem.cpp
@@ -12,7 +12,6 @@
     bool isJitInDebugMode,
     CodeGenWorkItemType type)
     : JsUtil::Job(manager)
-    , codeAddress(NULL)
     , functionBody(functionBody)
     , entryPointInfo(entryPointInfo)
     , recyclableData(nullptr)
@@ -26,9 +25,6 @@
     , irViewerRequestContext(nullptr)
 #endif
 {
-#if DBG
-    functionBody->LockDownCounters();
-#endif
     this->jitData = {0};
     // work item data
     this->jitData.type = type;
@@ -209,7 +205,7 @@
 #if DBG
         this->allocation->allocation->isNotExecutableBecauseOOM = true;
 #endif
-        codeGen->FreeNativeCodeGenAllocation(this->allocation->allocation->address);
+        codeGen->FreeNativeCodeGenAllocation(this->allocation->allocation->address, nullptr);
     }
 }
 
diff --git a/lib/Backend/CodeGenWorkItem.h b/lib/Backend/CodeGenWorkItem.h
index 059e8db..57ea70b 100644
--- a/lib/Backend/CodeGenWorkItem.h
+++ b/lib/Backend/CodeGenWorkItem.h
@@ -20,7 +20,6 @@
     CodeGenWorkItemIDL jitData;
 
     Js::FunctionBody *const functionBody;
-    size_t codeAddress;
     ptrdiff_t codeSize;
 
 public:
@@ -64,9 +63,6 @@
         return functionBody;
     }
 
-    void SetCodeAddress(size_t codeAddress) { this->codeAddress = codeAddress; }
-    size_t GetCodeAddress() { return codeAddress; }
-
     void SetCodeSize(ptrdiff_t codeSize) { this->codeSize = codeSize; }
     ptrdiff_t GetCodeSize() { return codeSize; }
 
@@ -186,9 +182,6 @@
 
     QueuedFullJitWorkItem *GetQueuedFullJitWorkItem() const;
     QueuedFullJitWorkItem *EnsureQueuedFullJitWorkItem();
-
-private:
-    bool ShouldSpeculativelyJit() const;
 };
 
 struct JsFunctionCodeGen sealed : public CodeGenWorkItem
@@ -267,11 +260,12 @@
         JsUtil::JobManager *const manager, Js::FunctionBody *const functionBody,
         Js::EntryPointInfo* entryPointInfo, bool isJitInDebugMode, Js::LoopHeader * loopHeader) :
         CodeGenWorkItem(manager, functionBody, entryPointInfo, isJitInDebugMode, JsLoopBodyWorkItemType),
+        codeAddress(NULL),
         loopHeader(loopHeader)
     {
         this->jitData.loopNumber = GetLoopNumber();
     }
-
+    uintptr_t codeAddress;
     Js::LoopHeader * loopHeader;
 
     uint GetLoopNumber() const override
@@ -279,6 +273,9 @@
         return functionBody->GetLoopNumberWithLock(loopHeader);
     }
 
+    void SetCodeAddress(uintptr_t codeAddress) { this->codeAddress = codeAddress; }
+    uintptr_t GetCodeAddress() const { return codeAddress; }
+
     uint GetByteCodeCount() const override
     {
         return (loopHeader->endOffset - loopHeader->startOffset) + functionBody->GetConstantCount();
diff --git a/lib/Backend/EmitBuffer.cpp b/lib/Backend/EmitBuffer.cpp
index 8c1a3b1..2671d0a 100644
--- a/lib/Backend/EmitBuffer.cpp
+++ b/lib/Backend/EmitBuffer.cpp
@@ -8,7 +8,7 @@
 // EmitBufferManager::EmitBufferManager
 //      Constructor
 //----------------------------------------------------------------------------
-template <typename TAlloc, typename TPreReservedAlloc, class SyncObject>
+template <typename TAlloc, typename TPreReservedAlloc, typename SyncObject>
 EmitBufferManager<TAlloc, TPreReservedAlloc, SyncObject>::EmitBufferManager(ArenaAllocator * allocator, CustomHeap::CodePageAllocators<TAlloc, TPreReservedAlloc> * codePageAllocators,
     Js::ScriptContext * scriptContext, LPCWSTR name, HANDLE processHandle) :
     allocationHeap(allocator, codePageAllocators, processHandle),
diff --git a/lib/Backend/Encoder.cpp b/lib/Backend/Encoder.cpp
index 00fd4af..42143b0 100644
--- a/lib/Backend/Encoder.cpp
+++ b/lib/Backend/Encoder.cpp
@@ -433,11 +433,6 @@
     m_func->GetJITOutput()->SetCodeAddress(m_func->GetJITOutput()->GetCodeAddress() | 0x1); // Set thumb mode
 #endif
 
-    if (CONFIG_FLAG(OOPCFGRegistration))
-    {
-        m_func->GetThreadContextInfo()->SetValidCallTargetForCFG((PVOID)m_func->GetJITOutput()->GetCodeAddress());
-    }
-
     const bool isSimpleJit = m_func->IsSimpleJit();
 
     if (this->m_inlineeFrameMap->Count() > 0 &&
diff --git a/lib/Backend/FlowGraph.cpp b/lib/Backend/FlowGraph.cpp
index fc27fde..e910284 100644
--- a/lib/Backend/FlowGraph.cpp
+++ b/lib/Backend/FlowGraph.cpp
@@ -636,29 +636,40 @@
     IR::LabelInstr *leaveLabel = IR::LabelInstr::New(Js::OpCode::Label, this->func);
     lastInstr->InsertBefore(leaveLabel);
 
-    this->AddBlock(leaveLabel, lastInstr, finallyEndBlock->GetNext(), finallyEndBlock /*prevBlock*/);
+    this->AddBlock(leaveLabel, lastInstr, nextBB, finallyEndBlock /*prevBlock*/);
     leaveLabel->SetRegion(lastLabel->GetRegion());
 
     this->AddEdge(finallyEndBlock, leaveLabel->GetBasicBlock());
 
-    IR::LabelInstr *brLabel = IR::LabelInstr::New(Js::OpCode::Label, this->func);
-    leaveLabel->InsertBefore(brLabel);
+    // If the Leave/LeaveNull at the end of finally was not preceeded by a Label, we have to create a new block with BrOnException to early exit
+    if (!lastInstr->GetPrevRealInstrOrLabel()->IsLabelInstr())
+    {
+        IR::LabelInstr *brLabel = IR::LabelInstr::New(Js::OpCode::Label, this->func);
+        leaveLabel->InsertBefore(brLabel);
 
-    IR::BranchInstr *brToExit = IR::BranchInstr::New(Js::OpCode::BrOnException, exitLabel, this->func);
-    leaveLabel->InsertBefore(brToExit);
+        IR::BranchInstr *brToExit = IR::BranchInstr::New(Js::OpCode::BrOnException, exitLabel, this->func);
+        leaveLabel->InsertBefore(brToExit);
 
-    this->AddBlock(brLabel, brToExit, finallyEndBlock->GetNext(), finallyEndBlock /*prevBlock*/);
+        this->AddBlock(brLabel, brToExit, finallyEndBlock->GetNext(), finallyEndBlock /*prevBlock*/);
+        brLabel->SetRegion(lastLabel->GetRegion());
 
-    brLabel->SetRegion(lastLabel->GetRegion());
+        this->AddEdge(finallyEndBlock, brLabel->GetBasicBlock());
+    }
+    else
+    {
+        // If the Leave/LeaveNull at the end of finally was preceeded by a Label, we reuse the block inserting BrOnException to early exit in it
+        IR::BranchInstr *brToExit = IR::BranchInstr::New(Js::OpCode::BrOnException, exitLabel, this->func);
+        leaveLabel->InsertBefore(brToExit);
+        this->AddEdge(finallyEndBlock, exitLabel->GetBasicBlock());
+    }
 
-    // in case of throw/non-terminating loop, there maybe no edge to the next block
+    // In case of throw/non-terminating loop, there maybe no edge to the next block
     if (this->FindEdge(finallyEndBlock, nextBB))
     {
         finallyEndBlock->RemoveSucc(nextBB, this);
     }
-    this->AddEdge(finallyEndBlock, brLabel->GetBasicBlock());
 
-    this->regToFinallyEndMap->Item(lastLabel->GetRegion(), finallyEndBlock->next->next);
+    this->regToFinallyEndMap->Item(lastLabel->GetRegion(), leaveLabel->GetBasicBlock());
 }
 
 void
@@ -3343,8 +3354,6 @@
         {
             Assert(instr->IsLabelInstr());
             instr->AsLabelInstr()->m_isLoopTop = false;
-            instr->AsLabelInstr()->SetRegion(nullptr);
-            instr->AsLabelInstr()->m_hasNonBranchRef = false;
         }
         else
         {
diff --git a/lib/Backend/FlowGraph.h b/lib/Backend/FlowGraph.h
index 2a45dcc..9b6ea93 100644
--- a/lib/Backend/FlowGraph.h
+++ b/lib/Backend/FlowGraph.h
@@ -174,7 +174,6 @@
     bool         Dominates(Region *finallyRegion, Region *exitLabelRegion);
     bool         DoesExitLabelDominate(IR::BranchInstr *leaveInstr);
     void         InsertEdgeFromFinallyToEarlyExit(BasicBlock * finallyEndBlock, IR::LabelInstr * exitLabel);
-    BasicBlock * FindInfiniteLoop(BasicBlock * finallyBlock);
 #if DBG_DUMP
     void         Dump();
     void         Dump(bool verbose, const char16 *form);
diff --git a/lib/Backend/Func.cpp b/lib/Backend/Func.cpp
index 0db1d3a..d970c63 100644
--- a/lib/Backend/Func.cpp
+++ b/lib/Backend/Func.cpp
@@ -299,42 +299,35 @@
         catch (Js::RejitException ex)
         {
             // The work item needs to be rejitted, likely due to some optimization that was too aggressive
-            if (ex.Reason() == RejitReason::AggressiveIntTypeSpecDisabled)
+            switch (ex.Reason())
             {
-                workItem->GetJITFunctionBody()->GetProfileInfo()->DisableAggressiveIntTypeSpec(func.IsLoopBody());
+            case RejitReason::AggressiveIntTypeSpecDisabled:
                 outputData->disableAggressiveIntTypeSpec = TRUE;
-            }
-            else if (ex.Reason() == RejitReason::InlineApplyDisabled)
-            {
+                break;
+            case RejitReason::InlineApplyDisabled:
                 workItem->GetJITFunctionBody()->DisableInlineApply();
                 outputData->disableInlineApply = TRUE;
-            }
-            else if (ex.Reason() == RejitReason::InlineSpreadDisabled)
-            {
+                break;
+            case RejitReason::InlineSpreadDisabled:
                 workItem->GetJITFunctionBody()->DisableInlineSpread();
                 outputData->disableInlineSpread = TRUE;
-            }
-            else if (ex.Reason() == RejitReason::DisableStackArgOpt)
-            {
-                workItem->GetJITFunctionBody()->GetProfileInfo()->DisableStackArgOpt();
+                break;
+            case RejitReason::DisableStackArgOpt:
                 outputData->disableStackArgOpt = TRUE;
-            }
-            else if (ex.Reason() == RejitReason::DisableSwitchOptExpectingInteger ||
-                ex.Reason() == RejitReason::DisableSwitchOptExpectingString)
-            {
-                workItem->GetJITFunctionBody()->GetProfileInfo()->DisableSwitchOpt();
+                break;
+            case RejitReason::DisableSwitchOptExpectingInteger:
+            case RejitReason::DisableSwitchOptExpectingString:
                 outputData->disableSwitchOpt = TRUE;
-            }
-            else if (ex.Reason() == RejitReason::ArrayCheckHoistDisabled || ex.Reason() == RejitReason::ArrayAccessHelperCallEliminationDisabled)
-            {
-                workItem->GetJITFunctionBody()->GetProfileInfo()->DisableArrayCheckHoist(func.IsLoopBody());
+                break;
+            case RejitReason::ArrayCheckHoistDisabled:
+            case RejitReason::ArrayAccessHelperCallEliminationDisabled:
                 outputData->disableArrayCheckHoist = TRUE;
-            }
-            else
-            {
-                Assert(ex.Reason() == RejitReason::TrackIntOverflowDisabled);
-                workItem->GetJITFunctionBody()->GetProfileInfo()->DisableTrackCompoundedIntOverflow();
+                break;
+            case RejitReason::TrackIntOverflowDisabled:
                 outputData->disableTrackCompoundedIntOverflow = TRUE;
+                break;
+            default:
+                Assume(UNREACHED);
             }
 
             if (PHASE_TRACE(Js::ReJITPhase, &func))
@@ -985,6 +978,36 @@
     }
 }
 
+bool
+Func::IsTrackCompoundedIntOverflowDisabled() const
+{
+    return (HasProfileInfo() && GetReadOnlyProfileInfo()->IsTrackCompoundedIntOverflowDisabled()) || m_output.IsTrackCompoundedIntOverflowDisabled();
+}
+
+bool
+Func::IsArrayCheckHoistDisabled() const
+{
+    return (HasProfileInfo() && GetReadOnlyProfileInfo()->IsArrayCheckHoistDisabled(IsLoopBody())) || m_output.IsArrayCheckHoistDisabled();
+}
+
+bool
+Func::IsStackArgOptDisabled() const
+{
+    return (HasProfileInfo() && GetReadOnlyProfileInfo()->IsStackArgOptDisabled()) || m_output.IsStackArgOptDisabled();
+}
+
+bool
+Func::IsSwitchOptDisabled() const
+{
+    return (HasProfileInfo() && GetReadOnlyProfileInfo()->IsSwitchOptDisabled()) || m_output.IsSwitchOptDisabled();
+}
+
+bool
+Func::IsAggressiveIntTypeSpecDisabled() const
+{
+    return (HasProfileInfo() && GetReadOnlyProfileInfo()->IsAggressiveIntTypeSpecDisabled(IsLoopBody())) || m_output.IsAggressiveIntTypeSpecDisabled();
+}
+
 bool Func::CanAllocInPreReservedHeapPageSegment ()
 {
 #ifdef _CONTROL_FLOW_GUARD
diff --git a/lib/Backend/Func.h b/lib/Backend/Func.h
index 46bf502..92e73f0 100644
--- a/lib/Backend/Func.h
+++ b/lib/Backend/Func.h
@@ -213,7 +213,8 @@
 
     bool CanOptimizeTryFinally() const
     {
-        return !this->m_workItem->IsLoopBody() && !PHASE_OFF(Js::OptimizeTryFinallyPhase, this);
+        return !this->m_workItem->IsLoopBody() && !PHASE_OFF(Js::OptimizeTryFinallyPhase, this) &&
+            (!this->HasProfileInfo() || !this->GetReadOnlyProfileInfo()->IsOptimizeTryFinallyDisabled());
     }
 
     bool CanOptimizeTryCatch() const
@@ -752,12 +753,7 @@
 
     bool                GetHasStackArgs() const
     {
-                        bool isStackArgOptDisabled = false;
-                        if (HasProfileInfo())
-                        {
-                            isStackArgOptDisabled = GetReadOnlyProfileInfo()->IsStackArgOptDisabled();
-                        }
-                        return this->hasStackArgs && !isStackArgOptDisabled && !PHASE_OFF1(Js::StackArgOptPhase);
+                        return this->hasStackArgs && !IsStackArgOptDisabled() && !PHASE_OFF1(Js::StackArgOptPhase);
     }
     void                SetHasStackArgs(bool has) { this->hasStackArgs = has;}
 
@@ -798,7 +794,6 @@
                             }
                         }
     }
-
     void               DisableCanDoInlineArgOpt()
     {
                         Func* curFunc = this;
@@ -943,6 +938,11 @@
 
     void SetScopeObjSym(StackSym * sym);
     StackSym * GetScopeObjSym();
+    bool IsTrackCompoundedIntOverflowDisabled() const;
+    bool IsArrayCheckHoistDisabled() const;
+    bool IsStackArgOptDisabled() const;
+    bool IsSwitchOptDisabled() const;
+    bool IsAggressiveIntTypeSpecDisabled() const;
 
 #if DBG
     bool                allowRemoveBailOutArgInstr;
diff --git a/lib/Backend/FunctionCodeGenJitTimeData.cpp b/lib/Backend/FunctionCodeGenJitTimeData.cpp
index a8ec34c..28d60b8 100644
--- a/lib/Backend/FunctionCodeGenJitTimeData.cpp
+++ b/lib/Backend/FunctionCodeGenJitTimeData.cpp
@@ -8,7 +8,7 @@
 #if ENABLE_NATIVE_CODEGEN
 namespace Js
 {
-    FunctionCodeGenJitTimeData::FunctionCodeGenJitTimeData(FunctionInfo *const functionInfo, EntryPointInfo *const entryPoint, bool isInlined) :
+    FunctionCodeGenJitTimeData::FunctionCodeGenJitTimeData(FunctionInfo *const functionInfo, EntryPointInfo *const entryPoint, Var globalThis, uint16 profiledIterations, bool isInlined) :
         functionInfo(functionInfo), entryPointInfo(entryPoint), globalObjTypeSpecFldInfoCount(0), globalObjTypeSpecFldInfoArray(nullptr),
         weakFuncRef(nullptr), inlinees(nullptr), inlineeCount(0), ldFldInlineeCount(0), isInlined(isInlined), isAggressiveInliningEnabled(false),
 #ifdef FIELD_ACCESS_STATS
@@ -16,13 +16,37 @@
 #endif
         next(nullptr),
         ldFldInlinees(nullptr),
-        globalThisObject(GetFunctionBody() && GetFunctionBody()->GetByteCode() ? GetFunctionBody()->GetScriptContext()->GetLibrary()->GetGlobalObject()->ToThis() : 0),
-        profiledIterations(GetFunctionBody() && GetFunctionBody()->GetByteCode() ? GetFunctionBody()->GetProfiledIterations() : 0),
+        globalThisObject(globalThis),
+        profiledIterations(profiledIterations),
         sharedPropertyGuards(nullptr),
         sharedPropertyGuardCount(0)
     {
     }
 
+    FunctionCodeGenJitTimeData* FunctionCodeGenJitTimeData::New(Recycler* recycler, FunctionInfo *const functionInfo, EntryPointInfo *const entryPoint, bool isInlined)
+    {
+        Var globalThis = nullptr;
+        uint16 profiledIterations = 0;
+        FunctionProxy *proxy = functionInfo->GetFunctionProxy();
+        if (proxy && proxy->IsFunctionBody())
+        {
+            FunctionBody* functionBody = proxy->GetFunctionBody();
+            if (functionBody)
+            {
+                if (functionBody->GetByteCode())
+                {
+                    globalThis = functionBody->GetScriptContext()->GetLibrary()->GetGlobalObject()->ToThis();
+                    profiledIterations = functionBody->GetProfiledIterations();
+                }
+
+                DebugOnly(functionBody->LockDownCounters());
+            }
+        }
+
+        return RecyclerNew(recycler, FunctionCodeGenJitTimeData, functionInfo, entryPoint, globalThis, profiledIterations, isInlined);
+    }
+
+
     uint16 FunctionCodeGenJitTimeData::GetProfiledIterations() const
     {
         return profiledIterations;
@@ -98,7 +122,7 @@
         FunctionCodeGenJitTimeData *inlineeData = nullptr;
         if (!inlinees[profiledCallSiteId])
         {
-            inlineeData = RecyclerNew(recycler, FunctionCodeGenJitTimeData, inlinee, nullptr /* entryPoint */, isInlined);
+            inlineeData = FunctionCodeGenJitTimeData::New(recycler, inlinee, nullptr /* entryPoint */, isInlined);
             inlinees[profiledCallSiteId] = inlineeData;
             if (++inlineeCount == 0)
             {
@@ -107,7 +131,7 @@
         }
         else
         {
-            inlineeData = RecyclerNew(recycler, FunctionCodeGenJitTimeData, inlinee, nullptr /* entryPoint */, isInlined);
+            inlineeData = FunctionCodeGenJitTimeData::New(recycler, inlinee, nullptr /* entryPoint */, isInlined);
             // This is polymorphic, chain the data.
             inlineeData->next = inlinees[profiledCallSiteId];
             inlinees[profiledCallSiteId] = inlineeData;
@@ -131,7 +155,7 @@
             ldFldInlinees = RecyclerNewArrayZ(recycler, Field(FunctionCodeGenJitTimeData*), GetFunctionBody()->GetInlineCacheCount());
         }
 
-        const auto inlineeData = RecyclerNew(recycler, FunctionCodeGenJitTimeData, inlinee, nullptr);
+        const auto inlineeData = FunctionCodeGenJitTimeData::New(recycler, inlinee, nullptr);
         Assert(!ldFldInlinees[inlineCacheIndex]);
         ldFldInlinees[inlineCacheIndex] = inlineeData;
         if (++ldFldInlineeCount == 0)
diff --git a/lib/Backend/FunctionCodeGenJitTimeData.h b/lib/Backend/FunctionCodeGenJitTimeData.h
index f2b24f9..38bc79a 100644
--- a/lib/Backend/FunctionCodeGenJitTimeData.h
+++ b/lib/Backend/FunctionCodeGenJitTimeData.h
@@ -57,6 +57,8 @@
         // The profiled iterations need to be determined at the time of gathering code gen data on the main thread
         Field(const uint16) profiledIterations;
 
+        FunctionCodeGenJitTimeData(FunctionInfo *const functionInfo, EntryPointInfo *const entryPoint, Var globalThis, uint16 profiledIterations, bool isInlined = true);
+
 #ifdef FIELD_ACCESS_STATS
     public:
         Field(FieldAccessStatsPtr) inlineCacheStats;
@@ -66,7 +68,8 @@
 #endif
 
     public:
-        FunctionCodeGenJitTimeData(FunctionInfo *const functionInfo, EntryPointInfo *const entryPoint, bool isInlined = true);
+
+        static FunctionCodeGenJitTimeData* New(Recycler* recycler, FunctionInfo *const functionInfo, EntryPointInfo *const entryPoint, bool isInlined = true);
 
     public:
         Field(BVFixed *) inlineesBv;
diff --git a/lib/Backend/GlobOpt.cpp b/lib/Backend/GlobOpt.cpp
index 6a42991..7d05a89 100644
--- a/lib/Backend/GlobOpt.cpp
+++ b/lib/Backend/GlobOpt.cpp
@@ -6332,7 +6332,6 @@
         }
         // fall-through
 
-    case Js::OpCode::Add_Ptr:
     case Js::OpCode::Add_I4:
         if (value != 0)
         {
@@ -8274,7 +8273,6 @@
     IR::Instr *&instr = *pInstr;
     int32 min1 = INT32_MIN, max1 = INT32_MAX, min2 = INT32_MIN, max2 = INT32_MAX, newMin, newMax, tmp;
     Js::OpCode opcode;
-    IR::Opnd *src1, *src2;
     Value *&src1Val = *pSrc1Val;
     Value *&src2Val = *pSrc2Val;
 
@@ -8590,6 +8588,7 @@
                 src2Lossy = false;
 
                 opcode = Js::OpCode::Div_I4;
+                Assert(!instr->GetSrc1()->IsUnsigned());
                 bailOutKind |= IR::BailOnDivResultNotInt;
                 if (max2 >= 0 && min2 <= 0)
                 {
@@ -9216,7 +9215,7 @@
             }
             case Js::OpCode::Rem_A:
             {
-                src2 = instr->GetSrc2();
+                IR::Opnd* src2 = instr->GetSrc2();
                 if (!this->IsLoopPrePass() && min2 == max2 && min1 >= 0)
                 {
                     int32 value = min2;
@@ -9310,6 +9309,7 @@
                     newMax = max(newMin, newMax);
                 }
                 opcode = Js::OpCode::Rem_I4;
+                Assert(!instr->GetSrc1()->IsUnsigned());
                 break;
             }
 
@@ -9600,12 +9600,12 @@
     }
 
     // Make sure the srcs are specialized
-    src1 = instr->GetSrc1();
+    IR::Opnd* src1 = instr->GetSrc1();
     this->ToInt32(instr, src1, this->currentBlock, src1ValueToSpecialize, nullptr, src1Lossy);
 
     if (!skipSrc2)
     {
-        src2 = instr->GetSrc2();
+        IR::Opnd* src2 = instr->GetSrc2();
         this->ToInt32(instr, src2, this->currentBlock, src2ValueToSpecialize, nullptr, src2Lossy);
     }
 
@@ -13471,7 +13471,7 @@
             // Unless we're in asm.js (where it is guaranteed that virtual typed array accesses cannot read/write beyond 4GB),
             // check the range of the index to make sure we won't access beyond the reserved memory beforing eliminating bounds
             // checks in jitted code.
-            if (!GetIsAsmJSFunc())
+            if (!GetIsAsmJSFunc() && baseOwnerIndir)
             {
                 IR::RegOpnd * idxOpnd = baseOwnerIndir->GetIndexOpnd();
                 if (idxOpnd)
@@ -13495,6 +13495,12 @@
             }
             else
             {
+                if (!baseOwnerIndir)
+                {
+                    Assert(instr->m_opcode == Js::OpCode::InlineArrayPush ||
+                        instr->m_opcode == Js::OpCode::InlineArrayPop ||
+                        instr->m_opcode == Js::OpCode::LdLen_A);
+                }
                 eliminatedLowerBoundCheck = true;
                 eliminatedUpperBoundCheck = true;
                 canBailOutOnArrayAccessHelperCall = false;
@@ -15592,7 +15598,7 @@
     // This can happen for Neg_A if it needs to bail out on negative zero, and perhaps other cases as well. It's too late to fix
     // the problem (overflows may already be ignored), so handle it by bailing out at compile-time and disabling tracking int
     // overflow.
-    Assert(!func->HasProfileInfo() || !func->GetReadOnlyProfileInfo()->IsTrackCompoundedIntOverflowDisabled());
+    Assert(!func->IsTrackCompoundedIntOverflowDisabled());
 
     if(PHASE_TRACE(Js::BailOutPhase, this->func))
     {
@@ -15610,7 +15616,7 @@
         Output::Flush();
     }
 
-    if(func->HasProfileInfo() && func->GetReadOnlyProfileInfo()->IsTrackCompoundedIntOverflowDisabled())
+    if(func->IsTrackCompoundedIntOverflowDisabled())
     {
         // Tracking int overflows is already off for some reason. Prevent trying to rejit again because it won't help and the
         // same thing will happen again and cause an infinite loop. Just abort jitting this function.
@@ -15684,7 +15690,6 @@
     case Js::OpCode::Or_I4:
     case Js::OpCode::Xor_I4:
     case Js::OpCode::Add_I4:
-    case Js::OpCode::Add_Ptr:
 swap_srcs:
         if (!instr->GetSrc2()->IsImmediateOpnd())
         {
@@ -17007,7 +17012,7 @@
 GlobOpt::IsSwitchOptEnabled(Func const * func)
 {
     Assert(func->IsTopFunc());
-    return !PHASE_OFF(Js::SwitchOptPhase, func) && (!func->HasProfileInfo() || !func->GetReadOnlyProfileInfo()->IsSwitchOptDisabled()) && !IsTypeSpecPhaseOff(func)
+    return !PHASE_OFF(Js::SwitchOptPhase, func) && !func->IsSwitchOptDisabled() && !IsTypeSpecPhaseOff(func)
         && func->DoGlobOpt() && !func->HasTry();
 }
 
@@ -17035,7 +17040,7 @@
     return
         !PHASE_OFF(Js::AggressiveIntTypeSpecPhase, func) &&
         !IsTypeSpecPhaseOff(func) &&
-        (!func->HasProfileInfo() || !func->GetReadOnlyProfileInfo()->IsAggressiveIntTypeSpecDisabled(func->IsLoopBody()));
+        !func->IsAggressiveIntTypeSpecDisabled();
 }
 
 bool
@@ -17126,7 +17131,7 @@
     Assert(func->IsTopFunc());
     return
         !PHASE_OFF(Js::ArrayCheckHoistPhase, func) &&
-        (!func->HasProfileInfo() || !func->GetReadOnlyProfileInfo()->IsArrayCheckHoistDisabled(func->IsLoopBody())) &&
+        !func->IsArrayCheckHoistDisabled() &&
         !func->IsJitInDebugMode() && // StElemI fast path is not allowed when in debug mode, so it cannot have bailout
         func->DoGlobOptsForGeneratorFunc();
 }
@@ -17884,7 +17889,7 @@
     Output::Print(_u("    FloatTypeSpec: %s\r\n"), this->DoFloatTypeSpec() ? _u("enabled") : _u("disabled"));
     Output::Print(_u("    AggressiveIntTypeSpec: %s\r\n"), this->DoAggressiveIntTypeSpec() ? _u("enabled") : _u("disabled"));
     Output::Print(_u("    LossyIntTypeSpec: %s\r\n"), this->DoLossyIntTypeSpec() ? _u("enabled") : _u("disabled"));
-    Output::Print(_u("    ArrayCheckHoist: %s\r\n"),  (this->func->HasProfileInfo() && this->func->GetReadOnlyProfileInfo()->IsArrayCheckHoistDisabled(func->IsLoopBody())) ? _u("disabled") : _u("enabled"));
+    Output::Print(_u("    ArrayCheckHoist: %s\r\n"),  this->func->IsArrayCheckHoistDisabled() ? _u("disabled") : _u("enabled"));
     Output::Print(_u("    ImplicitCallFlags: %s\r\n"), Js::DynamicProfileInfo::GetImplicitCallFlagsString(this->func->m_fg->implicitCallFlags));
     for (Loop * loop = this->func->m_fg->loopList; loop != NULL; loop = loop->next)
     {
diff --git a/lib/Backend/GlobOpt.h b/lib/Backend/GlobOpt.h
index 7cd32dc..8cc4b48 100644
--- a/lib/Backend/GlobOpt.h
+++ b/lib/Backend/GlobOpt.h
@@ -612,7 +612,6 @@
     bool                    TryTypeSpecializeUnaryToFloatHelper(IR::Instr** pInstr, Value** pSrc1Val, Value* const src1OriginalVal, Value **pDstVal);
     bool                    TypeSpecializeBailoutExpectedInteger(IR::Instr* instr, Value* src1Val, Value** dstVal);
     bool                    TypeSpecializeStElem(IR::Instr **pInstr, Value *src1Val, Value **pDstVal);
-    bool                    TryGetIntConstIndexValue(IR::Instr *instr, IR::IndirOpnd *indirOpnd, bool checkSym, int32 *pValue, bool *isNotInt);
     bool                    ShouldExpectConventionalArrayIndexValue(IR::IndirOpnd *const indirOpnd);
     ValueType               GetDivValueType(IR::Instr* instr, Value* src1Val, Value* src2Val, bool specialize);
 
@@ -632,7 +631,6 @@
     bool                    InspectInstrForMemSetCandidate(Loop* loop, IR::Instr* instr, struct MemSetEmitData* emitData, bool& errorInInstr);
     bool                    InspectInstrForMemCopyCandidate(Loop* loop, IR::Instr* instr, struct MemCopyEmitData* emitData, bool& errorInInstr);
     bool                    ValidateMemOpCandidates(Loop * loop, _Out_writes_(iEmitData) struct MemOpEmitData** emitData, int& iEmitData);
-    void                    HoistHeadSegmentForMemOp(IR::Instr *instr, IR::ArrayRegOpnd *arrayRegOpnd, IR::Instr *insertBeforeInstr);
     void                    EmitMemop(Loop * loop, LoopCount *loopCount, const struct MemOpEmitData* emitData);
     IR::Opnd*               GenerateInductionVariableChangeForMemOp(Loop *loop, byte unroll, IR::Instr *insertBeforeInstr = nullptr);
     IR::RegOpnd*            GenerateStartIndexOpndForMemop(Loop *loop, IR::Opnd *indexOpnd, IR::Opnd *sizeOpnd, bool isInductionVariableChangeIncremental, bool bIndexAlreadyChanged, IR::Instr *insertBeforeInstr = nullptr);
@@ -976,7 +974,5 @@
     void                    TrackTempObjectSyms(IR::Instr * instr, IR::RegOpnd * opnd);
     IR::Instr *             GenerateBailOutMarkTempObjectIfNeeded(IR::Instr * instr, IR::Opnd * opnd, bool isDst);
 
-    static void             InstantiateForceInlinedMembers_GlobOptIntBounds();
-
     friend class InvariantBlockBackwardIterator;
 };
diff --git a/lib/Backend/GlobOptBailOut.cpp b/lib/Backend/GlobOptBailOut.cpp
index dd3f59d..1506f43 100644
--- a/lib/Backend/GlobOptBailOut.cpp
+++ b/lib/Backend/GlobOptBailOut.cpp
@@ -986,7 +986,7 @@
 #ifdef _M_IX86
                 if (this->currentRegion && (this->currentRegion->GetType() == RegionTypeTry || this->currentRegion->GetType() == RegionTypeFinally))
                 {
-                    // For a bailout in argument evaluation from an EH region, the esp is offset by the TryCatch helper�s frame. So, the argouts are not actually pushed at the
+                    // For a bailout in argument evaluation from an EH region, the esp is offset by the TryCatch helper's frame. So, the argouts are not actually pushed at the
                     // offsets stored in the bailout record, which are relative to ebp. Need to restore the argouts from the actual value of esp before calling the Bailout helper.
                     // For nested calls, argouts for the outer call need to be restored from an offset of stack-adjustment-done-by-the-inner-call from esp.
                     if (startCallNumber + 1 == bailOutInfo->startCallCount)
diff --git a/lib/Backend/GlobOptExpr.cpp b/lib/Backend/GlobOptExpr.cpp
index 14278e1..c9de294 100644
--- a/lib/Backend/GlobOptExpr.cpp
+++ b/lib/Backend/GlobOptExpr.cpp
@@ -79,7 +79,6 @@
         // Copy-prop should handle these
         return false;
     case Js::OpCode::Add_I4:
-    case Js::OpCode::Add_Ptr:
         opcode = Js::OpCode::Add_A;
         break;
     case Js::OpCode::Sub_I4:
@@ -257,9 +256,10 @@
     case Js::OpCode::Neg_I4:
     case Js::OpCode::Add_I4:
     case Js::OpCode::Sub_I4:
+    case Js::OpCode::DivU_I4:
     case Js::OpCode::Div_I4:
+    case Js::OpCode::RemU_I4:
     case Js::OpCode::Rem_I4:
-    case Js::OpCode::Add_Ptr:
     case Js::OpCode::ShrU_I4:
     {
         // Can't CSE and Add where overflow doesn't matter (and no bailout) with one where it does matter... Record whether int
diff --git a/lib/Backend/IR.cpp b/lib/Backend/IR.cpp
index bb66f47..275e0bc 100644
--- a/lib/Backend/IR.cpp
+++ b/lib/Backend/IR.cpp
@@ -3747,7 +3747,6 @@
 bool Instr::BinaryCalculatorT(T src1Const, T src2Const, int64 *pResult)
 {
     T value = 0;
-    bool check = true;
     switch (this->m_opcode)
     {
 #define BINARY_U(OPCODE,HANDLER) \
@@ -3768,7 +3767,6 @@
         BINARY_U(CmUnGt_I4, Js::AsmJsMath::CmpGt)
         BINARY_U(CmUnLe_I4, Js::AsmJsMath::CmpLe)
         BINARY_U(CmUnGe_I4, Js::AsmJsMath::CmpGe)
-        //
         BINARY(Add_I4, Js::AsmJsMath::Add)
         BINARY(Sub_I4, Js::AsmJsMath::Sub)
         BINARY(Mul_I4, Js::AsmJsMath::Mul)
@@ -3778,25 +3776,10 @@
         BINARY(Shl_I4, Wasm::WasmMath::Shl)
         BINARY(Shr_I4, Wasm::WasmMath::Shr)
         BINARY_U(ShrU_I4, Wasm::WasmMath::ShrU)
-        case Js::OpCode::Div_I4:
-            check = GetSrc1()->IsUnsigned() || !(src1Const == SignedTypeTraits<T>::MinValue && src2Const == -1);
-        case Js::OpCode::Rem_I4:
-        if (check && (src2Const != 0))
-        {
-            if (GetSrc1()->IsUnsigned())
-            {
-                value = m_opcode == Js::OpCode::Div_I4 ?
-                    Js::AsmJsMath::Div<typename SignedTypeTraits<T>::UnsignedType>(src1Const, src2Const) :
-                    Js::AsmJsMath::Rem<typename SignedTypeTraits<T>::UnsignedType>(src1Const, src2Const);
-            }
-            else
-            {
-                value = m_opcode == Js::OpCode::Div_I4 ?
-                    Js::AsmJsMath::Div<T>(src1Const, src2Const) :
-                    Js::AsmJsMath::Rem<T>(src1Const, src2Const);
-            }
-        }
-        break;
+        BINARY(Div_I4, Js::AsmJsMath::DivChecked)
+        BINARY_U(DivU_I4, Js::AsmJsMath::DivChecked)
+        BINARY(Rem_I4, Js::AsmJsMath::RemChecked)
+        BINARY_U(RemU_I4, Js::AsmJsMath::RemChecked)
         default:
             return false;
 #undef BINARY
diff --git a/lib/Backend/IR.h b/lib/Backend/IR.h
index 0781ccb..f6104f9 100644
--- a/lib/Backend/IR.h
+++ b/lib/Backend/IR.h
@@ -131,9 +131,6 @@
 #if DBG_DUMP
         globOptInstrString(nullptr),
 #endif
-#if _CONTROL_FLOW_GUARD_SHADOW_STACK
-        isFsBased(false),
-#endif
         dstIsTempNumber(false),
         dstIsTempNumberTransferred(false),
         dstIsTempObject(false),
@@ -739,6 +736,7 @@
     bool                 m_isAirlock : 1;
     bool                 m_isSwitchBr : 1;
     bool                 m_isOrphanedLeave : 1; // A Leave in a loop body in a try, most likely generated because of a return statement.
+    bool                 m_areCmpRegisterFlagsUsedLater : 1; // Indicate that this branch is not the only instr using the register flags set by cmp
 #if DBG
     bool                 m_isMultiBranch;
     bool                 m_isHelperToNonHelperBranch;
@@ -750,7 +748,7 @@
     static BranchInstr * New(Js::OpCode opcode, Opnd* destOpnd, LabelInstr * branchTarget, Opnd *srcOpnd, Func *func);
     static BranchInstr * New(Js::OpCode opcode, LabelInstr * branchTarget, Opnd *src1Opnd, Opnd *src2Opnd, Func *func);
 
-    BranchInstr(bool hasBailOutInfo = false) : Instr(hasBailOutInfo), m_branchTarget(nullptr), m_isAirlock(false), m_isSwitchBr(false), m_isOrphanedLeave(false)
+    BranchInstr(bool hasBailOutInfo = false) : Instr(hasBailOutInfo), m_branchTarget(nullptr), m_isAirlock(false), m_isSwitchBr(false), m_isOrphanedLeave(false), m_areCmpRegisterFlagsUsedLater(false)
     {
 #if DBG
         m_isMultiBranch = false;
diff --git a/lib/Backend/IRBuilderAsmJs.cpp b/lib/Backend/IRBuilderAsmJs.cpp
index fada070..3a80f9b 100644
--- a/lib/Backend/IRBuilderAsmJs.cpp
+++ b/lib/Backend/IRBuilderAsmJs.cpp
@@ -1732,11 +1732,13 @@
     }
     if (m_asmFuncInfo->UsesHeapBuffer())
     {
-        // if heap buffer can change, then we will insert reload after each call
-        if (!m_asmFuncInfo->IsHeapBufferConst())
+        // heap buffer can change for wasm
+#ifdef ENABLE_WASM
+        if (m_func->GetJITFunctionBody()->IsWasmFunction())
         {
             BuildHeapBufferReload(offset);
         }
+#endif
         // after foreign function call, we need to make sure that the heap hasn't been detached
         if (newOpcode == Js::OpCodeAsmJs::Call)
         {
@@ -1894,7 +1896,7 @@
     StackSym * symDst = nullptr;
     if (type == TyVar)
     {
-        symDst = m_func->m_symTable->GetArgSlotSym(UInt16Math::Add(dstArgSlot, 1));
+        symDst = m_func->m_symTable->GetArgSlotSym(ArgSlotMath::Add(dstArgSlot, 1));
         IR::Opnd * tmpDst = IR::RegOpnd::New(StackSym::New(m_func), TyVar, m_func);
 
         IR::Instr * instr = IR::Instr::New(Js::OpCode::ToVar, tmpDst, srcOpnd, m_func);
@@ -2396,41 +2398,42 @@
         instr = IR::Instr::New(Js::OpCode::Sub_I4, dstOpnd, src1Opnd, src2Opnd, m_func);
         break;
 
-    case Js::OpCodeAsmJs::Mul_UInt:
-        src1Opnd->SetType(TyUint32);
-        src2Opnd->SetType(TyUint32);
     case Js::OpCodeAsmJs::Mul_Int:
         instr = IR::Instr::New(Js::OpCode::Mul_I4, dstOpnd, src1Opnd, src2Opnd, m_func);
         break;
-    case Js::OpCodeAsmJs::Div_Check_UInt:
+    case Js::OpCodeAsmJs::Div_Trap_UInt:
         src1Opnd->SetType(TyUint32);
         src2Opnd->SetType(TyUint32);
-    case Js::OpCodeAsmJs::Div_Check_Int:
-    {
+        // Fall through for trap
+    case Js::OpCodeAsmJs::Div_Trap_Int:
         src2Opnd = BuildTrapIfZero(src2Opnd, offset);
-        if (newOpcode == Js::OpCodeAsmJs::Div_Check_Int)
+        if (newOpcode == Js::OpCodeAsmJs::Div_Trap_Int)
         {
             src1Opnd = BuildTrapIfMinIntOverNegOne(src1Opnd, src2Opnd, offset);
         }
-        instr = IR::Instr::New(Js::OpCode::Div_I4, dstOpnd, src1Opnd, src2Opnd, m_func);
+        instr = IR::Instr::New(newOpcode == Js::OpCodeAsmJs::Div_Trap_UInt ? Js::OpCode::DivU_I4 : Js::OpCode::Div_I4, dstOpnd, src1Opnd, src2Opnd, m_func);
         break;
-    }
     case Js::OpCodeAsmJs::Div_UInt:
         src1Opnd->SetType(TyUint32);
         src2Opnd->SetType(TyUint32);
+        instr = IR::Instr::New(Js::OpCode::DivU_I4, dstOpnd, src1Opnd, src2Opnd, m_func);
+        break;
     case Js::OpCodeAsmJs::Div_Int:
         instr = IR::Instr::New(Js::OpCode::Div_I4, dstOpnd, src1Opnd, src2Opnd, m_func);
         break;
-    case Js::OpCodeAsmJs::Rem_Check_UInt:
+    case Js::OpCodeAsmJs::Rem_Trap_UInt:
         src1Opnd->SetType(TyUint32);
         src2Opnd->SetType(TyUint32);
-    case Js::OpCodeAsmJs::Rem_Check_Int:
+        // Fall through for trap
+    case Js::OpCodeAsmJs::Rem_Trap_Int:
         src2Opnd = BuildTrapIfZero(src2Opnd, offset);
-        instr = IR::Instr::New(Js::OpCode::Rem_I4, dstOpnd, src1Opnd, src2Opnd, m_func);
+        instr = IR::Instr::New(newOpcode == Js::OpCodeAsmJs::Rem_Trap_UInt ? Js::OpCode::RemU_I4 : Js::OpCode::Rem_I4, dstOpnd, src1Opnd, src2Opnd, m_func);
         break;
     case Js::OpCodeAsmJs::Rem_UInt:
         src1Opnd->SetType(TyUint32);
         src2Opnd->SetType(TyUint32);
+        instr = IR::Instr::New(Js::OpCode::RemU_I4, dstOpnd, src1Opnd, src2Opnd, m_func);
+        break;
     case Js::OpCodeAsmJs::Rem_Int:
         instr = IR::Instr::New(Js::OpCode::Rem_I4, dstOpnd, src1Opnd, src2Opnd, m_func);
         break;
@@ -3008,23 +3011,29 @@
     case Js::OpCodeAsmJs::Mul_Long:
         instr = IR::Instr::New(Js::OpCode::Mul_I4, dstOpnd, src1Opnd, src2Opnd, m_func);
         break;
-    case Js::OpCodeAsmJs::Div_ULong:
+    case Js::OpCodeAsmJs::Div_Trap_ULong:
         src1Opnd->SetType(TyUint64);
         src2Opnd->SetType(TyUint64);
-    case Js::OpCodeAsmJs::Div_Long:
+        // Fall Through for trap
+    case Js::OpCodeAsmJs::Div_Trap_Long:
     {
         src2Opnd = BuildTrapIfZero(src2Opnd, offset);
         src1Opnd = BuildTrapIfMinIntOverNegOne(src1Opnd, src2Opnd, offset);
-        instr = IR::Instr::New(Js::OpCode::Div_I4, dstOpnd, src1Opnd, src2Opnd, m_func);
+        Js::OpCode op = newOpcode == Js::OpCodeAsmJs::Div_Trap_ULong ? Js::OpCode::DivU_I4 : Js::OpCode::Div_I4;
+        instr = IR::Instr::New(op, dstOpnd, src1Opnd, src2Opnd, m_func);
         break;
     }
-    case Js::OpCodeAsmJs::Rem_ULong:
+    case Js::OpCodeAsmJs::Rem_Trap_ULong:
         src1Opnd->SetType(TyUint64);
         src2Opnd->SetType(TyUint64);
-    case Js::OpCodeAsmJs::Rem_Long:
+        // Fall Through for trap
+    case Js::OpCodeAsmJs::Rem_Trap_Long:
+    {
         src2Opnd = BuildTrapIfZero(src2Opnd, offset);
-        instr = IR::Instr::New(Js::OpCode::Rem_I4, dstOpnd, src1Opnd, src2Opnd, m_func);
+        Js::OpCode op = newOpcode == Js::OpCodeAsmJs::Rem_Trap_ULong ? Js::OpCode::RemU_I4 : Js::OpCode::Rem_I4;
+        instr = IR::Instr::New(op, dstOpnd, src1Opnd, src2Opnd, m_func);
         break;
+    }
     case Js::OpCodeAsmJs::And_Long:
         instr = IR::Instr::New(Js::OpCode::And_I4, dstOpnd, src1Opnd, src2Opnd, m_func);
         break;
@@ -3325,6 +3334,8 @@
 IR::SymOpnd *
 IRBuilderAsmJs::BuildAsmJsLoopBodySlotOpnd(SymID symId, IRType opndType)
 {
+    // There is no unsigned locals, make sure we create only signed locals
+    opndType = IRType_EnsureSigned(opndType);
     // Get the interpreter frame instance that was passed in.
     StackSym *loopParamSym = m_func->EnsureLoopParamSym();
 
diff --git a/lib/Backend/IRType.cpp b/lib/Backend/IRType.cpp
index 60f9a6c..548146c 100644
--- a/lib/Backend/IRType.cpp
+++ b/lib/Backend/IRType.cpp
@@ -57,6 +57,36 @@
     return type >= TySimd128F4 && type <= TySimd128D2;
 }
 
+IRType IRType_EnsureSigned(IRType type)
+{
+    CompileAssert(TyUint8 > TyInt8);
+    CompileAssert((TyUint8 - TyInt8) == (TyUint16 - TyInt16));
+    CompileAssert((TyUint8 - TyInt8) == (TyUint32 - TyInt32));
+    CompileAssert((TyUint8 - TyInt8) == (TyUint64 - TyInt64));
+    if (IRType_IsUnsignedInt(type))
+    {
+        IRType signedType = (IRType)(type - (TyUint8 - TyInt8));
+        Assert(IRType_IsSignedInt(signedType));
+        return signedType;
+    }
+    return type;
+}
+
+IRType IRType_EnsureUnsigned(IRType type)
+{
+    CompileAssert(TyUint8 > TyInt8);
+    CompileAssert((TyUint8 - TyInt8) == (TyUint16 - TyInt16));
+    CompileAssert((TyUint8 - TyInt8) == (TyUint32 - TyInt32));
+    CompileAssert((TyUint8 - TyInt8) == (TyUint64 - TyInt64));
+    if (IRType_IsSignedInt(type))
+    {
+        IRType unsignedType = (IRType)(type + (TyUint8 - TyInt8));
+        Assert(IRType_IsUnsignedInt(unsignedType));
+        return unsignedType;
+    }
+    return type;
+}
+
 #if DBG_DUMP || defined(ENABLE_IR_VIEWER)
 void IRType_Dump(IRType type)
 {
diff --git a/lib/Backend/IRType.h b/lib/Backend/IRType.h
index 8d742d0..d92d98a 100644
--- a/lib/Backend/IRType.h
+++ b/lib/Backend/IRType.h
@@ -32,6 +32,8 @@
 extern bool IRType_IsInt64(IRType type);
 extern bool IRType_IsSimd(IRType type);
 extern bool IRType_IsSimd128(IRType type);
+extern IRType IRType_EnsureSigned(IRType type);
+extern IRType IRType_EnsureUnsigned(IRType type);
 
 #if DBG_DUMP || defined(ENABLE_IR_VIEWER)
 extern void IRType_Dump(IRType type);
diff --git a/lib/Backend/Inline.cpp b/lib/Backend/Inline.cpp
index e6582d1..ce337bd 100644
--- a/lib/Backend/Inline.cpp
+++ b/lib/Backend/Inline.cpp
@@ -2575,6 +2575,11 @@
         return callInstr;
     }
 
+    if (!applyTargetInfo)
+    {
+        return callInstr;
+    }
+
     bool safeThis = false;
     if (TryOptimizeCallInstrWithFixedMethod(callInstr, applyTargetInfo, false /*isPolymorphic*/, false /*isBuiltIn*/, false /*isCtor*/, true /*isInlined*/, safeThis /*unused here*/))
     {
@@ -2611,7 +2616,7 @@
     linkOpnd->AsRegOpnd()->m_sym->m_isInlinedArgSlot = true;
 }
 
-/* 
+/*
 This method only inlines targets which are script functions, under the
 condition that the second argument (if any) passed to apply is arguments object.
 */
@@ -2723,7 +2728,7 @@
         argObjByteCodeArgoutCapture->GetDst()->GetStackSym()->m_nonEscapingArgObjAlias = true;
 
         argumentsObjArgOut->m_opcode = Js::OpCode::ArgOut_A_FromStackArgs;
-    
+
         IR::Instr *  bailOutOnNotStackArgs = IR::BailOutInstr::New(Js::OpCode::BailOnNotStackArgs, IR::BailOutOnInlineFunction,
             callInstr, callInstr->m_func);
         // set src1 to avoid CSE on BailOnNotStackArgs for different arguments object
@@ -4683,7 +4688,7 @@
             }
 
             int excess;
-            Js::ArgSlot restFuncFormalCount = 0;
+            uint restFuncFormalCount = 0;
             if (instr->m_func != inlinee)
             {
                 restFuncFormalCount = instr->m_func->GetJITFunctionBody()->GetInParamsCount();
@@ -4716,18 +4721,35 @@
 
             if (instr->m_func != inlinee)
             {
-                for (uint i = restFuncFormalCount; i < formalCount; ++i)
+                uint index = 0;
+                for (uint i = restFuncFormalCount; i < min(actualCount, formalCount); ++i)
                 {
-                    IR::IndirOpnd *arrayLocOpnd = IR::IndirOpnd::New(restDst->AsRegOpnd(), i - restFuncFormalCount, TyVar, inlinee);
+                    IR::IndirOpnd *arrayLocOpnd = IR::IndirOpnd::New(restDst->AsRegOpnd(), index, TyVar, inlinee);
                     IR::Instr *stElemInstr = IR::Instr::New(Js::OpCode::StElemC, arrayLocOpnd, argOuts[i]->GetBytecodeArgOutCapture()->GetDst(), inlinee);
                     instr->InsertBefore(stElemInstr);
+                    index++;
+                }
+                for (uint i = max(formalCount, restFuncFormalCount); i < actualCount; ++i)
+                {
+                    IR::IndirOpnd *arrayLocOpnd = IR::IndirOpnd::New(restDst->AsRegOpnd(), index, TyVar, inlinee);
+                    IR::Instr *stElemInstr = IR::Instr::New(Js::OpCode::StElemC, arrayLocOpnd, argOutsExtra[i]->GetBytecodeArgOutCapture()->GetDst(), inlinee);
+                    instr->InsertBefore(stElemInstr);
+                    index++;
+                }
+                AssertMsg(index == (uint)excess, "Incorrect rest args built");
+                if (index != (uint)excess)
+                {
+                    throw Js::OperationAbortedException();
                 }
             }
-            for (uint i = formalCount; i < actualCount; ++i)
+            else
             {
-                IR::IndirOpnd *arrayLocOpnd = IR::IndirOpnd::New(restDst->AsRegOpnd(), (i + restFuncFormalCount) - formalCount, TyVar, inlinee);
-                IR::Instr *stElemInstr = IR::Instr::New(Js::OpCode::StElemC, arrayLocOpnd, argOutsExtra[i]->GetBytecodeArgOutCapture()->GetDst(), inlinee);
-                instr->InsertBefore(stElemInstr);
+                for (uint i = formalCount; i < actualCount; ++i)
+                {
+                    IR::IndirOpnd *arrayLocOpnd = IR::IndirOpnd::New(restDst->AsRegOpnd(), i - formalCount, TyVar, inlinee);
+                    IR::Instr *stElemInstr = IR::Instr::New(Js::OpCode::StElemC, arrayLocOpnd, argOutsExtra[i]->GetBytecodeArgOutCapture()->GetDst(), inlinee);
+                    instr->InsertBefore(stElemInstr);
+                }
             }
 
             instr->Remove();
diff --git a/lib/Backend/InterpreterThunkEmitter.cpp b/lib/Backend/InterpreterThunkEmitter.cpp
index 09c2716..732ca96 100644
--- a/lib/Backend/InterpreterThunkEmitter.cpp
+++ b/lib/Backend/InterpreterThunkEmitter.cpp
@@ -56,49 +56,6 @@
     0xC3                                                           // ret
 };
 
-#if _CONTROL_FLOW_GUARD_SHADOW_STACK
-#define RFG_PROLOGUE_SIZE 9
-
-const BYTE InterpreterThunkEmitter::InterpreterThunkRFG[] = {
-    0x48, 0x8b, 0x04, 0x24,                                        // mov         rax,qword ptr [rsp] 
-    0x64, 0x48, 0x89, 0x04, 0x24,                                  // mov         qword ptr fs:[rsp],rax
-    0x48, 0x89, 0x54, 0x24, 0x10,                                  // mov         qword ptr [rsp+10h],rdx
-    0x48, 0x89, 0x4C, 0x24, 0x08,                                  // mov         qword ptr [rsp+8],rcx
-    0x4C, 0x89, 0x44, 0x24, 0x18,                                  // mov         qword ptr [rsp+18h],r8
-    0x4C, 0x89, 0x4C, 0x24, 0x20,                                  // mov         qword ptr [rsp+20h],r9
-    0x48, 0x8B, 0x41, 0x00,                                        // mov         rax, qword ptr [rcx+FunctionInfoOffset]
-    0x48, 0x8B, 0x48, 0x00,                                        // mov         rcx, qword ptr [rax+FunctionProxyOffset]
-    0x48, 0x8B, 0x51, 0x00,                                        // mov         rdx, qword ptr [rcx+DynamicThunkAddressOffset]
-                                                                   // Range Check for Valid call target
-    0x48, 0x83, 0xE2, 0xF8,                                        // and         rdx, 0xFFFFFFFFFFFFFFF8h  ;Force 8 byte alignment
-    0x48, 0x8b, 0xca,                                              // mov         rcx, rdx
-    0x48, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,    // mov         rax, CallBlockStartAddress
-    0x48, 0x2b, 0xc8,                                              // sub         rcx, rax
-    0x48, 0x81, 0xf9, 0x00, 0x00, 0x00, 0x00,                      // cmp         rcx, ThunkSize
-    0x76, 0x09,                                                    // jbe         $safe
-    0x48, 0xc7, 0xc1, 0x00, 0x00, 0x00, 0x00,                      // mov         rcx, errorcode
-    0xcd, 0x29,                                                    // int         29h
-
-    // $safe:
-    0x48, 0x8D, 0x4C, 0x24, 0x08,                                  // lea         rcx, [rsp+8]                ;Load the address to stack
-    0x48, 0x83, 0xEC, StackAllocSize,                              // sub         rsp,28h
-    0x48, 0xB8, 0x00, 0x00, 0x00 ,0x00, 0x00, 0x00, 0x00, 0x00,    // mov         rax, <thunk>
-    0xFF, 0xE2,                                                    // jmp         rdx
-    0xCC, 0xCC, 0xCC, 0xCC                                         // int         3                           ;for alignment to size of 8 we are adding this
-};
-
-const BYTE InterpreterThunkEmitter::EpilogRFG[] = {
-    0x48, 0x83, 0xC4, StackAllocSize,                              // add         rsp,28h
-    0x64, 0x4c, 0x8b, 0x1c, 0x24,                                  // mov         r11,qword ptr fs:[rsp]
-    0x4c, 0x3b, 0x1c, 0x24,                                        // cmp         r11,qword ptr [rsp]
-    0x75, 0x01,                                                    // jne         $fail
-    0xC3,                                                          // ret
-
-    // $fail:
-    0xb9, 0x2c, 0x00, 0x00, 0x00,                                  // mov         ecx, errorcode
-    0xcd, 0x29,                                                    // int         29h
-};
-#endif
 
 #else  // Sys V AMD64
 const BYTE InterpreterThunkEmitter::FunctionInfoOffset = 7;
@@ -280,11 +237,6 @@
 
 const BYTE InterpreterThunkEmitter::HeaderSize()
 {
-#if _CONTROL_FLOW_GUARD_SHADOW_STACK
-    if (_guard_rf_checks_enforced()) {
-        return sizeof(InterpreterThunkRFG);
-    }
-#endif
 
     return _HeaderSize;
 }
@@ -319,7 +271,15 @@
         {
             return AllocateFromFreeList(ppDynamicInterpreterThunk);
         }
-        NewThunkBlock();
+        if (!NewThunkBlock())
+        {
+#ifdef ASMJS_PLAT
+            return this->isAsmInterpreterThunk ? (BYTE*)&Js::InterpreterStackFrame::StaticInterpreterAsmThunk : (BYTE*)&Js::InterpreterStackFrame::StaticInterpreterThunk;
+#else
+            Assert(!this->isAsmInterpreterThunk);
+            return (BYTE*)&Js::InterpreterStackFrame::StaticInterpreterThunk;
+#endif
+        }
     }
 
     Assert(this->thunkBuffer != nullptr);
@@ -351,13 +311,17 @@
     return entryPoint;
 }
 
-void InterpreterThunkEmitter::NewThunkBlock()
+bool InterpreterThunkEmitter::NewThunkBlock()
 {
 #ifdef ENABLE_OOP_NATIVE_CODEGEN
+    if (CONFIG_FLAG(ForceStaticInterpreterThunk))
+    {
+        return false;
+    }
+
     if (JITManager::GetJITManager()->IsOOPJITEnabled())
     {
-        NewOOPJITThunkBlock();
-        return;
+        return NewOOPJITThunkBlock();
     }
 #endif
 
@@ -412,22 +376,25 @@
 #endif
     this->thunkBuffer = buffer;
     this->thunkCount = count;
+    return true;
 }
 
 #ifdef ENABLE_OOP_NATIVE_CODEGEN
-void InterpreterThunkEmitter::NewOOPJITThunkBlock()
+bool InterpreterThunkEmitter::NewOOPJITThunkBlock()
 {
     if (!JITManager::GetJITManager()->IsConnected())
     {
-        Js::Throw::OutOfMemory();
+        return false;
     }
     InterpreterThunkInputIDL thunkInput;
     thunkInput.asmJsThunk = this->isAsmInterpreterThunk;
 
     InterpreterThunkOutputIDL thunkOutput;
     HRESULT hr = JITManager::GetJITManager()->NewInterpreterThunkBlock(this->scriptContext->GetRemoteScriptAddr(), &thunkInput, &thunkOutput);
-    JITManager::HandleServerCallResult(hr, RemoteCallType::ThunkCreation);
-
+    if (!JITManager::HandleServerCallResult(hr, RemoteCallType::ThunkCreation))
+    {
+        return false;
+    }
 
     BYTE* buffer = (BYTE*)thunkOutput.mappedBaseAddr;
 
@@ -448,6 +415,7 @@
 
     this->thunkBuffer = (BYTE*)thunkOutput.mappedBaseAddr;
     this->thunkCount = thunkOutput.thunkCount;
+    return true;
 }
 #endif
 
@@ -495,13 +463,6 @@
         interpreterThunk = SHIFT_ADDR(threadContext, &Js::InterpreterStackFrame::InterpreterThunk);
     }
 
-#if _CONTROL_FLOW_GUARD_SHADOW_STACK
-    if (_guard_rf_checks_enforced()) {
-        header = InterpreterThunkRFG;
-        epilog = EpilogRFG;
-        epilogSize = sizeof(EpilogRFG);
-    }
-#endif
 
     BYTE * currentBuffer = buffer;
     // Ensure there is space for PDATA at the end
@@ -744,11 +705,6 @@
 {
     _Analysis_assume_(thunkSize == HeaderSize());
 
-#if _CONTROL_FLOW_GUARD_SHADOW_STACK
-    if (_guard_rf_checks_enforced()) {
-        thunkBuffer += RFG_PROLOGUE_SIZE;
-    }
-#endif
 
     Emit(thunkBuffer, ThunkAddressOffset, (uintptr_t)interpreterThunk);
     thunkBuffer[DynamicThunkAddressOffset] = Js::FunctionBody::GetOffsetOfDynamicInterpreterThunk();
diff --git a/lib/Backend/InterpreterThunkEmitter.h b/lib/Backend/InterpreterThunkEmitter.h
index 85477a5..89477b5 100644
--- a/lib/Backend/InterpreterThunkEmitter.h
+++ b/lib/Backend/InterpreterThunkEmitter.h
@@ -89,10 +89,6 @@
 
     static const BYTE Epilog[];
 
-#if _CONTROL_FLOW_GUARD_SHADOW_STACK
-    static const BYTE InterpreterThunkRFG[];
-    static const BYTE EpilogRFG[];
-#endif
 
     static const BYTE PageCount = 1;
 #if defined(_M_X64)
@@ -101,10 +97,10 @@
 #endif
 
     /* ------private helpers -----------*/
-    void NewThunkBlock();
+    bool NewThunkBlock();
 
 #ifdef ENABLE_OOP_NATIVE_CODEGEN
-    void NewOOPJITThunkBlock();
+    bool NewOOPJITThunkBlock();
 #endif
 
     static void EncodeInterpreterThunk(
diff --git a/lib/Backend/JITOutput.cpp b/lib/Backend/JITOutput.cpp
index 83a4f2a..60cbad5 100644
--- a/lib/Backend/JITOutput.cpp
+++ b/lib/Backend/JITOutput.cpp
@@ -57,6 +57,36 @@
     m_outputData->throwMapCount = mapCount;
 }
 
+bool
+JITOutput::IsTrackCompoundedIntOverflowDisabled() const
+{
+    return m_outputData->disableTrackCompoundedIntOverflow != FALSE;
+}
+
+bool
+JITOutput::IsArrayCheckHoistDisabled() const
+{
+    return m_outputData->disableArrayCheckHoist != FALSE;
+}
+
+bool
+JITOutput::IsStackArgOptDisabled() const
+{
+    return m_outputData->disableStackArgOpt != FALSE;
+}
+
+bool
+JITOutput::IsSwitchOptDisabled() const
+{
+    return m_outputData->disableSwitchOpt != FALSE;
+}
+
+bool
+JITOutput::IsAggressiveIntTypeSpecDisabled() const
+{
+    return m_outputData->disableAggressiveIntTypeSpec != FALSE;
+}
+
 uint16
 JITOutput::GetArgUsedForBranch() const
 {
@@ -224,18 +254,39 @@
     if (JITManager::GetJITManager()->IsJITServer())
     {
         m_func->GetOOPCodeGenAllocators()->emitBufferManager.CompletePreviousAllocation(m_oopAlloc);
+#if defined(_CONTROL_FLOW_GUARD)
+#if _M_IX86 || _M_X64
+        if (m_func->GetThreadContextInfo()->IsCFGEnabled() && !m_func->IsLoopBody())
+        {
+            m_outputData->thunkAddress = m_func->GetOOPThreadContext()->GetJITThunkEmitter()->CreateThunk(m_outputData->codeAddress);
+        }
+#endif
+#endif
     }
     else
 #endif
     {
         m_func->GetInProcCodeGenAllocators()->emitBufferManager.CompletePreviousAllocation(m_inProcAlloc);
-
         m_func->GetInProcJITEntryPointInfo()->SetInProcJITNativeCodeData(m_func->GetNativeCodeDataAllocator()->Finalize());
         m_func->GetInProcJITEntryPointInfo()->GetJitTransferData()->SetRawData(m_func->GetTransferDataAllocator()->Finalize());
 #if !FLOATVAR
         CodeGenNumberChunk * numberChunks = m_func->GetNumberAllocator()->Finalize();
         m_func->GetInProcJITEntryPointInfo()->SetNumberChunks(numberChunks);
 #endif
+
+#if defined(_CONTROL_FLOW_GUARD)
+#if _M_IX86 || _M_X64
+        if (m_func->GetThreadContextInfo()->IsCFGEnabled() && !m_func->IsLoopBody())
+        {
+            m_outputData->thunkAddress = m_func->GetInProcThreadContext()->GetJITThunkEmitter()->CreateThunk(m_outputData->codeAddress);
+        }
+#endif
+#endif
+    }
+
+    if (!m_outputData->thunkAddress && CONFIG_FLAG(OOPCFGRegistration))
+    {
+        m_func->GetThreadContextInfo()->SetValidCallTargetForCFG((PVOID)m_outputData->codeAddress);
     }
 }
 
diff --git a/lib/Backend/JITOutput.h b/lib/Backend/JITOutput.h
index 3421680..bcf7b89 100644
--- a/lib/Backend/JITOutput.h
+++ b/lib/Backend/JITOutput.h
@@ -21,6 +21,12 @@
 #ifdef _M_ARM
     void RecordXData(BYTE * xdata);
 #endif
+    bool IsTrackCompoundedIntOverflowDisabled() const;
+    bool IsArrayCheckHoistDisabled() const;
+    bool IsStackArgOptDisabled() const;
+    bool IsSwitchOptDisabled() const;
+    bool IsAggressiveIntTypeSpecDisabled() const;
+
     uint16 GetArgUsedForBranch() const;
     intptr_t GetCodeAddress() const;
     size_t GetCodeSize() const;
diff --git a/lib/Backend/JITThunkEmitter.cpp b/lib/Backend/JITThunkEmitter.cpp
new file mode 100644
index 0000000..f72b6d8
--- /dev/null
+++ b/lib/Backend/JITThunkEmitter.cpp
@@ -0,0 +1,291 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+#include "Backend.h"
+
+#if defined(ENABLE_NATIVE_CODEGEN) && defined(_CONTROL_FLOW_GUARD) && (_M_IX86 || _M_X64)
+
+template class JITThunkEmitter<VirtualAllocWrapper>;
+
+#if ENABLE_OOP_NATIVE_CODEGEN
+template class JITThunkEmitter<SectionAllocWrapper>;
+#endif
+
+template <typename TAlloc>
+const BYTE JITThunkEmitter<TAlloc>::DirectJmp[] = {
+    0xE9, 0x00, 0x00, 0x00, 0x00, // JMP <relativeAddress>.32
+    0xCC, 0xCC, 0xCC,
+    0xCC, 0xCC, 0xCC, 0xCC,
+    0xCC, 0xCC, 0xCC, 0xCC
+};
+
+#if _M_X64
+template <typename TAlloc>
+const BYTE JITThunkEmitter<TAlloc>::IndirectJmp[] = {
+    0x48, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // MOV RAX, <relativeAddress>.64
+    0x48, 0xFF, 0xE0,                                           // JMP RAX
+    0xCC, 0xCC, 0xCC
+};
+#endif
+
+template <typename TAlloc>
+JITThunkEmitter<TAlloc>::JITThunkEmitter(ThreadContextInfo * threadContext, TAlloc * codeAllocator, HANDLE processHandle) :
+    processHandle(processHandle),
+    codeAllocator(codeAllocator),
+    threadContext(threadContext),
+    baseAddress(NULL),
+    firstBitToCheck(0)
+{
+    freeThunks.SetAll();
+}
+
+template <typename TAlloc>
+JITThunkEmitter<TAlloc>::~JITThunkEmitter()
+{
+    if (baseAddress != NULL)
+    {
+        this->codeAllocator->Free((PVOID)baseAddress, TotalThunkSize, MEM_RELEASE);
+    }
+}
+
+template <typename TAlloc> inline
+uintptr_t
+JITThunkEmitter<TAlloc>::CreateThunk(uintptr_t entryPoint)
+{
+    AutoCriticalSection autoCs(&this->cs);
+    if(EnsureInitialized() == NULL)
+    {
+        return NULL;
+    }
+
+    // find available thunk
+    BVIndex thunkIndex = this->freeThunks.GetNextBit(this->firstBitToCheck);
+    if (thunkIndex == BVInvalidIndex)
+    {
+        return NULL;
+    }
+    uintptr_t thunkAddress = GetThunkAddressFromIndex(thunkIndex);
+
+    uintptr_t pageStartAddress = GetThunkPageStart(thunkAddress);
+    char * localPageAddress = (char *)this->codeAllocator->AllocLocal((PVOID)pageStartAddress, AutoSystemInfo::PageSize);
+    if (localPageAddress == nullptr)
+    {
+        return NULL;
+    }
+
+    if (IsThunkPageEmpty(pageStartAddress))
+    {
+        if (this->codeAllocator->Alloc((PVOID)pageStartAddress, AutoSystemInfo::PageSize, MEM_COMMIT, PAGE_EXECUTE, true) == nullptr)
+        {
+            this->codeAllocator->FreeLocal(localPageAddress);
+            return NULL;
+        }
+        UnprotectPage(localPageAddress);
+        memset(localPageAddress, 0xCC, AutoSystemInfo::PageSize);
+    }
+    else
+    {
+        UnprotectPage(localPageAddress);
+    }
+
+    EncodeJmp(localPageAddress, thunkAddress, entryPoint);
+
+    ProtectPage(localPageAddress);
+    this->codeAllocator->FreeLocal(localPageAddress);
+
+    if (CONFIG_FLAG(OOPCFGRegistration))
+    {
+        this->threadContext->SetValidCallTargetForCFG((PVOID)thunkAddress);
+    }
+    this->firstBitToCheck = (thunkIndex + 1 < JITThunkEmitter<TAlloc>::TotalThunkCount) ? thunkIndex + 1 : 0;
+    this->freeThunks.Clear(thunkIndex);
+
+    FlushInstructionCache(this->processHandle, (PVOID)thunkAddress, ThunkSize);
+
+    return thunkAddress;
+}
+
+template <typename TAlloc> inline
+void
+JITThunkEmitter<TAlloc>::FreeThunk(uintptr_t thunkAddress)
+{
+    AutoCriticalSection autoCs(&this->cs);
+    BVIndex thunkIndex = GetThunkIndexFromAddress(thunkAddress);
+    if (thunkIndex >= this->freeThunks.Length() || this->freeThunks.TestAndSet(thunkIndex))
+    {
+        Assert(UNREACHED);
+        this->firstBitToCheck = 0;
+        return;
+    }
+
+    if (thunkIndex < firstBitToCheck)
+    {
+        this->firstBitToCheck = thunkIndex;
+    }
+
+    if (CONFIG_FLAG(OOPCFGRegistration))
+    {
+        this->threadContext->SetValidCallTargetForCFG((PVOID)thunkAddress, false);
+    }
+
+    uintptr_t pageStartAddress = GetThunkPageStart(thunkAddress);
+    if (IsThunkPageEmpty(pageStartAddress))
+    {
+        this->codeAllocator->Free((PVOID)pageStartAddress, AutoSystemInfo::PageSize, MEM_DECOMMIT);
+    }
+    else
+    {
+        char * localAddress = (char *)this->codeAllocator->AllocLocal((PVOID)thunkAddress, ThunkSize);
+        if (localAddress == nullptr)
+        {
+            return;
+        }
+        UnprotectPage(localAddress);
+        memset(localAddress, 0xCC, ThunkSize);
+        ProtectPage(localAddress);
+        this->codeAllocator->FreeLocal(localAddress);
+    }
+    FlushInstructionCache(this->processHandle, (PVOID)thunkAddress, ThunkSize);
+}
+
+template <typename TAlloc> inline
+uintptr_t
+JITThunkEmitter<TAlloc>::EnsureInitialized()
+{
+    if (this->baseAddress != NULL)
+    {
+        return this->baseAddress;
+    }
+
+    // only take a lock if we need to initialize
+    {
+        AutoCriticalSection autoCs(&this->cs);
+        // check again because we did the first one outside of lock
+        if (this->baseAddress == NULL)
+        {
+            this->baseAddress = (uintptr_t)this->codeAllocator->Alloc(nullptr, TotalThunkSize, MEM_RESERVE, PAGE_EXECUTE, true);
+        }
+    }
+    return this->baseAddress;
+}
+
+template <typename TAlloc> inline
+bool
+JITThunkEmitter<TAlloc>::IsInThunk(uintptr_t address) const
+{
+    return IsInThunk(this->baseAddress, address);
+}
+
+/* static */
+template <typename TAlloc> inline
+bool
+JITThunkEmitter<TAlloc>::IsInThunk(uintptr_t thunkBaseAddress, uintptr_t address)
+{
+    bool isInThunk = address >= thunkBaseAddress && address < thunkBaseAddress + TotalThunkSize;
+    Assert(!isInThunk || address % ThunkSize == 0);
+    return isInThunk;
+}
+
+/* static */
+template <typename TAlloc> inline
+void
+JITThunkEmitter<TAlloc>::EncodeJmp(char * localPageAddress, uintptr_t thunkAddress, uintptr_t targetAddress)
+{
+    char * localAddress = localPageAddress + thunkAddress % AutoSystemInfo::PageSize;
+    ptrdiff_t relativeAddress = targetAddress - thunkAddress - DirectJmpIPAdjustment;
+#if _M_X64
+    if (relativeAddress > INT_MAX || relativeAddress < INT_MIN)
+    {
+        memcpy_s(localAddress, ThunkSize, IndirectJmp, ThunkSize);
+        uintptr_t * jmpTarget = (uintptr_t*)(localAddress + IndirectJmpTargetOffset);
+        *jmpTarget = targetAddress;
+    }
+    else
+#endif
+    {
+        memcpy_s(localAddress, ThunkSize, DirectJmp, ThunkSize);
+        uintptr_t * jmpTarget = (uintptr_t*)(localAddress + DirectJmpTargetOffset);
+        *jmpTarget = relativeAddress;
+    }
+}
+
+template <typename TAlloc> inline
+bool
+JITThunkEmitter<TAlloc>::IsThunkPageEmpty(uintptr_t address) const
+{
+    Assert(address == GetThunkPageStart(address));
+    BVIndex pageStartIndex = GetThunkIndexFromAddress(address);
+    Assert(pageStartIndex != BVInvalidIndex);
+    BVStatic<ThunksPerPage> * pageBV = this->freeThunks.GetRange<ThunksPerPage>(pageStartIndex);
+    return pageBV->IsAllSet();
+}
+
+template <> inline
+void
+JITThunkEmitter<VirtualAllocWrapper>::ProtectPage(void * address)
+{
+#if defined(ENABLE_JIT_CLAMP)
+    AutoEnableDynamicCodeGen enableCodeGen(true);
+#endif
+    DWORD oldProtect;
+    BOOL result = VirtualProtectEx(this->processHandle, address, ThunkSize, PAGE_EXECUTE, &oldProtect);
+    AssertOrFailFast(result && oldProtect == PAGE_EXECUTE_READWRITE);
+}
+
+template <> inline
+void
+JITThunkEmitter<VirtualAllocWrapper>::UnprotectPage(void * address)
+{
+#if defined(ENABLE_JIT_CLAMP)
+    AutoEnableDynamicCodeGen enableCodeGen(true);
+#endif
+    DWORD oldProtect;
+    BOOL result = VirtualProtectEx(this->processHandle, address, ThunkSize, PAGE_EXECUTE_READWRITE, &oldProtect);
+    AssertOrFailFast(result && oldProtect == PAGE_EXECUTE);
+}
+
+#if ENABLE_OOP_NATIVE_CODEGEN
+template <> inline
+void
+JITThunkEmitter<SectionAllocWrapper>::ProtectPage(void * address)
+{
+}
+
+template <> inline
+void
+JITThunkEmitter<SectionAllocWrapper>::UnprotectPage(void * address)
+{
+}
+#endif
+
+template <typename TAlloc> inline
+uintptr_t
+JITThunkEmitter<TAlloc>::GetThunkAddressFromIndex(BVIndex index) const
+{
+    return this->baseAddress + index * ThunkSize;
+}
+
+template <typename TAlloc> inline
+BVIndex
+JITThunkEmitter<TAlloc>::GetThunkIndexFromAddress(uintptr_t thunkAddress) const
+{
+    uintptr_t thunkIndex = (thunkAddress - this->baseAddress) / ThunkSize;
+#if TARGET_64
+    if (thunkIndex > BVInvalidIndex)
+    {
+        thunkIndex = BVInvalidIndex;
+    }
+#endif
+    return (BVIndex)thunkIndex;
+}
+
+/* static */
+template <typename TAlloc> inline
+uintptr_t
+JITThunkEmitter<TAlloc>::GetThunkPageStart(uintptr_t address)
+{
+    return address - address % AutoSystemInfo::PageSize;
+}
+#endif
diff --git a/lib/Backend/JITThunkEmitter.h b/lib/Backend/JITThunkEmitter.h
new file mode 100644
index 0000000..be4248d
--- /dev/null
+++ b/lib/Backend/JITThunkEmitter.h
@@ -0,0 +1,62 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+#pragma once
+
+#if defined(ENABLE_NATIVE_CODEGEN) && defined(_CONTROL_FLOW_GUARD) && (_M_IX86 || _M_X64)
+template <typename TAlloc>
+class JITThunkEmitter
+{
+private:
+    static const BYTE DirectJmp[];
+    static const uint DirectJmpTargetOffset = 1;
+    static const uint DirectJmpIPAdjustment = 5;
+#if _M_AMD64
+    static const BYTE IndirectJmp[];
+    static const uint IndirectJmpTargetOffset = 2;
+#endif
+    static const uint PageCount = 100;
+    static const size_t ThunkSize = 16;
+    static const size_t ThunksPerPage = AutoSystemInfo::PageSize / ThunkSize;
+
+public:
+    static const uintptr_t ThunkAlignmentMask = ~(ThunkSize-1);
+    static const uint TotalThunkSize = AutoSystemInfo::PageSize * PageCount;
+    static const size_t TotalThunkCount = TotalThunkSize / ThunkSize;
+
+private:
+    CriticalSection cs;
+    TAlloc * codeAllocator;
+    uintptr_t baseAddress;
+    HANDLE processHandle;
+    BVStatic<TotalThunkCount> freeThunks;
+    ThreadContextInfo * threadContext;
+    BVIndex firstBitToCheck;
+
+public:
+    JITThunkEmitter(ThreadContextInfo * threadContext, TAlloc * codeAllocator, HANDLE processHandle);
+    ~JITThunkEmitter();
+
+    uintptr_t  CreateThunk(uintptr_t entryPoint);
+    void FreeThunk(uintptr_t thunkAddress);
+    uintptr_t EnsureInitialized();
+
+    bool IsInThunk(uintptr_t address) const;
+    static bool IsInThunk(uintptr_t thunkBaseAddress, uintptr_t address);
+private:
+    uintptr_t GetThunkAddressFromIndex(BVIndex index) const;
+    BVIndex GetThunkIndexFromAddress(uintptr_t index) const;
+    void ProtectPage(void * address);
+    void UnprotectPage(void * address);
+    bool IsThunkPageEmpty(uintptr_t address) const;
+
+    static void EncodeJmp(char * localPageAddress, uintptr_t thunkAddress, uintptr_t targetAddress);
+    static uintptr_t GetThunkPageStart(uintptr_t address);
+};
+
+#if ENABLE_OOP_NATIVE_CODEGEN
+typedef JITThunkEmitter<SectionAllocWrapper> OOPJITThunkEmitter;
+#endif
+typedef JITThunkEmitter<VirtualAllocWrapper> InProcJITThunkEmitter;
+#endif
diff --git a/lib/Backend/JITTimeFunctionBody.cpp b/lib/Backend/JITTimeFunctionBody.cpp
index 4feb5d9..9e3ae01 100644
--- a/lib/Backend/JITTimeFunctionBody.cpp
+++ b/lib/Backend/JITTimeFunctionBody.cpp
@@ -264,7 +264,6 @@
         jitBody->asmJsData->argTypeArray = (byte*)asmFuncInfo->GetArgTypeArray();
         jitBody->asmJsData->argByteSize = asmFuncInfo->GetArgByteSize();
         jitBody->asmJsData->retType = asmFuncInfo->GetReturnType().which();
-        jitBody->asmJsData->isHeapBufferConst = asmFuncInfo->IsHeapBufferConst();
         jitBody->asmJsData->usesHeapBuffer = asmFuncInfo->UsesHeapBuffer();
         jitBody->asmJsData->totalSizeInBytes = asmFuncInfo->GetTotalSizeinBytes();
 
diff --git a/lib/Backend/JITTimeProfileInfo.cpp b/lib/Backend/JITTimeProfileInfo.cpp
index 0c6a81e..f2b0f6d 100644
--- a/lib/Backend/JITTimeProfileInfo.cpp
+++ b/lib/Backend/JITTimeProfileInfo.cpp
@@ -135,36 +135,7 @@
     data->flags |= profileInfo->IsLoopImplicitCallInfoDisabled() ? Flags_disableLoopImplicitCallInfo : 0;
     data->flags |= profileInfo->IsPowIntIntTypeSpecDisabled() ? Flags_disablePowIntIntTypeSpec : 0;
     data->flags |= profileInfo->IsTagCheckDisabled() ? Flags_disableTagCheck : 0;
-}
-
-void
-JITTimeProfileInfo::DisableAggressiveIntTypeSpec(bool isLoopBody)
-{
-    m_profileData.flags |= isLoopBody ? Flags_disableAggressiveIntTypeSpec_jitLoopBody : Flags_disableAggressiveIntTypeSpec;
-}
-
-void
-JITTimeProfileInfo::DisableArrayCheckHoist(bool isLoopBody)
-{
-    m_profileData.flags |= isLoopBody ? Flags_disableArrayCheckHoist_jitLoopBody : Flags_disableArrayCheckHoist;
-}
-
-void
-JITTimeProfileInfo::DisableStackArgOpt()
-{
-    m_profileData.flags |= Flags_disableStackArgOpt;
-}
-
-void
-JITTimeProfileInfo::DisableSwitchOpt()
-{
-    m_profileData.flags |= Flags_disableSwitchOpt;
-}
-
-void
-JITTimeProfileInfo::DisableTrackCompoundedIntOverflow()
-{
-    m_profileData.flags |= Flags_disableTrackCompoundedIntOverflow;
+    data->flags |= profileInfo->IsOptimizeTryFinallyDisabled() ? Flags_disableOptimizeTryFinally : 0;
 }
 
 const Js::LdElemInfo *
@@ -513,6 +484,12 @@
 }
 
 bool
+JITTimeProfileInfo::IsOptimizeTryFinallyDisabled() const
+{
+    return TestFlag(Flags_disableOptimizeTryFinally);
+}
+
+bool
 JITTimeProfileInfo::HasLdFldCallSiteInfo() const
 {
     return TestFlag(Flags_hasLdFldCallSiteInfo);
diff --git a/lib/Backend/JITTimeProfileInfo.h b/lib/Backend/JITTimeProfileInfo.h
index 522f5d3..44dc827 100644
--- a/lib/Backend/JITTimeProfileInfo.h
+++ b/lib/Backend/JITTimeProfileInfo.h
@@ -36,12 +36,6 @@
 
     uint16 GetConstantArgInfo(Js::ProfileId callSiteId) const;
 
-    void DisableAggressiveIntTypeSpec(bool isLoopBody);
-    void DisableStackArgOpt();
-    void DisableSwitchOpt();
-    void DisableTrackCompoundedIntOverflow();
-    void DisableArrayCheckHoist(bool isLoopBody);
-
     bool IsModulusOpByPowerOf2(Js::ProfileId profileId) const;
     bool IsAggressiveIntTypeSpecDisabled(const bool isJitLoopBody) const;
     bool IsSwitchOptDisabled() const;
@@ -69,6 +63,7 @@
     bool IsLoopImplicitCallInfoDisabled() const;
     bool IsPowIntIntTypeSpecDisabled() const;
     bool IsTagCheckDisabled() const;
+    bool IsOptimizeTryFinallyDisabled() const;
 
 private:
     enum ProfileDataFlags : int64
@@ -109,7 +104,8 @@
         Flags_disableStackArgOpt = 1ll << 32,
         Flags_disableLoopImplicitCallInfo = 1ll << 33,
         Flags_disablePowIntIntTypeSpec = 1ll << 34,
-        Flags_disableTagCheck = 1ll << 35
+        Flags_disableTagCheck = 1ll << 35,
+        Flags_disableOptimizeTryFinally = 1ll << 36
     };
 
     Js::ProfileId GetProfiledArrayCallSiteCount() const;
diff --git a/lib/Backend/JnHelperMethod.h b/lib/Backend/JnHelperMethod.h
index db835bd..96196b9 100644
--- a/lib/Backend/JnHelperMethod.h
+++ b/lib/Backend/JnHelperMethod.h
@@ -17,9 +17,6 @@
 extern "C" PVOID __guard_check_icall_fptr;
 #endif
 
-#if _CONTROL_FLOW_GUARD_SHADOW_STACK
-extern "C" void __guard_ss_verify_failure();
-#endif
 
 namespace IR
 {
diff --git a/lib/Backend/JnHelperMethodList.h b/lib/Backend/JnHelperMethodList.h
index 2f7f780..3d7ae7a 100644
--- a/lib/Backend/JnHelperMethodList.h
+++ b/lib/Backend/JnHelperMethodList.h
@@ -570,10 +570,10 @@
 HELPERCALL(DirectMath_Log, nullptr, 0)
 HELPERCALL(DirectMath_Sin, nullptr, 0)
 HELPERCALL(DirectMath_Tan, nullptr, 0)
-HELPERCALL(DirectMath_Int64DivS, ((int64(*)(int64, int64, Js::ScriptContext*)) Js::InterpreterStackFrame::OP_DivOverflow<int64, &Js::AsmJsMath::Div<int64>, LONGLONG_MIN>), AttrCanThrow)
-HELPERCALL(DirectMath_Int64DivU, ((uint64(*)(uint64, uint64, Js::ScriptContext*)) Js::InterpreterStackFrame::OP_DivRemCheck<uint64, &Js::AsmJsMath::Div<uint64>>), AttrCanThrow)
-HELPERCALL(DirectMath_Int64RemS, ((int64(*)(int64, int64, Js::ScriptContext*)) Js::InterpreterStackFrame::OP_DivRemCheck<int64, &Wasm::WasmMath::Rem<int64>>), AttrCanThrow)
-HELPERCALL(DirectMath_Int64RemU, ((uint64(*)(uint64, uint64, Js::ScriptContext*)) Js::InterpreterStackFrame::OP_DivRemCheck<uint64, &Wasm::WasmMath::Rem<uint64>>), AttrCanThrow)
+HELPERCALL(DirectMath_Int64DivS, ((int64(*)(int64, int64, Js::ScriptContext*)) Js::InterpreterStackFrame::OP_DivOverflow<int64, &Js::AsmJsMath::DivUnsafe<int64>>), AttrCanThrow)
+HELPERCALL(DirectMath_Int64DivU, ((uint64(*)(uint64, uint64, Js::ScriptContext*)) Js::InterpreterStackFrame::OP_UnsignedDivRemCheck<uint64, &Js::AsmJsMath::DivUnsafe<uint64>>), AttrCanThrow)
+HELPERCALL(DirectMath_Int64RemS, ((int64(*)(int64, int64, Js::ScriptContext*)) Js::InterpreterStackFrame::OP_RemOverflow<int64, &Js::AsmJsMath::RemUnsafe<int64>>), AttrCanThrow)
+HELPERCALL(DirectMath_Int64RemU, ((uint64(*)(uint64, uint64, Js::ScriptContext*)) Js::InterpreterStackFrame::OP_UnsignedDivRemCheck<uint64, &Js::AsmJsMath::RemUnsafe<uint64>>), AttrCanThrow)
 HELPERCALL(DirectMath_Int64Mul , (int64(*)(int64,int64)) Js::AsmJsMath::Mul<int64>, 0)
 HELPERCALL(DirectMath_Int64Shl , (int64(*)(int64,int64)) Wasm::WasmMath::Shl<int64>, 0)
 HELPERCALL(DirectMath_Int64Shr , (int64(*)(int64,int64)) Wasm::WasmMath::Shr<int64>, 0)
@@ -617,10 +617,6 @@
 HELPERCALL(CRT_chkstk, __chkstk, 0)
 #endif
 
-#if _CONTROL_FLOW_GUARD_SHADOW_STACK
-// Statically linked CRT routine used when RFG violations.
-HELPERCALL(ReturnFlowGuardFailureRoutine, __guard_ss_verify_failure, 0)
-#endif
 
 #undef HELPERCALL_MATH
 #undef HELPERCALL_FULL_OR_INPLACE_MATH
diff --git a/lib/Backend/Lower.cpp b/lib/Backend/Lower.cpp
index e5b50d1..8a13538 100644
--- a/lib/Backend/Lower.cpp
+++ b/lib/Backend/Lower.cpp
@@ -1046,6 +1046,7 @@
         case Js::OpCode::Add_I4:
         case Js::OpCode::Sub_I4:
         case Js::OpCode::Mul_I4:
+        case Js::OpCode::RemU_I4:
         case Js::OpCode::Rem_I4:
         case Js::OpCode::Or_I4:
         case Js::OpCode::Xor_I4:
@@ -1091,7 +1092,7 @@
             }
             else
             {
-                if (instr->m_opcode == Js::OpCode::Rem_I4)
+                if (instr->m_opcode == Js::OpCode::Rem_I4 || instr->m_opcode == Js::OpCode::RemU_I4)
                 {
                     // fast path
                     this->GenerateSimplifiedInt4Rem(instr);
@@ -1120,12 +1121,10 @@
             instr->m_opcode = Js::OpCode::Ld_I4; //to simplify handling of i32/i64
             instrPrev = instr; //re-evaluate -- let Ld_I4 handler to properly lower the operand.
             break;
+        case Js::OpCode::DivU_I4:
         case Js::OpCode::Div_I4:
             this->LowerDivI4(instr);
             break;
-        case Js::OpCode::Add_Ptr:
-            m_lowererMD.EmitPtrInstr(instr);
-            break;
 
         case Js::OpCode::Typeof:
             m_lowererMD.LowerTypeof(instr);
@@ -15982,10 +15981,22 @@
                 // For typed array, call ToNumber before we fallThrough.
                 if (instr->GetSrc1()->GetType() == TyVar && !instr->GetSrc1()->GetValueType().IsPrimitive())
                 {
+                    // Enter an ophelper block
+                    IR::LabelInstr * opHelper = IR::LabelInstr::New(Js::OpCode::Label, this->m_func, true);
+                    instr->InsertBefore(opHelper);
+
                     IR::Instr *toNumberInstr = IR::Instr::New(Js::OpCode::Call, this->m_func);
                     toNumberInstr->SetSrc1(instr->GetSrc1());
                     instr->InsertBefore(toNumberInstr);
 
+                    if (BailOutInfo::IsBailOutOnImplicitCalls(bailOutKind))
+                    {
+                        // Bail out if this conversion triggers implicit calls.
+                        toNumberInstr = toNumberInstr->ConvertToBailOutInstr(instr->GetBailOutInfo(), bailOutKind);
+                        IR::Instr * instrShare = instr->ShareBailOut();
+                        LowerBailTarget(instrShare);
+                    }
+
                     LowerUnaryHelperMem(toNumberInstr, IR::HelperOp_ConvNumber_Full);
                 }
                 InsertBranch(Js::OpCode::Br, labelFallthrough, instr);  //Jump to fallThrough
@@ -18102,7 +18113,7 @@
     else
     {
         src = IR::RegOpnd::New(argsOpnd[1]->GetType(), m_func);
-        InsertMove(src, argsOpnd[1], instr);
+        InsertMove(src, argsOpnd[1], insertInstr);
     }
 
     IR::LabelInstr *checkNotArrayLabel = IR::LabelInstr::New(Js::OpCode::Label, m_func, valueType.IsLikelyArray());
@@ -23568,7 +23579,7 @@
     IR::LabelInstr *const skipBailOutLabel) const
 {
     Assert(remInstr);
-    Assert(remInstr->m_opcode == Js::OpCode::Rem_I4);
+    Assert(remInstr->m_opcode == Js::OpCode::Rem_I4 || remInstr->m_opcode == Js::OpCode::RemU_I4);
 
     auto *dst = remInstr->GetDst(), *src1 = remInstr->GetSrc1(), *src2 = remInstr->GetSrc2();
 
@@ -23937,9 +23948,11 @@
 Lowerer::LowerDivI4Common(IR::Instr * instr)
 {
     Assert(instr);
-    Assert(instr->m_opcode == Js::OpCode::Rem_I4 || instr->m_opcode == Js::OpCode::Div_I4);
+    Assert((instr->m_opcode == Js::OpCode::Rem_I4 || instr->m_opcode == Js::OpCode::Div_I4) ||
+        (instr->m_opcode == Js::OpCode::RemU_I4 || instr->m_opcode == Js::OpCode::DivU_I4));
     Assert(m_func->GetJITFunctionBody()->IsAsmJsMode());
 
+    const bool isRem = instr->m_opcode == Js::OpCode::Rem_I4 || instr->m_opcode == Js::OpCode::RemU_I4;
     // MIN_INT/-1 path is only needed for signed operations
 
     //       TEST src2, src2
@@ -23982,7 +23995,7 @@
         {
             InsertMove(dst, IR::IntConstOpnd::NewFromType(0, dst->GetType(), m_func), divLabel);
         }
-    InsertBranch(Js::OpCode::Br, doneLabel, divLabel);
+        InsertBranch(Js::OpCode::Br, doneLabel, divLabel);
     }
 
 
@@ -23993,7 +24006,7 @@
         int64 intMin = IRType_IsInt64(src1->GetType()) ? LONGLONG_MIN : INT_MIN;
         IR::Instr* overflowReg3 = IR::Instr::FindSingleDefInstr(Js::OpCode::TrapIfMinIntOverNegOne, instr->GetSrc1());
         bool needsMinOverNeg1Check = true;
-        if (isWasmFunc && instr->m_opcode != Js::OpCode::Rem_I4)
+        if (isWasmFunc && !isRem)
         {
             needsMinOverNeg1Check = overflowReg3 != nullptr;
         }
@@ -24033,7 +24046,7 @@
             }
             else
             {
-                InsertMove(dst, instr->m_opcode == Js::OpCode::Div_I4 ? src1 : IR::IntConstOpnd::NewFromType(0, dst->GetType(), m_func), divLabel);
+                InsertMove(dst, !isRem ? src1 : IR::IntConstOpnd::NewFromType(0, dst->GetType(), m_func), divLabel);
             }
             InsertBranch(Js::OpCode::Br, doneLabel, divLabel);
         }
@@ -24047,7 +24060,7 @@
 Lowerer::LowerRemI4(IR::Instr * instr)
 {
     Assert(instr);
-    Assert(instr->m_opcode == Js::OpCode::Rem_I4);
+    Assert(instr->m_opcode == Js::OpCode::Rem_I4 || instr->m_opcode == Js::OpCode::RemU_I4);
     if (m_func->GetJITFunctionBody()->IsAsmJsMode())
     {
         LowerDivI4Common(instr);
@@ -24073,7 +24086,7 @@
 Lowerer::LowerDivI4(IR::Instr * instr)
 {
     Assert(instr);
-    Assert(instr->m_opcode == Js::OpCode::Div_I4);
+    Assert(instr->m_opcode == Js::OpCode::Div_I4 || instr->m_opcode == Js::OpCode::DivU_I4);
 
 #ifdef _M_IX86
     if (
@@ -24758,7 +24771,7 @@
         if (region->IsNonExceptingFinally())
         {
             Assert(region->GetParent()->GetType() != RegionTypeRoot);
-            Region *ancestor = region->GetFirstAncestorOfNonExceptingFinallyParent();
+            Region *ancestor = region->GetParent()->GetFirstAncestorOfNonExceptingFinallyParent();
             Assert(ancestor && !ancestor->IsNonExceptingFinally());
             if (ancestor->GetType() != RegionTypeRoot)
             {
diff --git a/lib/Backend/LowerMDShared.cpp b/lib/Backend/LowerMDShared.cpp
index def57d4..a8064a5 100644
--- a/lib/Backend/LowerMDShared.cpp
+++ b/lib/Backend/LowerMDShared.cpp
@@ -2861,6 +2861,7 @@
     {
         IR::LabelInstr* skipLow = IR::LabelInstr::New(Js::OpCode::Label, m_func);
         newInstr = IR::BranchInstr::New(Js::OpCode::JNE, skipLow, this->m_func);
+        newInstr->AsBranchInstr()->m_areCmpRegisterFlagsUsedLater = true;
         done->InsertBefore(newInstr);
 
         newInstr = IR::Instr::New(cmpOp, this->m_func);
@@ -5778,68 +5779,45 @@
 void
 LowererMD::GenerateCFGCheck(IR::Opnd * entryPointOpnd, IR::Instr * insertBeforeInstr)
 {
-    //PreReserve segment at this point, as we will definitely using this segment for JITted code(in almost all cases)
-    //This is for CFG check optimization
-    IR::LabelInstr * callLabelInstr = nullptr;
-    char * preReservedRegionStartAddress = nullptr;
-
-    if (m_func->CanAllocInPreReservedHeapPageSegment())
+    bool useJITTrampoline = m_func->GetThreadContextInfo()->IsCFGEnabled();
+    IR::LabelInstr * callLabelInstr = IR::LabelInstr::New(Js::OpCode::Label, m_func);
+    IR::LabelInstr * cfgLabelInstr = IR::LabelInstr::New(Js::OpCode::Label, m_func, useJITTrampoline);
+    uintptr_t jitThunkStartAddress = NULL;
+    if (useJITTrampoline)
     {
-        char* endAddressOfSegment = nullptr;
 #if ENABLE_OOP_NATIVE_CODEGEN
         if (m_func->IsOOPJIT())
         {
-            PreReservedSectionAllocWrapper * preReservedAllocator = m_func->GetOOPThreadContext()->GetPreReservedSectionAllocator();
-            preReservedRegionStartAddress = (char *)preReservedAllocator->EnsurePreReservedRegion();
-            if (preReservedRegionStartAddress != nullptr)
-            {
-                endAddressOfSegment = (char*)preReservedAllocator->GetPreReservedEndAddress();
-            }
+            OOPJITThunkEmitter * jitThunkEmitter = m_func->GetOOPThreadContext()->GetJITThunkEmitter();
+            jitThunkStartAddress = jitThunkEmitter->EnsureInitialized();
         }
         else
 #endif
         {
-            PreReservedVirtualAllocWrapper * preReservedVirtualAllocator = m_func->GetInProcThreadContext()->GetPreReservedVirtualAllocator();
-            preReservedRegionStartAddress = (char *)preReservedVirtualAllocator->EnsurePreReservedRegion();
-            if (preReservedRegionStartAddress != nullptr)
-            {
-                endAddressOfSegment = (char*)preReservedVirtualAllocator->GetPreReservedEndAddress();
-            }
-
+            InProcJITThunkEmitter * jitThunkEmitter = m_func->GetInProcThreadContext()->GetJITThunkEmitter();
+            jitThunkStartAddress = jitThunkEmitter->EnsureInitialized();
         }
-        if (preReservedRegionStartAddress != nullptr)
+        if (jitThunkStartAddress)
         {
-
-            int32 segmentSize = (int32) (endAddressOfSegment - preReservedRegionStartAddress);
+            uintptr_t endAddressOfSegment = jitThunkStartAddress + InProcJITThunkEmitter::TotalThunkSize;
 
             // Generate instructions for local Pre-Reserved Segment Range check
 
             IR::AddrOpnd * endAddressOfSegmentConstOpnd = IR::AddrOpnd::New(endAddressOfSegment, IR::AddrOpndKindDynamicMisc, m_func);
             IR::RegOpnd *resultOpnd = IR::RegOpnd::New(TyMachReg, this->m_func);
-#if _M_IX86
-            //resultOpnd = endAddressOfSegmentConstOpnd - entryPointOpnd
-            IR::Instr* subInstr = IR::Instr::New(Js::OpCode::Sub_I4, resultOpnd, endAddressOfSegmentConstOpnd, entryPointOpnd, m_func);
-            insertBeforeInstr->InsertBefore(subInstr);
-            this->EmitInt4Instr(subInstr);
-#elif _M_X64
-            //MOV resultOpnd, endAddressOfSegment
-            //resultOpnd = resultOpnd - entryPointOpnd
 
-            IR::Instr   *movInstr = IR::Instr::New(Js::OpCode::MOV, resultOpnd, endAddressOfSegmentConstOpnd, this->m_func);
-            insertBeforeInstr->InsertBefore(movInstr);
-            IR::Instr* subInstr = IR::Instr::New(Js::OpCode::SUB, resultOpnd, resultOpnd, entryPointOpnd, m_func);
-            insertBeforeInstr->InsertBefore(subInstr);
-#endif
-            //CMP subResultOpnd, segmentSize
-            //JL $callLabelInstr:
-
-            AssertMsg((size_t) segmentSize == (size_t) (endAddressOfSegment - preReservedRegionStartAddress), "Need a bigger datatype for segmentSize?");
-            IR::IntConstOpnd * segmentSizeOpnd = IR::IntConstOpnd::New(segmentSize, IRType::TyInt32, m_func, true);
-            callLabelInstr = IR::LabelInstr::New(Js::OpCode::Label, m_func);
-            this->m_lowerer->InsertCompareBranch(resultOpnd, segmentSizeOpnd, Js::OpCode::JBE, callLabelInstr, insertBeforeInstr);
+            // resultOpnd = SUB endAddressOfSegmentConstOpnd, entryPointOpnd
+            // CMP resultOpnd, TotalThunkSize
+            // JAE $cfgLabel
+            // AND entryPointOpnd,  ~(ThunkSize-1)
+            // JMP $callLabel
+            m_lowerer->InsertSub(false, resultOpnd, endAddressOfSegmentConstOpnd, entryPointOpnd, insertBeforeInstr);
+            m_lowerer->InsertCompareBranch(resultOpnd, IR::IntConstOpnd::New(InProcJITThunkEmitter::TotalThunkSize, TyMachReg, m_func, true), Js::OpCode::BrGe_A, true, cfgLabelInstr, insertBeforeInstr);
+            m_lowerer->InsertAnd(entryPointOpnd, entryPointOpnd, IR::IntConstOpnd::New(InProcJITThunkEmitter::ThunkAlignmentMask, TyMachReg, m_func, true), insertBeforeInstr);
+            m_lowerer->InsertBranch(Js::OpCode::Br, callLabelInstr, insertBeforeInstr);
         }
     }
-
+    insertBeforeInstr->InsertBefore(cfgLabelInstr);
     //MOV  ecx, entryPoint
     IR::RegOpnd * entryPointRegOpnd = IR::RegOpnd::New(TyMachReg, this->m_func);
 #if _M_IX86
@@ -5871,7 +5849,7 @@
     //CALL cfg(rax)
     insertBeforeInstr->InsertBefore(cfgCallInstr);
 
-    if (preReservedRegionStartAddress != nullptr)
+    if (jitThunkStartAddress)
     {
         Assert(callLabelInstr);
 #if DBG
@@ -7571,7 +7549,6 @@
             case Js::OpCode::Or_I4:
             case Js::OpCode::Xor_I4:
             case Js::OpCode::And_I4:
-            case Js::OpCode::Add_Ptr:
             case Js::OpCode::ADD:
             case Js::OpCode::IMUL2:
             case Js::OpCode::OR:
@@ -7599,12 +7576,6 @@
 }
 
 void
-LowererMD::EmitPtrInstr(IR::Instr *instr)
-{
-    LowererMDArch::EmitPtrInstr(instr);
-}
-
-void
 LowererMD::EmitInt64Instr(IR::Instr * instr)
 {
 #ifdef _M_IX86
diff --git a/lib/Backend/LowerMDShared.h b/lib/Backend/LowerMDShared.h
index 4a3cf72..c8bae11 100644
--- a/lib/Backend/LowerMDShared.h
+++ b/lib/Backend/LowerMDShared.h
@@ -203,7 +203,6 @@
             IR::Instr *     LoadStackAddress(StackSym *sym, IR::RegOpnd *optionalDstOpnd = nullptr);
             void            EmitInt64Instr(IR::Instr * instr);
      static void            EmitInt4Instr(IR::Instr *instr);
-     static void            EmitPtrInstr(IR::Instr *instr);
             void            EmitLoadVar(IR::Instr *instr, bool isFromUint32 = false, bool isHelper = false);
             void            EmitLoadVarNoCheck(IR::RegOpnd * dst, IR::RegOpnd * src, IR::Instr *instrLoad, bool isFromUint32, bool isHelper);
             bool            EmitLoadInt32(IR::Instr *instr, bool conversionFromObjectAllowed, bool bailOutOnHelper = false, IR::LabelInstr * labelBailOut = nullptr);
diff --git a/lib/Backend/NativeCodeGenerator.cpp b/lib/Backend/NativeCodeGenerator.cpp
index d1e5c4c..b1a0d9b 100644
--- a/lib/Backend/NativeCodeGenerator.cpp
+++ b/lib/Backend/NativeCodeGenerator.cpp
@@ -1117,12 +1117,22 @@
 
     if (!CONFIG_FLAG(OOPCFGRegistration))
     {
-        scriptContext->GetThreadContext()->SetValidCallTargetForCFG((PVOID)jitWriteData.codeAddress);
+        if (jitWriteData.thunkAddress)
+        {
+            scriptContext->GetThreadContext()->SetValidCallTargetForCFG((PVOID)jitWriteData.thunkAddress);
+        }
+        else
+        {
+            scriptContext->GetThreadContext()->SetValidCallTargetForCFG((PVOID)jitWriteData.codeAddress);
+        }
+    }
+    if (workItem->Type() == JsLoopBodyWorkItemType)
+    {
+        Assert(jitWriteData.thunkAddress == NULL);
+        ((JsLoopBodyCodeGen*)workItem)->SetCodeAddress(jitWriteData.codeAddress);
     }
 
-    workItem->SetCodeAddress((size_t)jitWriteData.codeAddress);
-
-    workItem->GetEntryPoint()->SetCodeGenRecorded((Js::JavascriptMethod)jitWriteData.codeAddress, jitWriteData.codeSize);
+    workItem->GetEntryPoint()->SetCodeGenRecorded((Js::JavascriptMethod)jitWriteData.thunkAddress, (Js::JavascriptMethod)jitWriteData.codeAddress, jitWriteData.codeSize);
 
     if (jitWriteData.hasBailoutInstr != FALSE)
     {
@@ -1519,7 +1529,7 @@
         {
             Output::Print(_u("Codegen not done yet for function: %s, Entrypoint is CheckAsmJsCodeGenThunk\n"), function->GetFunctionBody()->GetDisplayName());
         }
-        return reinterpret_cast<Js::Var>(entryPoint->GetNativeAddress());
+        return reinterpret_cast<Js::Var>(entryPoint->GetNativeEntrypoint());
     }
     if (PHASE_TRACE1(Js::AsmjsEntryPointInfoPhase))
     {
@@ -1587,13 +1597,14 @@
         Assert(functionBody->GetDefaultEntryPointInfo() == function->GetEntryPointInfo() &&
             (
                 originalEntryPoint == DefaultEntryThunk
+             || originalEntryPoint == Js::InterpreterStackFrame::StaticInterpreterThunk
              || scriptContext->IsDynamicInterpreterThunk(originalEntryPoint)
              || originalEntryPoint_IS_ProfileDeferredParsingThunk
              || originalEntryPoint == DefaultDeferredParsingThunk
              || (
                     functionBody->GetSimpleJitEntryPointInfo() &&
                     originalEntryPoint ==
-                        reinterpret_cast<Js::JavascriptMethod>(functionBody->GetSimpleJitEntryPointInfo()->GetNativeAddress())
+                        reinterpret_cast<Js::JavascriptMethod>(functionBody->GetSimpleJitEntryPointInfo()->GetNativeEntrypoint())
                 )
             ) ||
             functionBody->GetDefaultFunctionEntryPointInfo()->entryPointIndex > function->GetFunctionEntryPointInfo()->entryPointIndex);
@@ -1662,7 +1673,7 @@
         scriptContext->GetNativeCodeGenerator()->SetNativeEntryPoint(
             entryPointInfo,
             functionBody,
-            reinterpret_cast<Js::JavascriptMethod>(entryPointInfo->GetNativeAddress()));
+            entryPointInfo->GetNativeEntrypoint());
         jsMethod = entryPointInfo->jsMethod;
 
         Assert(!functionBody->NeedEnsureDynamicProfileInfo() || jsMethod == Js::DynamicProfileInfo::EnsureDynamicProfileInfoThunk);
@@ -1981,7 +1992,6 @@
         {
             Js::FunctionEntryPointInfo* entryPointInfo = static_cast<Js::FunctionEntryPointInfo*>(functionCodeGen->GetEntryPoint());
             entryPointInfo->SetJitMode(jitMode);
-            Assert(workItem->GetCodeAddress() != NULL);
             entryPointInfo->SetCodeGenDone();
         }
         else
@@ -2026,10 +2036,10 @@
 
         if (succeeded)
         {
-            Assert(workItem->GetCodeAddress() != NULL);
+            Assert(loopBodyCodeGen->GetCodeAddress() != NULL);
 
             uint loopNum = loopBodyCodeGen->GetJITData()->loopNumber;
-            functionBody->SetLoopBodyEntryPoint(loopBodyCodeGen->loopHeader, entryPoint, (Js::JavascriptMethod)workItem->GetCodeAddress(), loopNum);
+            functionBody->SetLoopBodyEntryPoint(loopBodyCodeGen->loopHeader, entryPoint, (Js::JavascriptMethod)loopBodyCodeGen->GetCodeAddress(), loopNum);
             entryPoint->SetCodeGenDone();
         }
         else
@@ -2048,7 +2058,6 @@
     else
     {
         AssertMsg(false, "Unknown work item type");
-        AssertMsg(workItem->GetCodeAddress() == NULL, "No other types should have native entry point for now.");
     }
 }
 
@@ -2969,7 +2978,7 @@
 
     const auto recycler = scriptContext->GetRecycler();
     {
-        const auto jitTimeData = RecyclerNew(recycler, Js::FunctionCodeGenJitTimeData, functionBody->GetFunctionInfo(), entryPoint);
+        const auto jitTimeData = Js::FunctionCodeGenJitTimeData::New(recycler, functionBody->GetFunctionInfo(), entryPoint);
         InliningDecider inliningDecider(functionBody, workItem->Type() == JsLoopBodyWorkItemType, functionBody->IsInDebugMode(), workItem->GetJitMode());
 
         BEGIN_TEMP_ALLOCATOR(gatherCodeGenDataAllocator, scriptContext, _u("GatherCodeGenData"));
@@ -3132,14 +3141,14 @@
 }
 
 void
-FreeNativeCodeGenAllocation(Js::ScriptContext *scriptContext, Js::JavascriptMethod address)
+FreeNativeCodeGenAllocation(Js::ScriptContext *scriptContext, Js::JavascriptMethod codeAddress, Js::JavascriptMethod thunkAddress)
 {
     if (!scriptContext->GetNativeCodeGenerator())
     {
         return;
     }
 
-    scriptContext->GetNativeCodeGenerator()->QueueFreeNativeCodeGenAllocation((void*)address);
+    scriptContext->GetNativeCodeGenerator()->QueueFreeNativeCodeGenAllocation((void*)codeAddress, (void*)thunkAddress);
 }
 
 bool TryReleaseNonHiPriWorkItem(Js::ScriptContext* scriptContext, CodeGenWorkItem* workItem)
@@ -3170,22 +3179,29 @@
 }
 
 void
-NativeCodeGenerator::FreeNativeCodeGenAllocation(void* address)
+NativeCodeGenerator::FreeNativeCodeGenAllocation(void* codeAddress, void* thunkAddress)
 {
     if (JITManager::GetJITManager()->IsOOPJITEnabled())
     {
         ThreadContext * context = this->scriptContext->GetThreadContext();
-        HRESULT hr = JITManager::GetJITManager()->FreeAllocation(context->GetRemoteThreadContextAddr(), (intptr_t)address);
+        HRESULT hr = JITManager::GetJITManager()->FreeAllocation(context->GetRemoteThreadContextAddr(), (intptr_t)codeAddress, (intptr_t)thunkAddress);
         JITManager::HandleServerCallResult(hr, RemoteCallType::MemFree);
     }
     else if(this->backgroundAllocators)
     {
-        this->backgroundAllocators->emitBufferManager.FreeAllocation(address);
+        this->backgroundAllocators->emitBufferManager.FreeAllocation(codeAddress);
+        
+#if defined(_CONTROL_FLOW_GUARD) && (_M_IX86 || _M_X64)
+        if (thunkAddress)
+        {
+            this->scriptContext->GetThreadContext()->GetJITThunkEmitter()->FreeThunk((uintptr_t)thunkAddress);
+        }
+#endif
     }
 }
 
 void
-NativeCodeGenerator::QueueFreeNativeCodeGenAllocation(void* address)
+NativeCodeGenerator::QueueFreeNativeCodeGenAllocation(void* codeAddress, void * thunkAddress)
 {
     ASSERT_THREAD();
 
@@ -3197,35 +3213,48 @@
     if (!JITManager::GetJITManager()->IsOOPJITEnabled() || !CONFIG_FLAG(OOPCFGRegistration))
     {
         //DeRegister Entry Point for CFG
-        ThreadContext::GetContextForCurrentThread()->SetValidCallTargetForCFG(address, false);
+        if (thunkAddress)
+        {
+            ThreadContext::GetContextForCurrentThread()->SetValidCallTargetForCFG(thunkAddress, false);
+        }
+        else
+        {
+            ThreadContext::GetContextForCurrentThread()->SetValidCallTargetForCFG(codeAddress, false);
+        }
     }
 
-    if ((!JITManager::GetJITManager()->IsOOPJITEnabled() && !this->scriptContext->GetThreadContext()->GetPreReservedVirtualAllocator()->IsInRange((void*)address)) ||
-        (JITManager::GetJITManager()->IsOOPJITEnabled() && !PreReservedVirtualAllocWrapper::IsInRange((void*)this->scriptContext->GetThreadContext()->GetPreReservedRegionAddr(), (void*)address)))
+    if ((!JITManager::GetJITManager()->IsOOPJITEnabled() && !this->scriptContext->GetThreadContext()->GetPreReservedVirtualAllocator()->IsInRange((void*)codeAddress)) ||
+        (JITManager::GetJITManager()->IsOOPJITEnabled() && !PreReservedVirtualAllocWrapper::IsInRange((void*)this->scriptContext->GetThreadContext()->GetPreReservedRegionAddr(), (void*)codeAddress)))
     {
-        this->scriptContext->GetJitFuncRangeCache()->RemoveFuncRange((void*)address);
+        this->scriptContext->GetJitFuncRangeCache()->RemoveFuncRange((void*)codeAddress);
     }
     // OOP JIT will always queue a job
 
     // The foreground allocators may have been used
-    if(this->foregroundAllocators && this->foregroundAllocators->emitBufferManager.FreeAllocation(address))
+    if(this->foregroundAllocators && this->foregroundAllocators->emitBufferManager.FreeAllocation(codeAddress))
     {
+#if defined(_CONTROL_FLOW_GUARD) && (_M_IX86 || _M_X64)
+        if (thunkAddress)
+        {
+            this->scriptContext->GetThreadContext()->GetJITThunkEmitter()->FreeThunk((uintptr_t)thunkAddress);
+        }
+#endif
         return;
     }
 
     // The background allocators were used. Queue a job to free the allocation from the background thread.
-    this->freeLoopBodyManager.QueueFreeLoopBodyJob(address);
+    this->freeLoopBodyManager.QueueFreeLoopBodyJob(codeAddress, thunkAddress);
 }
 
-void NativeCodeGenerator::FreeLoopBodyJobManager::QueueFreeLoopBodyJob(void* codeAddress)
+void NativeCodeGenerator::FreeLoopBodyJobManager::QueueFreeLoopBodyJob(void* codeAddress, void * thunkAddress)
 {
     Assert(!this->isClosed);
 
-    FreeLoopBodyJob* job = HeapNewNoThrow(FreeLoopBodyJob, this, codeAddress);
+    FreeLoopBodyJob* job = HeapNewNoThrow(FreeLoopBodyJob, this, codeAddress, thunkAddress);
 
     if (job == nullptr)
     {
-        FreeLoopBodyJob stackJob(this, codeAddress, false /* heapAllocated */);
+        FreeLoopBodyJob stackJob(this, codeAddress, thunkAddress, false /* heapAllocated */);
 
         {
             AutoOptionalCriticalSection lock(Processor()->GetCriticalSection());
@@ -3645,14 +3674,14 @@
 }
 
 #if _WIN32
-void
+bool
 JITManager::HandleServerCallResult(HRESULT hr, RemoteCallType callType)
 {
     // handle the normal hresults
     switch (hr)
     {
     case S_OK:
-        return;
+        return true;
     case E_ABORT:
         throw Js::OperationAbortedException();
     case E_OUTOFMEMORY:
@@ -3670,37 +3699,33 @@
     default:
         break;
     }
-    // if jit process is terminated, we can handle certain abnormal hresults
-
-    // we should not have RPC failure if JIT process is still around
-    // since this is going to be a failfast, lets wait a bit in case server is in process of terminating
-    if (WaitForSingleObject(GetJITManager()->GetServerHandle(), CONFIG_FLAG(RPCFailFastWait)) != WAIT_OBJECT_0)
-    {
-        RpcFailure_fatal_error(hr);
-    }
 
     // we only expect to see these hresults in case server has been closed. failfast otherwise
     if (hr != HRESULT_FROM_WIN32(RPC_S_CALL_FAILED) &&
-        hr != HRESULT_FROM_WIN32(RPC_S_CALL_FAILED_DNE) &&
-        hr != HRESULT_FROM_WIN32(RPC_X_SS_IN_NULL_CONTEXT))
+        hr != HRESULT_FROM_WIN32(RPC_S_CALL_FAILED_DNE))
     {
         RpcFailure_fatal_error(hr);
     }
+
+    // if JIT process is gone, record that and stop trying to call it
+    GetJITManager()->SetJITFailed(hr);
+
     switch (callType)
     {
     case RemoteCallType::CodeGen:
         // inform job manager that JIT work item has been cancelled
         throw Js::OperationAbortedException();
     case RemoteCallType::HeapQuery:
-    case RemoteCallType::ThunkCreation:
         Js::Throw::OutOfMemory();
+    case RemoteCallType::ThunkCreation:
     case RemoteCallType::StateUpdate:
     case RemoteCallType::MemFree:
         // if server process is gone, we can ignore failures updating its state
-        return;
+        return false;
     default:
         Assert(UNREACHED);
         RpcFailure_fatal_error(hr);
     }
+    return false;
 }
 #endif
diff --git a/lib/Backend/NativeCodeGenerator.h b/lib/Backend/NativeCodeGenerator.h
index fffef46..dc87262 100644
--- a/lib/Backend/NativeCodeGenerator.h
+++ b/lib/Backend/NativeCodeGenerator.h
@@ -101,10 +101,10 @@
     void UpdateQueueForDebugMode();
     bool IsBackgroundJIT() const;
     void EnterScriptStart();
-    void FreeNativeCodeGenAllocation(void* address);
+    void FreeNativeCodeGenAllocation(void* codeAddress, void* thunkAddress);
     bool TryReleaseNonHiPriWorkItem(CodeGenWorkItem* workItem);
 
-    void QueueFreeNativeCodeGenAllocation(void* address);
+    void QueueFreeNativeCodeGenAllocation(void* codeAddress, void* thunkAddress);
 
     bool IsClosed() { return isClosed; }
     void AddWorkItem(CodeGenWorkItem* workItem);
@@ -197,15 +197,17 @@
     class FreeLoopBodyJob: public JsUtil::Job
     {
     public:
-        FreeLoopBodyJob(JsUtil::JobManager *const manager, void* address, bool isHeapAllocated = true):
+        FreeLoopBodyJob(JsUtil::JobManager *const manager, void* codeAddress, void* thunkAddress, bool isHeapAllocated = true):
           JsUtil::Job(manager),
-          codeAddress(address),
+          codeAddress(codeAddress),
+          thunkAddress(thunkAddress),
           heapAllocated(isHeapAllocated)
         {
         }
 
         bool heapAllocated;
         void* codeAddress;
+        void* thunkAddress;
     };
 
     class FreeLoopBodyJobManager sealed: public WaitableJobManager
@@ -274,7 +276,7 @@
             FreeLoopBodyJob* freeLoopBodyJob = static_cast<FreeLoopBodyJob*>(job);
 
             // Free Loop Body
-            nativeCodeGen->FreeNativeCodeGenAllocation(freeLoopBodyJob->codeAddress);
+            nativeCodeGen->FreeNativeCodeGenAllocation(freeLoopBodyJob->codeAddress, freeLoopBodyJob->thunkAddress);
 
             return true;
         }
@@ -297,7 +299,7 @@
             }
         }
 
-        void QueueFreeLoopBodyJob(void* codeAddress);
+        void QueueFreeLoopBodyJob(void* codeAddress, void* thunkAddress);
 
     private:
         NativeCodeGenerator* nativeCodeGen;
diff --git a/lib/Backend/Opnd.cpp b/lib/Backend/Opnd.cpp
index 0021a14..56201eb 100644
--- a/lib/Backend/Opnd.cpp
+++ b/lib/Backend/Opnd.cpp
@@ -3686,6 +3686,10 @@
             DumpAddress(address, printToConsole, skipMaskedAddress);
             WriteToBuffer(&buffer, &n, _u(" (&NativeCodeData)"));
             break;
+        case AddrOpndKindWriteBarrierCardTable:
+            DumpAddress(address, printToConsole, skipMaskedAddress);
+            WriteToBuffer(&buffer, &n, _u(" (&WriteBarrierCardTable)"));
+            break;
         default:
             DumpAddress(address, printToConsole, skipMaskedAddress);
             if ((intptr_t)address == func->GetThreadContextInfo()->GetNullFrameDisplayAddr())
diff --git a/lib/Backend/PreLowerPeeps.cpp b/lib/Backend/PreLowerPeeps.cpp
index dcea07e..0100c11 100644
--- a/lib/Backend/PreLowerPeeps.cpp
+++ b/lib/Backend/PreLowerPeeps.cpp
@@ -181,6 +181,12 @@
 
     IR::Opnd * src2 = instrAdd->GetSrc2();
     IR::Opnd * src1 = instrAdd->GetSrc1();
+
+    // we can't remove t1 in case both srcs are uses of t1
+    if (src1->IsEqual(src2))
+    {
+        return instrAdd;
+    }
     IR::Instr * resultInstr = TryShiftAdd(instrAdd, src1, src2);
     if (resultInstr->m_opcode == Js::OpCode::Add_I4)
     {
diff --git a/lib/Backend/Region.cpp b/lib/Backend/Region.cpp
index ce1ebeb..6b04be6 100644
--- a/lib/Backend/Region.cpp
+++ b/lib/Backend/Region.cpp
@@ -68,10 +68,12 @@
 }
 
 // Return the first ancestor of the region's parent which is not a non exception finally
+// Skip all non exception finally regions in the region tree
+// Return the parent of the first non-non-exception finally region
 Region *
 Region::GetFirstAncestorOfNonExceptingFinallyParent()
 {
-    Region * ancestor = this->GetParent();
+    Region * ancestor = this;
     while (ancestor && ancestor->IsNonExceptingFinally())
     {
         ancestor = ancestor->GetParent();
@@ -81,9 +83,11 @@
     // If the ancestor's parent is a non exception finally, recurse
     if (ancestor && ancestor->GetType() != RegionTypeRoot && ancestor->GetParent()->IsNonExceptingFinally())
     {
-        return ancestor->GetParent()->GetFirstAncestorOfNonExceptingFinallyParent();
+        return ancestor->GetParent()->GetFirstAncestorOfNonExceptingFinally();
     }
 
+    Assert(ancestor);
+    // Null check added to avoid prefast warning only
     return ancestor ? (ancestor->GetType() == RegionTypeRoot ? ancestor : ancestor->GetParent()) : nullptr;
 }
 
diff --git a/lib/Backend/SccLiveness.cpp b/lib/Backend/SccLiveness.cpp
index 1e319de..af36c80 100644
--- a/lib/Backend/SccLiveness.cpp
+++ b/lib/Backend/SccLiveness.cpp
@@ -786,25 +786,26 @@
     }
 
     IR::RegOpnd *base = indir->GetBaseOpnd();
-    if (!base || !base->m_sym || !base->m_sym->IsConst() || base->m_sym->IsIntConst() || base->m_sym->IsFloatConst())
+    uint8 *constValue = nullptr;
+    if (base)
     {
-        return false;
-    }
-
-    uint8 *constValue = static_cast<uint8 *>(base->m_sym->GetConstAddress());
-    if(indir->GetOffset() != 0)
-    {
-        if(indir->GetOffset() < 0 ? constValue + indir->GetOffset() > constValue : constValue + indir->GetOffset() < constValue)
+        if (!base->m_sym || !base->m_sym->IsConst() || base->m_sym->IsIntConst() || base->m_sym->IsFloatConst())
         {
             return false;
         }
-        constValue += indir->GetOffset();
+        constValue = static_cast<uint8 *>(base->m_sym->GetConstAddress());
+        if (indir->GetOffset() < 0 ? constValue + indir->GetOffset() > constValue : constValue + indir->GetOffset() < constValue)
+        {
+            return false;
+        }
     }
+    constValue += indir->GetOffset();
 
 #ifdef _M_X64
     // Encoding only allows 32bits worth
     if(!Math::FitsInDWord((size_t)constValue))
     {
+        Assert(base != nullptr);
         return false;
     }
 #endif
diff --git a/lib/Backend/ServerThreadContext.cpp b/lib/Backend/ServerThreadContext.cpp
index 0824575..6558e92 100644
--- a/lib/Backend/ServerThreadContext.cpp
+++ b/lib/Backend/ServerThreadContext.cpp
@@ -18,6 +18,9 @@
     m_thunkPageAllocators(nullptr, /* allocXData */ false, &m_sectionAllocator, nullptr, (HANDLE)data->processHandle),
     m_codePageAllocators(nullptr, ALLOC_XDATA, &m_sectionAllocator, &m_preReservedSectionAllocator, (HANDLE)data->processHandle),
     m_codeGenAlloc(nullptr, nullptr, &m_codePageAllocators, (HANDLE)data->processHandle),
+#if defined(_CONTROL_FLOW_GUARD) && (_M_IX86 || _M_X64)
+    m_jitThunkEmitter(this, &m_sectionAllocator, (HANDLE)data->processHandle),
+#endif
     m_pageAlloc(nullptr, Js::Configuration::Global.flags, PageAllocatorType_BGJIT,
         AutoSystemInfo::Data.IsLowMemoryProcess() ?
         PageAllocator::DefaultLowMaxFreePageCount :
@@ -136,6 +139,14 @@
     return &m_codeGenAlloc;
 }
 
+#if defined(_CONTROL_FLOW_GUARD) && (_M_IX86 || _M_X64)
+OOPJITThunkEmitter *
+ServerThreadContext::GetJITThunkEmitter()
+{
+    return &m_jitThunkEmitter;
+}
+#endif
+
 intptr_t
 ServerThreadContext::GetRuntimeChakraBaseAddress() const
 {
diff --git a/lib/Backend/ServerThreadContext.h b/lib/Backend/ServerThreadContext.h
index ba2ff92..636174d 100644
--- a/lib/Backend/ServerThreadContext.h
+++ b/lib/Backend/ServerThreadContext.h
@@ -38,6 +38,9 @@
     ptrdiff_t GetCRTBaseAddressDifference() const;
 
     OOPCodeGenAllocators * GetCodeGenAllocators();
+#if defined(_CONTROL_FLOW_GUARD) && (_M_IX86 || _M_X64)
+    OOPJITThunkEmitter * GetJITThunkEmitter();
+#endif
     CustomHeap::OOPCodePageAllocators * GetThunkPageAllocators();
     CustomHeap::OOPCodePageAllocators  * GetCodePageAllocators();
     SectionAllocWrapper * GetSectionAllocator();
@@ -74,6 +77,9 @@
     SectionAllocWrapper m_sectionAllocator;
     CustomHeap::OOPCodePageAllocators m_thunkPageAllocators;
     CustomHeap::OOPCodePageAllocators  m_codePageAllocators;
+#if defined(_CONTROL_FLOW_GUARD) && (_M_IX86 || _M_X64)
+    OOPJITThunkEmitter m_jitThunkEmitter;
+#endif
     OOPCodeGenAllocators m_codeGenAlloc;
     // only allocate with this from foreground calls (never from CodeGen calls)
     PageAllocator m_pageAlloc;
diff --git a/lib/Backend/amd64/EncoderMD.cpp b/lib/Backend/amd64/EncoderMD.cpp
index b7c6032..f5acfe5 100644
--- a/lib/Backend/amd64/EncoderMD.cpp
+++ b/lib/Backend/amd64/EncoderMD.cpp
@@ -685,12 +685,6 @@
 
     instrRestart = instrStart = m_pc;
 
-#if _CONTROL_FLOW_GUARD_SHADOW_STACK
-    if (instr->isFsBased)
-    {
-        *instrRestart++ = 0x64;
-    }
-#endif
 
     // put out 16bit override if any
     if (instrSize == 2 && (opdope & (DNO16 | DFLT)) == 0)
@@ -1891,7 +1885,7 @@
         {
             IR::Instr *instrNext = instr->GetNextRealInstrOrLabel();
 
-            if (instrNext->IsBranchInstr() && instrNext->AsBranchInstr()->IsConditional())
+            if (instrNext->IsBranchInstr() && instrNext->AsBranchInstr()->IsConditional() && !instrNext->AsBranchInstr()->m_areCmpRegisterFlagsUsedLater)
             {
                 // Swap src and reverse branch
                 src2 = instr->UnlinkSrc1();
diff --git a/lib/Backend/amd64/LowererMDArch.cpp b/lib/Backend/amd64/LowererMDArch.cpp
index 2226426..3343991 100644
--- a/lib/Backend/amd64/LowererMDArch.cpp
+++ b/lib/Backend/amd64/LowererMDArch.cpp
@@ -532,9 +532,7 @@
     }
 
     AssertMsg(startCallInstr->m_opcode == Js::OpCode::StartCall ||
-              startCallInstr->m_opcode == Js::OpCode::LoweredStartCall ||
-              startCallInstr->m_opcode == Js::OpCode::StartCallAsmJsE ||
-              startCallInstr->m_opcode == Js::OpCode::StartCallAsmJsI,
+              startCallInstr->m_opcode == Js::OpCode::LoweredStartCall,
               "Problem with arg chain.");
     AssertMsg(startCallInstr->GetArgOutCount(/*getInterpreterArgOutCount*/ false) == argCount ||
               m_func->GetJITFunctionBody()->IsAsmJsMode(),
@@ -1468,14 +1466,6 @@
 IR::Instr *
 LowererMDArch::LowerEntryInstr(IR::EntryInstr * entryInstr)
 {
-#if _CONTROL_FLOW_GUARD_SHADOW_STACK
-    /* 
-     * If RFG is enabled for the process, then this precedes the prologue:
-     *
-     * mov    rax,                       [rsp]
-     * mov    fs:[rsp],                  rax
-     */
-#endif
     /*
      * push   rbp
      * mov    rbp,                       rsp
@@ -1690,31 +1680,6 @@
     m_func->m_prologEncoder.RecordNonVolRegSave();
     firstPrologInstr = pushInstr;
 
-#if _CONTROL_FLOW_GUARD_SHADOW_STACK
-    if (_guard_rf_checks_enforced()) {
-        // Generate MOV FS:[RSP], RAX
-        raxOpnd = IR::RegOpnd::New(nullptr, RegRAX, TyMachReg, this->m_func);
-        IR::Instr * storeRetInstr = IR::Instr::New(Js::OpCode::MOV,
-                                                  IR::IndirOpnd::New(stackPointer,
-                                                                     0,
-                                                                     TyInt64,
-                                                                     this->m_func),
-                                                  raxOpnd,
-                                                  this->m_func);
-        storeRetInstr->isFsBased = true;
-        entryInstr->InsertAfter(storeRetInstr);
-
-        // Generate MOV RAX, [RSP]
-        IR::Instr * getRetInstr = IR::Instr::New(Js::OpCode::MOV,
-                                                  raxOpnd,
-                                                  IR::IndirOpnd::New(stackPointer,
-                                                                     0,
-                                                                     TyInt64,
-                                                                     this->m_func),
-                                                  this->m_func);
-        entryInstr->InsertAfter(getRetInstr);
-    }
-#endif
 
     //
     // Insert pragmas that tell the prolog encoder the extent of the prolog.
@@ -2108,35 +2073,6 @@
         retReg = IR::RegOpnd::New(nullptr, this->GetRegReturn(TyMachReg), TyMachReg, this->m_func);
     }
 
-#if _CONTROL_FLOW_GUARD_SHADOW_STACK
-    IR::LabelInstr * failLabel = nullptr;
-    if (_guard_rf_checks_enforced()) {
-        // Generate MOV RCX, FS:[RSP]
-        IR::Opnd * rcxOpnd = IR::RegOpnd::New(nullptr, RegRCX, TyMachReg, this->m_func);
-        IR::Instr * getRetInstr = IR::Instr::New(Js::OpCode::MOV,
-                                                rcxOpnd,
-                                                IR::IndirOpnd::New(stackPointer,
-                                                                    0,
-                                                                    TyInt64,
-                                                                    this->m_func),
-                                                this->m_func);
-        getRetInstr->isFsBased = true;
-        exitInstr->InsertBefore(getRetInstr);
-
-        // Generate CMP RCX, [RSP]
-        IR::Instr * cmpRetInstr = IR::Instr::New(Js::OpCode::CMP, m_func);
-        cmpRetInstr->SetSrc1(IR::IndirOpnd::New(stackPointer,
-                                                0,
-                                                TyInt64,
-                                                this->m_func));
-        cmpRetInstr->SetSrc2(rcxOpnd);
-        exitInstr->InsertBefore(cmpRetInstr);
-
-        // Generate JNE $fail
-        failLabel = IR::LabelInstr::New(Js::OpCode::Label, m_func, true);
-        exitInstr->InsertBefore(IR::BranchInstr::New(Js::OpCode::JNE, failLabel, m_func));
-    }
-#endif
 
     // Generate RET
     IR::Instr * retInstr = IR::Instr::New(Js::OpCode::RET, this->m_func);
@@ -2146,20 +2082,6 @@
 
     retInstr->m_opcode = Js::OpCode::RET;
 
-#if _CONTROL_FLOW_GUARD_SHADOW_STACK
-    if (_guard_rf_checks_enforced() && failLabel != nullptr) {
-        // insert $fail
-        exitInstr->InsertBefore(failLabel);
-
-        // MOV RCX, __guard_ss_verify_failure
-        IR::RegOpnd * target = IR::RegOpnd::New(nullptr, RegRCX, TyMachReg, m_func);
-        this->lowererMD->CreateAssign(target, IR::HelperCallOpnd::New(IR::HelperReturnFlowGuardFailureRoutine, m_func), exitInstr);
-
-        // JMP RCX
-        IR::Instr * branch = IR::MultiBranchInstr::New(Js::OpCode::JMP, target, m_func);
-        exitInstr->InsertBefore(branch);
-    }
-#endif
 
     return exitInstr;
 }
@@ -2186,32 +2108,6 @@
 }
 
 void
-LowererMDArch::EmitPtrInstr(IR::Instr *instr)
-{
-    bool legalize = false;
-    switch (instr->m_opcode)
-    {
-    case Js::OpCode::Add_Ptr:
-        LowererMD::ChangeToAdd(instr, false /* needFlags */);
-        legalize = true;
-        break;
-
-    default:
-        AssertMsg(UNREACHED, "Un-implemented ptr opcode");
-    }
-    // OpEq's
-
-    if (legalize)
-    {
-        LowererMD::Legalize(instr);
-    }
-    else
-    {
-        LowererMD::MakeDstEquSrc1(instr);
-    }
-}
-
-void
 LowererMDArch::EmitInt4Instr(IR::Instr *instr, bool signExtend /* = false */)
 {
     IR::Opnd *dst       = instr->GetDst();
@@ -2267,9 +2163,11 @@
         legalize = true;
         break;
 
+    case Js::OpCode::DivU_I4:
     case Js::OpCode::Div_I4:
         instr->SinkDst(Js::OpCode::MOV, RegRAX);
         goto idiv_common;
+    case Js::OpCode::RemU_I4:
     case Js::OpCode::Rem_I4:
         instr->SinkDst(Js::OpCode::MOV, RegRDX);
 idiv_common:
@@ -2278,6 +2176,7 @@
             if (isUnsigned)
             {
                 Assert(instr->GetSrc2()->IsUnsigned());
+                Assert(instr->m_opcode == Js::OpCode::RemU_I4 || instr->m_opcode == Js::OpCode::DivU_I4);
                 instr->m_opcode = Js::OpCode::DIV;
             }
             else
diff --git a/lib/Backend/amd64/LowererMDArch.h b/lib/Backend/amd64/LowererMDArch.h
index 26828ae..faccdb8 100644
--- a/lib/Backend/amd64/LowererMDArch.h
+++ b/lib/Backend/amd64/LowererMDArch.h
@@ -112,7 +112,6 @@
     IR::Instr *         LowerExitInstrAsmJs(IR::ExitInstr * exitInstr);
     IR::Instr *         LowerInt64Assign(IR::Instr * instr);
     static void         EmitInt4Instr(IR::Instr *instr, bool signExtend = false);
-    static void         EmitPtrInstr(IR::Instr *instr);
     void                EmitLoadVar(IR::Instr *instrLoad, bool isFromUint32 = false, bool isHelper = false);
     void                EmitIntToFloat(IR::Opnd *dst, IR::Opnd *src, IR::Instr *instrInsert);
     void                EmitUIntToFloat(IR::Opnd *dst, IR::Opnd *src, IR::Instr *instrInsert);
diff --git a/lib/Backend/arm/LowerMD.cpp b/lib/Backend/arm/LowerMD.cpp
index 1f8e90c..408b769 100644
--- a/lib/Backend/arm/LowerMD.cpp
+++ b/lib/Backend/arm/LowerMD.cpp
@@ -6416,22 +6416,6 @@
 }
 
 void
-LowererMD::EmitPtrInstr(IR::Instr *instr)
-{
-    switch (instr->m_opcode)
-    {
-    case Js::OpCode::Add_Ptr:
-        LowererMD::ChangeToAdd(instr, false /* needFlags */);
-        break;
-
-    default:
-        AssertMsg(UNREACHED, "Un-implemented ptr opcode");
-    }
-
-    LegalizeMD::LegalizeInstr(instr, false);
-}
-
-void
 LowererMD::EmitInt4Instr(IR::Instr *instr)
 {
     IR::Instr * newInstr;
@@ -6461,10 +6445,14 @@
         instr->m_opcode = Js::OpCode::MUL;
         break;
 
+    case Js::OpCode::DivU_I4:
+        AssertMsg(UNREACHED, "Unsigned div NYI");
     case Js::OpCode::Div_I4:
         instr->m_opcode = Js::OpCode::SDIV;
         break;
 
+    case Js::OpCode::RemU_I4:
+        AssertMsg(UNREACHED, "Unsigned rem NYI");
     case Js::OpCode::Rem_I4:
         instr->m_opcode = Js::OpCode::REM;
         break;
diff --git a/lib/Backend/arm/LowerMD.h b/lib/Backend/arm/LowerMD.h
index 81d7c95..a285297 100644
--- a/lib/Backend/arm/LowerMD.h
+++ b/lib/Backend/arm/LowerMD.h
@@ -141,7 +141,6 @@
             void            GenerateFloatTest(IR::RegOpnd * opndSrc, IR::Instr * insertInstr, IR::LabelInstr* labelHelper, const bool checkForNullInLoopBody = false);
 
      static void            EmitInt4Instr(IR::Instr *instr);
-     static void            EmitPtrInstr(IR::Instr *instr);
             void            EmitLoadVar(IR::Instr *instr, bool isFromUint32 = false, bool isHelper = false);
             bool            EmitLoadInt32(IR::Instr *instr, bool conversionFromObjectAllowed, bool bailOutOnHelper = false, IR::LabelInstr * labelBailOut = nullptr);
             IR::Instr *     LowerInt64Assign(IR::Instr * instr) { Assert(UNREACHED); return nullptr; }
diff --git a/lib/Backend/arm64/LowerMD.h b/lib/Backend/arm64/LowerMD.h
index eca53e0..113b8fb 100644
--- a/lib/Backend/arm64/LowerMD.h
+++ b/lib/Backend/arm64/LowerMD.h
@@ -137,7 +137,6 @@
               void            GenerateFunctionObjectTest(IR::Instr * callInstr, IR::RegOpnd  *functionObjOpnd, bool isHelper, IR::LabelInstr* afterCallLabel = nullptr) { __debugbreak(); }
 
        static void            EmitInt4Instr(IR::Instr *instr) { __debugbreak(); }
-       static void            EmitPtrInstr(IR::Instr *instr) { __debugbreak(); }
               void            EmitLoadVar(IR::Instr *instr, bool isFromUint32 = false, bool isHelper = false) { __debugbreak(); }
               bool            EmitLoadInt32(IR::Instr *instr, bool conversionFromObjectAllowed, bool bailOutOnHelper = false, IR::LabelInstr * labelBailOut = nullptr) { __debugbreak(); return 0; }
               IR::Instr *     LowerInt64Assign(IR::Instr * instr) { __debugbreak(); return nullptr; }
diff --git a/lib/Backend/i386/EncoderMD.cpp b/lib/Backend/i386/EncoderMD.cpp
index 2672e53..15ba523 100644
--- a/lib/Backend/i386/EncoderMD.cpp
+++ b/lib/Backend/i386/EncoderMD.cpp
@@ -1700,7 +1700,7 @@
         {
             IR::Instr *instrNext = instr->GetNextRealInstrOrLabel();
 
-            if (instrNext->IsBranchInstr() && instrNext->AsBranchInstr()->IsConditional())
+            if (instrNext->IsBranchInstr() && instrNext->AsBranchInstr()->IsConditional() && !instrNext->AsBranchInstr()->m_areCmpRegisterFlagsUsedLater)
             {
                 // Swap src and reverse branch
                 src2 = instr->UnlinkSrc1();
diff --git a/lib/Backend/i386/LowererMDArch.cpp b/lib/Backend/i386/LowererMDArch.cpp
index 948947c..6a5d347 100644
--- a/lib/Backend/i386/LowererMDArch.cpp
+++ b/lib/Backend/i386/LowererMDArch.cpp
@@ -1981,7 +1981,6 @@
         return callInstr;
     };
 
-    IR::JnHelperMethod helperSigned = IR::HelperInvalid, helperUnsigned = IR::HelperInvalid;
     Js::OpCode cmOpCode, lowOpCode, highOpCode;
     switch (instr->m_opcode)
     {
@@ -2021,54 +2020,48 @@
         break;
     }
     case Js::OpCode::ShrU_I4:
-        helperSigned = IR::HelperDirectMath_Int64ShrU;
-        goto helperCommon;
+        instr = LowerToHelper(IR::HelperDirectMath_Int64ShrU);
+        break;
+
     case Js::OpCode::Shr_I4:
-        helperSigned = IR::HelperDirectMath_Int64Shr;
-        goto helperCommon;
+        instr = LowerToHelper(IR::HelperDirectMath_Int64Shr);
+        break;
     case Js::OpCode::Shl_I4:
-        helperSigned = IR::HelperDirectMath_Int64Shl;
-        goto helperCommon;
+        instr = LowerToHelper(IR::HelperDirectMath_Int64Shl);
+        break;
     case Js::OpCode::Rol_I4:
-        helperSigned = IR::HelperDirectMath_Int64Rol;
-        goto helperCommon;
+        instr = LowerToHelper(IR::HelperDirectMath_Int64Rol);
+        break;
     case Js::OpCode::Ror_I4:
-        helperSigned = IR::HelperDirectMath_Int64Ror;
-        goto helperCommon;
+        instr = LowerToHelper(IR::HelperDirectMath_Int64Ror);
+        break;
     case Js::OpCode::InlineMathClz:
-        helperSigned = IR::HelperDirectMath_Int64Clz;
-        goto helperCommon;
+        instr = LowerToHelper(IR::HelperDirectMath_Int64Clz);
+        break;
     case Js::OpCode::Ctz:
-        helperSigned = IR::HelperDirectMath_Int64Ctz;
-        goto helperCommon;
+        instr = LowerToHelper(IR::HelperDirectMath_Int64Ctz);
+        break;
     case Js::OpCode::PopCnt:
-        helperSigned = IR::HelperPopCnt64;
-        goto helperCommon;
+        instr = LowerToHelper(IR::HelperPopCnt64);
+        break;
     case Js::OpCode::Mul_I4:
-        helperSigned = IR::HelperDirectMath_Int64Mul;
-        goto helperCommon;
+        instr = LowerToHelper(IR::HelperDirectMath_Int64Mul);
+        break;
+    case Js::OpCode::DivU_I4:
+        this->lowererMD->m_lowerer->LoadScriptContext(instr);
+        instr = LowerToHelper(IR::HelperDirectMath_Int64DivU);
+        break;
     case Js::OpCode::Div_I4:
-        helperUnsigned = IR::HelperDirectMath_Int64DivU;
-        helperSigned = IR::HelperDirectMath_Int64DivS;
         this->lowererMD->m_lowerer->LoadScriptContext(instr);
-        goto helperCommon;
+        instr = LowerToHelper(IR::HelperDirectMath_Int64DivS);
+        break;
+    case Js::OpCode::RemU_I4:
+        this->lowererMD->m_lowerer->LoadScriptContext(instr);
+        instr = LowerToHelper(IR::HelperDirectMath_Int64RemU);
+        break;
     case Js::OpCode::Rem_I4:
-        helperUnsigned = IR::HelperDirectMath_Int64RemU;
-        helperSigned = IR::HelperDirectMath_Int64RemS;
         this->lowererMD->m_lowerer->LoadScriptContext(instr);
-helperCommon:
-        Assert(dst && src1);
-        if (IRType_IsUnsignedInt(src1->GetType()) && helperUnsigned != IR::HelperInvalid)
-        {
-            Assert(!src2 || IRType_IsUnsignedInt(src2->GetType()));
-            instr = LowerToHelper(helperUnsigned);
-        }
-        else
-        {
-            Assert(helperSigned != IR::HelperInvalid);
-            Assert(IRType_IsSignedInt(src1->GetType()) && (!src2 || IRType_IsSignedInt(src2->GetType())));
-            instr = LowerToHelper(helperSigned);
-        }
+        instr = LowerToHelper(IR::HelperDirectMath_Int64RemS);
         break;
     case Js::OpCode::BrTrue_I4:
         cmOpCode = Js::OpCode::CmEq_I4;
@@ -2153,32 +2146,6 @@
 }
 
 void
-LowererMDArch::EmitPtrInstr(IR::Instr *instr)
-{
-    bool legalize = false;
-    switch (instr->m_opcode)
-    {
-    case Js::OpCode::Add_Ptr:
-        LowererMD::ChangeToAdd(instr, false /* needFlags */);
-        legalize = true;
-        break;
-
-    default:
-        AssertMsg(UNREACHED, "Un-implemented ptr opcode");
-    }
-    // OpEq's
-
-    if (legalize)
-    {
-        LowererMD::Legalize(instr);
-    }
-    else
-    {
-        LowererMD::MakeDstEquSrc1(instr);
-    }
-}
-
-void
 LowererMDArch::EmitInt4Instr(IR::Instr *instr)
 {
     IR::Instr *newInstr;
@@ -2210,15 +2177,18 @@
         instr->m_opcode = Js::OpCode::IMUL2;
         break;
 
+    case Js::OpCode::DivU_I4:
     case Js::OpCode::Div_I4:
         instr->SinkDst(Js::OpCode::MOV, RegEAX);
         goto idiv_common;
+    case Js::OpCode::RemU_I4:
     case Js::OpCode::Rem_I4:
         instr->SinkDst(Js::OpCode::MOV, RegEDX);
 idiv_common:
-        if (instr->GetSrc1()->GetType() == TyUint32)
+        if (instr->GetSrc1()->IsUInt32())
         {
-            Assert(instr->GetSrc2()->GetType() == TyUint32);
+            Assert(instr->GetSrc2()->IsUInt32());
+            Assert(instr->m_opcode == Js::OpCode::RemU_I4 || instr->m_opcode == Js::OpCode::DivU_I4);
             instr->m_opcode = Js::OpCode::DIV;
         }
         else
@@ -2229,7 +2199,7 @@
         regEDX = IR::RegOpnd::New(TyInt32, instr->m_func);
         regEDX->SetReg(RegEDX);
 
-        if (instr->GetSrc1()->GetType() == TyUint32)
+        if (instr->GetSrc1()->IsUInt32())
         {
             // we need to ensure that register allocator doesn't muck about with edx
             instr->HoistSrc2(Js::OpCode::MOV, RegECX);
diff --git a/lib/Backend/i386/LowererMDArch.h b/lib/Backend/i386/LowererMDArch.h
index 6e2a68d..33b7f3b 100644
--- a/lib/Backend/i386/LowererMDArch.h
+++ b/lib/Backend/i386/LowererMDArch.h
@@ -77,7 +77,6 @@
             void                GeneratePrologueStackProbe(IR::Instr *entryInstr, size_t frameSize);
             void                EmitInt64Instr(IR::Instr *instr);
             static void         EmitInt4Instr(IR::Instr *instr);
-            static void         EmitPtrInstr(IR::Instr *instr);
             void                EmitLoadVar(IR::Instr *instrLoad, bool isFromUint32 = false, bool isHelper = false);
             void                EmitIntToFloat(IR::Opnd *dst, IR::Opnd *src, IR::Instr *instrInsert);
             void                EmitUIntToFloat(IR::Opnd *dst, IR::Opnd *src, IR::Instr *instrInsert);
diff --git a/lib/Common/BackendApi.h b/lib/Common/BackendApi.h
index b4de367..e5ed56b 100644
--- a/lib/Common/BackendApi.h
+++ b/lib/Common/BackendApi.h
@@ -42,6 +42,7 @@
 
 #include "EmitBuffer.h"
 #include "InterpreterThunkEmitter.h"
+#include "JITThunkEmitter.h"
 #include "BackendOpCodeAttr.h"
 #include "BackendOpCodeAttrAsmJs.h"
 #include "CodeGenNumberAllocator.h"
@@ -61,7 +62,7 @@
 CriticalSection *GetNativeCodeGenCriticalSection(NativeCodeGenerator *pNativeCodeGen);
 bool TryReleaseNonHiPriWorkItem(Js::ScriptContext* scriptContext, CodeGenWorkItem* workItem);
 void NativeCodeGenEnterScriptStart(NativeCodeGenerator * nativeCodeGen);
-void FreeNativeCodeGenAllocation(Js::ScriptContext* scriptContext, Js::JavascriptMethod address);
+void FreeNativeCodeGenAllocation(Js::ScriptContext* scriptContext, Js::JavascriptMethod codeAddress, Js::JavascriptMethod thunkAddress);
 InProcCodeGenAllocators* GetForegroundAllocator(NativeCodeGenerator * nativeCodeGen, PageAllocator* pageallocator);
 void GenerateFunction(NativeCodeGenerator * nativeCodeGen, Js::FunctionBody * functionBody, Js::ScriptFunction * function = NULL);
 void GenerateLoopBody(NativeCodeGenerator * nativeCodeGen, Js::FunctionBody * functionBody, Js::LoopHeader * loopHeader, Js::EntryPointInfo* entryPointInfo, uint localCount, Js::Var localSlots[]);
diff --git a/lib/Common/ChakraCoreVersion.h b/lib/Common/ChakraCoreVersion.h
index 4aae511..b525cb0 100644
--- a/lib/Common/ChakraCoreVersion.h
+++ b/lib/Common/ChakraCoreVersion.h
@@ -15,8 +15,8 @@
 // --------------
 
 // ChakraCore version number definitions (used in ChakraCore binary metadata)
-#define CHAKRA_CORE_MAJOR_VERSION 2
-#define CHAKRA_CORE_MINOR_VERSION 0
+#define CHAKRA_CORE_MAJOR_VERSION 1
+#define CHAKRA_CORE_MINOR_VERSION 7
 #define CHAKRA_CORE_PATCH_VERSION 0
 #define CHAKRA_CORE_VERSION_RELEASE_QFE 0 // Redundant with PATCH_VERSION. Keep this value set to 0.
 
@@ -54,10 +54,10 @@
 // * Does not add anything to the file description
 
 // ChakraCore RELEASE and PRERELEASE flags
-#define CHAKRA_CORE_VERSION_RELEASE 1
-#define CHAKRA_CORE_VERSION_PRERELEASE 1
+#define CHAKRA_CORE_VERSION_RELEASE 0
+#define CHAKRA_CORE_VERSION_PRERELEASE 0
 
 // Chakra RELEASE flag
 // Mostly redundant with CHAKRA_CORE_VERSION_RELEASE,
 // but semantically refers to Chakra rather than ChakraCore.
-#define CHAKRA_VERSION_RELEASE 1
+#define CHAKRA_VERSION_RELEASE 0
diff --git a/lib/Common/Codex/Utf8Codex.cpp b/lib/Common/Codex/Utf8Codex.cpp
index f1ddc93..ea4a7fa 100644
--- a/lib/Common/Codex/Utf8Codex.cpp
+++ b/lib/Common/Codex/Utf8Codex.cpp
@@ -97,7 +97,7 @@
     }
 
     _At_(ptr, _In_reads_(end - ptr) _Post_satisfies_(ptr >= _Old_(ptr) - 1 && ptr <= end))
-    inline char16 DecodeTail(char16 c1, LPCUTF8& ptr, LPCUTF8 end, DecodeOptions& options)
+    inline char16 DecodeTail(char16 c1, LPCUTF8& ptr, LPCUTF8 end, DecodeOptions& options, bool *chunkEndsAtTruncatedSequence)
     {
         char16 ch = 0;
         BYTE c2, c3, c4;
@@ -129,8 +129,15 @@
             if (ptr >= end)
             {
                 if ((options & doChunkedEncoding) != 0)
+                {
                     // The is a sequence that spans a chunk, push ptr back to the beginning of the sequence.
                     ptr--;
+
+                    if (chunkEndsAtTruncatedSequence)
+                    {
+                        *chunkEndsAtTruncatedSequence = true;
+                    }
+                }
                 return g_chUnknown;
             }
             c2 = *ptr++;
@@ -160,8 +167,16 @@
             if (ptr + 1 >= end)
             {
                 if ((options & doChunkedEncoding) != 0)
+                {
                     // The is a sequence that spans a chunk, push ptr back to the beginning of the sequence.
                     ptr--;
+
+                    if (chunkEndsAtTruncatedSequence)
+                    {
+                        *chunkEndsAtTruncatedSequence = true;
+                    }
+                }
+
                 return g_chUnknown;
             }
 
@@ -221,9 +236,16 @@
             if (ptr + 2 >= end)
             {
                 if ((options & doChunkedEncoding) != 0)
+                {
                     // The is a sequence that spans a chunk, push ptr back to the beginning of the sequence.
                     ptr--;
 
+                    if (chunkEndsAtTruncatedSequence)
+                    {
+                        *chunkEndsAtTruncatedSequence = true;
+                    }
+                }
+
                 ch = g_chUnknown;
                 break;
             }
@@ -378,10 +400,15 @@
     }
     
     _Use_decl_annotations_
-    size_t DecodeUnitsInto(char16 *buffer, LPCUTF8& pbUtf8, LPCUTF8 pbEnd, DecodeOptions options)
+    size_t DecodeUnitsInto(char16 *buffer, LPCUTF8& pbUtf8, LPCUTF8 pbEnd, DecodeOptions options, bool *chunkEndsAtTruncatedSequence)
     {
         DecodeOptions localOptions = options;
 
+        if (chunkEndsAtTruncatedSequence)
+        {
+            *chunkEndsAtTruncatedSequence = false;
+        }
+
         LPCUTF8 p = pbUtf8;
         char16 *dest = buffer;
 
@@ -402,7 +429,7 @@
         while (p < pbEnd)
         {
             LPCUTF8 s = p;
-            char16 chDest = Decode(p, pbEnd, localOptions);
+            char16 chDest = Decode(p, pbEnd, localOptions, chunkEndsAtTruncatedSequence);
 
             if (s < p)
             {
@@ -424,17 +451,17 @@
     }
 
     _Use_decl_annotations_
-    size_t DecodeUnitsIntoAndNullTerminate(char16 *buffer, LPCUTF8& pbUtf8, LPCUTF8 pbEnd, DecodeOptions options)
+    size_t DecodeUnitsIntoAndNullTerminate(char16 *buffer, LPCUTF8& pbUtf8, LPCUTF8 pbEnd, DecodeOptions options, bool *chunkEndsAtTruncatedSequence)
     {
-        size_t result = DecodeUnitsInto(buffer, pbUtf8, pbEnd, options);
-        buffer[(int)result] = 0;
+        size_t result = DecodeUnitsInto(buffer, pbUtf8, pbEnd, options, chunkEndsAtTruncatedSequence);
+        buffer[result] = 0;
         return result;
     }
 
     _Use_decl_annotations_
-    size_t DecodeUnitsIntoAndNullTerminateNoAdvance(char16 *buffer, LPCUTF8 pbUtf8, LPCUTF8 pbEnd, DecodeOptions options)
+    size_t DecodeUnitsIntoAndNullTerminateNoAdvance(char16 *buffer, LPCUTF8 pbUtf8, LPCUTF8 pbEnd, DecodeOptions options, bool *chunkEndsAtTruncatedSequence)
     {
-        return DecodeUnitsIntoAndNullTerminate(buffer, pbUtf8, pbEnd, options);
+        return DecodeUnitsIntoAndNullTerminate(buffer, pbUtf8, pbEnd, options, chunkEndsAtTruncatedSequence);
     }
 
     bool CharsAreEqual(LPCOLESTR pch, LPCUTF8 bch, LPCUTF8 end, DecodeOptions options)
diff --git a/lib/Common/Codex/Utf8Codex.h b/lib/Common/Codex/Utf8Codex.h
index d065f1f..0d2fc4c 100644
--- a/lib/Common/Codex/Utf8Codex.h
+++ b/lib/Common/Codex/Utf8Codex.h
@@ -143,19 +143,19 @@
 
     // Decode the trail bytes after the UTF8 lead byte c1 but returning 0xFFFD if trail bytes are expected after end.
     _At_(ptr, _In_reads_(end - ptr) _Post_satisfies_(ptr >= _Old_(ptr) - 1 && ptr <= end))
-    char16 DecodeTail(char16 c1, LPCUTF8& ptr, LPCUTF8 end, DecodeOptions& options);
+    char16 DecodeTail(char16 c1, LPCUTF8& ptr, LPCUTF8 end, DecodeOptions& options, bool *chunkEndsAtTruncatedSequence = nullptr);
 
     // Decode the UTF8 sequence into a UTF16 encoding. Code points outside the Unicode base plain will generate
     // surrogate pairs, using the 'doSecondSurrogatePair' option to remember the first word has already been returned.
     // If ptr == end 0x0000 is emitted. If ptr < end but the lead byte of the UTF8 sequence
     // expects trail bytes past end then 0xFFFD are emitted until ptr == end.
     _At_(ptr, _In_reads_(end - ptr) _Post_satisfies_(ptr >= _Old_(ptr) && ptr <= end))
-    inline char16 Decode(LPCUTF8& ptr, LPCUTF8 end, DecodeOptions& options)
+    inline char16 Decode(LPCUTF8& ptr, LPCUTF8 end, DecodeOptions& options, bool *chunkEndsAtTruncatedSequence = nullptr)
     {
         if (ptr >= end) return 0;
         utf8char_t c1 = *ptr++;
         if (c1 < 0x80) return static_cast<char16>(c1);
-        return DecodeTail(c1, ptr, end, options);
+        return DecodeTail(c1, ptr, end, options, chunkEndsAtTruncatedSequence);
     }
 
     // Encode ch into a UTF8 sequence ignoring surrogate pairs (which are encoded as two
@@ -274,12 +274,12 @@
 
     // Decode cb bytes from ptr to into buffer returning the number of characters converted and written to buffer
     _Ret_range_(0, pbEnd - _Old_(pbUtf8))
-    size_t DecodeUnitsInto(_Out_writes_(pbEnd - pbUtf8) char16 *buffer, LPCUTF8& pbUtf8, LPCUTF8 pbEnd, DecodeOptions options = doDefault);
+    size_t DecodeUnitsInto(_Out_writes_(pbEnd - pbUtf8) char16 *buffer, LPCUTF8& pbUtf8, LPCUTF8 pbEnd, DecodeOptions options = doDefault, bool *chunkEndsAtTruncatedSequence = nullptr);
 
     // Decode cb bytes from ptr to into buffer returning the number of characters converted and written to buffer (excluding the null terminator)
-    size_t DecodeUnitsIntoAndNullTerminate(__out_ecount(pbEnd - pbUtf8 + 1) __nullterminated char16 *buffer, LPCUTF8& pbUtf8, LPCUTF8 pbEnd, DecodeOptions options = doDefault);
+    size_t DecodeUnitsIntoAndNullTerminate(__out_ecount(pbEnd - pbUtf8 + 1) __nullterminated char16 *buffer, LPCUTF8& pbUtf8, LPCUTF8 pbEnd, DecodeOptions options = doDefault, bool *chunkEndsAtTruncatedSequence = nullptr);
 
-    size_t DecodeUnitsIntoAndNullTerminateNoAdvance(__out_ecount(pbEnd - pbUtf8 + 1) __nullterminated char16 *buffer, LPCUTF8 pbUtf8, LPCUTF8 pbEnd, DecodeOptions options = doDefault);
+    size_t DecodeUnitsIntoAndNullTerminateNoAdvance(__out_ecount(pbEnd - pbUtf8 + 1) __nullterminated char16 *buffer, LPCUTF8 pbUtf8, LPCUTF8 pbEnd, DecodeOptions options = doDefault, bool *chunkEndsAtTruncatedSequence = nullptr);
 
     // Encode a UTF-8 sequence into a UTF-8 sequence (which is just a memcpy). This is included for convenience in templates
     // when the character encoding is a template parameter.
diff --git a/lib/Common/Common/MathUtil.h b/lib/Common/Common/MathUtil.h
index 9043d27..aceb25d 100644
--- a/lib/Common/Common/MathUtil.h
+++ b/lib/Common/Common/MathUtil.h
@@ -100,6 +100,12 @@
         return ((size + (alignment-1)) & ~(alignment-1));
     }
 
+    template <typename T>
+    static bool IsAligned(T size, T alignment)
+    {
+        return (size & (alignment - 1)) == 0;
+    }
+
     template <typename T, class Func>
     static T AlignOverflowCheck(T size, T alignment, __inout Func& overflowFn)
     {
diff --git a/lib/Common/Common/RejitReason.cpp b/lib/Common/Common/RejitReason.cpp
index 5b806c8..9ca1d89 100644
--- a/lib/Common/Common/RejitReason.cpp
+++ b/lib/Common/Common/RejitReason.cpp
@@ -11,5 +11,11 @@
     #include "RejitReasons.h"
     #undef REJIT_REASON
 };
+const char* const GetRejitReasonName(RejitReason reason)
+{
+    byte reasonIndex = static_cast<byte>(reason);
+    Assert(reasonIndex < NumRejitReasons);
+    return RejitReasonNames[reasonIndex];
+}
 
 const uint NumRejitReasons = _countof(RejitReasonNames);
diff --git a/lib/Common/Common/RejitReason.h b/lib/Common/Common/RejitReason.h
index a2f9177..fe64fba 100644
--- a/lib/Common/Common/RejitReason.h
+++ b/lib/Common/Common/RejitReason.h
@@ -4,11 +4,14 @@
 //-------------------------------------------------------------------------------------------------------
 #pragma once
 
-BEGIN_ENUM_BYTE(RejitReason)
-    #define REJIT_REASON(n) n,
-    #include "RejitReasons.h"
-    #undef REJIT_REASON
-END_ENUM_BYTE();
+enum class RejitReason : byte
+{
+#define REJIT_REASON(n) n,
+#include "RejitReasons.h"
+#undef REJIT_REASON
+};
 
 extern const char *const RejitReasonNames[];
 extern const uint NumRejitReasons;
+
+extern const char *const GetRejitReasonName(RejitReason reason);
diff --git a/lib/Common/Common/RejitReasons.h b/lib/Common/Common/RejitReasons.h
index ac55b59..0c35143 100644
--- a/lib/Common/Common/RejitReasons.h
+++ b/lib/Common/Common/RejitReasons.h
@@ -49,3 +49,4 @@
 REJIT_REASON(NoProfile)
 REJIT_REASON(PowIntIntTypeSpecDisabled)
 REJIT_REASON(DisableStackArgOpt)
+REJIT_REASON(OptimizeTryFinallyDisabled)
diff --git a/lib/Common/Common/UInt16Math.h b/lib/Common/Common/UInt16Math.h
index c1b1e6b..330e39f 100644
--- a/lib/Common/Common/UInt16Math.h
+++ b/lib/Common/Common/UInt16Math.h
@@ -50,4 +50,33 @@
     {
         Inc(lhs, ::Math::DefaultOverflowPolicy);
     }
+
+    template<typename Func>
+    static uint16 Mul(uint16 lhs, uint16 rhs, __in Func& overflowFn)
+    {
+        // Do the multiplication using 32-bit unsigned math.
+        uint32 result = static_cast<uint32>(lhs) * static_cast<uint32>(rhs);
+
+        // Does the result fit in 16-bits?
+        if(result > UINT16_MAX)
+        {
+            overflowFn();
+        }
+
+        return static_cast<uint16>(result);
+    }
+
+    static uint16 Mul(uint16 lhs, uint16 rhs)
+    {
+        return Mul(lhs, rhs, ::Math::DefaultOverflowPolicy);
+    }
+
+    static bool Mul(uint16 lhs, uint16 rhs, __out uint16* result)
+    {
+        ::Math::RecordOverflowPolicy overflowGuard;
+        *result = Mul(lhs, rhs, overflowGuard);
+        return overflowGuard.HasOverflowed();
+    }
+
 };
+using ArgSlotMath = UInt16Math;
diff --git a/lib/Common/CommonDefines.h b/lib/Common/CommonDefines.h
index 68948cb..8645735 100644
--- a/lib/Common/CommonDefines.h
+++ b/lib/Common/CommonDefines.h
@@ -82,13 +82,13 @@
 // Even if it builds, it may not work properly. Disable at your own risk
 
 // Config options
+#define CONFIG_PARSE_CONFIG_FILE 1
+
 #ifdef _WIN32
 #define CONFIG_CONSOLE_AVAILABLE 1
-#define CONFIG_PARSE_CONFIG_FILE 1
 #define CONFIG_RICH_TRACE_FORMAT 1
 #else
 #define CONFIG_CONSOLE_AVAILABLE 0
-#define CONFIG_PARSE_CONFIG_FILE 0
 #define CONFIG_RICH_TRACE_FORMAT 0
 #endif
 
@@ -138,16 +138,21 @@
 #ifdef _WIN32
 #define SYSINFO_IMAGE_BASE_AVAILABLE 1
 #define ENABLE_CONCURRENT_GC 1
+#define ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP 1 // Only takes effect when ENABLE_CONCURRENT_GC is enabled.
+#define ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP_USE_SLIST 1 // Use Interlocked SLIST for allocableHeapBlockList
 #define SUPPORT_WIN32_SLIST 1
 #define ENABLE_JS_ETW                               // ETW support
 #else
 #define SYSINFO_IMAGE_BASE_AVAILABLE 0
 #ifndef ENABLE_VALGRIND
 #define ENABLE_CONCURRENT_GC 1
+#define ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP 1 // Only takes effect when ENABLE_CONCURRENT_GC is enabled.
 #else
 #define ENABLE_CONCURRENT_GC 0
+#define ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP 0 // Only takes effect when ENABLE_CONCURRENT_GC is enabled.
 #endif
 #define SUPPORT_WIN32_SLIST 0
+#define ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP_USE_SLIST 0 // Use Interlocked SLIST for allocableHeapBlockList
 #endif
 
 
diff --git a/lib/Common/ConfigFlagsList.h b/lib/Common/ConfigFlagsList.h
index c906aab..06a9b12 100644
--- a/lib/Common/ConfigFlagsList.h
+++ b/lib/Common/ConfigFlagsList.h
@@ -34,12 +34,13 @@
     PHASE(Delay)
         PHASE(Speculation)
         PHASE(GatherCodeGenData)
-    PHASE(WasmBytecode)
-        PHASE(WasmParser)
+    PHASE(Wasm)
+        // Wasm frontend
+        PHASE(WasmBytecode)
         PHASE(WasmReader)
-        PHASE(WasmSection)
-        PHASE(WasmLEB128)
-        PHASE(WasmFunctionBody)
+            PHASE(WasmSection)
+            PHASE(WasmLEB128)
+        // Wasm features per functions
         PHASE(WasmDeferred)
         PHASE(WasmValidatePrejit)
         PHASE(WasmInOut) // Trace input and output of wasm calls
@@ -396,6 +397,7 @@
 #define DEFAULT_CONFIG_WasmCheckVersion     (true)
 #define DEFAULT_CONFIG_WasmFold             (true)
 #define DEFAULT_CONFIG_WasmIgnoreResponse   (false)
+#define DEFAULT_CONFIG_WasmMaxTableSize     (10000000)
 #define DEFAULT_CONFIG_BgJitDelayFgBuffer   (0)
 #define DEFAULT_CONFIG_BgJitPendingFuncCap  (31)
 #define DEFAULT_CONFIG_CurrentSourceInfo    (true)
@@ -416,6 +418,7 @@
 #define DEFAULT_CONFIG_ForceExpireOnNonCacheCollect (false)
 #define DEFAULT_CONFIG_ForceFastPath        (false)
 #define DEFAULT_CONFIG_ForceJITLoopBody     (false)
+#define DEFAULT_CONFIG_ForceStaticInterpreterThunk (false)
 #define DEFAULT_CONFIG_ForceCleanPropertyOnCollect (false)
 #define DEFAULT_CONFIG_ForceCleanCacheOnCollect (false)
 #define DEFAULT_CONFIG_ForceGCAfterJSONParse (false)
@@ -679,7 +682,6 @@
 #define DEFAULT_CONFIG_PerfHintLevel (1)
 #define DEFAULT_CONFIG_OOPJITMissingOpts (true)
 #define DEFAULT_CONFIG_OOPCFGRegistration (true)
-#define DEFAULT_CONFIG_RPCFailFastWait (3000)
 
 #define DEFAULT_CONFIG_FailFastIfDisconnectedDelegate    (false)
 
@@ -871,6 +873,7 @@
 FLAGNR(Boolean, WasmCheckVersion      , "Check the binary version for WebAssembly", DEFAULT_CONFIG_WasmCheckVersion)
 FLAGNR(Boolean, WasmFold              , "Enable i32/i64 const folding", DEFAULT_CONFIG_WasmFold)
 FLAGNR(Boolean, WasmIgnoreResponse    , "Ignore the type of the Response object", DEFAULT_CONFIG_WasmIgnoreResponse)
+FLAGNR(Number,  WasmMaxTableSize      , "Maximum size allowed to the WebAssembly.Table", DEFAULT_CONFIG_WasmMaxTableSize)
 
 #ifndef COMPILE_DISABLE_Simdjs
     #define COMPILE_DISABLE_Simdjs 0
@@ -1111,6 +1114,7 @@
 FLAGNR(Boolean, ForceFastPath         , "Force fast-paths in native codegen", DEFAULT_CONFIG_ForceFastPath)
 FLAGNR(Boolean, ForceFloatPref        , "Force float preferencing (JIT only)", false)
 FLAGNR(Boolean, ForceJITLoopBody      , "Force jit loop body only", DEFAULT_CONFIG_ForceJITLoopBody)
+FLAGNR(Boolean, ForceStaticInterpreterThunk, "Force using static interpreter thunk", DEFAULT_CONFIG_ForceStaticInterpreterThunk)
 FLAGNR(Boolean, DumpCommentsFromReferencedFiles, "Allow printing comments of comment-table of the referenced file as well (use with -trace:CommentTable)", DEFAULT_CONFIG_DumpCommentsFromReferencedFiles)
 FLAGNR(Number,  DelayFullJITSmallFunc , "Scale Full JIT threshold for small functions which are going to be inlined soon. To provide fraction scale, the final scale is scale following this option devided by 10", DEFAULT_CONFIG_DelayFullJITSmallFunc)
 
@@ -1245,7 +1249,6 @@
 FLAGNR(Boolean, NoLogo                , "No logo, which we don't display anyways", false)
 FLAGNR(Boolean, OOPJITMissingOpts     , "Use optimizations that are missing from OOP JIT", DEFAULT_CONFIG_OOPJITMissingOpts)
 FLAGNR(Boolean, OOPCFGRegistration    , "Do CFG registration OOP (under OOP JIT)", DEFAULT_CONFIG_OOPCFGRegistration)
-FLAGNR(Number,  RPCFailFastWait       , "Wait time for JIT process termination before triggering failfast on RPC failure", DEFAULT_CONFIG_RPCFailFastWait)
 #ifdef _ARM64_
 FLAGR (Boolean, NoNative              , "Disable native codegen", true)
 #else
@@ -1329,6 +1332,7 @@
 #if ENABLE_CONCURRENT_GC
 FLAGNR(Number,  RecyclerPriorityBoostTimeout, "Adjust priority boost timeout", 5000)
 FLAGNR(Number,  RecyclerThreadCollectTimeout, "Adjust thread collect timeout", 1000)
+FLAGRA(Boolean, EnableConcurrentSweepAlloc, ecsa, "Turns off the feature to allow allocations during concurrent sweep.", true)
 #endif
 #ifdef RECYCLER_PAGE_HEAP
 FLAGNR(Number,      PageHeap,             "Use full page for heap allocations", DEFAULT_CONFIG_PageHeap)
diff --git a/lib/Common/Core/ConfigParser.cpp b/lib/Common/Core/ConfigParser.cpp
index f8c8d25..f57bff8 100644
--- a/lib/Common/Core/ConfigParser.cpp
+++ b/lib/Common/Core/ConfigParser.cpp
@@ -313,7 +313,6 @@
     Assert(!_hasReadConfig);
     _hasReadConfig = true;
 
-    char16 configBuffer[MaxTokenSize];
     int err = 0;
     char16 modulename[_MAX_PATH];
     char16 filename[_MAX_PATH];
@@ -326,6 +325,7 @@
     _wmakepath_s(filename, drive, dir, _configFileName, _u(".config"));
 
     FILE* configFile;
+#ifdef _WIN32
     if (_wfopen_s(&configFile, filename, _u("r, ccs=UNICODE")) != 0 || configFile == nullptr)
     {
         WCHAR configFileFullName[MAX_PATH];
@@ -337,19 +337,73 @@
         {
             return;
         }
+
         if (_wfopen_s(&configFile, filename, _u("r, ccs=UNICODE")) != 0 || configFile == nullptr)
         {
             return;
         }
     }
-
-    while (fwscanf_s(configFile, _u("%s"), configBuffer, MaxTokenSize) != FINISHED)
+#else
+    // Two-pathed for a couple reasons
+    // 1. PAL doesn't like the ccs option passed in.
+    // 2. _wfullpath is not implemented in the PAL.
+    // Instead, on xplat, we'll check the HOME directory to see if there is
+    // a config file there that we can use
+    if (_wfopen_s(&configFile, filename, _u("r")) != 0 || configFile == nullptr)
     {
-        if ((err = parser.Parse(configBuffer)) != 0)
+        WCHAR homeDir[MAX_PATH];
+
+        if (GetEnvironmentVariable(_u("HOME"), homeDir, MAX_PATH) == 0)
         {
-            break;
+            return;
+        }
+        
+        WCHAR configFileFullName[MAX_PATH];
+
+        StringCchPrintf(configFileFullName, MAX_PATH, _u("%s/%s.config"), homeDir, _configFileName);
+        if (_wfopen_s(&configFile, configFileFullName, _u("r")) != 0 || configFile == nullptr)
+        {
+            return;
         }
     }
+#endif
+
+    char16 configBuffer[MaxTokenSize];
+    int index = 0;
+
+    // We don't expect the token to overflow- if it does
+    // the simplest thing to do would be to ignore the
+    // read tokens
+    // We could use _fwscanf_s here but the function
+    // isn't implemented in the PAL and we'd have to deal with
+    // wchar => char16 impedance mismatch.
+    while (index < MaxTokenSize)
+    {
+        int curChar = fgetc(configFile);
+        if (curChar == '\n' || curChar == FINISHED)
+        {
+            configBuffer[index] = 0;
+            if ((err = parser.Parse(configBuffer)) != 0)
+            {
+                break;
+            }
+
+            if (curChar == FINISHED)
+            {
+                break;
+            }
+
+            index = 0;
+        }
+        else
+        {
+            // The expectation is that non-ANSI characters
+            // are not used in the config- otherwise it will
+            // be interpreted incorrectly here
+            configBuffer[index++] = (char16) curChar;
+        }
+    }
+
     fclose(configFile);
 
     if (err !=0)
diff --git a/lib/Common/DataStructures/BigInt.cpp b/lib/Common/DataStructures/BigInt.cpp
index 0c27963..9908eaa 100644
--- a/lib/Common/DataStructures/BigInt.cpp
+++ b/lib/Common/DataStructures/BigInt.cpp
@@ -1,4 +1,4 @@
-//-------------------------------------------------------------------------------------------------------
+//-------------------------------------------------------------------------------------------------------
 // Copyright (C) Microsoft. All rights reserved.
 // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
 //-------------------------------------------------------------------------------------------------------
diff --git a/lib/Common/DataStructures/BigInt.h b/lib/Common/DataStructures/BigInt.h
index 599c4b6..c2d3f1c 100644
--- a/lib/Common/DataStructures/BigInt.h
+++ b/lib/Common/DataStructures/BigInt.h
@@ -1,4 +1,4 @@
-//-------------------------------------------------------------------------------------------------------
+//-------------------------------------------------------------------------------------------------------
 // Copyright (C) Microsoft. All rights reserved.
 // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
 //-------------------------------------------------------------------------------------------------------
diff --git a/lib/Common/DataStructures/FixedBitVector.h b/lib/Common/DataStructures/FixedBitVector.h
index cbb5830..57227c6 100644
--- a/lib/Common/DataStructures/FixedBitVector.h
+++ b/lib/Common/DataStructures/FixedBitVector.h
@@ -534,7 +534,7 @@
     const BVUnit * GetRawData() const { return data; }
 
     template <size_t rangeSize>
-    BVStatic<rangeSize> * GetRange(BVIndex startOffset)
+    BVStatic<rangeSize> * GetRange(BVIndex startOffset) const
     {
         AssertRange(startOffset);
         AssertRange(startOffset + rangeSize - 1);
@@ -681,6 +681,23 @@
         return true;
     }
 
+    bool IsAllSet() const
+    {
+        for (BVIndex i = 0; i < this->wordCount; i++)
+        {
+            if (i == this->wordCount - 1 && Length() % BVUnit::BitsPerWord != 0)
+            {
+                return this->data[i].Count() == Length() % BVUnit::BitsPerWord;
+            }
+            else if (!this->data[i].IsFull())
+            {
+                return false;
+            }
+        }
+
+        return true;
+    }
+
 #if DBG_DUMP
     void Dump() const
     {
diff --git a/lib/Common/DataStructures/SizePolicy.h b/lib/Common/DataStructures/SizePolicy.h
index e445b90..9d23b88 100644
--- a/lib/Common/DataStructures/SizePolicy.h
+++ b/lib/Common/DataStructures/SizePolicy.h
@@ -55,7 +55,6 @@
     }
 };
 
-#ifndef JD_PRIVATE
 template <class SizePolicy, uint averageChainLength = 2, uint growthRateNumerator = 2, uint growthRateDenominator = 1, uint minBucket = 4>
 struct DictionarySizePolicy
 {
@@ -82,4 +81,3 @@
 
 typedef DictionarySizePolicy<PrimePolicy> PrimeSizePolicy;
 typedef DictionarySizePolicy<PowerOf2Policy> PowerOf2SizePolicy;
-#endif
diff --git a/lib/Common/Exceptions/RejitException.h b/lib/Common/Exceptions/RejitException.h
index fc1cc35..51ce8d9 100644
--- a/lib/Common/Exceptions/RejitException.h
+++ b/lib/Common/Exceptions/RejitException.h
@@ -24,7 +24,7 @@
 
         const char *ReasonName() const
         {
-            return RejitReasonNames[reason];
+            return RejitReasonNames[static_cast<byte>(reason)];
         }
     };
 }
diff --git a/lib/Common/Memory/ArenaAllocator.cpp b/lib/Common/Memory/ArenaAllocator.cpp
index 76f8845..017165a 100644
--- a/lib/Common/Memory/ArenaAllocator.cpp
+++ b/lib/Common/Memory/ArenaAllocator.cpp
@@ -1113,6 +1113,26 @@
 #if DBG
 void InlineCacheAllocator::CheckIsAllZero(bool lockdown)
 {
+    ArenaMemoryBlock * memoryBlock = this->mallocBlocks;
+    while (memoryBlock != nullptr)
+    {
+        Assert(memoryBlock->nbytes % sizeof(CacheLayout) == 0);
+        ArenaMemoryBlock * next = memoryBlock->next;
+        CacheLayout* endPtr = (CacheLayout*)(memoryBlock->GetBytes() + memoryBlock->nbytes);
+        for (CacheLayout* cache = (CacheLayout*)memoryBlock->GetBytes(); cache < endPtr; cache++)
+        {
+            unsigned char* weakRefBytes = (unsigned char *)cache->weakRefs;
+#ifdef ARENA_MEMORY_VERIFY
+            Assert(IsAll(weakRefBytes, sizeof(cache->weakRefs), 0)
+                || IsAll(weakRefBytes, sizeof(cache->weakRefs), InlineCacheFreeListPolicy::DbgFreeMemFill));
+#else
+            Assert(IsAll(weakRefBytes, sizeof(cache->weakRefs), 0));
+#endif
+        }
+
+        memoryBlock = next;
+    }
+
     if (verifiedAllZeroAndLockedDown && lockdown)
     {
         return;
@@ -1174,31 +1194,6 @@
         bigBlock = bigBlock->nextBigBlock;
     }
 
-    ArenaMemoryBlock * memoryBlock = this->mallocBlocks;
-    while (memoryBlock != nullptr)
-    {
-        Assert(memoryBlock->nbytes % sizeof(CacheLayout) == 0);
-        ArenaMemoryBlock * next = memoryBlock->next;
-        CacheLayout* endPtr = (CacheLayout*)(memoryBlock->GetBytes() + memoryBlock->nbytes);
-        for (CacheLayout* cache = (CacheLayout*)memoryBlock->GetBytes(); cache < endPtr; cache++)
-        {
-            unsigned char* weakRefBytes = (unsigned char *)cache->weakRefs;
-#ifdef ARENA_MEMORY_VERIFY
-            Assert(IsAll(weakRefBytes, sizeof(cache->weakRefs), 0)
-                || IsAll(weakRefBytes, sizeof(cache->weakRefs), InlineCacheFreeListPolicy::DbgFreeMemFill));
-#else
-            Assert(IsAll(weakRefBytes, sizeof(cache->weakRefs), 0));
-#endif
-        }
-
-        if (lockdown)
-        {
-            DWORD oldProtect;
-            VirtualProtect(memoryBlock->GetBytes(), memoryBlock->nbytes, PAGE_READONLY, &oldProtect);
-        }
-        memoryBlock = next;
-    }
-
     if (lockdown)
     {
         verifiedAllZeroAndLockedDown = true;
@@ -1227,13 +1222,6 @@
             bigBlock = bigBlock->nextBigBlock;
         }
 
-        ArenaMemoryBlock * memoryBlock = this->mallocBlocks;
-        while (memoryBlock != nullptr)
-        {
-            DWORD oldProtect;
-            VirtualProtect(memoryBlock->GetBytes(), memoryBlock->nbytes, PAGE_READWRITE, &oldProtect);
-            memoryBlock = memoryBlock->next;
-        }
         verifiedAllZeroAndLockedDown = false;
     }
 }
@@ -1526,6 +1514,13 @@
 #if DBG
 void CacheAllocator::CheckIsAllZero(bool lockdown)
 {
+    ArenaMemoryBlock * memoryBlock = this->mallocBlocks;
+    while (memoryBlock != nullptr)
+    {
+        Assert(IsAll((byte*)memoryBlock->GetBytes(), memoryBlock->nbytes, 0));
+        memoryBlock = memoryBlock->next;
+    }
+
     if (verifiedAllZeroAndLockedDown && lockdown)
     {
         return;
@@ -1555,18 +1550,6 @@
         blockp = blockp->nextBigBlock;
     }
 
-    ArenaMemoryBlock * memoryBlock = this->mallocBlocks;
-    while (memoryBlock != nullptr)
-    {
-        Assert(IsAll((byte*)memoryBlock->GetBytes(), memoryBlock->nbytes, 0));
-        if (lockdown)
-        {
-            DWORD oldProtect;
-            VirtualProtect(memoryBlock->GetBytes(), memoryBlock->nbytes, PAGE_READONLY, &oldProtect);
-        }
-        memoryBlock = memoryBlock->next;
-    }
-
     if (lockdown)
     {
         verifiedAllZeroAndLockedDown = true;
@@ -1594,13 +1577,6 @@
             bigBlock = bigBlock->nextBigBlock;
         }
 
-        ArenaMemoryBlock * memoryBlock = this->mallocBlocks;
-        while (memoryBlock != nullptr)
-        {
-            DWORD oldProtect;
-            VirtualProtect(memoryBlock->GetBytes(), memoryBlock->nbytes, PAGE_READWRITE, &oldProtect);
-            memoryBlock = memoryBlock->next;
-        }
         verifiedAllZeroAndLockedDown = false;
     }
 }
diff --git a/lib/Common/Memory/CollectionState.h b/lib/Common/Memory/CollectionState.h
index 3f85600..a1733e2 100644
--- a/lib/Common/Memory/CollectionState.h
+++ b/lib/Common/Memory/CollectionState.h
@@ -38,7 +38,7 @@
     Collection_PostCollectionCallback      = 0x00020000,
     Collection_PostSweepRedeferralCallback = 0x00040000,
     Collection_WrapperCallback             = 0x00080000,
-    
+
 
     // Actual states
     CollectionStateNotCollecting          = 0,                                                                // not collecting
diff --git a/lib/Common/Memory/HeapBlock.cpp b/lib/Common/Memory/HeapBlock.cpp
index 9cbfa98..796b298 100644
--- a/lib/Common/Memory/HeapBlock.cpp
+++ b/lib/Common/Memory/HeapBlock.cpp
@@ -1552,6 +1552,8 @@
 
     Assert(expectPending == HasAnyDisposeObjects());
 
+    // As the blocks are added to the SLIST and used from there during concurrent sweep, the exepectFull assertion doesn't hold anymore.
+#if !(ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP)
     if (this->isInAllocator || this->isClearedFromAllocator)
     {
         Assert(expectFull && !expectPending);
@@ -1560,6 +1562,7 @@
     {
         Assert(expectFull == (!this->HasFreeObject() && !HasAnyDisposeObjects()));
     }
+#endif
 }
 
 
@@ -1680,12 +1683,12 @@
 
 template <class TBlockAttributes>
 typename SmallHeapBlockT<TBlockAttributes>::SmallHeapBlockBitVector *
-SmallHeapBlockT<TBlockAttributes>::EnsureFreeBitVector()
+SmallHeapBlockT<TBlockAttributes>::EnsureFreeBitVector(bool isCollecting)
 {
     if (this->IsFreeBitsValid())
     {
         // the free object list hasn't change, so the free vector should be valid
-        RECYCLER_SLOW_CHECK(CheckFreeBitVector(true));
+        RECYCLER_SLOW_CHECK(CheckFreeBitVector(isCollecting));
         return this->GetFreeBitVector();
     }
     return BuildFreeBitVector();
diff --git a/lib/Common/Memory/HeapBlock.h b/lib/Common/Memory/HeapBlock.h
index e1d483d..7637454 100644
--- a/lib/Common/Memory/HeapBlock.h
+++ b/lib/Common/Memory/HeapBlock.h
@@ -353,6 +353,15 @@
 #endif
 };
 
+#if ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP && SUPPORT_WIN32_SLIST && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP_USE_SLIST
+template <typename TBlockType>
+struct HeapBlockSListItem {
+    // SLIST_ENTRY needs to be the first element in the structure to avoid calculating offset with the SList API calls.
+    SLIST_ENTRY itemEntry;
+    TBlockType * itemHeapBlock;
+};
+#endif
+
 enum SweepMode
 {
     SweepMode_InThread,
@@ -694,7 +703,7 @@
     void CheckFreeBitVector(bool isCollecting);
 #endif
 
-    SmallHeapBlockBitVector * EnsureFreeBitVector();
+    SmallHeapBlockBitVector * EnsureFreeBitVector(bool isCollecting = true);
     SmallHeapBlockBitVector * BuildFreeBitVector();
     ushort BuildFreeBitVector(SmallHeapBlockBitVector * bv);
 
diff --git a/lib/Common/Memory/HeapBlockMap.h b/lib/Common/Memory/HeapBlockMap.h
index b2d4381..76a9cbd 100644
--- a/lib/Common/Memory/HeapBlockMap.h
+++ b/lib/Common/Memory/HeapBlockMap.h
@@ -5,10 +5,6 @@
 #pragma once
 #include "CommonDefines.h"
 
-#ifdef JD_PRIVATE
-class HeapBlockHelper;
-#endif
-
 namespace Memory
 {
 class HeapBlockMap32
@@ -25,7 +21,7 @@
     static const uint PageMarkBitCount = PageSize / HeapConstants::ObjectGranularity;
     static const uint L2ChunkMarkBitCount = L2Count * PageMarkBitCount;
 
-#if defined(_M_X64_OR_ARM64) && !defined(JD_PRIVATE)
+#if defined(_M_X64_OR_ARM64)
     static const size_t TotalSize = 0x100000000;        // 4GB
 #endif
 
@@ -91,10 +87,6 @@
 private:
     friend class PageSegmentBase<VirtualAllocWrapper>;
 
-#ifdef JD_PRIVATE
-    friend class HeapBlockHelper;
-#endif
-
     template <class Fn>
     void ForEachSegment(Recycler * recycler, Fn func);
 
@@ -283,9 +275,6 @@
 
 private:
     friend class HeapBlockMap32;
-#ifdef JD_PRIVATE
-    friend class HeapBlockHelper;
-#endif
 
     struct Node
     {
@@ -325,12 +314,10 @@
     void VerifyMarkCountForPages(void * address, uint pageCount);
 #endif
 
-#if !defined(JD_PRIVATE)
     static char * GetNodeStartAddress(void * address)
     {
         return (char *)(((size_t)address) & ~(HeapBlockMap32::TotalSize - 1));
     }
-#endif
 };
 
 typedef HeapBlockMap64 HeapBlockMap;
diff --git a/lib/Common/Memory/HeapBucket.cpp b/lib/Common/Memory/HeapBucket.cpp
index b24f61b..f98a586 100644
--- a/lib/Common/Memory/HeapBucket.cpp
+++ b/lib/Common/Memory/HeapBucket.cpp
@@ -41,6 +41,12 @@
     emptyBlockList(nullptr),
     fullBlockList(nullptr),
     heapBlockList(nullptr),
+#if ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP
+#if SUPPORT_WIN32_SLIST && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP_USE_SLIST
+    allocableHeapBlockListHead((PSLIST_HEADER)_aligned_malloc(sizeof(SLIST_HEADER), MEMORY_ALLOCATION_ALIGNMENT)),
+    sweepableHeapBlockList(nullptr),
+#endif
+#endif
     explicitFreeList(nullptr),
     lastExplicitFreeListAllocator(nullptr)
 {
@@ -48,9 +54,11 @@
     explicitFreeLockBlockList = nullptr;
 #endif
 
-#if DBG
-    isAllocationStopped = false;
+#if ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP && SUPPORT_WIN32_SLIST && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP_USE_SLIST
+    this->allocationsStartedDuringConcurrentSweep = false;
 #endif
+
+    isAllocationStopped = false;
 }
 
 
@@ -60,6 +68,22 @@
     DeleteHeapBlockList(this->heapBlockList);
     DeleteHeapBlockList(this->fullBlockList);
 
+#if ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP
+#if SUPPORT_WIN32_SLIST && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP_USE_SLIST
+    if (allocableHeapBlockListHead != nullptr)
+    {
+        if (CONFIG_FLAG_RELEASE(EnableConcurrentSweepAlloc))
+        {
+            FlushInterlockedSList(this->allocableHeapBlockListHead);
+        }
+
+        _aligned_free(this->allocableHeapBlockListHead);
+    }
+
+    DeleteHeapBlockList(sweepableHeapBlockList);
+#endif
+#endif
+
     Assert(this->heapBlockCount + this->newHeapBlockCount == 0);
     RECYCLER_SLOW_CHECK(Assert(this->emptyHeapBlockCount == HeapBlockList::Count(this->emptyBlockList)));
     DeleteEmptyHeapBlockList(this->emptyBlockList);
@@ -97,6 +121,69 @@
     DeleteHeapBlockList(list, this->heapInfo->recycler);
 }
 
+#if ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP && SUPPORT_WIN32_SLIST && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP_USE_SLIST
+template<typename TBlockType>
+bool
+HeapBucketT<TBlockType>::PushHeapBlockToSList(PSLIST_HEADER list, TBlockType * heapBlock)
+{
+    Assert(list != nullptr);
+    HeapBlockSListItem<TBlockType> * currentBlock = (HeapBlockSListItem<TBlockType> *) _aligned_malloc(sizeof(HeapBlockSListItem<TBlockType>), MEMORY_ALLOCATION_ALIGNMENT);
+    if (currentBlock == nullptr)
+    {
+        return false;
+    }
+
+    currentBlock->itemHeapBlock = heapBlock;
+    ::InterlockedPushEntrySList(list, &(currentBlock->itemEntry));
+    return true;
+}
+
+template<typename TBlockType>
+TBlockType *
+HeapBucketT<TBlockType>::PopHeapBlockFromSList(PSLIST_HEADER list)
+{
+    Assert(list != nullptr);
+    TBlockType * heapBlock = nullptr;
+
+    PSLIST_ENTRY top = ::InterlockedPopEntrySList(list);
+    if (top != nullptr)
+    {
+        HeapBlockSListItem<TBlockType> * topItem = (HeapBlockSListItem<TBlockType> *) top;
+        heapBlock = topItem->itemHeapBlock;
+        Assert(heapBlock != nullptr);
+        _aligned_free(top);
+    }
+
+    return heapBlock;
+}
+
+template<typename TBlockType>
+ushort
+HeapBucketT<TBlockType>::QueryDepthInterlockedSList(PSLIST_HEADER list)
+{
+    Assert(list != nullptr);
+    return ::QueryDepthSList(list);
+}
+
+template<typename TBlockType>
+void
+HeapBucketT<TBlockType>::FlushInterlockedSList(PSLIST_HEADER list)
+{
+    Assert(list != nullptr);
+    if (::QueryDepthSList(list) > 0)
+    {
+        PSLIST_ENTRY listEntry = ::InterlockedPopEntrySList(list);
+        while (listEntry != nullptr)
+        {
+            _aligned_free(listEntry);
+            listEntry = ::InterlockedPopEntrySList(list);
+        }
+    }
+
+    ::InterlockedFlushSList(list);
+}
+#endif
+
 template <typename TBlockType>
 void
 HeapBucketT<TBlockType>::Initialize(HeapInfo * heapInfo, uint sizeCat)
@@ -111,6 +198,20 @@
     allocatorHead.bucket = this;
 #endif
     this->lastExplicitFreeListAllocator = &allocatorHead;
+
+#if ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP && SUPPORT_WIN32_SLIST && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP_USE_SLIST
+    if (CONFIG_FLAG_RELEASE(EnableConcurrentSweepAlloc))
+    {
+        if (allocableHeapBlockListHead == nullptr)
+        {
+            heapInfo->recycler->OutOfMemory();
+        }
+        else
+        {
+            ::InitializeSListHead(allocableHeapBlockListHead);
+        }
+    }
+#endif
 }
 
 template <typename TBlockType>
@@ -297,14 +398,34 @@
 {
     size_t currentHeapBlockCount = HeapBlockList::Count(fullBlockList);
     currentHeapBlockCount += HeapBlockList::Count(heapBlockList);
+    bool allocatingDuringConcurrentSweep = false;
+
 #if ENABLE_CONCURRENT_GC
+#if ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP
+#if SUPPORT_WIN32_SLIST && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP_USE_SLIST
+    if (CONFIG_FLAG_RELEASE(EnableConcurrentSweepAlloc))
+    {
+        allocatingDuringConcurrentSweep = true;
+        // This lock is needed only in the debug mode while we verify block counts. Not needed otherwise, as this list is never accessed concurrently.
+        // Items are added to it by the allocator when allocations are allowed during concurrent sweep. The list is drained during the next sweep while
+        // allocation are stopped.
+        debugSweepableHeapBlockListLock.Enter();
+        currentHeapBlockCount += QueryDepthInterlockedSList(allocableHeapBlockListHead);
+        currentHeapBlockCount += HeapBlockList::Count(sweepableHeapBlockList);
+        debugSweepableHeapBlockListLock.Leave();
+    }
+#endif
+#endif
+
     // Recycler can be null if we have OOM in the ctor
     if (this->GetRecycler() && this->GetRecycler()->recyclerSweep != nullptr)
     {
         currentHeapBlockCount += this->GetRecycler()->recyclerSweep->GetHeapBlockCount(this);
     }
 #endif
-    RECYCLER_SLOW_CHECK(Assert(!checkCount || heapBlockCount == currentHeapBlockCount));
+
+    // There is no way to determine the number of item in an SLIST if there are >= 65535 items in the list.
+    RECYCLER_SLOW_CHECK(Assert(!checkCount || heapBlockCount == currentHeapBlockCount || allocatingDuringConcurrentSweep));
 
     return currentHeapBlockCount;
 }
@@ -330,10 +451,47 @@
     ClearAllocator(allocator);
 
     TBlockType * heapBlock = this->nextAllocableBlockHead;
-    if (heapBlock != nullptr)
+#if ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP 
+#if SUPPORT_WIN32_SLIST && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP_USE_SLIST
+    bool heapBlockInSweepableList = false;
+    if (heapBlock == nullptr && CONFIG_FLAG_RELEASE(EnableConcurrentSweepAlloc))
     {
+#if DBG || defined(RECYCLER_SLOW_CHECK_ENABLED)
+        // This lock is needed only in the debug mode while we verify block counts. Not needed otherwise, as this list is never accessed concurrently.
+        // Items are added to it by the allocator when allocations are allowed during concurrent sweep. The list is drained during the next sweep while
+        // allocation are stopped.
+        debugSweepableHeapBlockListLock.Enter();
+#endif
+        heapBlock = PopHeapBlockFromSList(this->allocableHeapBlockListHead);
+        if (heapBlock != nullptr)
+        {
+            // Put the block in the sweepable heap block list so we don't lose track of it. The block will eventually be moved to the 
+            // heapBlockList or fullBlockList as appropriate during the next sweep.
+            heapBlock->SetNextBlock(sweepableHeapBlockList);
+            sweepableHeapBlockList = heapBlock;
+            heapBlockInSweepableList = true;
+        }
+#if DBG|| defined(RECYCLER_SLOW_CHECK_ENABLED)
+        debugSweepableHeapBlockListLock.Leave();
+#endif
+    }
+#endif
+#endif
+
+   if (heapBlock != nullptr)
+   {
         Assert(!this->IsAllocationStopped());
-        this->nextAllocableBlockHead = heapBlock->GetNextBlock();
+
+#if ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP && SUPPORT_WIN32_SLIST && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP_USE_SLIST
+        // When allocations are allowed during concurrent sweep we set nextAllocableBlockHead to NULL as the allocator will pick heap blocks from the
+        // interlocked SLIST. During that time, the heap block at the top of the SLIST is always the nextAllocableBlockHead.
+        // If the heapBlock was just picked from the SLIST and nextAllocableBlockHead is not NULL then we just resumed normal allocations on the background thread
+        // while finishing the concurrent sweep, and the nextAllocableBlockHead is already set properly.
+        if (this->nextAllocableBlockHead != nullptr && !heapBlockInSweepableList)
+#endif
+        {
+            this->nextAllocableBlockHead = heapBlock->GetNextBlock();
+        }
 
         allocator->Set(heapBlock);
     }
@@ -433,7 +591,11 @@
     {
 #if ENABLE_CONCURRENT_GC
         // wait for background sweeping finish if there are too many pages allocated during background sweeping
+#if ENABLE_PARTIAL_GC
         if (recycler->IsConcurrentSweepExecutingState() && this->heapInfo->uncollectedNewPageCount > (uint)CONFIG_FLAG(NewPagesCapDuringBGSweeping))
+#else
+        if (recycler->IsConcurrentSweepExecutingState())
+#endif
         {
             recycler->FinishConcurrent<ForceFinishCollection>();
             memBlock = this->TryAlloc(recycler, allocator, sizeCat, attributes);
@@ -580,6 +742,17 @@
             heapBlock->MarkImplicitRoots();
             Assert(!heapBlock->HasFreeObject());
         });
+
+#if ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP && SUPPORT_WIN32_SLIST && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP_USE_SLIST
+        if (CONFIG_FLAG_RELEASE(EnableConcurrentSweepAlloc))
+        {
+            HeapBlockList::ForEach(sweepableHeapBlockList, [flags](TBlockType * heapBlock)
+            {
+                heapBlock->MarkImplicitRoots();
+            });
+        }
+#endif
+
         HeapBlockList::ForEach(heapBlockList, [flags](TBlockType * heapBlock)
         {
             heapBlock->MarkImplicitRoots();
@@ -589,6 +762,9 @@
 #if DBG
     if ((flags & ResetMarkFlags_Background) == 0)
     {
+        // When allocations are enabled for buckets during oncurrent sweep we don't keep track of the nextAllocableBlockHead as it directly
+        // comes out of the SLIST. As a result, the below validations can't be performed reliably on a heap block.
+#if !(ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP)
         // Verify that if you are in the heapBlockList, before the nextAllocableBlockHead, we have fully allocated from
         // the block already, except if we have cleared from the allocator, or it is still in the allocator
         HeapBlockList::ForEach(heapBlockList, nextAllocableBlockHead, [](TBlockType * heapBlock)
@@ -603,6 +779,7 @@
         {
             Assert(heapBlock->HasFreeObject());
         });
+#endif
     }
 #endif
 }
@@ -616,6 +793,16 @@
         heapBlock->ScanNewImplicitRoots(recycler);
     });
 
+#if ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP && SUPPORT_WIN32_SLIST && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP_USE_SLIST
+    if (CONFIG_FLAG_RELEASE(EnableConcurrentSweepAlloc))
+    {
+        HeapBlockList::ForEach(sweepableHeapBlockList, [recycler](TBlockType * heapBlock)
+        {
+            heapBlock->ScanNewImplicitRoots(recycler);
+        });
+    }
+#endif
+
     HeapBlockList::ForEach(heapBlockList, [recycler](TBlockType * heapBlock)
     {
         heapBlock->ScanNewImplicitRoots(recycler);
@@ -654,9 +841,13 @@
     }
     if (heapBlock->IsClearedFromAllocator())
     {
+        // As the blocks are added to a stack and used from there during concurrent sweep, the exepectFull assertion doesn't hold anymore. 
+        // We could do some work to make this work again but there may be perf hit and it may be fragile.
+#if !(ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP)
         Assert(*expectFull && !*expectDispose);
         Assert(heapBlock->HasFreeObject());
         Assert(!heapBlock->HasAnyDisposeObjects());
+#endif
     }
     else if (*expectDispose)
     {
@@ -672,7 +863,10 @@
         // blocks before nextAllocableBlockHead that are not being bump allocated from must be considered "full".
         // However, the exception is if this is the only heap block in this bucket, in which case nextAllocableBlockHead
         // would be null
+#if !(ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP)
+        // As the blocks are added to the SLIST and used from there during concurrent sweep, the exepectFull assertion doesn't hold anymore.
         Assert(*expectFull == (!heapBlock->HasFreeObject() || heapBlock->IsInAllocator()) || nextAllocableBlockHead == nullptr);
+#endif
     }
 }
 
@@ -768,7 +962,12 @@
 #else
     bool const queuePendingSweep = false;
 #endif
+
+#if ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP
+    Assert(this->IsAllocationStopped() || this->AllocationsStartedDuringConcurrentSweep());
+#else
     Assert(this->IsAllocationStopped());
+#endif
 
     HeapBlockList::ForEachEditing(heapBlockList, [=, &recyclerSweep](TBlockType * heapBlock)
     {
@@ -909,6 +1108,21 @@
     Assert(!recyclerSweep.IsBackground());
 #endif
 
+#if ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP && SUPPORT_WIN32_SLIST && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP_USE_SLIST
+    if (CONFIG_FLAG_RELEASE(EnableConcurrentSweepAlloc))
+    {
+        // Return the blocks we may have allocated from during a previous concurrent sweep back to the fullBlockList. We need to rebuild the free bit vectors for these blocks.
+        HeapBlockList::ForEachEditing(this->sweepableHeapBlockList, [this](TBlockType * heapBlock)
+        {
+            heapBlock->BuildFreeBitVector();
+            heapBlock->SetNextBlock(this->fullBlockList);
+            this->fullBlockList = heapBlock;
+        });
+
+        this->sweepableHeapBlockList = nullptr;
+    }
+#endif
+
 #if DBG
     if (TBlockType::HeapBlockAttributes::IsSmallBlock)
     {
@@ -929,6 +1143,7 @@
     TBlockType * currentHeapBlockList = heapBlockList;
     this->heapBlockList = nullptr;
     this->fullBlockList = nullptr;
+
     this->SweepHeapBlockList(recyclerSweep, currentHeapBlockList, true);
 
 #if DBG
@@ -953,11 +1168,39 @@
 }
 
 template <typename TBlockType>
+bool
+HeapBucketT<TBlockType>::AllowAllocationsDuringConcurrentSweep()
+{
+#if ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP
+    if (!CONFIG_FLAG_RELEASE(EnableConcurrentSweepAlloc))
+    {
+        return false;
+    }
+
+    Recycler * recycler = this->GetRecycler();
+#if ENABLE_PARTIAL_GC
+    bool isPartialGC = (recycler->recyclerSweep != nullptr) && recycler->recyclerSweep->InPartialCollect();
+#else
+    bool isPartialGC = false;
+#endif
+
+    // Allocations are allowed during concurrent sweep for small non-finalizable buckets while not doing a Partial GC.
+    return (recycler->IsConcurrentSweepSetupState() || recycler->InConcurrentSweep()) && !this->IsAnyFinalizableBucket() && !isPartialGC;
+#else
+    return false;
+#endif
+}
+
+template <typename TBlockType>
 void
 HeapBucketT<TBlockType>::StopAllocationBeforeSweep()
 {
+#if ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP
+    this->allocationsStartedDuringConcurrentSweep = false;
+#endif
+
     Assert(!this->IsAllocationStopped());
-    DebugOnly(this->isAllocationStopped = true);
+    this->isAllocationStopped = true;
     this->nextAllocableBlockHead = nullptr;
 }
 
@@ -966,12 +1209,45 @@
 HeapBucketT<TBlockType>::StartAllocationAfterSweep()
 {
     Assert(this->IsAllocationStopped());
-    DebugOnly(this->isAllocationStopped = false);
+    this->isAllocationStopped = false;
     this->nextAllocableBlockHead = this->heapBlockList;
 }
 
+#if ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP
+template <typename TBlockType>
+void
+HeapBucketT<TBlockType>::StartAllocationDuringConcurrentSweep()
+{
+    Assert(this->IsAllocationStopped());
+    this->isAllocationStopped = false;
+    Assert(!this->allocationsStartedDuringConcurrentSweep);
+    this->allocationsStartedDuringConcurrentSweep = true;
 
-#if DBG
+#if SUPPORT_WIN32_SLIST && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP_USE_SLIST
+    // When allocations are allowed during concurrent sweep we set nextAllocableBlockHead to NULL as the allocator will pick heap blocks from the
+    // interlocked SLIST. During that time, the heap block at the top of the SLIST is always the nextAllocableBlockHead.
+    this->nextAllocableBlockHead = nullptr;
+#endif
+}
+
+template <typename TBlockType>
+void
+HeapBucketT<TBlockType>::ResumeNormalAllocationAfterConcurrentSweep(TBlockType * newNextAllocableBlockHead)
+{
+    this->allocationsStartedDuringConcurrentSweep = false;
+    this->isAllocationStopped = false;
+    // If the newNextAllocableBlockHead is NULL at this point that means we have exhausted usable blocks and will have to allocate a new block the next time.
+    this->nextAllocableBlockHead = newNextAllocableBlockHead;
+}
+
+template <typename TBlockType>
+bool
+HeapBucketT<TBlockType>::AllocationsStartedDuringConcurrentSweep() const
+{
+    return this->allocationsStartedDuringConcurrentSweep;
+}
+#endif
+
 template <typename TBlockType>
 bool
 HeapBucketT<TBlockType>::IsAllocationStopped() const
@@ -983,7 +1259,6 @@
     }
     return false;
 }
-#endif
 
 template <typename TBlockType>
 uint
@@ -1038,6 +1313,34 @@
 }
 #endif
 
+#if ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP
+template <typename TBlockType>
+void
+HeapBucketT<TBlockType>::FinishConcurrentSweep()
+{
+#if SUPPORT_WIN32_SLIST && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP_USE_SLIST
+    Assert(this->allocableHeapBlockListHead != nullptr);
+
+    TBlockType * newNextAllocableBlockHead = nullptr;
+    // Put the blocks from the allocable SLIST into the heapBlockList.
+    TBlockType * heapBlock = PopHeapBlockFromSList(this->allocableHeapBlockListHead);
+    while (heapBlock != nullptr)
+    {
+        newNextAllocableBlockHead = heapBlock;
+        heapBlock->SetNextBlock(this->heapBlockList);
+        this->heapBlockList = heapBlock;
+        heapBlock = PopHeapBlockFromSList(this->allocableHeapBlockListHead);
+    }
+
+    Assert(QueryDepthInterlockedSList(this->allocableHeapBlockListHead) == 0);
+
+    this->ResumeNormalAllocationAfterConcurrentSweep(newNextAllocableBlockHead);
+#endif
+
+    Assert(!this->IsAllocationStopped());
+}
+#endif
+
 template <typename TBlockType>
 void
 HeapBucketT<TBlockType>::AppendAllocableHeapBlockList(TBlockType * list)
@@ -1072,6 +1375,12 @@
 {
     UpdateAllocators();
     HeapBucket::EnumerateObjects(fullBlockList, infoBits, CallBackFunction);
+#if ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP && SUPPORT_WIN32_SLIST && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP_USE_SLIST
+    if (CONFIG_FLAG_RELEASE(EnableConcurrentSweepAlloc))
+    {
+        HeapBucket::EnumerateObjects(sweepableHeapBlockList, infoBits, CallBackFunction);
+    }
+#endif
     HeapBucket::EnumerateObjects(heapBlockList, infoBits, CallBackFunction);
 }
 
@@ -1095,6 +1404,17 @@
     Assert(this->GetRecycler()->recyclerSweep == nullptr);
     UpdateAllocators();
     size_t smallHeapBlockCount = HeapInfo::Check(true, false, this->fullBlockList);
+#if ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP && SUPPORT_WIN32_SLIST && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP_USE_SLIST
+    if (CONFIG_FLAG_RELEASE(EnableConcurrentSweepAlloc))
+    {
+        // This lock is needed only in the debug mode while we verify block counts. Not needed otherwise, as this list is never accessed concurrently.
+        // Items are added to it by the allocator when allocations are allowed during concurrent sweep. The list is drained during the next sweep while
+        // allocation are stopped.
+        debugSweepableHeapBlockListLock.Enter();
+        smallHeapBlockCount += HeapInfo::Check(true, false, this->sweepableHeapBlockList);
+        debugSweepableHeapBlockListLock.Leave();
+    }
+#endif
     smallHeapBlockCount += HeapInfo::Check(true, false, this->heapBlockList, this->nextAllocableBlockHead);
     smallHeapBlockCount += HeapInfo::Check(false, false, this->nextAllocableBlockHead);
     Assert(!checkCount || this->heapBlockCount == smallHeapBlockCount);
@@ -1126,6 +1446,12 @@
 
     HeapBlockList::ForEach(emptyBlockList, blockStatsAggregator);
     HeapBlockList::ForEach(fullBlockList, blockStatsAggregator);
+#if ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP && SUPPORT_WIN32_SLIST && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP_USE_SLIST
+    if (CONFIG_FLAG_RELEASE(EnableConcurrentSweepAlloc))
+    {
+        HeapBlockList::ForEach(sweepableHeapBlockList, blockStatsAggregator);
+    }
+#endif
     HeapBlockList::ForEach(heapBlockList, blockStatsAggregator);
 }
 #endif
@@ -1159,6 +1485,32 @@
         heapBlock->Verify();
     });
 
+#if ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP && SUPPORT_WIN32_SLIST && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP_USE_SLIST
+    if (CONFIG_FLAG_RELEASE(EnableConcurrentSweepAlloc))
+    {
+#if DBG
+        if (TBlockType::HeapBlockAttributes::IsSmallBlock)
+        {
+            recyclerVerifyListConsistencyData.smallBlockVerifyListConsistencyData.SetupVerifyListConsistencyData((SmallHeapBlock*) nullptr, true, false);
+        }
+        else if (TBlockType::HeapBlockAttributes::IsMediumBlock)
+        {
+            recyclerVerifyListConsistencyData.mediumBlockVerifyListConsistencyData.SetupVerifyListConsistencyData((MediumHeapBlock*) nullptr, true, false);
+        }
+        else
+        {
+            Assert(false);
+        }
+#endif
+
+        HeapBlockList::ForEach(sweepableHeapBlockList, [DebugOnly(&recyclerVerifyListConsistencyData)](TBlockType * heapBlock)
+        {
+            DebugOnly(VerifyBlockConsistencyInList(heapBlock, recyclerVerifyListConsistencyData));
+            heapBlock->Verify();
+        });
+    }
+#endif
+
 #if DBG
     if (TBlockType::HeapBlockAttributes::IsSmallBlock)
     {
@@ -1208,6 +1560,16 @@
         heapBlock->VerifyMark();
     });
 
+#if ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP && SUPPORT_WIN32_SLIST && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP_USE_SLIST
+    if (CONFIG_FLAG_RELEASE(EnableConcurrentSweepAlloc))
+    {
+        HeapBlockList::ForEach(this->sweepableHeapBlockList, [](TBlockType * heapBlock)
+        {
+            heapBlock->VerifyMark();
+        });
+    }
+#endif
+
     HeapBlockList::ForEach(this->heapBlockList, [](TBlockType * heapBlock)
     {
         heapBlock->VerifyMark();
@@ -1383,10 +1745,12 @@
     // Leaf heap bucket are always reused for allocation and can be done on the concurrent thread
     // WriteBarrier-TODO: Do the same for write barrier buckets
     heapBucket.SweepPartialReusePages(recyclerSweep);
+
 #ifdef RECYCLER_WRITE_BARRIER
     smallNormalWithBarrierHeapBucket.SweepPartialReusePages(recyclerSweep);
     smallFinalizableWithBarrierHeapBucket.SweepPartialReusePages(recyclerSweep);
 #endif
+
     finalizableHeapBucket.SweepPartialReusePages(recyclerSweep);
 }
 
@@ -1511,6 +1875,42 @@
 }
 #endif
 
+#if ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP
+template <class TBlockAttributes>
+void
+HeapBucketGroup<TBlockAttributes>::StartAllocationDuringConcurrentSweep()
+{
+    // If there were no allocable heap blocks we would not have started alllocations. Stop allocations, only if we started allocations for each of these buckets.
+    if (heapBucket.IsAllocationStopped())
+    {
+        heapBucket.StartAllocationDuringConcurrentSweep();
+    }
+
+    if (leafHeapBucket.IsAllocationStopped())
+    {
+        leafHeapBucket.StartAllocationDuringConcurrentSweep();
+    }
+#ifdef RECYCLER_WRITE_BARRIER
+    if (smallNormalWithBarrierHeapBucket.IsAllocationStopped())
+    {
+        smallNormalWithBarrierHeapBucket.StartAllocationDuringConcurrentSweep();
+    }
+#endif
+}
+
+template <class TBlockAttributes>
+void
+HeapBucketGroup<TBlockAttributes>::FinishConcurrentSweep()
+{
+    heapBucket.FinishConcurrentSweep();
+    leafHeapBucket.FinishConcurrentSweep();
+
+#ifdef RECYCLER_WRITE_BARRIER
+    smallNormalWithBarrierHeapBucket.FinishConcurrentSweep();
+#endif
+}
+#endif
+
 #if DBG
 template <class TBlockAttributes>
 bool
diff --git a/lib/Common/Memory/HeapBucket.h b/lib/Common/Memory/HeapBucket.h
index 8252ca3..a422b20 100644
--- a/lib/Common/Memory/HeapBucket.h
+++ b/lib/Common/Memory/HeapBucket.h
@@ -149,6 +149,15 @@
     friend class ::ScriptMemoryDumper;
 #endif
 
+    static bool IsAnyFinalizableBucket()
+    {
+        return IsFinalizableBucket
+#ifdef RECYCLER_WRITE_BARRIER
+            || IsFinalizableWriteBarrierBucket
+#endif
+            ;
+    }
+
     TBlockAllocatorType * GetAllocator() { return &allocatorHead;}
 
     static unsigned int GetAllocatorHeadOffset() { return offsetof(HeapBucketT<TBlockType>, allocatorHead); }
@@ -164,9 +173,18 @@
 
     void Initialize(HeapInfo * heapInfo, DECLSPEC_GUARD_OVERFLOW uint sizeCat);
     void AppendAllocableHeapBlockList(TBlockType * list);
+#if ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP
+    void FinishConcurrentSweep();
+#endif
     void DeleteHeapBlockList(TBlockType * list);
     static void DeleteEmptyHeapBlockList(TBlockType * list);
     static void DeleteHeapBlockList(TBlockType * list, Recycler * recycler);
+#if ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP && SUPPORT_WIN32_SLIST && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP_USE_SLIST
+    static bool PushHeapBlockToSList(PSLIST_HEADER list, TBlockType * heapBlock);
+    static TBlockType * PopHeapBlockFromSList(PSLIST_HEADER list);
+    static ushort QueryDepthInterlockedSList(PSLIST_HEADER list);
+    static void FlushInterlockedSList(PSLIST_HEADER list);
+#endif
 
     // Small allocators
     void UpdateAllocators();
@@ -189,11 +207,17 @@
     template <typename Fn>
     void SweepBucket(RecyclerSweep& recyclerSweep, Fn sweepFn);
 
+#if ENABLE_CONCURRENT_GC  && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP
+    void StartAllocationDuringConcurrentSweep();
+    bool AllocationsStartedDuringConcurrentSweep() const;
+    void ResumeNormalAllocationAfterConcurrentSweep(TBlockType * newNextAllocableBlockHead = nullptr);
+#endif
+
+    bool AllowAllocationsDuringConcurrentSweep();
     void StopAllocationBeforeSweep();
     void StartAllocationAfterSweep();
-#if DBG
     bool IsAllocationStopped() const;
-#endif
+
     void SweepHeapBlockList(RecyclerSweep& recyclerSweep, TBlockType * heapBlockList, bool allocable);
 #if ENABLE_PARTIAL_GC
     bool DoQueuePendingSweep(Recycler * recycler);
@@ -232,15 +256,29 @@
     TBlockType * fullBlockList;      // list of blocks that are fully allocated
     TBlockType * heapBlockList;      // list of blocks that has free objects
 
+#if ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP
+#if SUPPORT_WIN32_SLIST && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP_USE_SLIST
+    PSLIST_HEADER allocableHeapBlockListHead;
+#if DBG || defined(RECYCLER_SLOW_CHECK_ENABLED)
+    // This lock is needed only in the debug mode while we verify block counts. Not needed otherwise, as this list is never accessed concurrently.
+    // Items are added to it by the allocator when allocations are allowed during concurrent sweep. The list is drained during the next sweep while
+    // allocation are stopped.
+    mutable CriticalSection debugSweepableHeapBlockListLock;
+#endif
+    // This is the list of blocks that we allocated from during concurrent sweep. These blocks will eventually get processed during the next sweep and either go into
+    // the heapBlockList or fullBlockList.
+    TBlockType * sweepableHeapBlockList;
+#endif
+    bool allocationsStartedDuringConcurrentSweep;
+#endif
+
     FreeObject* explicitFreeList; // List of objects that have been explicitly freed
     TBlockAllocatorType * lastExplicitFreeListAllocator;
 #ifdef RECYCLER_PAGE_HEAP
     SmallHeapBlock* explicitFreeLockBlockList; // List of heap blocks which have been locked upon explicit free
 #endif
 
-#if DBG
-    bool isAllocationStopped;                 // whether the bucket is the middle of sweeping, not including partial sweeping
-#endif
+    bool isAllocationStopped;                 // whether the bucket has it's allocations stopped
 
     template <class TBlockAttributes>
     friend class HeapBucketGroup;
@@ -282,7 +320,6 @@
         // We should only queue up pending sweep if we are doing partial collect
         Assert(recyclerSweep.GetPendingSweepBlockList(this) == nullptr);
 #endif
-
         // Every thing is swept immediately in non partial collect, so we can allocate
         // from the heap block list now
         StartAllocationAfterSweep();
diff --git a/lib/Common/Memory/HeapInfo.cpp b/lib/Common/Memory/HeapInfo.cpp
index 15411ed..a7238a5 100644
--- a/lib/Common/Memory/HeapInfo.cpp
+++ b/lib/Common/Memory/HeapInfo.cpp
@@ -1171,6 +1171,39 @@
 }
 #endif
 
+#if ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP
+void HeapInfo::StartAllocationsDuringConcurrentSweep()
+{
+    for (uint i = 0; i < HeapConstants::BucketCount; i++)
+    {
+        heapBuckets[i].StartAllocationDuringConcurrentSweep();
+    }
+
+#if defined(BUCKETIZE_MEDIUM_ALLOCATIONS) && SMALLBLOCK_MEDIUM_ALLOC
+    for (uint i = 0; i < HeapConstants::MediumBucketCount; i++)
+    {
+        mediumHeapBuckets[i].StartAllocationDuringConcurrentSweep();
+    }
+#endif
+}
+
+void
+HeapInfo::FinishConcurrentSweep()
+{
+    for (uint i = 0; i < HeapConstants::BucketCount; i++)
+    {
+        heapBuckets[i].FinishConcurrentSweep();
+    }
+
+#if defined(BUCKETIZE_MEDIUM_ALLOCATIONS) && SMALLBLOCK_MEDIUM_ALLOC
+    for (uint i = 0; i < HeapConstants::MediumBucketCount; i++)
+    {
+        mediumHeapBuckets[i].FinishConcurrentSweep();
+    }
+#endif
+}
+#endif
+
 #if ENABLE_CONCURRENT_GC
 void
 HeapInfo::TransferPendingHeapBlocks(RecyclerSweep& recyclerSweep)
diff --git a/lib/Common/Memory/HeapInfo.h b/lib/Common/Memory/HeapInfo.h
index 06881fb..7f3cef2 100644
--- a/lib/Common/Memory/HeapInfo.h
+++ b/lib/Common/Memory/HeapInfo.h
@@ -87,6 +87,10 @@
 #endif
 #if ENABLE_CONCURRENT_GC
     void PrepareSweep();
+#if ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP
+    void StartAllocationsDuringConcurrentSweep();
+    void FinishConcurrentSweep();
+#endif
 
     void TransferPendingHeapBlocks(RecyclerSweep& recyclerSweep);
     void ConcurrentTransferSweptObjects(RecyclerSweep& recyclerSweep);
diff --git a/lib/Common/Memory/IdleDecommitPageAllocator.cpp b/lib/Common/Memory/IdleDecommitPageAllocator.cpp
index d3f32d2..0c0dc7b 100644
--- a/lib/Common/Memory/IdleDecommitPageAllocator.cpp
+++ b/lib/Common/Memory/IdleDecommitPageAllocator.cpp
@@ -5,9 +5,7 @@
 #include "CommonMemoryPch.h"
 
 IdleDecommitPageAllocator::IdleDecommitPageAllocator(AllocationPolicyManager * policyManager, PageAllocatorType type,
-#ifndef JD_PRIVATE
     Js::ConfigFlagsTable& flagTable,
-#endif
     uint maxFreePageCount, uint maxIdleFreePageCount,
     bool zeroPages,
 #if ENABLE_BACKGROUND_PAGE_FREEING 
@@ -19,11 +17,7 @@
     hasDecommitTimer(false),
     hadDecommitTimer(false),
 #endif
-    PageAllocator(policyManager,
-#ifndef JD_PRIVATE
-        flagTable,
-#endif
-    type, maxFreePageCount, zeroPages,
+    PageAllocator(policyManager, flagTable, type, maxFreePageCount, zeroPages,
 #if ENABLE_BACKGROUND_PAGE_FREEING
     backgroundPageQueue,
 #endif        
diff --git a/lib/Common/Memory/IdleDecommitPageAllocator.h b/lib/Common/Memory/IdleDecommitPageAllocator.h
index 92b79d2..7e61709 100644
--- a/lib/Common/Memory/IdleDecommitPageAllocator.h
+++ b/lib/Common/Memory/IdleDecommitPageAllocator.h
@@ -15,9 +15,7 @@
 {
 public:
     IdleDecommitPageAllocator(AllocationPolicyManager * policyManager, PageAllocatorType type,
-#ifndef JD_PRIVATE
         Js::ConfigFlagsTable& flagTable,
-#endif
         uint maxFreePageCount = 0,
         uint maxIdleFreePageCount = DefaultMaxFreePageCount,
         bool zeroPages = false,
diff --git a/lib/Common/Memory/PageAllocator.cpp b/lib/Common/Memory/PageAllocator.cpp
index 77c4266..5ccc4da 100644
--- a/lib/Common/Memory/PageAllocator.cpp
+++ b/lib/Common/Memory/PageAllocator.cpp
@@ -138,8 +138,12 @@
 #endif
         if (committed)
         {
-            GetAllocator()->GetVirtualAllocator()->Free(address, leadingGuardPageCount*AutoSystemInfo::PageSize, MEM_DECOMMIT);
-            GetAllocator()->GetVirtualAllocator()->Free(address + ((leadingGuardPageCount + this->segmentPageCount)*AutoSystemInfo::PageSize), trailingGuardPageCount*AutoSystemInfo::PageSize, MEM_DECOMMIT);
+            GetAllocator()->GetVirtualAllocator()->Free(address,
+              leadingGuardPageCount * AutoSystemInfo::PageSize, MEM_DECOMMIT);
+
+            GetAllocator()->GetVirtualAllocator()->Free(address +
+              ((leadingGuardPageCount + this->segmentPageCount) * AutoSystemInfo::PageSize),
+              trailingGuardPageCount * AutoSystemInfo::PageSize, MEM_DECOMMIT);
         }
         this->GetAllocator()->ReportFree((leadingGuardPageCount + trailingGuardPageCount) * AutoSystemInfo::PageSize);
 
@@ -148,7 +152,8 @@
 
     if (!GetAllocator()->CreateSecondaryAllocator(this, committed, &this->secondaryAllocator))
     {
-        GetAllocator()->GetVirtualAllocator()->Free(originalAddress, GetPageCount() * AutoSystemInfo::PageSize, MEM_RELEASE);
+        GetAllocator()->GetVirtualAllocator()->Free(originalAddress,
+          GetPageCount() * AutoSystemInfo::PageSize, MEM_RELEASE);
         this->GetAllocator()->ReportFailure(GetPageCount() * AutoSystemInfo::PageSize);
         this->address = nullptr;
         return false;
@@ -163,7 +168,8 @@
         if (this->isWriteBarrierEnabled)
         {
             // only commit card table for write barrier pages for strict check
-            // we can do this in free build if all write barrier annotated struct only allocate with write barrier pages
+            // we can do this in free build if all write barrier annotated struct
+            // only allocate with write barrier pages
             registerBarrierResult = RecyclerWriteBarrierManager::OnSegmentAlloc(this->address, this->segmentPageCount);
         }
     }
@@ -175,7 +181,8 @@
 
     if (!registerBarrierResult)
     {
-        GetAllocator()->GetVirtualAllocator()->Free(originalAddress, GetPageCount() * AutoSystemInfo::PageSize, MEM_RELEASE);
+        GetAllocator()->GetVirtualAllocator()->Free(originalAddress,
+          GetPageCount() * AutoSystemInfo::PageSize, MEM_RELEASE);
         this->GetAllocator()->ReportFailure(GetPageCount() * AutoSystemInfo::PageSize);
         this->address = nullptr;
         return false;
@@ -187,7 +194,8 @@
 
     if (this->isWriteBarrierEnabled)
     {
-        RecyclerWriteBarrierManager::ToggleBarrier(this->address, this->segmentPageCount * AutoSystemInfo::PageSize, true);
+        RecyclerWriteBarrierManager::ToggleBarrier(this->address,
+          this->segmentPageCount * AutoSystemInfo::PageSize, true);
     }
 #endif
 #endif
@@ -537,7 +545,8 @@
 {
     Assert(address >= this->address);
     Assert(pageCount <= this->GetAllocator()->maxAllocPageCount);
-    Assert(((uint)(((char *)address) - this->address)) <= (this->GetAllocator()->maxAllocPageCount - pageCount) * AutoSystemInfo::PageSize);
+    Assert(((uint)(((char *)address) - this->address))
+      <= (this->GetAllocator()->maxAllocPageCount - pageCount) * AutoSystemInfo::PageSize);
 
     Assert(!IsFreeOrDecommitted(address, pageCount));
     uint base = this->GetBitRangeBase(address);
@@ -548,36 +557,58 @@
     if (!onlyUpdateState)
     {
 #pragma warning(suppress: 6250)
-        this->GetAllocator()->GetVirtualAllocator()->Free(address, pageCount * AutoSystemInfo::PageSize, MEM_DECOMMIT);
+        this->GetAllocator()->GetVirtualAllocator()->Free(address,
+          pageCount * AutoSystemInfo::PageSize, MEM_DECOMMIT);
     }
 
     Assert(decommitPageCount == (uint)this->GetCountOfDecommitPages());
 }
 
 template<typename T>
+void
+PageSegmentBase<T>::DecommitFreePagesInternal(uint index, uint pageCount)
+{
+    Assert(pageCount > 0 && (index + pageCount) <= this->GetAvailablePageCount());
+    this->ClearRangeInFreePagesBitVector(index, pageCount);
+    this->SetRangeInDecommitPagesBitVector(index, pageCount);
+
+    char * currentAddress = this->address + (index * AutoSystemInfo::PageSize);
+#pragma warning(suppress: 6250)
+    this->GetAllocator()->GetVirtualAllocator()->Free(currentAddress,
+      pageCount * AutoSystemInfo::PageSize, MEM_DECOMMIT);
+}
+
+template<typename T>
 size_t
 PageSegmentBase<T>::DecommitFreePages(size_t pageToDecommit)
 {
-    Assert(pageToDecommit != 0);
-    char * currentAddress = this->address;
+    Assert(pageToDecommit != 0 && this->GetAvailablePageCount() > 0);
 
-    uint decommitCount = 0;
-    for (uint i = 0; i < this->GetAvailablePageCount(); i++)
+    uint startIndex = 0, index = 0, decommitCount = 0;
+    do
     {
-        if (this->TestInFreePagesBitVector(i))
+        if (!this->TestInFreePagesBitVector(index))
         {
-            this->ClearBitInFreePagesBitVector(i);
-            this->SetBitInDecommitPagesBitVector(i);
-#pragma warning(suppress: 6250)
-            this->GetAllocator()->GetVirtualAllocator()->Free(currentAddress, AutoSystemInfo::PageSize, MEM_DECOMMIT);
+            if (startIndex < index)
+            {
+                uint pageCount = index - startIndex;
+                this->DecommitFreePagesInternal(startIndex, pageCount);
+            }
+            startIndex = index + 1;
+        }
+        else
+        {
             decommitCount++;
         }
-        currentAddress += AutoSystemInfo::PageSize;
-        if (decommitCount == pageToDecommit)
-        {
-            break;
-        }
     }
+    while (++index < this->GetAvailablePageCount() && decommitCount < pageToDecommit);
+
+    if (startIndex < index)
+    {
+        uint pageCount = index - startIndex;
+        this->DecommitFreePagesInternal(startIndex, pageCount);
+    }
+
     Assert(decommitCount <= this->freePageCount);
     this->decommitPageCount += decommitCount;
     this->freePageCount -= decommitCount;
@@ -627,9 +658,7 @@
 
 template<typename TVirtualAlloc, typename TSegment, typename TPageSegment>
 PageAllocatorBase<TVirtualAlloc, TSegment, TPageSegment>::PageAllocatorBase(AllocationPolicyManager * policyManager,
-#ifndef JD_PRIVATE
     Js::ConfigFlagsTable& flagTable,
-#endif
     PageAllocatorType type,
     uint maxFreePageCount, bool zeroPages,
 #if ENABLE_BACKGROUND_PAGE_FREEING
@@ -638,9 +667,7 @@
     uint maxAllocPageCount, uint secondaryAllocPageCount,
     bool stopAllocationOnOutOfMemory, bool excludeGuardPages, HANDLE processHandle, bool enableWriteBarrier) :
     policyManager(policyManager),
-#ifndef JD_PRIVATE
     pageAllocatorFlagTable(flagTable),
-#endif
     maxFreePageCount(maxFreePageCount),
     freePageCount(0),
     allocFlags(0),
diff --git a/lib/Common/Memory/PageAllocator.h b/lib/Common/Memory/PageAllocator.h
index df25706..28370d0 100644
--- a/lib/Common/Memory/PageAllocator.h
+++ b/lib/Common/Memory/PageAllocator.h
@@ -17,7 +17,7 @@
 {
 typedef void* FunctionTableHandle;
 
-#if DBG_DUMP && !defined(JD_PRIVATE)
+#if DBG_DUMP
 
 #define GUARD_PAGE_TRACE(...) \
     if (Js::Configuration::Global.flags.PrintGuardPageBounds) \
@@ -345,6 +345,8 @@
 
 //---------- Private members ---------------/
 private:
+    void DecommitFreePagesInternal(uint index, uint pageCount);
+
     uint GetBitRangeBase(void* address) const
     {
         uint base = ((uint)(((char *)address) - this->address)) / AutoSystemInfo::PageSize;
@@ -626,9 +628,7 @@
 #endif
 
     PageAllocatorBase(AllocationPolicyManager * policyManager,
-#ifndef JD_PRIVATE
         Js::ConfigFlagsTable& flags = Js::Configuration::Global.flags,
-#endif
         PageAllocatorType type = PageAllocatorType_Max,
         uint maxFreePageCount = DefaultMaxFreePageCount,
         bool zeroPages = false,
@@ -821,9 +821,7 @@
     bool enableWriteBarrier;
     AllocationPolicyManager * policyManager;
 
-#ifndef JD_PRIVATE
     Js::ConfigFlagsTable& pageAllocatorFlagTable;
-#endif
 
     // zero pages
     bool zeroPages;
@@ -1010,7 +1008,7 @@
 
     // Release pages that has already been decommitted
     void    ReleaseDecommitted(void * address, size_t pageCount, __in void * segment);
-    bool IsAddressFromAllocator(__in void* address);    
+    bool IsAddressFromAllocator(__in void* address);
     bool    AllocXdata() { return allocXdata; }
 
 private:
diff --git a/lib/Common/Memory/Recycler.cpp b/lib/Common/Memory/Recycler.cpp
index 168a208..37072de 100644
--- a/lib/Common/Memory/Recycler.cpp
+++ b/lib/Common/Memory/Recycler.cpp
@@ -4611,6 +4611,19 @@
     return (collectionState & (Collection_ConcurrentSweep | Collection_ExecutingConcurrent)) == (Collection_ConcurrentSweep | Collection_ExecutingConcurrent);
 }
 
+
+BOOL
+Recycler::IsConcurrentSweepSetupState() const
+{
+    return (collectionState & CollectionStateSetupConcurrentSweep) == CollectionStateSetupConcurrentSweep;
+}
+
+BOOL
+Recycler::IsConcurrentSweepState() const
+{
+    return this->collectionState == CollectionStateConcurrentSweep;
+}
+
 BOOL
 Recycler::IsConcurrentState() const
 {
@@ -4858,7 +4871,11 @@
     }
 
     this->threadService = nullptr;
-    this->concurrentThread = nullptr;
+    if (concurrentThread != NULL)
+    {
+        CloseHandle(concurrentThread);
+        this->concurrentThread = nullptr;
+    }
 }
 
 bool
@@ -4990,10 +5007,6 @@
         Assert(concurrentThread != NULL || threadService->HasCallback());
 
         FinalizeConcurrent(false);
-        if (concurrentThread)
-        {
-            CloseHandle(concurrentThread);
-        }
     }
 }
 
@@ -5005,10 +5018,6 @@
         Assert(concurrentThread != NULL || threadService->HasCallback());
 
         FinalizeConcurrent(true);
-        if (concurrentThread)
-        {
-            CloseHandle(concurrentThread);
-        }
         this->collectionState = CollectionStateNotCollecting;
     }
 }
@@ -5659,45 +5668,7 @@
     }
     else
     {
-        GCETW_INTERNAL(GC_START, (this, ETWEvent_ConcurrentTransferSwept));
-        GCETW(GC_FLUSHZEROPAGE_START, (this));
-
-        Assert(collectionState == CollectionStateTransferSweptWait);
-#ifdef RECYCLER_TRACE
-        PrintCollectTrace(Js::ConcurrentSweepPhase, true);
-#endif
-        collectionState = CollectionStateTransferSwept;
-
-#if ENABLE_BACKGROUND_PAGE_FREEING
-        if (CONFIG_FLAG(EnableBGFreeZero))
-        {
-            // We should have zeroed all the pages in the background thread
-            Assert(!recyclerPageAllocator.HasZeroQueuedPages());
-            Assert(!recyclerLargeBlockPageAllocator.HasZeroQueuedPages());
-            this->FlushBackgroundPages();
-        }
-#endif
-
-        GCETW(GC_FLUSHZEROPAGE_STOP, (this));
-        GCETW(GC_TRANSFERSWEPTOBJECTS_START, (this));
-
-        Assert(this->recyclerSweep != nullptr);
-        Assert(!this->recyclerSweep->IsBackground());
-#if ENABLE_PARTIAL_GC
-        if (this->inPartialCollectMode)
-        {
-            ConcurrentPartialTransferSweptObjects(*this->recyclerSweep);
-        }
-        else
-#endif
-        {
-            ConcurrentTransferSweptObjects(*this->recyclerSweep);
-        }
-        recyclerSweep->EndSweep();
-
-        GCETW(GC_TRANSFERSWEPTOBJECTS_STOP, (this));
-
-        GCETW_INTERNAL(GC_STOP, (this, ETWEvent_ConcurrentTransferSwept));
+        FinishTransferSwept(flags);
     }
 
     RECYCLER_PROFILE_EXEC_END2(this, concurrentPhase, Js::RecyclerPhase);
@@ -5719,6 +5690,50 @@
     return true;
 }
 
+void
+Recycler::FinishTransferSwept(CollectionFlags flags)
+{
+    GCETW_INTERNAL(GC_START, (this, ETWEvent_ConcurrentTransferSwept));
+    GCETW(GC_FLUSHZEROPAGE_START, (this));
+
+    Assert(collectionState == CollectionStateTransferSweptWait);
+#ifdef RECYCLER_TRACE
+    PrintCollectTrace(Js::ConcurrentSweepPhase, true);
+#endif
+    collectionState = CollectionStateTransferSwept;
+
+#if ENABLE_BACKGROUND_PAGE_FREEING
+    if (CONFIG_FLAG(EnableBGFreeZero))
+    {
+        // We should have zeroed all the pages in the background thread
+        Assert(!recyclerPageAllocator.HasZeroQueuedPages());
+        Assert(!recyclerLargeBlockPageAllocator.HasZeroQueuedPages());
+        this->FlushBackgroundPages();
+    }
+#endif
+
+    GCETW(GC_FLUSHZEROPAGE_STOP, (this));
+    GCETW(GC_TRANSFERSWEPTOBJECTS_START, (this));
+
+    Assert(this->recyclerSweep != nullptr);
+    Assert(!this->recyclerSweep->IsBackground());
+#if ENABLE_PARTIAL_GC
+    if (this->inPartialCollectMode)
+    {
+        ConcurrentPartialTransferSweptObjects(*this->recyclerSweep);
+    }
+    else
+#endif
+    {
+        ConcurrentTransferSweptObjects(*this->recyclerSweep);
+    }
+    recyclerSweep->EndSweep();
+
+    GCETW(GC_TRANSFERSWEPTOBJECTS_STOP, (this));
+
+    GCETW_INTERNAL(GC_STOP, (this, ETWEvent_ConcurrentTransferSwept));
+}
+
 #if !DISABLE_SEH
 int
 Recycler::ExceptFilter(LPEXCEPTION_POINTERS pEP)
@@ -5806,7 +5821,7 @@
     }
     else if (this->IsConcurrentMarkState())
     {
-        RECYCLER_PROFILE_EXEC_BACKGROUND_BEGIN(this, this->collectionState == CollectionStateConcurrentFinishMark?
+        RECYCLER_PROFILE_EXEC_BACKGROUND_BEGIN(this, this->collectionState == CollectionStateConcurrentFinishMark ?
             Js::BackgroundFinishMarkPhase : Js::ConcurrentMarkPhase);
         GCETW_INTERNAL(GC_START, (this, BackgroundMarkETWEventGCActivationKind(this->collectionState)));
         DebugOnly(this->markContext.GetPageAllocator()->SetConcurrentThreadId(::GetCurrentThreadId()));
@@ -5841,7 +5856,7 @@
             break;
         };
         GCETW_INTERNAL(GC_STOP, (this, BackgroundMarkETWEventGCActivationKind(this->collectionState)));
-        RECYCLER_PROFILE_EXEC_BACKGROUND_END(this, this->collectionState == CollectionStateConcurrentFinishMark?
+        RECYCLER_PROFILE_EXEC_BACKGROUND_END(this, this->collectionState == CollectionStateConcurrentFinishMark ?
             Js::BackgroundFinishMarkPhase : Js::ConcurrentMarkPhase);
 
         this->collectionState = CollectionStateRescanWait;
@@ -5849,13 +5864,13 @@
     }
     else
     {
+        Assert(this->enableConcurrentSweep);
+        Assert(this->collectionState == CollectionStateConcurrentSweep);
+
         RECYCLER_PROFILE_EXEC_BACKGROUND_BEGIN(this, Js::ConcurrentSweepPhase);
         GCETW_INTERNAL(GC_START, (this, ETWEvent_ConcurrentSweep));
         GCETW(GC_BACKGROUNDZEROPAGE_START, (this));
 
-        Assert(this->enableConcurrentSweep);
-        Assert(this->collectionState == CollectionStateConcurrentSweep);
-
 #if ENABLE_BACKGROUND_PAGE_ZEROING
         if (CONFIG_FLAG(EnableBGFreeZero))
         {
@@ -5873,6 +5888,7 @@
 
         Assert(this->recyclerSweep != nullptr);
         this->recyclerSweep->BackgroundSweep();
+
         uint sweptBytes = 0;
 #ifdef RECYCLER_STATS
         sweptBytes = (uint)collectionStats.objectSweptBytes;
@@ -5895,9 +5911,9 @@
         }
 #endif
         GCETW_INTERNAL(GC_STOP, (this, ETWEvent_ConcurrentSweep));
-
         Assert(this->collectionState == CollectionStateConcurrentSweep);
         this->collectionState = CollectionStateTransferSweptWait;
+
         RECYCLER_PROFILE_EXEC_BACKGROUND_END(this, Js::ConcurrentSweepPhase);
     }
 
@@ -6041,6 +6057,16 @@
 
 #endif //ENABLE_CONCURRENT_GC
 
+#if ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP
+void
+Recycler::FinishConcurrentSweep()
+{
+#if SUPPORT_WIN32_SLIST && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP_USE_SLIST
+    this->autoHeap.FinishConcurrentSweep();
+#endif
+}
+#endif
+
 void
 Recycler::FinishCollection(bool needConcurrentSweep)
 {
diff --git a/lib/Common/Memory/Recycler.h b/lib/Common/Memory/Recycler.h
index 74bd0b8..71bb9e6 100644
--- a/lib/Common/Memory/Recycler.h
+++ b/lib/Common/Memory/Recycler.h
@@ -1573,6 +1573,10 @@
     void SweepHeap(bool concurrent, RecyclerSweep& recyclerSweep);
     void FinishSweep(RecyclerSweep& recyclerSweep);
 
+#if ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP
+    void FinishConcurrentSweep();
+#endif
+
     bool FinishDisposeObjects();
     template <CollectionFlags flags>
     bool FinishDisposeObjectsWrapped();
@@ -1626,6 +1630,8 @@
     BOOL IsConcurrentFindRootState() const;
     BOOL IsConcurrentExecutingState() const;
     BOOL IsConcurrentSweepExecutingState() const;
+    BOOL IsConcurrentSweepSetupState() const;
+    BOOL IsConcurrentSweepState() const;
     BOOL IsConcurrentState() const;
     BOOL InConcurrentSweep()
     {
@@ -1659,6 +1665,7 @@
     BOOL WaitForConcurrentThread(DWORD waitTime);
     void FlushBackgroundPages();
     BOOL FinishConcurrentCollect(CollectionFlags flags);
+    void FinishTransferSwept(CollectionFlags flags);
     BOOL FinishConcurrentCollectWrapped(CollectionFlags flags);
     void BackgroundMark();
     void BackgroundResetMarks();
diff --git a/lib/Common/Memory/Recycler.inl b/lib/Common/Memory/Recycler.inl
index 930e72f..b457a35 100644
--- a/lib/Common/Memory/Recycler.inl
+++ b/lib/Common/Memory/Recycler.inl
@@ -402,11 +402,7 @@
     }
 #endif
 
-    char* addr = LargeAlloc<nothrow>(heap, size, attributes);
-#ifdef RECYCLER_PAGE_HEAP
-    this->VerifyPageHeapFillAfterAlloc(addr, size, attributes);
-#endif
-    return addr;
+    return LargeAlloc<nothrow>(heap, size, attributes);
 }
 
 template<typename T>
diff --git a/lib/Common/Memory/RecyclerPageAllocator.cpp b/lib/Common/Memory/RecyclerPageAllocator.cpp
index 1ebabd8..2be6621 100644
--- a/lib/Common/Memory/RecyclerPageAllocator.cpp
+++ b/lib/Common/Memory/RecyclerPageAllocator.cpp
@@ -5,15 +5,10 @@
 #include "CommonMemoryPch.h"
 
 RecyclerPageAllocator::RecyclerPageAllocator(Recycler* recycler, AllocationPolicyManager * policyManager,
-#ifndef JD_PRIVATE
-    Js::ConfigFlagsTable& flagTable,
-#endif
-    uint maxFreePageCount, uint maxAllocPageCount, bool enableWriteBarrier)
+    Js::ConfigFlagsTable& flagTable, uint maxFreePageCount, uint maxAllocPageCount, bool enableWriteBarrier)
     : IdleDecommitPageAllocator(policyManager,
         PageAllocatorType_Recycler,
-#ifndef JD_PRIVATE
         flagTable,
-#endif
         0, maxFreePageCount,
         true,
 #if ENABLE_BACKGROUND_PAGE_ZEROING
diff --git a/lib/Common/Memory/RecyclerPageAllocator.h b/lib/Common/Memory/RecyclerPageAllocator.h
index 80d2960..b851efd 100644
--- a/lib/Common/Memory/RecyclerPageAllocator.h
+++ b/lib/Common/Memory/RecyclerPageAllocator.h
@@ -10,10 +10,7 @@
 {
 public:
     RecyclerPageAllocator(Recycler* recycler, AllocationPolicyManager * policyManager,
-#ifndef JD_PRIVATE
-        Js::ConfigFlagsTable& flagTable,
-#endif
-        uint maxFreePageCount, uint maxAllocPageCount = PageAllocator::DefaultMaxAllocPageCount, bool enableWriteBarrier = false);
+        Js::ConfigFlagsTable& flagTable, uint maxFreePageCount, uint maxAllocPageCount = PageAllocator::DefaultMaxAllocPageCount, bool enableWriteBarrier = false);
 #if ENABLE_CONCURRENT_GC
 #ifdef RECYCLER_WRITE_WATCH
     void EnableWriteWatch();
diff --git a/lib/Common/Memory/RecyclerSweep.cpp b/lib/Common/Memory/RecyclerSweep.cpp
index f07311e..ca77e42 100644
--- a/lib/Common/Memory/RecyclerSweep.cpp
+++ b/lib/Common/Memory/RecyclerSweep.cpp
@@ -276,10 +276,17 @@
 
     // Finish the concurrent part of the first pass
     this->recycler->autoHeap.SweepSmallNonFinalizable(*this);
-
+    
     // Finish the rest of the sweep
     this->FinishSweep();
 
+#if ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP
+    if (CONFIG_FLAG_RELEASE(EnableConcurrentSweepAlloc))
+    {
+        this->recycler->FinishConcurrentSweep();
+    }
+#endif
+
     this->EndBackground();
 }
 #endif
diff --git a/lib/Common/Memory/SmallFinalizableHeapBucket.h b/lib/Common/Memory/SmallFinalizableHeapBucket.h
index 2d0fcb3..dd2bf1b 100644
--- a/lib/Common/Memory/SmallFinalizableHeapBucket.h
+++ b/lib/Common/Memory/SmallFinalizableHeapBucket.h
@@ -312,6 +312,10 @@
 #ifdef RECYCLER_VERIFY_MARK
     void VerifyMark();
 #endif
+#if ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP
+    void StartAllocationDuringConcurrentSweep();
+    void FinishConcurrentSweep();
+#endif
 #if DBG
     bool AllocatorsAreEmpty();
 #endif
diff --git a/lib/Common/Memory/SmallNormalHeapBucket.cpp b/lib/Common/Memory/SmallNormalHeapBucket.cpp
index c416b2a..4113e1a 100644
--- a/lib/Common/Memory/SmallNormalHeapBucket.cpp
+++ b/lib/Common/Memory/SmallNormalHeapBucket.cpp
@@ -41,6 +41,16 @@
         heapBlock->ScanInitialImplicitRoots(recycler);
     });
 
+#if ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP_USE_SLIST
+    if (CONFIG_FLAG_RELEASE(EnableConcurrentSweepAlloc))
+    {
+        HeapBlockList::ForEach(this->sweepableHeapBlockList, [recycler](TBlockType * heapBlock)
+        {
+            heapBlock->ScanInitialImplicitRoots(recycler);
+        });
+    }
+#endif
+
     HeapBlockList::ForEach(this->heapBlockList, [recycler](TBlockType * heapBlock)
     {
         heapBlock->ScanInitialImplicitRoots(recycler);
@@ -256,11 +266,26 @@
             // We decided not to do a partial sweep.
             // Blocks in the pendingSweepList need to have a regular sweep.
 
-            TBlockType * tail = SweepPendingObjects<SweepMode_Concurrent>(recycler, list);
-            tail->SetNextBlock(this->heapBlockList);
-            this->heapBlockList = list;
+#if ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP && SUPPORT_WIN32_SLIST && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP_USE_SLIST
+            if (this->AllowAllocationsDuringConcurrentSweep() && !this->AllocationsStartedDuringConcurrentSweep())
+            {
+                this->StartAllocationDuringConcurrentSweep();
+            }
+#endif
 
-            this->StartAllocationAfterSweep();
+            TBlockType * tail = SweepPendingObjects<SweepMode_Concurrent>(recycler, list);
+
+#if ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP && SUPPORT_WIN32_SLIST && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP_USE_SLIST
+            // During concurrent sweep if allocations were allowed, the heap blocks directly go into the SLIST of
+            // allocable heap blocks. They will be returned to the heapBlockList at the end of the sweep.
+            if (!this->AllowAllocationsDuringConcurrentSweep())
+#endif
+            {
+                tail->SetNextBlock(this->heapBlockList);
+                this->heapBlockList = list;
+
+                this->StartAllocationAfterSweep();
+            }
         }
 
         RECYCLER_SLOW_CHECK(this->VerifyHeapBlockCount(recyclerSweep.IsBackground()));
@@ -275,11 +300,25 @@
 SmallNormalHeapBucketBase<TBlockType>::SweepPendingObjects(Recycler * recycler, TBlockType * list)
 {
     TBlockType * tail;
-    HeapBlockList::ForEach(list, [recycler, &tail](TBlockType * heapBlock)
+    HeapBlockList::ForEachEditing(list, [this, recycler, &tail](TBlockType * heapBlock)
     {
         // Note, page heap blocks are never swept concurrently
         heapBlock->template SweepObjects<mode>(recycler);
         tail = heapBlock;
+
+#if ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP && SUPPORT_WIN32_SLIST && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP_USE_SLIST
+        if (this->AllowAllocationsDuringConcurrentSweep())
+        {
+            bool blockAddedToSList = HeapBucketT<TBlockType>::PushHeapBlockToSList(this->allocableHeapBlockListHead, heapBlock);
+
+            // If we encountered OOM while pushing the heapBlock to the SLIST we must add it to the heapBlockList so we don't lose track of it.
+            if (!blockAddedToSList)
+            {
+                heapBlock->SetNextBlock(this->heapBlockList);
+                this->heapBlockList = heapBlock;
+            }
+        }
+#endif
     });
     return tail;
 }
@@ -299,19 +338,27 @@
 template <class Fn>
 void
 SmallNormalHeapBucketBase<TBlockType>::SweepPartialReusePages(RecyclerSweep& recyclerSweep, TBlockType * heapBlockList,
-    TBlockType *& reuseBlocklist, TBlockType *&unusedBlockList, Fn callback)
+    TBlockType *& reuseBlocklist, TBlockType *&unusedBlockList, bool allocationsAllowedDuringConcurrentSweep, Fn callback)
 {
     HeapBlockList::ForEachEditing(heapBlockList,
-        [&recyclerSweep, &reuseBlocklist, &unusedBlockList, callback](TBlockType * heapBlock)
+        [&recyclerSweep, &reuseBlocklist, &unusedBlockList, callback, allocationsAllowedDuringConcurrentSweep](TBlockType * heapBlock)
     {
         uint expectFreeByteCount;
         if (heapBlock->DoPartialReusePage(recyclerSweep, expectFreeByteCount))
         {
             callback(heapBlock, true);
 
-            // Reuse the page
-            heapBlock->SetNextBlock(reuseBlocklist);
-            reuseBlocklist = heapBlock;
+
+#if ENABLE_CONCURRENT_GC && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP && SUPPORT_WIN32_SLIST && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP_USE_SLIST
+            // During concurrent sweep if allocations were allowed, the heap blocks directly go into the SLIST of
+            // allocable heap blocks. They will be returned to the heapBlockList at the end of the sweep.
+            if(!allocationsAllowedDuringConcurrentSweep)
+#endif
+            {
+                // Reuse the page
+                heapBlock->SetNextBlock(reuseBlocklist);
+                reuseBlocklist = heapBlock;
+            }
 
             RECYCLER_STATS_ADD(recyclerSweep.GetRecycler(), smallNonLeafHeapBlockPartialReuseBytes[heapBlock->GetHeapBlockType()], expectFreeByteCount);
             RECYCLER_STATS_INC(recyclerSweep.GetRecycler(), smallNonLeafHeapBlockPartialReuseCount[heapBlock->GetHeapBlockType()]);
@@ -338,11 +385,36 @@
     RECYCLER_SLOW_CHECK(this->VerifyHeapBlockCount(recyclerSweep.IsBackground()));
     Assert(this->GetRecycler()->inPartialCollectMode);
 
+#if ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP && SUPPORT_WIN32_SLIST && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP_USE_SLIST
+    if (this->AllowAllocationsDuringConcurrentSweep() && !this->AllocationsStartedDuringConcurrentSweep())
+    {
+        this->StartAllocationDuringConcurrentSweep();
+    }
+#endif
+
     TBlockType * currentHeapBlockList = this->heapBlockList;
     this->heapBlockList = nullptr;
     SmallNormalHeapBucketBase<TBlockType>::SweepPartialReusePages(recyclerSweep, currentHeapBlockList, this->heapBlockList,
-        this->partialHeapBlockList,
-        [](TBlockType * heapBlock, bool isReused) {});
+        this->partialHeapBlockList, this->AllowAllocationsDuringConcurrentSweep(),
+        [this](TBlockType * heapBlock, bool isReused) 
+    {
+#if ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP && SUPPORT_WIN32_SLIST && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP_USE_SLIST
+        if (isReused)
+        {
+            if (this->AllowAllocationsDuringConcurrentSweep())
+            {
+                bool blockAddedToSList = HeapBucketT<TBlockType>::PushHeapBlockToSList(this->allocableHeapBlockListHead, heapBlock);
+
+                // If we encountered OOM while pushing the heapBlock to the SLIST we must add it to the heapBlockList so we don't lose track of it.
+                if (!blockAddedToSList)
+                {
+                    heapBlock->SetNextBlock(this->heapBlockList);
+                    this->heapBlockList = heapBlock;
+                }
+            }
+        }
+#endif
+    });
 
 #if ENABLE_CONCURRENT_GC
     // only collect data for pending sweep list but don't sweep yet
@@ -353,8 +425,8 @@
     pendingSweepList = nullptr;
     Recycler * recycler = recyclerSweep.GetRecycler();
     SmallNormalHeapBucketBase<TBlockType>::SweepPartialReusePages(recyclerSweep, currentHeapBlockList, this->heapBlockList,
-        pendingSweepList,
-        [recycler](TBlockType * heapBlock, bool isReused)
+        pendingSweepList, this->AllowAllocationsDuringConcurrentSweep(),
+        [this, recycler](TBlockType * heapBlock, bool isReused)
         {
             if (isReused)
             {
@@ -363,6 +435,19 @@
 
                 // Page heap blocks are never swept concurrently
                 heapBlock->template SweepObjects<SweepMode_InThread>(recycler);
+#if ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP && SUPPORT_WIN32_SLIST && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP_USE_SLIST
+                if (this->AllowAllocationsDuringConcurrentSweep())
+                {
+                    bool blockAddedToSList = HeapBucketT<TBlockType>::PushHeapBlockToSList(this->allocableHeapBlockListHead, heapBlock);
+
+                    // If we encountered OOM while pushing the heapBlock to the SLIST we must add it to the heapBlockList so we don't lose track of it.
+                    if (!blockAddedToSList)
+                    {
+                        heapBlock->SetNextBlock(this->heapBlockList);
+                        this->heapBlockList = heapBlock;
+                    }
+                }
+#endif
 
                 // This block has been counted as concurrently swept, and now we changed our mind
                 // and sweep it in thread. Remove the count
@@ -374,7 +459,12 @@
 
     RECYCLER_SLOW_CHECK(this->VerifyHeapBlockCount(recyclerSweep.IsBackground()));
 
-    this->StartAllocationAfterSweep();
+#if ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP && SUPPORT_WIN32_SLIST && ENABLE_ALLOCATIONS_DURING_CONCURRENT_SWEEP_USE_SLIST
+    if (!this->AllocationsStartedDuringConcurrentSweep())
+#endif
+    {
+        this->StartAllocationAfterSweep();
+    }
 
     // PARTIALGC-TODO: revisit partial heap blocks to see if they can be put back into use
     // since the heuristics limit may be been changed.
diff --git a/lib/Common/Memory/SmallNormalHeapBucket.h b/lib/Common/Memory/SmallNormalHeapBucket.h
index d3cf6f4..bd686b8 100644
--- a/lib/Common/Memory/SmallNormalHeapBucket.h
+++ b/lib/Common/Memory/SmallNormalHeapBucket.h
@@ -37,7 +37,7 @@
 #if ENABLE_CONCURRENT_GC
     void SweepPendingObjects(RecyclerSweep& recyclerSweep);
     template <SweepMode mode>
-    static TBlockType * SweepPendingObjects(Recycler * recycler, TBlockType * list);
+    TBlockType * SweepPendingObjects(Recycler * recycler, TBlockType * list);
 #endif
     void Sweep(RecyclerSweep& recyclerSweep);
 #if ENABLE_PARTIAL_GC
@@ -45,7 +45,7 @@
 
     template <class Fn>
     static void SweepPartialReusePages(RecyclerSweep& recyclerSweep, TBlockType * heapBlockList,
-        TBlockType *& reuseBlocklist, TBlockType *&unusedBlockList, Fn callBack);
+        TBlockType *& reuseBlocklist, TBlockType *&unusedBlockList, bool allocationsAllowedDuringConcurrentSweep, Fn callBack);
     void SweepPartialReusePages(RecyclerSweep& recyclerSweep);
     void FinishPartialCollect(RecyclerSweep * recyclerSweep);
 
diff --git a/lib/JITClient/JITManager.cpp b/lib/JITClient/JITManager.cpp
index 7f52ee2..c4ccfe0 100644
--- a/lib/JITClient/JITManager.cpp
+++ b/lib/JITClient/JITManager.cpp
@@ -8,8 +8,8 @@
 _Must_inspect_result_
 _Ret_maybenull_ _Post_writable_byte_size_(size)
 void * __RPC_USER midl_user_allocate(
-#if defined(NTBUILD) || defined(_M_ARM)
-    _In_ // starting win8, _In_ is in the signature
+#if defined(_WIN32_WINNT_WIN10)
+    _In_ // starting win10, _In_ is in the signature
 #endif
     size_t size)
 {
@@ -30,6 +30,7 @@
     m_rpcBindingHandle(nullptr),
     m_oopJitEnabled(false),
     m_isJITServer(false),
+    m_failingHRESULT(S_OK),
     m_serverHandle(nullptr),
     m_jitConnectionId()
 {
@@ -183,7 +184,7 @@
 JITManager::IsConnected() const
 {
     Assert(IsOOPJITEnabled());
-    return m_rpcBindingHandle != nullptr;
+    return m_rpcBindingHandle != nullptr && !HasJITFailed();
 }
 
 HANDLE
@@ -205,6 +206,19 @@
     }
 }
 
+void
+JITManager::SetJITFailed(HRESULT hr)
+{
+    Assert(hr != S_OK);
+    m_failingHRESULT = hr;
+}
+
+bool
+JITManager::HasJITFailed() const
+{
+    return m_failingHRESULT != S_OK;
+}
+
 bool
 JITManager::IsOOPJITEnabled() const
 {
@@ -285,14 +299,15 @@
 JITManager::InitializeThreadContext(
     __in ThreadContextDataIDL * data,
     __out PPTHREADCONTEXT_HANDLE threadContextInfoAddress,
-    __out intptr_t * prereservedRegionAddr)
+    __out intptr_t * prereservedRegionAddr,
+    __out intptr_t * jitThunkAddr)
 {
     Assert(IsOOPJITEnabled());
 
     HRESULT hr = E_FAIL;
     RpcTryExcept
     {
-        hr = ClientInitializeThreadContext(m_rpcBindingHandle, data, threadContextInfoAddress, prereservedRegionAddr);
+        hr = ClientInitializeThreadContext(m_rpcBindingHandle, data, threadContextInfoAddress, prereservedRegionAddr, jitThunkAddr);
     }
     RpcExcept(RpcExceptionFilter(RpcExceptionCode()))
     {
@@ -540,14 +555,15 @@
 HRESULT
 JITManager::FreeAllocation(
     __in PTHREADCONTEXT_HANDLE threadContextInfoAddress,
-    __in intptr_t address)
+    __in intptr_t codeAddress,
+    __in intptr_t thunkAddress)
 {
     Assert(IsOOPJITEnabled());
 
     HRESULT hr = E_FAIL;
     RpcTryExcept
     {
-        hr = ClientFreeAllocation(m_rpcBindingHandle, threadContextInfoAddress, address);
+        hr = ClientFreeAllocation(m_rpcBindingHandle, threadContextInfoAddress, codeAddress, thunkAddress);
     }
     RpcExcept(RpcExceptionFilter(RpcExceptionCode()))
     {
diff --git a/lib/JITClient/JITManager.h b/lib/JITClient/JITManager.h
index 2c04a6d..6d4e26f 100644
--- a/lib/JITClient/JITManager.h
+++ b/lib/JITClient/JITManager.h
@@ -28,13 +28,16 @@
     void SetIsJITServer();
     bool IsOOPJITEnabled() const;
     void EnableOOPJIT();
+    void SetJITFailed(HRESULT hr);
+    bool HasJITFailed() const;
 
     HANDLE GetServerHandle() const;
 
     HRESULT InitializeThreadContext(
         __in ThreadContextDataIDL * data,
         __out PPTHREADCONTEXT_HANDLE threadContextInfoAddress,
-        __out intptr_t *prereservedRegionAddr);
+        __out intptr_t * prereservedRegionAddr,
+        __out intptr_t * jitThunkAddr);
 
     HRESULT CleanupThreadContext(
         __inout PPTHREADCONTEXT_HANDLE threadContextInfoAddress);
@@ -79,7 +82,8 @@
 
     HRESULT FreeAllocation(
         __in PTHREADCONTEXT_HANDLE threadContextInfoAddress,
-        __in intptr_t address);
+        __in intptr_t codeAddress,
+        __in intptr_t thunkAddress);
 
     HRESULT SetIsPRNGSeeded(
         __in PSCRIPTCONTEXT_HANDLE scriptContextInfoAddress,
@@ -107,7 +111,7 @@
 
 
     static JITManager * GetJITManager();
-    static void HandleServerCallResult(HRESULT hr, RemoteCallType callType);
+    static bool HandleServerCallResult(HRESULT hr, RemoteCallType callType);
 private:
     JITManager();
     ~JITManager();
@@ -123,6 +127,7 @@
     UUID m_jitConnectionId;
     bool m_oopJitEnabled;
     bool m_isJITServer;
+    HRESULT m_failingHRESULT;
 
     static JITManager s_jitManager;
 
@@ -140,6 +145,7 @@
     void SetIsJITServer() { Assert(false); }
     bool IsOOPJITEnabled() const { return false; }
     void EnableOOPJIT() { Assert(false); }
+    void SetJITFailed(HRESULT hr) { Assert(false); }
 
     HANDLE GetServerHandle() const
     {
@@ -149,7 +155,8 @@
     HRESULT InitializeThreadContext(
         __in ThreadContextDataIDL * data,
         __out PPTHREADCONTEXT_HANDLE threadContextInfoAddress,
-        __out intptr_t *prereservedRegionAddr)
+        __out intptr_t *prereservedRegionAddr,
+        __out intptr_t * jitThunkAddr)
         { Assert(false); return E_FAIL; }
 
     HRESULT DecommitInterpreterBufferManager(
@@ -199,7 +206,8 @@
 
     HRESULT FreeAllocation(
         __in PTHREADCONTEXT_HANDLE threadContextInfoAddress,
-        __in intptr_t address)
+        __in intptr_t codeAddress,
+        __in intptr_t thunkAddress)
         { Assert(false); return E_FAIL; }
 
     HRESULT SetIsPRNGSeeded(
@@ -233,8 +241,7 @@
 
     static JITManager * GetJITManager()
         { return &s_jitManager; }
-    static void HandleServerCallResult(HRESULT hr, RemoteCallType callType) { Assert(UNREACHED); }
-
+    static bool HandleServerCallResult(HRESULT hr, RemoteCallType callType) { Assert(UNREACHED); }
 private:
     static JITManager s_jitManager;
 };
diff --git a/lib/JITIDL/ChakraJIT.idl b/lib/JITIDL/ChakraJIT.idl
index 1ba9092..0b09cc1 100644
--- a/lib/JITIDL/ChakraJIT.idl
+++ b/lib/JITIDL/ChakraJIT.idl
@@ -22,7 +22,8 @@
         [in] handle_t binding,
         [in] ThreadContextDataIDL * threadData,
         [out] PPTHREADCONTEXT_HANDLE threadContextInfoAddress,
-        [out] CHAKRA_PTR * prereservedRegionAddr);
+        [out] CHAKRA_PTR * prereservedRegionAddr,
+        [out] CHAKRA_PTR * jitThunkAddr);
 
     HRESULT CleanupThreadContext(
         [in] handle_t binding,
@@ -67,7 +68,8 @@
     HRESULT FreeAllocation(
         [in] handle_t binding,
         [in] PTHREADCONTEXT_HANDLE threadContextInfoAddress,
-        [in] CHAKRA_PTR address);
+        [in] CHAKRA_PTR codeAddress,
+        [in] CHAKRA_PTR thunkAddress);
 
     HRESULT NewInterpreterThunkBlock(
         [in] handle_t binding,
diff --git a/lib/JITIDL/JITTypes.h b/lib/JITIDL/JITTypes.h
index 3dd63a9..a276b84 100644
--- a/lib/JITIDL/JITTypes.h
+++ b/lib/JITIDL/JITTypes.h
@@ -394,8 +394,8 @@
 {
     int resultType;
     unsigned int id;
-    unsigned int paramSize;
-    unsigned int paramsCount;
+    unsigned short paramSize;
+    unsigned short paramsCount;
     CHAKRA_PTR shortSig;
     IDL_DEF([size_is(paramsCount)]) int * params;
 } WasmSignatureIDL;
@@ -414,15 +414,15 @@
 
 typedef struct AsmJsDataIDL
 {
-    boolean isHeapBufferConst;
     boolean usesHeapBuffer;
+    IDL_PAD1(0)
     unsigned short argByteSize;
     unsigned short argCount;
-    IDL_PAD2(0)
+    IDL_PAD2(1)
     int retType;
     int totalSizeInBytes;
     unsigned int wasmSignatureCount;
-    X64_PAD4(1)
+    X64_PAD4(2)
     TypedSlotInfo typedSlotInfos[5];
     CHAKRA_PTR wasmSignaturesBaseAddr;
     IDL_DEF([size_is(wasmSignatureCount)]) WasmSignatureIDL *  wasmSignatures;
@@ -815,6 +815,7 @@
     unsigned int xdataOffset;
 #endif
     CHAKRA_PTR codeAddress;
+    CHAKRA_PTR thunkAddress;
     TypeGuardTransferEntryIDL* typeGuardEntries;
 
     IDL_DEF([size_is(ctorCachesCount)]) CtorCacheTransferEntryIDL ** ctorCacheEntries;
@@ -824,7 +825,6 @@
     NativeDataBuffer* buffer;
     EquivalentTypeGuardOffsets* equivalentTypeGuardOffsets;
     XProcNumberPageSegment* numberPageSegments;
-    X86_PAD4(1)
     __int64 startTime;
 } JITOutputIDL;
 
diff --git a/lib/JITServer/JITServer.cpp b/lib/JITServer/JITServer.cpp
index ab4c202..0b82ff1 100644
--- a/lib/JITServer/JITServer.cpp
+++ b/lib/JITServer/JITServer.cpp
@@ -194,7 +194,8 @@
     /* [in] */ handle_t binding,
     /* [in] */ __RPC__in ThreadContextDataIDL * threadContextData,
     /* [out] */ __RPC__deref_out_opt PPTHREADCONTEXT_HANDLE threadContextInfoAddress,
-    /* [out] */ __RPC__out intptr_t *prereservedRegionAddr)
+    /* [out] */ __RPC__out intptr_t *prereservedRegionAddr,
+    /* [out] */ __RPC__out intptr_t *jitThunkAddr)
 {
     if (threadContextInfoAddress == nullptr || prereservedRegionAddr == nullptr)
     {
@@ -204,6 +205,7 @@
 
     *threadContextInfoAddress = nullptr;
     *prereservedRegionAddr = 0;
+    *jitThunkAddr = 0;
 
     ServerThreadContext * contextInfo = nullptr;
     try
@@ -220,7 +222,7 @@
 
     return ServerCallWrapper(contextInfo, [&]()->HRESULT
     {
-        RPC_CALL_ATTRIBUTES CallAttributes = {0};
+        RPC_CALL_ATTRIBUTES CallAttributes = { 0 };
 
         CallAttributes.Version = RPC_CALL_ATTRIBUTES_VERSION;
         CallAttributes.Flags = RPC_QUERY_CLIENT_PID;
@@ -248,7 +250,19 @@
         }
 
         *threadContextInfoAddress = (PTHREADCONTEXT_HANDLE)EncodePointer(contextInfo);
-        *prereservedRegionAddr = (intptr_t)contextInfo->GetPreReservedSectionAllocator()->EnsurePreReservedRegion();
+
+#if defined(_CONTROL_FLOW_GUARD)
+        if (contextInfo->IsCFGEnabled())
+        {
+            if (!PHASE_OFF1(Js::PreReservedHeapAllocPhase))
+            {
+                *prereservedRegionAddr = (intptr_t)contextInfo->GetPreReservedSectionAllocator()->EnsurePreReservedRegion();
+            }
+#if _M_IX86 || _M_X64
+            *jitThunkAddr = (intptr_t)contextInfo->GetJITThunkEmitter()->EnsureInitialized();
+#endif
+        }
+#endif
 
         return hr;
     });
@@ -422,11 +436,15 @@
         return RPC_S_INVALID_ARG;
     }
 
+    if (!scriptContextInfo->IsClosed())
+    {
+        scriptContextInfo->Close();
+        ServerContextManager::UnRegisterScriptContext(scriptContextInfo);
+    }
     // This tells the run-time, when it is marshalling the out
     // parameters, that the context handle has been closed normally.
     *scriptContextInfoAddress = nullptr;
 
-    Assert(scriptContextInfo->IsClosed());
     HeapDelete(scriptContextInfo);
 
     return S_OK;
@@ -602,7 +620,8 @@
 ServerFreeAllocation(
     /* [in] */ handle_t binding,
     /* [in] */ __RPC__in PTHREADCONTEXT_HANDLE threadContextInfo,
-    /* [in] */ intptr_t address)
+    /* [in] */ intptr_t codeAddress,
+    /* [in] */ intptr_t thunkAddress)
 {
     ServerThreadContext * context = (ServerThreadContext*)DecodePointer(threadContextInfo);
 
@@ -614,11 +633,17 @@
 
     return ServerCallWrapper(context, [&]()->HRESULT
     {
-        if (CONFIG_FLAG(OOPCFGRegistration))
+        if (CONFIG_FLAG(OOPCFGRegistration) && !thunkAddress)
         {
-            context->SetValidCallTargetForCFG((PVOID)address, false);
+            context->SetValidCallTargetForCFG((PVOID)codeAddress, false);
         }
-        context->GetCodeGenAllocators()->emitBufferManager.FreeAllocation((void*)address);
+        context->GetCodeGenAllocators()->emitBufferManager.FreeAllocation((void*)codeAddress);
+#if defined(_CONTROL_FLOW_GUARD) && (_M_IX86 || _M_X64)
+        if (thunkAddress)
+        {
+            context->GetJITThunkEmitter()->FreeThunk(thunkAddress);
+        }
+#endif
         return S_OK;
     });
 }
@@ -773,7 +798,6 @@
             profiler,
             true);
 
-
 #ifdef PROFILE_EXEC
         if (profiler && profiler->IsInitialized())
         {
diff --git a/lib/Jsrt/ChakraCommon.h b/lib/Jsrt/ChakraCommon.h
index c303079..ffa392a 100644
--- a/lib/Jsrt/ChakraCommon.h
+++ b/lib/Jsrt/ChakraCommon.h
@@ -2062,6 +2062,7 @@
             _Outptr_result_bytebuffer_(*bufferLength) ChakraBytePtr *buffer,
             _Out_ unsigned int *bufferLength);
 
+
     /// <summary>
     ///     Invokes a function.
     /// </summary>
diff --git a/lib/Jsrt/ChakraCore.h b/lib/Jsrt/ChakraCore.h
index 0d63103..24599f2 100644
--- a/lib/Jsrt/ChakraCore.h
+++ b/lib/Jsrt/ChakraCore.h
@@ -27,6 +27,15 @@
 
 typedef void* JsModuleRecord;
 
+/// <summary>
+///     A reference to an object owned by the SharedArrayBuffer.
+/// </summary>
+/// <remarks>
+///     This represents SharedContents which is heap allocated object, it can be passed through 
+///     different runtimes to share the underlying buffer.
+/// </remarks>
+typedef void *JsSharedArrayBufferContentHandle;
+
 typedef enum JsParseModuleSourceFlags
 {
     JsParseModuleSourceFlags_DataIsUTF16LE = 0x00000000,
@@ -599,5 +608,58 @@
         _In_ JsWeakRef weakRef,
         _Out_ JsValueRef* value);
 
+/// <summary>
+///     Creates a Javascript SharedArrayBuffer object with shared content get from JsGetSharedArrayBufferContent.
+/// </summary>
+/// <remarks>
+///     Requires an active script context.
+/// </remarks>
+/// <param name="sharedContents">
+///     The storage object of a SharedArrayBuffer which can be shared between multiple thread.
+/// </param>
+/// <param name="result">The new SharedArrayBuffer object.</param>
+/// <returns>
+///     The code <c>JsNoError</c> if the operation succeeded, a failure code otherwise.
+/// </returns>
+CHAKRA_API
+JsCreateSharedArrayBufferWithSharedContent(
+    _In_ JsSharedArrayBufferContentHandle sharedContents,
+    _Out_ JsValueRef *result);
+
+/// <summary>
+///     Get the storage object from a SharedArrayBuffer.
+/// </summary>
+/// <remarks>
+///     Requires an active script context.
+/// </remarks>
+/// <param name="sharedArrayBuffer">The SharedArrayBuffer object.</param>
+/// <param name="sharedContents">
+///     The storage object of a SharedArrayBuffer which can be shared between multiple thread.
+///     User should call JsReleaseSharedArrayBufferContentHandle after finished using it.
+/// </param>
+/// <returns>
+///     The code <c>JsNoError</c> if the operation succeeded, a failure code otherwise.
+/// </returns>
+CHAKRA_API
+JsGetSharedArrayBufferContent(
+    _In_ JsValueRef sharedArrayBuffer,
+    _Out_ JsSharedArrayBufferContentHandle *sharedContents);
+
+/// <summary>
+///     Decrease the reference count on a SharedArrayBuffer storage object.
+/// </summary>
+/// <remarks>
+///     Requires an active script context.
+/// </remarks>
+/// <param name="sharedContents">
+///     The storage object of a SharedArrayBuffer which can be shared between multiple thread.
+/// </param>
+/// <returns>
+///     The code <c>JsNoError</c> if the operation succeeded, a failure code otherwise.
+/// </returns>
+CHAKRA_API
+JsReleaseSharedArrayBufferContentHandle(
+    _In_ JsSharedArrayBufferContentHandle sharedContents);
+
 #endif // CHAKRACOREBUILD_
 #endif // _CHAKRACORE_H_
diff --git a/lib/Jsrt/Jsrt.cpp b/lib/Jsrt/Jsrt.cpp
index 88e2820..2d2e40b 100644
--- a/lib/Jsrt/Jsrt.cpp
+++ b/lib/Jsrt/Jsrt.cpp
@@ -1559,6 +1559,55 @@
     });
 }
 
+CHAKRA_API JsCreateSharedArrayBufferWithSharedContent(_In_ JsSharedArrayBufferContentHandle sharedContents, _Out_ JsValueRef *result)
+{
+    return ContextAPIWrapper<true>([&](Js::ScriptContext *scriptContext, TTDRecorder& _actionEntryPopper) -> JsErrorCode {
+
+        PARAM_NOT_NULL(result);
+
+        Js::JavascriptLibrary* library = scriptContext->GetLibrary();
+        *result = library->CreateSharedArrayBuffer((Js::SharedContents*)sharedContents);
+
+        PERFORM_JSRT_TTD_RECORD_ACTION_RESULT(scriptContext, result);
+
+        JS_ETW(EventWriteJSCRIPT_RECYCLER_ALLOCATE_OBJECT(*result));
+        return JsNoError;
+    });
+}
+
+CHAKRA_API JsGetSharedArrayBufferContent(_In_ JsValueRef sharedArrayBuffer, _Out_ JsSharedArrayBufferContentHandle *sharedContents)
+{
+    return ContextAPIWrapper<true>([&](Js::ScriptContext *scriptContext, TTDRecorder& _actionEntryPopper) -> JsErrorCode {
+
+        PARAM_NOT_NULL(sharedContents);
+
+        if (!Js::SharedArrayBuffer::Is(sharedArrayBuffer))
+        {
+            return JsErrorInvalidArgument;
+        }
+        
+        Js::SharedContents**& content = (Js::SharedContents**&)sharedContents;
+        *content = Js::SharedArrayBuffer::FromVar(sharedArrayBuffer)->GetSharedContents();
+
+        if (*content == nullptr)
+        {
+            return JsErrorFatal;
+        }
+
+        (*content)->AddRef();
+
+        return JsNoError;
+    });
+}
+
+CHAKRA_API JsReleaseSharedArrayBufferContentHandle(_In_ JsSharedArrayBufferContentHandle sharedContents)
+{
+    return ContextAPIWrapper<true>([&](Js::ScriptContext *scriptContext, TTDRecorder& _actionEntryPopper) -> JsErrorCode {
+        ((Js::SharedContents*)sharedContents)->Release();
+        return JsNoError;
+    });
+}
+
 CHAKRA_API JsCreateExternalArrayBuffer(_Pre_maybenull_ _Pre_writable_byte_size_(byteLength) void *data, _In_ unsigned int byteLength,
     _In_opt_ JsFinalizeCallback finalizeCallback, _In_opt_ void *callbackState, _Out_ JsValueRef *result)
 {
diff --git a/lib/Jsrt/JsrtHelper.cpp b/lib/Jsrt/JsrtHelper.cpp
index a3d907b..4d2eac4 100644
--- a/lib/Jsrt/JsrtHelper.cpp
+++ b/lib/Jsrt/JsrtHelper.cpp
@@ -12,6 +12,8 @@
 #include "jsrtHelper.h"
 #include "Base/ThreadContextTlsEntry.h"
 
+#include "Base/VTuneChakraProfile.h"
+
 #ifdef DYNAMIC_PROFILE_STORAGE
 #include "Language/DynamicProfileStorage.h"
 #endif
@@ -144,6 +146,9 @@
     #ifdef ENABLE_JS_ETW
         EtwTrace::Register();
     #endif
+    #ifdef VTUNE_PROFILING
+        VTuneChakraProfile::Register();
+    #endif
         ValueType::Initialize();
         ThreadContext::GlobalInitialize();
 
diff --git a/lib/Parser/Parse.cpp b/lib/Parser/Parse.cpp
index 74fcdd1..1963d0d 100644
--- a/lib/Parser/Parse.cpp
+++ b/lib/Parser/Parse.cpp
@@ -399,6 +399,10 @@
     {
         hr = e.GetError();
     }
+    catch (Js::AsmJsParseException&)
+    {
+        hr = JSERR_AsmJsCompileError;
+    }
 
     if (FAILED(hr))
     {
@@ -2445,7 +2449,7 @@
     }
 
     m_pscan->Scan();
-    return CreateCallNode(knopCall, CreateNodeWithScanner<knopImport>(), specifier);
+    return buildAST ? CreateCallNode(knopCall, CreateNodeWithScanner<knopImport>(), specifier) : nullptr;
 }
 
 template<bool buildAST>
@@ -2461,7 +2465,10 @@
     // import()
     if (m_token.tk == tkLParen)
     {
-        return ParseImportCall<buildAST>();
+        ParseNodePtr pnode = ParseImportCall<buildAST>();
+        BOOL fCanAssign;
+        IdentToken token;
+        return ParsePostfixOperators<buildAST>(pnode, TRUE, FALSE, FALSE, &fCanAssign, &token);
     }
 
     m_pscan->SeekTo(parsedImport);
@@ -3256,12 +3263,8 @@
         if (m_scriptContext->GetConfig()->IsES6ModuleEnabled())
         {
             m_pscan->Scan();
-            if (m_token.tk == tkLParen)
-            {
-                return ParseImportCall<buildAST>();
-            }
-
-            Error(ERRnoLparen);
+            ChkCurTokNoScan(tkLParen, ERRnoLparen);
+            pnode = ParseImportCall<buildAST>();
         }
         else
         {
@@ -5244,6 +5247,15 @@
 
         if (isTopLevelDeferredFunc || (m_InAsmMode && m_deferAsmJs))
         {
+#ifdef ASMJS_PLAT
+            if (m_InAsmMode && fLambda)
+            {
+                // asm.js doesn't support lambda functions
+                Js::AsmJSCompiler::OutputError(m_scriptContext, _u("Lambda functions are not supported."));
+                Js::AsmJSCompiler::OutputError(m_scriptContext, _u("Asm.js compilation failed."));
+                throw Js::AsmJsParseException();
+            }
+#endif
             AssertMsg(!fLambda, "Deferring function parsing of a function does not handle lambda syntax");
             fDeferred = true;
 
diff --git a/lib/Parser/Scan.cpp b/lib/Parser/Scan.cpp
index 2d45727..89588b4 100644
--- a/lib/Parser/Scan.cpp
+++ b/lib/Parser/Scan.cpp
@@ -1947,7 +1947,9 @@
                 token = tkDec;
                 if (!m_fIsModuleCode)
                 {
-                    if ('>' == this->PeekFirst(p, last) && (m_fHadEol || seenDelimitedCommentEnd)) // --> HTMLCloseComment
+                    // https://tc39.github.io/ecma262/#prod-annexB-MultiLineComment
+                    // If there was a new line in the multi-line comment, the text after --> is a comment.
+                    if ('>' == this->PeekFirst(p, last) && m_fHadEol)
                     {
                         goto LSkipLineComment;
                     }
diff --git a/lib/Parser/rterrors.h b/lib/Parser/rterrors.h
index f97a4a0..03ea500 100755
--- a/lib/Parser/rterrors.h
+++ b/lib/Parser/rterrors.h
@@ -365,6 +365,9 @@
 RT_ERROR_MSG(JSERR_CantRedefineProp, 5667, "Cannot redefine property '%s'", "Cannot redefine property", kjstTypeError, 0)
 RT_ERROR_MSG(JSERR_FunctionArgument_NeedArrayLike, 5668, "%s: argument is not an array or array-like object", "Array or array-like object expected", kjstTypeError, 0)
 RT_ERROR_MSG(JSERR_FatalMemoryExhaustion, 5669, "", "Encountered a non-recoverable OOM", kjstError, 0)
+RT_ERROR_MSG(JSERR_OutOfBoundString, 5670, "", "String length is out of bound", kjstRangeError, 0)
+RT_ERROR_MSG(JSERR_InvalidIterableObject, 5671, "%s : Invalid iterable object", "Invalid iterable object", kjstTypeError, 0)
+RT_ERROR_MSG(JSERR_InvalidIteratorObject, 5672, "%s : Invalid iterator object", "Invalid iterator object", kjstTypeError, 0)
 
 // Built In functions Errors
 RT_ERROR_MSG(JSERR_BuiltInNotAvailable, 5670, "", "Built In functions are not available.", kjstTypeError, 0)
@@ -390,10 +393,12 @@
 RT_ERROR_MSG(WASMERR_ArrayIndexOutOfRange, 7017, "", "Memory index is out of range", kjstWebAssemblyRuntimeError, 0)
 RT_ERROR_MSG(WASMERR_InvalidInstantiateArgument, 7018, "", "Invalid arguments to instantiate", kjstTypeError, 0)
 RT_ERROR_MSG(WASMERR_WasmLinkError, 7019, "%s", "Linking failed.", kjstWebAssemblyLinkError, 0)
-RT_ERROR_MSG(JSERR_OutOfBoundString, 7020, "", "String length is out of bound", kjstRangeError, 0)
-RT_ERROR_MSG(JSERR_InvalidIterableObject, 7021, "%s : Invalid iterable object", "Invalid iterable object", kjstTypeError, 0)
-RT_ERROR_MSG(JSERR_InvalidIteratorObject, 7022, "%s : Invalid iterator object", "Invalid iterator object", kjstTypeError, 0)
-RT_ERROR_MSG(WASMERR_NeedResponse, 7023, "%s is not a Reponse", "Response expected", kjstTypeError, 0)
+RT_ERROR_MSG(WASMERR_NeedResponse, 7020, "%s is not a Reponse", "Response expected", kjstTypeError, 0)
+RT_ERROR_MSG(WASMERR_CantDetach, 7021, "", "Not allowed to detach WebAssembly.Memory buffer", kjstTypeError, 0)
+RT_ERROR_MSG(WASMERR_BufferGrowOnly, 7022, "", "WebAssembly.Memory can only grow", kjstTypeError, 0)
+RT_ERROR_MSG(WASMERR_LinkSignatureMismatch, 7023, "Cannot link import %s in link table due to a signature mismatch", "Function called with invalid signature", kjstWebAssemblyRuntimeError, 0)
+RT_ERROR_MSG(WASMERR_MemoryCreateFailed, 7024, "", "Failed to create WebAssembly.Memory", kjstTypeError, 0)
+RT_ERROR_MSG(WASMERR_NeedInstanceObject, 7025, "%s is not a WebAssembly.Instance", "WebAssembly.Instance object expected", kjstWebAssemblyRuntimeError, 0)
 
 // Wabt Errors
 RT_ERROR_MSG(WABTERR_WabtError, 7200, "%s", "Wabt Error.", kjstTypeError, 0)
diff --git a/lib/Runtime/Base/FunctionBody.cpp b/lib/Runtime/Base/FunctionBody.cpp
index e3930fc..4c10a0d 100644
--- a/lib/Runtime/Base/FunctionBody.cpp
+++ b/lib/Runtime/Base/FunctionBody.cpp
@@ -1268,7 +1268,8 @@
     {
         bool isInterpreterThunk = this->GetOriginalEntryPoint_Unchecked() == DefaultEntryThunk;
 #if DYNAMIC_INTERPRETER_THUNK
-        isInterpreterThunk = isInterpreterThunk || IsDynamicInterpreterThunk();
+        bool isStaticInterpreterThunk = this->GetOriginalEntryPoint_Unchecked() == InterpreterStackFrame::StaticInterpreterThunk;
+        isInterpreterThunk = isInterpreterThunk || isStaticInterpreterThunk || IsDynamicInterpreterThunk();
 #endif
         return isInterpreterThunk;
     }
@@ -3429,7 +3430,19 @@
     BOOL FunctionBody::IsNativeOriginalEntryPoint() const
     {
 #if ENABLE_NATIVE_CODEGEN
-        return this->GetScriptContext()->IsNativeAddress((void*)this->GetOriginalEntryPoint_Unchecked());
+        JavascriptMethod originalEntryPoint = this->GetOriginalEntryPoint_Unchecked();
+        return
+#if defined(_CONTROL_FLOW_GUARD) && (_M_IX86 || _M_X64)
+            (
+#if ENABLE_OOP_NATIVE_CODEGEN
+            JITManager::GetJITManager()->IsOOPJITEnabled()
+                ? JITThunkEmitter<SectionAllocWrapper>::IsInThunk(this->GetScriptContext()->GetThreadContext()->GetJITThunkStartAddr(), (uintptr_t)originalEntryPoint)
+                :
+#endif
+                this->GetScriptContext()->GetThreadContext()->GetJITThunkEmitter()->IsInThunk((uintptr_t)originalEntryPoint)
+            ) ||
+#endif
+            this->GetScriptContext()->IsNativeAddress((void*)originalEntryPoint);
 #else
         return false;
 #endif
@@ -3611,7 +3624,7 @@
             (entryPointInfo == this->m_defaultEntryPointInfo && this->IsInterpreterThunk()) ||
             (
                 GetSimpleJitEntryPointInfo() &&
-                GetEntryPoint(entryPointInfo) == reinterpret_cast<void *>(GetSimpleJitEntryPointInfo()->GetNativeAddress())
+                GetEntryPoint(entryPointInfo) == reinterpret_cast<void *>(GetSimpleJitEntryPointInfo()->GetNativeEntrypoint())
             ));
         this->SetEntryPoint(entryPointInfo, entryPoint);
     }
@@ -3632,7 +3645,10 @@
             {
                 this->SetOriginalEntryPoint(this->m_scriptContext->GetNextDynamicInterpreterThunk(&this->m_dynamicInterpreterThunk));
             }
-            JS_ETW(EtwTrace::LogMethodInterpreterThunkLoadEvent(this));
+            if (this->m_dynamicInterpreterThunk != nullptr)
+            {
+                JS_ETW(EtwTrace::LogMethodInterpreterThunkLoadEvent(this));
+            }
         }
         else
         {
@@ -4764,7 +4780,7 @@
         PROFILER_SCRIPT_TYPE type = IsDynamicScript() ? PROFILER_SCRIPT_TYPE_DYNAMIC : PROFILER_SCRIPT_TYPE_USER;
 
         IDebugDocumentContext *pDebugDocumentContext = nullptr;
-        this->m_scriptContext->GetDocumentContext(this->m_scriptContext, this, &pDebugDocumentContext);
+        this->m_scriptContext->GetDocumentContext(this, &pDebugDocumentContext);
 
         HRESULT hr = m_scriptContext->OnScriptCompiled((PROFILER_TOKEN) this->GetUtf8SourceInfo()->GetSourceInfoId(), type, pDebugDocumentContext);
 
@@ -4780,7 +4796,7 @@
         const char16 *pwszName = GetExternalDisplayName();
 
         IDebugDocumentContext *pDebugDocumentContext = nullptr;
-        this->m_scriptContext->GetDocumentContext(this->m_scriptContext, this, &pDebugDocumentContext);
+        this->m_scriptContext->GetDocumentContext(this, &pDebugDocumentContext);
 
         SetHasFunctionCompiledSent(true);
 
@@ -6321,9 +6337,8 @@
         // Byte code generation failed for this function. Revert any intermediate state being tracked in the function body, in
         // case byte code generation is attempted again for this function body.
 
-#if DBG
-        this->UnlockCounters();
-#endif
+        DebugOnly(this->UnlockCounters());
+
         ResetInlineCaches();
         ResetObjectLiteralTypes();
         ResetLiteralRegexes();
@@ -6361,9 +6376,9 @@
         // pass may have failed, we need to restore state that is tracked on the function body by the visit pass.
         // Note: do not reset literal regexes if the function has already been compiled (e.g., is a parsed function enclosed by a
         // redeferred function) as we will not use the count of literals anyway, and the counters may be accessed by the background thread.
-#if DBG
-        this->UnlockCounters();
-#endif
+
+        DebugOnly(this->UnlockCounters());
+
         if (this->byteCodeBlock == nullptr)
         {
             ResetLiteralRegexes();
@@ -6543,7 +6558,7 @@
             if(simpleJitEntryPointInfo && GetExecutionMode() == ExecutionMode::FullJit)
             {
                 directEntryPoint =
-                    originalEntryPoint = reinterpret_cast<Js::JavascriptMethod>(simpleJitEntryPointInfo->GetNativeAddress());
+                    originalEntryPoint = reinterpret_cast<Js::JavascriptMethod>(simpleJitEntryPointInfo->GetNativeEntrypoint());
             }
             else
             {
@@ -7924,9 +7939,8 @@
         {
             return;
         }
-#if DBG
-        this->UnlockCounters();
-#endif
+
+        DebugOnly(this->UnlockCounters());
 
         CleanupRecyclerData(isScriptContextClosing, false /* capture entry point cleanup stack trace */);
         CleanUpForInCache(isScriptContextClosing);
@@ -7965,9 +7979,7 @@
 
         this->cleanedUp = true;
 
-#if DBG
-        this->LockDownCounters();
-#endif
+        DebugOnly(this->LockDownCounters());
     }
 
 
@@ -9530,8 +9542,9 @@
 
         // Reset the entry point upon a lazy bailout.
         this->Reset(true);
-        Assert(this->jsMethod != nullptr);
-        FreeNativeCodeGenAllocation(GetScriptContext(), this->jsMethod);
+        Assert(this->nativeAddress != nullptr);
+        FreeNativeCodeGenAllocation(GetScriptContext(), this->nativeAddress, this->thunkAddress);
+        this->nativeAddress = nullptr;
         this->jsMethod = nullptr;
     }
 #endif
@@ -9712,7 +9725,7 @@
 
                 if (validationCookie == currentCookie)
                 {
-                    scriptContext->FreeFunctionEntryPoint((Js::JavascriptMethod)this->GetNativeAddress());
+                    scriptContext->FreeFunctionEntryPoint((Js::JavascriptMethod)this->GetNativeAddress(), this->GetThunkAddress());
                 }
             }
 
@@ -9860,7 +9873,7 @@
                     newEntryPoint = simpleJitEntryPointInfo;
                     functionBody->SetDefaultFunctionEntryPointInfo(
                         simpleJitEntryPointInfo,
-                        reinterpret_cast<JavascriptMethod>(newEntryPoint->GetNativeAddress()));
+                        reinterpret_cast<JavascriptMethod>(newEntryPoint->GetNativeEntrypoint()));
                     functionBody->SetExecutionMode(ExecutionMode::SimpleJit);
                     functionBody->ResetSimpleJitLimitAndCallCount();
                 }
@@ -9910,7 +9923,7 @@
                 {
                     Assert(!functionType->GetEntryPointInfo()->IsFunctionEntryPointInfo() ||
                         ((FunctionEntryPointInfo*)functionType->GetEntryPointInfo())->IsCleanedUp()
-                        || (DWORD_PTR)functionType->GetEntryPoint() != this->GetNativeAddress());
+                        || functionType->GetEntryPoint() != this->GetNativeEntrypoint());
                 }
             });
 
@@ -9927,7 +9940,7 @@
                 const JavascriptMethod currentThunk = functionBody->GetScriptContext()->CurrentThunk;
                 const JavascriptMethod newDirectEntryPoint =
                     currentThunk == DefaultEntryThunk ? newOriginalEntryPoint : currentThunk;
-                const JavascriptMethod simpleJitNativeAddress = reinterpret_cast<JavascriptMethod>(GetNativeAddress());
+                const JavascriptMethod simpleJitNativeAddress = GetNativeEntrypoint();
                 functionBody->MapEntryPoints([&](const int entryPointIndex, FunctionEntryPointInfo *const entryPointInfo)
                 {
                     if(entryPointInfo != this && entryPointInfo->jsMethod == simpleJitNativeAddress)
@@ -10018,7 +10031,7 @@
                 currentCookie = (void*)currentNativeCodegen;
 #endif
 
-                if (this->jsMethod == reinterpret_cast<Js::JavascriptMethod>(this->GetNativeAddress()))
+                if (this->jsMethod == this->GetNativeEntrypoint())
                 {
 #if DBG
                     // tag the jsMethod in case the native address is reused in recycler and create a false positive
@@ -10032,7 +10045,7 @@
 
                 if (validationCookie == currentCookie)
                 {
-                    scriptContext->FreeFunctionEntryPoint(reinterpret_cast<Js::JavascriptMethod>(this->GetNativeAddress()));
+                    scriptContext->FreeFunctionEntryPoint(reinterpret_cast<Js::JavascriptMethod>(this->GetNativeAddress()), this->GetThunkAddress());
                 }
             }
 
diff --git a/lib/Runtime/Base/FunctionBody.h b/lib/Runtime/Base/FunctionBody.h
index fe5ef2c..428700c 100644
--- a/lib/Runtime/Base/FunctionBody.h
+++ b/lib/Runtime/Base/FunctionBody.h
@@ -581,6 +581,7 @@
 
         Field(CodeGenWorkItem *) workItem;
         FieldNoBarrier(Js::JavascriptMethod) nativeAddress;
+        FieldNoBarrier(Js::JavascriptMethod) thunkAddress;
         Field(ptrdiff_t) codeSize;
 
     protected:
@@ -844,11 +845,12 @@
             this->state = CodeGenPending;
         }
 
-        void SetCodeGenRecorded(Js::JavascriptMethod nativeAddress, ptrdiff_t codeSize)
+        void SetCodeGenRecorded(Js::JavascriptMethod thunkAddress, Js::JavascriptMethod nativeAddress, ptrdiff_t codeSize)
         {
             Assert(this->GetState() == CodeGenQueued);
             Assert(codeSize > 0);
             this->nativeAddress = nativeAddress;
+            this->thunkAddress = thunkAddress;
             this->codeSize = codeSize;
             this->state = CodeGenRecorded;
 
@@ -897,6 +899,20 @@
             return reinterpret_cast<DWORD_PTR>(this->nativeAddress);
         }
 
+        Js::JavascriptMethod GetThunkAddress() const
+        {
+            Assert(this->GetState() == CodeGenRecorded || this->GetState() == CodeGenDone);
+
+            return this->thunkAddress;
+        }
+
+        Js::JavascriptMethod GetNativeEntrypoint() const
+        {
+            Assert(this->GetState() == CodeGenRecorded || this->GetState() == CodeGenDone || this->isAsmJsFunction);
+
+            return this->thunkAddress ? this->thunkAddress : this->nativeAddress;
+        }
+
         ptrdiff_t GetCodeSize() const
         {
             Assert(this->GetState() == CodeGenRecorded || this->GetState() == CodeGenDone);
@@ -1176,6 +1192,9 @@
         Field(uint) endOffset;
         Field(uint) interpretCount;
         Field(uint) profiledLoopCounter;
+#if ENABLE_NATIVE_CODEGEN
+        Field(uint) rejitCount;
+#endif
         Field(bool) isNested;
         Field(bool) isInTry;
         Field(FunctionBody *) functionBody;
@@ -1280,6 +1299,8 @@
 #if ENABLE_NATIVE_CODEGEN
         int CreateEntryPoint();
         void ReleaseEntryPoints();
+        void IncRejitCount() { ++rejitCount; }
+        uint GetRejitCount() { return rejitCount; }
 #endif
 
         void ResetInterpreterCount()
diff --git a/lib/Runtime/Base/ScriptContext.cpp b/lib/Runtime/Base/ScriptContext.cpp
index bf70e87..eb0b8ab 100644
--- a/lib/Runtime/Base/ScriptContext.cpp
+++ b/lib/Runtime/Base/ScriptContext.cpp
@@ -157,6 +157,10 @@
 #endif
 #ifdef REJIT_STATS
         , rejitStatsMap(nullptr)
+        , bailoutReasonCounts(nullptr)
+        , bailoutReasonCountsCap(nullptr)
+        , rejitReasonCounts(nullptr)
+        , rejitReasonCountsCap(nullptr)
 #endif
 #ifdef ENABLE_BASIC_TELEMETRY
         , telemetry(nullptr)
@@ -315,11 +319,10 @@
         this->toStringInlineCache = AllocatorNewZ(InlineCacheAllocator, GetInlineCacheAllocator(), InlineCache);
 
 #ifdef REJIT_STATS
-        if (PHASE_STATS1(Js::ReJITPhase))
-        {
-            rejitReasonCounts = AnewArrayZ(GeneralAllocator(), uint, NumRejitReasons);
-            bailoutReasonCounts = Anew(GeneralAllocator(), BailoutStatsMap, GeneralAllocator());
-        }
+        rejitReasonCounts = AnewArrayZ(GeneralAllocator(), uint, NumRejitReasons);
+        rejitReasonCountsCap = AnewArrayZ(GeneralAllocator(), uint, NumRejitReasons);
+        bailoutReasonCounts = Anew(GeneralAllocator(), BailoutStatsMap, GeneralAllocator());
+        bailoutReasonCountsCap = Anew(GeneralAllocator(), BailoutStatsMap, GeneralAllocator());
 #endif
 
 #ifdef ENABLE_BASIC_TELEMETRY
@@ -4304,10 +4307,10 @@
     }
 #endif
 
-    void ScriptContext::FreeFunctionEntryPoint(Js::JavascriptMethod method)
+    void ScriptContext::FreeFunctionEntryPoint(Js::JavascriptMethod codeAddress, Js::JavascriptMethod thunkAddress)
     {
 #if ENABLE_NATIVE_CODEGEN
-        FreeNativeCodeGenAllocation(this, method);
+        FreeNativeCodeGenAllocation(this, codeAddress, thunkAddress);
 #endif
     }
 
@@ -5492,7 +5495,11 @@
             Output::Print(_u("\n\n"));
 
             // If in verbose mode, dump data for each FunctionBody
-            if (Configuration::Global.flags.Verbose && rejitStatsMap != NULL)
+            if (
+#if defined(FLAG) || defined(FLAG_REGOVR_EXP)
+                Configuration::Global.flags.Verbose &&
+#endif
+                rejitStatsMap != nullptr)
             {
                 // Aggregated data
                 Output::Print(_u("%-30s %14s %14s\n"), _u("Function (#),"), _u("Bailout Count,"), _u("Rejit Count"));
@@ -5694,15 +5701,18 @@
             }
         }
     }
-    void ScriptContext::LogRejit(Js::FunctionBody *body, uint reason)
+    void ScriptContext::LogRejit(Js::FunctionBody *body, RejitReason reason)
     {
-        Assert(reason < NumRejitReasons);
-        rejitReasonCounts[reason]++;
+        byte reasonIndex = static_cast<byte>(reason);
+        Assert(reasonIndex < NumRejitReasons);
+        rejitReasonCounts[reasonIndex]++;
 
+#if defined(FLAG) || defined(FLAG_REGOVR_EXP)
         if (Js::Configuration::Global.flags.Verbose)
         {
-            LogDataForFunctionBody(body, reason, true);
+            LogDataForFunctionBody(body, reasonIndex, true);
         }
+#endif
     }
     void ScriptContext::LogBailout(Js::FunctionBody *body, uint kind)
     {
@@ -5717,10 +5727,12 @@
             bailoutReasonCounts->Item(kind, val);
         }
 
+#if defined(FLAG) || defined(FLAG_REGOVR_EXP)
         if (Js::Configuration::Global.flags.Verbose)
         {
             LogDataForFunctionBody(body, kind, false);
         }
+#endif
     }
 #endif
 
diff --git a/lib/Runtime/Base/ScriptContext.h b/lib/Runtime/Base/ScriptContext.h
index 64edcd1..b093e19 100644
--- a/lib/Runtime/Base/ScriptContext.h
+++ b/lib/Runtime/Base/ScriptContext.h
@@ -454,7 +454,6 @@
 
 #ifdef ENABLE_SCRIPT_DEBUGGING
         typedef HRESULT (*GetDocumentContextFunction)(
-            ScriptContext *pContext,
             Js::FunctionBody *pFunctionBody,
             IDebugDocumentContext **ppDebugDocumentContext);
         GetDocumentContextFunction GetDocumentContext;
@@ -700,7 +699,7 @@
 
         void LogDataForFunctionBody(Js::FunctionBody *body, uint idx, bool isRejit);
 
-        void LogRejit(Js::FunctionBody *body, uint reason);
+        void LogRejit(Js::FunctionBody *body, RejitReason reason);
         void LogBailout(Js::FunctionBody *body, uint kind);
 
         // Used to centrally collect stats for all function bodies.
@@ -708,7 +707,9 @@
         RejitStatsMap* rejitStatsMap;
 
         BailoutStatsMap *bailoutReasonCounts;
+        BailoutStatsMap *bailoutReasonCountsCap;
         uint *rejitReasonCounts;
+        uint *rejitReasonCountsCap;
 #endif
 #ifdef ENABLE_BASIC_TELEMETRY
 
@@ -1418,7 +1419,7 @@
         }
 
     public:
-        void FreeFunctionEntryPoint(Js::JavascriptMethod method);
+        void FreeFunctionEntryPoint(Js::JavascriptMethod codeAddress, Js::JavascriptMethod thunkAddress);
 
     private:
         uint CloneSource(Utf8SourceInfo* info);
diff --git a/lib/Runtime/Base/ThreadContext.cpp b/lib/Runtime/Base/ThreadContext.cpp
index a3e798c..9d81a06 100644
--- a/lib/Runtime/Base/ThreadContext.cpp
+++ b/lib/Runtime/Base/ThreadContext.cpp
@@ -99,6 +99,7 @@
     stackProber(nullptr),
     isThreadBound(false),
     hasThrownPendingException(false),
+    pendingFinallyException(nullptr),
     noScriptScope(false),
     heapEnum(nullptr),
     threadContextFlags(ThreadContextFlagNoFlag),
@@ -176,6 +177,9 @@
     thunkPageAllocators(allocationPolicyManager, /* allocXData */ false, /* virtualAllocator */ nullptr, GetCurrentProcess()),
 #endif
     codePageAllocators(allocationPolicyManager, ALLOC_XDATA, GetPreReservedVirtualAllocator(), GetCurrentProcess()),
+#if defined(_CONTROL_FLOW_GUARD) && (_M_IX86 || _M_X64)
+    jitThunkEmitter(this, &VirtualAllocWrapper::Instance , GetCurrentProcess()),
+#endif
 #endif
     dynamicObjectEnumeratorCacheMap(&HeapAllocator::Instance, 16),
     //threadContextFlags(ThreadContextFlagNoFlag),
@@ -2008,7 +2012,7 @@
         }
     }
 
-    HRESULT hr = JITManager::GetJITManager()->InitializeThreadContext(&contextData, &m_remoteThreadContextInfo, &m_prereservedRegionAddr);
+    HRESULT hr = JITManager::GetJITManager()->InitializeThreadContext(&contextData, &m_remoteThreadContextInfo, &m_prereservedRegionAddr, &m_jitThunkStartAddr);
     JITManager::HandleServerCallResult(hr, RemoteCallType::StateUpdate);
 
     return m_remoteThreadContextInfo != nullptr;
@@ -2248,7 +2252,7 @@
 {
     AssertMsg(wellKnownType <= WellKnownHostType_Last, "ThreadContext::SetWellKnownHostTypeId called on unknown type");
 
-    if (wellKnownType <= WellKnownHostType_Last)
+    if (wellKnownType >= 0 && wellKnownType <= WellKnownHostType_Last)
     {
         this->wellKnownHostTypeIds[wellKnownType] = typeId;
 #if ENABLE_NATIVE_CODEGEN
diff --git a/lib/Runtime/Base/ThreadContext.h b/lib/Runtime/Base/ThreadContext.h
index d158311..b23f0d8 100644
--- a/lib/Runtime/Base/ThreadContext.h
+++ b/lib/Runtime/Base/ThreadContext.h
@@ -500,6 +500,7 @@
 private:
     PTHREADCONTEXT_HANDLE m_remoteThreadContextInfo;
     intptr_t m_prereservedRegionAddr;
+    intptr_t m_jitThunkStartAddr;
 
 #if ENABLE_NATIVE_CODEGEN
     BVSparse<HeapAllocator> * m_jitNumericProperties;
@@ -509,6 +510,10 @@
     {
         return m_prereservedRegionAddr;
     }
+    intptr_t GetJITThunkStartAddr()
+    {
+        return m_jitThunkStartAddr;
+    }
     BVSparse<HeapAllocator> * GetJITNumericProperties() const
     {
         return m_jitNumericProperties;
@@ -714,6 +719,9 @@
     CustomHeap::InProcCodePageAllocators thunkPageAllocators;
 #endif
     CustomHeap::InProcCodePageAllocators codePageAllocators;
+#if defined(_CONTROL_FLOW_GUARD) && (_M_IX86 || _M_X64)
+    InProcJITThunkEmitter jitThunkEmitter;
+#endif
 #endif
 
     RecyclerRootPtr<RecyclableData> recyclableData;
@@ -868,6 +876,10 @@
     CustomHeap::InProcCodePageAllocators * GetThunkPageAllocators() { return &thunkPageAllocators; }
 #endif
     CustomHeap::InProcCodePageAllocators * GetCodePageAllocators() { return &codePageAllocators; }
+
+#if defined(_CONTROL_FLOW_GUARD) && (_M_IX86 || _M_X64)
+    InProcJITThunkEmitter * GetJITThunkEmitter() { return &jitThunkEmitter; }
+#endif
 #endif // ENABLE_NATIVE_CODEGEN
 
     CriticalSection* GetFunctionBodyLock() { return &csFunctionBody; }
@@ -1050,7 +1062,7 @@
             jobProcessor->Close();
         }
 
-        if (JITManager::GetJITManager()->IsOOPJITEnabled() && m_remoteThreadContextInfo)
+        if (JITManager::GetJITManager()->IsOOPJITEnabled() && JITManager::GetJITManager()->IsConnected() && m_remoteThreadContextInfo)
         {
             if (JITManager::GetJITManager()->CleanupThreadContext(&m_remoteThreadContextInfo) == S_OK)
             {
diff --git a/lib/Runtime/ByteCode/ByteCodeCacheReleaseFileVersion.h b/lib/Runtime/ByteCode/ByteCodeCacheReleaseFileVersion.h
index 442e1bf..c91f6ba 100644
--- a/lib/Runtime/ByteCode/ByteCodeCacheReleaseFileVersion.h
+++ b/lib/Runtime/ByteCode/ByteCodeCacheReleaseFileVersion.h
@@ -4,6 +4,6 @@
 //-------------------------------------------------------------------------------------------------------
 // NOTE: If there is a merge conflict the correct fix is to make a new GUID.
 
-// {1a8e3edd-d08b-4a53-92d9-199667c17520}
+// {bda4bd8f-ebf1-4bb3-9763-76fee220e6f8}
 const GUID byteCodeCacheReleaseFileVersion =
-{ 0x1a8e3edd, 0xd08b, 0x4a53, { 0x92, 0xd9, 0x19, 0x96, 0x67, 0xc1, 0x75, 0x20 } };
+{ 0xbda4bd8f, 0xebf1, 0x4bb3, { 0x97, 0x63, 0x76, 0xfe, 0xe2, 0x20, 0xe6, 0xf8 } };
diff --git a/lib/Runtime/ByteCode/ByteCodeGenerator.cpp b/lib/Runtime/ByteCode/ByteCodeGenerator.cpp
index 7ff1c8d..2e83ef5 100644
--- a/lib/Runtime/ByteCode/ByteCodeGenerator.cpp
+++ b/lib/Runtime/ByteCode/ByteCodeGenerator.cpp
@@ -1182,7 +1182,7 @@
     bool funcExprWithName;
     Js::ParseableFunctionInfo* parseableFunctionInfo = nullptr;
 
-    Js::AutoRestoreFunctionInfo autoRestoreFunctionInfo(reuseNestedFunc, reuseNestedFunc ? reuseNestedFunc->GetOriginalEntryPoint() : nullptr);
+    Js::AutoRestoreFunctionInfo autoRestoreFunctionInfo(reuseNestedFunc, reuseNestedFunc ? reuseNestedFunc->GetOriginalEntryPoint_Unchecked() : nullptr);
 
     if (this->pCurrentFunction &&
         this->pCurrentFunction->IsFunctionParsed())
@@ -2280,7 +2280,7 @@
         {
             Assert(false);
         }
-        UInt16Math::Inc(pos);
+        ArgSlotMath::Inc(pos);
     };
 
     // We process rest separately because the number of in args needs to exclude rest.
@@ -2440,7 +2440,7 @@
         // Process the formal arguments, even if there's no AST for the body, to support Function.length.
         Js::ArgSlot pos = 1;
         // We skip the rest parameter here because it is not counted towards the in arg count.
-        MapFormalsWithoutRest(pnode, [&](ParseNode *pnode) { UInt16Math::Inc(pos); });
+        MapFormalsWithoutRest(pnode, [&](ParseNode *pnode) { ArgSlotMath::Inc(pos); });
         byteCodeGenerator->SetNumberOfInArgs(pos);
         return funcInfo;
     }
@@ -3130,7 +3130,7 @@
     FuncInfo *funcHome = sym->GetScope()->GetFunc();
     FuncInfo *funcChild = funcHome->GetCurrentChildFunction();
 
-    Assert(sym->NeedsSlotAlloc(funcHome) || sym->GetIsGlobal() || sym->GetIsModuleImport());
+    Assert(sym->NeedsSlotAlloc(funcHome) || sym->GetIsGlobal() || sym->GetIsModuleImport() || sym->GetIsModuleExportStorage());
 
     // If this is not a local property, or not all its references can be tracked, or
     // it's not scoped to the function, or we're in debug mode, disable the delayed capture optimization.
diff --git a/lib/Runtime/ByteCode/ByteCodeSerializer.cpp b/lib/Runtime/ByteCode/ByteCodeSerializer.cpp
index 2181aa5..2bc3068 100644
--- a/lib/Runtime/ByteCode/ByteCodeSerializer.cpp
+++ b/lib/Runtime/ByteCode/ByteCodeSerializer.cpp
@@ -1821,7 +1821,6 @@
         size += PrependInt16(builder, _u("ArgSizeArrayLength"), funcInfo->GetArgSizeArrayLength());
         size += PrependUInt32Array(builder, funcInfo->GetArgSizeArrayLength(), funcInfo->GetArgsSizesArray());
         size += PrependByteArray(builder, funcInfo->GetArgCount(), (byte*)funcInfo->GetArgTypeArray());
-        size += PrependByte(builder, _u("IsHeapBufferConst"), funcInfo->IsHeapBufferConst());
         size += PrependByte(builder, _u("UsesHeapBuffer"), funcInfo->UsesHeapBuffer());
         for (int i = WAsmJs::LIMIT - 1; i >= 0; --i)
         {
@@ -1935,8 +1934,6 @@
         size += PrependStruct(builder, _u("SIMDBuiltinBV"), &moduleInfo->GetAsmSimdBuiltinUsed());
 
         size += PrependInt32(builder, _u("MaxHeapAccess"), moduleInfo->GetMaxHeapAccess());
-        size += PrependByte(builder, _u("UsesChangeHeap"), moduleInfo->GetUsesChangeHeap());
-
 
 #ifdef BYTE_CODE_MAGIC_CONSTANTS
         size += PrependInt32(builder, _u("End Asm.js Module Info"), magicEndOfAsmJsModuleInfo);
@@ -3317,8 +3314,6 @@
 
         bool boolVal;
         current = ReadBool(current, &boolVal);
-        funcInfo->SetIsHeapBufferConst(boolVal);
-        current = ReadBool(current, &boolVal);
         funcInfo->SetUsesHeapBuffer(boolVal);
 
         for (int i = WAsmJs::LIMIT - 1; i >= 0; --i)
@@ -3499,10 +3494,6 @@
         current = ReadUInt32(current, &maxAccess);
         moduleInfo->SetMaxHeapAccess(maxAccess);
 
-        bool usesChangeHeap;
-        current = ReadBool(current, &usesChangeHeap);
-        moduleInfo->SetUsesChangeHeap(usesChangeHeap);
-
 #ifdef BYTE_CODE_MAGIC_CONSTANTS
         current = ReadInt32(current, &constant);
         Assert(constant == magicEndOfAsmJsModuleInfo);
diff --git a/lib/Runtime/ByteCode/OpCodes.cpp b/lib/Runtime/ByteCode/OpCodes.cpp
index 64c6565..e9c3cea 100644
--- a/lib/Runtime/ByteCode/OpCodes.cpp
+++ b/lib/Runtime/ByteCode/OpCodes.cpp
@@ -4,9 +4,6 @@
 //-------------------------------------------------------------------------------------------------------
 #include "RuntimeByteCodePch.h"
 
-// We only have one extended range so maximum number of opcode is only 512 unless we add more extended ranges.
-CompileAssert((uint)Js::OpCode::ByteCodeLast < 512);
-
 // Make sure all basic opcode with no one byte layout fits in a byte.
 #define MACRO(opcode, layout, attr) CompileAssert((uint)Js::OpCode::opcode <= BYTE_MAX);
 #define MACRO_WMS(opcode, layout, attr) CompileAssert((uint)Js::OpCode::opcode <= BYTE_MAX);
@@ -16,3 +13,15 @@
 #define MACRO_EXTEND_WMS(opcode, layout, attr)  CompileAssert((uint)Js::OpCode::opcode > BYTE_MAX);
 
 #include "OpCodes.h"
+
+#ifdef ASMJS_PLAT
+// Make sure all basic opcode with no one byte layout fits in a byte.
+#define MACRO(opcode, layout, attr) CompileAssert((uint)Js::OpCodeAsmJs::opcode <= BYTE_MAX);
+#define MACRO_WMS(opcode, layout, attr) CompileAssert((uint)Js::OpCodeAsmJs::opcode <= BYTE_MAX);
+
+// Make sure all extended opcode needs two bytes.
+#define MACRO_EXTEND(opcode, layout, attr) CompileAssert((uint)Js::OpCodeAsmJs::opcode > BYTE_MAX);
+#define MACRO_EXTEND_WMS(opcode, layout, attr)  CompileAssert((uint)Js::OpCodeAsmJs::opcode > BYTE_MAX);
+
+#include "OpCodesAsmJs.h"
+#endif
diff --git a/lib/Runtime/ByteCode/OpCodes.h b/lib/Runtime/ByteCode/OpCodes.h
index 230f00b..149e79c 100755
--- a/lib/Runtime/ByteCode/OpCodes.h
+++ b/lib/Runtime/ByteCode/OpCodes.h
@@ -62,8 +62,6 @@
 MACRO(                  Nop,                        Empty,          None)       // No operation (Default value = 0)
 MACRO(                  StartCall,          StartCall,      OpSideEffect)
 MACRO_BACKEND_ONLY(     LoweredStartCall,   StartCall,      OpSideEffect)       // StartCall instruction after it's been lowered
-MACRO_BACKEND_ONLY(     StartCallAsmJsI,    StartCall,      OpSideEffect)       // StartCall instruction for asm.js internal calls
-MACRO_BACKEND_ONLY(     StartCallAsmJsE,    StartCall,      OpSideEffect)       // StartCall instruction for calls from asm.js to javascript
 MACRO(                  Break,              Empty,          OpSideEffect)       // Break into debugger
 MACRO_EXTEND(           InvalidOpCode,      Empty,          None)               // Inserted in a dead call sequence, should not be present after GlobOpt
 
@@ -168,7 +166,6 @@
 MACRO_WMS(              Yield,              Reg2,           OpSideEffect|OpUseAllFields)                        // Yield from generator function
 MACRO_WMS(              ResumeYield,        Reg2,           OpSideEffect)
 MACRO_WMS(              ResumeYieldStar,    Reg3,           OpSideEffect)
-MACRO_EXTEND_WMS(       AsyncSpawn,         Reg3,           OpSideEffect|OpUseAllFields)
 
 // Unary operations
 MACRO_WMS(              Incr_A,             Reg2,           OpTempNumberProducing|OpOpndHasImplicitCall|OpDoNotTransfer|OpTempNumberSources|OpTempObjectSources|OpCanCSE|OpPostOpDbgBailOut|OpProducesNumber)     // Increment
@@ -216,18 +213,18 @@
 MACRO_BACKEND_ONLY(     Sub_I4,             Empty,          OpTempNumberSources|OpCanCSE)                                    // int32 Arithmetic '-' (subtract)
 MACRO_BACKEND_ONLY(     Mul_I4,             Empty,          OpTempNumberSources|OpCanCSE)                                    // int32 Arithmetic '*'
 MACRO_BACKEND_ONLY(     Div_I4,             Empty,          OpTempNumberSources|OpCanCSE)                                    // int32 Arithmetic '/'
+MACRO_BACKEND_ONLY(     DivU_I4,            Empty,          OpTempNumberSources|OpCanCSE)                                    // uint32 Arithmetic '/'
 MACRO_BACKEND_ONLY(     Rem_I4,             Empty,          OpTempNumberSources|OpCanCSE)                                    // int32 Arithmetic '%'
+MACRO_BACKEND_ONLY(     RemU_I4,            Empty,          OpTempNumberSources|OpCanCSE)                                    // uint32 Arithmetic '%'
 MACRO_BACKEND_ONLY(     And_I4,             Empty,          OpTempNumberSources|OpCanCSE)                                    // int32 Bitwise '&'
 MACRO_BACKEND_ONLY(     Or_I4,              Empty,          OpTempNumberSources|OpCanCSE)                                    // int32 Bitwise '|'
 MACRO_BACKEND_ONLY(     Xor_I4,             Empty,          OpTempNumberSources|OpCanCSE)                                    // int32 Bitwise '^'
 MACRO_BACKEND_ONLY(     Shl_I4,             Empty,          OpTempNumberSources|OpCanCSE)                                    // int32 Shift '<<' (signed, truncate)
 MACRO_BACKEND_ONLY(     Shr_I4,             Empty,          OpTempNumberSources|OpCanCSE)                                    // int32 Shift '>>' (signed, truncate)
-MACRO_BACKEND_ONLY(     ShrU_I4,            Empty,          OpTempNumberSources|OpCanCSE)                                    // int32 Shift '>>>'(unsigned, truncate)
+MACRO_BACKEND_ONLY(     ShrU_I4,            Empty,          OpTempNumberSources|OpCanCSE)                                    // uint32 Shift '>>>'(unsigned, truncate)
 MACRO_BACKEND_ONLY(     Rol_I4,             Empty,          OpTempNumberSources|OpCanCSE)                                    // int32 rol (signed)
 MACRO_BACKEND_ONLY(     Ror_I4,             Empty,          OpTempNumberSources|OpCanCSE)                                    // int32 ror (signed)
 
-MACRO_BACKEND_ONLY(     Add_Ptr,            Empty,          OpTempNumberSources|OpCanCSE)                                    // ptr Arithmetic '+'
-
 // Comparison
 MACRO_WMS(              CmEq_A,             Reg3,           OpOpndHasImplicitCall|OpTempNumberSources|OpTempObjectSources|OpCanCSE)                          // Compare if '=='  (general equals)
 MACRO_WMS(              CmGe_A,             Reg3,           OpOpndHasImplicitCall|OpTempNumberSources|OpTempObjectSources|OpCanCSE|OpPostOpDbgBailOut)       // Compare if '>='
diff --git a/lib/Runtime/ByteCode/OpCodesAsmJs.h b/lib/Runtime/ByteCode/OpCodesAsmJs.h
index e446dd7..248dd9b 100755
--- a/lib/Runtime/ByteCode/OpCodesAsmJs.h
+++ b/lib/Runtime/ByteCode/OpCodesAsmJs.h
@@ -137,9 +137,9 @@
 MACRO_WMS       ( Sub_Int                    , Int3            , None            ) // int32 Arithmetic '-' (subtract)
 MACRO_WMS       ( Mul_Int                    , Int3            , None            ) // int32 Arithmetic '*'
 MACRO_WMS       ( Div_Int                    , Int3            , None            ) // int32 Arithmetic '/'
-MACRO_WMS       ( Div_Check_Int              , Int3            , None            ) // (checked) int32 Arithmetic '/'
+MACRO_WMS       ( Div_Trap_Int              , Int3            , None            ) // (checked) int32 Arithmetic '/'
 MACRO_WMS       ( Rem_Int                    , Int3            , None            ) // int32 Arithmetic '%'
-MACRO_WMS       ( Rem_Check_Int              , Int3            , None            ) // (checked) int32 Arithmetic '%'
+MACRO_WMS       ( Rem_Trap_Int              , Int3            , None            ) // (checked) int32 Arithmetic '%'
 MACRO_WMS       ( And_Int                    , Int3            , None            ) // int32 Bitwise '&'
 MACRO_WMS       ( Or_Int                     , Int3            , None            ) // int32 Bitwise '|'
 MACRO_WMS       ( Xor_Int                    , Int3            , None            ) // int32 Bitwise '^'
@@ -151,11 +151,10 @@
 MACRO_WMS       ( PopCnt_Int                 , Int2            , None            )
 
 // Unsigned int math
-MACRO_WMS       ( Mul_UInt                   , Int3            , None            ) // uint32 Arithmetic '*'
 MACRO_WMS       ( Div_UInt                   , Int3            , None            ) // uint32 Arithmetic '/'
-MACRO_WMS       ( Div_Check_UInt             , Int3            , None            ) // (checked) uint32 Arithmetic '/'
+MACRO_WMS       ( Div_Trap_UInt             , Int3            , None            ) // (checked) uint32 Arithmetic '/'
 MACRO_WMS       ( Rem_UInt                   , Int3            , None            ) // uint32 Arithmetic '%'
-MACRO_WMS       ( Rem_Check_UInt             , Int3            , None            ) // (checked) uint32 Arithmetic '%'
+MACRO_WMS       ( Rem_Trap_UInt             , Int3            , None            ) // (checked) uint32 Arithmetic '%'
 
 // Int64 Math
 MACRO_WMS       ( Ld_LongConst               , Long1Const1      , None            ) // Sets an int64 register from a const int64
@@ -163,10 +162,10 @@
 MACRO_WMS       ( Add_Long                   , Long3            , None            ) // int64 Arithmetic '+'
 MACRO_WMS       ( Sub_Long                   , Long3            , None            ) // int64 Arithmetic '-' (subtract)
 MACRO_WMS       ( Mul_Long                   , Long3            , None            ) // int64 Arithmetic '*'
-MACRO_WMS       ( Div_Long                   , Long3            , None            ) // int64 Arithmetic '/'
-MACRO_WMS       ( Div_ULong                  , Long3            , None            ) // uint64 Arithmetic '/'
-MACRO_WMS       ( Rem_Long                   , Long3            , None            ) // int64 Arithmetic '%'
-MACRO_WMS       ( Rem_ULong                  , Long3            , None            ) // uint64 Arithmetic '%'
+MACRO_WMS       ( Div_Trap_Long              , Long3            , None            ) // int64 Arithmetic '/'
+MACRO_WMS       ( Div_Trap_ULong             , Long3            , None            ) // uint64 Arithmetic '/'
+MACRO_WMS       ( Rem_Trap_Long              , Long3            , None            ) // int64 Arithmetic '%'
+MACRO_WMS       ( Rem_Trap_ULong             , Long3            , None            ) // uint64 Arithmetic '%'
 MACRO_WMS       ( And_Long                   , Long3            , None            ) // int64 Bitwise '&'
 MACRO_WMS       ( Or_Long                    , Long3            , None            ) // int64 Bitwise '|'
 MACRO_WMS       ( Xor_Long                   , Long3            , None            ) // int64 Bitwise '^'
diff --git a/lib/Runtime/Language/AsmJs.cpp b/lib/Runtime/Language/AsmJs.cpp
index 5516a49..67b41be 100644
--- a/lib/Runtime/Language/AsmJs.cpp
+++ b/lib/Runtime/Language/AsmJs.cpp
@@ -139,7 +139,6 @@
         case knopCall: {
             ParseNode* target;
             AsmJsFunctionDeclaration* sym;
-            AsmJsMathFunction* mathSym;
             AsmJsSIMDFunction* simdSym;
 
             target = coercionNode->sxCall.pnodeTarget;
@@ -210,9 +209,8 @@
 
             *coercion = AsmJS_FRound;
             sym = m.LookupFunction(target->name());
-            mathSym = (AsmJsMathFunction*)sym;
 
-            if (!(mathSym && mathSym->GetMathBuiltInFunction() == AsmJSMathBuiltin_fround))
+            if (!AsmJsMathFunction::IsFround(sym))
             {
                 return m.Fail( coercionNode, _u("call must be to fround coercion") );
             }
diff --git a/lib/Runtime/Language/AsmJsBuiltInNames.h b/lib/Runtime/Language/AsmJsBuiltInNames.h
index 0a6b6d2..34b6db3 100644
--- a/lib/Runtime/Language/AsmJsBuiltInNames.h
+++ b/lib/Runtime/Language/AsmJsBuiltInNames.h
@@ -5,17 +5,25 @@
 
 // Default all macros to nothing
 #ifndef ASMJS_MATH_FUNC_NAMES
-#define ASMJS_MATH_FUNC_NAMES(name, propertyName)
+#define ASMJS_MATH_FUNC_NAMES(name, propertyName, funcInfo)
 #endif
 
 #ifndef ASMJS_MATH_CONST_NAMES
-#define ASMJS_MATH_CONST_NAMES(name, propertyName)
+#define ASMJS_MATH_CONST_NAMES(name, propertyName, value)
+#endif
+
+#ifndef ASMJS_MATH_DOUBLE_CONST_NAMES
+#define ASMJS_MATH_DOUBLE_CONST_NAMES(name, propertyName, value) ASMJS_MATH_CONST_NAMES(name, propertyName, value)
 #endif
 
 #ifndef ASMJS_ARRAY_NAMES
 #define ASMJS_ARRAY_NAMES(name, propertyName)
 #endif
 
+#ifndef ASMJS_TYPED_ARRAY_NAMES
+#define ASMJS_TYPED_ARRAY_NAMES(name, propertyName) ASMJS_ARRAY_NAMES(name, propertyName)
+#endif
+
 // ASMJS_SIMD_NAMES includes all constructors and operations
 #ifdef ASMJS_SIMD_NAMES
 #define ASMJS_SIMD_C_NAMES(name, propertyName, libName, entryPoint) ASMJS_SIMD_NAMES(name, propertyName, libName, entryPoint)
@@ -38,45 +46,45 @@
 #define ASMJS_SIMD_MARKERS(name)
 #endif
 
-ASMJS_MATH_FUNC_NAMES(sin,      sin)
-ASMJS_MATH_FUNC_NAMES(cos,      cos)
-ASMJS_MATH_FUNC_NAMES(tan,      tan)
-ASMJS_MATH_FUNC_NAMES(asin,     asin)
-ASMJS_MATH_FUNC_NAMES(acos,     acos)
-ASMJS_MATH_FUNC_NAMES(atan,     atan)
-ASMJS_MATH_FUNC_NAMES(ceil,     ceil)
-ASMJS_MATH_FUNC_NAMES(floor,    floor)
-ASMJS_MATH_FUNC_NAMES(exp,      exp)
-ASMJS_MATH_FUNC_NAMES(log,      log)
-ASMJS_MATH_FUNC_NAMES(pow,      pow)
-ASMJS_MATH_FUNC_NAMES(sqrt,     sqrt)
-ASMJS_MATH_FUNC_NAMES(abs,      abs)
-ASMJS_MATH_FUNC_NAMES(atan2,    atan2)
-ASMJS_MATH_FUNC_NAMES(imul,     imul)
-ASMJS_MATH_FUNC_NAMES(fround,   fround)
-ASMJS_MATH_FUNC_NAMES(min,      min)
-ASMJS_MATH_FUNC_NAMES(max,      max)
-ASMJS_MATH_FUNC_NAMES(clz32,    clz32)
+ASMJS_MATH_FUNC_NAMES(sin,      sin,    Math::EntryInfo::Sin    )
+ASMJS_MATH_FUNC_NAMES(cos,      cos,    Math::EntryInfo::Cos    )
+ASMJS_MATH_FUNC_NAMES(tan,      tan,    Math::EntryInfo::Tan    )
+ASMJS_MATH_FUNC_NAMES(asin,     asin,   Math::EntryInfo::Asin   )
+ASMJS_MATH_FUNC_NAMES(acos,     acos,   Math::EntryInfo::Acos   )
+ASMJS_MATH_FUNC_NAMES(atan,     atan,   Math::EntryInfo::Atan   )
+ASMJS_MATH_FUNC_NAMES(ceil,     ceil,   Math::EntryInfo::Ceil   )
+ASMJS_MATH_FUNC_NAMES(floor,    floor,  Math::EntryInfo::Floor  )
+ASMJS_MATH_FUNC_NAMES(exp,      exp,    Math::EntryInfo::Exp    )
+ASMJS_MATH_FUNC_NAMES(log,      log,    Math::EntryInfo::Log    )
+ASMJS_MATH_FUNC_NAMES(pow,      pow,    Math::EntryInfo::Pow    )
+ASMJS_MATH_FUNC_NAMES(sqrt,     sqrt,   Math::EntryInfo::Sqrt   )
+ASMJS_MATH_FUNC_NAMES(abs,      abs,    Math::EntryInfo::Abs    )
+ASMJS_MATH_FUNC_NAMES(atan2,    atan2,  Math::EntryInfo::Atan2  )
+ASMJS_MATH_FUNC_NAMES(imul,     imul,   Math::EntryInfo::Imul   )
+ASMJS_MATH_FUNC_NAMES(fround,   fround, Math::EntryInfo::Fround )
+ASMJS_MATH_FUNC_NAMES(min,      min,    Math::EntryInfo::Min    )
+ASMJS_MATH_FUNC_NAMES(max,      max,    Math::EntryInfo::Max    )
+ASMJS_MATH_FUNC_NAMES(clz32,    clz32,  Math::EntryInfo::Clz32  )
 
-ASMJS_MATH_CONST_NAMES(e,           E)
-ASMJS_MATH_CONST_NAMES(ln10,        LN10)
-ASMJS_MATH_CONST_NAMES(ln2,         LN2)
-ASMJS_MATH_CONST_NAMES(log2e,       LOG2E)
-ASMJS_MATH_CONST_NAMES(log10e,      LOG10E)
-ASMJS_MATH_CONST_NAMES(pi,          PI)
-ASMJS_MATH_CONST_NAMES(sqrt1_2,     SQRT1_2)
-ASMJS_MATH_CONST_NAMES(sqrt2,       SQRT2)
-ASMJS_MATH_CONST_NAMES(infinity,    Infinity)
-ASMJS_MATH_CONST_NAMES(nan,         NaN)
+ASMJS_MATH_DOUBLE_CONST_NAMES(e,        E,        Math::E       )
+ASMJS_MATH_DOUBLE_CONST_NAMES(ln10,     LN10,     Math::LN10    )
+ASMJS_MATH_DOUBLE_CONST_NAMES(ln2,      LN2,      Math::LN2     )
+ASMJS_MATH_DOUBLE_CONST_NAMES(log2e,    LOG2E,    Math::LOG2E   )
+ASMJS_MATH_DOUBLE_CONST_NAMES(log10e,   LOG10E,   Math::LOG10E  )
+ASMJS_MATH_DOUBLE_CONST_NAMES(pi,       PI,       Math::PI      )
+ASMJS_MATH_DOUBLE_CONST_NAMES(sqrt1_2,  SQRT1_2,  Math::SQRT1_2 )
+ASMJS_MATH_DOUBLE_CONST_NAMES(sqrt2,    SQRT2,    Math::SQRT2   )
+ASMJS_MATH_CONST_NAMES(infinity, Infinity, 0             )
+ASMJS_MATH_CONST_NAMES(nan,      NaN,      0             )
 
-ASMJS_ARRAY_NAMES(Uint8Array,   Uint8Array)
-ASMJS_ARRAY_NAMES(Int8Array,    Int8Array)
-ASMJS_ARRAY_NAMES(Uint16Array,  Uint16Array)
-ASMJS_ARRAY_NAMES(Int16Array,   Int16Array)
-ASMJS_ARRAY_NAMES(Uint32Array,  Uint32Array)
-ASMJS_ARRAY_NAMES(Int32Array,   Int32Array)
-ASMJS_ARRAY_NAMES(Float32Array, Float32Array)
-ASMJS_ARRAY_NAMES(Float64Array, Float64Array)
+ASMJS_TYPED_ARRAY_NAMES(Uint8Array,   Uint8Array)
+ASMJS_TYPED_ARRAY_NAMES(Int8Array,    Int8Array)
+ASMJS_TYPED_ARRAY_NAMES(Uint16Array,  Uint16Array)
+ASMJS_TYPED_ARRAY_NAMES(Int16Array,   Int16Array)
+ASMJS_TYPED_ARRAY_NAMES(Uint32Array,  Uint32Array)
+ASMJS_TYPED_ARRAY_NAMES(Int32Array,   Int32Array)
+ASMJS_TYPED_ARRAY_NAMES(Float32Array, Float32Array)
+ASMJS_TYPED_ARRAY_NAMES(Float64Array, Float64Array)
 ASMJS_ARRAY_NAMES(byteLength,   byteLength)
 
 // Int32x4
@@ -449,7 +457,9 @@
 // help the caller to undefine all the macros
 #undef ASMJS_MATH_FUNC_NAMES
 #undef ASMJS_MATH_CONST_NAMES
+#undef ASMJS_MATH_DOUBLE_CONST_NAMES
 #undef ASMJS_ARRAY_NAMES
+#undef ASMJS_TYPED_ARRAY_NAMES
 #undef ASMJS_SIMD_NAMES
 #undef ASMJS_SIMD_C_NAMES
 #undef ASMJS_SIMD_O_NAMES
diff --git a/lib/Runtime/Language/AsmJsByteCodeGenerator.cpp b/lib/Runtime/Language/AsmJsByteCodeGenerator.cpp
index 0646117..15be974 100644
--- a/lib/Runtime/Language/AsmJsByteCodeGenerator.cpp
+++ b/lib/Runtime/Language/AsmJsByteCodeGenerator.cpp
@@ -92,7 +92,6 @@
         , mCompiler( compiler )
         , mByteCodeGenerator(mCompiler->GetByteCodeGenerator())
         , mNestedCallCount(0)
-        , mIsCallLegal(true)
     {
         mWriter.Create();
 
@@ -885,11 +884,6 @@
         return emitInfo;
     }
 
-    bool AsmJSByteCodeGenerator::IsFRound(AsmJsMathFunction* sym)
-    {
-        return (sym && sym->GetMathBuiltInFunction() == AsmJSMathBuiltin_fround);
-    }
-
     bool AsmJSByteCodeGenerator::IsValidSimdFcnRetType(AsmJsSIMDFunction& simdFunction, const AsmJsRetType& expectedType, const AsmJsRetType& retType)
     {
         // Return types of simd builtins can be coereced to other asmjs types when a valid coercion exists
@@ -1043,18 +1037,11 @@
             }
         }
 
-
-        if (IsFRound((AsmJsMathFunction*)sym))
-        {
-            expectedType = AsmJsRetType::Float;
-        }
-
-
         const bool isFFI = sym->GetSymbolType() == AsmJsSymbol::ImportFunction;
         const bool isMathBuiltin = sym->GetSymbolType() == AsmJsSymbol::MathBuiltinFunction;
-        if( isMathBuiltin )
+        if(isMathBuiltin)
         {
-            return EmitMathBuiltin( pnode, sym->Cast<AsmJsMathFunction>(), expectedType );
+            return EmitMathBuiltin(pnode, sym->Cast<AsmJsMathFunction>());
         }
 
         // math builtins have different requirements for call-site coercion
@@ -1062,11 +1049,6 @@
         {
             throw AsmJsCompilationException(_u("Different return type found for function %s"), funcName->Psz());
         }
-        if (!mIsCallLegal)
-        {
-            Assert(!isMathBuiltin); // math builtins cannot change heap, so they are specifically excluded from this rule
-            throw AsmJsCompilationException(_u("Call is not legal at this location"));
-        }
         const int StartCallIndex = 0;
         const int CallIndex = 1;
         const int ArgOut_DbIndex = 2;
@@ -1097,7 +1079,7 @@
         else
         {
             // args size + 1 pointer
-            const ArgSlot argByteSize = UInt16Math::Add(sym->GetArgByteSize(argCount), sizeof(Var));
+            const ArgSlot argByteSize = ArgSlotMath::Add(sym->GetArgByteSize(argCount), sizeof(Var));
             mWriter.AsmStartCall(callOpCode[funcOpCode][StartCallIndex], argByteSize);
         }
         AutoArrayPtr<AsmJsType> types(nullptr, 0);
@@ -1230,16 +1212,16 @@
             throw AsmJsCompilationException( _u("Function %s returns different type"), funcName->Psz() );
         }
 
-        const ArgSlot argByteSize = UInt16Math::Add(sym->GetArgByteSize(argCount), sizeof(Var));
+        const ArgSlot argByteSize = ArgSlotMath::Add(sym->GetArgByteSize(argCount), sizeof(Var));
         // +1 is for function object
-        ArgSlot runtimeArg = UInt16Math::Add(argCount, 1);
+        ArgSlot runtimeArg = ArgSlotMath::Add(argCount, 1);
         if (funcOpCode == 1) // for non import functions runtimeArg is calculated from argByteSize
         {
             runtimeArg = (ArgSlot)(::ceil((double)(argByteSize / sizeof(Var)))) + 1;
         }
 
         // +1 is for return address
-        maxDepthForLevel += UInt16Math::Add(runtimeArg, 1);
+        maxDepthForLevel += ArgSlotMath::Add(runtimeArg, 1);
 
         // Make sure we have enough memory allocated for OutParameters
         if (mNestedCallCount > 1)
@@ -1483,8 +1465,7 @@
                                   simdFunc->GetSimdBuiltInFunction() == AsmJsSIMDBuiltinFunction::AsmJsSIMDBuiltin_float32x4_splat ||                                /*splat all args*/
                                  (i == 2 && simdFunc->GetSimdBuiltInFunction() == AsmJsSIMDBuiltinFunction::AsmJsSIMDBuiltin_float32x4_replaceLane))
                         {
-
-                            if (argCall && argCall->GetSymbolType() == AsmJsSymbol::MathBuiltinFunction && IsFRound(argCall->Cast<AsmJsMathFunction>()))
+                            if (AsmJsMathFunction::IsFround(argCall))
                             {
                                 argInfo = EmitCall(arg, AsmJsRetType::Float);
                             }
@@ -1793,11 +1774,7 @@
         uint32 indexSlot = 0;
         TypedArrayEmitType emitType = simdFunction->IsSimdLoadFunc() ? TypedArrayEmitType::LoadTypedArray : TypedArrayEmitType::StoreTypedArray;
 
-        // if changeHeap is implemented, calls are illegal in index expression
-        bool wasCallLegal = mIsCallLegal;
-        mIsCallLegal = !mCompiler->UsesChangeHeap();
         EmitExpressionInfo indexInfo = EmitTypedArrayIndex(indexNode, op, indexSlot, viewType, emitType);
-        mIsCallLegal = wasCallLegal;
 
         EmitExpressionInfo valueInfo = { 0, AsmJsType::Void };
         // convert opcode to const if needed
@@ -1944,45 +1921,43 @@
         return emitInfo;
     }
 
-    EmitExpressionInfo AsmJSByteCodeGenerator::EmitMathBuiltin(ParseNode* pnode, AsmJsMathFunction* mathFunction, AsmJsRetType expectedType)
+    EmitExpressionInfo AsmJSByteCodeGenerator::EmitMathBuiltin(ParseNode* pnode, AsmJsMathFunction* mathFunction)
     {
         if (mathFunction->GetMathBuiltInFunction() == AsmJSMathBuiltinFunction::AsmJSMathBuiltin_max || mathFunction->GetMathBuiltInFunction() == AsmJSMathBuiltinFunction::AsmJSMathBuiltin_min)
         {
-            return EmitMinMax(pnode, mathFunction, expectedType);
+            return EmitMinMax(pnode, mathFunction);
         }
 
         ++mNestedCallCount;
 
         const ArgSlot argCount = pnode->sxCall.argCount;
         ParseNode* argNode = pnode->sxCall.pnodeArgs;
+        const bool isFRound = AsmJsMathFunction::IsFround(mathFunction);
 
         // for fround, if we have a fround(NumericLiteral), we want to just emit Ld_Flt NumericLiteral
-        if (argCount == 1 && IsFRound(mathFunction) && ParserWrapper::IsFroundNumericLiteral(argNode))
+        if (argCount == 1 && isFRound && ParserWrapper::IsFroundNumericLiteral(argNode))
         {
-            Assert(expectedType == AsmJsRetType::Float);
             StartStatement(pnode);
             RegSlot dst = mFunction->AcquireTmpRegister<float>();
-            EmitExpressionInfo emitInfo(dst, expectedType.toType());
+            EmitExpressionInfo emitInfo(dst, AsmJsType::Float);
+            float constValue = -0.0f;
             if (argNode->nop == knopFlt)
             {
-                mWriter.AsmReg2(OpCodeAsmJs::Ld_Flt, dst, mFunction->GetConstRegister<float>((float)argNode->sxFlt.dbl));
+                constValue = (float)argNode->sxFlt.dbl;
             }
             else if (argNode->nop == knopInt)
             {
-                mWriter.AsmReg2(OpCodeAsmJs::Ld_Flt, dst, mFunction->GetConstRegister<float>((float)argNode->sxInt.lw));
+                constValue = (float)argNode->sxInt.lw;
             }
             else
             {
                 Assert(ParserWrapper::IsNegativeZero(argNode));
-                mWriter.AsmReg2(OpCodeAsmJs::Ld_Flt, dst, mFunction->GetConstRegister<float>(-0.0f));
             }
+            mWriter.AsmReg2(OpCodeAsmJs::Ld_Flt, dst, mFunction->GetConstRegister<float>(constValue));
             EndStatement(pnode);
             return emitInfo;
         }
 
-        // The logic here is similar to EmitSimdBuiltinArguments()
-        // TODO: Maybe outline this to EmitArguments() after RI. Currently it is causing frequent conflicts upon FI.
-
         AutoArrayPtr<AsmJsType> types(nullptr, 0);
         AutoArrayPtr<EmitExpressionInfo> argsInfo(nullptr, 0);
         int maxDepthForLevel = mFunction->GetArgOutDepth();
@@ -1996,7 +1971,7 @@
                 // Get i arg node
                 ParseNode* arg = argNode;
                 // Special case for fround(abs()) call
-                if (argNode->nop == knopCall && mathFunction->GetMathBuiltInFunction() == AsmJSMathBuiltinFunction::AsmJSMathBuiltin_fround)
+                if (argNode->nop == knopCall && isFRound)
                 {
                     // Emit argument
                     const EmitExpressionInfo& argInfo = EmitCall(arg, AsmJsRetType::Float);
@@ -2110,7 +2085,7 @@
         return emitInfo;
     }
 
-    EmitExpressionInfo AsmJSByteCodeGenerator::EmitMinMax(ParseNode* pnode, AsmJsMathFunction* mathFunction, AsmJsRetType expectedType)
+    EmitExpressionInfo AsmJSByteCodeGenerator::EmitMinMax(ParseNode* pnode, AsmJsMathFunction* mathFunction)
     {
         Assert(mathFunction->GetArgCount() == 2);
         ++mNestedCallCount;
@@ -2519,11 +2494,7 @@
 
         OpCodeAsmJs op;
         uint32 indexSlot = 0;
-        // if changeHeap is implemented, calls are illegal in index expression
-        bool wasCallLegal = mIsCallLegal;
-        mIsCallLegal = !mCompiler->UsesChangeHeap();
         EmitExpressionInfo indexInfo = EmitTypedArrayIndex(indexNode, op, indexSlot, viewType, LoadTypedArray);
-        mIsCallLegal = wasCallLegal;
         mFunction->ReleaseLocationGeneric(&indexInfo);
 
         EmitExpressionInfo info( arrayView->GetType() );
@@ -2655,12 +2626,8 @@
 
             OpCodeAsmJs op;
             uint32 indexSlot = 0;
-            // if changeHeap is implemented, calls are illegal in index expression and on right hand side of assignments
-            bool wasCallLegal = mIsCallLegal;
-            mIsCallLegal = !mCompiler->UsesChangeHeap();
             EmitExpressionInfo indexInfo = EmitTypedArrayIndex(indexNode, op, indexSlot, viewType, StoreTypedArray);
             rhsEmit = Emit(rhs);
-            mIsCallLegal = wasCallLegal;
 
             if (viewType == ArrayBufferView::TYPE_FLOAT32)
             {
diff --git a/lib/Runtime/Language/AsmJsByteCodeGenerator.h b/lib/Runtime/Language/AsmJsByteCodeGenerator.h
index 13bb9d5..6131574 100644
--- a/lib/Runtime/Language/AsmJsByteCodeGenerator.h
+++ b/lib/Runtime/Language/AsmJsByteCodeGenerator.h
@@ -58,7 +58,6 @@
         ByteCodeGenerator* mByteCodeGenerator;
         AsmJsByteCodeWriter mWriter;
         int mNestedCallCount;
-        bool mIsCallLegal;
     public:
         AsmJSByteCodeGenerator(AsmJsFunc* func, AsmJsModuleCompiler* compiler);
         static void EmitEmptyByteCode(FuncInfo* funcInfo, ByteCodeGenerator* byteCodeGen, ParseNode* funcNode);
@@ -84,8 +83,8 @@
         EmitExpressionInfo EmitAssignment( ParseNode * pnode );
         EmitExpressionInfo EmitReturn( ParseNode * pnode );
         EmitExpressionInfo EmitCall( ParseNode * pnode, AsmJsRetType expectedType = AsmJsRetType::Void );
-        EmitExpressionInfo EmitMathBuiltin( ParseNode* pnode, AsmJsMathFunction* mathFunction, AsmJsRetType expectedType );
-        EmitExpressionInfo EmitMinMax(ParseNode* pnode, AsmJsMathFunction* mathFunction, AsmJsRetType expectedType);
+        EmitExpressionInfo EmitMathBuiltin( ParseNode* pnode, AsmJsMathFunction* mathFunction);
+        EmitExpressionInfo EmitMinMax(ParseNode* pnode, AsmJsMathFunction* mathFunction);
         EmitExpressionInfo EmitUnaryPos( ParseNode * pnode );
         EmitExpressionInfo EmitUnaryNeg( ParseNode * pnode );
         EmitExpressionInfo EmitUnaryNot( ParseNode * pnode );
@@ -133,7 +132,6 @@
         void SetModuleSimd(RegSlot dst, RegSlot src, AsmJsVarType type);
         void LoadSimd(RegSlot dst, RegSlot src, AsmJsVarType type);
 
-        bool IsFRound(AsmJsMathFunction* sym);
         bool IsValidSimdFcnRetType(AsmJsSIMDFunction& simdFunction, const AsmJsRetType& expectedType, const AsmJsRetType& retType);
         /// TODO:: Finish removing references to old bytecode generator
         ByteCodeGenerator* GetOldByteCodeGenerator() const
diff --git a/lib/Runtime/Language/AsmJsEncoderHandler.inl b/lib/Runtime/Language/AsmJsEncoderHandler.inl
index aea0890..2c34ebe 100644
--- a/lib/Runtime/Language/AsmJsEncoderHandler.inl
+++ b/lib/Runtime/Language/AsmJsEncoderHandler.inl
@@ -121,7 +121,6 @@
   DEF3_WMS( INT3       , Shr_Int           , Shr_Int                 , Int3          )
   DEF3_WMS( INT3       , Shr_UInt          , Shr_UInt                , Int3          )
 
-  DEF3_WMS( INT3       , Mul_UInt          , Mul_UInt                , Int3          )
   DEF3_WMS( INT3       , Div_UInt          , Div_UInt                , Int3          )
   DEF3_WMS( INT3       , Rem_UInt          , Rem_UInt                , Int3          )
 
diff --git a/lib/Runtime/Language/AsmJsJitTemplate.h b/lib/Runtime/Language/AsmJsJitTemplate.h
index ccbd031..a637808 100644
--- a/lib/Runtime/Language/AsmJsJitTemplate.h
+++ b/lib/Runtime/Language/AsmJsJitTemplate.h
@@ -9,7 +9,7 @@
 namespace Js
 {
 
-    void AsmJsCommonEntryPoint(Js::ScriptFunction* func, void* savedEbp);
+    void AsmJsCommonEntryPoint(Js::ScriptFunction* func, void* localSlot, void* args);
 
     namespace AsmJsJitTemplate
     {
@@ -97,7 +97,6 @@
 
         // uint operations
         CreateTemplate( Div_UInt, int targetOffset, int leftOffset, int rightOffset );
-        CreateTemplate( Mul_UInt, int targetOffset, int leftOffset, int rightOffset );
         CreateTemplate( Rem_UInt, int targetOffset, int leftOffset, int rightOffset );
 
         CreateTemplate( Lt_UInt, int targetOffset, int leftOffset, int rightOffset );
diff --git a/lib/Runtime/Language/AsmJsLink.cpp b/lib/Runtime/Language/AsmJsLink.cpp
index 7690b27..02c66d2 100644
--- a/lib/Runtime/Language/AsmJsLink.cpp
+++ b/lib/Runtime/Language/AsmJsLink.cpp
@@ -26,20 +26,6 @@
             AsmJSCompiler::OutputError(scriptContext, _u("Asm.js Runtime Error : Buffer bytelength is smaller than constant accesses"));
             return false;
         }
-        if (info->GetUsesChangeHeap())
-        {
-            if (buffer->GetByteLength() < 0x1000000)
-            {
-                Output::Print(_u("Asm.js Runtime Error : Buffer bytelength is not a valid size for asm.js\n"));
-                return false;
-            }
-            if (info->GetMaxHeapAccess() >= 0x1000000)
-            {
-                Output::Print(_u("Asm.js Runtime Error : Cannot have such large constant accesses\n"));
-                return false;
-            }
-        }
-
         if (!buffer->IsValidAsmJsBufferLength(buffer->GetByteLength(), true))
         {
             AsmJSCompiler::OutputError(scriptContext, _u("Asm.js Runtime Error : Buffer bytelength is not a valid size for asm.js"));
@@ -72,6 +58,9 @@
 
     bool ASMLink::CheckStdLib(ScriptContext* scriptContext, const AsmJsModuleInfo* info, const Var stdlib)
     {
+        // We should already prevent implicit calls, but just to be safe in case someone changes that
+        JS_REENTRANCY_LOCK(lock, scriptContext->GetThreadContext());
+
         BVStatic<ASMMATH_BUILTIN_SIZE> mathBuiltinUsed = info->GetAsmMathBuiltinUsed();
         BVStatic<ASMARRAY_BUILTIN_SIZE> arrayBuiltinUsed = info->GetAsmArrayBuiltinUsed();
         BVStatic<ASMSIMD_BUILTIN_SIZE> simdBuiltinUsed = info->GetAsmSimdBuiltinUsed();
@@ -195,70 +184,9 @@
                 }
             }
             break;
-        case AsmJSTypedArrayBuiltinFunction::AsmJSTypedArrayBuiltin_Int8Array:
-            arrayFuncObj = JavascriptOperators::OP_GetProperty(stdlib, PropertyIds::Int8Array, scriptContext);
-            if (JavascriptFunction::Is(arrayFuncObj))
-            {
-                JavascriptFunction* arrayLibFunc = (JavascriptFunction*)arrayFuncObj;
-                return arrayLibFunc->GetFunctionInfo()->GetOriginalEntryPoint() == (&Int8Array::EntryInfo::NewInstance)->GetOriginalEntryPoint();
-            }
-            break;
-        case AsmJSTypedArrayBuiltinFunction::AsmJSTypedArrayBuiltin_Uint8Array:
-            arrayFuncObj = JavascriptOperators::OP_GetProperty(stdlib, PropertyIds::Uint8Array, scriptContext);
-            if (JavascriptFunction::Is(arrayFuncObj))
-            {
-                JavascriptFunction* arrayLibFunc = (JavascriptFunction*)arrayFuncObj;
-                return arrayLibFunc->GetFunctionInfo()->GetOriginalEntryPoint() == (&Uint8Array::EntryInfo::NewInstance)->GetOriginalEntryPoint();
-            }
-            break;
-        case AsmJSTypedArrayBuiltinFunction::AsmJSTypedArrayBuiltin_Int16Array:
-            arrayFuncObj = JavascriptOperators::OP_GetProperty(stdlib, PropertyIds::Int16Array, scriptContext);
-            if (JavascriptFunction::Is(arrayFuncObj))
-            {
-                JavascriptFunction* arrayLibFunc = (JavascriptFunction*)arrayFuncObj;
-                return arrayLibFunc->GetFunctionInfo()->GetOriginalEntryPoint() == (&Int16Array::EntryInfo::NewInstance)->GetOriginalEntryPoint();
-            }
-            break;
-        case AsmJSTypedArrayBuiltinFunction::AsmJSTypedArrayBuiltin_Uint16Array:
-            arrayFuncObj = JavascriptOperators::OP_GetProperty(stdlib, PropertyIds::Uint16Array, scriptContext);
-            if (JavascriptFunction::Is(arrayFuncObj))
-            {
-                JavascriptFunction* arrayLibFunc = (JavascriptFunction*)arrayFuncObj;
-                return arrayLibFunc->GetFunctionInfo()->GetOriginalEntryPoint() == (&Uint16Array::EntryInfo::NewInstance)->GetOriginalEntryPoint();
-            }
-            break;
-        case AsmJSTypedArrayBuiltinFunction::AsmJSTypedArrayBuiltin_Int32Array:
-            arrayFuncObj = JavascriptOperators::OP_GetProperty(stdlib, PropertyIds::Int32Array, scriptContext);
-            if (JavascriptFunction::Is(arrayFuncObj))
-            {
-                JavascriptFunction* arrayLibFunc = (JavascriptFunction*)arrayFuncObj;
-                return arrayLibFunc->GetFunctionInfo()->GetOriginalEntryPoint() == (&Int32Array::EntryInfo::NewInstance)->GetOriginalEntryPoint();
-            }
-            break;
-        case AsmJSTypedArrayBuiltinFunction::AsmJSTypedArrayBuiltin_Uint32Array:
-            arrayFuncObj = JavascriptOperators::OP_GetProperty(stdlib, PropertyIds::Uint32Array, scriptContext);
-            if (JavascriptFunction::Is(arrayFuncObj))
-            {
-                JavascriptFunction* arrayLibFunc = (JavascriptFunction*)arrayFuncObj;
-                return arrayLibFunc->GetFunctionInfo()->GetOriginalEntryPoint() == (&Uint32Array::EntryInfo::NewInstance)->GetOriginalEntryPoint();
-            }
-            break;
-        case AsmJSTypedArrayBuiltinFunction::AsmJSTypedArrayBuiltin_Float32Array:
-            arrayFuncObj = JavascriptOperators::OP_GetProperty(stdlib, PropertyIds::Float32Array, scriptContext);
-            if (JavascriptFunction::Is(arrayFuncObj))
-            {
-                JavascriptFunction* arrayLibFunc = (JavascriptFunction*)arrayFuncObj;
-                return arrayLibFunc->GetFunctionInfo()->GetOriginalEntryPoint() == (&Float32Array::EntryInfo::NewInstance)->GetOriginalEntryPoint();
-            }
-            break;
-        case AsmJSTypedArrayBuiltinFunction::AsmJSTypedArrayBuiltin_Float64Array:
-            arrayFuncObj = JavascriptOperators::OP_GetProperty(stdlib, PropertyIds::Float64Array, scriptContext);
-            if (JavascriptFunction::Is(arrayFuncObj))
-            {
-                JavascriptFunction* arrayLibFunc = (JavascriptFunction*)arrayFuncObj;
-                return arrayLibFunc->GetFunctionInfo()->GetOriginalEntryPoint() == (&Float64Array::EntryInfo::NewInstance)->GetOriginalEntryPoint();
-            }
-            break;
+#define ASMJS_TYPED_ARRAY_NAMES(name, propertyName) case AsmJSTypedArrayBuiltinFunction::AsmJSTypedArrayBuiltin_##name: \
+            return CheckIsBuiltinFunction(scriptContext, stdlib, PropertyIds::##propertyName, propertyName##::EntryInfo::NewInstance);
+#include "AsmJsBuiltInNames.h"
         default:
             Assume(UNREACHED);
         }
@@ -267,308 +195,14 @@
 
     bool ASMLink::CheckMathLibraryMethod(ScriptContext* scriptContext, const Var asmMathObject, const AsmJSMathBuiltinFunction mathLibMethod)
     {
-        Var mathFuncObj;
         switch (mathLibMethod)
         {
-        case AsmJSMathBuiltinFunction::AsmJSMathBuiltin_sin:
-            mathFuncObj = JavascriptOperators::OP_GetProperty(asmMathObject, PropertyIds::sin, scriptContext);
-            if (JavascriptFunction::Is(mathFuncObj))
-            {
-                JavascriptFunction* mathLibFunc = (JavascriptFunction*)mathFuncObj;
-                if (mathLibFunc->GetFunctionInfo()->GetOriginalEntryPoint() == (&Math::EntryInfo::Sin)->GetOriginalEntryPoint())
-                {
-                    return true;
-                }
-            }
-            break;
-        case AsmJSMathBuiltinFunction::AsmJSMathBuiltin_cos:
-            mathFuncObj = JavascriptOperators::OP_GetProperty(asmMathObject, PropertyIds::cos, scriptContext);
-            if (JavascriptFunction::Is(mathFuncObj))
-            {
-                JavascriptFunction* mathLibFunc = (JavascriptFunction*)mathFuncObj;
-                if (mathLibFunc->GetFunctionInfo()->GetOriginalEntryPoint() == (&Math::EntryInfo::Cos)->GetOriginalEntryPoint())
-                {
-                    return true;
-                }
-            }
-            break;
-        case AsmJSMathBuiltinFunction::AsmJSMathBuiltin_tan:
-            mathFuncObj = JavascriptOperators::OP_GetProperty(asmMathObject, PropertyIds::tan, scriptContext);
-            if (JavascriptFunction::Is(mathFuncObj))
-            {
-                JavascriptFunction* mathLibFunc = (JavascriptFunction*)mathFuncObj;
-                if (mathLibFunc->GetFunctionInfo()->GetOriginalEntryPoint() == (&Math::EntryInfo::Tan)->GetOriginalEntryPoint())
-                {
-                    return true;
-                }
-            }
-            break;
-        case AsmJSMathBuiltinFunction::AsmJSMathBuiltin_asin:
-            mathFuncObj = JavascriptOperators::OP_GetProperty(asmMathObject, PropertyIds::asin, scriptContext);
-            if (JavascriptFunction::Is(mathFuncObj))
-            {
-                JavascriptFunction* mathLibFunc = (JavascriptFunction*)mathFuncObj;
-                if (mathLibFunc->GetFunctionInfo()->GetOriginalEntryPoint() == (&Math::EntryInfo::Asin)->GetOriginalEntryPoint())
-                {
-                    return true;
-                }
-            }
-            break;
-        case AsmJSMathBuiltinFunction::AsmJSMathBuiltin_acos:
-            mathFuncObj = JavascriptOperators::OP_GetProperty(asmMathObject, PropertyIds::acos, scriptContext);
-            if (JavascriptFunction::Is(mathFuncObj))
-            {
-                JavascriptFunction* mathLibFunc = (JavascriptFunction*)mathFuncObj;
-                if (mathLibFunc->GetFunctionInfo()->GetOriginalEntryPoint() == (&Math::EntryInfo::Acos)->GetOriginalEntryPoint())
-                {
-                    return true;
-                }
-            }
-            break;
-        case AsmJSMathBuiltinFunction::AsmJSMathBuiltin_atan:
-            mathFuncObj = JavascriptOperators::OP_GetProperty(asmMathObject, PropertyIds::atan, scriptContext);
-            if (JavascriptFunction::Is(mathFuncObj))
-            {
-                JavascriptFunction* mathLibFunc = (JavascriptFunction*)mathFuncObj;
-                if (mathLibFunc->GetFunctionInfo()->GetOriginalEntryPoint() == (&Math::EntryInfo::Atan)->GetOriginalEntryPoint())
-                {
-                    return true;
-                }
-            }
-            break;
-        case AsmJSMathBuiltinFunction::AsmJSMathBuiltin_ceil:
-            mathFuncObj = JavascriptOperators::OP_GetProperty(asmMathObject, PropertyIds::ceil, scriptContext);
-            if (JavascriptFunction::Is(mathFuncObj))
-            {
-                JavascriptFunction* mathLibFunc = (JavascriptFunction*)mathFuncObj;
-                if (mathLibFunc->GetFunctionInfo()->GetOriginalEntryPoint() == (&Math::EntryInfo::Ceil)->GetOriginalEntryPoint())
-                {
-                    return true;
-                }
-            }
-            break;
-        case AsmJSMathBuiltinFunction::AsmJSMathBuiltin_floor:
-            mathFuncObj = JavascriptOperators::OP_GetProperty(asmMathObject, PropertyIds::floor, scriptContext);
-            if (JavascriptFunction::Is(mathFuncObj))
-            {
-                JavascriptFunction* mathLibFunc = (JavascriptFunction*)mathFuncObj;
-                if (mathLibFunc->GetFunctionInfo()->GetOriginalEntryPoint() == (&Math::EntryInfo::Floor)->GetOriginalEntryPoint())
-                {
-                    return true;
-                }
-            }
-            break;
-        case AsmJSMathBuiltinFunction::AsmJSMathBuiltin_exp:
-            mathFuncObj = JavascriptOperators::OP_GetProperty(asmMathObject, PropertyIds::exp, scriptContext);
-            if (JavascriptFunction::Is(mathFuncObj))
-            {
-                JavascriptFunction* mathLibFunc = (JavascriptFunction*)mathFuncObj;
-                if (mathLibFunc->GetFunctionInfo()->GetOriginalEntryPoint() == (&Math::EntryInfo::Exp)->GetOriginalEntryPoint())
-                {
-                    return true;
-                }
-            }
-            break;
-        case AsmJSMathBuiltinFunction::AsmJSMathBuiltin_log:
-            mathFuncObj = JavascriptOperators::OP_GetProperty(asmMathObject, PropertyIds::log, scriptContext);
-            if (JavascriptFunction::Is(mathFuncObj))
-            {
-                JavascriptFunction* mathLibFunc = (JavascriptFunction*)mathFuncObj;
-                if (mathLibFunc->GetFunctionInfo()->GetOriginalEntryPoint() == (&Math::EntryInfo::Log)->GetOriginalEntryPoint())
-                {
-                    return true;
-                }
-            }
-            break;
-        case AsmJSMathBuiltinFunction::AsmJSMathBuiltin_pow:
-            mathFuncObj = JavascriptOperators::OP_GetProperty(asmMathObject, PropertyIds::pow, scriptContext);
-            if (JavascriptFunction::Is(mathFuncObj))
-            {
-                JavascriptFunction* mathLibFunc = (JavascriptFunction*)mathFuncObj;
-                if (mathLibFunc->GetFunctionInfo()->GetOriginalEntryPoint() == (&Math::EntryInfo::Pow)->GetOriginalEntryPoint())
-                {
-                    return true;
-                }
-            }
-            break;
-        case AsmJSMathBuiltinFunction::AsmJSMathBuiltin_sqrt:
-            mathFuncObj = JavascriptOperators::OP_GetProperty(asmMathObject, PropertyIds::sqrt, scriptContext);
-            if (JavascriptFunction::Is(mathFuncObj))
-            {
-                JavascriptFunction* mathLibFunc = (JavascriptFunction*)mathFuncObj;
-                if (mathLibFunc->GetFunctionInfo()->GetOriginalEntryPoint() == (&Math::EntryInfo::Sqrt)->GetOriginalEntryPoint())
-                {
-                    return true;
-                }
-            }
-            break;
-        case AsmJSMathBuiltinFunction::AsmJSMathBuiltin_abs:
-            mathFuncObj = JavascriptOperators::OP_GetProperty(asmMathObject, PropertyIds::abs, scriptContext);
-            if (JavascriptFunction::Is(mathFuncObj))
-            {
-                JavascriptFunction* mathLibFunc = (JavascriptFunction*)mathFuncObj;
-                if (mathLibFunc->GetFunctionInfo()->GetOriginalEntryPoint() == (&Math::EntryInfo::Abs)->GetOriginalEntryPoint())
-                {
-                    return true;
-                }
-            }
-            break;
-        case AsmJSMathBuiltinFunction::AsmJSMathBuiltin_atan2:
-            mathFuncObj = JavascriptOperators::OP_GetProperty(asmMathObject, PropertyIds::atan2, scriptContext);
-            if (JavascriptFunction::Is(mathFuncObj))
-            {
-                JavascriptFunction* mathLibFunc = (JavascriptFunction*)mathFuncObj;
-                if (mathLibFunc->GetFunctionInfo()->GetOriginalEntryPoint() == (&Math::EntryInfo::Atan2)->GetOriginalEntryPoint())
-                {
-                    return true;
-                }
-            }
-            break;
-        case AsmJSMathBuiltinFunction::AsmJSMathBuiltin_imul:
-            mathFuncObj = JavascriptOperators::OP_GetProperty(asmMathObject, PropertyIds::imul, scriptContext);
-            if (JavascriptFunction::Is(mathFuncObj))
-            {
-                JavascriptFunction* mathLibFunc = (JavascriptFunction*)mathFuncObj;
-                if (mathLibFunc->GetFunctionInfo()->GetOriginalEntryPoint() == (&Math::EntryInfo::Imul)->GetOriginalEntryPoint())
-                {
-                    return true;
-                }
-            }
-            break;
-        case AsmJSMathBuiltinFunction::AsmJSMathBuiltin_clz32:
-            mathFuncObj = JavascriptOperators::OP_GetProperty(asmMathObject, PropertyIds::clz32, scriptContext);
-            if (JavascriptFunction::Is(mathFuncObj))
-            {
-                JavascriptFunction* mathLibFunc = (JavascriptFunction*)mathFuncObj;
-                if (mathLibFunc->GetFunctionInfo()->GetOriginalEntryPoint() == (&Math::EntryInfo::Clz32)->GetOriginalEntryPoint())
-                {
-                    return true;
-                }
-            }
-            break;
-        case AsmJSMathBuiltinFunction::AsmJSMathBuiltin_min:
-            mathFuncObj = JavascriptOperators::OP_GetProperty(asmMathObject, PropertyIds::min, scriptContext);
-            if (JavascriptFunction::Is(mathFuncObj))
-            {
-                JavascriptFunction* mathLibFunc = (JavascriptFunction*)mathFuncObj;
-                if (mathLibFunc->GetFunctionInfo()->GetOriginalEntryPoint() == (&Math::EntryInfo::Min)->GetOriginalEntryPoint())
-                {
-                    return true;
-                }
-            }
-            break;
-        case AsmJSMathBuiltinFunction::AsmJSMathBuiltin_max:
-            mathFuncObj = JavascriptOperators::OP_GetProperty(asmMathObject, PropertyIds::max, scriptContext);
-            if (JavascriptFunction::Is(mathFuncObj))
-            {
-                JavascriptFunction* mathLibFunc = (JavascriptFunction*)mathFuncObj;
-                if (mathLibFunc->GetFunctionInfo()->GetOriginalEntryPoint() == (&Math::EntryInfo::Max)->GetOriginalEntryPoint())
-                {
-                    return true;
-                }
-            }
-            break;
-
-        case AsmJSMathBuiltinFunction::AsmJSMathBuiltin_fround:
-            mathFuncObj = JavascriptOperators::OP_GetProperty(asmMathObject, PropertyIds::fround, scriptContext);
-            if (JavascriptFunction::Is(mathFuncObj))
-            {
-                JavascriptFunction* mathLibFunc = (JavascriptFunction*)mathFuncObj;
-                if (mathLibFunc->GetFunctionInfo()->GetOriginalEntryPoint() == (&Math::EntryInfo::Fround)->GetOriginalEntryPoint())
-                {
-                    return true;
-                }
-            }
-            break;
-
-        case AsmJSMathBuiltinFunction::AsmJSMathBuiltin_e:
-            mathFuncObj = JavascriptOperators::OP_GetProperty(asmMathObject, PropertyIds::E, scriptContext);
-            if (JavascriptNumber::Is(mathFuncObj))
-            {
-                JavascriptNumber* mathConstNumber = (JavascriptNumber*)mathFuncObj;
-                if (JavascriptNumber::GetValue(mathConstNumber) == (Math::E))
-                {
-                    return true;
-                }
-            }
-            break;
-        case AsmJSMathBuiltinFunction::AsmJSMathBuiltin_ln10:
-            mathFuncObj = JavascriptOperators::OP_GetProperty(asmMathObject, PropertyIds::LN10, scriptContext);
-            if (JavascriptNumber::Is(mathFuncObj))
-            {
-                JavascriptNumber* mathConstNumber = (JavascriptNumber*)mathFuncObj;
-                if (JavascriptNumber::GetValue(mathConstNumber) == (Math::LN10))
-                {
-                    return true;
-                }
-            }
-            break;
-        case AsmJSMathBuiltinFunction::AsmJSMathBuiltin_ln2:
-            mathFuncObj = JavascriptOperators::OP_GetProperty(asmMathObject, PropertyIds::LN2, scriptContext);
-            if (JavascriptNumber::Is(mathFuncObj))
-            {
-                JavascriptNumber* mathConstNumber = (JavascriptNumber*)mathFuncObj;
-                if (JavascriptNumber::GetValue(mathConstNumber) == (Math::LN2))
-                {
-                    return true;
-                }
-            }
-            break;
-        case AsmJSMathBuiltinFunction::AsmJSMathBuiltin_log2e:
-            mathFuncObj = JavascriptOperators::OP_GetProperty(asmMathObject, PropertyIds::LOG2E, scriptContext);
-            if (JavascriptNumber::Is(mathFuncObj))
-            {
-                JavascriptNumber* mathConstNumber = (JavascriptNumber*)mathFuncObj;
-                if (JavascriptNumber::GetValue(mathConstNumber) == (Math::LOG2E))
-                {
-                    return true;
-                }
-            }
-            break;
-        case AsmJSMathBuiltinFunction::AsmJSMathBuiltin_log10e:
-            mathFuncObj = JavascriptOperators::OP_GetProperty(asmMathObject, PropertyIds::LOG10E, scriptContext);
-            if (JavascriptNumber::Is(mathFuncObj))
-            {
-                JavascriptNumber* mathConstNumber = (JavascriptNumber*)mathFuncObj;
-                if (JavascriptNumber::GetValue(mathConstNumber) == (Math::LOG10E))
-                {
-                    return true;
-                }
-            }
-            break;
-        case AsmJSMathBuiltinFunction::AsmJSMathBuiltin_pi:
-            mathFuncObj = JavascriptOperators::OP_GetProperty(asmMathObject, PropertyIds::PI, scriptContext);
-            if (JavascriptNumber::Is(mathFuncObj))
-            {
-                JavascriptNumber* mathConstNumber = (JavascriptNumber*)mathFuncObj;
-                if (JavascriptNumber::GetValue(mathConstNumber) == (Math::PI))
-                {
-                    return true;
-                }
-            }
-            break;
-        case AsmJSMathBuiltinFunction::AsmJSMathBuiltin_sqrt1_2:
-            mathFuncObj = JavascriptOperators::OP_GetProperty(asmMathObject, PropertyIds::SQRT1_2, scriptContext);
-            if (JavascriptNumber::Is(mathFuncObj))
-            {
-                JavascriptNumber* mathConstNumber = (JavascriptNumber*)mathFuncObj;
-                if (JavascriptNumber::GetValue(mathConstNumber) == (Math::SQRT1_2))
-                {
-                    return true;
-                }
-            }
-            break;
-        case AsmJSMathBuiltinFunction::AsmJSMathBuiltin_sqrt2:
-            mathFuncObj = JavascriptOperators::OP_GetProperty(asmMathObject, PropertyIds::SQRT2, scriptContext);
-            if (JavascriptNumber::Is(mathFuncObj))
-            {
-                JavascriptNumber* mathConstNumber = (JavascriptNumber*)mathFuncObj;
-                if (JavascriptNumber::GetValue(mathConstNumber) == (Math::SQRT2))
-                {
-                    return true;
-                }
-            }
-            break;
+#define ASMJS_MATH_FUNC_NAMES(name, propertyName, funcInfo) case AsmJSMathBuiltinFunction::AsmJSMathBuiltin_##name: \
+            return CheckIsBuiltinFunction(scriptContext, asmMathObject, PropertyIds::##propertyName, funcInfo);
+#include "AsmJsBuiltInNames.h"
+#define ASMJS_MATH_DOUBLE_CONST_NAMES(name, propertyName, value) case AsmJSMathBuiltinFunction::AsmJSMathBuiltin_##name: \
+            return CheckIsBuiltinValue(scriptContext, asmMathObject, PropertyIds::##propertyName, value);
+#include "AsmJsBuiltInNames.h"
         default:
             Assume(UNREACHED);
         }
@@ -595,7 +229,6 @@
             } \
             break;
 
-
 #define ASMJS_SIMD_O_NAMES(builtInId, propertyId, libName, entryPoint) \
         case  AsmJsSIMDBuiltinFunction::AsmJsSIMDBuiltin_##builtInId: \
             simdConstructorObj = JavascriptOperators::OP_GetProperty(asmSimdObject, PropertyIds::##libName, scriptContext); \
@@ -611,8 +244,6 @@
             break;
 #include "AsmJsBuiltinNames.h"
 
-
-
         default:
             Assume(UNREACHED);
         }
@@ -620,8 +251,19 @@
     }
 #endif
 
+    bool ASMLink::CheckIsBuiltinFunction(ScriptContext* scriptContext, const Var object, PropertyId propertyId, const FunctionInfo& funcInfo)
+    {
+        Var mathFuncObj = JavascriptOperators::OP_GetProperty(object, propertyId, scriptContext);
+        return JavascriptFunction::Is(mathFuncObj) &&
+            JavascriptFunction::FromVar(mathFuncObj)->GetFunctionInfo()->GetOriginalEntryPoint() == funcInfo.GetOriginalEntryPoint();
+    }
 
-
+    bool ASMLink::CheckIsBuiltinValue(ScriptContext* scriptContext, const Var object, PropertyId propertyId, double value)
+    {
+        Var mathValue = JavascriptOperators::OP_GetProperty(object, propertyId, scriptContext);
+        return JavascriptNumber::Is(mathValue) &&
+            JavascriptNumber::GetValue(mathValue) == value;
+    }
 
     bool ASMLink::CheckParams(ScriptContext* scriptContext, AsmJsModuleInfo* info, const Var stdlib, const Var foreign, const Var bufferView)
     {
diff --git a/lib/Runtime/Language/AsmJsLink.h b/lib/Runtime/Language/AsmJsLink.h
index 58e6fff..63ec762 100644
--- a/lib/Runtime/Language/AsmJsLink.h
+++ b/lib/Runtime/Language/AsmJsLink.h
@@ -19,6 +19,8 @@
 #ifdef ENABLE_SIMDJS
         static bool CheckSimdLibraryMethod(ScriptContext* scriptContext, const Var asmSimdObject, const AsmJsSIMDBuiltinFunction simdBuiltin);
 #endif
+        static bool CheckIsBuiltinFunction(ScriptContext* scriptContext, const Var object, PropertyId propertyId, const FunctionInfo& funcInfo);
+        static bool CheckIsBuiltinValue(ScriptContext* scriptContext, const Var object, PropertyId propertyId, double value);
     };
 }
 #endif
diff --git a/lib/Runtime/Language/AsmJsModule.cpp b/lib/Runtime/Language/AsmJsModule.cpp
index eca10fb..1dd64a3 100644
--- a/lib/Runtime/Language/AsmJsModule.cpp
+++ b/lib/Runtime/Language/AsmJsModule.cpp
@@ -78,16 +78,10 @@
             FunctionBody* functionBody = func->GetFuncBody();
             AsmJsFunctionInfo* asmInfo = functionBody->AllocateAsmJsFunctionInfo();
 
-            if (i == 0 && mUsesChangeHeap)
-            {
-                continue;
-            }
-
             if (!asmInfo->Init(func))
             {
                 return false;
             }
-            asmInfo->SetIsHeapBufferConst(!mUsesChangeHeap);
             asmInfo->SetUsesHeapBuffer(mUsesHeapBuffer);
 
             functionBody->CheckAndSetOutParamMaxDepth(func->GetMaxArgOutDepth());
@@ -166,7 +160,6 @@
         asmInfo->SetModuleMemory(mModuleMemory);
         asmInfo->SetAsmMathBuiltinUsed(mAsmMathBuiltinUsedBV);
         asmInfo->SetAsmArrayBuiltinUsed(mAsmArrayBuiltinUsedBV);
-        asmInfo->SetUsesChangeHeap(mUsesChangeHeap);
         asmInfo->SetMaxHeapAccess(mMaxHeapAccess);
 
         if (IsSimdjsEnabled())
@@ -190,12 +183,15 @@
         // Create export module proxy
         asmInfo->SetExportFunctionIndex(mExportFuncIndex);
         asmInfo->SetExportsCount(mExports.Count());
-        for (int i = 0; i < mExports.Count(); i++)
+        auto exportIter = mExports.GetIterator();
+
+        for(int exportIndex = 0; exportIter.IsValid(); ++exportIndex)
         {
-            AsmJsModuleExport& exMod = mExports.Item(i);
-            auto ex = asmInfo->GetExport(i);
+            const AsmJsModuleExport& exMod = exportIter.CurrentValue();
+            auto ex = asmInfo->GetExport(exportIndex);
             *ex.id = exMod.id;
             *ex.location = exMod.location;
+            exportIter.MoveNext();
         }
 
         int iVar = 0, iVarImp = 0, iFunc = 0, iFuncImp = 0;
@@ -411,28 +407,24 @@
             if (pnode->sxCall.pnodeTarget->nop == knopName)
             {
                 AsmJsFunctionDeclaration* funcDecl = this->LookupFunction(pnode->sxCall.pnodeTarget->name());
-                if (funcDecl && funcDecl->GetSymbolType() == AsmJsSymbol::MathBuiltinFunction)
+                if (AsmJsMathFunction::IsFround(funcDecl))
                 {
-                    AsmJsMathFunction* mathFunc = funcDecl->Cast<AsmJsMathFunction>();
-                    if (mathFunc->GetMathBuiltInFunction() == AsmJSMathBuiltin_fround)
+                    switch (pnode->sxCall.pnodeArgs->nop)
                     {
-                        switch (pnode->sxCall.pnodeArgs->nop)
+                    case knopFlt:
+                        func->AddConst<float>((float)pnode->sxCall.pnodeArgs->sxFlt.dbl);
+                        evalArgs = false;
+                        break;
+                    case knopInt:
+                        func->AddConst<float>((float)pnode->sxCall.pnodeArgs->sxInt.lw);
+                        evalArgs = false;
+                        break;
+                    case knopNeg:
+                        if (pnode->sxCall.pnodeArgs->sxUni.pnode1->nop == knopInt && pnode->sxCall.pnodeArgs->sxUni.pnode1->sxInt.lw == 0)
                         {
-                        case knopFlt:
-                            func->AddConst<float>((float)pnode->sxCall.pnodeArgs->sxFlt.dbl);
+                            func->AddConst<float>(-0.0f);
                             evalArgs = false;
                             break;
-                        case knopInt:
-                            func->AddConst<float>((float)pnode->sxCall.pnodeArgs->sxInt.lw);
-                            evalArgs = false;
-                            break;
-                        case knopNeg:
-                            if (pnode->sxCall.pnodeArgs->sxUni.pnode1->nop == knopInt && pnode->sxCall.pnodeArgs->sxUni.pnode1->sxInt.lw == 0)
-                            {
-                                func->AddConst<float>(-0.0f);
-                                evalArgs = false;
-                                break;
-                            }
                         }
                     }
                 }
@@ -651,12 +643,6 @@
         // Check if this function requires a bigger Ast
         UpdateMaxAstSize(fncNode->sxFnc.astSize);
 
-        if (funcIndex == 0 && CheckChangeHeap(func))
-        {
-            fncNode->sxFnc.pnodeBody = NULL;
-            return true;
-        }
-
         if (!SetupFunctionArguments(func, pnodeBody))
         {
             // failure message will be printed by SetupFunctionArguments
@@ -777,8 +763,7 @@
 
                 if (funcDecl->GetSymbolType() == AsmJsSymbol::MathBuiltinFunction)
                 {
-                    AsmJsMathFunction* mathFunc = funcDecl->Cast<AsmJsMathFunction>();
-                    if (!(mathFunc && mathFunc->GetMathBuiltInFunction() == AsmJSMathBuiltin_fround))
+                    if (!AsmJsMathFunction::IsFround(funcDecl))
                     {
                         return Fail(rhs, _u("call should be for fround"));
                     }
@@ -839,8 +824,6 @@
     {
         ParseNodePtr pnode = func->GetBodyNode();
         MathBuiltin mathBuiltin;
-        AsmJsMathFunction* mathFunc = nullptr;
-        AsmJsSIMDFunction* simdFunc = nullptr;
         AsmJsSIMDValue simdValue;
         simdValue.Zero();
         // define all variables
@@ -868,8 +851,8 @@
                 ParseNode* pnodeInit = decl->sxVar.pnodeInit;
                 AsmJsSymbol * declSym = nullptr;
 
-                mathFunc = nullptr;
-                simdFunc = nullptr;
+                bool isFroundInit = false;
+                AsmJsSIMDFunction* simdFunc = nullptr;
 
                 if (!pnodeInit)
                 {
@@ -897,15 +880,11 @@
 
                     if (funcDecl->GetSymbolType() == AsmJsSymbol::MathBuiltinFunction)
                     {
-                        mathFunc = funcDecl->Cast<AsmJsMathFunction>();
-                        if (!(mathFunc && mathFunc->GetMathBuiltInFunction() == AsmJSMathBuiltin_fround))
+                        if (!AsmJsMathFunction::IsFround(funcDecl) || !ParserWrapper::IsFroundNumericLiteral(pnodeInit->sxCall.pnodeArgs))
                         {
                             return Fail(decl, _u("Var declaration with something else than a literal value|fround call"));
                         }
-                        if (!ParserWrapper::IsFroundNumericLiteral(pnodeInit->sxCall.pnodeArgs))
-                        {
-                            return Fail(decl, _u("Var declaration with something else than a literal value|fround call"));
-                        }
+                        isFroundInit = true;
                     }
                     else if (IsSimdjsEnabled() && funcDecl->GetSymbolType() == AsmJsSymbol::SIMDBuiltinFunction)
                     {
@@ -916,6 +895,10 @@
                             return Fail(varNode, _u("Invalid SIMD local declaration"));
                         }
                     }
+                    else
+                    {
+                        return Fail(varNode, _u("Unknown function call on var declaration"));
+                    }
                 }
                 else if (pnodeInit->nop != knopInt && pnodeInit->nop != knopFlt)
                 {
@@ -1008,7 +991,7 @@
                 }
                 else if (pnodeInit->nop == knopCall)
                 {
-                    if (mathFunc)
+                    if (isFroundInit)
                     {
                         var->SetVarType(AsmJsVarType::Float);
                         var->SetLocation(func->AcquireRegister<float>());
@@ -1108,137 +1091,6 @@
         return nullptr;
     }
 
-    bool AsmJsModuleCompiler::CheckChangeHeap(AsmJsFunc * func)
-    {
-        ParseNode * fncNode = func->GetFncNode();
-        ParseNode * pnodeBody = fncNode->sxFnc.pnodeBody;
-        ParseNode * pnodeArgs = fncNode->sxFnc.pnodeParams;
-
-        // match AST for changeHeap function.
-        // it must be defined in the following format (names/whitespace can differ):
-        //function changeHeap(newBuffer)
-        //{
-        //  if (byteLength(newBuffer) & 0xffffff ||
-        //      byteLength(newBuffer) <= 0xffffff ||
-        //      byteLength(newBuffer) >  0x80000000)
-        //      return false;
-        //  heap32 = new Int32Array(newBuffer);
-        //  ...
-        //  buffer = newBuffer;
-        //  return true;
-        //}
-
-        // ensure function
-        if (pnodeBody->nop != knopList || !pnodeArgs || pnodeArgs->nop != knopVarDecl)
-        {
-            return false;
-        }
-
-        // ensure if expression
-        ParseNode * ifNode = pnodeBody->sxBin.pnode1;
-        if (ifNode->nop != knopIf || ifNode->sxIf.pnodeFalse)
-        {
-            return false;
-        }
-
-        // validate "byteLength(newBuffer) >  0x80000000"
-        ParseNode * orNode = ifNode->sxIf.pnodeCond;
-        if (orNode->nop != knopLogOr || orNode->sxBin.pnode1->nop != knopLogOr)
-        {
-            return false;
-        }
-        ParseNode * cond = orNode->sxBin.pnode2;
-        if (cond->nop != knopGt || !CheckByteLengthCall(cond->sxBin.pnode1, pnodeArgs) || cond->sxBin.pnode2->nop != knopFlt || cond->sxBin.pnode2->sxFlt.dbl != 2147483648.0 || !cond->sxBin.pnode2->sxFlt.maybeInt)
-        {
-            return false;
-        }
-
-        // validate "byteLength(newBuffer) <= 0xffffff"
-        orNode = orNode->sxBin.pnode1;
-        cond = orNode->sxBin.pnode2;
-        if (cond->nop != knopLe || !CheckByteLengthCall(cond->sxBin.pnode1, pnodeArgs) || cond->sxBin.pnode2->nop != knopInt || cond->sxBin.pnode2->sxInt.lw != 0x00ffffff)
-        {
-            return false;
-        }
-
-        // validate "byteLength(newBuffer) & 0xffffff"
-        cond = orNode->sxBin.pnode1;
-        if (cond->nop != knopAnd || !CheckByteLengthCall(cond->sxBin.pnode1, pnodeArgs) || cond->sxBin.pnode2->nop != knopInt || cond->sxBin.pnode2->sxInt.lw != 0x00ffffff)
-        {
-            return false;
-        }
-        // validate "return false;"
-        cond = ifNode->sxIf.pnodeTrue;
-        if (!cond || cond->nop != knopReturn || cond->sxReturn.pnodeExpr->nop != knopFalse)
-        {
-            return false;
-        }
-
-        // validate heap32 = new Int32Array(newBuffer); etc.
-        while (!mArrayViews.Empty())
-        {
-            // all views that were instantiated must be replaced in the order which they were instantiated
-            AsmJsArrayView * requiredArrayView = mArrayViews.Dequeue();
-            pnodeBody = pnodeBody->sxBin.pnode2;
-            if (pnodeBody->nop != knopList)
-            {
-                return false;
-            }
-            ParseNode * assignNode = pnodeBody->sxBin.pnode1;
-            if (assignNode->nop != knopAsg || assignNode->sxBin.pnode1->nop != knopName)
-            {
-                return false;
-            }
-            // validate left hand side
-            AsmJsSymbol * actualArraySym = LookupIdentifier(assignNode->sxBin.pnode1->name());
-            if (requiredArrayView != actualArraySym)
-            {
-                return false;
-            }
-
-            ParseNode * callNode = assignNode->sxBin.pnode2;
-            // validate correct argument is passed
-            if (callNode->nop != knopNew || !callNode->sxCall.pnodeArgs || callNode->sxCall.pnodeArgs->nop != knopName || callNode->sxCall.pnodeArgs->name()->GetPropertyId() != pnodeArgs->name()->GetPropertyId() || callNode->sxCall.pnodeTarget->nop != knopName)
-            {
-                return false;
-            }
-            // validate correct function is being called
-            AsmJsSymbol * callTargetSym = LookupIdentifier(callNode->sxCall.pnodeTarget->name());
-            if (!callTargetSym || callTargetSym->GetSymbolType() != AsmJsSymbol::TypedArrayBuiltinFunction)
-            {
-                return false;
-            }
-            if (requiredArrayView->GetViewType() != callTargetSym->Cast<AsmJsTypedArrayFunction>()->GetViewType())
-            {
-                return false;
-            }
-        }
-        pnodeBody = pnodeBody->sxBin.pnode2;
-        if (pnodeBody->nop != knopList)
-        {
-            return false;
-        }
-
-        // validate buffer = newBuffer;
-        ParseNode * assign = pnodeBody->sxBin.pnode1;
-        if (assign->nop != knopAsg || assign->sxBin.pnode1->nop != knopName || !mBufferArgName || mBufferArgName->GetPropertyId() != assign->sxBin.pnode1->name()->GetPropertyId() ||
-            assign->sxBin.pnode2->nop != knopName || pnodeArgs->name()->GetPropertyId() != assign->sxBin.pnode2->name()->GetPropertyId())
-        {
-            return false;
-        }
-        // validate return true;
-        pnodeBody = pnodeBody->sxBin.pnode2;
-        if (pnodeBody->nop != knopList || pnodeBody->sxBin.pnode2->nop != knopEndCode ||
-            pnodeBody->sxBin.pnode1->nop != knopReturn || !pnodeBody->sxBin.pnode1->sxReturn.pnodeExpr || pnodeBody->sxBin.pnode1->sxReturn.pnodeExpr->nop != knopTrue)
-        {
-            return false;
-        }
-        // now we should flag this module as containing changeHeap method
-        mUsesChangeHeap = true;
-        AsmJSByteCodeGenerator::EmitEmptyByteCode(func->GetFuncInfo(), GetByteCodeGenerator(), fncNode);
-        return true;
-    }
-
     bool AsmJsModuleCompiler::CheckByteLengthCall(ParseNode * callNode, ParseNode * bufferDecl)
     {
         if (callNode->nop != knopCall || callNode->sxCall.pnodeTarget->nop != knopName)
@@ -1956,7 +1808,6 @@
         , mCompileTimeLastTick(GetTick())
         , mMaxAstSize(0)
         , mArrayViews(&mAllocator)
-        , mUsesChangeHeap(false)
         , mUsesHeapBuffer(false)
         , mMaxHeapAccess(0)
 #if DBG
@@ -2345,12 +2196,21 @@
 
     bool AsmJsModuleCompiler::AddExport( PropertyName name, RegSlot location )
     {
-        AsmJsModuleExport ex;
-        ex.id = name->GetPropertyId();
-        ex.location = location;
-
-        // return is < 0 if count overflowed 31bits
-        return mExports.Add( ex ) >= 0;
+        AsmJsModuleExport * foundExport;
+        if (mExports.TryGetReference(name->GetPropertyId(), &foundExport))
+        {
+            AsmJSCompiler::OutputMessage(GetScriptContext(), DEIT_GENERAL, _u("Warning: redefining export"));
+            foundExport->location = location;
+            return true;
+        }
+        else
+        {
+            AsmJsModuleExport ex;
+            ex.id = name->GetPropertyId();
+            ex.location = location;
+            return mExports.Add(ex.id, ex) >= 0;
+            // return is < 0 if count overflowed 31bits
+        }
     }
 
     bool AsmJsModuleCompiler::SetExportFunc( AsmJsFunc* func )
@@ -2781,7 +2641,7 @@
             {
                 switch (asmSlot->builtinMathFunc)
                 {
-#define ASMJS_MATH_FUNC_NAMES(name, propertyName) \
+#define ASMJS_MATH_FUNC_NAMES(name, propertyName, funcInfo) \
                         case AsmJSMathBuiltin_##name: \
                             value = JavascriptOperators::OP_GetProperty(asmMathObject, PropertyIds::##propertyName, scriptContext); \
                             break;
diff --git a/lib/Runtime/Language/AsmJsModule.h b/lib/Runtime/Language/AsmJsModule.h
index b93cc7c..40bdf5d 100644
--- a/lib/Runtime/Language/AsmJsModule.h
+++ b/lib/Runtime/Language/AsmJsModule.h
@@ -139,7 +139,7 @@
         typedef JsUtil::BaseDictionary<PropertyId, AsmJsSymbol*, ArenaAllocator> ModuleEnvironment;
         typedef JsUtil::List<AsmJsFunc*, ArenaAllocator> ModuleFunctionArray;
         typedef JsUtil::List<AsmJsFunctionTable*, ArenaAllocator> ModuleFunctionTableArray;
-        typedef JsUtil::List<AsmJsModuleExport, ArenaAllocator> ModuleExportArray;
+        typedef JsUtil::BaseDictionary<PropertyId, AsmJsModuleExport, ArenaAllocator> ModuleExportMap;
         typedef JsUtil::Queue<AsmJsArrayView *, ArenaAllocator> ModuleArrayViewList;
         typedef WAsmJs::RegisterSpace ModuleIntVars;
         typedef WAsmJs::RegisterSpace ModuleDoubleVars;
@@ -185,7 +185,7 @@
         ModuleSIMDVars                  mSimdVarSpace;
         BVStatic<ASMSIMD_BUILTIN_SIZE>  mAsmSimdBuiltinUsedBV;
 
-        ModuleExportArray               mExports;
+        ModuleExportMap                 mExports;
         RegSlot                         mExportFuncIndex; // valid only if export object is empty
         ModuleFunctionTableArray        mFunctionTableArray;
         int                             mVarImportCount;
@@ -206,7 +206,6 @@
         bool mBufferArgNameInit : 1;
 #endif
         bool mInitialised : 1;
-        bool mUsesChangeHeap : 1;
         bool mUsesHeapBuffer : 1;
     public:
         AsmJsModuleCompiler( ExclusiveContext *cx, AsmJSParser &parser );
@@ -283,7 +282,6 @@
         bool Fail( ParseNode* usepn, const wchar *error );
 
         bool AreAllFuncTableDefined();
-        bool UsesChangeHeap() { return mUsesChangeHeap; }
         bool UsesHeapBuffer() { return mUsesHeapBuffer; }
         void SetUsesHeapBuffer(bool val) { mUsesHeapBuffer = val; }
         void UpdateMaxHeapAccess(uint index);
@@ -410,7 +408,6 @@
         Field(BVStatic<ASMSIMD_BUILTIN_SIZE>)  mAsmSimdBuiltinUsed;
 
         Field(uint)                         mMaxHeapAccess;
-        Field(bool)                         mUsesChangeHeap;
         Field(bool)                         mIsProcessed;
     public:
         AsmJsModuleInfo( Recycler* recycler ) :
@@ -428,7 +425,6 @@
             , mFunctionImports( nullptr )
             , mFunctions( nullptr )
             , mMaxHeapAccess(0)
-            , mUsesChangeHeap(false)
             , mIsProcessed(false)
             , mSlotMap(nullptr)
         {
@@ -591,14 +587,6 @@
         {
             return mAsmArrayBuiltinUsed;
         }
-        void SetUsesChangeHeap(bool val)
-        {
-            mUsesChangeHeap = val;
-        }
-        inline bool GetUsesChangeHeap() const
-        {
-            return mUsesChangeHeap;
-        }
         void SetMaxHeapAccess(uint val)
         {
             mMaxHeapAccess = val;
diff --git a/lib/Runtime/Language/AsmJsTypes.cpp b/lib/Runtime/Language/AsmJsTypes.cpp
index b30c972..a0b1a19 100644
--- a/lib/Runtime/Language/AsmJsTypes.cpp
+++ b/lib/Runtime/Language/AsmJsTypes.cpp
@@ -803,6 +803,11 @@
         return mOverload && mOverload->SupportsMathCall(argCount, args, op, retType);
     }
 
+    bool AsmJsMathFunction::IsFround(AsmJsFunctionDeclaration* sym)
+    {
+        return sym && sym->GetSymbolType() == AsmJsSymbol::MathBuiltinFunction && sym->Cast<AsmJsMathFunction>()->GetMathBuiltInFunction() == AsmJSMathBuiltin_fround;
+    }
+
     WAsmJs::RegisterSpace*
         AllocateRegisterSpace(ArenaAllocator* alloc, WAsmJs::Types type)
     {
@@ -1007,7 +1012,7 @@
             argSize = (ArgSlot)MachPtr;
         }
 
-        mArgByteSize = UInt16Math::Add(mArgByteSize, argSize);
+        mArgByteSize = ArgSlotMath::Add(mArgByteSize, argSize);
         mArgSizes[index] = argSize;
     }
 
diff --git a/lib/Runtime/Language/AsmJsTypes.h b/lib/Runtime/Language/AsmJsTypes.h
index c9232e8..2f8ea49 100644
--- a/lib/Runtime/Language/AsmJsTypes.h
+++ b/lib/Runtime/Language/AsmJsTypes.h
@@ -100,10 +100,10 @@
     // The asm.js spec recognizes this set of builtin Math functions.
     enum AsmJSMathBuiltinFunction: int
     {
-#define ASMJS_MATH_FUNC_NAMES(name, propertyName) AsmJSMathBuiltin_##name,
+#define ASMJS_MATH_FUNC_NAMES(name, propertyName, funcInfo) AsmJSMathBuiltin_##name,
 #include "AsmJsBuiltInNames.h"
         AsmJSMathBuiltinFunction_COUNT,
-#define ASMJS_MATH_CONST_NAMES(name, propertyName) AsmJSMathBuiltin_##name,
+#define ASMJS_MATH_CONST_NAMES(name, propertyName, value) AsmJSMathBuiltin_##name,
 #include "AsmJsBuiltInNames.h"
         AsmJSMathBuiltin_COUNT
     };
@@ -654,6 +654,7 @@
         AsmJSMathBuiltinFunction GetMathBuiltInFunction(){ return mBuiltIn; };
         virtual bool CheckAndSetReturnType( Js::AsmJsRetType val ) override;
         bool SupportsMathCall(ArgSlot argCount, AsmJsType* args, OpCodeAsmJs& op, AsmJsRetType& retType);
+        static bool IsFround(AsmJsFunctionDeclaration* sym);
     private:
         virtual bool SupportsArgCall(ArgSlot argCount, AsmJsType* args, AsmJsRetType& retType ) override;
 
@@ -873,7 +874,6 @@
         Field(Wasm::WasmReaderInfo*) mWasmReaderInfo;
         Field(WebAssemblyModule*) mWasmModule;
 #endif
-        Field(bool) mIsHeapBufferConst;
         Field(bool) mUsesHeapBuffer;
 
         Field(FunctionBody*) asmJsModuleFunctionBody;
@@ -892,7 +892,6 @@
                               mWasmModule(nullptr),
 #endif
                               mUsesHeapBuffer(false),
-                              mIsHeapBufferConst(false),
                               mArgType(nullptr),
                               mArgSizes(nullptr) {}
         // the key is the bytecode address
@@ -921,9 +920,6 @@
         inline ArgSlot GetArgByteSize() const{return mArgByteSize;}
         inline void SetArgByteSize(ArgSlot val) { mArgByteSize = val; }
 
-        inline void SetIsHeapBufferConst(bool val) { mIsHeapBufferConst = val; }
-        inline bool IsHeapBufferConst() const{ return mIsHeapBufferConst; }
-
         inline void SetUsesHeapBuffer(bool val) { mUsesHeapBuffer = val; }
         inline bool UsesHeapBuffer() const{ return mUsesHeapBuffer; }
 
diff --git a/lib/Runtime/Language/AsmJsUtils.cpp b/lib/Runtime/Language/AsmJsUtils.cpp
index 01cf8a7..7b38aec 100644
--- a/lib/Runtime/Language/AsmJsUtils.cpp
+++ b/lib/Runtime/Language/AsmJsUtils.cpp
@@ -70,7 +70,7 @@
         PnFnc func = node->sxFnc;
         ParseNode* first = func.pnodeParams;
         // throws OOM on uint16 overflow
-        for( ParseNode* pnode = first; pnode; pnode = pnode->sxVar.pnodeNext, UInt16Math::Inc(numformals));
+        for( ParseNode* pnode = first; pnode; pnode = pnode->sxVar.pnodeNext, ArgSlotMath::Inc(numformals));
         return first;
     }
 
@@ -148,32 +148,6 @@
         vswprintf_s( msg_, _msg, arglist );
     }
 
-    Var AsmJsChangeHeapBuffer(RecyclableObject * function, CallInfo callInfo, ...)
-    {
-        PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
-
-        ARGUMENTS(args, callInfo);
-        ScriptContext* scriptContext = function->GetScriptContext();
-
-        Assert(!(callInfo.Flags & CallFlags_New));
-
-        if (args.Info.Count < 1 || !ArrayBuffer::Is(args[1]))
-        {
-            JavascriptError::ThrowTypeError(scriptContext, JSERR_NeedArrayBufferObject);
-        }
-
-
-        ArrayBuffer* newArrayBuffer = ArrayBuffer::FromVar(args[1]);
-        if (newArrayBuffer->IsDetached() || newArrayBuffer->GetByteLength() & 0xffffff || newArrayBuffer->GetByteLength() <= 0xffffff || newArrayBuffer->GetByteLength() > 0x80000000)
-        {
-            return JavascriptBoolean::ToVar(FALSE, scriptContext);
-        }
-        FrameDisplay* frame = ((ScriptFunction*)function)->GetEnvironment();
-        Field(Var)* moduleArrayBuffer = (Field(Var)*)frame->GetItem(0) + AsmJsModuleMemory::MemoryTableBeginOffset;
-        *moduleArrayBuffer = newArrayBuffer;
-        return JavascriptBoolean::ToVar(TRUE, scriptContext);
-    }
-
 #if ENABLE_DEBUG_CONFIG_OPTIONS
     int64 ConvertStringToInt64(Var string, ScriptContext* scriptContext)
     {
diff --git a/lib/Runtime/Language/AsmJsUtils.h b/lib/Runtime/Language/AsmJsUtils.h
index 5b89697..f64e0db 100644
--- a/lib/Runtime/Language/AsmJsUtils.h
+++ b/lib/Runtime/Language/AsmJsUtils.h
@@ -27,7 +27,6 @@
 #define MaybeTodo( expr ) AssertMsg( !(expr), "Unhandled scenario in asm.js" )
 
 namespace Js {
-    Var AsmJsChangeHeapBuffer(RecyclableObject * function, CallInfo callInfo, ...);
 
 #pragma warning (suppress: 25057) // Suppress unannotated buffer warning
     void * UnboxAsmJsArguments(ScriptFunction* func, Var * origArgs, char * argDst, CallInfo callInfo);
diff --git a/lib/Runtime/Language/DynamicProfileInfo.cpp b/lib/Runtime/Language/DynamicProfileInfo.cpp
index 733cf68..ffd878b 100644
--- a/lib/Runtime/Language/DynamicProfileInfo.cpp
+++ b/lib/Runtime/Language/DynamicProfileInfo.cpp
@@ -342,7 +342,7 @@
             }
             else
             {
-                directEntryPoint = (JavascriptMethod)entryPoint->GetNativeAddress();
+                directEntryPoint = entryPoint->GetNativeEntrypoint();
             }
 
             entryPoint->jsMethod = directEntryPoint;
@@ -1607,7 +1607,8 @@
                 _u(" disableObjTypeSpec_jitLoopBody : %s\n")
                 _u(" disablePowIntTypeSpec : %s\n")
                 _u(" disableStackArgOpt : %s\n")
-                _u(" disableTagCheck : %s\n"),
+                _u(" disableTagCheck : %s\n")
+                _u(" disableOptimizeTryFinally : %s\n"),
                 IsTrueOrFalse(this->bits.disableAggressiveIntTypeSpec),
                 IsTrueOrFalse(this->bits.disableAggressiveIntTypeSpec_jitLoopBody),
                 IsTrueOrFalse(this->bits.disableAggressiveMulIntTypeSpec),
@@ -1643,7 +1644,8 @@
                 IsTrueOrFalse(this->bits.disableObjTypeSpec_jitLoopBody),
                 IsTrueOrFalse(this->bits.disablePowIntIntTypeSpec),
                 IsTrueOrFalse(this->bits.disableStackArgOpt),
-                IsTrueOrFalse(this->bits.disableTagCheck));
+                IsTrueOrFalse(this->bits.disableTagCheck),
+                IsTrueOrFalse(this->bits.disableOptimizeTryFinally));
         }
     }
 
@@ -2274,7 +2276,7 @@
     }
 }
 
-#if ENABLE_DEBUG_CONFIG_OPTIONS
+#if ENABLE_DEBUG_CONFIG_OPTIONS || defined(REJIT_STATS)
 const char *const BailOutKindNames[] =
 {
 #define BAIL_OUT_KIND_LAST(n)               "" STRINGIZE(n) ""
@@ -2282,6 +2284,7 @@
 #define BAIL_OUT_KIND_VALUE_LAST(n, v)      BAIL_OUT_KIND_LAST(n)
 #define BAIL_OUT_KIND_VALUE(n, v)           BAIL_OUT_KIND(n)
 #include "BailOutKind.h"
+#undef BAIL_OUT_KIND_LAST
 };
 
 IR::BailOutKind const BailOutKindValidBits[] =
@@ -2289,7 +2292,6 @@
 #define BAIL_OUT_KIND(n, bits)               (IR::BailOutKind)bits,
 #define BAIL_OUT_KIND_VALUE_LAST(n, v)
 #define BAIL_OUT_KIND_VALUE(n, v)
-#define BAIL_OUT_KIND_LAST(n)
 #include "BailOutKind.h"
 };
 
diff --git a/lib/Runtime/Language/DynamicProfileInfo.h b/lib/Runtime/Language/DynamicProfileInfo.h
index 1e158e9..98851f0 100644
--- a/lib/Runtime/Language/DynamicProfileInfo.h
+++ b/lib/Runtime/Language/DynamicProfileInfo.h
@@ -26,6 +26,7 @@
     #define BAIL_OUT_KIND_VALUE_LAST(n, v)      n = v
     #define BAIL_OUT_KIND_VALUE(n, v)           BAIL_OUT_KIND_VALUE_LAST(n, v),
     #include "BailOutKind.h"
+    #undef BAIL_OUT_KIND_LAST
     };
     ENUM_CLASS_HELPERS(BailOutKind, uint);
 
@@ -36,7 +37,7 @@
     BailOutKind EquivalentToMonoTypeCheckBailOutKind(BailOutKind kind);
 }
 
-#if ENABLE_DEBUG_CONFIG_OPTIONS
+#if ENABLE_DEBUG_CONFIG_OPTIONS || defined(REJIT_STATS)
 const char *GetBailOutKindName(IR::BailOutKind kind);
 bool IsValidBailOutKindAndBits(IR::BailOutKind bailOutKind);
 #endif
@@ -516,6 +517,7 @@
             Field(bool) disableLoopImplicitCallInfo : 1;
             Field(bool) disableStackArgOpt : 1;
             Field(bool) disableTagCheck : 1;
+            Field(bool) disableOptimizeTryFinally : 1;
         };
         Field(Bits) bits;
 
@@ -814,6 +816,8 @@
         void DisablePowIntIntTypeSpec() { this->bits.disablePowIntIntTypeSpec = true; }
         bool IsTagCheckDisabled() const { return bits.disableTagCheck; }
         void DisableTagCheck() { this->bits.disableTagCheck = true; }
+        bool IsOptimizeTryFinallyDisabled() const { return bits.disableOptimizeTryFinally; }
+        void DisableOptimizeTryFinally() { this->bits.disableOptimizeTryFinally = true; }
 
         static bool IsCallSiteNoInfo(Js::LocalFunctionId functionId) { return functionId == CallSiteNoInfo; }
         int IncRejitCount() { return this->rejitCount++; }
diff --git a/lib/Runtime/Language/InterpreterHandlerAsmJs.inl b/lib/Runtime/Language/InterpreterHandlerAsmJs.inl
index 034a4d6..44f7a62 100755
--- a/lib/Runtime/Language/InterpreterHandlerAsmJs.inl
+++ b/lib/Runtime/Language/InterpreterHandlerAsmJs.inl
@@ -99,6 +99,7 @@
   DEF2_WMS( BR_ASM_Mem       , Case_Int     , AsmJsMath::CmpEq<int>                              )
   DEF2_WMS( BR_ASM_Const     , Case_IntConst, AsmJsMath::CmpEq<int>                              )
 
+// Int32 Math
   DEF2_WMS( I1toI1Mem        , Neg_Int      , AsmJsMath::Neg<int>                                ) // int unary '-'
   DEF2_WMS( I1toI1Mem        , Not_Int      , AsmJsMath::Not                                     ) // int unary '~'
   DEF2_WMS( I1toI1Mem        , LogNot_Int   , AsmJsMath::LogNot                                  ) // int unary '!'
@@ -106,10 +107,10 @@
   DEF2_WMS( I2toI1Mem        , Add_Int      , AsmJsMath::Add<int>                                )
   DEF2_WMS( I2toI1Mem        , Sub_Int      , AsmJsMath::Sub<int>                                )
   DEF2_WMS( I2toI1Mem        , Mul_Int      , AsmJsMath::Mul<int>                                )
-  DEF2_WMS( I2toI1Mem        , Div_Int      , AsmJsMath::Div<int>                                )
-  DEF2_WMS( I2toI1Mem        , Rem_Int      , AsmJsMath::Rem<int>                                )
-  DEF2_WMS( I2toI1Ctx        , Div_Check_Int , (OP_DivOverflow<int, &AsmJsMath::Div<int>, INT_MIN>)  )
-  DEF2_WMS( I2toI1Ctx        , Rem_Check_Int , (OP_DivRemCheck<int, &AsmJsMath::Rem<int>>)       )
+  DEF2_WMS( I2toI1Mem        , Div_Int      , AsmJsMath::DivChecked<int>                         )
+  DEF2_WMS( I2toI1Mem        , Rem_Int      , AsmJsMath::RemChecked<int>                         )
+  DEF2_WMS( I2toI1Ctx        , Div_Trap_Int, (OP_DivOverflow<int, &AsmJsMath::DivUnsafe<int>>)  )
+  DEF2_WMS( I2toI1Ctx        , Rem_Trap_Int, (OP_RemOverflow<int, &AsmJsMath::RemUnsafe<int>>)  )
   DEF2_WMS( I2toI1Mem        , And_Int      , AsmJsMath::And                                     )
   DEF2_WMS( I2toI1Mem        , Or_Int       , AsmJsMath::Or                                      )
   DEF2_WMS( I2toI1Mem        , Xor_Int      , AsmJsMath::Xor                                     )
@@ -119,19 +120,24 @@
   DEF2_WMS( I2toI1Mem        , Rol_Int      , Wasm::WasmMath::Rol                                )
   DEF2_WMS( I2toI1Mem        , Ror_Int      , Wasm::WasmMath::Ror                                )
   DEF2_WMS( I1toI1Mem        , PopCnt_Int   , ::Math::PopCnt32                                   )
+  DEF2_WMS( I1toI1Mem        , Abs_Int      , ::abs                                              )
+  DEF2_WMS( I2toI1Mem        , Min_Int      , min                                                )
+  DEF2_WMS( I2toI1Mem        , Max_Int      , max                                                )
+  DEF2_WMS( I1toI1Mem        , Clz32_Int    , AsmJsMath::Clz32                                   )
+  DEF2_WMS( I1toI1Mem        , Ctz_Int      , Wasm::WasmMath::Ctz                                )
 
-  DEF2_WMS( I2toI1Mem        , Mul_UInt     , AsmJsMath::Mul<uint>                               )
-  DEF2_WMS( I2toI1Mem        , Div_UInt     , AsmJsMath::Div<uint>                               )
-  DEF2_WMS( I2toI1Mem        , Rem_UInt     , AsmJsMath::Rem<uint>                               )
+// Unsigned Int32 Math
+  DEF2_WMS( I2toI1Mem        , Div_UInt     , AsmJsMath::DivChecked<uint32>                            )
+  DEF2_WMS( I2toI1Mem        , Rem_UInt     , AsmJsMath::RemChecked<uint32>                            )
+  DEF2_WMS( I2toI1Ctx        , Div_Trap_UInt, (OP_UnsignedDivRemCheck<uint32, &AsmJsMath::DivUnsafe<uint32>>) )
+  DEF2_WMS( I2toI1Ctx        , Rem_Trap_UInt, (OP_UnsignedDivRemCheck<uint32, &AsmJsMath::RemUnsafe<uint32>>) )
 
 // Int64 Math
   DEF2_WMS( L2toL1Mem        , Add_Long     , AsmJsMath::Add<int64>)
   DEF2_WMS( L2toL1Mem        , Sub_Long     , AsmJsMath::Sub<int64>)
   DEF2_WMS( L2toL1Mem        , Mul_Long     , AsmJsMath::Mul<int64>)
-  DEF2_WMS( L2toL1Ctx        , Div_Long     , (OP_DivOverflow<int64,  &AsmJsMath::Div<int64>, LONGLONG_MIN>) )
-  DEF2_WMS( L2toL1Ctx        , Div_ULong    , (OP_DivRemCheck<uint64, &AsmJsMath::Div<uint64>>)   )
-  DEF2_WMS( L2toL1Ctx        , Rem_Long     , (OP_DivRemCheck<int64,  &Wasm::WasmMath::Rem<int64>>)    )
-  DEF2_WMS( L2toL1Ctx        , Rem_ULong    , (OP_DivRemCheck<uint64, &Wasm::WasmMath::Rem<uint64>>)   )
+  DEF2_WMS( L2toL1Ctx        , Div_Trap_Long, (OP_DivOverflow<int64,  &AsmJsMath::DivUnsafe<int64>>) )
+  DEF2_WMS( L2toL1Ctx        , Rem_Trap_Long, (OP_RemOverflow<int64,  &AsmJsMath::RemUnsafe<int64>>) )
   DEF2_WMS( L2toL1Mem        , And_Long     , AsmJsMath::And<int64>)
   DEF2_WMS( L2toL1Mem        , Or_Long      , AsmJsMath::Or<int64>)
   DEF2_WMS( L2toL1Mem        , Xor_Long     , AsmJsMath::Xor<int64>)
@@ -143,54 +149,57 @@
   DEF2_WMS( L1toL1Mem        , Clz_Long     , Wasm::WasmMath::Clz<int64>)
   DEF2_WMS( L1toL1Mem        , Ctz_Long     , Wasm::WasmMath::Ctz<int64>)
   DEF2_WMS( L1toL1Mem        , PopCnt_Long  , Wasm::WasmMath::PopCnt<int64>)
-  DEF2_WMS( I2toI1Ctx        , Div_Check_UInt , (OP_DivRemCheck<uint32, &AsmJsMath::Div<uint32>>) )
-  DEF2_WMS( I2toI1Ctx        , Rem_Check_UInt , (OP_DivRemCheck<uint32, &AsmJsMath::Rem<uint32>>) )
 
+// Unsigned Int64 Math
+  DEF2_WMS( L2toL1Ctx        , Div_Trap_ULong, (OP_UnsignedDivRemCheck<uint64, &AsmJsMath::DivUnsafe<uint64>>) )
+  DEF2_WMS( L2toL1Ctx        , Rem_Trap_ULong, (OP_UnsignedDivRemCheck<uint64, &AsmJsMath::RemUnsafe<uint64>>) )
 
-  DEF2_WMS( D1toD1Mem        , Neg_Db       , AsmJsMath::Neg<double>                             ) // double unary '-'
+// Double Math
+  DEF2_WMS( D1toD1Mem        , Neg_Db       , AsmJsMath::Neg<double>                             )
   DEF2_WMS( D2toD1Mem        , Add_Db       , AsmJsMath::Add<double>                             )
   DEF2_WMS( D2toD1Mem        , Sub_Db       , AsmJsMath::Sub<double>                             )
   DEF2_WMS( D2toD1Mem        , Mul_Db       , AsmJsMath::Mul<double>                             )
-  DEF2_WMS( D2toD1Mem        , Div_Db       , AsmJsMath::Div<double>                             )
-  DEF2_WMS( D2toD1Mem        , Rem_Db       , AsmJsMath::Rem<double>                             )
+  DEF2_WMS( D2toD1Mem        , Div_Db       , AsmJsMath::DivChecked<double>                      )
+  DEF2_WMS( D2toD1Mem        , Rem_Db       , AsmJsMath::RemChecked<double>                      )
 
-  DEF2_WMS( F1toF1Mem        , Neg_Flt      , AsmJsMath::Neg<float>                              ) // float unary '-'
+// Float Math
+  DEF2_WMS( F1toF1Mem        , Neg_Flt      , AsmJsMath::Neg<float>                              )
   DEF2_WMS( F2toF1Mem        , Add_Flt      , AsmJsMath::Add<float>                              )
   DEF2_WMS( F2toF1Mem        , Sub_Flt      , AsmJsMath::Sub<float>                              )
   DEF2_WMS( F2toF1Mem        , Mul_Flt      , AsmJsMath::Mul<float>                              )
-  DEF2_WMS( F2toF1Mem        , Div_Flt      , AsmJsMath::Div<float>                              )
+  DEF2_WMS( F2toF1Mem        , Div_Flt      , AsmJsMath::DivChecked<float>                       )
 
+// Int32 comparisons
   DEF2_WMS( I2toI1Mem        , CmLt_Int     , AsmJsMath::CmpLt<int>                              )
   DEF2_WMS( I2toI1Mem        , CmLe_Int     , AsmJsMath::CmpLe<int>                              )
   DEF2_WMS( I2toI1Mem        , CmGt_Int     , AsmJsMath::CmpGt<int>                              )
   DEF2_WMS( I2toI1Mem        , CmGe_Int     , AsmJsMath::CmpGe<int>                              )
   DEF2_WMS( I2toI1Mem        , CmEq_Int     , AsmJsMath::CmpEq<int>                              )
   DEF2_WMS( I2toI1Mem        , CmNe_Int     , AsmJsMath::CmpNe<int>                              )
+  DEF2_WMS( I1toI1Mem        , Eqz_Int      , Wasm::WasmMath::Eqz<int>                           )
+
+// Unsigned Int32 comparisons
   DEF2_WMS( I2toI1Mem        , CmLt_UInt    , AsmJsMath::CmpLt<unsigned int>                     )
   DEF2_WMS( I2toI1Mem        , CmLe_UInt    , AsmJsMath::CmpLe<unsigned int>                     )
   DEF2_WMS( I2toI1Mem        , CmGt_UInt    , AsmJsMath::CmpGt<unsigned int>                     )
   DEF2_WMS( I2toI1Mem        , CmGe_UInt    , AsmJsMath::CmpGe<unsigned int>                     )
-  DEF2_WMS( I1toI1Mem        , Abs_Int      , ::abs                                              )
-  DEF2_WMS( I2toI1Mem        , Min_Int      , min                                                )
-  DEF2_WMS( I2toI1Mem        , Max_Int      , max                                                )
-  DEF2_WMS( I2toI1Mem        , Imul_Int     , AsmJsMath::Mul<int>                                )
-  DEF2_WMS( I1toI1Mem        , Clz32_Int    , AsmJsMath::Clz32                                   )
-  DEF2_WMS( I1toI1Mem        , Ctz_Int      , Wasm::WasmMath::Ctz                                )
-  DEF2_WMS( I1toI1Mem        , Eqz_Int      , Wasm::WasmMath::Eqz<int>                           )
 
 // Int64 comparisons
   DEF2_WMS( L2toI1Mem        , CmEq_Long    , AsmJsMath::CmpEq<int64>)
   DEF2_WMS( L2toI1Mem        , CmNe_Long    , AsmJsMath::CmpNe<int64>)
   DEF2_WMS( L2toI1Mem        , CmLt_Long    , AsmJsMath::CmpLt<int64>)
   DEF2_WMS( L2toI1Mem        , CmLe_Long    , AsmJsMath::CmpLe<int64>)
-  DEF2_WMS( L2toI1Mem        , CmLt_ULong   , AsmJsMath::CmpLt<uint64>)
-  DEF2_WMS( L2toI1Mem        , CmLe_ULong   , AsmJsMath::CmpLe<uint64>)
   DEF2_WMS( L2toI1Mem        , CmGt_Long    , AsmJsMath::CmpGt<int64>)
   DEF2_WMS( L2toI1Mem        , CmGe_Long    , AsmJsMath::CmpGe<int64>)
-  DEF2_WMS( L2toI1Mem        , CmGt_ULong   , AsmJsMath::CmpGt<uint64>)
-  DEF2_WMS( L2toI1Mem        , CmGe_ULong   , AsmJsMath::CmpGe<uint64>)
   DEF2_WMS( L1toI1Mem        , Eqz_Long     , Wasm::WasmMath::Eqz<int64>)
 
+// Unsigned Int64 comparisons
+  DEF2_WMS( L2toI1Mem        , CmLt_ULong   , AsmJsMath::CmpLt<uint64>)
+  DEF2_WMS( L2toI1Mem        , CmLe_ULong   , AsmJsMath::CmpLe<uint64>)
+  DEF2_WMS( L2toI1Mem        , CmGt_ULong   , AsmJsMath::CmpGt<uint64>)
+  DEF2_WMS( L2toI1Mem        , CmGe_ULong   , AsmJsMath::CmpGe<uint64>)
+
+// Double comparisons
   DEF2_WMS( D2toI1Mem        , CmLt_Db      , AsmJsMath::CmpLt<double>                           )
   DEF2_WMS( D2toI1Mem        , CmLe_Db      , AsmJsMath::CmpLe<double>                           )
   DEF2_WMS( D2toI1Mem        , CmGt_Db      , AsmJsMath::CmpGt<double>                           )
@@ -198,6 +207,7 @@
   DEF2_WMS( D2toI1Mem        , CmEq_Db      , AsmJsMath::CmpEq<double>                           )
   DEF2_WMS( D2toI1Mem        , CmNe_Db      , AsmJsMath::CmpNe<double>                           )
 
+// Float comparisons
   DEF2_WMS( F2toI1Mem        , CmLt_Flt     , AsmJsMath::CmpLt<float>                            )
   DEF2_WMS( F2toI1Mem        , CmLe_Flt     , AsmJsMath::CmpLe<float>                            )
   DEF2_WMS( F2toI1Mem        , CmGt_Flt     , AsmJsMath::CmpGt<float>                            )
@@ -205,6 +215,8 @@
   DEF2_WMS( F2toI1Mem        , CmEq_Flt     , AsmJsMath::CmpEq<float>                            )
   DEF2_WMS( F2toI1Mem        , CmNe_Flt     , AsmJsMath::CmpNe<float>                            )
 
+// Standard Math lib
+  DEF2_WMS( I2toI1Mem        , Imul_Int     , AsmJsMath::Mul<int>                                )
   DEF2_WMS( D1toD1Mem        , Sin_Db       , Math::Sin                                          )
   DEF2_WMS( D1toD1Mem        , Cos_Db       , Math::Cos                                          )
   DEF2_WMS( D1toD1Mem        , Tan_Db       , Math::Tan                                          )
diff --git a/lib/Runtime/Language/InterpreterStackFrame.cpp b/lib/Runtime/Language/InterpreterStackFrame.cpp
index 70ad16c..4ac0f49 100644
--- a/lib/Runtime/Language/InterpreterStackFrame.cpp
+++ b/lib/Runtime/Language/InterpreterStackFrame.cpp
@@ -1766,6 +1766,20 @@
 #endif
 
 #if DYNAMIC_INTERPRETER_THUNK
+#pragma optimize("", off)
+#ifdef ASMJS_PLAT
+    void InterpreterStackFrame::StaticInterpreterAsmThunk(RecyclableObject* function, ...)
+    {
+        InterpreterAsmThunk((AsmJsCallStackLayout*)&function);
+    }
+#endif
+
+    Var InterpreterStackFrame::StaticInterpreterThunk(RecyclableObject* function, CallInfo callInfo, ...)
+    {
+        return InterpreterThunk((JavascriptCallStackLayout*)&function);
+    }
+#pragma optimize("", on)
+
     Var InterpreterStackFrame::InterpreterThunk(JavascriptCallStackLayout* layout)
     {
         Js::ScriptFunction * function = Js::ScriptFunction::FromVar(layout->functionObject);
@@ -1775,6 +1789,7 @@
         return InterpreterHelper(function, args, localReturnAddress, localAddressOfReturnAddress);
     }
 #else
+
 #pragma optimize("", off)
     Var InterpreterStackFrame::InterpreterThunk(RecyclableObject* function, CallInfo callInfo, ...)
     {
@@ -2112,7 +2127,7 @@
         ScriptFunction * function = (ScriptFunction*)stack->functionObject;
         Var* paramsAddr = stack->args;
         int  flags = CallFlags_Value;
-        ArgSlot nbArgs = UInt16Math::Add(function->GetFunctionBody()->GetAsmJsFunctionInfo()->GetArgCount(), 1);
+        ArgSlot nbArgs = ArgSlotMath::Add(function->GetFunctionBody()->GetAsmJsFunctionInfo()->GetArgCount(), 1);
         CallInfo callInfo((CallFlags)flags, nbArgs);
         ArgumentReader args(&callInfo, paramsAddr);
         void* returnAddress = _ReturnAddress();
@@ -2235,7 +2250,7 @@
     {
         Js::ScriptFunction * function = Js::ScriptFunction::FromVar(layout->functionObject);
         int  flags = CallFlags_Value;
-        ArgSlot nbArgs = UInt16Math::Add(function->GetFunctionBody()->GetAsmJsFunctionInfo()->GetArgCount(), 1);
+        ArgSlot nbArgs = ArgSlotMath::Add(function->GetFunctionBody()->GetAsmJsFunctionInfo()->GetArgCount(), 1);
 
         CallInfo callInfo((CallFlags)flags, nbArgs);
         ArgumentReader args(&callInfo, (Var*)layout->args);
@@ -2776,7 +2791,7 @@
                 // TODO: add more runtime checks here
                 FunctionInfoPtrPtr functionInfo = m_functionBody->GetNestedFuncReference(i);
 
-                AsmJsScriptFunction* scriptFuncObj = (AsmJsScriptFunction*)ScriptFunction::OP_NewScFunc(pDisplay, functionInfo);
+                AsmJsScriptFunction* scriptFuncObj = AsmJsScriptFunction::OP_NewAsmJsFunc(pDisplay, functionInfo);
                 localModuleFunctions[modFunc.location] = scriptFuncObj;
 
                 if (scriptFuncObj->GetDynamicType()->GetEntryPoint() == DefaultDeferredDeserializeThunk)
@@ -2784,15 +2799,8 @@
                     JavascriptFunction::DeferredDeserialize(scriptFuncObj);
                 }
 
-                if (i == 0 && info->GetUsesChangeHeap())
-                {
-                    scriptFuncObj->GetDynamicType()->SetEntryPoint(AsmJsChangeHeapBuffer);
-                }
-                else
-                {
-                    scriptFuncObj->GetDynamicType()->SetEntryPoint(AsmJsExternalEntryPoint);
-                    scriptFuncObj->GetFunctionBody()->GetAsmJsFunctionInfo()->SetModuleFunctionBody(asmJsModuleFunctionBody);
-                }
+                scriptFuncObj->GetDynamicType()->SetEntryPoint(AsmJsExternalEntryPoint);
+                scriptFuncObj->GetFunctionBody()->GetAsmJsFunctionInfo()->SetModuleFunctionBody(asmJsModuleFunctionBody);
                 scriptFuncObj->SetModuleMemory((Field(Var)*)moduleMemoryPtr);
                 if (!info->IsRuntimeProcessed())
                 {
@@ -3024,11 +3032,11 @@
                 break;
             }
 
-            // Make sure slots are aligned for this type
-            Assert(::Math::Align<intptr_t>((intptr_t)destination, (intptr_t)WAsmJs::GetTypeByteSize(type)) == (intptr_t)destination);
             byte* source = constTable + typeInfo->constSrcByteOffset;
             if (typeInfo->constCount > 0 && source != destination)
             {
+                // Make sure slots are aligned for this type
+                Assert(::Math::Align<intptr_t>((intptr_t)destination, (intptr_t)WAsmJs::GetTypeByteSize(type)) == (intptr_t)destination);
                 Assert(typeInfo->constSrcByteOffset != Js::Constants::InvalidOffset);
                 uint constByteSize = typeInfo->constCount * WAsmJs::GetTypeByteSize(type);
                 memmove_s(destination, constByteSize, source, constByteSize);
@@ -3042,15 +3050,9 @@
         if (func->GetFunctionBody()->IsWasmFunction())
         {
             WebAssemblyMemory * wasmMem = *(WebAssemblyMemory**)((Var*)frame->GetItem(0) + AsmJsModuleMemory::MemoryTableBeginOffset);
-            Var * val = nullptr;
-            if (wasmMem != nullptr)
-            {
-                val = (Var*)((BYTE*)wasmMem + WebAssemblyMemory::GetOffsetOfArrayBuffer());
-            }
-            m_localSlots[AsmJsFunctionMemory::ArrayBufferRegister] = val;
-
             m_signatures = func->GetFunctionBody()->GetAsmJsFunctionInfo()->GetWebAssemblyModule()->GetSignatures();
             m_wasmMemory = wasmMem;
+            m_localSlots[AsmJsFunctionMemory::ArrayBufferRegister] = nullptr;
         }
         else
 #endif
@@ -6683,7 +6685,10 @@
                     this->ProcessTryHandlerBailout(ehBailoutData->child, --tryNestingDepth);
                 }
 
-                Js::JavascriptExceptionOperators::AutoCatchHandlerExists autoCatchHandlerExists(scriptContext);
+                if (catchOffset != 0)
+                {
+                    Js::JavascriptExceptionOperators::AutoCatchHandlerExists autoCatchHandlerExists(scriptContext);
+                }
 
                 if (this->IsInDebugMode())
                 {
@@ -6871,8 +6876,6 @@
 
                 m_reader.SetCurrentOffset(finallyOffset);
 
-                ResetOut();
-
                 this->nestedFinallyDepth++;
 
                 // mark the stackFrame as 'in finally block'
@@ -7927,10 +7930,10 @@
 
     int InterpreterStackFrame::OP_GetMemorySize()
     {
-#ifdef ASMJS_PLAT
-        JavascriptArrayBuffer* arr = *(JavascriptArrayBuffer**)GetNonVarReg(AsmJsFunctionMemory::ArrayBufferRegister);
-        return arr ? arr->GetByteLength() >> 16 : 0;
+#ifdef ENABLE_WASM
+        return (int)m_wasmMemory->GetCurrentMemoryPages();
 #else
+        Assert(UNREACHED);
         return 0;
 #endif
     }
@@ -7938,17 +7941,14 @@
     int InterpreterStackFrame::OP_GrowMemory(int32 delta)
     {
 #ifdef ENABLE_WASM
-        int32 oldPageCount = m_wasmMemory->GrowInternal((uint32)delta);
-
-        SetNonVarReg(AsmJsFunctionMemory::ArrayBufferRegister, m_wasmMemory->GetBuffer());
-        return oldPageCount;
+        return m_wasmMemory->GrowInternal((uint32)delta);
 #else
         Assert(UNREACHED);
         return 0;
 #endif
     }
 
-    template <typename T, InterpreterStackFrame::AsmJsMathPtr<T> func> T InterpreterStackFrame::OP_DivRemCheck(T aLeft, T aRight, ScriptContext* scriptContext)
+    template <typename T, InterpreterStackFrame::AsmJsMathPtr<T> func> T InterpreterStackFrame::OP_UnsignedDivRemCheck(T aLeft, T aRight, ScriptContext* scriptContext)
     {
         if (aRight == 0)
         {
@@ -7958,14 +7958,14 @@
         return func(aLeft, aRight);
     }
 
-    template <typename T, InterpreterStackFrame::AsmJsMathPtr<T> func, T MIN> T InterpreterStackFrame::OP_DivOverflow(T aLeft, T aRight, ScriptContext* scriptContext)
+    template <typename T, InterpreterStackFrame::AsmJsMathPtr<T> func> T InterpreterStackFrame::OP_DivOverflow(T aLeft, T aRight, ScriptContext* scriptContext)
     {
         if (aRight == 0)
         {
             JavascriptError::ThrowWebAssemblyRuntimeError(scriptContext, WASMERR_DivideByZero);
         }
 
-        if (aLeft == MIN && aRight == -1)
+        if (aLeft == SignedTypeTraits<T>::MinValue && aRight == -1)
         {
             JavascriptError::ThrowWebAssemblyRuntimeError(scriptContext, VBSERR_Overflow);
         }
@@ -7973,6 +7973,21 @@
         return func(aLeft, aRight);
     }
 
+    template <typename T, InterpreterStackFrame::AsmJsMathPtr<T> func> T InterpreterStackFrame::OP_RemOverflow(T aLeft, T aRight, ScriptContext* scriptContext)
+    {
+        if (aRight == 0)
+        {
+            JavascriptError::ThrowWebAssemblyRuntimeError(scriptContext, WASMERR_DivideByZero);
+        }
+
+        if (aLeft == SignedTypeTraits<T>::MinValue && aRight == -1)
+        {
+            return 0;
+        }
+
+        return func(aLeft, aRight);
+    }
+
     void InterpreterStackFrame::OP_Unreachable()
     {
         JavascriptError::ThrowUnreachable(scriptContext);
@@ -7982,13 +7997,14 @@
     void InterpreterStackFrame::OP_SimdLdArrGeneric(const unaligned T* playout)
     {
         Assert(playout->ViewType < Js::ArrayBufferView::TYPE_COUNT);
-        const uint32 index = (uint32)GetRegRawInt(playout->SlotIndex) & ArrayBufferView::ViewMask[playout->ViewType];
+        AssertMsg(!m_functionBody->IsWasmFunction(), "Do not use AsmJsFunctionMemory::ArrayBufferRegister for Wasm, Use WebAssemblyMemory directly instead");
+        const uint64 index = (uint32)GetRegRawInt(playout->SlotIndex) & ArrayBufferView::ViewMask[playout->ViewType];
         JavascriptArrayBuffer* arr = *(JavascriptArrayBuffer**)GetNonVarReg(AsmJsFunctionMemory::ArrayBufferRegister);
         BYTE* buffer = arr->GetBuffer();
         uint8 dataWidth = playout->DataWidth;
         RegSlot dstReg = playout->Value;
 
-        if (index < 0 || index + dataWidth > arr->GetByteLength())
+        if (index + dataWidth > arr->GetByteLength())
         {
             JavascriptError::ThrowRangeError(scriptContext, JSERR_ArgumentOutOfRange, _u("Simd typed array access"));
         }
@@ -8003,13 +8019,14 @@
     void InterpreterStackFrame::OP_SimdLdArrConstIndex(const unaligned T* playout)
     {
         Assert(playout->ViewType < Js::ArrayBufferView::TYPE_COUNT);
-        const uint32 index = playout->SlotIndex;
+        AssertMsg(!m_functionBody->IsWasmFunction(), "Do not use AsmJsFunctionMemory::ArrayBufferRegister for Wasm, Use WebAssemblyMemory directly instead");
+        const uint64 index = (uint32)playout->SlotIndex;
         JavascriptArrayBuffer* arr = *(JavascriptArrayBuffer**)GetNonVarReg(AsmJsFunctionMemory::ArrayBufferRegister);
         BYTE* buffer = arr->GetBuffer();
         uint8 dataWidth = playout->DataWidth;
         RegSlot dstReg = playout->Value;
 
-        if (index < 0 || index + dataWidth > arr->GetByteLength())
+        if (index + dataWidth > arr->GetByteLength())
         {
             JavascriptError::ThrowRangeError(scriptContext, JSERR_ArgumentOutOfRange, _u("Simd typed array access"));
         }
@@ -8024,13 +8041,14 @@
     void InterpreterStackFrame::OP_SimdStArrGeneric(const unaligned T* playout)
     {
         Assert(playout->ViewType < Js::ArrayBufferView::TYPE_COUNT);
-        const uint32 index = (uint32)GetRegRawInt(playout->SlotIndex) & ArrayBufferView::ViewMask[playout->ViewType];
+        AssertMsg(!m_functionBody->IsWasmFunction(), "Do not use AsmJsFunctionMemory::ArrayBufferRegister for Wasm, Use WebAssemblyMemory directly instead");
+        const uint64 index = (uint32)GetRegRawInt(playout->SlotIndex) & ArrayBufferView::ViewMask[playout->ViewType];
         JavascriptArrayBuffer* arr = *(JavascriptArrayBuffer**)GetNonVarReg(AsmJsFunctionMemory::ArrayBufferRegister);
         BYTE* buffer = arr->GetBuffer();
         uint8 dataWidth = playout->DataWidth;
         RegSlot srcReg = playout->Value;
 
-        if (index < 0 || index + dataWidth > arr->GetByteLength())
+        if (index + dataWidth > arr->GetByteLength())
         {
             JavascriptError::ThrowRangeError(scriptContext, JSERR_ArgumentOutOfRange, _u("Simd typed array access"));
         }
@@ -8043,13 +8061,14 @@
     void InterpreterStackFrame::OP_SimdStArrConstIndex(const unaligned T* playout)
     {
         Assert(playout->ViewType < Js::ArrayBufferView::TYPE_COUNT);
-        const uint32 index = playout->SlotIndex;
+        AssertMsg(!m_functionBody->IsWasmFunction(), "Do not use AsmJsFunctionMemory::ArrayBufferRegister for Wasm, Use WebAssemblyMemory directly instead");
+        const uint64 index = (uint32)playout->SlotIndex;
         JavascriptArrayBuffer* arr = *(JavascriptArrayBuffer**)GetNonVarReg(AsmJsFunctionMemory::ArrayBufferRegister);
         BYTE* buffer = arr->GetBuffer();
         uint8 dataWidth = playout->DataWidth;
         RegSlot srcReg = playout->Value;
 
-        if (index < 0 || index + dataWidth > arr->GetByteLength())
+        if (index + dataWidth > arr->GetByteLength())
         {
             JavascriptError::ThrowRangeError(scriptContext, JSERR_ArgumentOutOfRange, _u("Simd typed array access"));
         }
@@ -8485,6 +8504,7 @@
     void InterpreterStackFrame::OP_StArr(uint32 index, RegSlot regSlot)
     {
         CompileAssert(Js::ArrayBufferView::TYPE_COUNT == (sizeof(InterpreterStackFrame::StArrFunc) / sizeof(InterpreterStackFrame::ArrFunc)));
+        AssertMsg(!m_functionBody->IsWasmFunction(), "Do not use AsmJsFunctionMemory::ArrayBufferRegister for Wasm, Use WebAssemblyMemory directly instead");
         JavascriptArrayBuffer* arr = *(JavascriptArrayBuffer**)GetNonVarReg(AsmJsFunctionMemory::ArrayBufferRegister);
         if (index < arr->GetByteLength())
         {
@@ -8566,6 +8586,7 @@
     void InterpreterStackFrame::OP_LdArr(uint32 index, RegSlot regSlot)
     {
         CompileAssert(Js::ArrayBufferView::TYPE_COUNT == (sizeof(InterpreterStackFrame::LdArrFunc) / sizeof(InterpreterStackFrame::ArrFunc)));
+        AssertMsg(!m_functionBody->IsWasmFunction(), "Do not use AsmJsFunctionMemory::ArrayBufferRegister for Wasm, Use WebAssemblyMemory directly instead");
         JavascriptArrayBuffer* arr = *(JavascriptArrayBuffer**)GetNonVarReg(AsmJsFunctionMemory::ArrayBufferRegister);
         BYTE* buffer = arr->GetBuffer();
         ArrayType val = index < (arr->GetByteLength()) ? *(ArrayType*)(buffer + index) : GetArrayViewOverflowVal<ArrayType>();
@@ -8604,9 +8625,10 @@
     template <class T>
     void InterpreterStackFrame::OP_LdArrWasm(const unaligned T* playout)
     {
+#ifdef ENABLE_WASM
         Assert(playout->ViewType < Js::ArrayBufferView::TYPE_COUNT);
-        const uint64 index = playout->Offset + (uint64)GetRegRawInt(playout->SlotIndex);
-        JavascriptArrayBuffer* arr = *(JavascriptArrayBuffer**)GetNonVarReg(AsmJsFunctionMemory::ArrayBufferRegister);
+        const uint64 index = playout->Offset + (uint64)(uint32)GetRegRawInt(playout->SlotIndex);
+        WebAssemblyArrayBuffer* arr = m_wasmMemory->GetBuffer();
         if (index + TypeToSizeMap[playout->ViewType] > arr->GetByteLength())
         {
             JavascriptError::ThrowWebAssemblyRuntimeError(scriptContext, WASMERR_ArrayIndexOutOfRange);
@@ -8631,6 +8653,9 @@
         case ArrayBufferView::ViewType::TYPE_UINT32_TO_INT64 : SetRegRaw<int64>(playout->Value, (int64)*(uint32*)(buffer + index)); return;
         default:Assert(UNREACHED);
         }
+#else
+        Assert(UNREACHED);
+#endif
     }
     template <class T>
     void InterpreterStackFrame::OP_LdArrConstIndex(const unaligned T* playout)
@@ -8649,9 +8674,10 @@
     template <class T>
     void InterpreterStackFrame::OP_StArrWasm(const unaligned T* playout)
     {
+#ifdef ENABLE_WASM
         Assert(playout->ViewType < Js::ArrayBufferView::TYPE_COUNT);
-        const uint64 index = playout->Offset + (uint64)GetRegRawInt(playout->SlotIndex);
-        JavascriptArrayBuffer* arr = *(JavascriptArrayBuffer**)GetNonVarReg(AsmJsFunctionMemory::ArrayBufferRegister);
+        const uint64 index = playout->Offset + (uint64)(uint32)GetRegRawInt(playout->SlotIndex);
+        WebAssemblyArrayBuffer* arr = m_wasmMemory->GetBuffer();
         if (index + TypeToSizeMap[playout->ViewType] > arr->GetByteLength())
         {
             JavascriptError::ThrowWebAssemblyRuntimeError(scriptContext, WASMERR_ArrayIndexOutOfRange);
@@ -8676,6 +8702,9 @@
         case ArrayBufferView::ViewType::TYPE_UINT32_TO_INT64: *(uint32*)(buffer + index) = (uint32) (GetRegRaw<int64>(playout->Value)); return;
         default:Assert(UNREACHED);
         }
+#else
+        Assert(UNREACHED);
+#endif
     }
     template <class T>
     void InterpreterStackFrame::OP_StArrConstIndex(const unaligned T* playout)
diff --git a/lib/Runtime/Language/InterpreterStackFrame.h b/lib/Runtime/Language/InterpreterStackFrame.h
index 194608f..a006c46 100644
--- a/lib/Runtime/Language/InterpreterStackFrame.h
+++ b/lib/Runtime/Language/InterpreterStackFrame.h
@@ -200,8 +200,9 @@
         int32 OP_GrowMemory(int32 delta);
         void OP_Unreachable();
         template <typename T> using AsmJsMathPtr = T(*)(T a, T b);
-        template <typename T, AsmJsMathPtr<T> func, T MIN> static T OP_DivOverflow(T a, T b, ScriptContext* scriptContext);
-        template <typename T, AsmJsMathPtr<T> func> static T OP_DivRemCheck(T a, T b, ScriptContext* scriptContext);
+        template <typename T, AsmJsMathPtr<T> func> static T OP_DivOverflow(T a, T b, ScriptContext* scriptContext);
+        template <typename T, AsmJsMathPtr<T> func> static T OP_RemOverflow(T a, T b, ScriptContext* scriptContext);
+        template <typename T, AsmJsMathPtr<T> func> static T OP_UnsignedDivRemCheck(T a, T b, ScriptContext* scriptContext);
         void ValidateSetRegValue(Var value, bool allowStackVar = false, bool allowStackVarOnDisabledStackNestedFunc = true) const;
         template <typename RegSlotType> Var GetReg(RegSlotType localRegisterID) const;
         template <typename RegSlotType> void SetReg(RegSlotType localRegisterID, Var bValue);
@@ -316,12 +317,14 @@
 #endif
 
 #ifdef ASMJS_PLAT
+        static void StaticInterpreterAsmThunk(RecyclableObject* function, ...);
         static void InterpreterAsmThunk(AsmJsCallStackLayout* layout);
 #endif
 
 #if DYNAMIC_INTERPRETER_THUNK
         static Var DelayDynamicInterpreterThunk(RecyclableObject* function, CallInfo callInfo, ...);
         _NOINLINE static Var InterpreterThunk(JavascriptCallStackLayout* layout);
+        _NOINLINE static Var StaticInterpreterThunk(RecyclableObject* function, CallInfo callInfo, ...);
 #else
         _NOINLINE static Var InterpreterThunk(RecyclableObject* function, CallInfo callInfo, ...);
 #endif
diff --git a/lib/Runtime/Language/JavascriptOperators.cpp b/lib/Runtime/Language/JavascriptOperators.cpp
index 5002459..4e22721 100644
--- a/lib/Runtime/Language/JavascriptOperators.cpp
+++ b/lib/Runtime/Language/JavascriptOperators.cpp
@@ -1913,7 +1913,7 @@
         for (int i = 0; i < length; i += 1)
         {
             Var value;
-            DynamicObject *obj = DynamicObject::FromVar(pScope->GetItem(i));
+            RecyclableObject *obj = RecyclableObject::FromVar(pScope->GetItem(i));
             if (JavascriptOperators::GetProperty(obj, Js::PropertyIds::_lexicalThisSlotSymbol, &value, scriptContext))
             {
                 return value;
@@ -5958,7 +5958,10 @@
 
     Var JavascriptOperators::NewScObjectNoCtor(Var instance, ScriptContext * requestContext)
     {
-        return NewScObjectNoCtorCommon(instance, requestContext, false);
+        // We can still call into NewScObjectNoCtor variations in JIT code for performance; however for proxy we don't
+        // really need the new object as the trap will handle the "this" pointer separately. pass back nullptr to ensure
+        // failure in invalid case.
+        return (JavascriptProxy::Is(instance)) ? nullptr : NewScObjectNoCtorCommon(instance, requestContext, false);
     }
 
     Var JavascriptOperators::NewScObjectNoCtorCommon(Var instance, ScriptContext* requestContext, bool isBaseClassConstructorNewScObject)
@@ -5979,13 +5982,6 @@
     {
         ScriptContext* functionScriptContext = function->GetScriptContext();
 
-        if (JavascriptProxy::Is(function))
-        {
-            // We can still call into NewScObjectNoCtor variations in JIT code for performance; however for proxy we don't
-            // really need the new object as the trap will handle the "this" pointer separately. pass back nullptr to ensure
-            // failure in invalid case.
-            return  nullptr;
-        }
         RecyclableObject * prototype = JavascriptOperators::GetPrototypeObject(function, functionScriptContext);
         prototype = RecyclableObject::FromVar(CrossSite::MarshalVar(requestContext, prototype));
         Var object = requestContext->GetLibrary()->CreateObject(prototype);
@@ -6520,7 +6516,7 @@
             aParent = CrossSite::MarshalVar(scriptContext, aParent);
             if (i == length)
             {
-                length += 8;
+                length = UInt16Math::Add(length, 8);
                 FrameDisplay * tmp = RecyclerNewPlus(scriptContext->GetRecycler(), length * sizeof(void*), FrameDisplay, length);
                 js_memcpy_s((char*)tmp + tmp->GetOffsetOfScopes(), tmp->GetLength() * sizeof(void *), (char*)pDisplay + pDisplay->GetOffsetOfScopes(), pDisplay->GetLength() * sizeof(void*));
                 pDisplay = tmp;
@@ -6578,10 +6574,10 @@
 
         FrameDisplay *pDisplay = nullptr;
         FrameDisplay *envDisplay = (FrameDisplay*)argEnv;
-        uint16 length = envDisplay->GetLength() + 1;
+        uint16 length = UInt16Math::Add(envDisplay->GetLength(), 1);
 
         pDisplay = RecyclerNewPlus(scriptContext->GetRecycler(), length * sizeof(void*), FrameDisplay, length);
-        for (int j = 0; j < length - 1; j++)
+        for (uint16 j = 0; j < length - 1; j++)
         {
             pDisplay->SetItem(j + 1, envDisplay->GetItem(j));
         }
diff --git a/lib/Runtime/Language/RuntimeLanguagePch.h b/lib/Runtime/Language/RuntimeLanguagePch.h
index 6a5c877..e6257f1 100644
--- a/lib/Runtime/Language/RuntimeLanguagePch.h
+++ b/lib/Runtime/Language/RuntimeLanguagePch.h
@@ -9,11 +9,8 @@
 
 #include "Runtime.h"
 
-#include "Language/AsmJsTypes.h"
 #include "Language/AsmJsUtils.h"
 #include "Language/AsmJsLink.h"
-#include "Language/AsmJsModule.h"
-#include "Language/AsmJs.h"
 #ifdef ASMJS_PLAT
 #include "Language/AsmJsJitTemplate.h"
 #include "Language/AsmJsEncoder.h"
diff --git a/lib/Runtime/Language/SimdUtils.cpp b/lib/Runtime/Language/SimdUtils.cpp
index a595155..3e5f502 100644
--- a/lib/Runtime/Language/SimdUtils.cpp
+++ b/lib/Runtime/Language/SimdUtils.cpp
@@ -198,7 +198,7 @@
         *tarray = TypedArrayBase::FromVar(arg1);
         uint32 bpe = (*tarray)->GetBytesPerElement();
         int32 offset = (*index) * bpe;
-        if (offset < 0 || (offset + dataWidth) >(int32)(*tarray)->GetByteLength())
+        if (offset < 0 || ((int64)offset + dataWidth) >(*tarray)->GetByteLength())
         {
             JavascriptError::ThrowRangeError(scriptContext, JSERR_ArgumentOutOfRange, _u("Simd typed array access"));
         }
diff --git a/lib/Runtime/Language/SourceTextModuleRecord.cpp b/lib/Runtime/Language/SourceTextModuleRecord.cpp
index e534ae0..8b43075 100644
--- a/lib/Runtime/Language/SourceTextModuleRecord.cpp
+++ b/lib/Runtime/Language/SourceTextModuleRecord.cpp
@@ -84,11 +84,17 @@
 
     HRESULT SourceTextModuleRecord::ParseSource(__in_bcount(sourceLength) byte* sourceText, uint32 sourceLength, SRCINFO * srcInfo, Var* exceptionVar, bool isUtf8)
     {
-        OUTPUT_TRACE_DEBUGONLY(Js::ModulePhase, _u("ParseSource(%s)\n"), this->GetSpecifierSz());
-        Assert(!wasParsed);
+        Assert(!wasParsed || sourceText == nullptr);
         Assert(parser == nullptr);
         Assert(exceptionVar != nullptr);
         HRESULT hr = NOERROR;
+
+        // Return if loading failure has been reported
+        if (sourceText == nullptr && wasParsed)
+        {
+            return hr;
+        }
+
         ScriptContext* scriptContext = GetScriptContext();
         CompileScriptException se;
         ArenaAllocator* allocator = scriptContext->GeneralAllocator();
@@ -100,10 +106,12 @@
             *exceptionVar = pError;
             return E_NOTIMPL;
         }
+
         // Host indicates that the current module failed to load.
         if (sourceText == nullptr)
         {
             Assert(sourceLength == 0);
+            OUTPUT_TRACE_DEBUGONLY(Js::ModulePhase, _u("Failed to load: %s\n"), this->GetSpecifierSz());
             hr = E_FAIL;
             JavascriptError *pError = scriptContext->GetLibrary()->CreateURIError();
             JavascriptError::SetErrorMessageProperties(pError, hr, this->GetSpecifierSz(), scriptContext);
@@ -111,6 +119,7 @@
         }
         else
         {
+            OUTPUT_TRACE_DEBUGONLY(Js::ModulePhase, _u("ParseSource(%s)\n"), this->GetSpecifierSz());
             try
             {
                 AUTO_NESTED_HANDLED_EXCEPTION_TYPE((ExceptionType)(ExceptionType_OutOfMemory | ExceptionType_StackOverflow));
@@ -157,6 +166,7 @@
                 }
             }
         }
+
         if (FAILED(hr))
         {
             if (*exceptionVar == nullptr)
@@ -174,12 +184,26 @@
                 this->errorObject = *exceptionVar;
             }
 
-            OUTPUT_TRACE_DEBUGONLY(Js::ModulePhase, _u("\t>NotifyParentAsNeeded\n"));
             if (this->promise != nullptr)
             {
                 SourceTextModuleRecord::ResolveOrRejectDynamicImportPromise(false, this->errorObject, this->scriptContext, this);
             }
 
+            // Notify host if current module is dynamically-loaded module, or is root module and the host hasn't been notified
+            bool isScriptActive = scriptContext->GetThreadContext()->IsScriptActive();
+            if (this->promise != nullptr || (isRootModule && !hadNotifyHostReady))
+            {
+                OUTPUT_TRACE_DEBUGONLY(Js::ModulePhase, _u("\t>NotifyHostAboutModuleReady %s (ParseSource error)\n"), this->GetSpecifierSz());
+                LEAVE_SCRIPT_IF(scriptContext, isScriptActive,
+                {
+                    scriptContext->GetHostScriptContext()->NotifyHostAboutModuleReady(this, this->errorObject);
+                });
+
+                hadNotifyHostReady = true;
+            }
+
+            // Notify parent if applicable
+            OUTPUT_TRACE_DEBUGONLY(Js::ModulePhase, _u("\t>NotifyParentAsNeeded\n"));
             NotifyParentsAsNeeded();
         }
         return hr;
@@ -251,6 +275,7 @@
                     {
                         bool isScriptActive = scriptContext->GetThreadContext()->IsScriptActive();
 
+                        OUTPUT_TRACE_DEBUGONLY(Js::ModulePhase, _u("\t>NotifyHostAboutModuleReady %s (PostProcessDynamicModuleImport)\n"), this->GetSpecifierSz());
                         LEAVE_SCRIPT_IF(scriptContext, isScriptActive,
                         {
                             hr = scriptContext->GetHostScriptContext()->NotifyHostAboutModuleReady(this, this->errorObject);
@@ -293,6 +318,7 @@
                 ModuleDeclarationInstantiation();
                 if (!hadNotifyHostReady && !WasEvaluated())
                 {
+                    OUTPUT_TRACE_DEBUGONLY(Js::ModulePhase, _u("\t>NotifyHostAboutModuleReady %s (PrepareForModuleDeclarationInitialization)\n"), this->GetSpecifierSz());
                     LEAVE_SCRIPT_IF(scriptContext, isScriptActive,
                     {
                         hr = scriptContext->GetHostScriptContext()->NotifyHostAboutModuleReady(this, this->errorObject);
@@ -335,6 +361,7 @@
 
             if (this->promise != nullptr || (isRootModule && !hadNotifyHostReady))
             {
+                OUTPUT_TRACE_DEBUGONLY(Js::ModulePhase, _u("\t>NotifyHostAboutModuleReady %s (OnChildModuleReady)\n"), this->GetSpecifierSz());
                 LEAVE_SCRIPT_IF(scriptContext, isScriptActive,
                 {
                     hr = scriptContext->GetHostScriptContext()->NotifyHostAboutModuleReady(this, this->errorObject);
@@ -710,16 +737,30 @@
                         return true;
                     }
                     moduleRecord = SourceTextModuleRecord::FromHost(moduleRecordBase);
-                    OUTPUT_TRACE_DEBUGONLY(Js::ModulePhase, _u("\t>SetParent in (%s)\n"), moduleRecord->GetSpecifierSz());
-                    moduleRecord->SetParent(this, moduleName);
+                    Var errorObject = moduleRecord->GetErrorObject();
+                    if (errorObject == nullptr)
+                    {
+                        OUTPUT_TRACE_DEBUGONLY(Js::ModulePhase, _u("\t>SetParent in (%s)\n"), moduleRecord->GetSpecifierSz());
+                        moduleRecord->SetParent(this, moduleName);
+                    }
+                    else
+                    {
+                        this->errorObject = errorObject;
+                        hr = E_FAIL;
+                        return true;
+                    }
                 }
                 return false;
             });
             if (FAILED(hr))
             {
-                JavascriptError *error = scriptContext->GetLibrary()->CreateError();
-                JavascriptError::SetErrorMessageProperties(error, hr, _u("fetch import module failed"), scriptContext);
-                this->errorObject = error;
+                if (this->errorObject == nullptr)
+                {
+                    JavascriptError *error = scriptContext->GetLibrary()->CreateError();
+                    JavascriptError::SetErrorMessageProperties(error, hr, _u("fetch import module failed"), scriptContext);
+                    this->errorObject = error;
+                }
+
                 OUTPUT_TRACE_DEBUGONLY(Js::ModulePhase, _u("\tfetch import module failed\n"));
                 NotifyParentsAsNeeded();
             }
diff --git a/lib/Runtime/Language/WAsmjsUtils.cpp b/lib/Runtime/Language/WAsmjsUtils.cpp
index c915f79..12861b4 100644
--- a/lib/Runtime/Language/WAsmjsUtils.cpp
+++ b/lib/Runtime/Language/WAsmjsUtils.cpp
@@ -100,9 +100,10 @@
             PHASE_OFF(Js::FullJitPhase, body) ||
             body->GetScriptContext()->GetConfig()->IsNoNative() ||
             body->GetIsAsmJsFullJitScheduled();
+        const bool forceNative = CONFIG_ISENABLED(Js::ForceNativeFlag);
         const uint minAsmJsInterpretRunCount = (uint)CONFIG_FLAG(MinAsmJsInterpreterRunCount);
         const uint maxAsmJsInterpretRunCount = (uint)CONFIG_FLAG(MaxAsmJsInterpreterRunCount);
-        return !noJit && (interpretedCount >= minAsmJsInterpretRunCount || interpretedCount >= maxAsmJsInterpretRunCount);
+        return !noJit && (forceNative || interpretedCount >= minAsmJsInterpretRunCount || interpretedCount >= maxAsmJsInterpretRunCount);
 #else
         return false;
 #endif
diff --git a/lib/Runtime/Language/i386/AsmJsInstructionTemplate.h b/lib/Runtime/Language/i386/AsmJsInstructionTemplate.h
index 9a2e117..ec62ea0 100644
--- a/lib/Runtime/Language/i386/AsmJsInstructionTemplate.h
+++ b/lib/Runtime/Language/i386/AsmJsInstructionTemplate.h
@@ -843,6 +843,12 @@
             return 1;
         }
 
+        OpFuncSignature( LEA )
+        {
+            *buffer++ = 0x8D;
+            return 1;
+        }
+
         OpFuncSignature( MOV )
         {
             int size = 1;
diff --git a/lib/Runtime/Language/i386/AsmJsInstructionTemplate.inl b/lib/Runtime/Language/i386/AsmJsInstructionTemplate.inl
index 189a089..72eab2f 100644
--- a/lib/Runtime/Language/i386/AsmJsInstructionTemplate.inl
+++ b/lib/Runtime/Language/i386/AsmJsInstructionTemplate.inl
@@ -161,6 +161,10 @@
     FormatEmpty()
 InstructionEnd ( LAHF )
 
+InstructionStart( LEA       , 4   , 0, NoFlag    )
+    FormatRegAddr(EncodeModRM_RegRM)
+InstructionEnd ( LEA )
+
 InstructionStart( MOV       , 1|2|4   , 11, AffectOp1 )
     Format2Reg(EncodeModRM_2Reg)
     FormatRegAddr(EncodeModRM_RegRM)
diff --git a/lib/Runtime/Language/i386/AsmJsJitTemplate.cpp b/lib/Runtime/Language/i386/AsmJsJitTemplate.cpp
index d9a046d..ae44328 100644
--- a/lib/Runtime/Language/i386/AsmJsJitTemplate.cpp
+++ b/lib/Runtime/Language/i386/AsmJsJitTemplate.cpp
@@ -515,23 +515,14 @@
     // Function memory allocation should be done the same way as
     // void InterpreterStackFrame::AlignMemoryForAsmJs()  (InterpreterStackFrame.cpp)
     // update any changes there
-    void AsmJsCommonEntryPoint(Js::ScriptFunction* func, void* savedEbpPtr)
+    void AsmJsCommonEntryPoint(Js::ScriptFunction* func, void* localSlot, void* args)
     {
-        int savedEbp = (int)savedEbpPtr;
         FunctionBody* body = func->GetFunctionBody();
         Js::FunctionEntryPointInfo * entryPointInfo = body->GetDefaultFunctionEntryPointInfo();
-        //CodeGenDone status is set by TJ
-        if ((entryPointInfo->IsNotScheduled() || entryPointInfo->IsCodeGenDone()) && !PHASE_OFF(BackEndPhase, body) && !PHASE_OFF(FullJitPhase, body))
+        const uint32 minTemplatizedJitRunCount = (uint32)CONFIG_FLAG(MinTemplatizedJitRunCount);
+        if ((entryPointInfo->IsNotScheduled() || entryPointInfo->IsCodeGenDone()) && (entryPointInfo->callsCount >= minTemplatizedJitRunCount || body->IsHotAsmJsLoop()))
         {
-            const uint32 minTemplatizedJitRunCount = (uint32)CONFIG_FLAG(MinTemplatizedJitRunCount);
-            if ((entryPointInfo->callsCount >= minTemplatizedJitRunCount || body->IsHotAsmJsLoop()))
-            {
-                if (PHASE_TRACE1(AsmjsEntryPointInfoPhase))
-                {
-                    Output::Print(_u("Scheduling %s For Full JIT at callcount:%d\n"), body->GetDisplayName(), entryPointInfo->callsCount);
-                }
-                GenerateFunction(body->GetScriptContext()->GetNativeCodeGenerator(), body, func);
-            }
+            WAsmJs::JitFunctionIfReady(func, 9999);
         }
         void* constTable = body->GetConstTable();
         constTable = (void*)(((Var*)constTable)+AsmJsFunctionMemory::RequiredVarConstants-1);
@@ -548,10 +539,7 @@
         const int floatOffset = asmInfo->GetFloatByteOffset() / sizeof(float);
         const int simdByteOffset = asmInfo->GetSimdByteOffset(); // in bytes
 
-        // (2*sizeof(Var)) -- push ebp and ret address
-        //sizeof(ScriptFunction*) -- this is the argument passed to the TJ function
-        int argoffset = (2*sizeof(Var)) + sizeof(ScriptFunction*);
-        argoffset = argoffset +  savedEbp ;
+        int argoffset = (int)args;
         // initialize argument location
         int* intArg;
         double* doubleArg;
@@ -588,16 +576,8 @@
             ++AsmJsCallDepth;
         }
 #endif
-        // two args i.e. (ScriptFunction and savedEbp) + 2* (void*) i.e.(ebp + return address)
-        int beginSlotOffset = sizeof(ScriptFunction*) + sizeof(void*) + 2 * sizeof(void*);
-        __asm
         {
-            mov  eax, ebp
-            add  eax, beginSlotOffset
-            mov m_localSlots,eax
-        };
-
-        {
+            m_localSlots = (Var*)localSlot;
             const ArgSlot argCount = asmInfo->GetArgCount();
             m_localSlots[AsmJsFunctionMemory::ModuleEnvRegister] = moduleEnv;
             m_localSlots[AsmJsFunctionMemory::ArrayBufferRegister] = (Var)arrayPtr;
@@ -620,12 +600,12 @@
                 constTable = (void*)(((double*)constTable) + doubleConstCount);
                 m_localSimdSlots = (AsmJsSIMDValue*)((char*)m_localSlots + simdByteOffset);
                 memcpy_s(m_localSimdSlots, simdConstCount*sizeof(AsmJsSIMDValue), constTable, simdConstCount*sizeof(AsmJsSIMDValue));
+                simdArg = m_localSimdSlots + simdConstCount;
             }
 
             intArg = m_localIntSlots + intConstCount;
             doubleArg = m_localDoubleSlots + doubleConstCount;
             floatArg = m_localFloatSlots + floatConstCount;
-            simdArg = m_localSimdSlots + simdConstCount;
 
             for(ArgSlot i = 0; i < argCount; i++ )
             {
@@ -1323,20 +1303,6 @@
             int ReloadArrayBuffer(TemplateContext context, BYTE*& buffer)
             {
                 int size = 0;
-                if (!context->GetFunctionBody()->GetAsmJsFunctionInfo()->IsHeapBufferConst())
-                {
-                    X86TemplateData* templateData = GetTemplateData(context);
-                    // mov buffer, [mod+bufferOffset]
-                    size += MOV::EncodeInstruction<int>(buffer, InstrParamsRegAddr(ArrayBufferReg, ModuleEnvReg, AsmJsModuleMemory::MemoryTableBeginOffset));
-                    // mov tmpReg, [buffer+lenOffset]
-                    RegNum reg = templateData->GetReg<int>(1 << RegEAX);
-                    templateData->InvalidateReg(reg);
-                    size += MOV::EncodeInstruction<int>(buffer, InstrParamsRegAddr(reg, ArrayBufferReg, ArrayBuffer::GetByteLengthOffset()));
-                    // mov [mod+offset], tmpReg
-                    size += EncodingHelpers::SetStackReg<int>(buffer, templateData, templateData->GetArraySizeOffset(), reg);
-                    // mov buffer, [buffer+buffOffset]
-                    size += MOV::EncodeInstruction<int>(buffer, InstrParamsRegAddr(ArrayBufferReg, ArrayBufferReg, ArrayBuffer::GetBufferOffset()));
-                }
                 return size;
             }
 
@@ -1575,10 +1541,17 @@
             int baseOffSet = stackSize + templateData->GetEBPOffsetCorrection();
             templateData->SetBaseOffset(baseOffSet);
 
-            // push EBP and push funcobj
+            // At this point EBP = [old ebp, return address, funcObj, args]
+
+            // AsmJsCommonEntryPoint(Js::ScriptFunction* func, void* localSlot, void* args);
             int funcOffSet = 2 * sizeof(Var);
+            int argsOffSet = 3 * sizeof(Var);
+
             //push args for CEP
-            size += PUSH::EncodeInstruction<int>(buffer, InstrParamsReg(RegEBP));
+            size += LEA::EncodeInstruction<int>(buffer, InstrParamsRegAddr(RegEAX, RegEBP, argsOffSet));
+            size += PUSH::EncodeInstruction<int>(buffer, InstrParamsReg(RegEAX));
+            size += LEA::EncodeInstruction<int>(buffer, InstrParamsRegAddr(RegEAX, RegEBP, templateData->GetModuleSlotOffset()));
+            size += PUSH::EncodeInstruction<int>(buffer, InstrParamsReg(RegEAX));
             size += PUSH::EncodeInstruction<int>(buffer, InstrParamsAddr(RegEBP, funcOffSet));
 
             // Call CEP
@@ -2291,80 +2264,6 @@
             return size;
         }
 
-        int Mul_UInt::ApplyTemplate( TemplateContext context, BYTE*& buffer, int targetOffset, int leftOffset, int rightOffset )
-        {
-            X86TemplateData* templateData = GetTemplateData( context );
-            int size = 0;
-            targetOffset -= templateData->GetBaseOffSet();
-            leftOffset -= templateData->GetBaseOffSet();
-            rightOffset -= templateData->GetBaseOffSet();
-
-            RegNum reg1, reg2;
-            const int reg1Found = templateData->FindRegWithStackOffset<int>( reg1, rightOffset, 1<<RegEDX );
-            const int reg2Found = templateData->FindRegWithStackOffset<int>( reg2, leftOffset, 1<<RegEDX );
-
-            size += XOR::EncodeInstruction<int>( buffer, InstrParams2Reg(RegEDX,RegEDX) );
-            switch( reg1Found & ( reg2Found << 1 ) )
-            {
-            case 0: // none found
-                reg1 = RegEAX;
-                size += MOV::EncodeInstruction<int>( buffer, InstrParamsRegAddr( reg1, RegEBP, leftOffset ) );
-                templateData->SetStackInfo( reg1, leftOffset );
-                size += MUL::EncodeInstruction<int>( buffer, InstrParamsAddr(RegEBP, rightOffset) );
-                break;
-            case 1: // found 2
-                if( reg2 == RegEAX )
-                {
-                    size += MUL::EncodeInstruction<int>( buffer, InstrParamsAddr(RegEBP, leftOffset) );
-                }
-                else
-                {
-                    size += MOV::EncodeInstruction<int>( buffer, InstrParamsRegAddr( RegEAX, RegEBP, leftOffset ) );
-                    size += MUL::EncodeInstruction<int>( buffer, InstrParamsReg(reg2) );
-                }
-                break;
-            case 2: // found 1
-                if( reg1 == RegEAX )
-                {
-                    size += MUL::EncodeInstruction<int>( buffer, InstrParamsAddr(RegEBP, rightOffset) );
-                }
-                else
-                {
-                    size += MOV::EncodeInstruction<int>( buffer, InstrParamsRegAddr( RegEAX, RegEBP, rightOffset ) );
-                    size += MUL::EncodeInstruction<int>( buffer, InstrParamsReg(reg1) );
-                }
-                break;
-            case 3: // found both
-                if( reg1 == RegEAX )
-                {
-                    size += MUL::EncodeInstruction<int>( buffer, InstrParamsReg(reg2) );
-                }
-                else if( reg2 == RegEAX )
-                {
-                    size += MUL::EncodeInstruction<int>( buffer, InstrParamsReg(reg1) );
-                }
-                else
-                {
-                    size += MOV::EncodeInstruction<int>( buffer, InstrParams2Reg( RegEAX, reg1 ) );
-                    size += MUL::EncodeInstruction<int>( buffer, InstrParamsReg(reg2) );
-                }
-                break;
-            default:
-                __assume( false );
-            }
-
-            size += TEST::EncodeInstruction<int>( buffer, InstrParams2Reg( RegEDX, RegEDX ) );
-            JumpRelocation reloc;
-            EncodingHelpers::EncodeShortJump<JE>( buffer, reloc, &size );
-            size += XOR::EncodeInstruction<int>( buffer, InstrParams2Reg( RegEAX, RegEAX ) );
-            reloc.ApplyReloc<int8>();
-            templateData->InvalidateReg( RegEDX );
-
-            size += EncodingHelpers::SetStackReg<int>( buffer, templateData, targetOffset , RegEAX);
-
-            return size;
-        }
-
         int Div_UInt::ApplyTemplate( TemplateContext context, BYTE*& buffer, int targetOffset, int leftOffset, int rightOffset )
         {
             X86TemplateData* templateData = GetTemplateData( context );
@@ -2694,7 +2593,7 @@
             size += MOVSD::EncodeInstruction<double>( buffer, InstrParamsAddrReg( RegESP, 8, RegXMM0 ) );
             size += MOVSD::EncodeInstruction<double>( buffer, InstrParamsRegAddr( RegXMM0, RegEBP, leftOffset ) );
             size += MOVSD::EncodeInstruction<double>( buffer, InstrParamsAddrReg( RegESP, 0, RegXMM0 ) );
-            void* ptr = (double (*)(double,double)) AsmJsMath::Rem < double > ;
+            void* ptr = (double (*)(double,double)) AsmJsMath::RemChecked<double>;
             size += MOV::EncodeInstruction<int>( buffer, InstrParamsRegImm<int32>(RegEAX,(int)ptr) );
             size += CALL::EncodeInstruction<int>( buffer, InstrParamsReg(RegEAX) );
 
diff --git a/lib/Runtime/Library/ArrayBuffer.cpp b/lib/Runtime/Library/ArrayBuffer.cpp
index 5f2f8d6..8841af6 100644
--- a/lib/Runtime/Library/ArrayBuffer.cpp
+++ b/lib/Runtime/Library/ArrayBuffer.cpp
@@ -895,7 +895,9 @@
         return newArrayBuffer;
     }
 
-    void JavascriptArrayBuffer::ReportDifferentialAllocation(uint32 newBufferLength)
+
+    template<typename Func>
+    void Js::JavascriptArrayBuffer::ReportDifferentialAllocation(uint32 newBufferLength, Func reportFailureFn)
     {
         Recycler* recycler = this->GetRecycler();
 
@@ -912,7 +914,7 @@
                     recycler->CollectNow<CollectOnTypedArrayAllocation>();
                     if (!recycler->ReportExternalMemoryAllocation(newBufferLength - this->bufferLength))
                     {
-                        JavascriptError::ThrowOutOfMemoryError(GetScriptContext());
+                        reportFailureFn();
                     }
                 }
             }
@@ -924,6 +926,15 @@
         }
     }
 
+
+    void JavascriptArrayBuffer::ReportDifferentialAllocation(uint32 newBufferLength)
+    {
+        ScriptContext* scriptContext = GetScriptContext();
+        ReportDifferentialAllocation(newBufferLength, [scriptContext] {
+            JavascriptError::ThrowOutOfMemoryError(scriptContext);
+        });
+    }
+
 #if ENABLE_TTD
     TTD::NSSnapObjects::SnapObjectType JavascriptArrayBuffer::GetSnapTag_TTD() const
     {
@@ -950,32 +961,41 @@
 #endif
 
 
-
-    WebAssemblyArrayBuffer::WebAssemblyArrayBuffer(uint32 length, DynamicType * type) :
-#ifndef ENABLE_FAST_ARRAYBUFFER
-        // Treat as a normal JavascriptArrayBuffer
-        JavascriptArrayBuffer(length, type) {}
-#else
-        JavascriptArrayBuffer(length, type, WasmVirtualAllocator)
+    template<typename Allocator>
+    Js::WebAssemblyArrayBuffer::WebAssemblyArrayBuffer(uint32 length, DynamicType * type, Allocator allocator):
+        JavascriptArrayBuffer(length, type, allocator)
     {
+#ifndef ENABLE_FAST_ARRAYBUFFER
+        CompileAssert(UNREACHED);
+#endif
+        Assert(allocator == WasmVirtualAllocator);
         // Make sure we always have a buffer even if the length is 0
-        if (buffer == nullptr)
+        if (buffer == nullptr && length == 0)
         {
             // We want to allocate an empty buffer using virtual memory
-            Assert(length == 0);
-            buffer = (BYTE*)WasmVirtualAllocator(0);
-            if (buffer == nullptr)
-            {
-                JavascriptError::ThrowOutOfMemoryError(GetScriptContext());
-            }
+            buffer = (BYTE*)allocator(0);
+        }
+        if (buffer == nullptr)
+        {
+            JavascriptError::ThrowOutOfMemoryError(GetScriptContext());
         }
     }
-#endif
+
+    // Treat as a normal JavascriptArrayBuffer
+    WebAssemblyArrayBuffer::WebAssemblyArrayBuffer(uint32 length, DynamicType * type) :
+        JavascriptArrayBuffer(length, type, malloc)
+    {
+    }
 
     WebAssemblyArrayBuffer::WebAssemblyArrayBuffer(byte* buffer, uint32 length, DynamicType * type):
         JavascriptArrayBuffer(buffer, length, type)
     {
-
+#if ENABLE_FAST_ARRAYBUFFER
+        if (CONFIG_FLAG(WasmFastArray) && buffer == nullptr)
+        {
+            JavascriptError::ThrowOutOfMemoryError(GetScriptContext());
+        }
+#endif
     }
 
     WebAssemblyArrayBuffer* WebAssemblyArrayBuffer::Create(byte* buffer, uint32 length, DynamicType * type)
@@ -988,7 +1008,16 @@
         }
         else
         {
-            result = RecyclerNewFinalized(recycler, WebAssemblyArrayBuffer, length, type);
+#if ENABLE_FAST_ARRAYBUFFER
+            if (CONFIG_FLAG(WasmFastArray))
+            {
+                result = RecyclerNewFinalized(recycler, WebAssemblyArrayBuffer, length, type, WasmVirtualAllocator);
+            }
+            else
+#endif
+            {
+                result = RecyclerNewFinalized(recycler, WebAssemblyArrayBuffer, length, type);
+            }
         }
         Assert(result);
         recycler->AddExternalMemoryUsage(length);
@@ -998,38 +1027,89 @@
     bool WebAssemblyArrayBuffer::IsValidVirtualBufferLength(uint length) const
     {
 #if ENABLE_FAST_ARRAYBUFFER
-        return true;
+        return CONFIG_FLAG(WasmFastArray);
 #else
         return false;
 #endif
     }
 
-    ArrayBuffer * WebAssemblyArrayBuffer::TransferInternal(uint32 newBufferLength)
+    WebAssemblyArrayBuffer* WebAssemblyArrayBuffer::GrowMemory(uint32 newBufferLength)
     {
-#if ENABLE_FAST_ARRAYBUFFER
-        ReportDifferentialAllocation(newBufferLength);
-        Assert(this->buffer);
-
-        AssertMsg(newBufferLength > this->bufferLength, "The only supported scenario in WebAssembly is to grow the memory");
-        if (newBufferLength > this->bufferLength)
+        if (newBufferLength < this->bufferLength)
         {
-            LPVOID newMem = VirtualAlloc(this->buffer + this->bufferLength, newBufferLength - this->bufferLength, MEM_COMMIT, PAGE_READWRITE);
-            if (!newMem)
+            Assert(UNREACHED);
+            JavascriptError::ThrowTypeError(GetScriptContext(), WASMERR_BufferGrowOnly);
+        }
+        uint32 growSize = newBufferLength - this->bufferLength;
+
+        bool failedReport = false;
+        const auto reportFailedFn = [&failedReport] { failedReport = true; };
+
+        WebAssemblyArrayBuffer* newArrayBuffer = nullptr;
+#if ENABLE_FAST_ARRAYBUFFER
+        if (CONFIG_FLAG(WasmFastArray))
+        {
+            AssertOrFailFast(this->buffer);
+            ReportDifferentialAllocation(newBufferLength, reportFailedFn);
+            if (failedReport)
             {
-                Recycler* recycler = this->GetRecycler();
-                recycler->ReportExternalMemoryFailure(newBufferLength);
-                JavascriptError::ThrowOutOfMemoryError(GetScriptContext());
+                return nullptr;
+            }
+
+            if (growSize > 0)
+            {
+                LPVOID newMem = VirtualAlloc(this->buffer + this->bufferLength, growSize, MEM_COMMIT, PAGE_READWRITE);
+                if (!newMem)
+                {
+                    Recycler* recycler = this->GetRecycler();
+                    recycler->ReportExternalMemoryFailure(newBufferLength);
+                    return nullptr;
+                }
+            }
+            newArrayBuffer = GetLibrary()->CreateWebAssemblyArrayBuffer(this->buffer, newBufferLength);
+        }
+        else
+#endif
+        if (this->GetByteLength() == 0)
+        {
+            if (growSize > 0)
+            {
+                newArrayBuffer = GetLibrary()->CreateWebAssemblyArrayBuffer(newBufferLength);
+            }
+            else
+            {
+                newArrayBuffer = GetLibrary()->CreateWebAssemblyArrayBuffer(this->buffer, 0);
             }
         }
-        ArrayBuffer* newArrayBuffer = GetLibrary()->CreateWebAssemblyArrayBuffer(this->buffer, newBufferLength);
+        else
+        {
+            ReportDifferentialAllocation(newBufferLength, reportFailedFn);
+            if (failedReport)
+            {
+                return nullptr;
+            }
+            byte* newBuffer = ReallocZero(this->buffer, this->bufferLength, newBufferLength);
+            if (!newBuffer)
+            {
+                this->GetRecycler()->ReportExternalMemoryFailure(newBufferLength - this->bufferLength);
+                return nullptr;
+            }
+            newArrayBuffer = GetLibrary()->CreateWebAssemblyArrayBuffer(newBuffer, newBufferLength);
+        }
+
+        if (!newArrayBuffer || newArrayBuffer->GetByteLength() != newBufferLength)
+        {
+            return nullptr;
+        }
 
         AutoDiscardPTR<Js::ArrayBufferDetachedStateBase> state(DetachAndGetState());
         state->MarkAsClaimed();
-
         return newArrayBuffer;
-#else
-        return JavascriptArrayBuffer::TransferInternal(newBufferLength);
-#endif
+    }
+
+    ArrayBuffer * WebAssemblyArrayBuffer::TransferInternal(uint32 newBufferLength)
+    {
+        JavascriptError::ThrowTypeError(GetScriptContext(), WASMERR_CantDetach);
     }
 
     ProjectionArrayBuffer::ProjectionArrayBuffer(uint32 length, DynamicType * type) :
diff --git a/lib/Runtime/Library/ArrayBuffer.h b/lib/Runtime/Library/ArrayBuffer.h
index f01e9a7..8e7ae82 100644
--- a/lib/Runtime/Library/ArrayBuffer.h
+++ b/lib/Runtime/Library/ArrayBuffer.h
@@ -72,6 +72,7 @@
 
         virtual bool IsArrayBuffer() = 0;
         virtual bool IsSharedArrayBuffer() = 0;
+        virtual bool IsWebAssemblyArrayBuffer() { return false; }
         virtual ArrayBuffer * GetAsArrayBuffer() = 0;
         virtual SharedArrayBuffer * GetAsSharedArrayBuffer() { return nullptr; }
         virtual void AddParent(ArrayBufferParent* parent) { }
@@ -259,6 +260,8 @@
 
         virtual ArrayBuffer * TransferInternal(DECLSPEC_GUARD_OVERFLOW uint32 newBufferLength) override;
 
+        template<typename Func>
+        void ReportDifferentialAllocation(uint32 newBufferLength, Func reportFailureFn);
         void ReportDifferentialAllocation(uint32 newBufferLength);
 
     protected:
@@ -279,6 +282,8 @@
 
     class WebAssemblyArrayBuffer : public JavascriptArrayBuffer
     {
+        template<typename Allocator>
+        WebAssemblyArrayBuffer(uint32 length, DynamicType * type, Allocator allocator);
         WebAssemblyArrayBuffer(uint32 length, DynamicType * type);
         WebAssemblyArrayBuffer(byte* buffer, uint32 length, DynamicType * type);
     protected:
@@ -286,8 +291,11 @@
         DEFINE_MARSHAL_OBJECT_TO_SCRIPT_CONTEXT(WebAssemblyArrayBuffer);
     public:
         static WebAssemblyArrayBuffer* Create(byte* buffer, DECLSPEC_GUARD_OVERFLOW uint32 length, DynamicType * type);
+        WebAssemblyArrayBuffer* GrowMemory(DECLSPEC_GUARD_OVERFLOW uint32 newBufferLength);
+
         virtual bool IsValidVirtualBufferLength(uint length) const override;
         virtual ArrayBuffer * TransferInternal(DECLSPEC_GUARD_OVERFLOW uint32 newBufferLength) override;
+        virtual bool IsWebAssemblyArrayBuffer() override { return true; }
     };
 
     // the memory must be allocated via CoTaskMemAlloc.
diff --git a/lib/Runtime/Library/AtomicsObject.cpp b/lib/Runtime/Library/AtomicsObject.cpp
index 89f7f60..c346c7f 100644
--- a/lib/Runtime/Library/AtomicsObject.cpp
+++ b/lib/Runtime/Library/AtomicsObject.cpp
@@ -53,23 +53,27 @@
 
     uint32 AtomicsObject::ValidateAtomicAccess(Var typedArray, Var requestIndex, ScriptContext *scriptContext)
     {
+        Assert(TypedArrayBase::Is(typedArray));
+
         int32 accessIndex = -1;
         if (TaggedInt::Is(requestIndex))
         {
             accessIndex = TaggedInt::ToInt32(requestIndex);
         }
+        else if(Js::JavascriptOperators::IsUndefined(requestIndex))
+        {
+            accessIndex = 0;
+        }
         else
         {
             accessIndex = JavascriptConversion::ToInt32_Full(requestIndex, scriptContext);
-            double dblValue = JavascriptConversion::ToNumber(requestIndex, scriptContext);
+            double dblValue = JavascriptConversion::ToInteger(requestIndex, scriptContext);
             if (dblValue != accessIndex)
             {
                 JavascriptError::ThrowRangeError(scriptContext, JSERR_InvalidTypedArrayIndex);
             }
         }
 
-        Assert(TypedArrayBase::Is(typedArray));
-        
         if (accessIndex < 0 || accessIndex >= (int32)TypedArrayBase::FromVar(typedArray)->GetLength())
         {
             JavascriptError::ThrowRangeError(scriptContext, JSERR_InvalidTypedArrayIndex);
@@ -217,7 +221,10 @@
             DWORD_PTR agent = (DWORD_PTR)scriptContext;
             Assert(sharedArrayBuffer->GetSharedContents()->IsValidAgent(agent));
             awoken = waiterList->AddAndSuspendWaiter(agent, timeout);
-            waiterList->RemoveWaiter(agent);
+            if (!awoken) 
+            {
+                waiterList->RemoveWaiter(agent);
+            }
         }
 
         return awoken ? scriptContext->GetLibrary()->CreateStringFromCppLiteral(_u("ok"))
diff --git a/lib/Runtime/Library/CustomExternalIterator.cpp b/lib/Runtime/Library/CustomExternalIterator.cpp
index f5f8e95..941f5b3 100644
--- a/lib/Runtime/Library/CustomExternalIterator.cpp
+++ b/lib/Runtime/Library/CustomExternalIterator.cpp
@@ -53,7 +53,7 @@
         ScriptContext *scriptContext = function->GetScriptContext();
 
         AssertOrFailFast(RecyclableObject::Is(function->m_prototypeForIterator));
-        DynamicObject *prototype = static_cast<DynamicObject*>(function->m_prototypeForIterator);
+        DynamicObject *prototype = static_cast<DynamicObject*>(PointerValue(function->m_prototypeForIterator));
         Js::DynamicType *type = scriptContext->GetLibrary()->CreateObjectTypeNoCache(prototype, TypeIds_ExternalIterator);
 
         AssertOrFailFast(function->m_extraByteCount >= sizeof(void*));
diff --git a/lib/Runtime/Library/GlobalObject.cpp b/lib/Runtime/Library/GlobalObject.cpp
index 3fb9591..1634019 100644
--- a/lib/Runtime/Library/GlobalObject.cpp
+++ b/lib/Runtime/Library/GlobalObject.cpp
@@ -1598,6 +1598,23 @@
         return scriptContext->GetLibrary()->GetUndefined();
     }
 
+#ifdef ENABLE_DEBUG_CONFIG_OPTIONS
+    Var GlobalObject::EntryChWriteTraceEvent(RecyclableObject *function, CallInfo callInfo, ...)
+    {
+        PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
+        ARGUMENTS(args, callInfo);
+
+        if (args.Info.Count < 2)
+        {
+            return function->GetScriptContext()->GetLibrary()->GetUndefined();
+        }
+
+        Js::JavascriptString* jsString = Js::JavascriptConversion::ToString(args[1], function->GetScriptContext());
+        PlatformAgnostic::EventTrace::FireGenericEventTrace(jsString->GetSz());
+        return function->GetScriptContext()->GetLibrary()->GetUndefined();
+    }
+#endif
+
 #if ENABLE_TTD
     //Log a string in the telemetry system (and print to the console)
     Var GlobalObject::EntryTelemetryLog(RecyclableObject* function, CallInfo callInfo, ...)
diff --git a/lib/Runtime/Library/GlobalObject.h b/lib/Runtime/Library/GlobalObject.h
index f8bbde1..2ab054e 100644
--- a/lib/Runtime/Library/GlobalObject.h
+++ b/lib/Runtime/Library/GlobalObject.h
@@ -58,6 +58,10 @@
             static FunctionInfo EmitTTDLog;
 #endif
 
+#ifdef ENABLE_DEBUG_CONFIG_OPTIONS
+            static FunctionInfo ChWriteTraceEvent;
+#endif
+
 #ifdef IR_VIEWER
             static FunctionInfo ParseIR;
             static FunctionInfo FunctionList;
@@ -87,6 +91,10 @@
         static Var EntryEmitTTDLog(RecyclableObject* function, CallInfo callInfo, ...);
 #endif
 
+#ifdef ENABLE_DEBUG_CONFIG_OPTIONS
+        static Var EntryChWriteTraceEvent(RecyclableObject* function, CallInfo callInfo, ...);
+#endif
+
 #ifdef IR_VIEWER
         static Var EntryParseIR(RecyclableObject *function, CallInfo callInfo, ...);
 #define _refactor_ /* FIXME (t-doilij) */
diff --git a/lib/Runtime/Library/IntlEngineInterfaceExtensionObject.cpp b/lib/Runtime/Library/IntlEngineInterfaceExtensionObject.cpp
index 9b914b9..6092ff1 100644
--- a/lib/Runtime/Library/IntlEngineInterfaceExtensionObject.cpp
+++ b/lib/Runtime/Library/IntlEngineInterfaceExtensionObject.cpp
@@ -172,7 +172,10 @@
 
         void Dispose(bool isShutdown) override
         {
-            instance->Release();
+            if (!isShutdown)
+            {
+                instance->Release();
+            }
         }
         void Mark(Recycler * recycler) override
         {
diff --git a/lib/Runtime/Library/JavascriptArray.cpp b/lib/Runtime/Library/JavascriptArray.cpp
index 83c6185..f3b84cc 100644
--- a/lib/Runtime/Library/JavascriptArray.cpp
+++ b/lib/Runtime/Library/JavascriptArray.cpp
@@ -2078,6 +2078,7 @@
                         limit = JavascriptArray::MaxArrayLength;
                     }
                     seg->size = min(newSize, limit - seg->left);
+                    seg->CheckLengthvsSize();
                 }
             }
             uint32 i;
@@ -3762,7 +3763,7 @@
             if (length.IsSmallIndex() || length.IsUint32Max())
             {
                 uint32 len = length.IsUint32Max() ? MaxArrayLength : length.GetSmallIndex();
-                int32 index = pArr->HeadSegmentIndexOfHelper(search, fromIndex, len, includesAlgorithm, scriptContext);
+                JS_REENTRANT(jsReentLock, int32 index = pArr->HeadSegmentIndexOfHelper(search, fromIndex, len, includesAlgorithm, scriptContext));
 
                 // If we found the search value in the head segment, or if we determined there is no need to search other segments,
                 // we stop right here.
@@ -5235,19 +5236,33 @@
 
         if (hasInlineSegment)
         {
-            SparseArraySegmentBase* headSegBase = array->head;
-            SparseArraySegment<T>* headSeg = (SparseArraySegment<T>*)headSegBase;
-
-            AnalysisAssert(headSeg);
-            SparseArraySegment<T>* newHeadSeg = SparseArraySegment<T>::template AllocateSegmentImpl<false>(recycler,
-                headSeg->left, headSeg->length, headSeg->size, headSeg->next);
-
-            newHeadSeg = SparseArraySegment<T>::CopySegment(recycler, newHeadSeg, headSeg->left, headSeg, headSeg->left, headSeg->length);
-            newHeadSeg->next = headSeg->next;
+            AnalysisAssert(array->head);
+            SparseArraySegment<T>* newHeadSeg = array->ReallocNonLeafSegment((SparseArraySegment<T>*)PointerValue(array->head), array->head->next);
             array->head = newHeadSeg;
         }
     }
 
+    template <typename T>
+    void JavascriptArray::ReallocateNonLeafLastSegmentIfLeaf(JavascriptArray * arr, Recycler * recycler)
+    {
+        Assert(arr->head && arr->head->next); // Doesn't make sense to reallocate a leaf last segment as a non-leaf if its not going to point to any other segments.
+
+        // TODO: Consider utilizing lastUsedSegment once we fix CopyHeadIfInlinedHeadSegment in that respect.
+        SparseArraySegmentBase *lastSeg = nullptr;
+        SparseArraySegmentBase *seg = arr->head;
+        while (seg)
+        {
+            lastSeg = seg;
+            seg = seg->next;
+        }
+
+        if (SparseArraySegmentBase::IsLeafSegment(lastSeg, recycler))
+        {
+            AnalysisAssert(lastSeg);
+            arr->ReallocNonLeafSegment((SparseArraySegment<T>*)lastSeg, lastSeg->next, true /*forceNonLeaf*/);
+        }
+    }
+
     Var JavascriptArray::EntryReverse(RecyclableObject* function, CallInfo callInfo, ...)
     {
         PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
@@ -5351,6 +5366,8 @@
             bool isIntArray = false;
             bool isFloatArray = false;
 
+            pArr->ClearSegmentMap(); // Just dump the segment map on reverse
+
             if (JavascriptNativeIntArray::Is(pArr))
             {
                 isIntArray = true;
@@ -5368,10 +5385,12 @@
                 if (isIntArray)
                 {
                     CopyHeadIfInlinedHeadSegment<int32>(pArr, recycler);
+                    ReallocateNonLeafLastSegmentIfLeaf<int32>(pArr, recycler);
                 }
                 else if (isFloatArray)
                 {
                     CopyHeadIfInlinedHeadSegment<double>(pArr, recycler);
+                    ReallocateNonLeafLastSegmentIfLeaf<double>(pArr, recycler);
                 }
                 else
                 {
@@ -5419,24 +5438,14 @@
             }
 
             pArr->head = prevSeg;
-
-            // Just dump the segment map on reverse
-            pArr->ClearSegmentMap();
+            pArr->InvalidateLastUsedSegment(); // lastUsedSegment might be 0-length and discarded above
 
             if (isIntArray)
             {
-                if (pArr->head && pArr->head->next && SparseArraySegmentBase::IsLeafSegment(pArr->head, recycler))
-                {
-                    pArr->ReallocNonLeafSegment(SparseArraySegment<int32>::From(pArr->head), pArr->head->next);
-                }
                 pArr->EnsureHeadStartsFromZero<int32>(recycler);
             }
             else if (isFloatArray)
             {
-                if (pArr->head && pArr->head->next && SparseArraySegmentBase::IsLeafSegment(pArr->head, recycler))
-                {
-                    pArr->ReallocNonLeafSegment(SparseArraySegment<double>::From(pArr->head), pArr->head->next);
-                }
                 pArr->EnsureHeadStartsFromZero<double>(recycler);
             }
             else
@@ -5444,8 +5453,6 @@
                 pArr->EnsureHeadStartsFromZero<Var>(recycler);
             }
 
-            pArr->InvalidateLastUsedSegment(); // lastUsedSegment might be 0-length and discarded above
-
 #ifdef VALIDATE_ARRAY
             pArr->ValidateArray();
 #endif
@@ -7653,6 +7660,8 @@
 
                 Assert(pArr->length <= MaxArrayLength - unshiftElements);
 
+                SparseArraySegmentBase* renumberSeg = pArr->head->next;
+
                 bool isIntArray = false;
                 bool isFloatArray = false;
 
@@ -7683,21 +7692,6 @@
                     }
                 }
 
-                if (isIntArray)
-                {
-                    UnshiftHelper<int32>(pArr, unshiftElements, args.Values);
-                }
-                else if (isFloatArray)
-                {
-                    UnshiftHelper<double>(pArr, unshiftElements, args.Values);
-                }
-                else
-                {
-                    UnshiftHelper<Var>(pArr, unshiftElements, args.Values);
-                }
-
-                SparseArraySegmentBase* renumberSeg = pArr->head->next;
-
                 while (renumberSeg)
                 {
                     renumberSeg->left += unshiftElements;
@@ -7709,6 +7703,26 @@
                     renumberSeg = renumberSeg->next;
                 }
 
+                try
+                {
+                    if (isIntArray)
+                    {
+                        UnshiftHelper<int32>(pArr, unshiftElements, args.Values);
+                    }
+                    else if (isFloatArray)
+                    {
+                        UnshiftHelper<double>(pArr, unshiftElements, args.Values);
+                    }
+                    else
+                    {
+                        UnshiftHelper<Var>(pArr, unshiftElements, args.Values);
+                    }
+                }
+                catch (...)
+                {
+                    Js::Throw::FatalInternalError();
+                }
+
                 pArr->InvalidateLastUsedSegment();
                 pArr->length += unshiftElements;
 
diff --git a/lib/Runtime/Library/JavascriptArray.h b/lib/Runtime/Library/JavascriptArray.h
index 23b5618..a5ebcf1 100644
--- a/lib/Runtime/Library/JavascriptArray.h
+++ b/lib/Runtime/Library/JavascriptArray.h
@@ -417,7 +417,7 @@
         JavascriptArray(JavascriptArray * instance, bool boxHead);
 
         template<typename T> inline void LinkSegments(SparseArraySegment<T>* prev, SparseArraySegment<T>* current);
-        template<typename T> inline SparseArraySegment<T>* ReallocNonLeafSegment(SparseArraySegment<T>* seg, SparseArraySegmentBase* nextSeg);
+        template<typename T> inline SparseArraySegment<T>* ReallocNonLeafSegment(SparseArraySegment<T>* seg, SparseArraySegmentBase* nextSeg, bool forceNonLeaf = false);
         void TryAddToSegmentMap(Recycler* recycler, SparseArraySegmentBase* seg);
 
     private:
@@ -575,6 +575,8 @@
 
         template<typename T>
         static void CopyHeadIfInlinedHeadSegment(JavascriptArray *array, Recycler *recycler);
+        template<typename T>
+        static void ReallocateNonLeafLastSegmentIfLeaf(JavascriptArray * arr, Recycler * recycler);
 
         template<typename T>
         static void ArraySpliceHelper(JavascriptArray* pNewArr, JavascriptArray* pArr, uint32 start, uint32 deleteLen,
diff --git a/lib/Runtime/Library/JavascriptArray.inl b/lib/Runtime/Library/JavascriptArray.inl
index c96dd52..e808805 100644
--- a/lib/Runtime/Library/JavascriptArray.inl
+++ b/lib/Runtime/Library/JavascriptArray.inl
@@ -95,7 +95,7 @@
     }
 
     template<typename T>
-    inline SparseArraySegment<T>* JavascriptArray::ReallocNonLeafSegment(SparseArraySegment<T> *seg, SparseArraySegmentBase* nextSeg)
+    inline SparseArraySegment<T>* JavascriptArray::ReallocNonLeafSegment(SparseArraySegment<T> *seg, SparseArraySegmentBase* nextSeg, bool forceNonLeaf)
     {
         // Find the segment prior to seg.
         SparseArraySegmentBase *prior = nullptr;
@@ -106,8 +106,16 @@
                 Assert(prior->next);
             }
         }
+        SparseArraySegment<T> *newSeg = nullptr;
         Recycler *recycler = this->GetScriptContext()->GetRecycler();
-        SparseArraySegment<T> *newSeg = SparseArraySegment<T>::AllocateSegment(recycler, seg->left, seg->length, nextSeg);
+        if (forceNonLeaf)
+        {
+            newSeg = SparseArraySegment<T>::template AllocateSegmentImpl<false /*isLeaf*/>(recycler, seg->left, seg->length, nextSeg);
+        }
+        else
+        {
+            newSeg = SparseArraySegment<T>::AllocateSegment(recycler, seg->left, seg->length, nextSeg);
+        }
         CopyArray(newSeg->elements, seg->length, seg->elements, seg->length);
 
         LinkSegmentsCommon(prior, newSeg);
diff --git a/lib/Runtime/Library/JavascriptBuiltInFunctionList.h b/lib/Runtime/Library/JavascriptBuiltInFunctionList.h
index 4cb2091..07bfcc2 100644
--- a/lib/Runtime/Library/JavascriptBuiltInFunctionList.h
+++ b/lib/Runtime/Library/JavascriptBuiltInFunctionList.h
@@ -30,6 +30,10 @@
 BUILTIN(GlobalObject, EmitTTDLog, EntryEmitTTDLog, FunctionInfo::ErrorOnNew)
 #endif
 
+#ifdef ENABLE_DEBUG_CONFIG_OPTIONS
+BUILTIN(GlobalObject, ChWriteTraceEvent, EntryChWriteTraceEvent, FunctionInfo::ErrorOnNew)
+#endif
+
 #ifdef IR_VIEWER
     BUILTIN(GlobalObject, ParseIR, EntryParseIR, FunctionInfo::ErrorOnNew)
     BUILTIN(GlobalObject, FunctionList, EntryFunctionList, FunctionInfo::ErrorOnNew)
@@ -317,6 +321,7 @@
 BUILTIN(WebAssemblyModule, Imports, EntryImports, FunctionInfo::ErrorOnNew)
 BUILTIN(WebAssemblyModule, CustomSections, EntryCustomSections, FunctionInfo::ErrorOnNew)
 BUILTIN(WebAssemblyInstance, NewInstance, NewInstance, FunctionInfo::SkipDefaultNewObject)
+BUILTIN(WebAssemblyInstance, GetterExports, GetterExports, FunctionInfo::ErrorOnNew | FunctionInfo::HasNoSideEffect)
 BUILTIN(WebAssemblyMemory, NewInstance, NewInstance, FunctionInfo::SkipDefaultNewObject)
 BUILTIN(WebAssemblyMemory, Grow, EntryGrow, FunctionInfo::ErrorOnNew)
 BUILTIN(WebAssemblyMemory, GetterBuffer, EntryGetterBuffer, FunctionInfo::ErrorOnNew | FunctionInfo::HasNoSideEffect)
diff --git a/lib/Runtime/Library/JavascriptFunction.cpp b/lib/Runtime/Library/JavascriptFunction.cpp
index 4405470..8ce160d 100644
--- a/lib/Runtime/Library/JavascriptFunction.cpp
+++ b/lib/Runtime/Library/JavascriptFunction.cpp
@@ -659,7 +659,8 @@
         }
         return func->CallRootFunction(args, scriptContext, true);
     }
-    Var JavascriptFunction::CallRootFunction(Arguments args, ScriptContext * scriptContext, bool inScript)
+
+    Var JavascriptFunction::CallRootFunction(RecyclableObject* obj, Arguments args, ScriptContext * scriptContext, bool inScript)
     {
         Var ret = nullptr;
 
@@ -669,7 +670,7 @@
             Js::FaultInjection::pfnHandleAV = JavascriptFunction::CallRootEventFilter;
             __try
             {
-                ret = CallRootFunctionInternal(args, scriptContext, inScript);
+                ret = JavascriptFunction::CallRootFunctionInternal(obj, args, scriptContext, inScript);
             }
             __finally
             {
@@ -685,7 +686,7 @@
         // xplat: JavascriptArrayBuffer::AllocWrapper is disabled on cross-platform
         // (IsValidVirtualBufferLength always returns false).
         // SEH and ResumeForOutOfBoundsArrayRefs are not needed.
-        ret = CallRootFunctionInternal(args, scriptContext, inScript);
+        ret = JavascriptFunction::CallRootFunctionInternal(obj, args, scriptContext, inScript);
 #else
         if (scriptContext->GetThreadContext()->GetAbnormalExceptionCode() != 0)
         {
@@ -695,12 +696,12 @@
 
         // mark volatile, because otherwise VC will incorrectly optimize away load in the finally block
         volatile uint32 exceptionCode = 0;
-        EXCEPTION_POINTERS exceptionInfo = {0};
+        EXCEPTION_POINTERS exceptionInfo = { 0 };
         __try
         {
             __try
             {
-                ret = CallRootFunctionInternal(args, scriptContext, inScript);
+                ret = JavascriptFunction::CallRootFunctionInternal(obj, args, scriptContext, inScript);
             }
             __except (
                 exceptionInfo = *GetExceptionInformation(),
@@ -724,7 +725,8 @@
         Assert(ret);
         return ret;
     }
-    Var JavascriptFunction::CallRootFunctionInternal(Arguments args, ScriptContext * scriptContext, bool inScript)
+
+    Var JavascriptFunction::CallRootFunctionInternal(RecyclableObject* obj, Arguments args, ScriptContext * scriptContext, bool inScript)
     {
 #if DBG
         if (IsInAssert != 0)
@@ -737,7 +739,7 @@
         if (inScript)
         {
             Assert(!(args.Info.Flags & CallFlags_New));
-            return JavascriptFunction::CallFunction<true>(this, GetEntryPoint(), args);
+            return JavascriptFunction::CallFunction<true>(obj, obj->GetEntryPoint(), args);
         }
 
 #ifdef ENABLE_DEBUG_CONFIG_OPTIONS
@@ -757,7 +759,7 @@
 
         JavascriptExceptionObject* pExceptionObject = NULL;
         bool hasCaller = scriptContext->GetHostScriptContext() ? !!scriptContext->GetHostScriptContext()->HasCaller() : false;
-        Assert(scriptContext == GetScriptContext());
+        Assert(scriptContext == obj->GetScriptContext());
         BEGIN_JS_RUNTIME_CALLROOT_EX(scriptContext, hasCaller)
         {
             scriptContext->VerifyAlive(true);
@@ -765,8 +767,8 @@
             {
                 varResult =
                     args.Info.Flags & CallFlags_New ?
-                    CallAsConstructor(this, /* overridingNewTarget = */nullptr, args, scriptContext) :
-                    CallFunction<true>(this, this->GetEntryPoint(), args);
+                    CallAsConstructor(obj, /* overridingNewTarget = */nullptr, args, scriptContext) :
+                    CallFunction<true>(obj, obj->GetEntryPoint(), args);
 
                 // A recent compiler bug 150148 can incorrectly eliminate catch block, temporary workaround
                 if (threadContext == NULL)
@@ -790,6 +792,11 @@
         return varResult;
     }
 
+    Var JavascriptFunction::CallRootFunction(Arguments args, ScriptContext * scriptContext, bool inScript)
+    {
+        return JavascriptFunction::CallRootFunction(this, args, scriptContext, inScript);
+    }
+
 #if DBG
     /*static*/
     void JavascriptFunction::CheckValidDebugThunk(ScriptContext* scriptContext, RecyclableObject *function)
@@ -1861,13 +1868,6 @@
         // Read first  byte - check for prefix
         BYTE* beginPc = pc;
 
-#if _CONTROL_FLOW_GUARD_SHADOW_STACK
-        // skip first byte if it's 0x64 (fs-based mem access)
-        if (*pc == 0x64)
-        {
-            pc++;
-        }
-#endif
 
         if (((*pc) == 0x0F2) || ((*pc) == 0x0F3))
         {
@@ -1918,6 +1918,8 @@
             instrData.isLoad = false;
             break;
         }
+        //MOVSXD
+        case 0x63:
         //MOV - Load
         case 0x8A:
         case 0x8B:
@@ -1930,7 +1932,7 @@
         {
             // more than one byte opcode and hence we will read pc multiple times
             pc++;
-            //MOVSX  , MOVSXD
+            //MOVSX
             if (*pc == 0xBE || *pc == 0xBF)
             {
                 instrData.isLoad = true;
@@ -2289,7 +2291,7 @@
         }
         else if (isWasmOnly)
         {
-            JavascriptError::ThrowWebAssemblyRuntimeError(func->GetScriptContext(), JSERR_InvalidTypedArrayIndex);
+            JavascriptError::ThrowWebAssemblyRuntimeError(func->GetScriptContext(), WASMERR_ArrayIndexOutOfRange);
         }
 
         // SIMD loads/stores do bounds checks.
diff --git a/lib/Runtime/Library/JavascriptFunction.h b/lib/Runtime/Library/JavascriptFunction.h
index fce54d4..9b99120 100644
--- a/lib/Runtime/Library/JavascriptFunction.h
+++ b/lib/Runtime/Library/JavascriptFunction.h
@@ -102,7 +102,6 @@
         static JavascriptFunction* FromVar(Var aValue);
         Var CallFunction(Arguments args);
         Var CallRootFunction(Arguments args, ScriptContext * scriptContext, bool inScript);
-        Var CallRootFunctionInternal(Arguments args, ScriptContext * scriptContext, bool inScript);
 #ifdef ASMJS_PLAT
         template <typename T>
         static T CallAsmJsFunction(RecyclableObject * function, JavascriptMethod entryPoint, uint argc, Var * argv);
@@ -123,6 +122,8 @@
 #endif
         template <bool doStackProbe>
         static Var CallFunction(RecyclableObject* obj, JavascriptMethod entryPoint, Arguments args);
+        static Var CallRootFunction(RecyclableObject* obj, Arguments args, ScriptContext * scriptContext, bool inScript);
+        static Var CallRootFunctionInternal(RecyclableObject* obj, Arguments args, ScriptContext * scriptContext, bool inScript);
         static Var CallSpreadFunction(RecyclableObject* obj, Arguments args, const Js::AuxArray<uint32> *spreadIndices);
         static uint32 GetSpreadSize(const Arguments args, const Js::AuxArray<uint32> *spreadIndices, ScriptContext *scriptContext);
         static void SpreadArgs(const Arguments args, Arguments& destArgs, const Js::AuxArray<uint32> *spreadIndices, ScriptContext *scriptContext);
diff --git a/lib/Runtime/Library/JavascriptLibrary.cpp b/lib/Runtime/Library/JavascriptLibrary.cpp
index 7efd636..8a9ae36 100644
--- a/lib/Runtime/Library/JavascriptLibrary.cpp
+++ b/lib/Runtime/Library/JavascriptLibrary.cpp
@@ -316,7 +316,7 @@
         INIT_ERROR_PROTO(uriErrorPrototype, InitializeURIErrorPrototype);
 
 #ifdef ENABLE_WASM
-        if (CONFIG_FLAG(Wasm))
+        if (CONFIG_FLAG(Wasm) && !PHASE_OFF1(Js::WasmPhase))
         {
             INIT_ERROR_PROTO(webAssemblyCompileErrorPrototype, InitializeWebAssemblyCompileErrorPrototype);
             INIT_ERROR_PROTO(webAssemblyRuntimeErrorPrototype, InitializeWebAssemblyRuntimeErrorPrototype);
@@ -373,7 +373,7 @@
             DeferredTypeHandler<InitializeStringIteratorPrototype, DefaultDeferredTypeFilter, true>::GetDefaultInstance()));
 
 #ifdef ENABLE_WASM
-        if (CONFIG_FLAG(Wasm))
+        if (CONFIG_FLAG(Wasm) && !PHASE_OFF1(Js::WasmPhase))
         {
             webAssemblyMemoryPrototype = DynamicObject::New(recycler,
                 DynamicType::New(scriptContext, TypeIds_Object, objectPrototype, nullptr,
@@ -477,7 +477,7 @@
         INIT_SIMPLE_TYPE(uriErrorType, TypeIds_Error, uriErrorPrototype);
 
 #ifdef ENABLE_WASM
-        if (CONFIG_FLAG(Wasm))
+        if (CONFIG_FLAG(Wasm) && !PHASE_OFF1(Js::WasmPhase))
         {
             INIT_SIMPLE_TYPE(webAssemblyCompileErrorType, TypeIds_Error, webAssemblyCompileErrorPrototype);
             INIT_SIMPLE_TYPE(webAssemblyRuntimeErrorType, TypeIds_Error, webAssemblyRuntimeErrorPrototype);
@@ -624,7 +624,7 @@
 #endif
 
 #ifdef ENABLE_WASM
-        if (CONFIG_FLAG(Wasm))
+        if (CONFIG_FLAG(Wasm) && !PHASE_OFF1(Js::WasmPhase))
         {
             webAssemblyModuleType = DynamicType::New(scriptContext, TypeIds_WebAssemblyModule, webAssemblyModulePrototype, nullptr, NullTypeHandler<false>::GetDefaultInstance(), true, true);
             webAssemblyInstanceType = DynamicType::New(scriptContext, TypeIds_WebAssemblyInstance, webAssemblyInstancePrototype, nullptr, NullTypeHandler<false>::GetDefaultInstance(), true, true);
@@ -1275,6 +1275,9 @@
             AddFunctionToLibraryObjectWithPropertyName(globalObject, _u("emitTTDLog"), &GlobalObject::EntryInfo::EmitTTDLog, 2);
         }
 #endif
+#ifdef ENABLE_DEBUG_CONFIG_OPTIONS
+        AddFunctionToLibraryObjectWithPropertyName(globalObject, _u("chWriteTraceEvent"), &GlobalObject::EntryInfo::ChWriteTraceEvent, 1);
+#endif
 
 #ifdef IR_VIEWER
         if (Js::Configuration::Global.flags.IsEnabled(Js::IRViewerFlag))
@@ -1571,7 +1574,7 @@
         AddFunction(globalObject, PropertyIds::URIError, uriErrorConstructor);
 
 #ifdef ENABLE_WASM
-        if (CONFIG_FLAG(Wasm))
+        if (CONFIG_FLAG(Wasm) && !PHASE_OFF1(Js::WasmPhase))
         {
             webAssemblyCompileFunction = nullptr;
             // new WebAssembly object
@@ -1881,6 +1884,11 @@
         library->AddFunctionToLibraryObject(atomicsObject, PropertyIds::wake, &AtomicsObject::EntryInfo::Wake, 3);
         library->AddFunctionToLibraryObject(atomicsObject, PropertyIds::xor_, &AtomicsObject::EntryInfo::Xor, 3);
 
+        if (atomicsObject->GetScriptContext()->GetConfig()->IsES6ToStringTagEnabled())
+        {
+            library->AddMember(atomicsObject, PropertyIds::_symbolToStringTag, library->CreateStringFromCppLiteral(_u("Atomics")), PropertyConfigurable);
+        }
+        
         atomicsObject->SetHasNoEnumerableProperties(true);
     }
 
@@ -2175,7 +2183,7 @@
         prototype->SetHasNoEnumerableProperties(hasNoEnumerableProperties);
     }
 
-#define INIT_ERROR(error) \
+#define INIT_ERROR_IMPL(error, errorName) \
     void JavascriptLibrary::Initialize##error##Constructor(DynamicObject* constructor, DeferredTypeHandlerBase* typeHandler, DeferredInitializeMode mode) \
     { \
         typeHandler->Convert(constructor, mode, 3); \
@@ -2186,7 +2194,7 @@
         if (scriptContext->GetConfig()->IsES6FunctionNameEnabled()) \
         { \
             PropertyAttributes prototypeNameMessageAttributes = PropertyConfigurable; \
-            library->AddMember(constructor, PropertyIds::name, library->CreateStringFromCppLiteral(_u(#error)), prototypeNameMessageAttributes); \
+            library->AddMember(constructor, PropertyIds::name, library->CreateStringFromCppLiteral(_u(#errorName)), prototypeNameMessageAttributes); \
         } \
         constructor->SetHasNoEnumerableProperties(true); \
     } \
@@ -2197,21 +2205,22 @@
         library->AddMember(prototype, PropertyIds::constructor, library->Get##error##Constructor()); \
         bool hasNoEnumerableProperties = true; \
         PropertyAttributes prototypeNameMessageAttributes = PropertyConfigurable | PropertyWritable; \
-        library->AddMember(prototype, PropertyIds::name, library->CreateStringFromCppLiteral(_u(#error)), prototypeNameMessageAttributes); \
+        library->AddMember(prototype, PropertyIds::name, library->CreateStringFromCppLiteral(_u(#errorName)), prototypeNameMessageAttributes); \
         library->AddMember(prototype, PropertyIds::message, library->GetEmptyString(), prototypeNameMessageAttributes); \
         library->AddFunctionToLibraryObject(prototype, PropertyIds::toString, &JavascriptError::EntryInfo::ToString, 0); \
         prototype->SetHasNoEnumerableProperties(hasNoEnumerableProperties); \
     }
 
+#define INIT_ERROR(error) INIT_ERROR_IMPL(error, error)
     INIT_ERROR(EvalError);
     INIT_ERROR(RangeError);
     INIT_ERROR(ReferenceError);
     INIT_ERROR(SyntaxError);
     INIT_ERROR(TypeError);
     INIT_ERROR(URIError);
-    INIT_ERROR(WebAssemblyCompileError);
-    INIT_ERROR(WebAssemblyRuntimeError);
-    INIT_ERROR(WebAssemblyLinkError);
+    INIT_ERROR_IMPL(WebAssemblyCompileError, CompileError);
+    INIT_ERROR_IMPL(WebAssemblyRuntimeError, RuntimeError);
+    INIT_ERROR_IMPL(WebAssemblyLinkError, LinkError);
 
 #undef INIT_ERROR
 
@@ -2503,7 +2512,7 @@
         {
             library->AddMember(proxyConstructor, PropertyIds::name, scriptContext->GetPropertyString(PropertyIds::Proxy), PropertyConfigurable);
         }
-        library->AddFunctionToLibraryObject(proxyConstructor, PropertyIds::revocable, &JavascriptProxy::EntryInfo::Revocable, PropertyNone);
+        library->AddFunctionToLibraryObject(proxyConstructor, PropertyIds::revocable, &JavascriptProxy::EntryInfo::Revocable, 2, PropertyConfigurable);
 
         proxyConstructor->SetHasNoEnumerableProperties(true);
     }
@@ -2823,16 +2832,16 @@
         library->AddMember(prototype, PropertyIds::constructor, library->webAssemblyTableConstructor);
         if (scriptContext->GetConfig()->IsES6ToStringTagEnabled())
         {
-            library->AddMember(prototype, PropertyIds::_symbolToStringTag, library->CreateStringFromCppLiteral(_u("WebAssemblyTable")), PropertyConfigurable);
+            library->AddMember(prototype, PropertyIds::_symbolToStringTag, library->CreateStringFromCppLiteral(_u("WebAssembly.Table")), PropertyConfigurable);
         }
         scriptContext->SetBuiltInLibraryFunction(WebAssemblyTable::EntryInfo::Grow.GetOriginalEntryPoint(),
-            library->AddFunctionToLibraryObject(prototype, PropertyIds::grow, &WebAssemblyTable::EntryInfo::Grow, PropertyEnumerable));
+            library->AddFunctionToLibraryObject(prototype, PropertyIds::grow, &WebAssemblyTable::EntryInfo::Grow, 1));
 
         scriptContext->SetBuiltInLibraryFunction(WebAssemblyTable::EntryInfo::Get.GetOriginalEntryPoint(),
-            library->AddFunctionToLibraryObject(prototype, PropertyIds::get, &WebAssemblyTable::EntryInfo::Get, PropertyEnumerable));
+            library->AddFunctionToLibraryObject(prototype, PropertyIds::get, &WebAssemblyTable::EntryInfo::Get, 1));
 
         scriptContext->SetBuiltInLibraryFunction(WebAssemblyTable::EntryInfo::Set.GetOriginalEntryPoint(),
-            library->AddFunctionToLibraryObject(prototype, PropertyIds::set, &WebAssemblyTable::EntryInfo::Set, PropertyEnumerable));
+            library->AddFunctionToLibraryObject(prototype, PropertyIds::set, &WebAssemblyTable::EntryInfo::Set, 2));
 
         library->AddAccessorsToLibraryObject(prototype, PropertyIds::length, &WebAssemblyTable::EntryInfo::GetterLength, nullptr);
 
@@ -2848,7 +2857,7 @@
         library->AddMember(constructor, PropertyIds::prototype, library->webAssemblyTablePrototype, PropertyNone);
         if (scriptContext->GetConfig()->IsES6FunctionNameEnabled())
         {
-            library->AddMember(constructor, PropertyIds::name, library->CreateStringFromCppLiteral(_u("WebAssemblyTable")), PropertyConfigurable);
+            library->AddMember(constructor, PropertyIds::name, library->CreateStringFromCppLiteral(_u("Table")), PropertyConfigurable);
         }
         constructor->SetHasNoEnumerableProperties(true);
     }
@@ -2863,10 +2872,10 @@
         library->AddMember(prototype, PropertyIds::constructor, library->webAssemblyMemoryConstructor);
         if (scriptContext->GetConfig()->IsES6ToStringTagEnabled())
         {
-            library->AddMember(prototype, PropertyIds::_symbolToStringTag, library->CreateStringFromCppLiteral(_u("WebAssemblyMemory")), PropertyConfigurable);
+            library->AddMember(prototype, PropertyIds::_symbolToStringTag, library->CreateStringFromCppLiteral(_u("WebAssembly.Memory")), PropertyConfigurable);
         }
         scriptContext->SetBuiltInLibraryFunction(WebAssemblyMemory::EntryInfo::Grow.GetOriginalEntryPoint(),
-            library->AddFunctionToLibraryObject(prototype, PropertyIds::grow, &WebAssemblyMemory::EntryInfo::Grow, PropertyEnumerable));
+            library->AddFunctionToLibraryObject(prototype, PropertyIds::grow, &WebAssemblyMemory::EntryInfo::Grow, 1));
 
         library->AddAccessorsToLibraryObject(prototype, PropertyIds::buffer, &WebAssemblyMemory::EntryInfo::GetterBuffer, nullptr);
 
@@ -2882,22 +2891,23 @@
         library->AddMember(constructor, PropertyIds::prototype, library->webAssemblyMemoryPrototype, PropertyNone);
         if (scriptContext->GetConfig()->IsES6FunctionNameEnabled())
         {
-            library->AddMember(constructor, PropertyIds::name, library->CreateStringFromCppLiteral(_u("WebAssemblyMemory")), PropertyConfigurable);
+            library->AddMember(constructor, PropertyIds::name, library->CreateStringFromCppLiteral(_u("Memory")), PropertyConfigurable);
         }
         constructor->SetHasNoEnumerableProperties(true);
     }
 
     void JavascriptLibrary::InitializeWebAssemblyInstancePrototype(DynamicObject* prototype, DeferredTypeHandlerBase * typeHandler, DeferredInitializeMode mode)
     {
-        typeHandler->Convert(prototype, mode, 2);
+        typeHandler->Convert(prototype, mode, 3);
 
         JavascriptLibrary* library = prototype->GetLibrary();
         ScriptContext* scriptContext = prototype->GetScriptContext();
 
         library->AddMember(prototype, PropertyIds::constructor, library->webAssemblyInstanceConstructor);
+        library->AddAccessorsToLibraryObject(prototype, PropertyIds::exports, &WebAssemblyInstance::EntryInfo::GetterExports, nullptr);
         if (scriptContext->GetConfig()->IsES6ToStringTagEnabled())
         {
-            library->AddMember(prototype, PropertyIds::_symbolToStringTag, library->CreateStringFromCppLiteral(_u("WebAssemblyInstance")), PropertyConfigurable);
+            library->AddMember(prototype, PropertyIds::_symbolToStringTag, library->CreateStringFromCppLiteral(_u("WebAssembly.Instance")), PropertyConfigurable);
         }
         prototype->SetHasNoEnumerableProperties(true);
     }
@@ -2911,7 +2921,7 @@
         library->AddMember(constructor, PropertyIds::prototype, library->webAssemblyInstancePrototype, PropertyNone);
         if (scriptContext->GetConfig()->IsES6FunctionNameEnabled())
         {
-            library->AddMember(constructor, PropertyIds::name, library->CreateStringFromCppLiteral(_u("WebAssemblyInstance")), PropertyConfigurable);
+            library->AddMember(constructor, PropertyIds::name, library->CreateStringFromCppLiteral(_u("Instance")), PropertyConfigurable);
         }
         constructor->SetHasNoEnumerableProperties(true);
     }
@@ -2926,7 +2936,7 @@
         library->AddMember(prototype, PropertyIds::constructor, library->webAssemblyModuleConstructor);
         if (scriptContext->GetConfig()->IsES6ToStringTagEnabled())
         {
-            library->AddMember(prototype, PropertyIds::_symbolToStringTag, library->CreateStringFromCppLiteral(_u("WebAssemblyModule")), PropertyConfigurable);
+            library->AddMember(prototype, PropertyIds::_symbolToStringTag, library->CreateStringFromCppLiteral(_u("WebAssembly.Module")), PropertyConfigurable);
         }
         prototype->SetHasNoEnumerableProperties(true);
     }
@@ -2939,13 +2949,13 @@
         library->AddMember(constructor, PropertyIds::length, TaggedInt::ToVarUnchecked(1), PropertyConfigurable);
         library->AddMember(constructor, PropertyIds::prototype, library->webAssemblyModulePrototype, PropertyNone);
 
-        library->AddFunctionToLibraryObject(constructor, PropertyIds::exports, &WebAssemblyModule::EntryInfo::Exports, 2);
-        library->AddFunctionToLibraryObject(constructor, PropertyIds::imports, &WebAssemblyModule::EntryInfo::Imports, 2);
+        library->AddFunctionToLibraryObject(constructor, PropertyIds::exports, &WebAssemblyModule::EntryInfo::Exports, 1);
+        library->AddFunctionToLibraryObject(constructor, PropertyIds::imports, &WebAssemblyModule::EntryInfo::Imports, 1);
         library->AddFunctionToLibraryObject(constructor, PropertyIds::customSections, &WebAssemblyModule::EntryInfo::CustomSections, 2);
 
         if (scriptContext->GetConfig()->IsES6FunctionNameEnabled())
         {
-            library->AddMember(constructor, PropertyIds::name, library->CreateStringFromCppLiteral(_u("WebAssemblyModule")), PropertyConfigurable);
+            library->AddMember(constructor, PropertyIds::name, library->CreateStringFromCppLiteral(_u("Module")), PropertyConfigurable);
         }
         constructor->SetHasNoEnumerableProperties(true);
     }
@@ -2953,7 +2963,7 @@
     void JavascriptLibrary::InitializeWebAssemblyObject(DynamicObject* webAssemblyObject, DeferredTypeHandlerBase * typeHandler, DeferredInitializeMode mode)
     {
         JavascriptLibrary* library = webAssemblyObject->GetLibrary();
-        int slots = 8;
+        int slots = 9;
 #ifdef ENABLE_WABT
         // Attaching wabt for testing
         ++slots;
@@ -2982,6 +2992,12 @@
         library->AddFunction(webAssemblyObject, PropertyIds::LinkError, library->webAssemblyLinkErrorConstructor);
         library->AddFunction(webAssemblyObject, PropertyIds::Memory, library->webAssemblyMemoryConstructor);
         library->AddFunction(webAssemblyObject, PropertyIds::Table, library->webAssemblyTableConstructor);
+
+        ScriptContext* scriptContext = webAssemblyObject->GetScriptContext();
+        if (scriptContext->GetConfig()->IsES6FunctionNameEnabled())
+        {
+            library->AddMember(webAssemblyObject, PropertyIds::_symbolToStringTag, library->CreateStringFromCppLiteral(_u("WebAssembly")), PropertyConfigurable);
+        }
     }
 #endif
 
@@ -5860,19 +5876,21 @@
             return false;
         }
 
+        JS_REENTRANCY_LOCK(reentrancyLock, callsite->GetScriptContext()->GetThreadContext());
+        Unused(reentrancyLock);
+
         element = Js::JavascriptOperators::OP_GetProperty(callsite, Js::PropertyIds::raw, callsite->GetScriptContext());
         Js::ES5Array* rawArray = Js::ES5Array::FromVar(element);
 
         // Length of the raw strings should be the same as the cooked string literals.
-        Assert(length == rawArray->GetLength());
+        AssertOrFailFast(length != 0 && length == rawArray->GetLength());
 
         x = x->sxStrTemplate.pnodeStringRawLiterals;
 
-        Assert(length != 0);
-
         for (uint32 i = 0; i < length - 1; i++)
         {
-            rawArray->DirectGetItemAt(i, &element);
+            BOOL hasElem = rawArray->DirectGetItemAt(i, &element);
+            AssertOrFailFast(hasElem);
             str = Js::JavascriptString::FromVar(element);
 
             Assert(x->nop == knopList);
@@ -5897,7 +5915,8 @@
 
         // There should be one more string in the callsite array - and the final string in the ParseNode
 
-        rawArray->DirectGetItemAt(length - 1, &element);
+        BOOL hasLastElem = rawArray->DirectGetItemAt(length - 1, &element);
+        AssertOrFailFast(hasLastElem);
         str = Js::JavascriptString::FromVar(element);
 
         Assert(x->nop == knopStr);
@@ -6048,7 +6067,10 @@
             return false;
         }
 
-        Assert(lengthLeft != 0 && lengthRight != 0);
+        AssertOrFailFast(lengthLeft != 0 && lengthRight != 0);
+
+        JS_REENTRANCY_LOCK(reentrancyLock, arrayLeft->GetScriptContext()->GetThreadContext());
+        Unused(reentrancyLock);
 
         // Change to the set of raw strings.
         varLeft = Js::JavascriptOperators::OP_GetProperty(arrayLeft, Js::PropertyIds::raw, arrayLeft->GetScriptContext());
@@ -6058,13 +6080,15 @@
         arrayRight = Js::ES5Array::FromVar(varRight);
 
         // Length of the raw strings should be the same as the cooked string literals.
-        Assert(lengthLeft == arrayLeft->GetLength());
-        Assert(lengthRight == arrayRight->GetLength());
+        AssertOrFailFast(lengthLeft == arrayLeft->GetLength());
+        AssertOrFailFast(lengthRight == arrayRight->GetLength());
 
         for (uint32 i = 0; i < lengthLeft; i++)
         {
-            arrayLeft->DirectGetItemAt(i, &varLeft);
-            arrayRight->DirectGetItemAt(i, &varRight);
+            BOOL hasLeft = arrayLeft->DirectGetItemAt(i, &varLeft);
+            AssertOrFailFast(hasLeft);
+            BOOL hasRight = arrayRight->DirectGetItemAt(i, &varRight);
+            AssertOrFailFast(hasRight);
 
             // If the strings at this index are not equal, the callsite objects are not equal.
             if (!Js::JavascriptString::Equals(varLeft, varRight))
@@ -6086,12 +6110,14 @@
         {
             return hash;
         }
+        JS_REENTRANCY_LOCK(reentrancyLock, obj->GetScriptContext()->GetThreadContext());
+        Unused(reentrancyLock);
 
         Js::ES5Array* callsite = Js::ES5Array::FromVar(obj);
         Js::Var var = Js::JavascriptOperators::OP_GetProperty(callsite, Js::PropertyIds::raw, callsite->GetScriptContext());
         Js::ES5Array* rawArray = Js::ES5Array::FromVar(var);
 
-        Assert(rawArray->GetLength() > 0);
+        AssertOrFailFast(rawArray->GetLength() > 0);
 
         rawArray->DirectGetItemAt(0, &var);
         Js::JavascriptString* str = Js::JavascriptString::FromVar(var);
@@ -6101,7 +6127,8 @@
         {
             hash ^= DefaultComparer<const char16*>::GetHashCode(_u("${}"));
 
-            rawArray->DirectGetItemAt(i, &var);
+            BOOL hasItem = rawArray->DirectGetItemAt(i, &var);
+            AssertOrFailFast(hasItem);
             str = Js::JavascriptString::FromVar(var);
             hash ^= DefaultComparer<const char16*>::GetHashCode(str->GetSz());
         }
@@ -6285,12 +6312,12 @@
         return arr;
     }
 
-    Js::ArrayBuffer* JavascriptLibrary::CreateWebAssemblyArrayBuffer(uint32 length)
+    Js::WebAssemblyArrayBuffer* JavascriptLibrary::CreateWebAssemblyArrayBuffer(uint32 length)
     {
         return WebAssemblyArrayBuffer::Create(nullptr, length, arrayBufferType);
     }
 
-    Js::ArrayBuffer* JavascriptLibrary::CreateWebAssemblyArrayBuffer(byte* buffer, uint32 length)
+    Js::WebAssemblyArrayBuffer* JavascriptLibrary::CreateWebAssemblyArrayBuffer(byte* buffer, uint32 length)
     {
         return WebAssemblyArrayBuffer::Create(buffer, length, arrayBufferType);
     }
@@ -6853,7 +6880,7 @@
 
     DynamicObject* JavascriptLibrary::CreateObject(RecyclableObject* prototype, uint16 requestedInlineSlotCapacity)
     {
-        Assert(JavascriptOperators::IsObject(prototype));
+        Assert(JavascriptOperators::IsObjectOrNull(prototype));
 
         DynamicType* dynamicType = CreateObjectType(prototype, requestedInlineSlotCapacity);
         return DynamicObject::New(this->GetRecycler(), dynamicType);
diff --git a/lib/Runtime/Library/JavascriptLibrary.h b/lib/Runtime/Library/JavascriptLibrary.h
index b27b942..2ffde65 100644
--- a/lib/Runtime/Library/JavascriptLibrary.h
+++ b/lib/Runtime/Library/JavascriptLibrary.h
@@ -965,8 +965,8 @@
         JavascriptArray* CreateArray(uint32 length, uint32 size);
         ArrayBuffer* CreateArrayBuffer(uint32 length);
         ArrayBuffer* CreateArrayBuffer(byte* buffer, uint32 length);
-        ArrayBuffer* CreateWebAssemblyArrayBuffer(uint32 length);
-        ArrayBuffer* CreateWebAssemblyArrayBuffer(byte* buffer, uint32 length);
+        class WebAssemblyArrayBuffer* CreateWebAssemblyArrayBuffer(uint32 length);
+        class WebAssemblyArrayBuffer* CreateWebAssemblyArrayBuffer(byte* buffer, uint32 length);
         SharedArrayBuffer* CreateSharedArrayBuffer(uint32 length);
         SharedArrayBuffer* CreateSharedArrayBuffer(SharedContents *contents);
         ArrayBuffer* CreateProjectionArraybuffer(uint32 length);
diff --git a/lib/Runtime/Library/JavascriptProxy.cpp b/lib/Runtime/Library/JavascriptProxy.cpp
index d6029f3..3119daf 100644
--- a/lib/Runtime/Library/JavascriptProxy.cpp
+++ b/lib/Runtime/Library/JavascriptProxy.cpp
@@ -545,7 +545,7 @@
         }
         else if (result.IsFromProxy())
         {
-            *value = GetValueFromDescriptor(RecyclableObject::FromVar(originalInstance), result, requestContext);
+            *value = GetValueFromDescriptor(originalInstance, result, requestContext);
         }
         return JavascriptConversion::BooleanToPropertyQueryFlags(foundProperty);
     }
@@ -572,7 +572,7 @@
         }
         else if (result.IsFromProxy())
         {
-            *value = GetValueFromDescriptor(RecyclableObject::FromVar(originalInstance), result, requestContext);
+            *value = GetValueFromDescriptor(originalInstance, result, requestContext);
         }
         return JavascriptConversion::BooleanToPropertyQueryFlags(foundProperty);
     }
@@ -623,7 +623,7 @@
         }
         else if (result.IsFromProxy())
         {
-            *value = GetValueFromDescriptor(RecyclableObject::FromVar(originalInstance), result, requestContext);
+            *value = GetValueFromDescriptor(originalInstance, result, requestContext);
         }
         return JavascriptConversion::BooleanToPropertyQueryFlags(foundProperty);
     }
@@ -886,7 +886,7 @@
         }
         else if (result.IsFromProxy())
         {
-            *value = GetValueFromDescriptor(RecyclableObject::FromVar(originalInstance), result, requestContext);
+            *value = GetValueFromDescriptor(originalInstance, result, requestContext);
         }
         return JavascriptConversion::BooleanToPropertyQueryFlags(foundProperty);
     }
@@ -909,7 +909,7 @@
         }
         else if (result.IsFromProxy())
         {
-            *value = GetValueFromDescriptor(RecyclableObject::FromVar(originalInstance), result, requestContext);
+            *value = GetValueFromDescriptor(originalInstance, result, requestContext);
         }
         return JavascriptConversion::BooleanToPropertyQueryFlags(foundProperty);
     }
@@ -1940,7 +1940,7 @@
         return JavascriptFunction::FromVar(varMethod);
     }
 
-    Var JavascriptProxy::GetValueFromDescriptor(RecyclableObject* instance, PropertyDescriptor propertyDescriptor, ScriptContext* requestContext)
+    Var JavascriptProxy::GetValueFromDescriptor(Var instance, PropertyDescriptor propertyDescriptor, ScriptContext* requestContext)
     {
         if (propertyDescriptor.ValueSpecified())
         {
diff --git a/lib/Runtime/Library/JavascriptProxy.h b/lib/Runtime/Library/JavascriptProxy.h
index 57d078a..d4f95c9 100644
--- a/lib/Runtime/Library/JavascriptProxy.h
+++ b/lib/Runtime/Library/JavascriptProxy.h
@@ -204,7 +204,7 @@
 
     private:
         JavascriptFunction* GetMethodHelper(PropertyId methodId, ScriptContext* requestContext);
-        Var GetValueFromDescriptor(RecyclableObject* instance, PropertyDescriptor propertyDescriptor, ScriptContext* requestContext);
+        Var GetValueFromDescriptor(Var instance, PropertyDescriptor propertyDescriptor, ScriptContext* requestContext);
         static Var GetName(ScriptContext* requestContext, PropertyId propertyId);
 
         static BOOL TestIntegrityLevel(IntegrityLevel integrityLevel, RecyclableObject* obj, ScriptContext* scriptContext);
diff --git a/lib/Runtime/Library/MathLibrary.cpp b/lib/Runtime/Library/MathLibrary.cpp
index a640f60..02e5f15 100644
--- a/lib/Runtime/Library/MathLibrary.cpp
+++ b/lib/Runtime/Library/MathLibrary.cpp
@@ -1,4 +1,4 @@
-//-------------------------------------------------------------------------------------------------------
+//-------------------------------------------------------------------------------------------------------
 // Copyright (C) Microsoft. All rights reserved.
 // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
 //-------------------------------------------------------------------------------------------------------
@@ -1520,9 +1520,9 @@
 
         // ES6 20.2.2.18 Math.hypot(value1, value2, ...values)
         // If no arguments are passed, the result is +0.
-        // If any argument is +∞, the result is +∞.
-        // If any argument is -∞, the result is +∞.
-        // If no argument is +∞ or -∞, and any argument is NaN, the result is NaN.
+        // If any argument is +Infinity, the result is +Infinity.
+        // If any argument is -Infinity, the result is +Infinity.
+        // If no argument is +Infinity or -Infinity, and any argument is NaN, the result is NaN.
         // If all arguments are either +0 or -0, the result is +0.
 
         double result = JavascriptNumber::k_Zero; // If there are no arguments return value is positive zero.
@@ -1591,7 +1591,7 @@
             {
                 if (JavascriptNumber::IsNan(doubleVal))
                 {
-                    //Even though we found NaN, we still need to validate none of the other arguments are +∞ or -∞
+                    //Even though we found NaN, we still need to validate none of the other arguments are +Infinity or -Infinity
                     foundNaN = true;
                 }
                 else
diff --git a/lib/Runtime/Library/ScriptFunction.cpp b/lib/Runtime/Library/ScriptFunction.cpp
index 818ec47..ed6ff4c 100644
--- a/lib/Runtime/Library/ScriptFunction.cpp
+++ b/lib/Runtime/Library/ScriptFunction.cpp
@@ -103,18 +103,6 @@
             }
             return pfuncScriptWithInlineCache;
         }
-        else if(functionProxy->IsFunctionBody() && functionProxy->GetFunctionBody()->GetIsAsmJsFunction())
-        {
-            AsmJsScriptFunction* asmJsFunc = scriptContext->GetLibrary()->CreateAsmJsScriptFunction(functionProxy);
-            asmJsFunc->SetEnvironment(environment);
-
-            Assert(!hasSuperReference);
-            asmJsFunc->SetHasSuperReference(hasSuperReference);
-
-            JS_ETW(EventWriteJSCRIPT_RECYCLER_ALLOCATE_FUNCTION(asmJsFunc, EtwTrace::GetFunctionId(functionProxy)));
-
-            return asmJsFunc;
-        }
         else
         {
             ScriptFunction* pfuncScript = scriptContext->GetLibrary()->CreateScriptFunction(functionProxy);
@@ -681,6 +669,27 @@
         return reinterpret_cast<AsmJsScriptFunction *>(func);
     }
 
+    AsmJsScriptFunction * AsmJsScriptFunction::OP_NewAsmJsFunc(FrameDisplay *environment, FunctionInfoPtrPtr infoRef)
+    {
+        AssertMsg(infoRef != nullptr, "BYTE-CODE VERIFY: Must specify a valid function to create");
+        FunctionProxy* functionProxy = (*infoRef)->GetFunctionProxy();
+        AssertMsg(functionProxy != nullptr, "BYTE-CODE VERIFY: Must specify a valid function to create");
+
+        ScriptContext* scriptContext = functionProxy->GetScriptContext();
+
+        bool hasSuperReference = functionProxy->HasSuperReference();
+
+        AsmJsScriptFunction* asmJsFunc = scriptContext->GetLibrary()->CreateAsmJsScriptFunction(functionProxy);
+        asmJsFunc->SetEnvironment(environment);
+
+        Assert(!hasSuperReference);
+        asmJsFunc->SetHasSuperReference(hasSuperReference);
+
+        JS_ETW(EventWriteJSCRIPT_RECYCLER_ALLOCATE_FUNCTION(asmJsFunc, EtwTrace::GetFunctionId(functionProxy)));
+
+        return asmJsFunc;
+    }
+
     ScriptFunctionWithInlineCache::ScriptFunctionWithInlineCache(FunctionProxy * proxy, ScriptFunctionType* deferredPrototypeType) :
         ScriptFunction(proxy, deferredPrototypeType), hasOwnInlineCaches(false)
     {}
diff --git a/lib/Runtime/Library/ScriptFunction.h b/lib/Runtime/Library/ScriptFunction.h
index 8217096..01e63fe 100644
--- a/lib/Runtime/Library/ScriptFunction.h
+++ b/lib/Runtime/Library/ScriptFunction.h
@@ -125,6 +125,7 @@
         static bool Is(Var func);
         static bool IsWasmScriptFunction(Var func);
         static AsmJsScriptFunction* FromVar(Var func);
+        static AsmJsScriptFunction * OP_NewAsmJsFunc(FrameDisplay *environment, FunctionInfoPtrPtr infoRef);
 
         void SetModuleMemory(Field(Var)* mem) { m_moduleMemory = mem; }
         Field(Var)* GetModuleMemory() const { return m_moduleMemory; }
diff --git a/lib/Runtime/Library/SharedArrayBuffer.cpp b/lib/Runtime/Library/SharedArrayBuffer.cpp
index 4fc5496..0ce9be3 100644
--- a/lib/Runtime/Library/SharedArrayBuffer.cpp
+++ b/lib/Runtime/Library/SharedArrayBuffer.cpp
@@ -9,6 +9,7 @@
 #if DBG
     void SharedContents::AddAgent(DWORD_PTR agent)
     {
+        AutoCriticalSection autoCS(&csAgent);
         if (allowedAgents == nullptr)
         {
             allowedAgents = HeapNew(SharableAgents, &HeapAllocator::Instance);
@@ -19,6 +20,7 @@
 
     bool SharedContents::IsValidAgent(DWORD_PTR agent)
     {
+        AutoCriticalSection autoCS(&csAgent);
         return allowedAgents != nullptr && allowedAgents->Contains(agent);
     }
 #endif
@@ -40,10 +42,13 @@
         buffer = nullptr;
         bufferLength = 0;
 #if DBG
-        if (allowedAgents != nullptr)
         {
-            HeapDelete(allowedAgents);
-            allowedAgents = nullptr;
+            AutoCriticalSection autoCS(&csAgent);
+            if (allowedAgents != nullptr)
+            {
+                HeapDelete(allowedAgents);
+                allowedAgents = nullptr;
+            }
         }
 #endif
 
diff --git a/lib/Runtime/Library/SharedArrayBuffer.h b/lib/Runtime/Library/SharedArrayBuffer.h
index ccc2c0a..70002a7 100644
--- a/lib/Runtime/Library/SharedArrayBuffer.h
+++ b/lib/Runtime/Library/SharedArrayBuffer.h
@@ -10,7 +10,6 @@
 {
 
     class WaiterList;
-
     typedef JsUtil::List<DWORD_PTR, HeapAllocator> SharableAgents;
     typedef JsUtil::BaseDictionary<uint, WaiterList *, HeapAllocator> IndexToWaitersMap;
 
@@ -31,6 +30,7 @@
 #if DBG
         // This is mainly used for validation purpose as the wait/wake APIs should be used on the agents (Workers) among which this buffer is shared.
         SharableAgents *allowedAgents;
+        CriticalSection csAgent;
         void AddAgent(DWORD_PTR agent);
         bool IsValidAgent(DWORD_PTR agent);
 #endif
diff --git a/lib/Runtime/Library/WebAssemblyInstance.cpp b/lib/Runtime/Library/WebAssemblyInstance.cpp
index 036cc4a..fde8a69 100644
--- a/lib/Runtime/Library/WebAssemblyInstance.cpp
+++ b/lib/Runtime/Library/WebAssemblyInstance.cpp
@@ -32,7 +32,8 @@
 
 WebAssemblyInstance::WebAssemblyInstance(WebAssemblyModule * wasmModule, DynamicType * type) :
     DynamicObject(type),
-    m_module(wasmModule)
+    m_module(wasmModule),
+    m_exports(nullptr)
 {
 }
 
@@ -87,6 +88,31 @@
     return CreateInstance(module, importObject);
 }
 
+Var
+WebAssemblyInstance::GetterExports(RecyclableObject* function, CallInfo callInfo, ...)
+{
+    PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
+
+    ARGUMENTS(args, callInfo);
+    ScriptContext* scriptContext = function->GetScriptContext();
+
+    Assert(!(callInfo.Flags & CallFlags_New));
+
+    if (args.Info.Count == 0 || !WebAssemblyInstance::Is(args[0]))
+    {
+        JavascriptError::ThrowTypeError(scriptContext, WASMERR_NeedInstanceObject);
+    }
+
+    WebAssemblyInstance* instance = WebAssemblyInstance::FromVar(args[0]);
+    Js::Var exports = instance->m_exports;
+    if (!exports || !DynamicObject::Is(exports))
+    {
+        Assert(UNREACHED);
+        exports = scriptContext->GetLibrary()->GetUndefined();
+    }
+    return exports;
+}
+
 WebAssemblyInstance *
 WebAssemblyInstance::CreateInstance(WebAssemblyModule * module, Var importObject)
 {
@@ -119,8 +145,7 @@
             AssertMsg(UNREACHED, "By spec, we should not have any exceptions possible here");
             throw;
         }
-        Js::Var exportsNamespace = BuildObject(module, scriptContext, &environment);
-        JavascriptOperators::OP_SetProperty(newInstance, PropertyIds::exports, exportsNamespace, scriptContext);
+        newInstance->m_exports = BuildObject(module, scriptContext, &environment);
     }
     catch (Wasm::WasmCompilationException& e)
     {
@@ -150,11 +175,19 @@
         {
             continue;
         }
-        AsmJsScriptFunction * funcObj = ctx->GetLibrary()->CreateAsmJsScriptFunction(wasmModule->GetWasmFunctionInfo(i)->GetBody());
-        FunctionBody* body = funcObj->GetFunctionBody();
+        Wasm::WasmFunctionInfo* wasmFuncInfo = wasmModule->GetWasmFunctionInfo(i);
+        FunctionBody* body = wasmFuncInfo->GetBody();
+        AsmJsScriptFunction * funcObj = ctx->GetLibrary()->CreateAsmJsScriptFunction(body);
         funcObj->SetModuleMemory((Field(Var)*)env->GetStartPtr());
         funcObj->SetSignature(body->GetAsmJsFunctionInfo()->GetWasmSignature());
         funcObj->SetEnvironment(frameDisplay);
+
+        // Todo:: need to fix issue #2452 before we can do this,
+        // otherwise we'll change the type of the functions and cause multiple instance to not share jitted code
+        //Wasm::WasmSignature* sig = wasmFuncInfo->GetSignature();
+        //funcObj->SetPropertyWithAttributes(PropertyIds::length, JavascriptNumber::ToVar(sig->GetParamCount(), ctx), PropertyNone, nullptr);
+        //funcObj->SetPropertyWithAttributes(PropertyIds::name, JavascriptConversion::ToString(JavascriptNumber::ToVar(i, ctx), ctx), PropertyNone, nullptr);
+
         env->SetWasmFunction(i, funcObj);
 
         if (!PHASE_OFF(WasmDeferredPhase, body))
@@ -200,7 +233,7 @@
 
 Var WebAssemblyInstance::BuildObject(WebAssemblyModule * wasmModule, ScriptContext* scriptContext, WebAssemblyEnvironment* env)
 {
-    Js::Var exportsNamespace = JavascriptOperators::NewJavascriptObjectNoArg(scriptContext);
+    Js::Var exportsNamespace = scriptContext->GetLibrary()->CreateObject(scriptContext->GetLibrary()->GetNull());
     for (uint32 iExport = 0; iExport < wasmModule->GetExportCount(); ++iExport)
     {
         Wasm::WasmExport* wasmExport = wasmModule->GetExport(iExport);
@@ -250,6 +283,7 @@
             JavascriptOperators::OP_SetProperty(exportsNamespace, propertyRecord->GetPropertyId(), obj, scriptContext);
         }
     }
+    DynamicObject::FromVar(exportsNamespace)->PreventExtensions();
     return exportsNamespace;
 }
 
@@ -290,7 +324,14 @@
                 AsmJsScriptFunction* func = AsmJsScriptFunction::FromVar(prop);
                 if (!wasmModule->GetWasmFunctionInfo(counter)->GetSignature()->IsEquivalent(func->GetSignature()))
                 {
-                    JavascriptError::ThrowWebAssemblyLinkError(ctx, WASMERR_SignatureMismatch);
+                    char16 temp[2048] = { 0 };
+                    char16 importargs[512] = { 0 };
+                    wasmModule->GetWasmFunctionInfo(counter)->GetSignature()->WriteSignatureToString(importargs, 512);
+                    char16 exportargs[512] = { 0 };
+                    func->GetSignature()->WriteSignatureToString(exportargs, 512);
+                    _snwprintf_s(temp, 2048, _TRUNCATE, _u("%ls%ls to %ls%ls"), func->GetDisplayName()->GetString(), exportargs, import->importName, importargs);
+                    // this makes a copy of the error message buffer, so it's fine to not worry about clean-up
+                    JavascriptError::ThrowWebAssemblyLinkError(ctx, WASMERR_LinkSignatureMismatch, temp);
                 }
                 // Imported Wasm functions can be called directly
                 env->SetWasmFunction(counter, func);
@@ -314,7 +355,7 @@
                 }
                 if (mem->GetMaximumLength() > wasmModule->GetMemoryMaxSize())
                 {
-                    throw Wasm::WasmCompilationException(_u("Imported memory maximum size (%u) is larger than declared (%u)"),mem->GetMaximumLength(), wasmModule->GetMemoryMaxSize());
+                    throw Wasm::WasmCompilationException(_u("Imported memory maximum size (%u) is larger than declared (%u)"), mem->GetMaximumLength(), wasmModule->GetMemoryMaxSize());
                 }
                 env->SetMemory(counter, mem);
             }
@@ -456,6 +497,10 @@
     else
     {
         mem = wasmModule->CreateMemory();
+        if (mem == nullptr)
+        {
+            JavascriptError::ThrowWebAssemblyLinkError(ctx, WASMERR_MemoryCreateFailed);
+        }
         env->SetMemory(0, mem);
     }
     ArrayBuffer * buffer = mem->GetBuffer();
diff --git a/lib/Runtime/Library/WebAssemblyInstance.h b/lib/Runtime/Library/WebAssemblyInstance.h
index 6e6f9d7..eebcf6c 100644
--- a/lib/Runtime/Library/WebAssemblyInstance.h
+++ b/lib/Runtime/Library/WebAssemblyInstance.h
@@ -14,9 +14,11 @@
         {
         public:
             static FunctionInfo NewInstance;
+            static FunctionInfo GetterExports;
         };
 
         static Var NewInstance(RecyclableObject* function, CallInfo callInfo, ...);
+        static Var GetterExports(RecyclableObject* function, CallInfo callInfo, ...);
 
         static bool Is(Var aValue);
         static WebAssemblyInstance * FromVar(Var aValue);
@@ -34,6 +36,7 @@
         static void ValidateTableAndMemory(WebAssemblyModule * wasmModule, ScriptContext* ctx, WebAssemblyEnvironment* env);
 
         Field(WebAssemblyModule *) m_module;
+        Field(Js::Var) m_exports;
     };
 
 } // namespace Js
diff --git a/lib/Runtime/Library/WebAssemblyMemory.cpp b/lib/Runtime/Library/WebAssemblyMemory.cpp
index 8f6300f..a086a9f 100644
--- a/lib/Runtime/Library/WebAssemblyMemory.cpp
+++ b/lib/Runtime/Library/WebAssemblyMemory.cpp
@@ -6,16 +6,19 @@
 #include "RuntimeLibraryPch.h"
 
 #ifdef ENABLE_WASM
+#include "WasmLimits.h"
 
 namespace Js
 {
 
-WebAssemblyMemory::WebAssemblyMemory(ArrayBuffer * buffer, uint32 initial, uint32 maximum, DynamicType * type) :
+WebAssemblyMemory::WebAssemblyMemory(WebAssemblyArrayBuffer* buffer, uint32 initial, uint32 maximum, DynamicType * type) :
     DynamicObject(type),
     m_buffer(buffer),
     m_initial(initial),
     m_maximum(maximum)
 {
+    Assert(m_buffer);
+    Assert(m_buffer->GetByteLength() >= UInt32Math::Mul<WebAssembly::PageSize>(initial));
 }
 
 /* static */
@@ -61,7 +64,7 @@
     Var initVar = JavascriptOperators::OP_GetProperty(memoryDescriptor, PropertyIds::initial, scriptContext);
     uint32 initial = WebAssembly::ToNonWrappingUint32(initVar, scriptContext);
 
-    uint32 maximum = UINT_MAX;
+    uint32 maximum = Wasm::Limits::GetMaxMemoryMaximumPages();
     if (JavascriptOperators::OP_HasProperty(memoryDescriptor, PropertyIds::maximum, scriptContext))
     {
         Var maxVar = JavascriptOperators::OP_GetProperty(memoryDescriptor, PropertyIds::maximum, scriptContext);
@@ -133,22 +136,21 @@
     const uint32 oldPageCount = oldBytes / WebAssembly::PageSize;
     Assert(oldBytes % WebAssembly::PageSize == 0);
 
-    if (deltaBytes == 0)
-    {
-        return (int32)oldPageCount;
-    }
-
     const uint32 newPageCount = oldPageCount + deltaPages;
     if (newPageCount > m_maximum)
     {
         return -1;
     }
 
-    ArrayBuffer * newBuffer = nullptr;
+    WebAssemblyArrayBuffer * newBuffer = nullptr;
     JavascriptExceptionObject* caughtExceptionObject = nullptr;
     try
     {
-        newBuffer = m_buffer->TransferInternal(newBytes);
+        newBuffer = m_buffer->GrowMemory(newBytes);
+        if (newBuffer == nullptr)
+        {
+            return -1;
+        }
     }
     catch (const JavascriptException& err)
     {
@@ -157,7 +159,6 @@
         return -1;
     }
 
-    Assert(newBuffer);
     m_buffer = newBuffer;
     CompileAssert(ArrayBuffer::MaxArrayBufferLength / WebAssembly::PageSize <= INT32_MAX);
     return (int32)oldPageCount;
@@ -192,22 +193,23 @@
 WebAssemblyMemory *
 WebAssemblyMemory::CreateMemoryObject(uint32 initial, uint32 maximum, ScriptContext * scriptContext)
 {
-    uint32 byteLength = UInt32Math::Mul<WebAssembly::PageSize>(initial);
-    ArrayBuffer* buffer;
-#if ENABLE_FAST_ARRAYBUFFER
-    if (CONFIG_FLAG(WasmFastArray))
+    if (initial > maximum || initial > Wasm::Limits::GetMaxMemoryInitialPages() || maximum > Wasm::Limits::GetMaxMemoryMaximumPages())
     {
-        buffer = scriptContext->GetLibrary()->CreateWebAssemblyArrayBuffer(byteLength);
+        JavascriptError::ThrowRangeError(scriptContext, JSERR_ArgumentOutOfRange);
     }
-    else
-#endif
+    // This shouldn't overflow since we checked in the module, but just to be safe
+    uint32 byteLength = UInt32Math::Mul<WebAssembly::PageSize>(initial);
+    WebAssemblyArrayBuffer* buffer = scriptContext->GetLibrary()->CreateWebAssemblyArrayBuffer(byteLength);
+    Assert(buffer);
+    if (byteLength > 0 && buffer->GetByteLength() == 0)
     {
-        buffer = scriptContext->GetLibrary()->CreateArrayBuffer(byteLength);
+        // Failed to allocate buffer
+        return nullptr;
     }
     return RecyclerNewFinalized(scriptContext->GetRecycler(), WebAssemblyMemory, buffer, initial, maximum, scriptContext->GetLibrary()->GetWebAssemblyMemoryType());
 }
 
-ArrayBuffer *
+WebAssemblyArrayBuffer*
 WebAssemblyMemory::GetBuffer() const
 {
     return m_buffer;
@@ -225,5 +227,11 @@
     return m_maximum;
 }
 
+uint
+WebAssemblyMemory::GetCurrentMemoryPages() const
+{
+    return m_buffer->GetByteLength() / WebAssembly::PageSize;
+}
+
 } // namespace Js
 #endif // ENABLE_WASM
diff --git a/lib/Runtime/Library/WebAssemblyMemory.h b/lib/Runtime/Library/WebAssemblyMemory.h
index 68252ba..2b7f46a 100644
--- a/lib/Runtime/Library/WebAssemblyMemory.h
+++ b/lib/Runtime/Library/WebAssemblyMemory.h
@@ -32,18 +32,19 @@
 
         static WebAssemblyMemory * CreateMemoryObject(uint32 initial, uint32 maximum, ScriptContext * scriptContext);
 
-        ArrayBuffer * GetBuffer() const;
+        WebAssemblyArrayBuffer * GetBuffer() const;
         uint GetInitialLength() const;
         uint GetMaximumLength() const;
+        uint GetCurrentMemoryPages() const;
 
         int32 GrowInternal(uint32 deltaPages);
         static int32 GrowHelper(Js::WebAssemblyMemory * memory, uint32 deltaPages);
 
         static int GetOffsetOfArrayBuffer() { return offsetof(WebAssemblyMemory, m_buffer); }
     private:
-        WebAssemblyMemory(ArrayBuffer * buffer, uint32 initial, uint32 maximum, DynamicType * type);
+        WebAssemblyMemory(WebAssemblyArrayBuffer * buffer, uint32 initial, uint32 maximum, DynamicType * type);
 
-        Field(ArrayBuffer *) m_buffer;
+        Field(WebAssemblyArrayBuffer *) m_buffer;
 
         Field(uint) m_initial;
         Field(uint) m_maximum;
diff --git a/lib/Runtime/Library/WebAssemblyModule.cpp b/lib/Runtime/Library/WebAssemblyModule.cpp
index 62b002c..5f8b68f 100644
--- a/lib/Runtime/Library/WebAssemblyModule.cpp
+++ b/lib/Runtime/Library/WebAssemblyModule.cpp
@@ -171,13 +171,10 @@
     {
         JavascriptError::ThrowTypeError(scriptContext, WASMERR_NeedModule);
     }
-    if (args.Info.Count < 3)
-    {
-        JavascriptError::ThrowTypeErrorVar(scriptContext, JSERR_NeedString, _u("sectionName"));
-    }
+    Var sectionNameVar = args.Info.Count > 2 ? args[2] : scriptContext->GetLibrary()->GetUndefined();
 
     WebAssemblyModule * module = WebAssemblyModule::FromVar(args[1]);
-    JavascriptString * sectionName = JavascriptConversion::ToString(args[2], scriptContext);
+    JavascriptString * sectionName = JavascriptConversion::ToString(sectionNameVar, scriptContext);
     const char16* sectionNameBuf = sectionName->GetString();
     charcount_t sectionNameLength = sectionName->GetLength();
 
@@ -344,7 +341,15 @@
 
     if (maxPage < minPage)
     {
-        throw Wasm::WasmCompilationException(_u("Memory: MaxPage (%d) must be greater than MinPage (%d)"), maxPage, minPage);
+        throw Wasm::WasmCompilationException(_u("Memory: MaxPage (%u) must be greater than MinPage (%u)"), maxPage, minPage);
+    }
+    auto minPageTooBig = [minPage] {
+        throw Wasm::WasmCompilationException(_u("Memory: Unable to allocate minimum pages (%u)"), minPage);
+    };
+    uint32 minBytes = UInt32Math::Mul<WebAssembly::PageSize>(minPage, minPageTooBig);
+    if (minBytes > ArrayBuffer::MaxArrayBufferLength)
+    {
+        minPageTooBig();
     }
     m_hasMemory = true;
     m_memoryInitSize = minPage;
@@ -478,7 +483,7 @@
         customReader->AddNode(nameNode);
     }
 
-    for (uint32 iParam = 0; iParam < signature->GetParamCount(); iParam++)
+    for (Js::ArgSlot iParam = 0; iParam < signature->GetParamCount(); iParam++)
     {
         Wasm::WasmNode node;
         node.op = Wasm::wbGetLocal;
@@ -596,7 +601,7 @@
     Wasm::WasmFunctionInfo* funcInfo = AddWasmFunctionInfo(signature);
     // Create the custom reader to generate the import thunk
     Wasm::WasmCustomReader* customReader = Anew(&m_alloc, Wasm::WasmCustomReader, &m_alloc);
-    for (uint32 iParam = 0; iParam < signature->GetParamCount(); iParam++)
+    for (uint32 iParam = 0; iParam < (uint32)signature->GetParamCount(); iParam++)
     {
         Wasm::WasmNode node;
         node.op = Wasm::wbGetLocal;
diff --git a/lib/Runtime/Library/WebAssemblyTable.cpp b/lib/Runtime/Library/WebAssemblyTable.cpp
index 304f7a5..c51e57f 100644
--- a/lib/Runtime/Library/WebAssemblyTable.cpp
+++ b/lib/Runtime/Library/WebAssemblyTable.cpp
@@ -6,6 +6,7 @@
 #include "RuntimeLibraryPch.h"
 
 #ifdef ENABLE_WASM
+#include "WasmLimits.h"
 
 namespace Js
 {
@@ -68,7 +69,7 @@
     Var initVar = JavascriptOperators::OP_GetProperty(tableDescriptor, PropertyIds::initial, scriptContext);
     uint32 initial = WebAssembly::ToNonWrappingUint32(initVar, scriptContext);
 
-    uint32 maximum = UINT_MAX;
+    uint32 maximum = Wasm::Limits::GetMaxTableSize();
     if (JavascriptOperators::OP_HasProperty(tableDescriptor, PropertyIds::maximum, scriptContext))
     {
         Var maxVar = JavascriptOperators::OP_GetProperty(tableDescriptor, PropertyIds::maximum, scriptContext);
@@ -117,20 +118,20 @@
         deltaVar = args[1];
     }
     uint32 delta = WebAssembly::ToNonWrappingUint32(deltaVar, scriptContext);
-    if ((uint64)table->m_currentLength + delta > (uint64)table->m_maxLength)
+    uint32 newLength = 0;
+    if (UInt32Math::Add(table->m_currentLength, delta, &newLength) || newLength > table->m_maxLength)
     {
         JavascriptError::ThrowRangeError(scriptContext, JSERR_ArgumentOutOfRange);
     }
-    CompileAssert(sizeof(table->m_maxLength) == sizeof(uint32));
 
-    uint32 newLength = table->m_currentLength + delta;
     Field(Var) * newValues = RecyclerNewArrayZ(scriptContext->GetRecycler(), Field(Var), newLength);
     CopyArray(newValues, newLength, table->m_values, table->m_currentLength);
 
+    uint32 oldLength = table->m_currentLength;
     table->m_values = newValues;
     table->m_currentLength = newLength;
 
-    return scriptContext->GetLibrary()->GetUndefined();
+    return JavascriptNumber::ToVar(oldLength, scriptContext);
 }
 
 Var
@@ -213,6 +214,10 @@
 WebAssemblyTable *
 WebAssemblyTable::Create(uint32 initial, uint32 maximum, ScriptContext * scriptContext)
 {
+    if (initial > maximum || initial > Wasm::Limits::GetMaxTableSize() || maximum > Wasm::Limits::GetMaxTableSize())
+    {
+        JavascriptError::ThrowRangeError(scriptContext, JSERR_ArgumentOutOfRange);
+    }
     Field(Var) * values = nullptr;
     if (initial > 0)
     {
diff --git a/lib/Runtime/Math/AsmJsMath.cpp b/lib/Runtime/Math/AsmJsMath.cpp
index 04f674e..2caee95 100644
--- a/lib/Runtime/Math/AsmJsMath.cpp
+++ b/lib/Runtime/Math/AsmJsMath.cpp
@@ -7,31 +7,81 @@
 namespace Js
 {
     // These implementations need to be compiled with /arch:sse2
-#define DivImpl(type, noinline) template<> noinline type AsmJsMath::Div(type aLeft, type aRight) { return aLeft / aRight; }
-#define MulImpl(type, noinline) template<> noinline type AsmJsMath::Mul(type aLeft, type aRight) { return aLeft * aRight; }
-#define DivMulImpl(type, noinline) DivImpl(type, noinline) MulImpl(type, noinline)
-
 #if _M_IX86
 #define DB_NOINLINE _NOINLINE
 #else
 #define DB_NOINLINE
 #endif
-    DivMulImpl(double, DB_NOINLINE)
-    DivMulImpl(float,)
-    DivMulImpl(int64,)
-    DivMulImpl(uint64,)
-    MulImpl(int32,)
-    MulImpl(uint32,)
 
+    // Double
+    template<> DB_NOINLINE double AsmJsMath::DivChecked<double>(double aLeft, double aRight) { return aLeft / aRight; }
+    template<> DB_NOINLINE double AsmJsMath::DivUnsafe<double>(double aLeft, double aRight) { return aLeft / aRight; }
+    template<> DB_NOINLINE double AsmJsMath::Mul<double>(double aLeft, double aRight) { return aLeft * aRight; }
+    template<> double AsmJsMath::RemChecked<double>(double aLeft, double aRight) { return NumberUtilities::Modulus(aLeft, aRight); }
+    template<> double AsmJsMath::RemUnsafe<double>(double aLeft, double aRight) { return NumberUtilities::Modulus(aLeft, aRight); }
+
+    // Float
+    template<> float AsmJsMath::DivChecked<float>(float aLeft, float aRight) { return aLeft / aRight; }
+    template<> float AsmJsMath::DivUnsafe<float>(float aLeft, float aRight) { return aLeft / aRight; }
+    template<> float AsmJsMath::Mul<float>(float aLeft, float aRight) { return aLeft * aRight; }
+
+    // Int32
+    template<> int32 AsmJsMath::Mul<int32>(int32 aLeft, int32 aRight) { return aLeft * aRight; }
+    template<> int32 AsmJsMath::DivUnsafe<int32>(int32 aLeft, int32 aRight) { return aLeft / aRight; }
     template<>
-    int32 AsmJsMath::Div<int32>(int32 aLeft, int32 aRight)
+    int32 AsmJsMath::DivChecked<int32>(int32 aLeft, int32 aRight)
     {
-        return aRight == 0 ? 0 : (aLeft == (1 << 31) && aRight == -1) ? aLeft : aLeft / aRight;
+        return aRight == 0 ? 0 : (aLeft == INT_MIN && aRight == -1) ? INT_MIN : aLeft / aRight;
+    }
+    template<> int32 AsmJsMath::RemUnsafe<int32>(int32 aLeft, int32 aRight) { return aLeft % aRight; }
+    template<>
+    int32 AsmJsMath::RemChecked<int32>(int32 aLeft, int32 aRight)
+    {
+        return ((aRight == 0) || (aLeft == INT_MIN && aRight == -1)) ? 0 : aLeft % aRight;
     }
 
+    // Unsigned Int32
+    template<> uint32 AsmJsMath::Mul<uint32>(uint32 aLeft, uint32 aRight) { return aLeft * aRight; }
+    template<> uint32 AsmJsMath::DivUnsafe<uint32>(uint32 aLeft, uint32 aRight) { return aLeft / aRight; }
     template<>
-    uint32 AsmJsMath::Div<uint32>(uint32 aLeft, uint32 aRight)
+    uint32 AsmJsMath::DivChecked<uint32>(uint32 aLeft, uint32 aRight)
     {
         return aRight == 0 ? 0 : aLeft / aRight;
     }
+    template<> uint32 AsmJsMath::RemUnsafe<uint32>(uint32 aLeft, uint32 aRight) { return aLeft % aRight; }
+    template<>
+    uint32 AsmJsMath::RemChecked<uint32>(uint32 aLeft, uint32 aRight)
+    {
+        return aRight == 0 ? 0 : (aLeft == INT_MIN && aRight == -1) ? INT_MIN : aLeft % aRight;
+    }
+
+    // Int64
+    template<> int64 AsmJsMath::Mul<int64>(int64 aLeft, int64 aRight) { return aLeft * aRight; }
+    template<> int64 AsmJsMath::DivUnsafe<int64>(int64 aLeft, int64 aRight) { return aLeft / aRight; }
+    template<>
+    int64 AsmJsMath::DivChecked<int64>(int64 aLeft, int64 aRight)
+    {
+        return aRight == 0 ? 0 : (aLeft == LONGLONG_MIN && aRight == -1) ? LONGLONG_MIN : aLeft / aRight;
+    }
+    template<> int64 AsmJsMath::RemUnsafe<int64>(int64 aLeft, int64 aRight) { return aLeft % aRight; }
+    template<>
+    int64 AsmJsMath::RemChecked<int64>(int64 aLeft, int64 aRight)
+    {
+        return ((aRight == 0) || (aLeft == LONGLONG_MIN && aRight == -1)) ? 0 : aLeft % aRight;
+    }
+
+    // Unsigned Int64
+    template<> uint64 AsmJsMath::Mul<uint64>(uint64 aLeft, uint64 aRight) { return aLeft * aRight; }
+    template<> uint64 AsmJsMath::DivUnsafe<uint64>(uint64 aLeft, uint64 aRight) { return aLeft / aRight; }
+    template<>
+    uint64 AsmJsMath::DivChecked<uint64>(uint64 aLeft, uint64 aRight)
+    {
+        return aRight == 0 ? 0 : aLeft / aRight;
+    }
+    template<> uint64 AsmJsMath::RemUnsafe<uint64>(uint64 aLeft, uint64 aRight) { return aLeft % aRight; }
+    template<>
+    uint64 AsmJsMath::RemChecked<uint64>(uint64 aLeft, uint64 aRight)
+    {
+        return aRight == 0 ? 0 : (aLeft == LONGLONG_MIN && aRight == -1) ? LONGLONG_MIN : aLeft % aRight;
+    }
 }
diff --git a/lib/Runtime/Math/AsmJsMath.h b/lib/Runtime/Math/AsmJsMath.h
index d3ad3f8..3b3b336 100644
--- a/lib/Runtime/Math/AsmJsMath.h
+++ b/lib/Runtime/Math/AsmJsMath.h
@@ -12,8 +12,10 @@
         template<typename T> static T Add( T aLeft, T aRight );
         template<typename T> static T Sub( T aLeft, T aRight );
         template<typename T> static T Mul( T aLeft, T aRight );
-        template<typename T> static T Div( T aLeft, T aRight );
-        template<typename T> static T Rem( T aLeft, T aRight );
+        template<typename T> static T DivUnsafe(T aLeft, T aRight);
+        template<typename T> static T DivChecked(T aLeft, T aRight);
+        template<typename T> static T RemUnsafe(T aLeft, T aRight);
+        template<typename T> static T RemChecked(T aLeft, T aRight);
         template<typename T> static T Min( T aLeft, T aRight );
         template<typename T> static T Max( T aLeft, T aRight );
         template<typename T> static T Abs( T aLeft );
diff --git a/lib/Runtime/Math/AsmJsMath.inl b/lib/Runtime/Math/AsmJsMath.inl
index bdd816c..d937777 100644
--- a/lib/Runtime/Math/AsmJsMath.inl
+++ b/lib/Runtime/Math/AsmJsMath.inl
@@ -105,30 +105,6 @@
     template<typename T> inline int AsmJsMath::CmpEq( T aLeft, T aRight ){return (int)(aLeft == aRight);}
     template<typename T> inline int AsmJsMath::CmpNe( T aLeft, T aRight ){return (int)(aLeft != aRight);}
 
-    template<typename T>
-    inline T AsmJsMath::Rem( T aLeft, T aRight )
-    {
-        return (aRight == 0) ? 0 : aLeft % aRight;
-    }
-
-    template<>
-    inline int AsmJsMath::Rem<int>( int aLeft, int aRight )
-    {
-        return ((aRight == 0) || (aLeft == INT_MIN && aRight == -1)) ? 0 : aLeft % aRight;
-    }
-
-    template<>
-    inline int64 AsmJsMath::Rem<int64>(int64 aLeft, int64 aRight)
-    {
-        return ((aRight == 0) || (aLeft == LONGLONG_MIN && aRight == -1)) ? 0 : aLeft % aRight;
-    }
-
-    template<>
-    inline double AsmJsMath::Rem<double>( double aLeft, double aRight )
-    {
-        return NumberUtilities::Modulus( aLeft, aRight );
-    }
-
     template<typename T> 
     inline T AsmJsMath::And( T aLeft, T aRight )
     {
diff --git a/lib/Runtime/Math/WasmMath.h b/lib/Runtime/Math/WasmMath.h
index 5e225a1..3c85e46 100644
--- a/lib/Runtime/Math/WasmMath.h
+++ b/lib/Runtime/Math/WasmMath.h
@@ -11,7 +11,6 @@
 {
 public:
     template<typename T> static int Eqz(T value);
-    template<typename T> static T Rem( T aLeft, T aRight );
     template<typename T> static T Shl( T aLeft, T aRight );
     template<typename T> static T Shr( T aLeft, T aRight );
     template<typename T> static T ShrU( T aLeft, T aRight );
diff --git a/lib/Runtime/Math/WasmMath.inl b/lib/Runtime/Math/WasmMath.inl
index e32c827..b55323b 100644
--- a/lib/Runtime/Math/WasmMath.inl
+++ b/lib/Runtime/Math/WasmMath.inl
@@ -6,20 +6,6 @@
 
 namespace Wasm
 {
-const uint64 specialDivLeftValue = (uint64)LONGLONG_MIN;
-
-template<>
-inline int64 WasmMath::Rem( int64 aLeft, int64 aRight )
-{
-    return (aLeft == specialDivLeftValue && aRight == -1) ? 0 : aLeft % aRight;
-}
-
-template<>
-inline uint64 WasmMath::Rem( uint64 aLeft, uint64 aRight )
-{
-    return (aLeft == specialDivLeftValue && aRight == -1) ? specialDivLeftValue : aLeft % aRight;
-}
-
 template<typename T> 
 inline T WasmMath::Shl( T aLeft, T aRight )
 {
diff --git a/lib/Runtime/PlatformAgnostic/Chakra.Runtime.PlatformAgnostic.vcxproj b/lib/Runtime/PlatformAgnostic/Chakra.Runtime.PlatformAgnostic.vcxproj
index e1c76d8..406870b 100644
--- a/lib/Runtime/PlatformAgnostic/Chakra.Runtime.PlatformAgnostic.vcxproj
+++ b/lib/Runtime/PlatformAgnostic/Chakra.Runtime.PlatformAgnostic.vcxproj
@@ -8,7 +8,6 @@
     <RootNamespace>JS</RootNamespace>
     <Keyword>Win32Proj</Keyword>
     <ProjectName>Chakra.Runtime.PlatformAgnostic</ProjectName>
-    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
   </PropertyGroup>
   <PropertyGroup Label="Configuration">
     <ConfigurationType>StaticLibrary</ConfigurationType>
@@ -48,11 +47,12 @@
     <ClCompile Include="$(MSBuildThisFileDirectory)Platform\Windows\NumbersUtility.cpp" />
     <ClCompile Include="$(MSBuildThisFileDirectory)Platform\Windows\SystemInfo.cpp" />
     <ClCompile Include="$(MSBuildThisFileDirectory)Platform\Windows\Thread.cpp" />
-
     <ClCompile Include="$(MSBuildThisFileDirectory)Platform\Common\UnicodeText.Common.cpp" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)Platform\Windows\EventTrace.cpp" />
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="ChakraPlatform.h" />
+    <ClInclude Include="EventTrace.h" />
     <ClInclude Include="RuntimePlatformAgnosticPch.h" />
     <ClInclude Include="UnicodeText.h" />
   </ItemGroup>
diff --git a/lib/Runtime/PlatformAgnostic/Chakra.Runtime.PlatformAgnostic.vcxproj.filters b/lib/Runtime/PlatformAgnostic/Chakra.Runtime.PlatformAgnostic.vcxproj.filters
index 2b8a04e..c1ac0c2 100644
--- a/lib/Runtime/PlatformAgnostic/Chakra.Runtime.PlatformAgnostic.vcxproj.filters
+++ b/lib/Runtime/PlatformAgnostic/Chakra.Runtime.PlatformAgnostic.vcxproj.filters
@@ -4,6 +4,9 @@
     <ClCompile Include="Platform\Windows\UnicodeText.cpp">
       <Filter>Platform\Windows</Filter>
     </ClCompile>
+    <ClCompile Include="Platform\Windows\EventTrace.cpp">
+      <Filter>Platform\Windows</Filter>
+    </ClCompile>
     <ClCompile Include="Platform\Windows\DaylightHelper.cpp">
       <Filter>Platform\Windows</Filter>
     </ClCompile>
@@ -39,5 +42,8 @@
     </ClInclude>
     <ClInclude Include="ChakraPlatform.h" />
     <ClInclude Include="RuntimePlatformAgnosticPch.h" />
+    <ClInclude Include="EventTrace.h">
+      <Filter>Interfaces</Filter>
+    </ClInclude>
   </ItemGroup>
 </Project>
\ No newline at end of file
diff --git a/lib/Runtime/PlatformAgnostic/ChakraPlatform.h b/lib/Runtime/PlatformAgnostic/ChakraPlatform.h
index 8c14a4b..1a356f8 100644
--- a/lib/Runtime/PlatformAgnostic/ChakraPlatform.h
+++ b/lib/Runtime/PlatformAgnostic/ChakraPlatform.h
@@ -5,6 +5,7 @@
 #pragma once
 
 #include "UnicodeText.h"
+#include "EventTrace.h"
 
 #include "PlatformAgnostic/DateTime.h"
 #include "PlatformAgnostic/AssemblyCommon.h"
diff --git a/test/es6/toPrimitiveJitBug654983.js b/lib/Runtime/PlatformAgnostic/EventTrace.h
similarity index 61%
rename from test/es6/toPrimitiveJitBug654983.js
rename to lib/Runtime/PlatformAgnostic/EventTrace.h
index 0ad8bb0..4543c11 100644
--- a/test/es6/toPrimitiveJitBug654983.js
+++ b/lib/Runtime/PlatformAgnostic/EventTrace.h
@@ -1,24 +1,15 @@
-//-------------------------------------------------------------------------------------------------------

-// Copyright (C) Microsoft. All rights reserved.

-// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.

-//-------------------------------------------------------------------------------------------------------

-

-var c = 1;

-function foo(hint) {

-   return c;

-}

-var a = {};

-a[Symbol.toPrimitive] = foo;

-

-function foobar()

-{

-    var b = 0;

-    for(i = 0; i < 1000; i++)

-    {

-        b +=a;

-    }

-}

-foobar();

-c = {valueOf() { return 0}}

-foobar();

-WScript.Echo("PASS");
\ No newline at end of file
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+#pragma once
+
+#include "Core/CommonTypedefs.h"
+
+namespace PlatformAgnostic
+{
+    namespace EventTrace
+    {
+        void FireGenericEventTrace(const void* traceData);
+    }
+}
\ No newline at end of file
diff --git a/lib/Runtime/PlatformAgnostic/Platform/CMakeLists.txt b/lib/Runtime/PlatformAgnostic/Platform/CMakeLists.txt
index db0488d..8071963 100644
--- a/lib/Runtime/PlatformAgnostic/Platform/CMakeLists.txt
+++ b/lib/Runtime/PlatformAgnostic/Platform/CMakeLists.txt
@@ -3,6 +3,7 @@
 set(PL_SOURCE_FILES
   Common/UnicodeText.Common.cpp
   Common/HiResTimer.cpp
+  Linux/EventTrace.cpp
   Linux/UnicodeText.ICU.cpp
   Linux/NumbersUtility.cpp
   Linux/Thread.cpp
diff --git a/lib/Runtime/PlatformAgnostic/Platform/Linux/EventTrace.cpp b/lib/Runtime/PlatformAgnostic/Platform/Linux/EventTrace.cpp
new file mode 100644
index 0000000..01007a3
--- /dev/null
+++ b/lib/Runtime/PlatformAgnostic/Platform/Linux/EventTrace.cpp
@@ -0,0 +1,18 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+#include "RuntimePlatformAgnosticPch.h"
+#include "CommonPal.h"
+
+namespace PlatformAgnostic
+{
+    namespace EventTrace
+    {
+        void FireGenericEventTrace(const void* /*traceData*/)
+        {
+            // TODO: Implement this on Linux
+        }
+    } // namespace EventTrace
+} // namespace PlatformAgnostic
diff --git a/lib/Runtime/PlatformAgnostic/Platform/Windows/EventTrace.cpp b/lib/Runtime/PlatformAgnostic/Platform/Windows/EventTrace.cpp
new file mode 100644
index 0000000..aaf195c
--- /dev/null
+++ b/lib/Runtime/PlatformAgnostic/Platform/Windows/EventTrace.cpp
@@ -0,0 +1,19 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+#include "RuntimePlatformAgnosticPch.h"
+#include "Common.h"
+#include "ChakraPlatform.h"
+
+namespace PlatformAgnostic
+{
+    namespace EventTrace
+    {
+        void FireGenericEventTrace(const void* traceData)
+        {
+            JS_ETW(EventWriteJSCRIPT_INTERNAL_GENERIC_EVENT(static_cast<const char16*>(traceData)));
+        }
+    }
+}
\ No newline at end of file
diff --git a/lib/Runtime/Runtime.h b/lib/Runtime/Runtime.h
index 1cc4c33..59f5060 100644
--- a/lib/Runtime/Runtime.h
+++ b/lib/Runtime/Runtime.h
@@ -547,6 +547,10 @@
 
 #include "../WasmReader/WasmReader.h"
 
+#include "Language/AsmJsTypes.h"
+#include "Language/AsmJsModule.h"
+#include "Language/AsmJs.h"
+
 //
 // .inl files
 //
diff --git a/lib/Runtime/Types/ActivationObject.h b/lib/Runtime/Types/ActivationObject.h
index bbe3f31..c27b188 100644
--- a/lib/Runtime/Types/ActivationObject.h
+++ b/lib/Runtime/Types/ActivationObject.h
@@ -116,7 +116,8 @@
 
         static bool Is(void* instance)
         {
-            return VirtualTableInfo<Js::ConsoleScopeActivationObject>::HasVirtualTable(instance);
+            return VirtualTableInfo<ConsoleScopeActivationObject>::HasVirtualTable(instance)
+                || VirtualTableInfo<CrossSiteObject<ConsoleScopeActivationObject>>::HasVirtualTable(instance);
         }
 
 #if ENABLE_TTD
diff --git a/lib/Runtime/Types/DictionaryPropertyDescriptor.h b/lib/Runtime/Types/DictionaryPropertyDescriptor.h
index f72f174..58e3938 100644
--- a/lib/Runtime/Types/DictionaryPropertyDescriptor.h
+++ b/lib/Runtime/Types/DictionaryPropertyDescriptor.h
@@ -154,6 +154,10 @@
         if (this->IsAccessor)
         {
             Assert(this->Data == NoSlots);
+            if (addingLetConstGlobal)
+            {
+                this->Data = nextPropertyIndex++;
+            }
         }
         else if (addingLetConstGlobal)
         {
@@ -165,7 +169,7 @@
             this->Getter = nextPropertyIndex++;
         }
         this->Attributes |= PropertyLetConstGlobal;
-        Assert(GetDataPropertyIndex<false>() != NoSlots);
+        Assert((addingLetConstGlobal ? GetDataPropertyIndex<true>() : GetDataPropertyIndex<false>()) != NoSlots);
     }
 
     template <typename TPropertyIndex>
diff --git a/lib/Runtime/Types/SimpleDictionaryTypeHandler.cpp b/lib/Runtime/Types/SimpleDictionaryTypeHandler.cpp
index d70ea64..f9cc809 100644
--- a/lib/Runtime/Types/SimpleDictionaryTypeHandler.cpp
+++ b/lib/Runtime/Types/SimpleDictionaryTypeHandler.cpp
@@ -563,7 +563,7 @@
 
         if(isUnordered)
         {
-            newTypeHandler->CopyUnorderedStateFrom(*AsUnordered());
+            newTypeHandler->CopyUnorderedStateFrom(*AsUnordered(), instance);
         }
         else
         {
@@ -2658,6 +2658,7 @@
                 ->AddProperty(instance, propertyKey, value, attributes, info, flags, possibleSideEffects);
         }
 
+        // CONSIDER: Do this after TryReuseDeletedPropertyIndex. If we can reuse slots, no need to grow right now.
         if (this->GetSlotCapacity() <= nextPropertyIndex)
         {
             if (this->GetSlotCapacity() >= MaxPropertyIndexSize)
diff --git a/lib/Runtime/Types/SimpleDictionaryUnorderedTypeHandler.h b/lib/Runtime/Types/SimpleDictionaryUnorderedTypeHandler.h
index 3a33587..9a384cf 100644
--- a/lib/Runtime/Types/SimpleDictionaryUnorderedTypeHandler.h
+++ b/lib/Runtime/Types/SimpleDictionaryUnorderedTypeHandler.h
@@ -43,12 +43,30 @@
 
     private:
         template<class OtherTPropertyIndex, class OtherTMapKey, bool OtherIsNotExtensibleSupported>
-        void CopyUnorderedStateFrom(const SimpleDictionaryUnorderedTypeHandler<OtherTPropertyIndex, OtherTMapKey, OtherIsNotExtensibleSupported> &other)
+        void CopyUnorderedStateFrom(const SimpleDictionaryUnorderedTypeHandler<OtherTPropertyIndex, OtherTMapKey, OtherIsNotExtensibleSupported> &other,
+            DynamicObject *const object)
         {
             CompileAssert(sizeof(TPropertyIndex) >= sizeof(OtherTPropertyIndex));
             if (other.deletedPropertyIndex != PropertyIndexRanges<OtherTPropertyIndex>::NoSlots)
             {
                 deletedPropertyIndex = other.deletedPropertyIndex;
+
+                // If terminator values are different, walk to end of chain and update terminator value
+                if ((int)PropertyIndexRanges<TPropertyIndex>::NoSlots != (int)PropertyIndexRanges<OtherTPropertyIndex>::NoSlots)
+                {
+                    OtherTPropertyIndex cur = other.deletedPropertyIndex;
+                    for (;;)
+                    {
+                        OtherTPropertyIndex next = static_cast<OtherTPropertyIndex>(TaggedInt::ToInt32(object->GetSlot(cur)));
+                        if (next == PropertyIndexRanges<OtherTPropertyIndex>::NoSlots)
+                        {
+                            this->SetSlotUnchecked(object, cur, TaggedInt::ToVarUnchecked(PropertyIndexRanges<TPropertyIndex>::NoSlots));
+                            break;
+                        }
+
+                        cur = next;
+                    }
+                }
             }
         }
 
diff --git a/lib/WasmReader/Chakra.WasmReader.vcxproj b/lib/WasmReader/Chakra.WasmReader.vcxproj
index 039e222..359d813 100644
--- a/lib/WasmReader/Chakra.WasmReader.vcxproj
+++ b/lib/WasmReader/Chakra.WasmReader.vcxproj
@@ -57,6 +57,7 @@
     <ClInclude Include="WasmDataSegment.h" />
     <ClInclude Include="WasmElementSegment.h" />
     <ClInclude Include="WasmFunctionInfo.h" />
+    <ClInclude Include="WasmLimits.h" />
     <ClInclude Include="WasmReader.h" />
     <ClInclude Include="WasmReaderBase.h" />
     <ClInclude Include="WasmReaderPch.h" />
diff --git a/lib/WasmReader/Chakra.WasmReader.vcxproj.filters b/lib/WasmReader/Chakra.WasmReader.vcxproj.filters
index 49d25b6..038a57c 100644
--- a/lib/WasmReader/Chakra.WasmReader.vcxproj.filters
+++ b/lib/WasmReader/Chakra.WasmReader.vcxproj.filters
@@ -17,6 +17,7 @@
     <ClInclude Include="WasmReaderBase.h" />
     <ClInclude Include="WasmCustomReader.h" />
     <ClInclude Include="EmptyWasmByteCodeWriter.h" />
+    <ClInclude Include="WasmLimits.h" />
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="$(MSBuildThisFileDirectory)WasmBytecodeGenerator.cpp" />
diff --git a/lib/WasmReader/EmptyWasmByteCodeWriter.h b/lib/WasmReader/EmptyWasmByteCodeWriter.h
index 359f297..d3badce 100644
--- a/lib/WasmReader/EmptyWasmByteCodeWriter.h
+++ b/lib/WasmReader/EmptyWasmByteCodeWriter.h
@@ -32,8 +32,8 @@
         virtual void AsmBrReg1(OpCodeAsmJs op, ByteCodeLabel labelID, RegSlot R1) override {}
         virtual void AsmBrReg1Const1(OpCodeAsmJs op, ByteCodeLabel labelID, RegSlot R1, int C1) override {}
         virtual void WasmMemAccess(OpCodeAsmJs op, RegSlot value, uint32 slotIndex, uint32 offset, ArrayBufferView::ViewType viewType) override {}
-        virtual uint EnterLoop(ByteCodeLabel loopEntrance) override {return 0;}
-        virtual void ExitLoop(uint loopId) override {}
+        virtual uint32 EnterLoop(ByteCodeLabel loopEntrance) override {return 0;}
+        virtual void ExitLoop(uint32 loopId) override {}
         virtual void AsmStartCall(OpCodeAsmJs op, ArgSlot ArgCount, bool isPatching = false) override {}
         virtual void AsmCall(OpCodeAsmJs op, RegSlot returnValueRegister, RegSlot functionRegister, ArgSlot givenArgCount, AsmJsRetType retType) override {}
     };
diff --git a/lib/WasmReader/WasmBinaryOpCodes.h b/lib/WasmReader/WasmBinaryOpCodes.h
index f5e4053..a70e336 100755
--- a/lib/WasmReader/WasmBinaryOpCodes.h
+++ b/lib/WasmReader/WasmBinaryOpCodes.h
@@ -199,10 +199,10 @@
 WASM_BINARY_OPCODE(I32Add,            0x6a, I_II, Add_Int        , false)
 WASM_BINARY_OPCODE(I32Sub,            0x6b, I_II, Sub_Int        , false)
 WASM_BINARY_OPCODE(I32Mul,            0x6c, I_II, Mul_Int        , false)
-WASM_BINARY_OPCODE(I32DivS,           0x6d, I_II, Div_Check_Int  , false)
-WASM_BINARY_OPCODE(I32DivU,           0x6e, I_II, Div_Check_UInt , false)
-WASM_BINARY_OPCODE(I32RemS,           0x6f, I_II, Rem_Check_Int  , false)
-WASM_BINARY_OPCODE(I32RemU,           0x70, I_II, Rem_Check_UInt , false)
+WASM_BINARY_OPCODE(I32DivS,           0x6d, I_II, Div_Trap_Int   , false)
+WASM_BINARY_OPCODE(I32DivU,           0x6e, I_II, Div_Trap_UInt  , false)
+WASM_BINARY_OPCODE(I32RemS,           0x6f, I_II, Rem_Trap_Int   , false)
+WASM_BINARY_OPCODE(I32RemU,           0x70, I_II, Rem_Trap_UInt  , false)
 WASM_BINARY_OPCODE(I32And,            0x71, I_II, And_Int        , false)
 WASM_BINARY_OPCODE(I32Or,             0x72, I_II, Or_Int         , false)
 WASM_BINARY_OPCODE(I32Xor,            0x73, I_II, Xor_Int        , false)
@@ -218,10 +218,10 @@
 WASM_BINARY_OPCODE(I64Add,            0x7c, L_LL, Add_Long       , false)
 WASM_BINARY_OPCODE(I64Sub,            0x7d, L_LL, Sub_Long       , false)
 WASM_BINARY_OPCODE(I64Mul,            0x7e, L_LL, Mul_Long       , false)
-WASM_BINARY_OPCODE(I64DivS,           0x7f, L_LL, Div_Long       , false)
-WASM_BINARY_OPCODE(I64DivU,           0x80, L_LL, Div_ULong      , false)
-WASM_BINARY_OPCODE(I64RemS,           0x81, L_LL, Rem_Long       , false)
-WASM_BINARY_OPCODE(I64RemU,           0x82, L_LL, Rem_ULong      , false)
+WASM_BINARY_OPCODE(I64DivS,           0x7f, L_LL, Div_Trap_Long  , false)
+WASM_BINARY_OPCODE(I64DivU,           0x80, L_LL, Div_Trap_ULong , false)
+WASM_BINARY_OPCODE(I64RemS,           0x81, L_LL, Rem_Trap_Long  , false)
+WASM_BINARY_OPCODE(I64RemU,           0x82, L_LL, Rem_Trap_ULong , false)
 WASM_BINARY_OPCODE(I64And,            0x83, L_LL, And_Long       , false)
 WASM_BINARY_OPCODE(I64Or,             0x84, L_LL, Or_Long        , false)
 WASM_BINARY_OPCODE(I64Xor,            0x85, L_LL, Xor_Long       , false)
diff --git a/lib/WasmReader/WasmBinaryReader.cpp b/lib/WasmReader/WasmBinaryReader.cpp
index 3f5a855..77e496b 100644
--- a/lib/WasmReader/WasmBinaryReader.cpp
+++ b/lib/WasmReader/WasmBinaryReader.cpp
@@ -6,6 +6,7 @@
 #include "WasmReaderPch.h"
 
 #ifdef ENABLE_WASM
+#include "WasmLimits.h"
 #if ENABLE_DEBUG_CONFIG_OPTIONS
 #include "Codex/Utf8Helper.h"
 #endif
@@ -18,7 +19,7 @@
 bool IsLocalType(WasmTypes::WasmType type)
 {
     // Check if type in range ]Void,Limit[
-    return (uint)(type - 1) < (WasmTypes::Limit - 1);
+    return (uint32)(type - 1) < (WasmTypes::Limit - 1);
 }
 
 uint32 GetTypeByteSize(WasmType type)
@@ -35,10 +36,35 @@
     }
 }
 
+const char16 * GetTypeName(WasmType type)
+{
+    const char16* typestring = _u("unknown");
+    switch (type) {
+    case WasmTypes::WasmType::Void:
+        typestring = _u("void");
+        break;
+    case WasmTypes::WasmType::I32:
+        typestring = _u("i32");
+        break;
+    case WasmTypes::WasmType::I64:
+        typestring = _u("i64");
+        break;
+    case WasmTypes::WasmType::F32:
+        typestring = _u("f32");
+        break;
+    case WasmTypes::WasmType::F64:
+        typestring = _u("f64");
+        break;
+    default:
+        Assert(false);
+        break;
+    }
+    return typestring;
+}
+
 } // namespace WasmTypes
 
-WasmTypes::WasmType 
-LanguageTypes::ToWasmType(int8 binType)
+WasmTypes::WasmType LanguageTypes::ToWasmType(int8 binType)
 {
     switch (binType)
     {
@@ -51,13 +77,12 @@
     }
 }
 
-bool
-FunctionIndexTypes::CanBeExported(FunctionIndexTypes::Type funcType)
+bool FunctionIndexTypes::CanBeExported(FunctionIndexTypes::Type funcType)
 {
     return funcType == FunctionIndexTypes::Function || funcType == FunctionIndexTypes::ImportThunk;
 }
 
-WasmBinaryReader::WasmBinaryReader(ArenaAllocator* alloc, Js::WebAssemblyModule * module, const byte* source, size_t length) :
+WasmBinaryReader::WasmBinaryReader(ArenaAllocator* alloc, Js::WebAssemblyModule* module, const byte* source, size_t length) :
     m_module(module),
     m_curFuncEnd(nullptr),
     m_alloc(alloc),
@@ -77,16 +102,14 @@
     m_readerState = READER_STATE_UNKNOWN;
 }
 
-void
-WasmBinaryReader::ThrowDecodingError(const char16* msg, ...)
+void WasmBinaryReader::ThrowDecodingError(const char16* msg, ...)
 {
     va_list argptr;
     va_start(argptr, msg);
     throw WasmCompilationException(msg, argptr);
 }
 
-SectionHeader
-WasmBinaryReader::ReadNextSection()
+SectionHeader WasmBinaryReader::ReadNextSection()
 {
     while (true)
     {
@@ -110,8 +133,7 @@
     }
 }
 
-bool
-WasmBinaryReader::ProcessCurrentSection()
+bool WasmBinaryReader::ProcessCurrentSection()
 {
     Assert(m_currentSection.code != bSectLimit);
     TRACE_WASM_SECTION(_u("Process section %s"), SectionInfo::All[m_currentSection.code].name);
@@ -122,38 +144,38 @@
     case bSectMemory:
         ReadMemorySection(false);
         break;
-    case bSectSignatures:
-        ReadSignatures();
+    case bSectType:
+        ReadSignatureTypeSection();
         break;
-    case bSectImportTable:
-        ReadImportEntries();
+    case bSectImport:
+        ReadImportSection();
         break;
-    case bSectFunctionSignatures:
-        ReadFunctionsSignatures();
+    case bSectFunction:
+        ReadFunctionSignatures();
         break;
     case bSectFunctionBodies:
         ReadFunctionHeaders();
         break;
-    case bSectExportTable:
-        ReadExportTable();
+    case bSectExport:
+        ReadExportSection();
         break;
     case bSectStartFunction:
         ReadStartFunction();
         break;
-    case bSectDataSegments:
-        ReadDataSegments();
+    case bSectData:
+        ReadDataSection();
         break;
-    case bSectIndirectFunctionTable:
+    case bSectTable:
         ReadTableSection(false);
         break;
     case bSectElement:
         ReadElementSection();
         break;
-    case bSectNames:
-        ReadNamesSection();
+    case bSectName:
+        ReadNameSection();
         break;
     case bSectGlobal:
-        ReadGlobalsSection();
+        ReadGlobalSection();
         break;
     case bSectCustom:
         ReadCustomSection();
@@ -169,14 +191,13 @@
     return m_pc == m_currentSection.end;
 }
 
-SectionHeader
-WasmBinaryReader::ReadSectionHeader()
+SectionHeader WasmBinaryReader::ReadSectionHeader()
 {
     SectionHeader header;
     header.start = m_pc;
     header.code = bSectLimit;
 
-    UINT len = 0;
+    uint32 len = 0;
     CompileAssert(sizeof(SectionCode) == sizeof(uint8));
     SectionCode sectionId = (SectionCode)ReadVarUInt7();
 
@@ -185,7 +206,7 @@
         ThrowDecodingError(_u("Invalid known section opcode %u"), sectionId);
     }
 
-    UINT32 sectionSize = LEB128(len);
+    uint32 sectionSize = LEB128(len);
     header.end = m_pc + sectionSize;
     CheckBytesLeft(sectionSize);
 
@@ -205,15 +226,14 @@
 }
 
 #if DBG_DUMP
-void
-WasmBinaryReader::PrintOps()
+void WasmBinaryReader::PrintOps()
 {
     int count = m_ops->Count();
     if (count == 0)
     {
         return;
     }
-    WasmOp * ops = HeapNewArray(WasmOp, count);
+    WasmOp* ops = HeapNewArray(WasmOp, count);
 
     auto iter = m_ops->GetIterator();
     int i = 0;
@@ -251,8 +271,7 @@
 
 #endif
 
-void
-WasmBinaryReader::ReadFunctionHeaders()
+void WasmBinaryReader::ReadFunctionHeaders()
 {
     uint32 len;
     uint32 entries = LEB128(len);
@@ -269,6 +288,10 @@
         WasmFunctionInfo* funcInfo = m_module->GetWasmFunctionInfo(funcIndex);
 
         const uint32 funcSize = LEB128(len);
+        if (funcSize > Limits::GetMaxFunctionSize())
+        {
+            ThrowDecodingError(_u("Function body too big"));
+        }
         funcInfo->m_readerInfo.size = funcSize;
         funcInfo->m_readerInfo.startOffset = (m_pc - m_start);
         CheckBytesLeft(funcSize);
@@ -298,32 +321,29 @@
     CheckBytesLeft(readerInfo.size);
     m_curFuncEnd = m_pc + m_funcState.size;
 
-    uint32 len = 0;
-    uint32 entryCount = LEB128(len);
-    m_funcState.count += len;
+    uint32 length = 0;
+    uint32 numLocalsEntries = LEB128(length);
+    m_funcState.count += length;
 
     // locals
-    for (uint32 j = 0; j < entryCount; j++)
+    for (uint32 j = 0; j < numLocalsEntries; j++)
     {
-        uint32 count = LEB128(len);
-        m_funcState.count += len;
-        WasmTypes::WasmType type = ReadWasmType(len);
+        uint32 numLocals = LEB128(length);
+        m_funcState.count += length;
+        WasmTypes::WasmType type = ReadWasmType(length);
         if (!WasmTypes::IsLocalType(type))
         {
             ThrowDecodingError(_u("Invalid local type"));
         }
-        m_funcState.count += len;
-        funcInfo->AddLocal(type, count);
-        switch (type)
+        m_funcState.count += length;
+
+        uint32 totalLocals = 0;
+        if (UInt32Math::Add(funcInfo->GetLocalCount(), numLocals, &totalLocals) || totalLocals > Limits::GetMaxFunctionLocals())
         {
-        case WasmTypes::I32: TRACE_WASM_DECODER(_u("Local: type = I32, count = %u"), count); break;
-        case WasmTypes::I64: TRACE_WASM_DECODER(_u("Local: type = I64, count = %u"), count); break;
-        case WasmTypes::F32: TRACE_WASM_DECODER(_u("Local: type = F32, count = %u"), count); break;
-        case WasmTypes::F64: TRACE_WASM_DECODER(_u("Local: type = F64, count = %u"), count); break;
-            break;
-        default:
-            break;
+            ThrowDecodingError(_u("Too many locals"));
         }
+        funcInfo->AddLocal(type, numLocals);
+        TRACE_WASM_DECODER(_u("Local: type = %s, count = %u"), WasmTypes::GetTypeName(type), numLocals);
     }
 }
 
@@ -337,8 +357,7 @@
     return m_pc == m_curFuncEnd;
 }
 
-WasmOp
-WasmBinaryReader::ReadExpr()
+WasmOp WasmBinaryReader::ReadExpr()
 {
     WasmOp op = m_currentNode.op = (WasmOp)*m_pc++;
     ++m_funcState.count;
@@ -423,11 +442,16 @@
     return op;
 }
 
-void
-WasmBinaryReader::ValidateModuleHeader()
+void WasmBinaryReader::ValidateModuleHeader()
 {
-    uint32 magicNumber = ReadConst<UINT32>();
-    uint32 version = ReadConst<UINT32>();
+    uint32 bytesLeft = (uint32)(m_end - m_pc);
+    if (bytesLeft > Limits::GetMaxModuleSize())
+    {
+        ThrowDecodingError(_u("Module too big"));
+    }
+
+    uint32 magicNumber = ReadConst<uint32>();
+    uint32 version = ReadConst<uint32>();
     TRACE_WASM_DECODER(_u("Module Header: Magic 0x%x, Version %u"), magicNumber, version);
     if (magicNumber != 0x6d736100)
     {
@@ -448,12 +472,11 @@
     }
 }
 
-void
-WasmBinaryReader::CallNode()
+void WasmBinaryReader::CallNode()
 {
-    UINT length = 0;
+    uint32 length = 0;
 
-    UINT32 funcNum = LEB128(length);
+    uint32 funcNum = LEB128(length);
     m_funcState.count += length;
     FunctionIndexTypes::Type funcType = m_module->GetFunctionIndexType(funcNum);
     if (funcType == FunctionIndexTypes::Invalid)
@@ -464,12 +487,11 @@
     m_currentNode.call.num = funcNum;
 }
 
-void
-WasmBinaryReader::CallIndirectNode()
+void WasmBinaryReader::CallIndirectNode()
 {
-    UINT length = 0;
+    uint32 length = 0;
 
-    UINT32 funcNum = LEB128(length);
+    uint32 funcNum = LEB128(length);
     // Reserved value currently unused
     ReadConst<uint8>();
     if (!m_module->HasTable() && !m_module->HasTableImport())
@@ -494,23 +516,25 @@
 }
 
 // control flow
-void
-WasmBinaryReader::BrNode()
+void WasmBinaryReader::BrNode()
 {
-    UINT len = 0;
+    uint32 len = 0;
     m_currentNode.br.depth = LEB128(len);
     m_funcState.count += len;
 }
 
-void
-WasmBinaryReader::BrTableNode()
+void WasmBinaryReader::BrTableNode()
 {
-    UINT len = 0;
+    uint32 len = 0;
     m_currentNode.brTable.numTargets = LEB128(len);
+    if (m_currentNode.brTable.numTargets > Limits::GetMaxBrTableElems())
+    {
+        ThrowDecodingError(_u("br_table too big"));
+    }
     m_funcState.count += len;
-    m_currentNode.brTable.targetTable = AnewArray(m_alloc, UINT32, m_currentNode.brTable.numTargets);
+    m_currentNode.brTable.targetTable = AnewArray(m_alloc, uint32, m_currentNode.brTable.numTargets);
 
-    for (UINT32 i = 0; i < m_currentNode.brTable.numTargets; i++)
+    for (uint32 i = 0; i < m_currentNode.brTable.numTargets; i++)
     {
         m_currentNode.brTable.targetTable[i] = LEB128(len);
         m_funcState.count += len;
@@ -519,10 +543,9 @@
     m_funcState.count += len;
 }
 
-void
-WasmBinaryReader::MemNode()
+void WasmBinaryReader::MemNode()
 {
-    uint len = 0;
+    uint32 len = 0;
 
     // flags
     const uint32 flags = LEB128(len);
@@ -534,10 +557,9 @@
 }
 
 // Locals/Globals
-void
-WasmBinaryReader::VarNode()
+void WasmBinaryReader::VarNode()
 {
-    UINT length;
+    uint32 length;
     m_currentNode.var.num = LEB128(length);
     m_funcState.count += length;
 }
@@ -546,7 +568,7 @@
 template <WasmTypes::WasmType localType>
 void WasmBinaryReader::ConstNode()
 {
-    UINT len = 0;
+    uint32 len = 0;
     switch (localType)
     {
     case WasmTypes::I32:
@@ -554,7 +576,7 @@
         m_funcState.count += len;
         break;
     case WasmTypes::I64:
-        m_currentNode.cnst.i64 = SLEB128<INT64>(len);
+        m_currentNode.cnst.i64 = SLEB128<int64>(len);
         m_funcState.count += len;
         break;
     case WasmTypes::F32:
@@ -568,24 +590,20 @@
     }
 }
 
-bool
-WasmBinaryReader::EndOfFunc()
+bool WasmBinaryReader::EndOfFunc()
 {
     return m_funcState.count >= m_funcState.size;
 }
 
-bool
-WasmBinaryReader::EndOfModule()
+bool WasmBinaryReader::EndOfModule()
 {
     return (m_pc >= m_end);
 }
 
-// readers
-void
-WasmBinaryReader::ReadMemorySection(bool isImportSection)
+void WasmBinaryReader::ReadMemorySection(bool isImportSection)
 {
-    UINT length = 0;
-    UINT32 count;
+    uint32 length = 0;
+    uint32 count;
     if (isImportSection)
     {
         count = 1;
@@ -601,73 +619,73 @@
 
     if (count == 1)
     {
-        uint32 flags = LEB128(length);
-        uint32 minPage = LEB128(length);
-        if (minPage > 65536)
-        {
-            throw Wasm::WasmCompilationException(_u("Memory size must be at most 65536 pages (4GiB)"));
-        }
-        uint32 maxPage = UINT32_MAX;
-        if (flags & 0x1)
-        {
-            maxPage = LEB128(length);
-            if (maxPage > 65536)
-            {
-                throw Wasm::WasmCompilationException(_u("Memory size must be at most 65536 pages (4GiB)"));
-            }
-        }
-        m_module->InitializeMemory(minPage, maxPage);
+        SectionLimits limits = ReadSectionLimits(Limits::GetMaxMemoryInitialPages(), Limits::GetMaxMemoryMaximumPages(), _u("memory size too big"));
+        m_module->InitializeMemory(limits.initial, limits.maximum);
     }
 }
 
-void
-WasmBinaryReader::ReadSignatures()
+void WasmBinaryReader::ReadSignatureTypeSection()
 {
-    UINT len = 0;
-    const uint32 count = LEB128(len);
-    m_module->SetSignatureCount(count);
+    uint32 len = 0;
+    const uint32 numTypes = LEB128(len);
+    if (numTypes > Limits::GetMaxTypes())
+    {
+        ThrowDecodingError(_u("Too many signatures"));
+    }
+
+    m_module->SetSignatureCount(numTypes);
     // signatures table
-    for (UINT32 i = 0; i < count; i++)
+    for (uint32 i = 0; i < numTypes; i++)
     {
         TRACE_WASM_DECODER(_u("Signature #%u"), i);
 
-        WasmSignature * sig = m_module->GetSignature(i);
+        WasmSignature* sig = m_module->GetSignature(i);
         sig->SetSignatureId(i);
         int8 form = ReadConst<int8>();
         if (form != LanguageTypes::func)
         {
             ThrowDecodingError(_u("Unexpected type form 0x%X"), form);
         }
-        UINT32 paramCount = LEB128(len);
-        WasmTypes::WasmType type;
-        sig->AllocateParams(paramCount, m_module->GetRecycler());
 
-        for (UINT32 j = 0; j < paramCount; j++)
+        uint32 paramCount32 = LEB128(len);
+        if (paramCount32 > Limits::GetMaxFunctionParams() || paramCount32 > UINT16_MAX)
         {
-            type = ReadWasmType(len);
+            ThrowDecodingError(_u("Too many arguments in signature"));
+        }
+
+        Js::ArgSlot paramCount = (Js::ArgSlot)paramCount32;
+        sig->AllocateParams(paramCount, m_module->GetRecycler());
+        for (Js::ArgSlot j = 0; j < paramCount; j++)
+        {
+            WasmTypes::WasmType type = ReadWasmType(len);
             sig->SetParam(type, j);
         }
 
-        UINT32 resultCount = LEB128(len);
-        if (resultCount != 0 && resultCount != 1)
+        uint32 resultCount = LEB128(len);
+        if (resultCount > 1)
         {
-            ThrowDecodingError(_u("Unexpected result count %u"), resultCount);
+            ThrowDecodingError(_u("Too many returns in signature: %u. Maximum allowed: 1"), resultCount);
         }
         if (resultCount == 1)
         {
-            type = ReadWasmType(len);
+            WasmTypes::WasmType type = ReadWasmType(len);
             sig->SetResultType(type);
         }
         sig->FinalizeSignature();
     }
 }
 
-void
-WasmBinaryReader::ReadFunctionsSignatures()
+void WasmBinaryReader::ReadFunctionSignatures()
 {
-    UINT len = 0;
+    uint32 len = 0;
     uint32 nFunctions = LEB128(len);
 
+    uint32 totalFunctions = 0;
+    if (UInt32Math::Add(nFunctions, m_module->GetWasmFunctionCount(), &totalFunctions) || totalFunctions > Limits::GetMaxFunctions())
+    {
+        ThrowDecodingError(_u("Too many functions"));
+    }
+
     for (uint32 iFunc = 0; iFunc < nFunctions; iFunc++)
     {
         uint32 sigIndex = LEB128(len);
@@ -681,17 +699,22 @@
     }
 }
 
-void WasmBinaryReader::ReadExportTable()
+void WasmBinaryReader::ReadExportSection()
 {
     uint32 length;
-    uint32 entries = LEB128(length);
-    m_module->AllocateFunctionExports(entries);
+    uint32 numExports = LEB128(length);
+    if (numExports > Limits::GetMaxExports())
+    {
+        ThrowDecodingError(_u("Too many exports"));
+    }
+
+    m_module->AllocateFunctionExports(numExports);
 
     ArenaAllocator tmpAlloc(_u("ExportDupCheck"), m_module->GetScriptContext()->GetThreadContext()->GetPageAllocator(), Js::Throw::OutOfMemory);
     typedef SList<const char16*> NameList;
     JsUtil::BaseDictionary<uint32, NameList*, ArenaAllocator> exportsNameDict(&tmpAlloc);
 
-    for (uint32 iExport = 0; iExport < entries; iExport++)
+    for (uint32 iExport = 0; iExport < numExports; iExport++)
     {
         uint32 nameLength;
         const char16* exportName = ReadInlineName(length, nameLength);
@@ -798,30 +821,28 @@
         {
             ThrowDecodingError(_u("Only anyfunc type is supported. Unknown type %d"), elementType);
         }
-        uint32 flags = LEB128(length);
-        uint32 initialLength = LEB128(length);
-        uint32 maximumLength = UINT32_MAX;
-        if (flags & 0x1)
-        {
-            maximumLength = LEB128(length);
-        }
-        m_module->InitializeTable(initialLength, maximumLength);
-        TRACE_WASM_DECODER(_u("Indirect table: %u to %u entries"), initialLength, maximumLength);
+        SectionLimits limits = ReadSectionLimits(Limits::GetMaxTableSize(), Limits::GetMaxTableSize(), _u("table too big"));
+        m_module->InitializeTable(limits.initial, limits.maximum);
+        TRACE_WASM_DECODER(_u("Indirect table: %u to %u entries"), limits.initial, limits.maximum);
     }
 }
 
-void
-WasmBinaryReader::ReadElementSection()
+void WasmBinaryReader::ReadElementSection()
 {
     uint32 length = 0;
-    uint32 count = LEB128(length);
-    if (count != 0)
+    uint32 numSegments = LEB128(length);
+    if (numSegments > Limits::GetMaxElementSegments())
     {
-        m_module->AllocateElementSegs(count);
+        ThrowDecodingError(_u("Too many element segments"));
     }
-    TRACE_WASM_DECODER(_u("Indirect table element: %u entries"), count);
 
-    for (uint32 i = 0; i < count; ++i)
+    if (numSegments > 0)
+    {
+        m_module->AllocateElementSegs(numSegments);
+    }
+    TRACE_WASM_DECODER(_u("Indirect table element: %u entries"), numSegments);
+
+    for (uint32 i = 0; i < numSegments; ++i)
     {
         uint32 index = LEB128(length); // Table id
         if (index != 0 || !(m_module->HasTable() || m_module->HasTableImport()))
@@ -832,7 +853,12 @@
         WasmNode initExpr = ReadInitExpr(true);
         uint32 numElem = LEB128(length);
 
-        WasmElementSegment *eSeg = Anew(m_alloc, WasmElementSegment, m_alloc, index, initExpr, numElem);
+        if (numElem > Limits::GetMaxTableSize())
+        {
+            ThrowDecodingError(_u("Too many table element"));
+        }
+
+        WasmElementSegment* eSeg = Anew(m_alloc, WasmElementSegment, m_alloc, index, initExpr, numElem);
 
         for (uint32 iElem = 0; iElem < numElem; ++iElem)
         {
@@ -842,73 +868,85 @@
             {
                 ThrowDecodingError(_u("Invalid function to insert in the table %u"), elem);
             }
-            eSeg->AddElement(elem, *m_module);
+            eSeg->AddElement(elem);
         }
         m_module->SetElementSeg(eSeg, i);
     }
 }
 
-void
-WasmBinaryReader::ReadDataSegments()
+void WasmBinaryReader::ReadDataSection()
 {
-    UINT len = 0;
-    const uint32 entries = LEB128(len);
-    if (entries > 0)
+    uint32 len = 0;
+    const uint32 numSegments = LEB128(len);
+    if (numSegments > Limits::GetMaxDataSegments())
     {
-        m_module->AllocateDataSegs(entries);
+        ThrowDecodingError(_u("Too many data segments"));
     }
 
-    for (uint32 i = 0; i < entries; ++i)
+    if (numSegments > 0)
     {
-        UINT32 index = LEB128(len);
+        m_module->AllocateDataSegs(numSegments);
+    }
+
+    for (uint32 i = 0; i < numSegments; ++i)
+    {
+        uint32 index = LEB128(len);
         if (index != 0 || !(m_module->HasMemory() || m_module->HasMemoryImport()))
         {
             ThrowDecodingError(_u("Unknown memory index %u"), index);
         }
         TRACE_WASM_DECODER(_u("Data Segment #%u"), i);
         WasmNode initExpr = ReadInitExpr(true);
+        uint32 dataByteLen = LEB128(len);
 
-        //UINT32 offset = initExpr.cnst.i32;
-        UINT32 dataByteLen = LEB128(len);
-        WasmDataSegment *dseg = Anew(m_alloc, WasmDataSegment, m_alloc, initExpr, dataByteLen, m_pc);
+        WasmDataSegment* dseg = Anew(m_alloc, WasmDataSegment, m_alloc, initExpr, dataByteLen, m_pc);
         CheckBytesLeft(dataByteLen);
         m_pc += dataByteLen;
         m_module->SetDataSeg(dseg, i);
     }
 }
 
-void
-WasmBinaryReader::ReadNamesSection()
+void WasmBinaryReader::ReadNameSection()
 {
-    UINT len = 0;
-    UINT numEntries = LEB128(len);
+    uint32 len = 0;
+    uint32 numFuncNames = LEB128(len);
 
-    for (UINT i = 0; i < numEntries; ++i)
+    if (numFuncNames > Limits::GetMaxFunctions())
     {
-        UINT fnNameLen = 0;
+        ThrowDecodingError(_u("Too many function names"));
+    }
+
+    for (uint32 i = 0; i < numFuncNames; ++i)
+    {
+        uint32 fnNameLen = 0;
         WasmFunctionInfo* funsig = m_module->GetWasmFunctionInfo(i);
         const char16* name = ReadInlineName(len, fnNameLen);
         funsig->SetName(name, fnNameLen);
-        UINT numLocals = LEB128(len);
+        uint32 numLocals = LEB128(len);
         if (numLocals != funsig->GetLocalCount())
         {
             ThrowDecodingError(_u("num locals mismatch in names section"));
         }
-        for (UINT j = 0; j < numLocals; ++j)
+        for (uint32 j = 0; j < numLocals; ++j)
         {
-            UINT localNameLen = 0;
+            uint32 localNameLen = 0;
             ReadInlineName(len, localNameLen);
         }
     }
 }
 
-void
-WasmBinaryReader::ReadGlobalsSection()
+void WasmBinaryReader::ReadGlobalSection()
 {
-    UINT len = 0;
-    UINT numEntries = LEB128(len);
+    uint32 len = 0;
+    uint32 numGlobals = LEB128(len);
 
-    for (UINT i = 0; i < numEntries; ++i)
+    uint32 totalGlobals = 0;
+    if (UInt32Math::Add(numGlobals, m_module->GetGlobalCount(), &totalGlobals) || totalGlobals > Limits::GetMaxGlobals())
+    {
+        ThrowDecodingError(_u("Too many globals"));
+    }
+
+    for (uint32 i = 0; i < numGlobals; ++i)
     {
         WasmTypes::WasmType type = ReadWasmType(len);
         bool isMutable = ReadMutableValue();
@@ -937,8 +975,7 @@
     }
 }
 
-void
-WasmBinaryReader::ReadCustomSection()
+void WasmBinaryReader::ReadCustomSection()
 {
     CustomSection customSection;
     customSection.name = m_currentSection.name;
@@ -955,10 +992,14 @@
     m_pc = m_currentSection.end;
 }
 
-const char16*
-WasmBinaryReader::ReadInlineName(uint32& length, uint32& nameLength)
+const char16* WasmBinaryReader::ReadInlineName(uint32& length, uint32& nameLength)
 {
-    uint rawNameLength = LEB128(length);
+    uint32 rawNameLength = LEB128(length);
+    if (rawNameLength > Limits::GetMaxStringSize())
+    {
+        ThrowDecodingError(_u("Name too long"));
+    }
+
     CheckBytesLeft(rawNameLength);
     LPCUTF8 rawName = m_pc;
 
@@ -977,13 +1018,17 @@
     return contents;
 }
 
-void
-WasmBinaryReader::ReadImportEntries()
+void WasmBinaryReader::ReadImportSection()
 {
     uint32 len = 0;
-    uint32 entries = LEB128(len);
+    uint32 numImports = LEB128(len);
 
-    for (uint32 i = 0; i < entries; ++i)
+    if (numImports > Limits::GetMaxImports())
+    {
+        ThrowDecodingError(_u("Too many imports"));
+    }
+
+    for (uint32 i = 0; i < numImports; ++i)
     {
         uint32 modNameLen = 0, fnNameLen = 0;
         const char16* modName = ReadInlineName(len, modNameLen);
@@ -997,6 +1042,10 @@
         {
             uint32 sigId = LEB128(len);
             m_module->AddFunctionImport(sigId, modName, modNameLen, fnName, fnNameLen);
+            if (m_module->GetWasmFunctionCount() > Limits::GetMaxFunctions())
+            {
+                ThrowDecodingError(_u("Too many functions"));
+            }
             break;
         }
         case ExternalKinds::Global:
@@ -1009,6 +1058,10 @@
             }
             m_module->AddGlobal(GlobalReferenceTypes::ImportedReference, type, isMutable, {});
             m_module->AddGlobalImport(modName, modNameLen, fnName, fnNameLen);
+            if (m_module->GetGlobalCount() > Limits::GetMaxGlobals())
+            {
+                ThrowDecodingError(_u("Too many globals"));
+            }
             break;
         }
         case ExternalKinds::Table:
@@ -1027,8 +1080,7 @@
     }
 }
 
-void
-WasmBinaryReader::ReadStartFunction()
+void WasmBinaryReader::ReadStartFunction()
 {
     uint32 len = 0;
     uint32 id = LEB128(len);
@@ -1046,17 +1098,16 @@
 }
 
 template<typename MaxAllowedType>
-MaxAllowedType
-WasmBinaryReader::LEB128(UINT &length, bool sgn)
+MaxAllowedType WasmBinaryReader::LEB128(uint32 &length, bool sgn)
 {
     MaxAllowedType result = 0;
-    uint shamt = 0;
+    uint32 shamt = 0;
     byte b = 0;
     length = 1;
-    uint maxReads = sizeof(MaxAllowedType) == 4 ? 5 : 10;
+    uint32 maxReads = sizeof(MaxAllowedType) == 4 ? 5 : 10;
     CompileAssert(sizeof(MaxAllowedType) == 4 || sizeof(MaxAllowedType) == 8);
 
-    for (uint i = 0; i < maxReads; i++, length++)
+    for (uint32 i = 0; i < maxReads; i++, length++)
     {
         CheckBytesLeft(1);
         b = *m_pc++;
@@ -1109,27 +1160,24 @@
 
 // Signed LEB128
 template<>
-INT
-WasmBinaryReader::SLEB128(UINT &length)
+int32 WasmBinaryReader::SLEB128(uint32 &length)
 {
-    INT result = LEB128<UINT>(length, true);
+    int32 result = LEB128<uint32>(length, true);
 
     TRACE_WASM_LEB128(_u("Binary decoder: SLEB128 length = %u, value = %d (0x%x)"), length, result, result);
     return result;
 }
 
 template<>
-INT64
-WasmBinaryReader::SLEB128(UINT &length)
+int64 WasmBinaryReader::SLEB128(uint32 &length)
 {
-    INT64 result = LEB128<UINT64>(length, true);
+    int64 result = LEB128<uint64>(length, true);
 
     TRACE_WASM_LEB128(_u("Binary decoder: SLEB128 length = %u, value = %lld (0x%llx)"), length, result, result);
     return result;
 }
 
-WasmNode
-WasmBinaryReader::ReadInitExpr(bool isOffset)
+WasmNode WasmBinaryReader::ReadInitExpr(bool isOffset)
 {
     if (m_readerState != READER_STATE_MODULE)
     {
@@ -1176,6 +1224,28 @@
     return node;
 }
 
+SectionLimits WasmBinaryReader::ReadSectionLimits(uint32 maxInitial, uint32 maxMaximum, const char16* errorMsg)
+{
+    SectionLimits limits;
+    uint32 length = 0;
+    uint32 flags = LEB128(length);
+    limits.initial = LEB128(length);
+    limits.maximum = maxMaximum;
+    if (flags & 0x1)
+    {
+        limits.maximum = LEB128(length);
+        if (limits.maximum > maxMaximum)
+        {
+            ThrowDecodingError(_u("Maximum %s"), errorMsg);
+        }
+    }
+    if (limits.initial > maxInitial)
+    {
+        ThrowDecodingError(_u("Minimum %s"), errorMsg);
+    }
+    return limits;
+}
+
 template <typename T>
 T WasmBinaryReader::ReadConst()
 {
@@ -1186,8 +1256,7 @@
     return value;
 }
 
-uint8
-WasmBinaryReader::ReadVarUInt7()
+uint8 WasmBinaryReader::ReadVarUInt7()
 {
     return ReadConst<uint8>() & 0x7F;
 }
@@ -1204,17 +1273,15 @@
     }
 }
 
-WasmTypes::WasmType
-WasmBinaryReader::ReadWasmType(uint32& length)
+WasmTypes::WasmType WasmBinaryReader::ReadWasmType(uint32& length)
 {
     length = 1;
     return LanguageTypes::ToWasmType(ReadConst<int8>());
 }
 
-void
-WasmBinaryReader::CheckBytesLeft(UINT bytesNeeded)
+void WasmBinaryReader::CheckBytesLeft(uint32 bytesNeeded)
 {
-    UINT bytesLeft = (UINT)(m_end - m_pc);
+    uint32 bytesLeft = (uint32)(m_end - m_pc);
     if (bytesNeeded > bytesLeft)
     {
         ThrowDecodingError(_u("Out of file: Needed: %d, Left: %d"), bytesNeeded, bytesLeft);
@@ -1223,6 +1290,4 @@
 
 } // namespace Wasm
 
-#undef TRACE_WASM_DECODER
-
 #endif // ENABLE_WASM
diff --git a/lib/WasmReader/WasmBinaryReader.h b/lib/WasmReader/WasmBinaryReader.h
index 39dcf44..c46206b 100644
--- a/lib/WasmReader/WasmBinaryReader.h
+++ b/lib/WasmReader/WasmBinaryReader.h
@@ -29,12 +29,18 @@
         const char16* name;
     };
 
-    static const unsigned int binaryVersion = 0x1;
+    struct SectionLimits
+    {
+        uint32 initial;
+        uint32 maximum;
+    };
+
+    static const uint32 binaryVersion = 0x1;
 
     class WasmBinaryReader : public WasmReaderBase
     {
     public:
-        WasmBinaryReader(ArenaAllocator* alloc, Js::WebAssemblyModule * module, const byte* source, size_t length);
+        WasmBinaryReader(ArenaAllocator* alloc, Js::WebAssemblyModule* module, const byte* source, size_t length);
 
         void InitializeReader();
         SectionHeader ReadNextSection();
@@ -51,7 +57,7 @@
     private:
         struct ReaderState
         {
-            UINT32 count; // current entry
+            uint32 count; // current entry
             size_t size;  // number of entries
         };
 
@@ -67,17 +73,17 @@
         void ValidateModuleHeader();
         SectionHeader ReadSectionHeader();
         void ReadMemorySection(bool isImportSection);
-        void ReadSignatures();
-        void ReadFunctionsSignatures();
+        void ReadSignatureTypeSection();
+        void ReadFunctionSignatures();
         void ReadFunctionHeaders();
-        void ReadExportTable();
+        void ReadExportSection();
         void ReadTableSection(bool isImportSection);
-        void ReadDataSegments();
-        void ReadImportEntries();
+        void ReadDataSection();
+        void ReadImportSection();
         void ReadStartFunction();
-        void ReadNamesSection();
+        void ReadNameSection();
         void ReadElementSection();
-        void ReadGlobalsSection();
+        void ReadGlobalSection();
         void ReadCustomSection();
 
         // Primitive reader
@@ -86,20 +92,21 @@
         uint8 ReadVarUInt7();
         bool ReadMutableValue();
         const char16* ReadInlineName(uint32& length, uint32& nameLength);
-        template<typename MaxAllowedType = UINT>
-        MaxAllowedType LEB128(UINT &length, bool sgn = false);
-        template<typename MaxAllowedType = INT>
-        MaxAllowedType SLEB128(UINT &length);
+        template<typename MaxAllowedType = uint32>
+        MaxAllowedType LEB128(uint32 &length, bool sgn = false);
+        template<typename MaxAllowedType = int32>
+        MaxAllowedType SLEB128(uint32 &length);
         WasmNode ReadInitExpr(bool isOffset = false);
+        SectionLimits ReadSectionLimits(uint32 maxInitial, uint32 maxMaximum, const char16* errorMsg);
 
-        void CheckBytesLeft(UINT bytesNeeded);
+        void CheckBytesLeft(uint32 bytesNeeded);
         bool EndOfFunc();
         bool EndOfModule();
         DECLSPEC_NORETURN void ThrowDecodingError(const char16* msg, ...);
         Wasm::WasmTypes::WasmType ReadWasmType(uint32& length);
 
         ArenaAllocator* m_alloc;
-        uint m_funcNumber;
+        uint32 m_funcNumber;
         const byte* m_start, *m_end, *m_pc, *m_curFuncEnd;
         SectionHeader m_currentSection;
         ReaderState m_funcState;   // func AST level
@@ -111,7 +118,7 @@
             READER_STATE_FUNCTION,
             READER_STATE_MODULE
         } m_readerState;
-        Js::WebAssemblyModule * m_module;
+        Js::WebAssemblyModule* m_module;
 #if DBG_DUMP
         typedef JsUtil::BaseHashSet<WasmOp, ArenaAllocator, PowerOf2SizePolicy> OpSet;
         OpSet* m_ops;
diff --git a/lib/WasmReader/WasmByteCodeGenerator.cpp b/lib/WasmReader/WasmByteCodeGenerator.cpp
index 4d46268..1f03b37 100644
--- a/lib/WasmReader/WasmByteCodeGenerator.cpp
+++ b/lib/WasmReader/WasmByteCodeGenerator.cpp
@@ -11,10 +11,10 @@
 #include "EmptyWasmByteCodeWriter.h"
 
 #if DBG_DUMP
-uint opId = 0;
-uint lastOpId = 1;
-#define DebugPrintOp(op) if (PHASE_TRACE(Js::WasmReaderPhase, GetFunctionBody())) { PrintOpBegin(op); }
-#define DebugPrintOpEnd() if (PHASE_TRACE(Js::WasmReaderPhase, GetFunctionBody())) { PrintOpEnd(); }
+uint32 opId = 0;
+uint32 lastOpId = 1;
+#define DebugPrintOp(op) if (PHASE_TRACE(Js::WasmBytecodePhase, GetFunctionBody())) { PrintOpBegin(op); }
+#define DebugPrintOpEnd() if (PHASE_TRACE(Js::WasmBytecodePhase, GetFunctionBody())) { PrintOpEnd(); }
 #else
 #define DebugPrintOp(op)
 #define DebugPrintOpEnd()
@@ -26,8 +26,7 @@
 #include "WasmBinaryOpCodes.h"
 
 #if DBG_DUMP
-void
-PrintTypeStack(const JsUtil::Stack<EmitInfo>& stack)
+void PrintTypeStack(const JsUtil::Stack<EmitInfo>& stack)
 {
     Output::Print(_u("["));
     int i = 0;
@@ -57,8 +56,7 @@
     Output::Print(_u("]"));
 }
 
-void
-WasmBytecodeGenerator::PrintOpBegin(WasmOp op) const
+void WasmBytecodeGenerator::PrintOpBegin(WasmOp op) const
 {
     if (lastOpId == opId) Output::Print(_u("\r\n"));
     lastOpId = ++opId;
@@ -79,8 +77,7 @@
     PrintTypeStack(m_evalStack);
 }
 
-void
-WasmBytecodeGenerator::PrintOpEnd() const
+void WasmBytecodeGenerator::PrintOpEnd() const
 {
     if (lastOpId == opId)
     {
@@ -93,8 +90,7 @@
 #endif
 
 /* static */
-Js::AsmJsRetType
-WasmToAsmJs::GetAsmJsReturnType(WasmTypes::WasmType wasmType)
+Js::AsmJsRetType WasmToAsmJs::GetAsmJsReturnType(WasmTypes::WasmType wasmType)
 {
     switch (wasmType)
     {
@@ -109,8 +105,7 @@
 }
 
 /* static */
-Js::AsmJsVarType
-WasmToAsmJs::GetAsmJsVarType(WasmTypes::WasmType wasmType)
+Js::AsmJsVarType WasmToAsmJs::GetAsmJsVarType(WasmTypes::WasmType wasmType)
 {
     Js::AsmJsVarType asmType = Js::AsmJsVarType::Int;
     switch (wasmType)
@@ -138,8 +133,7 @@
     m_sourceInfo->GetSrcInfo()->sourceContextInfo->EnsureInitialized();
 }
 
-Js::WebAssemblyModule*
-WasmModuleGenerator::GenerateModule()
+Js::WebAssemblyModule* WasmModuleGenerator::GenerateModule()
 {
     m_module->GetReader()->InitializeReader();
 
@@ -196,7 +190,7 @@
         Assert(info->GetBody());
         if (PHASE_TRACE(Js::WasmInOutPhase, info->GetBody()))
         {
-            uint index = m_module->GetWasmFunctionCount();
+            uint32 index = m_module->GetWasmFunctionCount();
             WasmFunctionInfo* newInfo = m_module->AddWasmFunctionInfo(info->GetSignature());
             if (!firstThunk)
             {
@@ -235,7 +229,7 @@
     }
 #endif
     // If we see a FunctionSignatures section we need to see a FunctionBodies section
-    if (visitedSections.Test(bSectFunctionSignatures) && !visitedSections.Test(bSectFunctionBodies))
+    if (visitedSections.Test(bSectFunction) && !visitedSections.Test(bSectFunctionBodies))
     {
         throw WasmCompilationException(_u("Missing required section: %s"), SectionInfo::All[bSectFunctionBodies].name);
     }
@@ -243,14 +237,12 @@
     return m_module;
 }
 
-WasmBinaryReader*
-WasmModuleGenerator::GetReader() const
+WasmBinaryReader* WasmModuleGenerator::GetReader() const
 {
     return m_module->GetReader();
 }
 
-void
-WasmModuleGenerator::GenerateFunctionHeader(uint32 index)
+void WasmModuleGenerator::GenerateFunctionHeader(uint32 index)
 {
     WasmFunctionInfo* wasmInfo = m_module->GetWasmFunctionInfo(index);
     if (!wasmInfo)
@@ -272,6 +264,7 @@
         {
             Wasm::WasmExport* wasmExport = m_module->GetExport(iExport);
             if (wasmExport  &&
+                wasmExport->kind == ExternalKinds::Function &&
                 wasmExport->nameLength > 0 &&
                 m_module->GetFunctionIndexType(wasmExport->index) == FunctionIndexTypes::Function &&
                 wasmExport->index == wasmInfo->GetNumber())
@@ -287,7 +280,7 @@
 
     if (!functionName)
     {
-        char16 * autoName = RecyclerNewArrayLeafZ(m_recycler, char16, 32);
+        char16* autoName = RecyclerNewArrayLeafZ(m_recycler, char16, 32);
         nameLength = swprintf_s(autoName, 32, _u("wasm-function[%u]"), wasmInfo->GetNumber());
         functionName = autoName;
     }
@@ -302,7 +295,7 @@
         m_sourceInfo->GetSrcInfo()->sourceContextInfo->sourceContextId,
         wasmInfo->GetNumber(),
         nullptr,
-        Js::FunctionInfo::Attributes::None,
+        Js::FunctionInfo::Attributes::ErrorOnNew,
         Js::FunctionBody::Flags_None
 #ifdef PERF_COUNTERS
         , false /* is function from deferred deserialized proxy */
@@ -315,7 +308,6 @@
     body->SetIsAsmJsFunction(true);
     body->SetIsAsmjsMode(true);
     body->SetIsWasmFunction(true);
-    body->GetAsmJsFunctionInfo()->SetIsHeapBufferConst(false);
 
     WasmReaderInfo* readerInfo = RecyclerNew(m_recycler, WasmReaderInfo);
     readerInfo->m_funcInfo = wasmInfo;
@@ -325,16 +317,12 @@
     info->SetWasmReaderInfo(readerInfo);
     info->SetWebAssemblyModule(m_module);
 
-    if (wasmInfo->GetParamCount() >= Js::Constants::InvalidArgSlot)
-    {
-        Js::Throw::OutOfMemory();
-    }
-    Js::ArgSlot paramCount = (Js::ArgSlot)wasmInfo->GetParamCount();
+    Js::ArgSlot paramCount = wasmInfo->GetParamCount();
     info->SetArgCount(paramCount);
     info->SetWasmSignature(wasmInfo->GetSignature());
     Js::ArgSlot argSizeLength = max(paramCount, 3ui16);
     info->SetArgSizeArrayLength(argSizeLength);
-    uint* argSizeArray = RecyclerNewArrayLeafZ(m_recycler, uint, argSizeLength);
+    uint32* argSizeArray = RecyclerNewArrayLeafZ(m_recycler, uint32, argSizeLength);
     info->SetArgsSizesArray(argSizeArray);
 
     if (paramCount > 0)
@@ -349,50 +337,22 @@
         // overwrite default value in this case
         body->SetHasImplicitArgIns(false);
     }
-    Js::ArgSlot paramSize = 0;
     for (Js::ArgSlot i = 0; i < paramCount; ++i)
     {
-        WasmTypes::WasmType type = wasmInfo->GetParam(i);
+        WasmTypes::WasmType type = wasmInfo->GetSignature()->GetParam(i);
         info->SetArgType(WasmToAsmJs::GetAsmJsVarType(type), i);
-        uint16 size = 0;
-        switch (type)
-        {
-        case WasmTypes::F32:
-        case WasmTypes::I32:
-            CompileAssert(sizeof(float) == sizeof(int32));
-#ifdef _M_X64
-            // on x64, we always alloc (at least) 8 bytes per arguments
-            size = sizeof(void*);
-#elif _M_IX86
-            size = sizeof(int32);
-#else
-            Assert(UNREACHED);
-#endif
-            break;
-        case WasmTypes::F64:
-        case WasmTypes::I64:
-            CompileAssert(sizeof(double) == sizeof(int64));
-            size = sizeof(int64);
-            break;
-        default:
-            Assume(UNREACHED);
-        }
-        argSizeArray[i] = size;
-        // REVIEW: reduce number of checked adds
-        paramSize = UInt16Math::Add(paramSize, size);
+        argSizeArray[i] = wasmInfo->GetSignature()->GetParamSize(i);
     }
-    info->SetArgByteSize(paramSize);
+    info->SetArgByteSize(wasmInfo->GetSignature()->GetParamsSize());
     info->SetReturnType(WasmToAsmJs::GetAsmJsReturnType(wasmInfo->GetResultType()));
 }
 
-WAsmJs::RegisterSpace*
-AllocateRegisterSpace(ArenaAllocator* alloc, WAsmJs::Types)
+WAsmJs::RegisterSpace* AllocateRegisterSpace(ArenaAllocator* alloc, WAsmJs::Types)
 {
     return Anew(alloc, WAsmJs::RegisterSpace, 1);
 }
 
-void
-WasmBytecodeGenerator::GenerateFunctionBytecode(Js::ScriptContext* scriptContext, WasmReaderInfo* readerinfo, bool validateOnly /*= false*/)
+void WasmBytecodeGenerator::GenerateFunctionBytecode(Js::ScriptContext* scriptContext, WasmReaderInfo* readerinfo, bool validateOnly /*= false*/)
 {
     WasmBytecodeGenerator generator(scriptContext, readerinfo, validateOnly);
     generator.GenerateFunction();
@@ -424,19 +384,18 @@
     GetReader()->SeekToFunctionBody(m_funcInfo);
 
     // Use binary size to estimate bytecode size
-    const long astSize = readerInfo->m_funcInfo->m_readerInfo.size;
+    const uint32 astSize = readerInfo->m_funcInfo->m_readerInfo.size;
     m_writer->InitData(&m_alloc, astSize);
 }
 
-void
-WasmBytecodeGenerator::GenerateFunction()
+void WasmBytecodeGenerator::GenerateFunction()
 {
-    TRACE_WASM_DECODER(_u("GenerateFunction %u \n"), m_funcInfo->GetNumber());
+    TRACE_WASM_BYTECODE(_u("GenerateFunction %u \n"), m_funcInfo->GetNumber());
     if (PHASE_OFF(Js::WasmBytecodePhase, GetFunctionBody()))
     {
         throw WasmCompilationException(_u("Compilation skipped"));
     }
-    Js::AutoProfilingPhase functionProfiler(m_scriptContext, Js::WasmFunctionBodyPhase);
+    Js::AutoProfilingPhase functionProfiler(m_scriptContext, Js::WasmBytecodePhase);
     Unused(functionProfiler);
 
     m_maxArgOutDepth = 0;
@@ -479,24 +438,23 @@
     }
 #endif
 
-    Js::AsmJsFunctionInfo * info = GetFunctionBody()->GetAsmJsFunctionInfo();
+    Js::AsmJsFunctionInfo* info = GetFunctionBody()->GetAsmJsFunctionInfo();
     mTypedRegisterAllocator.CommitToFunctionBody(GetFunctionBody());
     mTypedRegisterAllocator.CommitToFunctionInfo(info, GetFunctionBody());
 
     GetFunctionBody()->CheckAndSetOutParamMaxDepth(m_maxArgOutDepth);
 }
 
-void
-WasmBytecodeGenerator::EnregisterLocals()
+void WasmBytecodeGenerator::EnregisterLocals()
 {
     uint32 nLocals = m_funcInfo->GetLocalCount();
     m_locals = AnewArray(&m_alloc, WasmLocal, nLocals);
 
     m_funcInfo->GetBody()->SetFirstTmpReg(nLocals);
-    for (uint i = 0; i < nLocals; ++i)
+    for (uint32 i = 0; i < nLocals; ++i)
     {
         WasmTypes::WasmType type = m_funcInfo->GetLocal(i);
-        WasmRegisterSpace * regSpace = GetRegisterSpace(type);
+        WasmRegisterSpace* regSpace = GetRegisterSpace(type);
         if (regSpace == nullptr)
         {
             throw WasmCompilationException(_u("Unable to find local register space"));
@@ -526,8 +484,7 @@
     }
 }
 
-void
-WasmBytecodeGenerator::EmitExpr(WasmOp op)
+void WasmBytecodeGenerator::EmitExpr(WasmOp op)
 {
     DebugPrintOp(op);
     switch (op)
@@ -667,10 +624,9 @@
 }
 
 
-EmitInfo
-WasmBytecodeGenerator::EmitGetGlobal()
+EmitInfo WasmBytecodeGenerator::EmitGetGlobal()
 {
-    uint globalIndex = GetReader()->m_currentNode.var.num;
+    uint32 globalIndex = GetReader()->m_currentNode.var.num;
     WasmGlobal* global = m_module->GetGlobal(globalIndex);
 
     WasmTypes::WasmType type = global->GetType();
@@ -688,7 +644,7 @@
         Js::OpCodeAsmJs::LdSlot_Db
     };
 
-    WasmRegisterSpace * regSpace = GetRegisterSpace(type);
+    WasmRegisterSpace* regSpace = GetRegisterSpace(type);
     Js::RegSlot tmpReg = regSpace->AcquireTmpRegister();
     EmitInfo info(tmpReg, type);
 
@@ -697,10 +653,9 @@
     return info;
 }
 
-EmitInfo
-WasmBytecodeGenerator::EmitSetGlobal()
+EmitInfo WasmBytecodeGenerator::EmitSetGlobal()
 {
-    uint globalIndex = GetReader()->m_currentNode.var.num;
+    uint32 globalIndex = GetReader()->m_currentNode.var.num;
     WasmGlobal* global = m_module->GetGlobal(globalIndex);
     Js::RegSlot slot = m_module->GetOffsetForGlobal(global);
 
@@ -724,12 +679,9 @@
     return EmitInfo();
 }
 
-
-
-EmitInfo
-WasmBytecodeGenerator::EmitGetLocal()
+EmitInfo WasmBytecodeGenerator::EmitGetLocal()
 {
-    uint localIndex = GetReader()->m_currentNode.var.num;
+    uint32 localIndex = GetReader()->m_currentNode.var.num;
     if (m_funcInfo->GetLocalCount() <= localIndex)
     {
         throw WasmCompilationException(_u("%u is not a valid local"), localIndex);
@@ -738,7 +690,7 @@
     WasmLocal local = m_locals[localIndex];
 
     Js::OpCodeAsmJs op = GetLoadOp(local.type);
-    WasmRegisterSpace * regSpace = GetRegisterSpace(local.type);
+    WasmRegisterSpace* regSpace = GetRegisterSpace(local.type);
 
     Js::RegSlot tmpReg = regSpace->AcquireTmpRegister();
 
@@ -747,10 +699,9 @@
     return EmitInfo(tmpReg, local.type);
 }
 
-EmitInfo
-WasmBytecodeGenerator::EmitSetLocal(bool tee)
+EmitInfo WasmBytecodeGenerator::EmitSetLocal(bool tee)
 {
-    uint localNum = GetReader()->m_currentNode.var.num;
+    uint32 localNum = GetReader()->m_currentNode.var.num;
     if (localNum >= m_funcInfo->GetLocalCount())
     {
         throw WasmCompilationException(_u("%u is not a valid local"), localNum);
@@ -773,8 +724,7 @@
     }
 }
 
-EmitInfo
-WasmBytecodeGenerator::EmitConst(WasmTypes::WasmType type, WasmConstLitNode cnst)
+EmitInfo WasmBytecodeGenerator::EmitConst(WasmTypes::WasmType type, WasmConstLitNode cnst)
 {
     Js::RegSlot tmpReg = GetRegisterSpace(type)->AcquireTmpRegister();
     EmitInfo dst(tmpReg, type);
@@ -782,8 +732,7 @@
     return dst;
 }
 
-void
-WasmBytecodeGenerator::EmitLoadConst(EmitInfo dst, WasmConstLitNode cnst)
+void WasmBytecodeGenerator::EmitLoadConst(EmitInfo dst, WasmConstLitNode cnst)
 {
     switch (dst.type)
     {
@@ -804,15 +753,13 @@
     }
 }
 
-WasmConstLitNode
-WasmBytecodeGenerator::GetZeroCnst()
+WasmConstLitNode WasmBytecodeGenerator::GetZeroCnst()
 {
     WasmConstLitNode cnst = {0};
     return cnst;
 }
 
-void
-WasmBytecodeGenerator::EnsureStackAvailable()
+void WasmBytecodeGenerator::EnsureStackAvailable()
 {
     if (!ThreadContext::IsCurrentStackAvailable(Js::Constants::MinStackCompile))
     {
@@ -820,8 +767,7 @@
     }
 }
 
-void
-WasmBytecodeGenerator::EmitBlockCommon(BlockInfo* blockInfo, bool* endOnElse /*= nullptr*/)
+void WasmBytecodeGenerator::EmitBlockCommon(BlockInfo* blockInfo, bool* endOnElse /*= nullptr*/)
 {
     EnsureStackAvailable();
     bool canResetUnreachable = !IsUnreachable();
@@ -855,8 +801,7 @@
     }
 }
 
-EmitInfo
-WasmBytecodeGenerator::EmitBlock()
+EmitInfo WasmBytecodeGenerator::EmitBlock()
 {
     Js::ByteCodeLabel blockLabel = m_writer->DefineLabel();
 
@@ -869,14 +814,13 @@
     return yieldInfo;
 }
 
-EmitInfo
-WasmBytecodeGenerator::EmitLoop()
+EmitInfo WasmBytecodeGenerator::EmitLoop()
 {
     Js::ByteCodeLabel loopTailLabel = m_writer->DefineLabel();
     Js::ByteCodeLabel loopHeadLabel = m_writer->DefineLabel();
     Js::ByteCodeLabel loopLandingPadLabel = m_writer->DefineLabel();
 
-    uint loopId = m_writer->EnterLoop(loopHeadLabel);
+    uint32 loopId = m_writer->EnterLoop(loopHeadLabel);
 
     // Internally we create a block for loop to exit, but semantically, they don't exist so pop it
     BlockInfo implicitBlockInfo = PushLabel(loopTailLabel);
@@ -904,12 +848,11 @@
 }
 
 template<WasmOp wasmOp>
-EmitInfo
-WasmBytecodeGenerator::EmitCall()
+EmitInfo WasmBytecodeGenerator::EmitCall()
 {
-    uint funcNum = Js::Constants::UninitializedValue;
-    uint signatureId = Js::Constants::UninitializedValue;
-    WasmSignature * calleeSignature = nullptr;
+    uint32 funcNum = Js::Constants::UninitializedValue;
+    uint32 signatureId = Js::Constants::UninitializedValue;
+    WasmSignature* calleeSignature = nullptr;
     EmitInfo indirectIndexInfo;
     const bool isImportCall = GetReader()->m_currentNode.call.funcType == FunctionIndexTypes::Import;
     Assert(isImportCall || GetReader()->m_currentNode.call.funcType == FunctionIndexTypes::Function || GetReader()->m_currentNode.call.funcType == FunctionIndexTypes::ImportThunk);
@@ -929,43 +872,51 @@
         Assume(UNREACHED);
     }
 
+    const auto argOverflow = []
+    {
+        throw WasmCompilationException(_u("Argument size too big"));
+    };
+
     // emit start call
     Js::ArgSlot argSize;
     Js::OpCodeAsmJs startCallOp;
     if (isImportCall)
     {
-        argSize = (Js::ArgSlot)(calleeSignature->GetParamCount() * sizeof(Js::Var));
+        argSize = ArgSlotMath::Mul(calleeSignature->GetParamCount(), sizeof(Js::Var), argOverflow);
         startCallOp = Js::OpCodeAsmJs::StartCall;
     }
     else
     {
         startCallOp = Js::OpCodeAsmJs::I_StartCall;
-        argSize = (Js::ArgSlot)calleeSignature->GetParamsSize();
+        argSize = calleeSignature->GetParamsSize();
     }
     // Add return value
-    argSize += sizeof(Js::Var);
-
-    if (argSize >= UINT16_MAX)
+    argSize = ArgSlotMath::Add(argSize, sizeof(Js::Var), argOverflow);
+    if (!Math::IsAligned<Js::ArgSlot>(argSize, sizeof(Js::Var)))
     {
-        throw WasmCompilationException(_u("Argument size too big"));
+        AssertMsg(UNREACHED, "Wasm argument size should always be Var aligned");
+        throw WasmCompilationException(_u("Internal Error"));
     }
 
     m_writer->AsmStartCall(startCallOp, argSize);
 
-    uint32 nArgs = calleeSignature->GetParamCount();
-    //copy args into a list so they could be generated in the right order (FIFO)
-    JsUtil::List<EmitInfo, ArenaAllocator> argsList(&m_alloc);
-    for (uint32 i = 0; i < nArgs; i++)
-    {
-        argsList.Add(PopEvalStack(calleeSignature->GetParam(nArgs - i - 1), _u("Call argument does not match formal type")));
-    }
-    Assert((uint32)argsList.Count() == nArgs);
+    Js::ArgSlot nArgs = calleeSignature->GetParamCount();
 
-    // Size of the this pointer (aka undefined)
-    int32 argsBytesLeft = sizeof(Js::Var);
-    for (uint32 i = 0; i < nArgs; ++i)
+    // copy args into a list so they could be generated in the right order (FIFO)
+    EmitInfo* argsList = AnewArray(&m_alloc, EmitInfo, nArgs);
+    for (int i = int(nArgs) - 1; i >= 0; --i)
     {
-        EmitInfo info = argsList.Item(nArgs - i - 1);
+        EmitInfo info = PopEvalStack(calleeSignature->GetParam((Js::ArgSlot)i), _u("Call argument does not match formal type"));
+        // We can release the location of the arguments now, because we won't create new temps between start/call
+        ReleaseLocation(&info);
+        argsList[i] = info;
+    }
+
+    // Skip the this pointer (aka undefined)
+    uint32 argLoc = 1;
+    for (Js::ArgSlot i = 0; i < nArgs; ++i)
+    {
+        EmitInfo info = argsList[i];
 
         Js::OpCodeAsmJs argOp = Js::OpCodeAsmJs::Nop;
         switch (info.type)
@@ -990,26 +941,27 @@
                 argOp = Js::OpCodeAsmJs::ArgOut_Int;
                 break;
             }
+            // Fall through
         default:
             throw WasmCompilationException(_u("Unknown argument type %u"), info.type);
         }
-        //argSize
-
-        if (argsBytesLeft < 0 || (argsBytesLeft % sizeof(Js::Var)) != 0)
-        {
-            throw WasmCompilationException(_u("Error while emitting call arguments"));
-        }
-        Js::RegSlot argLoc = argsBytesLeft / sizeof(Js::Var);
-        argsBytesLeft += isImportCall ? sizeof(Js::Var) : calleeSignature->GetParamSize(i);
 
         m_writer->AsmReg2(argOp, argLoc, info.location);
+
+        // Calculated next argument Js::Var location
+        if (isImportCall)
+        {
+            ++argLoc;
+        }
+        else
+        {
+            const Js::ArgSlot currentArgSize = calleeSignature->GetParamSize(i);
+            Assert(Math::IsAligned<Js::ArgSlot>(currentArgSize, sizeof(Js::Var)));
+            argLoc += currentArgSize / sizeof(Js::Var);
+        }
     }
 
-    //registers need to be released from higher ordinals to lower
-    for (uint32 i = 0; i < nArgs; i++)
-    {
-        ReleaseLocation(&(argsList.Item(i)));
-    }
+    AdeleteArray(&m_alloc, nArgs, argsList);
 
     // emit call
     switch (wasmOp)
@@ -1030,17 +982,19 @@
         Assume(UNREACHED);
     }
 
-    // calculate number of RegSlots the arguments consume
+    // calculate number of RegSlots(Js::Var) the call consumes
     Js::ArgSlot args;
     Js::OpCodeAsmJs callOp = Js::OpCodeAsmJs::Nop;
     if (isImportCall)
     {
-        args = (Js::ArgSlot)(calleeSignature->GetParamCount() + 1);
+        args = calleeSignature->GetParamCount();
+        ArgSlotMath::Inc(args, argOverflow);
         callOp = Js::OpCodeAsmJs::Call;
     }
     else
     {
-        args = (Js::ArgSlot)(::ceil((double)(argSize / sizeof(Js::Var))));
+        Assert(Math::IsAligned<Js::ArgSlot>(argSize, sizeof(Js::Var)));
+        args = argSize / sizeof(Js::Var);
         callOp = Js::OpCodeAsmJs::I_Call;
     }
 
@@ -1056,13 +1010,13 @@
         switch (retInfo.type)
         {
         case WasmTypes::F32:
-            convertOp = isImportCall ? Js::OpCodeAsmJs::Conv_VTF : Js::OpCodeAsmJs::I_Conv_VTF;
+            convertOp = isImportCall ? Js::OpCodeAsmJs::Conv_VTF : Js::OpCodeAsmJs::Ld_Flt;
             break;
         case WasmTypes::F64:
-            convertOp = isImportCall ? Js::OpCodeAsmJs::Conv_VTD : Js::OpCodeAsmJs::I_Conv_VTD;
+            convertOp = isImportCall ? Js::OpCodeAsmJs::Conv_VTD : Js::OpCodeAsmJs::Ld_Db;
             break;
         case WasmTypes::I32:
-            convertOp = isImportCall ? Js::OpCodeAsmJs::Conv_VTI : Js::OpCodeAsmJs::I_Conv_VTI;
+            convertOp = isImportCall ? Js::OpCodeAsmJs::Conv_VTI : Js::OpCodeAsmJs::Ld_Int;
             break;
         case WasmTypes::I64:
             convertOp = isImportCall ? Js::OpCodeAsmJs::Conv_VTL : Js::OpCodeAsmJs::Ld_Long;
@@ -1076,7 +1030,7 @@
     // track stack requirements for out params
 
     // + 1 for return address
-    uint maxDepthForLevel = args + 1;
+    uint32 maxDepthForLevel = args + 1;
     if (maxDepthForLevel > m_maxArgOutDepth)
     {
         m_maxArgOutDepth = maxDepthForLevel;
@@ -1085,8 +1039,7 @@
     return retInfo;
 }
 
-EmitInfo
-WasmBytecodeGenerator::EmitIfElseExpr()
+EmitInfo WasmBytecodeGenerator::EmitIfElseExpr()
 {
     Js::ByteCodeLabel falseLabel = m_writer->DefineLabel();
     Js::ByteCodeLabel endLabel = m_writer->DefineLabel();
@@ -1120,12 +1073,11 @@
     return PopLabel(endLabel);
 }
 
-void
-WasmBytecodeGenerator::EmitBrTable()
+void WasmBytecodeGenerator::EmitBrTable()
 {
-    const uint numTargets = GetReader()->m_currentNode.brTable.numTargets;
-    const UINT* targetTable = GetReader()->m_currentNode.brTable.targetTable;
-    const UINT defaultEntry = GetReader()->m_currentNode.brTable.defaultTarget;
+    const uint32 numTargets = GetReader()->m_currentNode.brTable.numTargets;
+    const uint32* targetTable = GetReader()->m_currentNode.brTable.targetTable;
+    const uint32 defaultEntry = GetReader()->m_currentNode.brTable.defaultTarget;
 
     // Compile scrutinee
     EmitInfo scrutineeInfo = PopEvalStack(WasmTypes::I32, _u("br_table expression must be of type i32"));
@@ -1145,11 +1097,10 @@
         }
     }
 
-
     // Compile cases
-    for (uint i = 0; i < numTargets; i++)
+    for (uint32 i = 0; i < numTargets; i++)
     {
-        uint target = targetTable[i];
+        uint32 target = targetTable[i];
         YieldToBlock(target, yieldInfo);
         Js::ByteCodeLabel targetLabel = GetLabel(target);
         m_writer->AsmBrReg1Const1(Js::OpCodeAsmJs::Case_IntConst, targetLabel, scrutineeInfo.location, i);
@@ -1163,9 +1114,7 @@
     SetUnreachableState(true);
 }
 
-
-EmitInfo
-WasmBytecodeGenerator::EmitGrowMemory()
+EmitInfo WasmBytecodeGenerator::EmitGrowMemory()
 {
     SetUsesMemory(0);
 
@@ -1175,16 +1124,14 @@
     return info;
 }
 
-EmitInfo
-WasmBytecodeGenerator::EmitDrop()
+EmitInfo WasmBytecodeGenerator::EmitDrop()
 {
     EmitInfo info = PopEvalStack();
     ReleaseLocation(&info);
     return EmitInfo();
 }
 
-EmitInfo
-WasmBytecodeGenerator::EmitBinExpr(Js::OpCodeAsmJs op, const WasmTypes::WasmType* signature)
+EmitInfo WasmBytecodeGenerator::EmitBinExpr(Js::OpCodeAsmJs op, const WasmTypes::WasmType* signature)
 {
     WasmTypes::WasmType resultType = signature[0];
     WasmTypes::WasmType lhsType = signature[1];
@@ -1203,8 +1150,7 @@
     return EmitInfo(resultReg, resultType);
 }
 
-EmitInfo
-WasmBytecodeGenerator::EmitUnaryExpr(Js::OpCodeAsmJs op, const WasmTypes::WasmType* signature)
+EmitInfo WasmBytecodeGenerator::EmitUnaryExpr(Js::OpCodeAsmJs op, const WasmTypes::WasmType* signature)
 {
     WasmTypes::WasmType resultType = signature[0];
     WasmTypes::WasmType inputType = signature[1];
@@ -1225,15 +1171,14 @@
     return EmitInfo(resultReg, resultType);
 }
 
-EmitInfo
-WasmBytecodeGenerator::EmitMemAccess(WasmOp wasmOp, const WasmTypes::WasmType* signature, Js::ArrayBufferView::ViewType viewType, bool isStore)
+EmitInfo WasmBytecodeGenerator::EmitMemAccess(WasmOp wasmOp, const WasmTypes::WasmType* signature, Js::ArrayBufferView::ViewType viewType, bool isStore)
 {
     WasmTypes::WasmType type = signature[0];
     SetUsesMemory(0);
 
     const uint32 mask = Js::ArrayBufferView::ViewMask[viewType];
-    const uint alignment = GetReader()->m_currentNode.mem.alignment;
-    const uint offset = GetReader()->m_currentNode.mem.offset;
+    const uint32 alignment = GetReader()->m_currentNode.mem.alignment;
+    const uint32 offset = GetReader()->m_currentNode.mem.offset;
 
     if ((mask << 1) & (1 << alignment))
     {
@@ -1269,8 +1214,7 @@
     return yieldInfo;
 }
 
-void
-WasmBytecodeGenerator::EmitReturnExpr(EmitInfo* explicitRetInfo)
+void WasmBytecodeGenerator::EmitReturnExpr(EmitInfo* explicitRetInfo)
 {
     if (m_funcInfo->GetResultType() == WasmTypes::Void)
     {
@@ -1294,8 +1238,7 @@
     SetUnreachableState(true);
 }
 
-EmitInfo
-WasmBytecodeGenerator::EmitSelect()
+EmitInfo WasmBytecodeGenerator::EmitSelect()
 {
     EmitInfo conditionInfo = PopEvalStack(WasmTypes::I32, _u("select condition must have i32 type"));
     EmitInfo falseInfo = PopEvalStack();
@@ -1339,10 +1282,9 @@
     return resultInfo;
 }
 
-void
-WasmBytecodeGenerator::EmitBr()
+void WasmBytecodeGenerator::EmitBr()
 {
-    UINT depth = GetReader()->m_currentNode.br.depth;
+    uint32 depth = GetReader()->m_currentNode.br.depth;
 
     if (ShouldYieldToBlock(depth))
     {
@@ -1357,10 +1299,9 @@
     SetUnreachableState(true);
 }
 
-EmitInfo
-WasmBytecodeGenerator::EmitBrIf()
+EmitInfo WasmBytecodeGenerator::EmitBrIf()
 {
-    UINT depth = GetReader()->m_currentNode.br.depth;
+    uint32 depth = GetReader()->m_currentNode.br.depth;
 
     EmitInfo conditionInfo = PopEvalStack(WasmTypes::I32, _u("br_if condition must have i32 type"));
     ReleaseLocation(&conditionInfo);
@@ -1377,8 +1318,7 @@
     return info;
 }
 
-Js::OpCodeAsmJs
-WasmBytecodeGenerator::GetLoadOp(WasmTypes::WasmType wasmType)
+Js::OpCodeAsmJs WasmBytecodeGenerator::GetLoadOp(WasmTypes::WasmType wasmType)
 {
     switch (wasmType)
     {
@@ -1402,8 +1342,7 @@
     }
 }
 
-Js::OpCodeAsmJs
-WasmBytecodeGenerator::GetReturnOp(WasmTypes::WasmType type)
+Js::OpCodeAsmJs WasmBytecodeGenerator::GetReturnOp(WasmTypes::WasmType type)
 {
     Js::OpCodeAsmJs retOp = Js::OpCodeAsmJs::Nop;
     switch (type)
@@ -1433,8 +1372,7 @@
     return retOp;
 }
 
-void
-WasmBytecodeGenerator::ReleaseLocation(EmitInfo * info)
+void WasmBytecodeGenerator::ReleaseLocation(EmitInfo* info)
 {
     if (WasmTypes::IsLocalType(info->type))
     {
@@ -1442,8 +1380,7 @@
     }
 }
 
-EmitInfo
-WasmBytecodeGenerator::EnsureYield(BlockInfo info)
+EmitInfo WasmBytecodeGenerator::EnsureYield(BlockInfo info)
 {
     EmitInfo yieldEmitInfo;
     if (info.HasYield())
@@ -1460,8 +1397,7 @@
     return yieldEmitInfo;
 }
 
-EmitInfo
-WasmBytecodeGenerator::PopLabel(Js::ByteCodeLabel labelValidation)
+EmitInfo WasmBytecodeGenerator::PopLabel(Js::ByteCodeLabel labelValidation)
 {
     Assert(m_blockInfos.Count() > 0);
     BlockInfo info = m_blockInfos.Pop();
@@ -1470,8 +1406,7 @@
     return EnsureYield(info);
 }
 
-BlockInfo
-WasmBytecodeGenerator::PushLabel(Js::ByteCodeLabel label, bool addBlockYieldInfo /*= true*/)
+BlockInfo WasmBytecodeGenerator::PushLabel(Js::ByteCodeLabel label, bool addBlockYieldInfo /*= true*/)
 {
     BlockInfo info;
     info.label = label;
@@ -1489,8 +1424,7 @@
     return info;
 }
 
-void
-WasmBytecodeGenerator::YieldToBlock(uint relativeDepth, EmitInfo expr)
+void WasmBytecodeGenerator::YieldToBlock(uint32 relativeDepth, EmitInfo expr)
 {
     BlockInfo blockInfo = GetBlockInfo(relativeDepth);
     YieldToBlock(blockInfo, expr);
@@ -1515,30 +1449,26 @@
     }
 }
 
-bool
-WasmBytecodeGenerator::ShouldYieldToBlock(uint relativeDepth) const
+bool WasmBytecodeGenerator::ShouldYieldToBlock(uint32 relativeDepth) const
 {
     return GetBlockInfo(relativeDepth).HasYield();
 }
 
-Wasm::BlockInfo
-WasmBytecodeGenerator::GetBlockInfo(uint relativeDepth) const
+Wasm::BlockInfo WasmBytecodeGenerator::GetBlockInfo(uint32 relativeDepth) const
 {
-    if (relativeDepth >= (uint)m_blockInfos.Count())
+    if (relativeDepth >= (uint32)m_blockInfos.Count())
     {
         throw WasmCompilationException(_u("Invalid branch target"));
     }
     return m_blockInfos.Peek(relativeDepth);
 }
 
-Js::ByteCodeLabel
-WasmBytecodeGenerator::GetLabel(uint relativeDepth)
+Js::ByteCodeLabel WasmBytecodeGenerator::GetLabel(uint32 relativeDepth)
 {
     return GetBlockInfo(relativeDepth).label;
 }
 
-WasmRegisterSpace *
-WasmBytecodeGenerator::GetRegisterSpace(WasmTypes::WasmType type)
+WasmRegisterSpace* WasmBytecodeGenerator::GetRegisterSpace(WasmTypes::WasmType type)
 {
     switch (type)
     {
@@ -1551,8 +1481,7 @@
     }
 }
 
-EmitInfo
-WasmBytecodeGenerator::PopEvalStack(WasmTypes::WasmType expectedType, const char16* mismatchMessage)
+EmitInfo WasmBytecodeGenerator::PopEvalStack(WasmTypes::WasmType expectedType, const char16* mismatchMessage)
 {
     // The scope marker should at least be there
     Assert(!m_evalStack.Empty());
@@ -1575,21 +1504,18 @@
     return info;
 }
 
-void
-WasmBytecodeGenerator::PushEvalStack(EmitInfo info)
+void WasmBytecodeGenerator::PushEvalStack(EmitInfo info)
 {
     Assert(!m_evalStack.Empty());
     m_evalStack.Push(info);
 }
 
-void
-WasmBytecodeGenerator::EnterEvalStackScope()
+void WasmBytecodeGenerator::EnterEvalStackScope()
 {
     m_evalStack.Push(EmitInfo(WasmTypes::Limit));
 }
 
-void
-WasmBytecodeGenerator::ExitEvalStackScope()
+void WasmBytecodeGenerator::ExitEvalStackScope()
 {
     Assert(!m_evalStack.Empty());
     EmitInfo info = m_evalStack.Pop();
@@ -1614,7 +1540,7 @@
     {
         // Replace the current stack with the any type
         Assert(!m_evalStack.Empty());
-        uint popped = 0;
+        uint32 popped = 0;
         while (m_evalStack.Top().type != WasmTypes::Limit)
         {
             EmitInfo info = m_evalStack.Pop();
@@ -1629,8 +1555,7 @@
     this->isUnreachable = isUnreachable;
 }
 
-void
-WasmBytecodeGenerator::SetUsesMemory(uint memoryIndex)
+void WasmBytecodeGenerator::SetUsesMemory(uint32 memoryIndex)
 {
     // Only support one memory at this time
     Assert(memoryIndex == 0);
@@ -1641,8 +1566,7 @@
     GetFunctionBody()->GetAsmJsFunctionInfo()->SetUsesHeapBuffer(true);
 }
 
-Wasm::WasmReaderBase*
-WasmBytecodeGenerator::GetReader() const
+Wasm::WasmReaderBase* WasmBytecodeGenerator::GetReader() const
 {
     if (m_funcInfo->GetCustomReader())
     {
@@ -1651,8 +1575,7 @@
     return m_module->GetReader();
 }
 
-void
-WasmCompilationException::FormatError(const char16* _msg, va_list arglist)
+void WasmCompilationException::FormatError(const char16* _msg, va_list arglist)
 {
     char16 buf[2048];
 
diff --git a/lib/WasmReader/WasmByteCodeGenerator.h b/lib/WasmReader/WasmByteCodeGenerator.h
index f940f52..f4b6aa4 100644
--- a/lib/WasmReader/WasmByteCodeGenerator.h
+++ b/lib/WasmReader/WasmByteCodeGenerator.h
@@ -131,7 +131,7 @@
         bool HasYield() const { return yieldInfo != nullptr; }
     };
 
-    typedef JsUtil::BaseDictionary<uint, LPCUTF8, ArenaAllocator> WasmExportDictionary;
+    typedef JsUtil::BaseDictionary<uint32, LPCUTF8, ArenaAllocator> WasmExportDictionary;
 
     struct WasmReaderInfo
     {
@@ -215,10 +215,10 @@
         EmitInfo PopLabel(Js::ByteCodeLabel labelValidation);
         BlockInfo PushLabel(Js::ByteCodeLabel label, bool addBlockYieldInfo = true);
         void YieldToBlock(BlockInfo blockInfo, EmitInfo expr);
-        void YieldToBlock(uint relativeDepth, EmitInfo expr);
-        bool ShouldYieldToBlock(uint relativeDepth) const;
-        BlockInfo GetBlockInfo(uint relativeDepth) const;
-        Js::ByteCodeLabel GetLabel(uint relativeDepth);
+        void YieldToBlock(uint32 relativeDepth, EmitInfo expr);
+        bool ShouldYieldToBlock(uint32 relativeDepth) const;
+        BlockInfo GetBlockInfo(uint32 relativeDepth) const;
+        Js::ByteCodeLabel GetLabel(uint32 relativeDepth);
 
         Js::OpCodeAsmJs GetLoadOp(WasmTypes::WasmType type);
         Js::OpCodeAsmJs GetReturnOp(WasmTypes::WasmType type);
@@ -232,7 +232,7 @@
         void ExitEvalStackScope();
         void SetUnreachableState(bool isUnreachable);
         bool IsUnreachable() const { return this->isUnreachable; }
-        void SetUsesMemory(uint memoryIndex);
+        void SetUsesMemory(uint32 memoryIndex);
 
         Js::FunctionBody* GetFunctionBody() const { return m_funcInfo->GetBody(); }
         WasmReaderBase* GetReader() const;
@@ -247,7 +247,7 @@
         WasmFunctionInfo* m_funcInfo;
         Js::WebAssemblyModule* m_module;
 
-        uint m_maxArgOutDepth;
+        uint32 m_maxArgOutDepth;
 
         Js::IWasmByteCodeWriter* m_writer;
         Js::IWasmByteCodeWriter* m_emptyWriter;
diff --git a/lib/WasmReader/WasmCustomReader.cpp b/lib/WasmReader/WasmCustomReader.cpp
index 7c17876..a1d130a 100644
--- a/lib/WasmReader/WasmCustomReader.cpp
+++ b/lib/WasmReader/WasmCustomReader.cpp
@@ -20,14 +20,12 @@
     m_state = 0;
 }
 
-bool
-WasmCustomReader::IsCurrentFunctionCompleted() const
+bool WasmCustomReader::IsCurrentFunctionCompleted() const
 {
     return m_state >= (uint32)m_nodes.Count();
 }
 
-WasmOp
-WasmCustomReader::ReadExpr()
+WasmOp WasmCustomReader::ReadExpr()
 {
     if (m_state < (uint32)m_nodes.Count())
     {
diff --git a/lib/WasmReader/WasmDataSegment.cpp b/lib/WasmReader/WasmDataSegment.cpp
index 334a512..6b81a8d 100644
--- a/lib/WasmReader/WasmDataSegment.cpp
+++ b/lib/WasmReader/WasmDataSegment.cpp
@@ -10,7 +10,7 @@
 namespace Wasm
 {
 
-WasmDataSegment::WasmDataSegment(ArenaAllocator * alloc, WasmNode ie, uint32 _source_size, const byte* _data) :
+WasmDataSegment::WasmDataSegment(ArenaAllocator* alloc, WasmNode ie, uint32 _source_size, const byte* _data) :
     m_alloc(alloc),
     m_initExpr(ie),
     m_sourceSize(_source_size),
@@ -18,14 +18,12 @@
 {
 }
 
-uint32
-WasmDataSegment::GetSourceSize() const
+uint32 WasmDataSegment::GetSourceSize() const
 {
     return m_sourceSize;
 }
 
-const byte*
-WasmDataSegment::GetData() const
+const byte* WasmDataSegment::GetData() const
 {
     return m_data;
 }
diff --git a/lib/WasmReader/WasmDataSegment.h b/lib/WasmReader/WasmDataSegment.h
index 6cb1a4f..4ce98ae 100644
--- a/lib/WasmReader/WasmDataSegment.h
+++ b/lib/WasmReader/WasmDataSegment.h
@@ -11,13 +11,13 @@
 class WasmDataSegment
 {
 public:
-    WasmDataSegment(ArenaAllocator * alloc, WasmNode initExpr, uint32 _source_size, const byte* _data);
+    WasmDataSegment(ArenaAllocator* alloc, WasmNode initExpr, uint32 _source_size, const byte* _data);
     WasmNode GetOffsetExpr() const { return m_initExpr; }
     uint32 GetSourceSize() const;
     const byte* GetData() const;
 
 private:
-    ArenaAllocator * m_alloc;
+    ArenaAllocator* m_alloc;
     WasmNode m_initExpr;
     uint32 m_sourceSize;
     const byte* m_data;
diff --git a/lib/WasmReader/WasmElementSegment.cpp b/lib/WasmReader/WasmElementSegment.cpp
index 47703ce..3a2bb18 100644
--- a/lib/WasmReader/WasmElementSegment.cpp
+++ b/lib/WasmReader/WasmElementSegment.cpp
@@ -9,7 +9,7 @@
 
 namespace Wasm
 {
-    WasmElementSegment::WasmElementSegment(ArenaAllocator * alloc, const UINT32 index, const WasmNode initExpr, const UINT32 numElem) :
+    WasmElementSegment::WasmElementSegment(ArenaAllocator* alloc, const uint32 index, const WasmNode initExpr, const uint32 numElem) :
         m_alloc(alloc),
         m_index(index),
         m_offsetExpr(initExpr),
@@ -19,27 +19,24 @@
         m_elems(nullptr)
     {}
 
-    void
-    WasmElementSegment::Init(const Js::WebAssemblyModule& module)
+    void WasmElementSegment::Init()
     {
         Assert(m_numElem > 0);
-        m_elems = AnewArray(m_alloc, UINT32, m_numElem);
-        memset(m_elems, Js::Constants::UninitializedValue, m_numElem * sizeof(UINT32));
+        m_elems = AnewArray(m_alloc, uint32, m_numElem);
+        memset(m_elems, Js::Constants::UninitializedValue, m_numElem * sizeof(uint32));
     }
 
-    void
-    WasmElementSegment::AddElement(const UINT32 funcIndex, const Js::WebAssemblyModule& module)
+    void WasmElementSegment::AddElement(const uint32 funcIndex)
     {
         if (m_elems == nullptr)
         {
-            Init(module);
+            Init();
         }
         Assert(m_elemIdx < m_numElem);
         m_elems[m_elemIdx++] = funcIndex;
     }
 
-    UINT32
-    WasmElementSegment::GetElement(const UINT32 tableIndex) const
+    uint32 WasmElementSegment::GetElement(const uint32 tableIndex) const
     {
         Assert(m_elems != nullptr);
         return m_elems[tableIndex];
diff --git a/lib/WasmReader/WasmElementSegment.h b/lib/WasmReader/WasmElementSegment.h
index 62b71d3..6a6c51b 100644
--- a/lib/WasmReader/WasmElementSegment.h
+++ b/lib/WasmReader/WasmElementSegment.h
@@ -11,20 +11,20 @@
     class WasmElementSegment
     {
     public:
-        WasmElementSegment(ArenaAllocator * alloc, const UINT32 index, const WasmNode initExpr, const UINT32 numElem);
-        void AddElement(const UINT32 funcIndex, const Js::WebAssemblyModule& module);
-        UINT32 GetElement(const UINT32 tableIndex) const;
-        UINT32 GetNumElements() const { return m_numElem; }
+        WasmElementSegment(ArenaAllocator* alloc, const uint32 index, const WasmNode initExpr, const uint32 numElem);
+        void AddElement(const uint32 funcIndex);
+        uint32 GetElement(const uint32 tableIndex) const;
+        uint32 GetNumElements() const { return m_numElem; }
         WasmNode GetOffsetExpr() const { return m_offsetExpr; }
     private:
         ArenaAllocator* m_alloc;
-        UINT32 m_index;
+        uint32 m_index;
         const WasmNode m_offsetExpr;
-        UINT32 m_numElem;
-        UINT32 m_offset;
-        UINT32 m_elemIdx;
-        UINT32* m_elems;
+        uint32 m_numElem;
+        uint32 m_offset;
+        uint32 m_elemIdx;
+        uint32* m_elems;
 
-        void Init(const Js::WebAssemblyModule& module);
+        void Init();
     };
 } // Namespace Wasm
diff --git a/lib/WasmReader/WasmFunctionInfo.cpp b/lib/WasmReader/WasmFunctionInfo.cpp
index 4a21464..e0bb9a1 100644
--- a/lib/WasmReader/WasmFunctionInfo.cpp
+++ b/lib/WasmReader/WasmFunctionInfo.cpp
@@ -10,7 +10,7 @@
 namespace Wasm
 {
 
-WasmFunctionInfo::WasmFunctionInfo(ArenaAllocator * alloc, WasmSignature* signature, uint32 number) : 
+WasmFunctionInfo::WasmFunctionInfo(ArenaAllocator* alloc, WasmSignature* signature, uint32 number) : 
     m_alloc(alloc),
     m_signature(signature),
     m_body(nullptr),
@@ -23,23 +23,21 @@
     , importedFunctionReference(nullptr)
 #endif
 {
-    for (uint32 i = 0; i < signature->GetParamCount(); ++i)
+    for (Js::ArgSlot i = 0; i < signature->GetParamCount(); ++i)
     {
-        m_locals.Add(Wasm::Local(signature->GetParam(i)));
+        m_locals.Add(signature->GetParam(i));
     }
 }
 
-void
-WasmFunctionInfo::AddLocal(WasmTypes::WasmType type, uint count)
+void WasmFunctionInfo::AddLocal(WasmTypes::WasmType type, uint32 count)
 {
-    for (uint i = 0; i < count; ++i)
+    for (uint32 i = 0; i < count; ++i)
     {
         m_locals.Add(Wasm::Local(type));
     }
 }
 
-Local
-WasmFunctionInfo::GetLocal(uint index) const
+Local WasmFunctionInfo::GetLocal(uint32 index) const
 {
     if (index < GetLocalCount())
     {
@@ -48,30 +46,20 @@
     return WasmTypes::Limit;
 }
 
-Local
-WasmFunctionInfo::GetParam(uint index) const
-{
-    return m_signature->GetParam(index);
-}
-
-WasmTypes::WasmType
-WasmFunctionInfo::GetResultType() const
+WasmTypes::WasmType WasmFunctionInfo::GetResultType() const
 {
     return m_signature->GetResultType();
 }
 
-uint32
-WasmFunctionInfo::GetLocalCount() const
+uint32 WasmFunctionInfo::GetLocalCount() const
 {
     return m_locals.Count();
 }
 
-uint32
-WasmFunctionInfo::GetParamCount() const
+Js::ArgSlot WasmFunctionInfo::GetParamCount() const
 {
     return m_signature->GetParamCount();
 }
 
-
 } // namespace Wasm
 #endif // ENABLE_WASM
diff --git a/lib/WasmReader/WasmFunctionInfo.h b/lib/WasmReader/WasmFunctionInfo.h
index 9cba8fa..e6f32a8 100644
--- a/lib/WasmReader/WasmFunctionInfo.h
+++ b/lib/WasmReader/WasmFunctionInfo.h
@@ -12,13 +12,12 @@
     public:
         WasmFunctionInfo(ArenaAllocator* alloc, WasmSignature* signature, uint32 number);
 
-        void AddLocal(WasmTypes::WasmType type, uint count = 1);
-        Local GetLocal(uint index) const;
-        Local GetParam(uint index) const;
+        void AddLocal(WasmTypes::WasmType type, uint32 count = 1);
+        Local GetLocal(uint32 index) const;
         WasmTypes::WasmType GetResultType() const;
 
         uint32 GetLocalCount() const;
-        uint32 GetParamCount() const;
+        Js::ArgSlot GetParamCount() const;
 
         void SetName(const char16* name, uint32 nameLength) { m_name = name; m_nameLength = nameLength; }
         const char16* GetName() const { return m_name; }
diff --git a/lib/WasmReader/WasmGlobal.h b/lib/WasmReader/WasmGlobal.h
index d717a68..1c1d5ef 100644
--- a/lib/WasmReader/WasmGlobal.h
+++ b/lib/WasmReader/WasmGlobal.h
@@ -10,7 +10,7 @@
     class WasmGlobal
     {
     public:
-        WasmGlobal(GlobalReferenceTypes::Type refType, uint offset, WasmTypes::WasmType type, bool isMutable, WasmNode init) :
+        WasmGlobal(GlobalReferenceTypes::Type refType, uint32 offset, WasmTypes::WasmType type, bool isMutable, WasmNode init) :
             m_rType(refType),
             m_offset(offset),
             m_type(type),
@@ -19,7 +19,7 @@
         {};
         WasmTypes::WasmType GetType() const { return m_type; }
         bool IsMutable() const { return m_isMutable; }
-        uint GetOffset() const { return m_offset; }
+        uint32 GetOffset() const { return m_offset; }
         GlobalReferenceTypes::Type GetReferenceType() const { return m_rType; }
 
         WasmConstLitNode GetConstInit() const;
@@ -28,7 +28,7 @@
         GlobalReferenceTypes::Type m_rType;
         WasmTypes::WasmType m_type;
         bool m_isMutable;
-        uint m_offset;
+        uint32 m_offset;
         WasmNode m_init;
     };
 } // namespace Wasm
diff --git a/lib/WasmReader/WasmLimits.h b/lib/WasmReader/WasmLimits.h
new file mode 100644
index 0000000..2aba3b5
--- /dev/null
+++ b/lib/WasmReader/WasmLimits.h
@@ -0,0 +1,50 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+#pragma once
+
+#ifdef ENABLE_WASM
+namespace Wasm {
+    class Limits {
+        // The limits are agreed upon with other engines for consistency.
+        static const uint32 MaxTypes = 1000000;
+        static const uint32 MaxFunctions = 1000000;
+        static const uint32 MaxImports = 100000;
+        static const uint32 MaxExports = 100000;
+        static const uint32 MaxGlobals = 1000000;
+        static const uint32 MaxDataSegments = 100000;
+        static const uint32 MaxElementSegments = 10000000;
+        static const uint32 MaxTableSize = DEFAULT_CONFIG_WasmMaxTableSize;
+
+        static const uint32 MaxStringSize = 100000;
+        static const uint32 MaxFunctionLocals = 50000;
+        static const uint32 MaxFunctionParams = 1000;
+        static const uint32 MaxBrTableElems = 1000000;
+
+        static const uint32 MaxMemoryInitialPages = 16384;
+        static const uint32 MaxMemoryMaximumPages = 65536;
+        static const uint32 MaxModuleSize = 1024 * 1024 * 1024;
+        static const uint32 MaxFunctionSize = 128 * 1024;
+    public:
+        // Use accessors to easily switch to config flags if needed
+        static uint32 GetMaxTypes() { return MaxTypes; }
+        static uint32 GetMaxFunctions() { return MaxFunctions; }
+        static uint32 GetMaxImports() { return MaxImports; }
+        static uint32 GetMaxExports() { return MaxExports; }
+        static uint32 GetMaxGlobals() { return MaxGlobals; }
+        static uint32 GetMaxDataSegments() { return MaxDataSegments; }
+        static uint32 GetMaxElementSegments() { return MaxElementSegments; }
+        static uint32 GetMaxTableSize() { return CONFIG_FLAG(WasmMaxTableSize); }
+        static uint32 GetMaxStringSize() { return MaxStringSize; }
+        static uint32 GetMaxFunctionLocals() { return MaxFunctionLocals; }
+        static uint32 GetMaxFunctionParams() { return MaxFunctionParams; }
+        static uint64 GetMaxBrTableElems() { return MaxBrTableElems; }
+        static uint32 GetMaxMemoryInitialPages() { return MaxMemoryInitialPages; }
+        static uint32 GetMaxMemoryMaximumPages() { return MaxMemoryMaximumPages; }
+        static uint32 GetMaxModuleSize() { return MaxModuleSize; }
+        static uint32 GetMaxFunctionSize() { return MaxFunctionSize; }
+    };
+}
+#endif
diff --git a/lib/WasmReader/WasmParseTree.h b/lib/WasmReader/WasmParseTree.h
index c4efe7d..3861f3be 100644
--- a/lib/WasmReader/WasmParseTree.h
+++ b/lib/WasmReader/WasmParseTree.h
@@ -22,6 +22,7 @@
         };
         bool IsLocalType(WasmTypes::WasmType type);
         uint32 GetTypeByteSize(WasmType type);
+        const char16* GetTypeName(WasmType type);
     }
 
     namespace ExternalKinds
@@ -81,7 +82,7 @@
 
     struct WasmVarNode
     {
-        uint num;
+        uint32 num;
         union
         {
             LPCUTF8 exportName;
diff --git a/lib/WasmReader/WasmReader.h b/lib/WasmReader/WasmReader.h
index 23d4678..1f3f5b6 100644
--- a/lib/WasmReader/WasmReader.h
+++ b/lib/WasmReader/WasmReader.h
@@ -20,25 +20,23 @@
     }
 
 // Level of tracing
-#define DO_WASM_TRACE_ALL       PHASE_TRACE1(Js::WasmBytecodePhase)
+#define DO_WASM_TRACE_ALL       PHASE_TRACE1(Js::WasmPhase)
+#define DO_WASM_TRACE_BYTECODE  DO_WASM_TRACE_ALL || PHASE_TRACE1(Js::WasmBytecodePhase)
 #define DO_WASM_TRACE_DECODER   DO_WASM_TRACE_ALL || PHASE_TRACE1(Js::WasmReaderPhase)
   #define DO_WASM_TRACE_SECTION DO_WASM_TRACE_DECODER || PHASE_TRACE1(Js::WasmSectionPhase)
-#define DO_WASM_TRACE_LEB128    DO_WASM_TRACE_ALL || PHASE_TRACE1(Js::WasmLEB128Phase)
-
+#define DO_WASM_TRACE_LEB128    PHASE_TRACE1(Js::WasmLEB128Phase)
+#else
+#define TRACE_WASM(...)
+#define DO_WASM_TRACE_ALL (false)
+#define DO_WASM_TRACE_BYTECODE (false)
+#define DO_WASM_TRACE_DECODER (false)
+#define DO_WASM_TRACE_SECTION (false)
+#define DO_WASM_TRACE_LEB128 (false)
+#endif
+#define TRACE_WASM_BYTECODE(...) TRACE_WASM(DO_WASM_TRACE_BYTECODE, __VA_ARGS__)
 #define TRACE_WASM_DECODER(...) TRACE_WASM(DO_WASM_TRACE_DECODER, __VA_ARGS__)
 #define TRACE_WASM_SECTION(...) TRACE_WASM(DO_WASM_TRACE_SECTION, __VA_ARGS__)
 #define TRACE_WASM_LEB128(...) TRACE_WASM(DO_WASM_TRACE_LEB128, __VA_ARGS__)
-#else
-#define DO_WASM_TRACE_ALL
-#define DO_WASM_TRACE_DECODER
-#define DO_WASM_TRACE_SECTION
-#define DO_WASM_TRACE_LEB128
-
-#define TRACE_WASM(...)
-#define TRACE_WASM_DECODER(...)
-#define TRACE_WASM_SECTION(...)
-#define TRACE_WASM_LEB128(...)
-#endif
 
 namespace Wasm
 {
diff --git a/lib/WasmReader/WasmSection.h b/lib/WasmReader/WasmSection.h
index 2f45e6c..9df6808 100644
--- a/lib/WasmReader/WasmSection.h
+++ b/lib/WasmReader/WasmSection.h
@@ -20,7 +20,7 @@
     {
 #include "WasmSections.h"
         bSectLimit,
-        bsectLastKnownSection = bSectDataSegments
+        bsectLastKnownSection = bSectData
     };
 
     struct SectionInfo
diff --git a/lib/WasmReader/WasmSections.h b/lib/WasmReader/WasmSections.h
index 7bf7c00..155b799 100644
--- a/lib/WasmReader/WasmSections.h
+++ b/lib/WasmReader/WasmSections.h
@@ -3,18 +3,18 @@
 // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
 //-------------------------------------------------------------------------------------------------------
 
-//          (internalName         , ID                   , SectionFlag, Precedent         )
-WASM_SECTION(Custom               , "custom"             , fSectNone  , Limit             )
-WASM_SECTION(Signatures           , "type"               , fSectNone  , Limit             )
-WASM_SECTION(ImportTable          , "import"             , fSectNone  , Limit             )
-WASM_SECTION(FunctionSignatures   , "function"           , fSectNone  , Signatures        )
-WASM_SECTION(IndirectFunctionTable, "table"              , fSectNone  , Limit             )
-WASM_SECTION(Memory               , "memory"             , fSectNone  , Limit             )
-WASM_SECTION(Global               , "global"             , fSectNone  , Limit             )
-WASM_SECTION(ExportTable          , "export"             , fSectNone  , Limit             )
-WASM_SECTION(StartFunction        , "start"              , fSectNone  , Signatures        )
-WASM_SECTION(Element              , "element"            , fSectNone  , Limit             )
-WASM_SECTION(FunctionBodies       , "code"               , fSectNone  , FunctionSignatures)
-WASM_SECTION(DataSegments         , "data"               , fSectNone  , Limit             )
-WASM_SECTION(Names                , "name"               , fSectIgnore, Signatures        )
+//          (internalName   , ID         , SectionFlag, Precedent )
+WASM_SECTION(Custom         , "custom"   , fSectNone  , Limit     )
+WASM_SECTION(Type           , "type"     , fSectNone  , Limit     )
+WASM_SECTION(Import         , "import"   , fSectNone  , Limit     )
+WASM_SECTION(Function       , "function" , fSectNone  , Type      )
+WASM_SECTION(Table          , "table"    , fSectNone  , Limit     )
+WASM_SECTION(Memory         , "memory"   , fSectNone  , Limit     )
+WASM_SECTION(Global         , "global"   , fSectNone  , Limit     )
+WASM_SECTION(Export         , "export"   , fSectNone  , Limit     )
+WASM_SECTION(StartFunction  , "start"    , fSectNone  , Type      )
+WASM_SECTION(Element        , "element"  , fSectNone  , Limit     )
+WASM_SECTION(FunctionBodies , "code"     , fSectNone  , Function  )
+WASM_SECTION(Data           , "data"     , fSectNone  , Limit     )
+WASM_SECTION(Name           , "name"     , fSectIgnore, Type      )
 #undef WASM_SECTION
diff --git a/lib/WasmReader/WasmSignature.cpp b/lib/WasmReader/WasmSignature.cpp
index efacd29..b1eecc0 100644
--- a/lib/WasmReader/WasmSignature.cpp
+++ b/lib/WasmReader/WasmSignature.cpp
@@ -13,15 +13,14 @@
 WasmSignature::WasmSignature() :
     m_resultType(WasmTypes::Void),
     m_id(Js::Constants::UninitializedValue),
-    m_paramSize(Js::Constants::UninitializedValue),
+    m_paramSize(Js::Constants::InvalidArgSlot),
     m_params(nullptr),
     m_paramsCount(0),
     m_shortSig(Js::Constants::InvalidSignature)
 {
 }
 
-void
-WasmSignature::AllocateParams(uint32 count, Recycler * recycler)
+void WasmSignature::AllocateParams(Js::ArgSlot count, Recycler * recycler)
 {
     if (count > 0)
     {
@@ -30,66 +29,57 @@
     m_paramsCount = count;
 }
 
-void
-WasmSignature::SetParam(WasmTypes::WasmType type, uint32 index)
+void WasmSignature::SetParam(WasmTypes::WasmType type, Js::ArgSlot index)
 {
     if (index >= GetParamCount())
     {
-        throw WasmCompilationException(_u("Parameter %d out of range (max %d)"), index, GetParamCount());
+        throw WasmCompilationException(_u("Parameter %u out of range (max %u)"), index, GetParamCount());
     }
     m_params[index] = Local(type);
 }
 
-void
-WasmSignature::SetResultType(WasmTypes::WasmType type)
+void WasmSignature::SetResultType(WasmTypes::WasmType type)
 {
     Assert(m_resultType == WasmTypes::Void);
     m_resultType = type;
 }
 
-void
-WasmSignature::SetSignatureId(uint32 id)
+void WasmSignature::SetSignatureId(uint32 id)
 {
     Assert(m_id == Js::Constants::UninitializedValue);
     m_id = id;
 }
 
-Local
-WasmSignature::GetParam(uint index) const
+Local WasmSignature::GetParam(Js::ArgSlot index) const
 {
     if (index >= GetParamCount())
     {
-        throw WasmCompilationException(_u("Parameter %d out of range (max %d)"), index, GetParamCount());
+        throw WasmCompilationException(_u("Parameter %u out of range (max %u)"), index, GetParamCount());
     }
     return m_params[index];
 }
 
-WasmTypes::WasmType
-WasmSignature::GetResultType() const
+WasmTypes::WasmType WasmSignature::GetResultType() const
 {
     return m_resultType;
 }
 
-uint32
-WasmSignature::GetParamCount() const
+Js::ArgSlot WasmSignature::GetParamCount() const
 {
     return m_paramsCount;
 }
 
-uint32
-WasmSignature::GetSignatureId() const
+uint32 WasmSignature::GetSignatureId() const
 {
     return m_id;
 }
 
-size_t
-WasmSignature::GetShortSig() const
+size_t WasmSignature::GetShortSig() const
 {
     return m_shortSig;
 }
 
-bool
-WasmSignature::IsEquivalent(const WasmSignature* sig) const
+bool WasmSignature::IsEquivalent(const WasmSignature* sig) const
 {
     if (m_shortSig != Js::Constants::InvalidSignature)
     {
@@ -104,7 +94,7 @@
     return false;
 }
 
-uint32 WasmSignature::GetParamSize(uint index) const
+Js::ArgSlot WasmSignature::GetParamSize(Js::ArgSlot index) const
 {
     switch (GetParam(index))
     {
@@ -130,16 +120,18 @@
     }
 }
 
-void
-WasmSignature::FinalizeSignature()
+void WasmSignature::FinalizeSignature()
 {
-    Assert(m_paramSize == Js::Constants::UninitializedValue);
+    Assert(m_paramSize == Js::Constants::InvalidArgSlot);
     Assert(m_shortSig == Js::Constants::InvalidSignature);
-
+    const Js::ArgSlot paramCount = GetParamCount();
     m_paramSize = 0;
-    for (uint32 i = 0; i < GetParamCount(); ++i)
+    for (Js::ArgSlot i = 0; i < paramCount; ++i)
     {
-        m_paramSize += GetParamSize(i);
+        if (ArgSlotMath::Add(m_paramSize, GetParamSize(i), &m_paramSize))
+        {
+            throw WasmCompilationException(_u("Argument size too big"));
+        }
     }
 
     CompileAssert(Local::Limit - 1 <= 4);
@@ -147,11 +139,11 @@
 
     // 3 bits for result type, 2 for each arg
     // we don't need to reserve a sentinel bit because there is no result type with value of 7
-    int sigSize = 3 + 2 * GetParamCount();
+    uint32 sigSize = ((uint32)paramCount) * 2 + 3;
     if (sigSize <= sizeof(m_shortSig) << 3)
     {
         m_shortSig = (m_shortSig << 3) | m_resultType;
-        for (uint32 i = 0; i < GetParamCount(); ++i)
+        for (Js::ArgSlot i = 0; i < paramCount; ++i)
         {
             // we can use 2 bits per arg by dropping void
             m_shortSig = (m_shortSig << 2) | (m_params[i] - 1);
@@ -159,14 +151,12 @@
     }
 }
 
-uint32
-WasmSignature::GetParamsSize() const
+Js::ArgSlot WasmSignature::GetParamsSize() const
 {
     return m_paramSize;
 }
 
-WasmSignature *
-WasmSignature::FromIDL(WasmSignatureIDL* sig)
+WasmSignature* WasmSignature::FromIDL(WasmSignatureIDL* sig)
 {
     // must update WasmSignatureIDL when changing WasmSignature
     CompileAssert(sizeof(Wasm::WasmSignature) == sizeof(WasmSignatureIDL));
@@ -181,53 +171,37 @@
     return reinterpret_cast<WasmSignature*>(sig);
 }
 
-void
-WasmSignature::Dump()
+uint32 WasmSignature::WriteSignatureToString(_Out_writes_(maxlen) char16* out, uint32 maxlen)
+{
+    AssertOrFailFast(out != nullptr);
+    uint32 numwritten = 0;
+    numwritten += _snwprintf_s(out+numwritten, maxlen-numwritten, _TRUNCATE, _u("("));
+    for (Js::ArgSlot i = 0; i < this->GetParamCount(); i++)
+    {
+        if (i != 0)
+        {
+            numwritten += _snwprintf_s(out+numwritten, maxlen-numwritten, _TRUNCATE, _u(", "));
+        }
+        numwritten += _snwprintf_s(out+numwritten, maxlen-numwritten, _TRUNCATE, _u("%ls"), WasmTypes::GetTypeName(this->GetParam(i)));
+    }
+    if (numwritten >= maxlen-12) {
+        // null out the last 12 characters so we can properly end it 
+        for (int i = 1; i <= 12; i++) {
+            *(out + maxlen - i) = 0;
+        }
+        numwritten -= 12;
+        numwritten += _snwprintf_s(out + numwritten, maxlen - numwritten, _TRUNCATE, _u("..."));
+    }
+    numwritten += _snwprintf_s(out + numwritten, maxlen - numwritten, _TRUNCATE, _u(")->%ls"), WasmTypes::GetTypeName(this->GetResultType()));
+    return numwritten;
+}
+
+void WasmSignature::Dump()
 {
 #ifdef ENABLE_DEBUG_CONFIG_OPTIONS
-    Output::Print(_u("("));
-    for(uint32 i = 0; i < this->GetParamCount(); i++)
-    {
-        if(i != 0)
-        {
-            Output::Print(_u(", "));
-        }
-        switch(this->GetParam(i)) {
-            case WasmTypes::WasmType::Void:
-                Output::Print(_u("void"));
-                break;
-            case WasmTypes::WasmType::I32:
-                Output::Print(_u("i32"));
-                break;
-            case WasmTypes::WasmType::I64:
-                Output::Print(_u("i64"));
-                break;
-            case WasmTypes::WasmType::F32:
-                Output::Print(_u("f32"));
-                break;
-            case WasmTypes::WasmType::F64:
-                Output::Print(_u("f64"));
-                break;
-        }
-    }
-    Output::Print(_u(") -> "));
-    switch(this->GetResultType()) {
-        case WasmTypes::WasmType::Void:
-            Output::Print(_u("void"));
-            break;
-        case WasmTypes::WasmType::I32:
-            Output::Print(_u("i32"));
-            break;
-        case WasmTypes::WasmType::I64:
-            Output::Print(_u("i64"));
-            break;
-        case WasmTypes::WasmType::F32:
-            Output::Print(_u("f32"));
-            break;
-        case WasmTypes::WasmType::F64:
-            Output::Print(_u("f64"));
-            break;
-    }
+    char16 buf[512] = { 0 };
+    this->WriteSignatureToString(buf, 512);
+    Output::Print(buf);
 #endif
 }
 
diff --git a/lib/WasmReader/WasmSignature.h b/lib/WasmReader/WasmSignature.h
index 4735ccf..144ad81 100644
--- a/lib/WasmReader/WasmSignature.h
+++ b/lib/WasmReader/WasmSignature.h
@@ -12,31 +12,32 @@
 public:
     WasmSignature();
 
-    void AllocateParams(uint32 count, Recycler * recycler);
-    void SetParam(WasmTypes::WasmType type, uint32 index);
+    void AllocateParams(Js::ArgSlot count, Recycler * recycler);
+    void SetParam(WasmTypes::WasmType type, Js::ArgSlot index);
     void SetResultType(WasmTypes::WasmType type);
     void SetSignatureId(uint32 id);
 
-    Local GetParam(uint index) const;
+    Local GetParam(Js::ArgSlot index) const;
     WasmTypes::WasmType GetResultType() const;
-    uint32 GetParamCount() const;
-    uint32 GetParamSize(uint index) const;
-    uint32 GetParamsSize() const;
+    Js::ArgSlot GetParamCount() const;
+    Js::ArgSlot GetParamSize(Js::ArgSlot index) const;
+    Js::ArgSlot GetParamsSize() const;
     void FinalizeSignature();
     uint32 GetSignatureId() const;
     size_t GetShortSig() const;
 
     bool IsEquivalent(const WasmSignature* sig) const;
-    static WasmSignature * FromIDL(WasmSignatureIDL* sig);
+    static WasmSignature* FromIDL(WasmSignatureIDL* sig);
 
-    static uint GetOffsetOfShortSig() { return offsetof(WasmSignature, m_shortSig); }
+    static uint32 GetOffsetOfShortSig() { return offsetof(WasmSignature, m_shortSig); }
 
+    uint32 WriteSignatureToString(_Out_writes_(maxlen) char16 *out, uint32 maxlen);
     void Dump();
 private:
     Field(WasmTypes::WasmType) m_resultType;
     Field(uint32) m_id;
-    Field(uint32) m_paramSize;
-    Field(uint32) m_paramsCount;
+    Field(Js::ArgSlot) m_paramSize;
+    Field(Js::ArgSlot) m_paramsCount;
     Field(size_t) m_shortSig;
     Field(Local*) m_params;
 };
diff --git a/lib/wabt/CMakeLists.txt b/lib/wabt/CMakeLists.txt
index a2c8481..7ada506 100644
--- a/lib/wabt/CMakeLists.txt
+++ b/lib/wabt/CMakeLists.txt
@@ -67,9 +67,8 @@
   add_definitions(-fcolor-diagnostics)
 endif ()
 
-  set(AST_PARSER_GEN_C src/prebuilt/ast-parser-gen.cc)
-  include_directories(src/prebuilt)
-
+set(AST_PARSER_GEN_C src/prebuilt/wast-parser-gen.cc)
+include_directories(src/prebuilt)
 
 if (COMPILER_IS_CLANG OR COMPILER_IS_GNU)
   # yyerror passes a non-string-literal to a printf-like function, which is a
@@ -82,38 +81,45 @@
 endif ()
 
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${WABT_SOURCE_DIR}/cmake)
-  set(AST_LEXER_GEN_C src/prebuilt/ast-lexer-gen.cc)
+set(AST_LEXER_GEN_C src/prebuilt/wast-lexer-gen.cc)
 
 add_custom_target(everything)
 
 add_library(libwabt OBJECT
-  src/ast.cc
-  src/ast-parser-lexer-shared.cc
   ${AST_LEXER_GEN_C}
   ${AST_PARSER_GEN_C}
-  src/type-checker.cc
-  src/validator.cc
-
-  src/binary-reader.cc
-  src/binary-writer.cc
-  src/binary-writer-spec.cc
-  src/binary-reader-ast.cc
-  src/binding-hash.cc
-  src/ast-writer.cc
-  src/interpreter.cc
-  src/binary-reader-interpreter.cc
   src/apply-names.cc
-  src/generate-names.cc
-  src/resolve-names.cc
-  src/hash-util.cc
-  src/string-view.cc
-
+  src/binary-error-handler.cc
+  src/binary-reader-ir.cc
+  src/binary-reader-logging.cc
+  src/binary-reader-objdump.cc
+  src/binary-reader-opcnt.cc
+  src/binary-reader.cc
+  src/binary-writer-spec.cc
+  src/binary-writer.cc
   src/binary.cc
+  src/binding-hash.cc
   src/common.cc
   src/config.cc
+  src/emscripten-helpers.cc
+  src/expr-visitor.cc
+  src/generate-names.cc
+  src/hash-util.cc
+  src/ir.cc
+  src/lexer-source-line-finder.cc
+  src/lexer-source.cc
   src/literal.cc
+  src/opcode.cc
   src/option-parser.cc
+  src/resolve-names.cc
+  src/source-error-handler.cc
   src/stream.cc
+  src/string-view.cc
+  src/type-checker.cc
+  src/utf8.cc
+  src/validator.cc
+  src/wast-parser-lexer-shared.cc
+  src/wat-writer.cc
   src/writer.cc
 
   chakra/wabtapi.cc
diff --git a/lib/wabt/chakra/wabtapi.cc b/lib/wabt/chakra/wabtapi.cc
index be3d716..457c9db 100644
--- a/lib/wabt/chakra/wabtapi.cc
+++ b/lib/wabt/chakra/wabtapi.cc
@@ -4,31 +4,58 @@
 //-------------------------------------------------------------------------------------------------------
 
 #include "wabtapi.h"
+
+#pragma warning(push, 0)
 #include "writer.h"
-#include "ast-lexer.h"
-#include "ast.h"
-#include "ast-parser.h"
+#include "wast-parser.h"
+#include "wast-lexer.h"
 #include "resolve-names.h"
 #include "binary-writer.h"
+#include "source-error-handler.h"
+#include "ir.h"
+#pragma warning(pop)
 
 using namespace wabt;
 using namespace ChakraWabt;
 
+class MySourceErrorHandler : public SourceErrorHandler
+{
+public:
+
+    virtual bool OnError(const Location* loc, const std::string& error, const std::string& source_line, size_t source_line_column_offset) override
+    {
+        int colStart = loc->first_column - 1 - (int)source_line_column_offset;
+        int sourceErrorLength = (loc->last_column - loc->first_column) - 2;
+        if (sourceErrorLength < 0)
+        {
+            // -2 probably overflowed
+            sourceErrorLength = 0;
+        }
+        char buf[4096];
+        wabt_snprintf(buf, 4096, "Wast Parsing error:%u:%u:\n%s\n%s\n%*s^%*s^",
+                      loc->line,
+                      loc->first_column,
+                      error.c_str(),
+                      source_line.c_str(),
+                      colStart, "",
+                      sourceErrorLength, "");
+        throw Error(buf);
+    }
+
+
+    virtual size_t source_line_max_length() const override
+    {
+        return 256;
+    }
+
+};
+
 struct MemoryWriterContext
 {
     MemoryWriter* writer;
     Context* ctx;
 };
 
-struct AutoCleanLexer
-{
-    AstLexer* lexer;
-    ~AutoCleanLexer()
-    {
-        destroy_ast_lexer(lexer);
-    }
-};
-
 struct AutoCleanScript
 {
     Script* script;
@@ -47,57 +74,6 @@
     return (uint)value;
 }
 
-void ensure_output_buffer_capacity(OutputBuffer* buf, size_t ensure_capacity, MemoryWriterContext* context)
-{
-    if (ensure_capacity > buf->capacity)
-    {
-        assert(buf->capacity != 0);
-        size_t newCapacity = buf->capacity * 2;
-        while (newCapacity < ensure_capacity)
-            newCapacity *= 2;
-        char* new_data = (char*)context->ctx->Allocate(TruncSizeT(newCapacity));
-        memcpy(new_data, buf->start, buf->capacity);
-        buf->start = new_data;
-        buf->capacity = newCapacity;
-    }
-}
-
-Result write_data_to_output_buffer(size_t offset,
-                                         const void* data,
-                                         size_t size,
-                                         void* user_data)
-{
-    MemoryWriterContext* context = static_cast<MemoryWriterContext*>(user_data);
-    MemoryWriter* writer = context->writer;
-    size_t end = offset + size;
-    ensure_output_buffer_capacity(&writer->buf, end, context);
-    memcpy(writer->buf.start + offset, data, size);
-    if (end > writer->buf.size)
-        writer->buf.size = end;
-    return Result::Ok;
-}
-
-Result move_data_in_output_buffer(size_t dst_offset,
-                                        size_t src_offset,
-                                        size_t size,
-                                        void* user_data)
-{
-    MemoryWriterContext* context = static_cast<MemoryWriterContext*>(user_data);
-    MemoryWriter* writer = context->writer;
-    size_t src_end = src_offset + size;
-    size_t dst_end = dst_offset + size;
-    size_t end = src_end > dst_end ? src_end : dst_end;
-    ensure_output_buffer_capacity(&writer->buf, end, context);
-    void* dst = reinterpret_cast<void*>(
-        reinterpret_cast<size_t>(writer->buf.start) + dst_offset);
-    void* src = reinterpret_cast<void*>(
-        reinterpret_cast<size_t>(writer->buf.start) + src_offset);
-    memmove(dst, src, size);
-    if (end > writer->buf.size)
-        writer->buf.size = end;
-    return Result::Ok;
-}
-
 void set_property(Context* ctx, Js::Var obj, PropertyId id, Js::Var value, const char* messageIfFailed)
 {
     bool success = ctx->spec->setProperty(obj, id, value, ctx->user_data);
@@ -232,7 +208,7 @@
 
 void write_action_result_type(Context* ctx, Js::Var obj, PropertyId id, Script* script, const Action* action)
 {
-    const Module* module = get_module_by_var(script, &action->module_var);
+    const Module* module = script->GetModule(action->module_var);
     const Export* export_;
     Js::Var resultArr = ctx->spec->createArray(ctx->user_data);
     set_property(ctx, obj, id, resultArr, "Unable to set action result type");
@@ -241,14 +217,14 @@
     {
     case ActionType::Invoke:
     {
-        export_ = get_export_by_name(module, &action->name);
+        export_ = module->GetExport(action->name);
         assert(export_->kind == ExternalKind::Func);
-        Func* func = get_func_by_var(module, &export_->var);
-        int num_results = (int)get_num_results(func);
-        int i;
+        const Func* func = module->GetFunc(export_->var);
+        wabt::Index num_results = func->GetNumResults();
+        wabt::Index i;
         for (i = 0; i < num_results; ++i)
         {
-            Js::Var typeObj = create_type_object(ctx, get_result_type(func, i));
+            Js::Var typeObj = create_type_object(ctx, func->GetResultType(i));
             ctx->spec->push(resultArr, typeObj, ctx->user_data);
         }
         break;
@@ -256,9 +232,9 @@
 
     case ActionType::Get:
     {
-        export_ = get_export_by_name(module, &action->name);
+        export_ = module->GetExport(action->name);
         assert(export_->kind == ExternalKind::Global);
-        Global* global = get_global_by_var(module, &export_->var);
+        const Global* global = module->GetGlobal(export_->var);
         Js::Var typeObj = create_type_object(ctx, global->type);
         ctx->spec->push(resultArr, typeObj, ctx->user_data);
         break;
@@ -305,19 +281,15 @@
     }
     MemoryWriter writer;
     MemoryWriterContext context{ &writer, ctx };
-    writer.base.move_data = move_data_in_output_buffer;
-    writer.base.write_data = write_data_to_output_buffer;
-    writer.base.user_data = &context;
-    writer.buf.size = 0;
-    size_t capacity = writer.buf.capacity = 256;
-    writer.buf.start = (char*)ctx->Allocate(TruncSizeT(capacity));
     WriteBinaryOptions s_write_binary_options = { nullptr, true, false, false };
-    Result result = write_binary_module(&writer.base, module, &s_write_binary_options);
+    Result result = write_binary_module(&writer, module, &s_write_binary_options);
     if (!WABT_SUCCEEDED(result))
     {
         throw Error("Error while writing module");
     }
-    return ctx->createBuffer(writer.buf.start, TruncSizeT(writer.buf.size), ctx->user_data);
+    const char* data = (const char*)writer.output_buffer().data.data();
+    const size_t size = writer.output_buffer().size();
+    return ctx->createBuffer(data, TruncSizeT(size), ctx->user_data);
 }
 
 void write_module(Context* ctx, Js::Var obj, Module* module)
@@ -326,18 +298,31 @@
     set_property(ctx, obj, PropertyIds::buffer, buffer, "Unable to set module");
 }
 
-static void write_invalid_module(Context* ctx, Js::Var obj, const RawModule* module, StringSlice text)
+static void write_invalid_module(Context* ctx, Js::Var obj, const ScriptModule* module, StringSlice text)
 {
-    write_location(ctx, obj, get_raw_module_location(module));
+    write_location(ctx, obj, &module->GetLocation());
     write_string(ctx, obj, PropertyIds::text, text);
-    if (module->type == RawModuleType::Text)
+    switch (module->type)
     {
+    case ScriptModule::Type::Text:
         write_module(ctx, obj, module->text);
-        return;
+        break;
+    case ScriptModule::Type::Binary:
+    {
+        Js::Var buffer = ctx->createBuffer(module->binary.data, TruncSizeT(module->binary.size), ctx->user_data);
+        set_property(ctx, obj, PropertyIds::buffer, buffer, "Unable to set invalid module");
+        break;
     }
-    assert(module->type == RawModuleType::Binary);
-    Js::Var buffer = ctx->createBuffer(module->binary.data, TruncSizeT(module->binary.size), ctx->user_data);
-    set_property(ctx, obj, PropertyIds::buffer, buffer, "Unable to set invalid module");
+    case ScriptModule::Type::Quoted:
+    {
+        Js::Var buffer = ctx->createBuffer(module->quoted.data, TruncSizeT(module->quoted.size), ctx->user_data);
+        set_property(ctx, obj, PropertyIds::buffer, buffer, "Unable to set invalid module");
+        break;
+    }
+    default:
+        assert(false);
+        break;
+    }
 }
 
 Js::Var write_commands(Context* ctx, Script* script) {
@@ -345,9 +330,8 @@
     Js::Var resultObj = ctx->spec->createObject(ctx->user_data);
     Js::Var commandsArr = ctx->spec->createArray(ctx->user_data);
     set_property(ctx, resultObj, PropertyIds::commands, commandsArr, "Unable to set commands");
-    size_t i;
-    int last_module_index = -1;
-    for (i = 0; i < script->commands.size(); ++i) {
+    wabt::Index last_module_index = (wabt::Index)-1;
+    for (wabt::Index i = 0; i < script->commands.size(); ++i) {
         const Command* command = script->commands[i].get();
 
         if (command->type == CommandType::AssertInvalidNonBinary)
@@ -364,7 +348,7 @@
                 write_string(ctx, cmdObj, PropertyIds::name, module->name);
             }
             write_module(ctx, cmdObj, module);
-            last_module_index = static_cast<int>(i);
+            last_module_index = i;
             break;
         }
 
@@ -440,31 +424,6 @@
     return resultObj;
 }
 
-bool lexer_error_callback(const Location* loc,
-                          const char* error,
-                          const char* source_line,
-                          size_t,
-                          size_t source_line_column_offset,
-                          void*)
-{
-    int colStart = loc->first_column - 1 - (int)source_line_column_offset;
-    int sourceErrorLength = (loc->last_column - loc->first_column) - 2;
-    if (sourceErrorLength < 0)
-    {
-        // -2 probably overflowed
-        sourceErrorLength = 0;
-    }
-    char buf[4096];
-    wabt_snprintf(buf, 4096, "Wast Parsing error:%u:%u:\n%s\n%s\n%*s^%*s^",
-                loc->line,
-                loc->first_column,
-                error,
-                source_line,
-                colStart, "",
-                sourceErrorLength, "");
-    throw Error(buf);
-};
-
 void Context::Validate(bool isSpec) const
 {
     if (!allocator) throw Error("Missing allocator");
@@ -486,24 +445,19 @@
 {
     ctx.Validate(isSpecText);
 
-    AstLexer* lexer = new_ast_buffer_lexer("", buffer, (size_t)bufferSize);
-    AutoCleanLexer autoCleanLexer = { lexer };
+    std::unique_ptr<WastLexer> lexer = WastLexer::CreateBufferLexer("", buffer, (size_t)bufferSize);
 
-    SourceErrorHandler s_error_handler = {
-        lexer_error_callback,
-        256,
-        nullptr
-    };
+    MySourceErrorHandler s_error_handler;
 
     Script* script;
-    Result result = parse_ast(lexer, &script, &s_error_handler);
+    Result result = parse_wast(lexer.get(), &script, &s_error_handler);
     AutoCleanScript autoCleanScript = { script };
     if (!WABT_SUCCEEDED(result))
     {
         throw Error("Invalid wast script");
     }
 
-    result = resolve_names_script(lexer, script, &s_error_handler);
+    result = resolve_names_script(lexer.get(), script, &s_error_handler);
     if (!WABT_SUCCEEDED(result))
     {
         throw Error("Unable to resolve script's names");
@@ -516,7 +470,7 @@
     }
     else
     {
-        Module* module = get_first_module(script);
+        Module* module = script->GetFirstModule();
         returnValue = create_module(&ctx, module);
     }
     return returnValue;
diff --git a/lib/wabt/src/apply-names.cc b/lib/wabt/src/apply-names.cc
index e3bfc96..b1c7729 100644
--- a/lib/wabt/src/apply-names.cc
+++ b/lib/wabt/src/apply-names.cc
@@ -16,12 +16,12 @@
 
 #include "apply-names.h"
 
-#include <assert.h>
-#include <stdio.h>
-
+#include <cassert>
+#include <cstdio>
 #include <vector>
 
-#include "ast.h"
+#include "expr-visitor.h"
+#include "ir.h"
 
 #define CHECK_RESULT(expr)  \
   do {                      \
@@ -33,46 +33,81 @@
 
 namespace {
 
-struct Context {
-  Context();
+class NameApplier : public ExprVisitor::DelegateNop {
+ public:
+  NameApplier();
 
-  Module* module = nullptr;
-  Func* current_func = nullptr;
-  ExprVisitor visitor;
+  Result VisitModule(Module* module);
+
+  // Implementation of ExprVisitor::DelegateNop.
+  Result BeginBlockExpr(Expr*) override;
+  Result EndBlockExpr(Expr*) override;
+  Result OnBrExpr(Expr*) override;
+  Result OnBrIfExpr(Expr*) override;
+  Result OnBrTableExpr(Expr*) override;
+  Result OnCallExpr(Expr*) override;
+  Result OnCallIndirectExpr(Expr*) override;
+  Result OnGetGlobalExpr(Expr*) override;
+  Result OnGetLocalExpr(Expr*) override;
+  Result BeginIfExpr(Expr*) override;
+  Result EndIfExpr(Expr*) override;
+  Result BeginLoopExpr(Expr*) override;
+  Result EndLoopExpr(Expr*) override;
+  Result OnSetGlobalExpr(Expr*) override;
+  Result OnSetLocalExpr(Expr*) override;
+  Result OnTeeLocalExpr(Expr*) override;
+
+ private:
+  void PushLabel(Label* label);
+  void PopLabel();
+  Label* FindLabelByVar(Var* var);
+  void UseNameForVar(StringSlice* name, Var* var);
+  Result UseNameForFuncTypeVar(Module* module, Var* var);
+  Result UseNameForFuncVar(Module* module, Var* var);
+  Result UseNameForGlobalVar(Module* module, Var* var);
+  Result UseNameForTableVar(Module* module, Var* var);
+  Result UseNameForMemoryVar(Module* module, Var* var);
+  Result UseNameForParamAndLocalVar(Func* func, Var* var);
+  Result VisitFunc(Index func_index, Func* func);
+  Result VisitExport(Index export_index, Export* export_);
+  Result VisitElemSegment(Index elem_segment_index, ElemSegment* segment);
+  Result VisitDataSegment(Index data_segment_index, DataSegment* segment);
+
+  Module* module_ = nullptr;
+  Func* current_func_ = nullptr;
+  ExprVisitor visitor_;
   /* mapping from param index to its name, if any, for the current func */
-  std::vector<std::string> param_index_to_name;
-  std::vector<std::string> local_index_to_name;
-  std::vector<Label*> labels;
+  std::vector<std::string> param_index_to_name_;
+  std::vector<std::string> local_index_to_name_;
+  std::vector<Label*> labels_;
 };
 
-Context::Context() {
-  WABT_ZERO_MEMORY(visitor);
+NameApplier::NameApplier() : visitor_(this) {}
+
+void NameApplier::PushLabel(Label* label) {
+  labels_.push_back(label);
 }
 
-void push_label(Context* ctx, Label* label) {
-  ctx->labels.push_back(label);
+void NameApplier::PopLabel() {
+  labels_.pop_back();
 }
 
-void pop_label(Context* ctx) {
-  ctx->labels.pop_back();
-}
-
-Label* find_label_by_var(Context* ctx, Var* var) {
+Label* NameApplier::FindLabelByVar(Var* var) {
   if (var->type == VarType::Name) {
-    for (int i = ctx->labels.size() - 1; i >= 0; --i) {
-      Label* label = ctx->labels[i];
+    for (int i = labels_.size() - 1; i >= 0; --i) {
+      Label* label = labels_[i];
       if (string_slices_are_equal(label, &var->name))
         return label;
     }
     return nullptr;
   } else {
-    if (var->index < 0 || static_cast<size_t>(var->index) >= ctx->labels.size())
+    if (var->index >= labels_.size())
       return nullptr;
-    return ctx->labels[ctx->labels.size() - 1 - var->index];
+    return labels_[labels_.size() - 1 - var->index];
   }
 }
 
-void use_name_for_var(StringSlice* name, Var* var) {
+void NameApplier::UseNameForVar(StringSlice* name, Var* var) {
   if (var->type == VarType::Name) {
     assert(string_slices_are_equal(name, &var->name));
   }
@@ -83,63 +118,62 @@
   }
 }
 
-Result use_name_for_func_type_var(Module* module, Var* var) {
-  FuncType* func_type = get_func_type_by_var(module, var);
+Result NameApplier::UseNameForFuncTypeVar(Module* module, Var* var) {
+  FuncType* func_type = module->GetFuncType(*var);
   if (!func_type)
     return Result::Error;
-  use_name_for_var(&func_type->name, var);
+  UseNameForVar(&func_type->name, var);
   return Result::Ok;
 }
 
-Result use_name_for_func_var(Module* module, Var* var) {
-  Func* func = get_func_by_var(module, var);
+Result NameApplier::UseNameForFuncVar(Module* module, Var* var) {
+  Func* func = module->GetFunc(*var);
   if (!func)
     return Result::Error;
-  use_name_for_var(&func->name, var);
+  UseNameForVar(&func->name, var);
   return Result::Ok;
 }
 
-Result use_name_for_global_var(Module* module, Var* var) {
-  Global* global = get_global_by_var(module, var);
+Result NameApplier::UseNameForGlobalVar(Module* module, Var* var) {
+  Global* global = module->GetGlobal(*var);
   if (!global)
     return Result::Error;
-  use_name_for_var(&global->name, var);
+  UseNameForVar(&global->name, var);
   return Result::Ok;
 }
 
-Result use_name_for_table_var(Module* module, Var* var) {
-  Table* table = get_table_by_var(module, var);
+Result NameApplier::UseNameForTableVar(Module* module, Var* var) {
+  Table* table = module->GetTable(*var);
   if (!table)
     return Result::Error;
-  use_name_for_var(&table->name, var);
+  UseNameForVar(&table->name, var);
   return Result::Ok;
 }
 
-Result use_name_for_memory_var(Module* module, Var* var) {
-  Memory* memory = get_memory_by_var(module, var);
+Result NameApplier::UseNameForMemoryVar(Module* module, Var* var) {
+  Memory* memory = module->GetMemory(*var);
   if (!memory)
     return Result::Error;
-  use_name_for_var(&memory->name, var);
+  UseNameForVar(&memory->name, var);
   return Result::Ok;
 }
 
-Result use_name_for_param_and_local_var(Context* ctx, Func* func, Var* var) {
-  int local_index = get_local_index_by_var(func, var);
-  if (local_index < 0 ||
-      static_cast<size_t>(local_index) >= get_num_params_and_locals(func))
+Result NameApplier::UseNameForParamAndLocalVar(Func* func, Var* var) {
+  Index local_index = func->GetLocalIndex(*var);
+  if (local_index >= func->GetNumParamsAndLocals())
     return Result::Error;
 
-  uint32_t num_params = get_num_params(func);
+  Index num_params = func->GetNumParams();
   std::string* name;
-  if (static_cast<uint32_t>(local_index) < num_params) {
+  if (local_index < num_params) {
     /* param */
-    assert(static_cast<size_t>(local_index) < ctx->param_index_to_name.size());
-    name = &ctx->param_index_to_name[local_index];
+    assert(local_index < param_index_to_name_.size());
+    name = &param_index_to_name_[local_index];
   } else {
     /* local */
     local_index -= num_params;
-    assert(static_cast<size_t>(local_index) < ctx->local_index_to_name.size());
-    name = &ctx->local_index_to_name[local_index];
+    assert(local_index < local_index_to_name_.size());
+    name = &local_index_to_name_[local_index];
   }
 
   if (var->type == VarType::Name) {
@@ -155,193 +189,153 @@
   return Result::Ok;
 }
 
-Result begin_block_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  push_label(ctx, &expr->block->label);
+Result NameApplier::BeginBlockExpr(Expr* expr) {
+  PushLabel(&expr->block->label);
   return Result::Ok;
 }
 
-Result end_block_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  pop_label(ctx);
+Result NameApplier::EndBlockExpr(Expr* expr) {
+  PopLabel();
   return Result::Ok;
 }
 
-Result begin_loop_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  push_label(ctx, &expr->loop->label);
+Result NameApplier::BeginLoopExpr(Expr* expr) {
+  PushLabel(&expr->loop->label);
   return Result::Ok;
 }
 
-Result end_loop_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  pop_label(ctx);
+Result NameApplier::EndLoopExpr(Expr* expr) {
+  PopLabel();
   return Result::Ok;
 }
 
-Result on_br_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Label* label = find_label_by_var(ctx, &expr->br.var);
-  use_name_for_var(label, &expr->br.var);
+Result NameApplier::OnBrExpr(Expr* expr) {
+  Label* label = FindLabelByVar(&expr->br.var);
+  UseNameForVar(label, &expr->br.var);
   return Result::Ok;
 }
 
-Result on_br_if_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Label* label = find_label_by_var(ctx, &expr->br_if.var);
-  use_name_for_var(label, &expr->br_if.var);
+Result NameApplier::OnBrIfExpr(Expr* expr) {
+  Label* label = FindLabelByVar(&expr->br_if.var);
+  UseNameForVar(label, &expr->br_if.var);
   return Result::Ok;
 }
 
-Result on_br_table_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
+Result NameApplier::OnBrTableExpr(Expr* expr) {
   VarVector& targets = *expr->br_table.targets;
   for (Var& target : targets) {
-    Label* label = find_label_by_var(ctx, &target);
-    use_name_for_var(label, &target);
+    Label* label = FindLabelByVar(&target);
+    UseNameForVar(label, &target);
   }
 
-  Label* label = find_label_by_var(ctx, &expr->br_table.default_target);
-  use_name_for_var(label, &expr->br_table.default_target);
+  Label* label = FindLabelByVar(&expr->br_table.default_target);
+  UseNameForVar(label, &expr->br_table.default_target);
   return Result::Ok;
 }
 
-Result on_call_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  CHECK_RESULT(use_name_for_func_var(ctx->module, &expr->call.var));
+Result NameApplier::OnCallExpr(Expr* expr) {
+  CHECK_RESULT(UseNameForFuncVar(module_, &expr->call.var));
   return Result::Ok;
 }
 
-Result on_call_indirect_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  CHECK_RESULT(
-      use_name_for_func_type_var(ctx->module, &expr->call_indirect.var));
+Result NameApplier::OnCallIndirectExpr(Expr* expr) {
+  CHECK_RESULT(UseNameForFuncTypeVar(module_, &expr->call_indirect.var));
   return Result::Ok;
 }
 
-Result on_get_global_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  CHECK_RESULT(use_name_for_global_var(ctx->module, &expr->get_global.var));
+Result NameApplier::OnGetGlobalExpr(Expr* expr) {
+  CHECK_RESULT(UseNameForGlobalVar(module_, &expr->get_global.var));
   return Result::Ok;
 }
 
-Result on_get_local_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  CHECK_RESULT(use_name_for_param_and_local_var(ctx, ctx->current_func,
-                                                &expr->get_local.var));
+Result NameApplier::OnGetLocalExpr(Expr* expr) {
+  CHECK_RESULT(UseNameForParamAndLocalVar(current_func_, &expr->get_local.var));
   return Result::Ok;
 }
 
-Result begin_if_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  push_label(ctx, &expr->if_.true_->label);
+Result NameApplier::BeginIfExpr(Expr* expr) {
+  PushLabel(&expr->if_.true_->label);
   return Result::Ok;
 }
 
-Result end_if_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  pop_label(ctx);
+Result NameApplier::EndIfExpr(Expr* expr) {
+  PopLabel();
   return Result::Ok;
 }
 
-Result on_set_global_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  CHECK_RESULT(use_name_for_global_var(ctx->module, &expr->set_global.var));
+Result NameApplier::OnSetGlobalExpr(Expr* expr) {
+  CHECK_RESULT(UseNameForGlobalVar(module_, &expr->set_global.var));
   return Result::Ok;
 }
 
-Result on_set_local_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  CHECK_RESULT(use_name_for_param_and_local_var(ctx, ctx->current_func,
-                                                &expr->set_local.var));
+Result NameApplier::OnSetLocalExpr(Expr* expr) {
+  CHECK_RESULT(UseNameForParamAndLocalVar(current_func_, &expr->set_local.var));
   return Result::Ok;
 }
 
-Result on_tee_local_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  CHECK_RESULT(use_name_for_param_and_local_var(ctx, ctx->current_func,
-                                                &expr->tee_local.var));
+Result NameApplier::OnTeeLocalExpr(Expr* expr) {
+  CHECK_RESULT(UseNameForParamAndLocalVar(current_func_, &expr->tee_local.var));
   return Result::Ok;
 }
 
-Result visit_func(Context* ctx, uint32_t func_index, Func* func) {
-  ctx->current_func = func;
-  if (decl_has_func_type(&func->decl)) {
-    CHECK_RESULT(use_name_for_func_type_var(ctx->module, &func->decl.type_var));
+Result NameApplier::VisitFunc(Index func_index, Func* func) {
+  current_func_ = func;
+  if (func->decl.has_func_type) {
+    CHECK_RESULT(UseNameForFuncTypeVar(module_, &func->decl.type_var));
   }
 
-  make_type_binding_reverse_mapping(func->decl.sig.param_types,
-                                    func->param_bindings,
-                                    &ctx->param_index_to_name);
+  MakeTypeBindingReverseMapping(func->decl.sig.param_types,
+                                func->param_bindings, &param_index_to_name_);
 
-  make_type_binding_reverse_mapping(func->local_types, func->local_bindings,
-                                    &ctx->local_index_to_name);
+  MakeTypeBindingReverseMapping(func->local_types, func->local_bindings,
+                                &local_index_to_name_);
 
-  CHECK_RESULT(visit_func(func, &ctx->visitor));
-  ctx->current_func = nullptr;
+  CHECK_RESULT(visitor_.VisitFunc(func));
+  current_func_ = nullptr;
   return Result::Ok;
 }
 
-Result visit_export(Context* ctx, uint32_t export_index, Export* export_) {
+Result NameApplier::VisitExport(Index export_index, Export* export_) {
   if (export_->kind == ExternalKind::Func) {
-    use_name_for_func_var(ctx->module, &export_->var);
+    UseNameForFuncVar(module_, &export_->var);
   }
   return Result::Ok;
 }
 
-Result visit_elem_segment(Context* ctx,
-                          uint32_t elem_segment_index,
-                          ElemSegment* segment) {
-  CHECK_RESULT(use_name_for_table_var(ctx->module, &segment->table_var));
+Result NameApplier::VisitElemSegment(Index elem_segment_index,
+                                     ElemSegment* segment) {
+  CHECK_RESULT(UseNameForTableVar(module_, &segment->table_var));
   for (Var& var : segment->vars) {
-    CHECK_RESULT(use_name_for_func_var(ctx->module, &var));
+    CHECK_RESULT(UseNameForFuncVar(module_, &var));
   }
   return Result::Ok;
 }
 
-Result visit_data_segment(Context* ctx,
-                          uint32_t data_segment_index,
-                          DataSegment* segment) {
-  CHECK_RESULT(use_name_for_memory_var(ctx->module, &segment->memory_var));
+Result NameApplier::VisitDataSegment(Index data_segment_index,
+                                     DataSegment* segment) {
+  CHECK_RESULT(UseNameForMemoryVar(module_, &segment->memory_var));
   return Result::Ok;
 }
 
-Result visit_module(Context* ctx, Module* module) {
+Result NameApplier::VisitModule(Module* module) {
+  module_ = module;
   for (size_t i = 0; i < module->funcs.size(); ++i)
-    CHECK_RESULT(visit_func(ctx, i, module->funcs[i]));
+    CHECK_RESULT(VisitFunc(i, module->funcs[i]));
   for (size_t i = 0; i < module->exports.size(); ++i)
-    CHECK_RESULT(visit_export(ctx, i, module->exports[i]));
+    CHECK_RESULT(VisitExport(i, module->exports[i]));
   for (size_t i = 0; i < module->elem_segments.size(); ++i)
-    CHECK_RESULT(visit_elem_segment(ctx, i, module->elem_segments[i]));
+    CHECK_RESULT(VisitElemSegment(i, module->elem_segments[i]));
   for (size_t i = 0; i < module->data_segments.size(); ++i)
-    CHECK_RESULT(visit_data_segment(ctx, i, module->data_segments[i]));
+    CHECK_RESULT(VisitDataSegment(i, module->data_segments[i]));
+  module_ = nullptr;
   return Result::Ok;
 }
 
 }  // namespace
 
 Result apply_names(Module* module) {
-  Context ctx;
-  ctx.module = module;
-  ctx.visitor.user_data = &ctx;
-  ctx.visitor.begin_block_expr = begin_block_expr;
-  ctx.visitor.end_block_expr = end_block_expr;
-  ctx.visitor.begin_loop_expr = begin_loop_expr;
-  ctx.visitor.end_loop_expr = end_loop_expr;
-  ctx.visitor.on_br_expr = on_br_expr;
-  ctx.visitor.on_br_if_expr = on_br_if_expr;
-  ctx.visitor.on_br_table_expr = on_br_table_expr;
-  ctx.visitor.on_call_expr = on_call_expr;
-  ctx.visitor.on_call_indirect_expr = on_call_indirect_expr;
-  ctx.visitor.on_get_global_expr = on_get_global_expr;
-  ctx.visitor.on_get_local_expr = on_get_local_expr;
-  ctx.visitor.begin_if_expr = begin_if_expr;
-  ctx.visitor.end_if_expr = end_if_expr;
-  ctx.visitor.on_set_global_expr = on_set_global_expr;
-  ctx.visitor.on_set_local_expr = on_set_local_expr;
-  ctx.visitor.on_tee_local_expr = on_tee_local_expr;
-  Result result = visit_module(&ctx, module);
-  return result;
+  NameApplier applier;
+  return applier.VisitModule(module);
 }
 
 }  // namespace wabt
diff --git a/lib/wabt/src/ast-lexer.cc b/lib/wabt/src/ast-lexer.cc
deleted file mode 100644
index cff0508..0000000
--- a/lib/wabt/src/ast-lexer.cc
+++ /dev/null
@@ -1,771 +0,0 @@
-/*
- * Copyright 2016 WebAssembly Community Group participants
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "ast-lexer.h"
-
-#include <assert.h>
-#include <stdio.h>
-
-#include "config.h"
-
-#include "ast-parser.h"
-#include "ast-parser-lexer-shared.h"
-
-/* must be included after so some typedefs will be defined */
-#include "ast-parser-gen.hh"
-
-/*!max:re2c */
-
-#define INITIAL_LEXER_BUFFER_SIZE (64 * 1024)
-
-#define YY_USER_ACTION                        \
-  {                                           \
-    loc->filename = lexer->filename;          \
-    loc->line = lexer->line;                  \
-    loc->first_column = COLUMN(lexer->token); \
-    loc->last_column = COLUMN(lexer->cursor); \
-  }
-
-#define RETURN(name) \
-  YY_USER_ACTION;    \
-  return WABT_TOKEN_TYPE_##name
-
-#define ERROR(...) \
-  YY_USER_ACTION;  \
-  ast_parser_error(loc, lexer, parser, __VA_ARGS__)
-
-#define BEGIN(c) \
-  do {           \
-    cond = c;    \
-  } while (0)
-#define FILL(n)                                     \
-  do {                                              \
-    if (WABT_FAILED(fill(loc, lexer, parser, n))) { \
-      RETURN(EOF);                                  \
-      continue;                                     \
-    }                                               \
-  } while (0)
-
-#define yytext (lexer->token)
-#define yyleng (lexer->cursor - lexer->token)
-
-/* p must be a pointer somewhere in the lexer buffer */
-#define FILE_OFFSET(p) ((p) - (lexer->buffer) + lexer->buffer_file_offset)
-#define COLUMN(p) (FILE_OFFSET(p) - lexer->line_file_offset + 1)
-
-#define COMMENT_NESTING (lexer->comment_nesting)
-#define NEWLINE                                           \
-  do {                                                    \
-    lexer->line++;                                        \
-    lexer->line_file_offset = FILE_OFFSET(lexer->cursor); \
-  } while (0)
-
-#define TEXT                 \
-  lval->text.start = yytext; \
-  lval->text.length = yyleng
-
-#define TEXT_AT(offset)               \
-  lval->text.start = yytext + offset; \
-  lval->text.length = yyleng - offset
-
-#define TYPE(type_) lval->type = Type::type_
-
-#define OPCODE(name) lval->opcode = Opcode::name
-
-#define LITERAL(type_)                     \
-  lval->literal.type = LiteralType::type_; \
-  lval->literal.text.start = yytext;       \
-  lval->literal.text.length = yyleng
-
-namespace wabt {
-
-static Result fill(Location* loc,
-                   AstLexer* lexer,
-                   AstParser* parser,
-                   size_t need) {
-  if (lexer->eof)
-    return Result::Error;
-  size_t free = lexer->token - lexer->buffer;
-  assert(static_cast<size_t>(lexer->cursor - lexer->buffer) >= free);
-  /* our buffer is too small, need to realloc */
-  if (free < need) {
-    char* old_buffer = lexer->buffer;
-    size_t old_buffer_size = lexer->buffer_size;
-    size_t new_buffer_size =
-        old_buffer_size ? old_buffer_size * 2 : INITIAL_LEXER_BUFFER_SIZE;
-    /* make sure there is enough space for the bytes requested (need) and an
-     * additional YYMAXFILL bytes which is needed for the re2c lexer
-     * implementation when the eof is reached */
-    while ((new_buffer_size - old_buffer_size) + free < need + YYMAXFILL)
-      new_buffer_size *= 2;
-
-    char* new_buffer = new char[new_buffer_size];
-    if (!new_buffer) {
-      ast_parser_error(loc, lexer, parser,
-                            "unable to reallocate lexer buffer.");
-      return Result::Error;
-    }
-    memmove(new_buffer, lexer->token, lexer->limit - lexer->token);
-    lexer->buffer = new_buffer;
-    lexer->buffer_size = new_buffer_size;
-    lexer->token = new_buffer + (lexer->token - old_buffer) - free;
-    lexer->marker = new_buffer + (lexer->marker - old_buffer) - free;
-    lexer->cursor = new_buffer + (lexer->cursor - old_buffer) - free;
-    lexer->limit = new_buffer + (lexer->limit - old_buffer) - free;
-    lexer->buffer_file_offset += free;
-    free += new_buffer_size - old_buffer_size;
-    delete [] old_buffer;
-  } else {
-    /* shift everything down to make more room in the buffer */
-    memmove(lexer->buffer, lexer->token, lexer->limit - lexer->token);
-    lexer->token -= free;
-    lexer->marker -= free;
-    lexer->cursor -= free;
-    lexer->limit -= free;
-    lexer->buffer_file_offset += free;
-  }
-  /* read the new data into the buffer */
-  if (lexer->source.type == AstLexerSourceType::File) {
-    lexer->limit += fread(lexer->limit, 1, free, lexer->source.file);
-  } else {
-    /* TODO(binji): could lex directly from buffer */
-    assert(lexer->source.type == AstLexerSourceType::Buffer);
-    size_t read_size = free;
-    size_t offset = lexer->source.buffer.read_offset;
-    size_t bytes_left = lexer->source.buffer.size - offset;
-    if (read_size > bytes_left)
-      read_size = bytes_left;
-    memcpy(lexer->limit,
-           static_cast<const char*>(lexer->source.buffer.data) + offset,
-           read_size);
-    lexer->source.buffer.read_offset += read_size;
-    lexer->limit += read_size;
-  }
-  /* if at the end of file, need to fill YYMAXFILL more characters with "fake
-   * characters", that are not a lexeme nor a lexeme suffix. see
-   * http://re2c.org/examples/example_03.html */
-  if (lexer->limit < lexer->buffer + lexer->buffer_size - YYMAXFILL) {
-    lexer->eof = true;
-    memset(lexer->limit, 0, YYMAXFILL);
-    lexer->limit += YYMAXFILL;
-  }
-  return Result::Ok;
-}
-
-int ast_lexer_lex(WABT_AST_PARSER_STYPE* lval,
-                  WABT_AST_PARSER_LTYPE* loc,
-                  AstLexer* lexer,
-                  AstParser* parser) {
-  enum {
-    YYCOND_INIT,
-    YYCOND_BAD_TEXT,
-    YYCOND_LINE_COMMENT,
-    YYCOND_BLOCK_COMMENT,
-    YYCOND_i = YYCOND_INIT,
-  } cond = YYCOND_INIT;
-
-  for (;;) {
-    lexer->token = lexer->cursor;
-    /*!re2c
-      re2c:condprefix = YYCOND_;
-      re2c:condenumprefix = YYCOND_;
-      re2c:define:YYCTYPE = "unsigned char";
-      re2c:define:YYCURSOR = lexer->cursor;
-      re2c:define:YYMARKER = lexer->marker;
-      re2c:define:YYLIMIT = lexer->limit;
-      re2c:define:YYFILL = "FILL";
-      re2c:define:YYGETCONDITION = "cond";
-      re2c:define:YYGETCONDITION:naked = 1;
-      re2c:define:YYSETCONDITION = "BEGIN";
-
-      space =     [ \t];
-      digit =     [0-9];
-      digits =    [0-9]+;
-      hexdigit =  [0-9a-fA-F];
-      letter =    [a-zA-Z];
-      symbol =    [+\-*\/\\\^~=<>!?@#$%&|:`.];
-      tick =      "'";
-      escape =    [nt\\'"];
-      character = [^"\\\x00-\x1f\x7f] | "\\" escape | "\\" hexdigit hexdigit;
-      sign =      [+-];
-      num =       digit+;
-      hexnum =    "0x" hexdigit+;
-      nat =       num | hexnum;
-      int =       sign nat;
-      float0 =    sign? num "." digit*;
-      float1 =    sign? num ("." digit*)? [eE] sign? num;
-      hexfloat =  sign? "0x" hexdigit+ "."? hexdigit* "p" sign? digit+;
-      infinity =  sign? ("inf" | "infinity");
-      nan =       sign? "nan" | sign? "nan:0x" hexdigit+;
-      float =     float0 | float1;
-      text =      '"' character* '"';
-      atom =      (letter | digit | "_" | tick | symbol)+;
-      name =      "$" atom;
-      EOF =       "\x00";
-
-      <i> "("                   { RETURN(LPAR); }
-      <i> ")"                   { RETURN(RPAR); }
-      <i> nat                   { LITERAL(Int); RETURN(NAT); }
-      <i> int                   { LITERAL(Int); RETURN(INT); }
-      <i> float                 { LITERAL(Float); RETURN(FLOAT); }
-      <i> hexfloat              { LITERAL(Hexfloat); RETURN(FLOAT); }
-      <i> infinity              { LITERAL(Infinity); RETURN(FLOAT); }
-      <i> nan                   { LITERAL(Nan); RETURN(FLOAT); }
-      <i> text                  { TEXT; RETURN(TEXT); }
-      <i> '"' => BAD_TEXT       { continue; }
-      <BAD_TEXT> character      { continue; }
-      <BAD_TEXT> "\n" => i      { ERROR("newline in string");
-                                  NEWLINE;
-                                  continue; }
-      <BAD_TEXT> "\\".          { ERROR("bad escape \"%.*s\"",
-                                        static_cast<int>(yyleng), yytext);
-                                  continue; }
-      <BAD_TEXT> '"' => i       { TEXT; RETURN(TEXT); }
-      <BAD_TEXT> EOF            { ERROR("unexpected EOF"); RETURN(EOF); }
-      <BAD_TEXT> [^]            { ERROR("illegal character in string");
-                                  continue; }
-      <i> "i32"                 { TYPE(I32); RETURN(VALUE_TYPE); }
-      <i> "i64"                 { TYPE(I64); RETURN(VALUE_TYPE); }
-      <i> "f32"                 { TYPE(F32); RETURN(VALUE_TYPE); }
-      <i> "f64"                 { TYPE(F64); RETURN(VALUE_TYPE); }
-      <i> "anyfunc"             { RETURN(ANYFUNC); }
-      <i> "mut"                 { RETURN(MUT); }
-      <i> "nop"                 { RETURN(NOP); }
-      <i> "block"               { RETURN(BLOCK); }
-      <i> "if"                  { RETURN(IF); }
-      <i> "if_else"             { RETURN(IF); }
-      <i> "then"                { RETURN(THEN); }
-      <i> "else"                { RETURN(ELSE); }
-      <i> "loop"                { RETURN(LOOP); }
-      <i> "br"                  { RETURN(BR); }
-      <i> "br_if"               { RETURN(BR_IF); }
-      <i> "br_table"            { RETURN(BR_TABLE); }
-      <i> "call"                { RETURN(CALL); }
-      <i> "call_import"         { RETURN(CALL_IMPORT); }
-      <i> "call_indirect"       { RETURN(CALL_INDIRECT); }
-      <i> "drop"                { RETURN(DROP); }
-      <i> "end"                 { RETURN(END); }
-      <i> "return"              { RETURN(RETURN); }
-      <i> "get_local"           { RETURN(GET_LOCAL); }
-      <i> "set_local"           { RETURN(SET_LOCAL); }
-      <i> "tee_local"           { RETURN(TEE_LOCAL); }
-      <i> "get_global"          { RETURN(GET_GLOBAL); }
-      <i> "set_global"          { RETURN(SET_GLOBAL); }
-      <i> "i32.load"            { OPCODE(I32Load); RETURN(LOAD); }
-      <i> "i64.load"            { OPCODE(I64Load); RETURN(LOAD); }
-      <i> "f32.load"            { OPCODE(F32Load); RETURN(LOAD); }
-      <i> "f64.load"            { OPCODE(F64Load); RETURN(LOAD); }
-      <i> "i32.store"           { OPCODE(I32Store); RETURN(STORE); }
-      <i> "i64.store"           { OPCODE(I64Store); RETURN(STORE); }
-      <i> "f32.store"           { OPCODE(F32Store); RETURN(STORE); }
-      <i> "f64.store"           { OPCODE(F64Store); RETURN(STORE); }
-      <i> "i32.load8_s"         { OPCODE(I32Load8S); RETURN(LOAD); }
-      <i> "i64.load8_s"         { OPCODE(I64Load8S); RETURN(LOAD); }
-      <i> "i32.load8_u"         { OPCODE(I32Load8U); RETURN(LOAD); }
-      <i> "i64.load8_u"         { OPCODE(I64Load8U); RETURN(LOAD); }
-      <i> "i32.load16_s"        { OPCODE(I32Load16S); RETURN(LOAD); }
-      <i> "i64.load16_s"        { OPCODE(I64Load16S); RETURN(LOAD); }
-      <i> "i32.load16_u"        { OPCODE(I32Load16U); RETURN(LOAD); }
-      <i> "i64.load16_u"        { OPCODE(I64Load16U); RETURN(LOAD); }
-      <i> "i64.load32_s"        { OPCODE(I64Load32S); RETURN(LOAD); }
-      <i> "i64.load32_u"        { OPCODE(I64Load32U); RETURN(LOAD); }
-      <i> "i32.store8"          { OPCODE(I32Store8); RETURN(STORE); }
-      <i> "i64.store8"          { OPCODE(I64Store8); RETURN(STORE); }
-      <i> "i32.store16"         { OPCODE(I32Store16); RETURN(STORE); }
-      <i> "i64.store16"         { OPCODE(I64Store16); RETURN(STORE); }
-      <i> "i64.store32"         { OPCODE(I64Store32); RETURN(STORE); }
-      <i> "offset=" nat         { TEXT_AT(7); RETURN(OFFSET_EQ_NAT); }
-      <i> "align=" nat          { TEXT_AT(6); RETURN(ALIGN_EQ_NAT); }
-      <i> "i32.const"           { TYPE(I32); RETURN(CONST); }
-      <i> "i64.const"           { TYPE(I64); RETURN(CONST); }
-      <i> "f32.const"           { TYPE(F32); RETURN(CONST); }
-      <i> "f64.const"           { TYPE(F64); RETURN(CONST); }
-      <i> "i32.eqz"             { OPCODE(I32Eqz); RETURN(CONVERT); }
-      <i> "i64.eqz"             { OPCODE(I64Eqz); RETURN(CONVERT); }
-      <i> "i32.clz"             { OPCODE(I32Clz); RETURN(UNARY); }
-      <i> "i64.clz"             { OPCODE(I64Clz); RETURN(UNARY); }
-      <i> "i32.ctz"             { OPCODE(I32Ctz); RETURN(UNARY); }
-      <i> "i64.ctz"             { OPCODE(I64Ctz); RETURN(UNARY); }
-      <i> "i32.popcnt"          { OPCODE(I32Popcnt); RETURN(UNARY); }
-      <i> "i64.popcnt"          { OPCODE(I64Popcnt); RETURN(UNARY); }
-      <i> "f32.neg"             { OPCODE(F32Neg); RETURN(UNARY); }
-      <i> "f64.neg"             { OPCODE(F64Neg); RETURN(UNARY); }
-      <i> "f32.abs"             { OPCODE(F32Abs); RETURN(UNARY); }
-      <i> "f64.abs"             { OPCODE(F64Abs); RETURN(UNARY); }
-      <i> "f32.sqrt"            { OPCODE(F32Sqrt); RETURN(UNARY); }
-      <i> "f64.sqrt"            { OPCODE(F64Sqrt); RETURN(UNARY); }
-      <i> "f32.ceil"            { OPCODE(F32Ceil); RETURN(UNARY); }
-      <i> "f64.ceil"            { OPCODE(F64Ceil); RETURN(UNARY); }
-      <i> "f32.floor"           { OPCODE(F32Floor); RETURN(UNARY); }
-      <i> "f64.floor"           { OPCODE(F64Floor); RETURN(UNARY); }
-      <i> "f32.trunc"           { OPCODE(F32Trunc); RETURN(UNARY); }
-      <i> "f64.trunc"           { OPCODE(F64Trunc); RETURN(UNARY); }
-      <i> "f32.nearest"         { OPCODE(F32Nearest); RETURN(UNARY); }
-      <i> "f64.nearest"         { OPCODE(F64Nearest); RETURN(UNARY); }
-      <i> "i32.add"             { OPCODE(I32Add); RETURN(BINARY); }
-      <i> "i64.add"             { OPCODE(I64Add); RETURN(BINARY); }
-      <i> "i32.sub"             { OPCODE(I32Sub); RETURN(BINARY); }
-      <i> "i64.sub"             { OPCODE(I64Sub); RETURN(BINARY); }
-      <i> "i32.mul"             { OPCODE(I32Mul); RETURN(BINARY); }
-      <i> "i64.mul"             { OPCODE(I64Mul); RETURN(BINARY); }
-      <i> "i32.div_s"           { OPCODE(I32DivS); RETURN(BINARY); }
-      <i> "i64.div_s"           { OPCODE(I64DivS); RETURN(BINARY); }
-      <i> "i32.div_u"           { OPCODE(I32DivU); RETURN(BINARY); }
-      <i> "i64.div_u"           { OPCODE(I64DivU); RETURN(BINARY); }
-      <i> "i32.rem_s"           { OPCODE(I32RemS); RETURN(BINARY); }
-      <i> "i64.rem_s"           { OPCODE(I64RemS); RETURN(BINARY); }
-      <i> "i32.rem_u"           { OPCODE(I32RemU); RETURN(BINARY); }
-      <i> "i64.rem_u"           { OPCODE(I64RemU); RETURN(BINARY); }
-      <i> "i32.and"             { OPCODE(I32And); RETURN(BINARY); }
-      <i> "i64.and"             { OPCODE(I64And); RETURN(BINARY); }
-      <i> "i32.or"              { OPCODE(I32Or); RETURN(BINARY); }
-      <i> "i64.or"              { OPCODE(I64Or); RETURN(BINARY); }
-      <i> "i32.xor"             { OPCODE(I32Xor); RETURN(BINARY); }
-      <i> "i64.xor"             { OPCODE(I64Xor); RETURN(BINARY); }
-      <i> "i32.shl"             { OPCODE(I32Shl); RETURN(BINARY); }
-      <i> "i64.shl"             { OPCODE(I64Shl); RETURN(BINARY); }
-      <i> "i32.shr_s"           { OPCODE(I32ShrS); RETURN(BINARY); }
-      <i> "i64.shr_s"           { OPCODE(I64ShrS); RETURN(BINARY); }
-      <i> "i32.shr_u"           { OPCODE(I32ShrU); RETURN(BINARY); }
-      <i> "i64.shr_u"           { OPCODE(I64ShrU); RETURN(BINARY); }
-      <i> "i32.rotl"            { OPCODE(I32Rotl); RETURN(BINARY); }
-      <i> "i64.rotl"            { OPCODE(I64Rotl); RETURN(BINARY); }
-      <i> "i32.rotr"            { OPCODE(I32Rotr); RETURN(BINARY); }
-      <i> "i64.rotr"            { OPCODE(I64Rotr); RETURN(BINARY); }
-      <i> "f32.add"             { OPCODE(F32Add); RETURN(BINARY); }
-      <i> "f64.add"             { OPCODE(F64Add); RETURN(BINARY); }
-      <i> "f32.sub"             { OPCODE(F32Sub); RETURN(BINARY); }
-      <i> "f64.sub"             { OPCODE(F64Sub); RETURN(BINARY); }
-      <i> "f32.mul"             { OPCODE(F32Mul); RETURN(BINARY); }
-      <i> "f64.mul"             { OPCODE(F64Mul); RETURN(BINARY); }
-      <i> "f32.div"             { OPCODE(F32Div); RETURN(BINARY); }
-      <i> "f64.div"             { OPCODE(F64Div); RETURN(BINARY); }
-      <i> "f32.min"             { OPCODE(F32Min); RETURN(BINARY); }
-      <i> "f64.min"             { OPCODE(F64Min); RETURN(BINARY); }
-      <i> "f32.max"             { OPCODE(F32Max); RETURN(BINARY); }
-      <i> "f64.max"             { OPCODE(F64Max); RETURN(BINARY); }
-      <i> "f32.copysign"        { OPCODE(F32Copysign); RETURN(BINARY); }
-      <i> "f64.copysign"        { OPCODE(F64Copysign); RETURN(BINARY); }
-      <i> "i32.eq"              { OPCODE(I32Eq); RETURN(COMPARE); }
-      <i> "i64.eq"              { OPCODE(I64Eq); RETURN(COMPARE); }
-      <i> "i32.ne"              { OPCODE(I32Ne); RETURN(COMPARE); }
-      <i> "i64.ne"              { OPCODE(I64Ne); RETURN(COMPARE); }
-      <i> "i32.lt_s"            { OPCODE(I32LtS); RETURN(COMPARE); }
-      <i> "i64.lt_s"            { OPCODE(I64LtS); RETURN(COMPARE); }
-      <i> "i32.lt_u"            { OPCODE(I32LtU); RETURN(COMPARE); }
-      <i> "i64.lt_u"            { OPCODE(I64LtU); RETURN(COMPARE); }
-      <i> "i32.le_s"            { OPCODE(I32LeS); RETURN(COMPARE); }
-      <i> "i64.le_s"            { OPCODE(I64LeS); RETURN(COMPARE); }
-      <i> "i32.le_u"            { OPCODE(I32LeU); RETURN(COMPARE); }
-      <i> "i64.le_u"            { OPCODE(I64LeU); RETURN(COMPARE); }
-      <i> "i32.gt_s"            { OPCODE(I32GtS); RETURN(COMPARE); }
-      <i> "i64.gt_s"            { OPCODE(I64GtS); RETURN(COMPARE); }
-      <i> "i32.gt_u"            { OPCODE(I32GtU); RETURN(COMPARE); }
-      <i> "i64.gt_u"            { OPCODE(I64GtU); RETURN(COMPARE); }
-      <i> "i32.ge_s"            { OPCODE(I32GeS); RETURN(COMPARE); }
-      <i> "i64.ge_s"            { OPCODE(I64GeS); RETURN(COMPARE); }
-      <i> "i32.ge_u"            { OPCODE(I32GeU); RETURN(COMPARE); }
-      <i> "i64.ge_u"            { OPCODE(I64GeU); RETURN(COMPARE); }
-      <i> "f32.eq"              { OPCODE(F32Eq); RETURN(COMPARE); }
-      <i> "f64.eq"              { OPCODE(F64Eq); RETURN(COMPARE); }
-      <i> "f32.ne"              { OPCODE(F32Ne); RETURN(COMPARE); }
-      <i> "f64.ne"              { OPCODE(F64Ne); RETURN(COMPARE); }
-      <i> "f32.lt"              { OPCODE(F32Lt); RETURN(COMPARE); }
-      <i> "f64.lt"              { OPCODE(F64Lt); RETURN(COMPARE); }
-      <i> "f32.le"              { OPCODE(F32Le); RETURN(COMPARE); }
-      <i> "f64.le"              { OPCODE(F64Le); RETURN(COMPARE); }
-      <i> "f32.gt"              { OPCODE(F32Gt); RETURN(COMPARE); }
-      <i> "f64.gt"              { OPCODE(F64Gt); RETURN(COMPARE); }
-      <i> "f32.ge"              { OPCODE(F32Ge); RETURN(COMPARE); }
-      <i> "f64.ge"              { OPCODE(F64Ge); RETURN(COMPARE); }
-      <i> "i64.extend_s/i32"    { OPCODE(I64ExtendSI32); RETURN(CONVERT); }
-      <i> "i64.extend_u/i32"    { OPCODE(I64ExtendUI32); RETURN(CONVERT); }
-      <i> "i32.wrap/i64"        { OPCODE(I32WrapI64); RETURN(CONVERT); }
-      <i> "i32.trunc_s/f32"     { OPCODE(I32TruncSF32); RETURN(CONVERT); }
-      <i> "i64.trunc_s/f32"     { OPCODE(I64TruncSF32); RETURN(CONVERT); }
-      <i> "i32.trunc_s/f64"     { OPCODE(I32TruncSF64); RETURN(CONVERT); }
-      <i> "i64.trunc_s/f64"     { OPCODE(I64TruncSF64); RETURN(CONVERT); }
-      <i> "i32.trunc_u/f32"     { OPCODE(I32TruncUF32); RETURN(CONVERT); }
-      <i> "i64.trunc_u/f32"     { OPCODE(I64TruncUF32); RETURN(CONVERT); }
-      <i> "i32.trunc_u/f64"     { OPCODE(I32TruncUF64); RETURN(CONVERT); }
-      <i> "i64.trunc_u/f64"     { OPCODE(I64TruncUF64); RETURN(CONVERT); }
-      <i> "f32.convert_s/i32"   { OPCODE(F32ConvertSI32); RETURN(CONVERT); }
-      <i> "f64.convert_s/i32"   { OPCODE(F64ConvertSI32); RETURN(CONVERT); }
-      <i> "f32.convert_s/i64"   { OPCODE(F32ConvertSI64); RETURN(CONVERT); }
-      <i> "f64.convert_s/i64"   { OPCODE(F64ConvertSI64); RETURN(CONVERT); }
-      <i> "f32.convert_u/i32"   { OPCODE(F32ConvertUI32); RETURN(CONVERT); }
-      <i> "f64.convert_u/i32"   { OPCODE(F64ConvertUI32); RETURN(CONVERT); }
-      <i> "f32.convert_u/i64"   { OPCODE(F32ConvertUI64); RETURN(CONVERT); }
-      <i> "f64.convert_u/i64"   { OPCODE(F64ConvertUI64); RETURN(CONVERT); }
-      <i> "f64.promote/f32"     { OPCODE(F64PromoteF32); RETURN(CONVERT); }
-      <i> "f32.demote/f64"      { OPCODE(F32DemoteF64); RETURN(CONVERT); }
-      <i> "f32.reinterpret/i32" { OPCODE(F32ReinterpretI32); RETURN(CONVERT); }
-      <i> "i32.reinterpret/f32" { OPCODE(I32ReinterpretF32); RETURN(CONVERT); }
-      <i> "f64.reinterpret/i64" { OPCODE(F64ReinterpretI64); RETURN(CONVERT); }
-      <i> "i64.reinterpret/f64" { OPCODE(I64ReinterpretF64); RETURN(CONVERT); }
-      <i> "select"              { RETURN(SELECT); }
-      <i> "unreachable"         { RETURN(UNREACHABLE); }
-      <i> "current_memory"      { RETURN(CURRENT_MEMORY); }
-      <i> "grow_memory"         { RETURN(GROW_MEMORY); }
-      <i> "type"                { RETURN(TYPE); }
-      <i> "func"                { RETURN(FUNC); }
-      <i> "param"               { RETURN(PARAM); }
-      <i> "result"              { RETURN(RESULT); }
-      <i> "local"               { RETURN(LOCAL); }
-      <i> "global"              { RETURN(GLOBAL); }
-      <i> "module"              { RETURN(MODULE); }
-      <i> "table"               { RETURN(TABLE); }
-      <i> "memory"              { RETURN(MEMORY); }
-      <i> "start"               { RETURN(START); }
-      <i> "elem"                { RETURN(ELEM); }
-      <i> "data"                { RETURN(DATA); }
-      <i> "offset"              { RETURN(OFFSET); }
-      <i> "import"              { RETURN(IMPORT); }
-      <i> "export"              { RETURN(EXPORT); }
-      <i> "register"            { RETURN(REGISTER); }
-      <i> "invoke"              { RETURN(INVOKE); }
-      <i> "get"                 { RETURN(GET); }
-      <i> "assert_malformed"    { RETURN(ASSERT_MALFORMED); }
-      <i> "assert_invalid"      { RETURN(ASSERT_INVALID); }
-      <i> "assert_unlinkable"   { RETURN(ASSERT_UNLINKABLE); }
-      <i> "assert_return"       { RETURN(ASSERT_RETURN); }
-      <i> "assert_return_canonical_nan" {
-                                  RETURN(ASSERT_RETURN_CANONICAL_NAN); }
-      <i> "assert_return_arithmetic_nan" {
-                                  RETURN(ASSERT_RETURN_ARITHMETIC_NAN); }
-      <i> "assert_trap"         { RETURN(ASSERT_TRAP); }
-      <i> "assert_exhaustion"   { RETURN(ASSERT_EXHAUSTION); }
-      <i> "input"               { RETURN(INPUT); }
-      <i> "output"              { RETURN(OUTPUT); }
-      <i> name                  { TEXT; RETURN(VAR); }
-
-      <i> ";;" => LINE_COMMENT  { continue; }
-      <LINE_COMMENT> "\n" => i  { NEWLINE; continue; }
-      <LINE_COMMENT> [^\n]*     { continue; }
-      <i> "(;" => BLOCK_COMMENT { COMMENT_NESTING = 1; continue; }
-      <BLOCK_COMMENT> "(;"      { COMMENT_NESTING++; continue; }
-      <BLOCK_COMMENT> ";)"      { if (--COMMENT_NESTING == 0)
-                                    BEGIN(YYCOND_INIT);
-                                  continue; }
-      <BLOCK_COMMENT> "\n"      { NEWLINE; continue; }
-      <BLOCK_COMMENT> EOF       { ERROR("unexpected EOF"); RETURN(EOF); }
-      <BLOCK_COMMENT> [^]       { continue; }
-      <i> "\n"                  { NEWLINE; continue; }
-      <i> [ \t\r]+              { continue; }
-      <i> atom                  { ERROR("unexpected token \"%.*s\"",
-                                        static_cast<int>(yyleng), yytext);
-                                  continue; }
-      <*> EOF                   { RETURN(EOF); }
-      <*> [^]                   { ERROR("unexpected char"); continue; }
-     */
-  }
-}
-
-static AstLexer* new_lexer(AstLexerSourceType type,
-                                    const char* filename) {
-  AstLexer* lexer = new AstLexer();
-  lexer->line = 1;
-  lexer->filename = filename;
-  lexer->source.type = type;
-  return lexer;
-}
-
-AstLexer* new_ast_file_lexer(const char* filename) {
-  AstLexer* lexer = new_lexer(AstLexerSourceType::File, filename);
-  lexer->source.file = fopen(filename, "rb");
-  if (!lexer->source.file) {
-    destroy_ast_lexer(lexer);
-    return nullptr;
-  }
-  return lexer;
-}
-
-AstLexer* new_ast_buffer_lexer(const char* filename,
-                                        const void* data,
-                                        size_t size) {
-  AstLexer* lexer =
-      new_lexer(AstLexerSourceType::Buffer, filename);
-  lexer->source.buffer.data = data;
-  lexer->source.buffer.size = size;
-  lexer->source.buffer.read_offset = 0;
-  return lexer;
-}
-
-void destroy_ast_lexer(AstLexer* lexer) {
-  if (lexer->source.type == AstLexerSourceType::File && lexer->source.file)
-    fclose(lexer->source.file);
-  delete [] lexer->buffer;
-  delete lexer;
-}
-
-enum class LineOffsetPosition {
-  Start,
-  End,
-};
-
-static Result scan_forward_for_line_offset_in_buffer(
-    const char* buffer_start,
-    const char* buffer_end,
-    int buffer_line,
-    size_t buffer_file_offset,
-    LineOffsetPosition find_position,
-    int find_line,
-    int* out_line,
-    size_t* out_line_offset) {
-  int line = buffer_line;
-  int line_offset = 0;
-  const char* p;
-  bool is_previous_carriage = 0;
-  for (p = buffer_start; p < buffer_end; ++p) {
-    if (*p == '\n') {
-      if (find_position == LineOffsetPosition::Start) {
-        if (++line == find_line) {
-          line_offset = buffer_file_offset + (p - buffer_start) + 1;
-          break;
-        }
-      } else {
-        if (line++ == find_line) {
-          line_offset =
-              buffer_file_offset + (p - buffer_start) - is_previous_carriage;
-          break;
-        }
-      }
-    }
-    is_previous_carriage = *p == '\r';
-  }
-
-  Result result = Result::Ok;
-  if (p == buffer_end) {
-    /* end of buffer */
-    if (find_position == LineOffsetPosition::Start) {
-      result = Result::Error;
-    } else {
-      line_offset = buffer_file_offset + (buffer_end - buffer_start);
-    }
-  }
-
-  *out_line = line;
-  *out_line_offset = line_offset;
-  return result;
-}
-
-static Result scan_forward_for_line_offset_in_file(
-    AstLexer* lexer,
-    int line,
-    size_t line_start_offset,
-    LineOffsetPosition find_position,
-    int find_line,
-    size_t* out_line_offset) {
-  FILE* lexer_file = lexer->source.file;
-  Result result = Result::Error;
-  long old_offset = ftell(lexer_file);
-  if (old_offset == -1)
-    return Result::Error;
-  size_t buffer_file_offset = line_start_offset;
-  if (fseek(lexer_file, buffer_file_offset, SEEK_SET) == -1)
-    goto cleanup;
-
-  while (1) {
-    char buffer[8 * 1024];
-    const size_t buffer_size = WABT_ARRAY_SIZE(buffer);
-    size_t read_bytes = fread(buffer, 1, buffer_size, lexer_file);
-    if (read_bytes == 0) {
-      /* end of buffer */
-      if (find_position == LineOffsetPosition::Start) {
-        result = Result::Error;
-      } else {
-        *out_line_offset = buffer_file_offset + read_bytes;
-        result = Result::Ok;
-      }
-      goto cleanup;
-    }
-
-    const char* buffer_end = buffer + read_bytes;
-    result = scan_forward_for_line_offset_in_buffer(
-        buffer, buffer_end, line, buffer_file_offset, find_position, find_line,
-        &line, out_line_offset);
-    if (result == Result::Ok)
-      goto cleanup;
-
-    buffer_file_offset += read_bytes;
-  }
-
-cleanup:
-  /* if this fails, we're screwed */
-  if (fseek(lexer_file, old_offset, SEEK_SET) == -1)
-    return Result::Error;
-  return result;
-}
-
-static Result scan_forward_for_line_offset(
-    AstLexer* lexer,
-    int line,
-    size_t line_start_offset,
-    LineOffsetPosition find_position,
-    int find_line,
-    size_t* out_line_offset) {
-  assert(line <= find_line);
-  if (lexer->source.type == AstLexerSourceType::Buffer) {
-    const char* source_buffer =
-        static_cast<const char*>(lexer->source.buffer.data);
-    const char* buffer_start = source_buffer + line_start_offset;
-    const char* buffer_end = source_buffer + lexer->source.buffer.size;
-    return scan_forward_for_line_offset_in_buffer(
-        buffer_start, buffer_end, line, line_start_offset, find_position,
-        find_line, &line, out_line_offset);
-  } else {
-    assert(lexer->source.type == AstLexerSourceType::File);
-    return scan_forward_for_line_offset_in_file(lexer, line, line_start_offset,
-                                                find_position, find_line,
-                                                out_line_offset);
-  }
-}
-
-static Result get_line_start_offset(AstLexer* lexer,
-                                        int line,
-                                        size_t* out_offset) {
-  int first_line = 1;
-  size_t first_offset = 0;
-  int current_line = lexer->line;
-  size_t current_offset = lexer->line_file_offset;
-
-  if (line == current_line) {
-    *out_offset = current_offset;
-    return Result::Ok;
-  } else if (line == first_line) {
-    *out_offset = first_offset;
-    return Result::Ok;
-  } else if (line > current_line) {
-    return scan_forward_for_line_offset(lexer, current_line, current_offset,
-                                        LineOffsetPosition::Start, line,
-                                        out_offset);
-  } else {
-    /* TODO(binji): optimize by storing more known line/offset pairs */
-    return scan_forward_for_line_offset(lexer, first_line, first_offset,
-                                        LineOffsetPosition::Start, line,
-                                        out_offset);
-  }
-}
-
-static Result get_offsets_from_line(AstLexer* lexer,
-                                        int line,
-                                        size_t* out_line_start,
-                                        size_t* out_line_end) {
-  size_t line_start;
-  if (WABT_FAILED(get_line_start_offset(lexer, line, &line_start)))
-    return Result::Error;
-
-  size_t line_end;
-  if (WABT_FAILED(scan_forward_for_line_offset(lexer, line, line_start,
-                                               LineOffsetPosition::End,
-                                               line, &line_end)))
-    return Result::Error;
-  *out_line_start = line_start;
-  *out_line_end = line_end;
-  return Result::Ok;
-}
-
-static void clamp_source_line_offsets_to_location(size_t line_start,
-                                                  size_t line_end,
-                                                  int first_column,
-                                                  int last_column,
-                                                  size_t max_line_length,
-                                                  size_t* out_new_line_start,
-                                                  size_t* out_new_line_end) {
-  size_t line_length = line_end - line_start;
-  if (line_length > max_line_length) {
-    size_t column_range = last_column - first_column;
-    size_t center_on;
-    if (column_range > max_line_length) {
-      /* the column range doesn't fit, just center on first_column */
-      center_on = first_column - 1;
-    } else {
-      /* the entire range fits, display it all in the center */
-      center_on = (first_column + last_column) / 2 - 1;
-    }
-    if (center_on > max_line_length / 2)
-      line_start += center_on - max_line_length / 2;
-    if (line_start > line_end - max_line_length)
-      line_start = line_end - max_line_length;
-    line_end = line_start + max_line_length;
-  }
-
-  *out_new_line_start = line_start;
-  *out_new_line_end = line_end;
-}
-
-Result ast_lexer_get_source_line(AstLexer* lexer,
-                                          const Location* loc,
-                                          size_t line_max_length,
-                                          char* line,
-                                          size_t* out_line_length,
-                                          int* out_column_offset) {
-  Result result;
-  size_t line_start; /* inclusive */
-  size_t line_end;   /* exclusive */
-  result = get_offsets_from_line(lexer, loc->line, &line_start, &line_end);
-  if (WABT_FAILED(result))
-    return result;
-
-  size_t new_line_start;
-  size_t new_line_end;
-  clamp_source_line_offsets_to_location(line_start, line_end, loc->first_column,
-                                        loc->last_column, line_max_length,
-                                        &new_line_start, &new_line_end);
-  bool has_start_ellipsis = line_start != new_line_start;
-  bool has_end_ellipsis = line_end != new_line_end;
-
-  char* write_start = line;
-  size_t line_length = new_line_end - new_line_start;
-  size_t read_start = new_line_start;
-  size_t read_length = line_length;
-  if (has_start_ellipsis) {
-    memcpy(line, "...", 3);
-    read_start += 3;
-    write_start += 3;
-    read_length -= 3;
-  }
-  if (has_end_ellipsis) {
-    memcpy(line + line_length - 3, "...", 3);
-    read_length -= 3;
-  }
-
-  if (lexer->source.type == AstLexerSourceType::Buffer) {
-    const char* buffer_read_start =
-        static_cast<const char*>(lexer->source.buffer.data) + read_start;
-    memcpy(write_start, buffer_read_start, read_length);
-  } else {
-    assert(lexer->source.type == AstLexerSourceType::File);
-    FILE* lexer_file = lexer->source.file;
-    long old_offset = ftell(lexer_file);
-    if (old_offset == -1)
-      return Result::Error;
-    if (fseek(lexer_file, read_start, SEEK_SET) == -1)
-      return Result::Error;
-    if (fread(write_start, 1, read_length, lexer_file) < read_length)
-      return Result::Error;
-    if (fseek(lexer_file, old_offset, SEEK_SET) == -1)
-      return Result::Error;
-  }
-
-  line[line_length] = '\0';
-
-  *out_line_length = line_length;
-  *out_column_offset = new_line_start - line_start;
-  return Result::Ok;
-}
-
-}  // namespace wabt
diff --git a/lib/wabt/src/ast-lexer.h b/lib/wabt/src/ast-lexer.h
deleted file mode 100644
index f2325a3..0000000
--- a/lib/wabt/src/ast-lexer.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright 2016 WebAssembly Community Group participants
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef WABT_AST_LEXER_H_
-#define WABT_AST_LEXER_H_
-
-#include <stddef.h>
-#include <stdio.h>
-
-#include "common.h"
-
-namespace wabt {
-
-enum class AstLexerSourceType {
-  File,
-  Buffer,
-};
-
-struct AstLexerSource {
-  AstLexerSourceType type;
-  union {
-    FILE* file;
-    struct {
-      const void* data;
-      size_t size;
-      size_t read_offset;
-    } buffer;
-  };
-};
-
-struct AstLexer {
-  AstLexerSource source;
-  const char* filename;
-  int line;
-  int comment_nesting;
-  size_t buffer_file_offset; /* file offset of the start of the buffer */
-  size_t line_file_offset;   /* file offset of the start of the current line */
-
-  /* lexing data needed by re2c */
-  bool eof;
-  char* buffer;
-  size_t buffer_size;
-  char* marker;
-  char* token;
-  char* cursor;
-  char* limit;
-};
-
-AstLexer* new_ast_file_lexer(const char* filename);
-AstLexer* new_ast_buffer_lexer(const char* filename,
-                               const void* data,
-                               size_t size);
-void destroy_ast_lexer(AstLexer*);
-
-}  // namespace wabt
-
-#endif /* WABT_AST_LEXER_H_ */
diff --git a/lib/wabt/src/ast-parser-lexer-shared.cc b/lib/wabt/src/ast-parser-lexer-shared.cc
deleted file mode 100644
index eab46b3..0000000
--- a/lib/wabt/src/ast-parser-lexer-shared.cc
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright 2016 WebAssembly Community Group participants
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "ast-parser-lexer-shared.h"
-
-#include <stdarg.h>
-#include <stdio.h>
-#include <string.h>
-
-namespace wabt {
-
-void ast_parser_error(Location* loc,
-                      AstLexer* lexer,
-                      AstParser* parser,
-                      const char* format,
-                      ...) {
-  parser->errors++;
-  va_list args;
-  va_start(args, format);
-  ast_format_error(parser->error_handler, loc, lexer, format, args);
-  va_end(args);
-}
-
-void ast_format_error(SourceErrorHandler* error_handler,
-                      const struct Location* loc,
-                      AstLexer* lexer,
-                      const char* format,
-                      va_list args) {
-  va_list args_copy;
-  va_copy(args_copy, args);
-  char fixed_buf[WABT_DEFAULT_SNPRINTF_ALLOCA_BUFSIZE];
-  char* buffer = fixed_buf;
-  size_t len = wabt_vsnprintf(fixed_buf, sizeof(fixed_buf), format, args);
-  if (len + 1 > sizeof(fixed_buf)) {
-    buffer = static_cast<char*>(alloca(len + 1));
-    len = wabt_vsnprintf(buffer, len + 1, format, args_copy);
-  }
-
-  char* source_line = nullptr;
-  size_t source_line_length = 0;
-  int source_line_column_offset = 0;
-  size_t source_line_max_length = error_handler->source_line_max_length;
-  if (loc && lexer) {
-    source_line = static_cast<char*>(alloca(source_line_max_length + 1));
-    Result result = ast_lexer_get_source_line(
-        lexer, loc, source_line_max_length, source_line, &source_line_length,
-        &source_line_column_offset);
-    if (WABT_FAILED(result)) {
-      /* if this fails, it means that we've probably screwed up the lexer. blow
-       * up. */
-      WABT_FATAL("error getting the source line.\n");
-    }
-  }
-
-  if (error_handler->on_error) {
-    error_handler->on_error(loc, buffer, source_line, source_line_length,
-                            source_line_column_offset,
-                            error_handler->user_data);
-  }
-  va_end(args_copy);
-}
-
-void destroy_text_list(TextList* text_list) {
-  TextListNode* node = text_list->first;
-  while (node) {
-    TextListNode* next = node->next;
-    destroy_string_slice(&node->text);
-    delete node;
-    node = next;
-  }
-}
-
-FuncField::FuncField()
-    : type(FuncFieldType::Exprs), first_expr(nullptr), next(nullptr) {}
-
-FuncField::~FuncField() {
-  switch (type) {
-    case FuncFieldType::Exprs:
-      destroy_expr_list(first_expr);
-      break;
-
-    case FuncFieldType::ParamTypes:
-    case FuncFieldType::LocalTypes:
-    case FuncFieldType::ResultTypes:
-      delete types;
-      break;
-
-    case FuncFieldType::BoundParam:
-    case FuncFieldType::BoundLocal:
-      destroy_string_slice(&bound_type.name);
-      break;
-  }
-}
-
-void destroy_func_fields(FuncField* func_field) {
-  /* destroy the entire linked-list */
-  while (func_field) {
-    FuncField* next_func_field = func_field->next;
-    delete func_field;
-    func_field = next_func_field;
-  }
-}
-
-}  // namespace wabt
diff --git a/lib/wabt/src/ast-parser-lexer-shared.h b/lib/wabt/src/ast-parser-lexer-shared.h
deleted file mode 100644
index b06da3c..0000000
--- a/lib/wabt/src/ast-parser-lexer-shared.h
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Copyright 2016 WebAssembly Community Group participants
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef WABT_AST_PARSER_LEXER_SHARED_H_
-#define WABT_AST_PARSER_LEXER_SHARED_H_
-
-#include <stdarg.h>
-
-#include <memory>
-
-#include "ast.h"
-#include "ast-lexer.h"
-#include "common.h"
-
-#define WABT_AST_PARSER_STYPE Token
-#define WABT_AST_PARSER_LTYPE Location
-#define YYSTYPE WABT_AST_PARSER_STYPE
-#define YYLTYPE WABT_AST_PARSER_LTYPE
-
-#define WABT_INVALID_LINE_OFFSET (static_cast<size_t>(~0))
-
-namespace wabt {
-
-struct ExprList {
-  Expr* first;
-  Expr* last;
-  size_t size;
-};
-
-struct TextListNode {
-  StringSlice text;
-  struct TextListNode* next;
-};
-
-struct TextList {
-  TextListNode* first;
-  TextListNode* last;
-};
-
-struct OptionalExport {
-  std::unique_ptr<Export> export_;
-  bool has_export;
-};
-
-struct ExportedFunc {
-  std::unique_ptr<Func> func;
-  OptionalExport export_;
-};
-
-struct ExportedGlobal {
-  std::unique_ptr<Global> global;
-  OptionalExport export_;
-};
-
-struct ExportedTable {
-  std::unique_ptr<Table> table;
-  std::unique_ptr<ElemSegment> elem_segment;
-  OptionalExport export_;
-  bool has_elem_segment;
-};
-
-struct ExportedMemory {
-  std::unique_ptr<Memory> memory;
-  std::unique_ptr<DataSegment> data_segment;
-  OptionalExport export_;
-  bool has_data_segment;
-};
-
-enum class FuncFieldType {
-  Exprs,
-  ParamTypes,
-  BoundParam,
-  ResultTypes,
-  LocalTypes,
-  BoundLocal,
-};
-
-struct BoundType {
-  WABT_DISALLOW_COPY_AND_ASSIGN(BoundType);
-  BoundType();
-  ~BoundType();
-
-  Location loc;
-  StringSlice name;
-  Type type;
-};
-
-struct FuncField {
-  WABT_DISALLOW_COPY_AND_ASSIGN(FuncField);
-  FuncField();
-  ~FuncField();
-
-  FuncFieldType type;
-  union {
-    Expr* first_expr;     /* WABT_FUNC_FIELD_TYPE_EXPRS */
-    TypeVector* types;    /* WABT_FUNC_FIELD_TYPE_*_TYPES */
-    BoundType bound_type; /* WABT_FUNC_FIELD_TYPE_BOUND_{LOCAL, PARAM} */
-  };
-  struct FuncField* next;
-};
-
-union Token {
-  /* terminals */
-  StringSlice text;
-  Type type;
-  Opcode opcode;
-  Literal literal;
-
-  /* non-terminals */
-  /* some of these use pointers to keep the size of Token down; copying the
-   tokens is a hotspot when parsing large files. */
-  Action* action;
-  Block* block;
-  Command* command;
-  CommandPtrVector* commands;
-  Const const_;
-  ConstVector* consts;
-  DataSegment* data_segment;
-  ElemSegment* elem_segment;
-  Export* export_;
-  ExportedFunc* exported_func;
-  ExportedGlobal* exported_global;
-  ExportedMemory* exported_memory;
-  ExportedTable* exported_table;
-  Expr* expr;
-  ExprList expr_list;
-  FuncField* func_fields;
-  Func* func;
-  FuncSignature* func_sig;
-  FuncType* func_type;
-  Global* global;
-  Import* import;
-  Limits limits;
-  OptionalExport* optional_export;
-  Memory* memory;
-  Module* module;
-  RawModule* raw_module;
-  Script* script;
-  Table* table;
-  TextList text_list;
-  TypeVector* types;
-  uint32_t u32;
-  uint64_t u64;
-  Var var;
-  VarVector* vars;
-};
-
-struct AstParser {
-  Script* script;
-  SourceErrorHandler* error_handler;
-  int errors;
-  /* Cached pointers to reallocated parser buffers, so they don't leak. */
-  int16_t* yyssa;
-  YYSTYPE* yyvsa;
-  YYLTYPE* yylsa;
-};
-
-int ast_lexer_lex(union Token*, struct Location*, AstLexer*, struct AstParser*);
-Result ast_lexer_get_source_line(AstLexer*,
-                                 const struct Location*,
-                                 size_t line_max_length,
-                                 char* line,
-                                 size_t* out_line_length,
-                                 int* out_column_offset);
-void WABT_PRINTF_FORMAT(4, 5) ast_parser_error(struct Location*,
-                                               AstLexer*,
-                                               struct AstParser*,
-                                               const char*,
-                                               ...);
-void ast_format_error(SourceErrorHandler*,
-                      const struct Location*,
-                      AstLexer*,
-                      const char* format,
-                      va_list);
-void destroy_func_fields(FuncField*);
-void destroy_text_list(TextList*);
-
-}  // namespace wabt
-
-#endif /* WABT_AST_PARSER_LEXER_SHARED_H_ */
diff --git a/lib/wabt/src/ast-parser.y b/lib/wabt/src/ast-parser.y
deleted file mode 100644
index 5f0498d..0000000
--- a/lib/wabt/src/ast-parser.y
+++ /dev/null
@@ -1,1681 +0,0 @@
-/*
- * Copyright 2016 WebAssembly Community Group participants
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-%{
-#include <assert.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <algorithm>
-#include <utility>
-
-#include "ast-parser.h"
-#include "ast-parser-lexer-shared.h"
-#include "binary-reader-ast.h"
-#include "binary-reader.h"
-#include "literal.h"
-
-#define INVALID_VAR_INDEX (-1)
-
-#define RELOCATE_STACK(type, array, stack_base, old_size, new_size)   \
-  do {                                                                \
-    type* new_stack = new type[new_size]();                           \
-    std::move((stack_base), (stack_base) + (old_size), (new_stack));  \
-    if ((stack_base) != (array)) {                                    \
-      delete[](stack_base);                                           \
-    } else {                                                          \
-      for (size_t i = 0; i < (old_size); ++i) {                       \
-        (stack_base)[i].~type();                                      \
-      }                                                               \
-    }                                                                 \
-    /* Cache the pointer in the parser struct to be deleted later. */ \
-    parser->array = (stack_base) = new_stack;                         \
-  } while (0)
-
-#define yyoverflow(message, ss, ss_size, vs, vs_size, ls, ls_size, new_size) \
-  do {                                                                       \
-    size_t old_size = *(new_size);                                           \
-    *(new_size) *= 2;                                                        \
-    RELOCATE_STACK(yytype_int16, yyssa, *(ss), old_size, *(new_size));       \
-    RELOCATE_STACK(YYSTYPE, yyvsa, *(vs), old_size, *(new_size));            \
-    RELOCATE_STACK(YYLTYPE, yylsa, *(ls), old_size, *(new_size));            \
-  } while (0)
-
-#define DUPTEXT(dst, src)                                \
-  (dst).start = wabt_strndup((src).start, (src).length); \
-  (dst).length = (src).length
-
-#define YYLLOC_DEFAULT(Current, Rhs, N)                       \
-  do                                                          \
-    if (N) {                                                  \
-      (Current).filename = YYRHSLOC(Rhs, 1).filename;         \
-      (Current).line = YYRHSLOC(Rhs, 1).line;                 \
-      (Current).first_column = YYRHSLOC(Rhs, 1).first_column; \
-      (Current).last_column = YYRHSLOC(Rhs, N).last_column;   \
-    } else {                                                  \
-      (Current).filename = nullptr;                           \
-      (Current).line = YYRHSLOC(Rhs, 0).line;                 \
-      (Current).first_column = (Current).last_column =        \
-          YYRHSLOC(Rhs, 0).last_column;                       \
-    }                                                         \
-  while (0)
-
-#define APPEND_FIELD_TO_LIST(module, field, Kind, kind, loc_, item) \
-  do {                                                              \
-    field = append_module_field(module);                            \
-    field->loc = loc_;                                              \
-    field->type = ModuleFieldType::Kind;                            \
-    field->kind = item;                                             \
-  } while (0)
-
-#define APPEND_ITEM_TO_VECTOR(module, kinds, item_ptr) \
-  (module)->kinds.push_back(item_ptr)
-
-#define INSERT_BINDING(module, kind, kinds, loc_, name) \
-  do                                                    \
-    if ((name).start) {                                 \
-      (module)->kind##_bindings.emplace(                \
-          string_slice_to_string(name),                 \
-          Binding(loc_, (module)->kinds.size() - 1));   \
-    }                                                   \
-  while (0)
-
-#define APPEND_INLINE_EXPORT(module, Kind, loc_, value, index_)         \
-  do                                                                    \
-    if ((value)->export_.has_export) {                                  \
-      ModuleField* export_field;                                        \
-      APPEND_FIELD_TO_LIST(module, export_field, Export, export_, loc_, \
-                           (value)->export_.export_.release());         \
-      export_field->export_->kind = ExternalKind::Kind;                 \
-      export_field->export_->var.loc = loc_;                            \
-      export_field->export_->var.index = index_;                        \
-      APPEND_ITEM_TO_VECTOR(module, exports, export_field->export_);    \
-      INSERT_BINDING(module, export, exports, export_field->loc,        \
-                     export_field->export_->name);                      \
-    }                                                                   \
-  while (0)
-
-#define CHECK_IMPORT_ORDERING(module, kind, kinds, loc_)            \
-  do {                                                              \
-    if ((module)->kinds.size() != (module)->num_##kind##_imports) { \
-      ast_parser_error(                                             \
-          &loc_, lexer, parser,                                     \
-          "imports must occur before all non-import definitions");  \
-    }                                                               \
-  } while (0)
-
-#define CHECK_END_LABEL(loc, begin_label, end_label)                       \
-  do {                                                                     \
-    if (!string_slice_is_empty(&(end_label))) {                            \
-      if (string_slice_is_empty(&(begin_label))) {                         \
-        ast_parser_error(&loc, lexer, parser,                              \
-                         "unexpected label \"" PRIstringslice "\"",        \
-                         WABT_PRINTF_STRING_SLICE_ARG(end_label));         \
-      } else if (!string_slices_are_equal(&(begin_label), &(end_label))) { \
-        ast_parser_error(&loc, lexer, parser,                              \
-                         "mismatching label \"" PRIstringslice             \
-                         "\" != \"" PRIstringslice "\"",                   \
-                         WABT_PRINTF_STRING_SLICE_ARG(begin_label),        \
-                         WABT_PRINTF_STRING_SLICE_ARG(end_label));         \
-      }                                                                    \
-      destroy_string_slice(&(end_label));                                  \
-    }                                                                      \
-  } while (0)
-
-#define YYMALLOC(size) new char [size]
-#define YYFREE(p) delete [] (p)
-
-#define USE_NATURAL_ALIGNMENT (~0)
-
-namespace wabt {
-
-ExprList join_exprs1(Location* loc, Expr* expr1);
-ExprList join_exprs2(Location* loc,
-                         ExprList* expr1,
-                         Expr* expr2);
-
-Result parse_const(Type type,
-                       LiteralType literal_type,
-                       const char* s,
-                       const char* end,
-                       Const* out);
-void dup_text_list(TextList* text_list, char** out_data, size_t* out_size);
-
-bool is_empty_signature(const FuncSignature* sig);
-
-void append_implicit_func_declaration(Location*,
-                                      Module*,
-                                      FuncDeclaration*);
-
-struct BinaryErrorCallbackData {
-  Location* loc;
-  AstLexer* lexer;
-  AstParser* parser;
-};
-
-static bool on_read_binary_error(uint32_t offset, const char* error,
-                                 void* user_data);
-
-#define wabt_ast_parser_lex ast_lexer_lex
-#define wabt_ast_parser_error ast_parser_error
-
-%}
-
-%define api.prefix {wabt_ast_parser_}
-%define api.pure true
-%define api.value.type {::wabt::Token}
-%define api.token.prefix {WABT_TOKEN_TYPE_}
-%define parse.error verbose
-%lex-param {::wabt::AstLexer* lexer} {::wabt::AstParser* parser}
-%parse-param {::wabt::AstLexer* lexer} {::wabt::AstParser* parser}
-%locations
-
-%token LPAR "("
-%token RPAR ")"
-%token NAT INT FLOAT TEXT VAR VALUE_TYPE ANYFUNC MUT
-%token NOP DROP BLOCK END IF THEN ELSE LOOP BR BR_IF BR_TABLE
-%token CALL CALL_IMPORT CALL_INDIRECT RETURN
-%token GET_LOCAL SET_LOCAL TEE_LOCAL GET_GLOBAL SET_GLOBAL
-%token LOAD STORE OFFSET_EQ_NAT ALIGN_EQ_NAT
-%token CONST UNARY BINARY COMPARE CONVERT SELECT
-%token UNREACHABLE CURRENT_MEMORY GROW_MEMORY
-%token FUNC START TYPE PARAM RESULT LOCAL GLOBAL
-%token MODULE TABLE ELEM MEMORY DATA OFFSET IMPORT EXPORT
-%token REGISTER INVOKE GET
-%token ASSERT_MALFORMED ASSERT_INVALID ASSERT_UNLINKABLE
-%token ASSERT_RETURN ASSERT_RETURN_CANONICAL_NAN ASSERT_RETURN_ARITHMETIC_NAN
-%token ASSERT_TRAP ASSERT_EXHAUSTION
-%token INPUT OUTPUT
-%token EOF 0 "EOF"
-
-%type<opcode> BINARY COMPARE CONVERT LOAD STORE UNARY
-%type<text> ALIGN_EQ_NAT OFFSET_EQ_NAT TEXT VAR
-%type<type> SELECT
-%type<type> CONST VALUE_TYPE
-%type<literal> NAT INT FLOAT
-
-%type<action> action
-%type<block> block
-%type<command> assertion cmd
-%type<commands> cmd_list
-%type<const_> const
-%type<consts> const_list
-%type<data_segment> data
-%type<elem_segment> elem
-%type<export_> export export_kind
-%type<exported_func> func
-%type<exported_global> global
-%type<exported_table> table
-%type<exported_memory> memory
-%type<expr> plain_instr block_instr
-%type<expr_list> instr instr_list expr expr1 expr_list if_ const_expr offset
-%type<func_fields> func_fields func_body
-%type<func> func_info
-%type<func_sig> func_sig func_type
-%type<func_type> type_def
-%type<global> global_type
-%type<import> import import_kind inline_import
-%type<limits> limits
-%type<memory> memory_sig
-%type<module> module module_fields
-%type<optional_export> inline_export inline_export_opt
-%type<raw_module> raw_module
-%type<literal> literal
-%type<script> script
-%type<table> table_sig
-%type<text> bind_var bind_var_opt labeling_opt quoted_text
-%type<text_list> non_empty_text_list text_list
-%type<types> value_type_list
-%type<u32> align_opt
-%type<u64> nat offset_opt
-%type<vars> var_list
-%type<var> start type_use var script_var_opt
-
-/* These non-terminals use the types below that have destructors, but the
- * memory is shared with the lexer, so should not be destroyed. */
-%destructor {} ALIGN_EQ_NAT OFFSET_EQ_NAT TEXT VAR NAT INT FLOAT
-%destructor { destroy_string_slice(&$$); } <text>
-%destructor { destroy_string_slice(&$$.text); } <literal>
-%destructor { delete $$; } <action>
-%destructor { delete $$; } <block>
-%destructor { delete $$; } <command>
-%destructor { delete $$; } <commands>
-%destructor { delete $$; } <consts>
-%destructor { delete $$; } <data_segment>
-%destructor { delete $$; } <elem_segment>
-%destructor { delete $$; } <export_>
-%destructor { delete $$; } <exported_func>
-%destructor { delete $$; } <exported_memory>
-%destructor { delete $$; } <exported_table>
-%destructor { delete $$; } <expr>
-%destructor { destroy_expr_list($$.first); } <expr_list>
-%destructor { destroy_func_fields($$); } <func_fields>
-%destructor { delete $$; } <func>
-%destructor { delete $$; } <func_sig>
-%destructor { delete $$; } <func_type>
-%destructor { delete $$; } <global>
-%destructor { delete $$; } <import>
-%destructor { delete $$; } <optional_export>
-%destructor { delete $$; } <memory>
-%destructor { delete $$; } <module>
-%destructor { delete $$; } <raw_module>
-%destructor { delete $$; } <script>
-%destructor { destroy_text_list(&$$); } <text_list>
-%destructor { delete $$; } <types>
-%destructor { destroy_var(&$$); } <var>
-%destructor { delete $$; } <vars>
-
-
-%nonassoc LOW
-%nonassoc VAR
-
-%start script_start
-
-%%
-
-/* Auxiliaries */
-
-non_empty_text_list :
-    TEXT {
-      TextListNode* node = new TextListNode();
-      DUPTEXT(node->text, $1);
-      node->next = nullptr;
-      $$.first = $$.last = node;
-    }
-  | non_empty_text_list TEXT {
-      $$ = $1;
-      TextListNode* node = new TextListNode();
-      DUPTEXT(node->text, $2);
-      node->next = nullptr;
-      $$.last->next = node;
-      $$.last = node;
-    }
-;
-text_list :
-    /* empty */ { $$.first = $$.last = nullptr; }
-  | non_empty_text_list
-;
-
-quoted_text :
-    TEXT {
-      TextListNode node;
-      node.text = $1;
-      node.next = nullptr;
-      TextList text_list;
-      text_list.first = &node;
-      text_list.last = &node;
-      char* data;
-      size_t size;
-      dup_text_list(&text_list, &data, &size);
-      $$.start = data;
-      $$.length = size;
-    }
-;
-
-/* Types */
-
-value_type_list :
-    /* empty */ { $$ = new TypeVector(); }
-  | value_type_list VALUE_TYPE {
-      $$ = $1;
-      $$->push_back($2);
-    }
-;
-elem_type :
-    ANYFUNC {}
-;
-global_type :
-    VALUE_TYPE {
-      $$ = new Global();
-      $$->type = $1;
-      $$->mutable_ = false;
-    }
-  | LPAR MUT VALUE_TYPE RPAR {
-      $$ = new Global();
-      $$->type = $3;
-      $$->mutable_ = true;
-    }
-;
-func_type :
-    LPAR FUNC func_sig RPAR { $$ = $3; }
-;
-func_sig :
-    /* empty */ { $$ = new FuncSignature(); }
-  | LPAR PARAM value_type_list RPAR {
-      $$ = new FuncSignature();
-      $$->param_types = std::move(*$3);
-      delete $3;
-    }
-  | LPAR PARAM value_type_list RPAR LPAR RESULT value_type_list RPAR {
-      $$ = new FuncSignature();
-      $$->param_types = std::move(*$3);
-      delete $3;
-      $$->result_types = std::move(*$7);
-      delete $7;
-    }
-  | LPAR RESULT value_type_list RPAR {
-      $$ = new FuncSignature();
-      $$->result_types = std::move(*$3);
-      delete $3;
-    }
-;
-
-table_sig :
-    limits elem_type {
-      $$ = new Table();
-      $$->elem_limits = $1;
-    }
-;
-memory_sig :
-    limits {
-      $$ = new Memory();
-      $$->page_limits = $1;
-    }
-;
-limits :
-    nat {
-      $$.has_max = false;
-      $$.initial = $1;
-      $$.max = 0;
-    }
-  | nat nat {
-      $$.has_max = true;
-      $$.initial = $1;
-      $$.max = $2;
-    }
-;
-type_use :
-    LPAR TYPE var RPAR { $$ = $3; }
-;
-
-/* Expressions */
-
-nat :
-    NAT {
-      if (WABT_FAILED(parse_uint64($1.text.start,
-                                        $1.text.start + $1.text.length, &$$))) {
-        ast_parser_error(&@1, lexer, parser,
-                              "invalid int " PRIstringslice "\"",
-                              WABT_PRINTF_STRING_SLICE_ARG($1.text));
-      }
-    }
-;
-
-literal :
-    NAT {
-      $$.type = $1.type;
-      DUPTEXT($$.text, $1.text);
-    }
-  | INT {
-      $$.type = $1.type;
-      DUPTEXT($$.text, $1.text);
-    }
-  | FLOAT {
-      $$.type = $1.type;
-      DUPTEXT($$.text, $1.text);
-    }
-;
-
-var :
-    nat {
-      $$.loc = @1;
-      $$.type = VarType::Index;
-      $$.index = $1;
-    }
-  | VAR {
-      $$.loc = @1;
-      $$.type = VarType::Name;
-      DUPTEXT($$.name, $1);
-    }
-;
-var_list :
-    /* empty */ { $$ = new VarVector(); }
-  | var_list var {
-      $$ = $1;
-      $$->push_back($2);
-    }
-;
-bind_var_opt :
-    /* empty */ { WABT_ZERO_MEMORY($$); }
-  | bind_var
-;
-bind_var :
-    VAR { DUPTEXT($$, $1); }
-;
-
-labeling_opt :
-    /* empty */ %prec LOW { WABT_ZERO_MEMORY($$); }
-  | bind_var
-;
-
-offset_opt :
-    /* empty */ { $$ = 0; }
-  | OFFSET_EQ_NAT {
-    if (WABT_FAILED(parse_int64($1.start, $1.start + $1.length, &$$,
-                                ParseIntType::SignedAndUnsigned))) {
-      ast_parser_error(&@1, lexer, parser,
-                            "invalid offset \"" PRIstringslice "\"",
-                            WABT_PRINTF_STRING_SLICE_ARG($1));
-      }
-    }
-;
-align_opt :
-    /* empty */ { $$ = USE_NATURAL_ALIGNMENT; }
-  | ALIGN_EQ_NAT {
-    if (WABT_FAILED(parse_int32($1.start, $1.start + $1.length, &$$,
-                                ParseIntType::UnsignedOnly))) {
-      ast_parser_error(&@1, lexer, parser,
-                       "invalid alignment \"" PRIstringslice "\"",
-                       WABT_PRINTF_STRING_SLICE_ARG($1));
-      }
-    }
-;
-
-instr :
-    plain_instr { $$ = join_exprs1(&@1, $1); }
-  | block_instr { $$ = join_exprs1(&@1, $1); }
-  | expr { $$ = $1; }
-;
-plain_instr :
-    UNREACHABLE {
-      $$ = Expr::CreateUnreachable();
-    }
-  | NOP {
-      $$ = Expr::CreateNop();
-    }
-  | DROP {
-      $$ = Expr::CreateDrop();
-    }
-  | SELECT {
-      $$ = Expr::CreateSelect();
-    }
-  | BR var {
-      $$ = Expr::CreateBr($2);
-    }
-  | BR_IF var {
-      $$ = Expr::CreateBrIf($2);
-    }
-  | BR_TABLE var_list var {
-      $$ = Expr::CreateBrTable($2, $3);
-    }
-  | RETURN {
-      $$ = Expr::CreateReturn();
-    }
-  | CALL var {
-      $$ = Expr::CreateCall($2);
-    }
-  | CALL_INDIRECT var {
-      $$ = Expr::CreateCallIndirect($2);
-    }
-  | GET_LOCAL var {
-      $$ = Expr::CreateGetLocal($2);
-    }
-  | SET_LOCAL var {
-      $$ = Expr::CreateSetLocal($2);
-    }
-  | TEE_LOCAL var {
-      $$ = Expr::CreateTeeLocal($2);
-    }
-  | GET_GLOBAL var {
-      $$ = Expr::CreateGetGlobal($2);
-    }
-  | SET_GLOBAL var {
-      $$ = Expr::CreateSetGlobal($2);
-    }
-  | LOAD offset_opt align_opt {
-      $$ = Expr::CreateLoad($1, $3, $2);
-    }
-  | STORE offset_opt align_opt {
-      $$ = Expr::CreateStore($1, $3, $2);
-    }
-  | CONST literal {
-      Const const_;
-      WABT_ZERO_MEMORY(const_);
-      const_.loc = @1;
-      if (WABT_FAILED(parse_const($1, $2.type, $2.text.start,
-                                  $2.text.start + $2.text.length, &const_))) {
-        ast_parser_error(&@2, lexer, parser,
-                              "invalid literal \"" PRIstringslice "\"",
-                              WABT_PRINTF_STRING_SLICE_ARG($2.text));
-      }
-      delete [] $2.text.start;
-      $$ = Expr::CreateConst(const_);
-    }
-  | UNARY {
-      $$ = Expr::CreateUnary($1);
-    }
-  | BINARY {
-      $$ = Expr::CreateBinary($1);
-    }
-  | COMPARE {
-      $$ = Expr::CreateCompare($1);
-    }
-  | CONVERT {
-      $$ = Expr::CreateConvert($1);
-    }
-  | CURRENT_MEMORY {
-      $$ = Expr::CreateCurrentMemory();
-    }
-  | GROW_MEMORY {
-      $$ = Expr::CreateGrowMemory();
-    }
-;
-block_instr :
-    BLOCK labeling_opt block END labeling_opt {
-      $$ = Expr::CreateBlock($3);
-      $$->block->label = $2;
-      CHECK_END_LABEL(@5, $$->block->label, $5);
-    }
-  | LOOP labeling_opt block END labeling_opt {
-      $$ = Expr::CreateLoop($3);
-      $$->loop->label = $2;
-      CHECK_END_LABEL(@5, $$->loop->label, $5);
-    }
-  | IF labeling_opt block END labeling_opt {
-      $$ = Expr::CreateIf($3, nullptr);
-      $$->if_.true_->label = $2;
-      CHECK_END_LABEL(@5, $$->if_.true_->label, $5);
-    }
-  | IF labeling_opt block ELSE labeling_opt instr_list END labeling_opt {
-      $$ = Expr::CreateIf($3, $6.first);
-      $$->if_.true_->label = $2;
-      CHECK_END_LABEL(@5, $$->if_.true_->label, $5);
-      CHECK_END_LABEL(@8, $$->if_.true_->label, $8);
-    }
-;
-block :
-    value_type_list instr_list {
-      $$ = new Block();
-      $$->sig = std::move(*$1);
-      delete $1;
-      $$->first = $2.first;
-    }
-;
-
-expr :
-    LPAR expr1 RPAR { $$ = $2; }
-;
-
-expr1 :
-    plain_instr expr_list {
-      $$ = join_exprs2(&@1, &$2, $1);
-    }
-  | BLOCK labeling_opt block {
-      Expr* expr = Expr::CreateBlock($3);
-      expr->block->label = $2;
-      $$ = join_exprs1(&@1, expr);
-    }
-  | LOOP labeling_opt block {
-      Expr* expr = Expr::CreateLoop($3);
-      expr->loop->label = $2;
-      $$ = join_exprs1(&@1, expr);
-    }
-  | IF labeling_opt value_type_list if_ {
-      $$ = $4;
-      Expr* if_ = $4.last;
-      assert(if_->type == ExprType::If);
-      if_->if_.true_->label = $2;
-      if_->if_.true_->sig = std::move(*$3);
-      delete $3;
-    }
-;
-if_ :
-    LPAR THEN instr_list RPAR LPAR ELSE instr_list RPAR {
-      Expr* expr = Expr::CreateIf(new Block($3.first), $7.first);
-      $$ = join_exprs1(&@1, expr);
-    }
-  | LPAR THEN instr_list RPAR {
-      Expr* expr = Expr::CreateIf(new Block($3.first), nullptr);
-      $$ = join_exprs1(&@1, expr);
-    }
-  | expr LPAR THEN instr_list RPAR LPAR ELSE instr_list RPAR {
-      Expr* expr = Expr::CreateIf(new Block($4.first), $8.first);
-      $$ = join_exprs2(&@1, &$1, expr);
-    }
-  | expr LPAR THEN instr_list RPAR {
-      Expr* expr = Expr::CreateIf(new Block($4.first), nullptr);
-      $$ = join_exprs2(&@1, &$1, expr);
-    }
-  | expr expr expr {
-      Expr* expr = Expr::CreateIf(new Block($2.first), $3.first);
-      $$ = join_exprs2(&@1, &$1, expr);
-    }
-  | expr expr {
-      Expr* expr = Expr::CreateIf(new Block($2.first), nullptr);
-      $$ = join_exprs2(&@1, &$1, expr);
-    }
-;
-
-instr_list :
-    /* empty */ { WABT_ZERO_MEMORY($$); }
-  | instr instr_list {
-      $$.first = $1.first;
-      $1.last->next = $2.first;
-      $$.last = $2.last ? $2.last : $1.last;
-      $$.size = $1.size + $2.size;
-    }
-;
-expr_list :
-    /* empty */ { WABT_ZERO_MEMORY($$); }
-  | expr expr_list {
-      $$.first = $1.first;
-      $1.last->next = $2.first;
-      $$.last = $2.last ? $2.last : $1.last;
-      $$.size = $1.size + $2.size;
-    }
-
-const_expr :
-    instr_list
-;
-
-/* Functions */
-func_fields :
-    func_body
-  | LPAR RESULT value_type_list RPAR func_body {
-      $$ = new FuncField();
-      $$->type = FuncFieldType::ResultTypes;
-      $$->types = $3;
-      $$->next = $5;
-    }
-  | LPAR PARAM value_type_list RPAR func_fields {
-      $$ = new FuncField();
-      $$->type = FuncFieldType::ParamTypes;
-      $$->types = $3;
-      $$->next = $5;
-    }
-  | LPAR PARAM bind_var VALUE_TYPE RPAR func_fields {
-      $$ = new FuncField();
-      $$->type = FuncFieldType::BoundParam;
-      $$->bound_type.loc = @2;
-      $$->bound_type.name = $3;
-      $$->bound_type.type = $4;
-      $$->next = $6;
-    }
-;
-func_body :
-    instr_list {
-      $$ = new FuncField();
-      $$->type = FuncFieldType::Exprs;
-      $$->first_expr = $1.first;
-      $$->next = nullptr;
-    }
-  | LPAR LOCAL value_type_list RPAR func_body {
-      $$ = new FuncField();
-      $$->type = FuncFieldType::LocalTypes;
-      $$->types = $3;
-      $$->next = $5;
-    }
-  | LPAR LOCAL bind_var VALUE_TYPE RPAR func_body {
-      $$ = new FuncField();
-      $$->type = FuncFieldType::BoundLocal;
-      $$->bound_type.loc = @2;
-      $$->bound_type.name = $3;
-      $$->bound_type.type = $4;
-      $$->next = $6;
-    }
-;
-func_info :
-    func_fields {
-      $$ = new Func();
-      FuncField* field = $1;
-
-      while (field) {
-        FuncField* next = field->next;
-        switch (field->type) {
-          case FuncFieldType::Exprs:
-            $$->first_expr = field->first_expr;
-            field->first_expr = nullptr;
-            break;
-
-          case FuncFieldType::ParamTypes:
-          case FuncFieldType::LocalTypes: {
-            TypeVector& types = field->type == FuncFieldType::ParamTypes
-                                    ? $$->decl.sig.param_types
-                                    : $$->local_types;
-            types.insert(types.end(), field->types->begin(),
-                         field->types->end());
-            break;
-          }
-
-          case FuncFieldType::BoundParam:
-          case FuncFieldType::BoundLocal: {
-            TypeVector* types;
-            BindingHash* bindings;
-            if (field->type == FuncFieldType::BoundParam) {
-              types = &$$->decl.sig.param_types;
-              bindings = &$$->param_bindings;
-            } else {
-              types = &$$->local_types;
-              bindings = &$$->local_bindings;
-            }
-
-            types->push_back(field->bound_type.type);
-            bindings->emplace(
-                string_slice_to_string(field->bound_type.name),
-                Binding(field->bound_type.loc, types->size() - 1));
-            break;
-          }
-
-          case FuncFieldType::ResultTypes:
-            $$->decl.sig.result_types = std::move(*field->types);
-            break;
-        }
-
-        delete field;
-        field = next;
-      }
-    }
-;
-func :
-    LPAR FUNC bind_var_opt inline_export type_use func_info RPAR {
-      $$ = new ExportedFunc();
-      $$->func.reset($6);
-      $$->func->decl.has_func_type = true;
-      $$->func->decl.type_var = $5;
-      $$->func->name = $3;
-      $$->export_ = std::move(*$4);
-      delete $4;
-    }
-  /* Duplicate above for empty inline_export_opt to avoid LR(1) conflict. */
-  | LPAR FUNC bind_var_opt type_use func_info RPAR {
-      $$ = new ExportedFunc();
-      $$->func.reset($5);
-      $$->func->decl.has_func_type = true;
-      $$->func->decl.type_var = $4;
-      $$->func->name = $3;
-    }
-  | LPAR FUNC bind_var_opt inline_export func_info RPAR {
-      $$ = new ExportedFunc();
-      $$->func.reset($5);
-      $$->func->name = $3;
-      $$->export_ = std::move(*$4);
-      delete $4;
-    }
-  /* Duplicate above for empty inline_export_opt to avoid LR(1) conflict. */
-  | LPAR FUNC bind_var_opt func_info RPAR {
-      $$ = new ExportedFunc();
-      $$->func.reset($4);
-      $$->func->name = $3;
-    }
-;
-
-/* Tables & Memories */
-
-offset :
-    LPAR OFFSET const_expr RPAR {
-      $$ = $3;
-    }
-  | expr
-;
-
-elem :
-    LPAR ELEM var offset var_list RPAR {
-      $$ = new ElemSegment();
-      $$->table_var = $3;
-      $$->offset = $4.first;
-      $$->vars = std::move(*$5);
-      delete $5;
-    }
-  | LPAR ELEM offset var_list RPAR {
-      $$ = new ElemSegment();
-      $$->table_var.loc = @2;
-      $$->table_var.type = VarType::Index;
-      $$->table_var.index = 0;
-      $$->offset = $3.first;
-      $$->vars = std::move(*$4);
-      delete $4;
-    }
-;
-
-table :
-    LPAR TABLE bind_var_opt inline_export_opt table_sig RPAR {
-      $$ = new ExportedTable();
-      $$->table.reset($5);
-      $$->table->name = $3;
-      $$->has_elem_segment = false;
-      $$->export_ = std::move(*$4);
-      delete $4;
-    }
-  | LPAR TABLE bind_var_opt inline_export_opt elem_type
-         LPAR ELEM var_list RPAR RPAR {
-      Expr* expr = Expr::CreateConst(Const(Const::I32(), 0));
-      expr->loc = @2;
-
-      $$ = new ExportedTable();
-      $$->table.reset(new Table());
-      $$->table->name = $3;
-      $$->table->elem_limits.initial = $8->size();
-      $$->table->elem_limits.max = $8->size();
-      $$->table->elem_limits.has_max = true;
-      $$->has_elem_segment = true;
-      $$->elem_segment.reset(new ElemSegment());
-      $$->elem_segment->offset = expr;
-      $$->elem_segment->vars = std::move(*$8);
-      delete $8;
-      $$->export_ = std::move(*$4);
-      delete $4;
-    }
-;
-
-data :
-    LPAR DATA var offset text_list RPAR {
-      $$ = new DataSegment();
-      $$->memory_var = $3;
-      $$->offset = $4.first;
-      dup_text_list(&$5, &$$->data, &$$->size);
-      destroy_text_list(&$5);
-    }
-  | LPAR DATA offset text_list RPAR {
-      $$ = new DataSegment();
-      $$->memory_var.loc = @2;
-      $$->memory_var.type = VarType::Index;
-      $$->memory_var.index = 0;
-      $$->offset = $3.first;
-      dup_text_list(&$4, &$$->data, &$$->size);
-      destroy_text_list(&$4);
-    }
-;
-
-memory :
-    LPAR MEMORY bind_var_opt inline_export_opt memory_sig RPAR {
-      $$ = new ExportedMemory();
-      $$->memory.reset($5);
-      $$->memory->name = $3;
-      $$->has_data_segment = false;
-      $$->export_ = std::move(*$4);
-      delete $4;
-    }
-  | LPAR MEMORY bind_var_opt inline_export LPAR DATA text_list RPAR RPAR {
-      Expr* expr = Expr::CreateConst(Const(Const::I32(), 0));
-      expr->loc = @2;
-
-      $$ = new ExportedMemory();
-      $$->has_data_segment = true;
-      $$->data_segment.reset(new DataSegment());
-      $$->data_segment->offset = expr;
-      dup_text_list(&$7, &$$->data_segment->data, &$$->data_segment->size);
-      destroy_text_list(&$7);
-      uint32_t byte_size = WABT_ALIGN_UP_TO_PAGE($$->data_segment->size);
-      uint32_t page_size = WABT_BYTES_TO_PAGES(byte_size);
-      $$->memory.reset(new Memory());
-      $$->memory->name = $3;
-      $$->memory->page_limits.initial = page_size;
-      $$->memory->page_limits.max = page_size;
-      $$->memory->page_limits.has_max = true;
-      $$->export_ = std::move(*$4);
-      delete $4;
-    }
-  /* Duplicate above for empty inline_export_opt to avoid LR(1) conflict. */
-  | LPAR MEMORY bind_var_opt LPAR DATA text_list RPAR RPAR {
-      Expr* expr = Expr::CreateConst(Const(Const::I32(), 0));
-      expr->loc = @2;
-
-      $$ = new ExportedMemory();
-      $$->has_data_segment = true;
-      $$->data_segment.reset(new DataSegment());
-      $$->data_segment->offset = expr;
-      dup_text_list(&$6, &$$->data_segment->data, &$$->data_segment->size);
-      destroy_text_list(&$6);
-      uint32_t byte_size = WABT_ALIGN_UP_TO_PAGE($$->data_segment->size);
-      uint32_t page_size = WABT_BYTES_TO_PAGES(byte_size);
-      $$->memory.reset(new Memory());
-      $$->memory->name = $3;
-      $$->memory->page_limits.initial = page_size;
-      $$->memory->page_limits.max = page_size;
-      $$->memory->page_limits.has_max = true;
-      $$->export_.has_export = false;
-    }
-;
-
-global :
-    LPAR GLOBAL bind_var_opt inline_export global_type const_expr RPAR {
-      $$ = new ExportedGlobal();
-      $$->global.reset($5);
-      $$->global->name = $3;
-      $$->global->init_expr = $6.first;
-      $$->export_ = std::move(*$4);
-      delete $4;
-    }
-  | LPAR GLOBAL bind_var_opt global_type const_expr RPAR {
-      $$ = new ExportedGlobal();
-      $$->global.reset($4);
-      $$->global->name = $3;
-      $$->global->init_expr = $5.first;
-      $$->export_.has_export = false;
-    }
-;
-
-
-/* Imports & Exports */
-
-import_kind :
-    LPAR FUNC bind_var_opt type_use RPAR {
-      $$ = new Import();
-      $$->kind = ExternalKind::Func;
-      $$->func = new Func();
-      $$->func->name = $3;
-      $$->func->decl.has_func_type = true;
-      $$->func->decl.type_var = $4;
-    }
-  | LPAR FUNC bind_var_opt func_sig RPAR {
-      $$ = new Import();
-      $$->kind = ExternalKind::Func;
-      $$->func = new Func();
-      $$->func->name = $3;
-      $$->func->decl.sig = std::move(*$4);
-      delete $4;
-    }
-  | LPAR TABLE bind_var_opt table_sig RPAR {
-      $$ = new Import();
-      $$->kind = ExternalKind::Table;
-      $$->table = $4;
-      $$->table->name = $3;
-    }
-  | LPAR MEMORY bind_var_opt memory_sig RPAR {
-      $$ = new Import();
-      $$->kind = ExternalKind::Memory;
-      $$->memory = $4;
-      $$->memory->name = $3;
-    }
-  | LPAR GLOBAL bind_var_opt global_type RPAR {
-      $$ = new Import();
-      $$->kind = ExternalKind::Global;
-      $$->global = $4;
-      $$->global->name = $3;
-    }
-;
-import :
-    LPAR IMPORT quoted_text quoted_text import_kind RPAR {
-      $$ = $5;
-      $$->module_name = $3;
-      $$->field_name = $4;
-    }
-  | LPAR FUNC bind_var_opt inline_import type_use RPAR {
-      $$ = $4;
-      $$->kind = ExternalKind::Func;
-      $$->func = new Func();
-      $$->func->name = $3;
-      $$->func->decl.has_func_type = true;
-      $$->func->decl.type_var = $5;
-    }
-  | LPAR FUNC bind_var_opt inline_import func_sig RPAR {
-      $$ = $4;
-      $$->kind = ExternalKind::Func;
-      $$->func = new Func();
-      $$->func->name = $3;
-      $$->func->decl.sig = std::move(*$5);
-      delete $5;
-    }
-  | LPAR TABLE bind_var_opt inline_import table_sig RPAR {
-      $$ = $4;
-      $$->kind = ExternalKind::Table;
-      $$->table = $5;
-      $$->table->name = $3;
-    }
-  | LPAR MEMORY bind_var_opt inline_import memory_sig RPAR {
-      $$ = $4;
-      $$->kind = ExternalKind::Memory;
-      $$->memory = $5;
-      $$->memory->name = $3;
-    }
-  | LPAR GLOBAL bind_var_opt inline_import global_type RPAR {
-      $$ = $4;
-      $$->kind = ExternalKind::Global;
-      $$->global = $5;
-      $$->global->name = $3;
-    }
-;
-
-inline_import :
-    LPAR IMPORT quoted_text quoted_text RPAR {
-      $$ = new Import();
-      $$->module_name = $3;
-      $$->field_name = $4;
-    }
-;
-
-export_kind :
-    LPAR FUNC var RPAR {
-      $$ = new Export();
-      $$->kind = ExternalKind::Func;
-      $$->var = $3;
-    }
-  | LPAR TABLE var RPAR {
-      $$ = new Export();
-      $$->kind = ExternalKind::Table;
-      $$->var = $3;
-    }
-  | LPAR MEMORY var RPAR {
-      $$ = new Export();
-      $$->kind = ExternalKind::Memory;
-      $$->var = $3;
-    }
-  | LPAR GLOBAL var RPAR {
-      $$ = new Export();
-      $$->kind = ExternalKind::Global;
-      $$->var = $3;
-    }
-;
-export :
-    LPAR EXPORT quoted_text export_kind RPAR {
-      $$ = $4;
-      $$->name = $3;
-    }
-;
-
-inline_export_opt :
-    /* empty */ {
-      $$ = new OptionalExport();
-      $$->has_export = false;
-    }
-  | inline_export
-;
-inline_export :
-    LPAR EXPORT quoted_text RPAR {
-      $$ = new OptionalExport();
-      $$->has_export = true;
-      $$->export_.reset(new Export());
-      $$->export_->name = $3;
-    }
-;
-
-
-/* Modules */
-
-type_def :
-    LPAR TYPE func_type RPAR {
-      $$ = new FuncType();
-      $$->sig = std::move(*$3);
-      delete $3;
-    }
-  | LPAR TYPE bind_var func_type RPAR {
-      $$ = new FuncType();
-      $$->name = $3;
-      $$->sig = std::move(*$4);
-      delete $4;
-    }
-;
-
-start :
-    LPAR START var RPAR { $$ = $3; }
-;
-
-module_fields :
-    /* empty */ {
-      $$ = new Module();
-    }
-  | module_fields type_def {
-      $$ = $1;
-      ModuleField* field;
-      APPEND_FIELD_TO_LIST($$, field, FuncType, func_type, @2, $2);
-      APPEND_ITEM_TO_VECTOR($$, func_types, field->func_type);
-      INSERT_BINDING($$, func_type, func_types, @2, $2->name);
-    }
-  | module_fields global {
-      $$ = $1;
-      ModuleField* field;
-      APPEND_FIELD_TO_LIST($$, field, Global, global, @2, $2->global.release());
-      APPEND_ITEM_TO_VECTOR($$, globals, field->global);
-      INSERT_BINDING($$, global, globals, @2, field->global->name);
-      APPEND_INLINE_EXPORT($$, Global, @2, $2, $$->globals.size() - 1);
-      delete $2;
-    }
-  | module_fields table {
-      $$ = $1;
-      ModuleField* field;
-      APPEND_FIELD_TO_LIST($$, field, Table, table, @2, $2->table.release());
-      APPEND_ITEM_TO_VECTOR($$, tables, field->table);
-      INSERT_BINDING($$, table, tables, @2, field->table->name);
-      APPEND_INLINE_EXPORT($$, Table, @2, $2, $$->tables.size() - 1);
-
-      if ($2->has_elem_segment) {
-        ModuleField* elem_segment_field;
-        APPEND_FIELD_TO_LIST($$, elem_segment_field, ElemSegment, elem_segment,
-                             @2, $2->elem_segment.release());
-        APPEND_ITEM_TO_VECTOR($$, elem_segments,
-                              elem_segment_field->elem_segment);
-      }
-      delete $2;
-    }
-  | module_fields memory {
-      $$ = $1;
-      ModuleField* field;
-      APPEND_FIELD_TO_LIST($$, field, Memory, memory, @2, $2->memory.release());
-      APPEND_ITEM_TO_VECTOR($$, memories, field->memory);
-      INSERT_BINDING($$, memory, memories, @2, field->memory->name);
-      APPEND_INLINE_EXPORT($$, Memory, @2, $2, $$->memories.size() - 1);
-
-      if ($2->has_data_segment) {
-        ModuleField* data_segment_field;
-        APPEND_FIELD_TO_LIST($$, data_segment_field, DataSegment, data_segment,
-                             @2, $2->data_segment.release());
-        APPEND_ITEM_TO_VECTOR($$, data_segments,
-                              data_segment_field->data_segment);
-      }
-      delete $2;
-    }
-  | module_fields func {
-      $$ = $1;
-      ModuleField* field;
-      APPEND_FIELD_TO_LIST($$, field, Func, func, @2, $2->func.release());
-      append_implicit_func_declaration(&@2, $$, &field->func->decl);
-      APPEND_ITEM_TO_VECTOR($$, funcs, field->func);
-      INSERT_BINDING($$, func, funcs, @2, field->func->name);
-      APPEND_INLINE_EXPORT($$, Func, @2, $2, $$->funcs.size() - 1);
-      delete $2;
-    }
-  | module_fields elem {
-      $$ = $1;
-      ModuleField* field;
-      APPEND_FIELD_TO_LIST($$, field, ElemSegment, elem_segment, @2, $2);
-      APPEND_ITEM_TO_VECTOR($$, elem_segments, field->elem_segment);
-    }
-  | module_fields data {
-      $$ = $1;
-      ModuleField* field;
-      APPEND_FIELD_TO_LIST($$, field, DataSegment, data_segment, @2, $2);
-      APPEND_ITEM_TO_VECTOR($$, data_segments, field->data_segment);
-    }
-  | module_fields start {
-      $$ = $1;
-      ModuleField* field;
-      APPEND_FIELD_TO_LIST($$, field, Start, start, @2, $2);
-      $$->start = &field->start;
-    }
-  | module_fields import {
-      $$ = $1;
-      ModuleField* field;
-      APPEND_FIELD_TO_LIST($$, field, Import, import, @2, $2);
-      CHECK_IMPORT_ORDERING($$, func, funcs, @2);
-      CHECK_IMPORT_ORDERING($$, table, tables, @2);
-      CHECK_IMPORT_ORDERING($$, memory, memories, @2);
-      CHECK_IMPORT_ORDERING($$, global, globals, @2);
-      switch ($2->kind) {
-        case ExternalKind::Func:
-          append_implicit_func_declaration(&@2, $$, &field->import->func->decl);
-          APPEND_ITEM_TO_VECTOR($$, funcs, field->import->func);
-          INSERT_BINDING($$, func, funcs, @2, field->import->func->name);
-          $$->num_func_imports++;
-          break;
-        case ExternalKind::Table:
-          APPEND_ITEM_TO_VECTOR($$, tables, field->import->table);
-          INSERT_BINDING($$, table, tables, @2, field->import->table->name);
-          $$->num_table_imports++;
-          break;
-        case ExternalKind::Memory:
-          APPEND_ITEM_TO_VECTOR($$, memories, field->import->memory);
-          INSERT_BINDING($$, memory, memories, @2, field->import->memory->name);
-          $$->num_memory_imports++;
-          break;
-        case ExternalKind::Global:
-          APPEND_ITEM_TO_VECTOR($$, globals, field->import->global);
-          INSERT_BINDING($$, global, globals, @2, field->import->global->name);
-          $$->num_global_imports++;
-          break;
-      }
-      APPEND_ITEM_TO_VECTOR($$, imports, field->import);
-    }
-  | module_fields export {
-      $$ = $1;
-      ModuleField* field;
-      APPEND_FIELD_TO_LIST($$, field, Export, export_, @2, $2);
-      APPEND_ITEM_TO_VECTOR($$, exports, field->export_);
-      INSERT_BINDING($$, export, exports, @2, field->export_->name);
-    }
-;
-
-raw_module :
-    LPAR MODULE bind_var_opt module_fields RPAR {
-      $$ = new RawModule();
-      $$->type = RawModuleType::Text;
-      $$->text = $4;
-      $$->text->name = $3;
-      $$->text->loc = @2;
-
-      /* resolve func type variables where the signature was not specified
-       * explicitly */
-      for (Func* func: $4->funcs) {
-        if (decl_has_func_type(&func->decl) &&
-            is_empty_signature(&func->decl.sig)) {
-          FuncType* func_type =
-              get_func_type_by_var($4, &func->decl.type_var);
-          if (func_type) {
-            func->decl.sig = func_type->sig;
-          }
-        }
-      }
-    }
-  | LPAR MODULE bind_var_opt non_empty_text_list RPAR {
-      $$ = new RawModule();
-      $$->type = RawModuleType::Binary;
-      $$->binary.name = $3;
-      $$->binary.loc = @2;
-      dup_text_list(&$4, &$$->binary.data, &$$->binary.size);
-      destroy_text_list(&$4);
-    }
-;
-
-module :
-    raw_module {
-      if ($1->type == RawModuleType::Text) {
-        $$ = $1->text;
-        $1->text = nullptr;
-      } else {
-        assert($1->type == RawModuleType::Binary);
-        $$ = new Module();
-        ReadBinaryOptions options = WABT_READ_BINARY_OPTIONS_DEFAULT;
-        BinaryErrorCallbackData user_data;
-        user_data.loc = &$1->binary.loc;
-        user_data.lexer = lexer;
-        user_data.parser = parser;
-        BinaryErrorHandler error_handler;
-        error_handler.on_error = on_read_binary_error;
-        error_handler.user_data = &user_data;
-        read_binary_ast($1->binary.data, $1->binary.size, &options,
-                        &error_handler, $$);
-        $$->name = $1->binary.name;
-        $$->loc = $1->binary.loc;
-        WABT_ZERO_MEMORY($1->binary.name);
-      }
-      delete $1;
-    }
-;
-
-/* Scripts */
-
-script_var_opt :
-    /* empty */ {
-      WABT_ZERO_MEMORY($$);
-      $$.type = VarType::Index;
-      $$.index = INVALID_VAR_INDEX;
-    }
-  | VAR {
-      WABT_ZERO_MEMORY($$);
-      $$.type = VarType::Name;
-      DUPTEXT($$.name, $1);
-    }
-;
-
-action :
-    LPAR INVOKE script_var_opt quoted_text const_list RPAR {
-      $$ = new Action();
-      $$->loc = @2;
-      $$->module_var = $3;
-      $$->type = ActionType::Invoke;
-      $$->name = $4;
-      $$->invoke = new ActionInvoke();
-      $$->invoke->args = std::move(*$5);
-      delete $5;
-    }
-  | LPAR GET script_var_opt quoted_text RPAR {
-      $$ = new Action();
-      $$->loc = @2;
-      $$->module_var = $3;
-      $$->type = ActionType::Get;
-      $$->name = $4;
-    }
-;
-
-assertion :
-    LPAR ASSERT_MALFORMED raw_module quoted_text RPAR {
-      $$ = new Command();
-      $$->type = CommandType::AssertMalformed;
-      $$->assert_malformed.module = $3;
-      $$->assert_malformed.text = $4;
-    }
-  | LPAR ASSERT_INVALID raw_module quoted_text RPAR {
-      $$ = new Command();
-      $$->type = CommandType::AssertInvalid;
-      $$->assert_invalid.module = $3;
-      $$->assert_invalid.text = $4;
-    }
-  | LPAR ASSERT_UNLINKABLE raw_module quoted_text RPAR {
-      $$ = new Command();
-      $$->type = CommandType::AssertUnlinkable;
-      $$->assert_unlinkable.module = $3;
-      $$->assert_unlinkable.text = $4;
-    }
-  | LPAR ASSERT_TRAP raw_module quoted_text RPAR {
-      $$ = new Command();
-      $$->type = CommandType::AssertUninstantiable;
-      $$->assert_uninstantiable.module = $3;
-      $$->assert_uninstantiable.text = $4;
-    }
-  | LPAR ASSERT_RETURN action const_list RPAR {
-      $$ = new Command();
-      $$->type = CommandType::AssertReturn;
-      $$->assert_return.action = $3;
-      $$->assert_return.expected = $4;
-    }
-  | LPAR ASSERT_RETURN_CANONICAL_NAN action RPAR {
-      $$ = new Command();
-      $$->type = CommandType::AssertReturnCanonicalNan;
-      $$->assert_return_canonical_nan.action = $3;
-    }
-  | LPAR ASSERT_RETURN_ARITHMETIC_NAN action RPAR {
-      $$ = new Command();
-      $$->type = CommandType::AssertReturnArithmeticNan;
-      $$->assert_return_arithmetic_nan.action = $3;
-    }
-  | LPAR ASSERT_TRAP action quoted_text RPAR {
-      $$ = new Command();
-      $$->type = CommandType::AssertTrap;
-      $$->assert_trap.action = $3;
-      $$->assert_trap.text = $4;
-    }
-  | LPAR ASSERT_EXHAUSTION action quoted_text RPAR {
-      $$ = new Command();
-      $$->type = CommandType::AssertExhaustion;
-      $$->assert_trap.action = $3;
-      $$->assert_trap.text = $4;
-    }
-;
-
-cmd :
-    action {
-      $$ = new Command();
-      $$->type = CommandType::Action;
-      $$->action = $1;
-    }
-  | assertion
-  | module {
-      $$ = new Command();
-      $$->type = CommandType::Module;
-      $$->module = $1;
-    }
-  | LPAR REGISTER quoted_text script_var_opt RPAR {
-      $$ = new Command();
-      $$->type = CommandType::Register;
-      $$->register_.module_name = $3;
-      $$->register_.var = $4;
-      $$->register_.var.loc = @4;
-    }
-;
-cmd_list :
-    /* empty */ { $$ = new CommandPtrVector(); }
-  | cmd_list cmd {
-      $$ = $1;
-      $$->emplace_back($2);
-    }
-;
-
-const :
-    LPAR CONST literal RPAR {
-      $$.loc = @2;
-      if (WABT_FAILED(parse_const($2, $3.type, $3.text.start,
-                                  $3.text.start + $3.text.length, &$$))) {
-        ast_parser_error(&@3, lexer, parser,
-                              "invalid literal \"" PRIstringslice "\"",
-                              WABT_PRINTF_STRING_SLICE_ARG($3.text));
-      }
-      delete [] $3.text.start;
-    }
-;
-const_list :
-    /* empty */ { $$ = new ConstVector(); }
-  | const_list const {
-      $$ = $1;
-      $$->push_back($2);
-    }
-;
-
-script :
-    cmd_list {
-      $$ = new Script();
-      $$->commands = std::move(*$1);
-      delete $1;
-
-      int last_module_index = -1;
-      for (size_t i = 0; i < $$->commands.size(); ++i) {
-        Command& command = *$$->commands[i].get();
-        Var* module_var = nullptr;
-        switch (command.type) {
-          case CommandType::Module: {
-            last_module_index = i;
-
-            /* Wire up module name bindings. */
-            Module* module = command.module;
-            if (module->name.length == 0)
-              continue;
-
-            $$->module_bindings.emplace(string_slice_to_string(module->name),
-                                        Binding(module->loc, i));
-            break;
-          }
-
-          case CommandType::AssertReturn:
-            module_var = &command.assert_return.action->module_var;
-            goto has_module_var;
-          case CommandType::AssertReturnCanonicalNan:
-            module_var =
-                &command.assert_return_canonical_nan.action->module_var;
-            goto has_module_var;
-          case CommandType::AssertReturnArithmeticNan:
-            module_var =
-                &command.assert_return_arithmetic_nan.action->module_var;
-            goto has_module_var;
-          case CommandType::AssertTrap:
-          case CommandType::AssertExhaustion:
-            module_var = &command.assert_trap.action->module_var;
-            goto has_module_var;
-          case CommandType::Action:
-            module_var = &command.action->module_var;
-            goto has_module_var;
-          case CommandType::Register:
-            module_var = &command.register_.var;
-            goto has_module_var;
-
-          has_module_var: {
-            /* Resolve actions with an invalid index to use the preceding
-             * module. */
-            if (module_var->type == VarType::Index &&
-                module_var->index == INVALID_VAR_INDEX) {
-              module_var->index = last_module_index;
-            }
-            break;
-          }
-
-          default:
-            break;
-        }
-      }
-      parser->script = $$;
-    }
-;
-
-/* bison destroys the start symbol even on a successful parse. We want to keep
- script from being destroyed, so create a dummy start symbol. */
-script_start :
-    script
-;
-
-%%
-
-void append_expr_list(ExprList* expr_list, ExprList* expr) {
-  if (!expr->first)
-    return;
-  if (expr_list->last)
-    expr_list->last->next = expr->first;
-  else
-    expr_list->first = expr->first;
-  expr_list->last = expr->last;
-  expr_list->size += expr->size;
-}
-
-void append_expr(ExprList* expr_list, Expr* expr) {
-  if (expr_list->last)
-    expr_list->last->next = expr;
-  else
-    expr_list->first = expr;
-  expr_list->last = expr;
-  expr_list->size++;
-}
-
-ExprList join_exprs1(Location* loc, Expr* expr1) {
-  ExprList result;
-  WABT_ZERO_MEMORY(result);
-  append_expr(&result, expr1);
-  expr1->loc = *loc;
-  return result;
-}
-
-ExprList join_exprs2(Location* loc, ExprList* expr1, Expr* expr2) {
-  ExprList result;
-  WABT_ZERO_MEMORY(result);
-  append_expr_list(&result, expr1);
-  append_expr(&result, expr2);
-  expr2->loc = *loc;
-  return result;
-}
-
-Result parse_const(Type type,
-                   LiteralType literal_type,
-                   const char* s,
-                   const char* end,
-                   Const* out) {
-  out->type = type;
-  switch (type) {
-    case Type::I32:
-      return parse_int32(s, end, &out->u32, ParseIntType::SignedAndUnsigned);
-    case Type::I64:
-      return parse_int64(s, end, &out->u64, ParseIntType::SignedAndUnsigned);
-    case Type::F32:
-      return parse_float(literal_type, s, end, &out->f32_bits);
-    case Type::F64:
-      return parse_double(literal_type, s, end, &out->f64_bits);
-    default:
-      assert(0);
-      break;
-  }
-  return Result::Error;
-}
-
-size_t copy_string_contents(StringSlice* text, char* dest) {
-  const char* src = text->start + 1;
-  const char* end = text->start + text->length - 1;
-
-  char* dest_start = dest;
-
-  while (src < end) {
-    if (*src == '\\') {
-      src++;
-      switch (*src) {
-        case 'n':
-          *dest++ = '\n';
-          break;
-        case 't':
-          *dest++ = '\t';
-          break;
-        case '\\':
-          *dest++ = '\\';
-          break;
-        case '\'':
-          *dest++ = '\'';
-          break;
-        case '\"':
-          *dest++ = '\"';
-          break;
-        default: {
-          /* The string should be validated already, so we know this is a hex
-           * sequence */
-          uint32_t hi;
-          uint32_t lo;
-          if (WABT_SUCCEEDED(parse_hexdigit(src[0], &hi)) &&
-              WABT_SUCCEEDED(parse_hexdigit(src[1], &lo))) {
-            *dest++ = (hi << 4) | lo;
-          } else {
-            assert(0);
-          }
-          src++;
-          break;
-        }
-      }
-      src++;
-    } else {
-      *dest++ = *src++;
-    }
-  }
-  /* return the data length */
-  return dest - dest_start;
-}
-
-void dup_text_list(TextList* text_list, char** out_data, size_t* out_size) {
-  /* walk the linked list to see how much total space is needed */
-  size_t total_size = 0;
-  for (TextListNode* node = text_list->first; node; node = node->next) {
-    /* Always allocate enough space for the entire string including the escape
-     * characters. It will only get shorter, and this way we only have to
-     * iterate through the string once. */
-    const char* src = node->text.start + 1;
-    const char* end = node->text.start + node->text.length - 1;
-    size_t size = (end > src) ? (end - src) : 0;
-    total_size += size;
-  }
-  char* result = new char [total_size];
-  char* dest = result;
-  for (TextListNode* node = text_list->first; node; node = node->next) {
-    size_t actual_size = copy_string_contents(&node->text, dest);
-    dest += actual_size;
-  }
-  *out_data = result;
-  *out_size = dest - result;
-}
-
-bool is_empty_signature(const FuncSignature* sig) {
-  return sig->result_types.empty() && sig->param_types.empty();
-}
-
-void append_implicit_func_declaration(Location* loc,
-                                      Module* module,
-                                      FuncDeclaration* decl) {
-  if (decl_has_func_type(decl))
-    return;
-
-  int sig_index = get_func_type_index_by_decl(module, decl);
-  if (sig_index == -1) {
-    append_implicit_func_type(loc, module, &decl->sig);
-  } else {
-    decl->sig = module->func_types[sig_index]->sig;
-  }
-}
-
-Result parse_ast(AstLexer* lexer, Script** out_script,
-                 SourceErrorHandler* error_handler) {
-  AstParser parser;
-  WABT_ZERO_MEMORY(parser);
-  parser.error_handler = error_handler;
-  int result = wabt_ast_parser_parse(lexer, &parser);
-  delete [] parser.yyssa;
-  delete [] parser.yyvsa;
-  delete [] parser.yylsa;
-  *out_script = parser.script;
-  return result == 0 && parser.errors == 0 ? Result::Ok : Result::Error;
-}
-
-bool on_read_binary_error(uint32_t offset, const char* error, void* user_data) {
-  BinaryErrorCallbackData* data = (BinaryErrorCallbackData*)user_data;
-  if (offset == WABT_UNKNOWN_OFFSET) {
-    ast_parser_error(data->loc, data->lexer, data->parser,
-                     "error in binary module: %s", error);
-  } else {
-    ast_parser_error(data->loc, data->lexer, data->parser,
-                     "error in binary module: @0x%08x: %s", offset, error);
-  }
-  return true;
-}
-
-}  // namespace wabt
diff --git a/lib/wabt/src/ast-writer.cc b/lib/wabt/src/ast-writer.cc
deleted file mode 100644
index a688d00..0000000
--- a/lib/wabt/src/ast-writer.cc
+++ /dev/null
@@ -1,754 +0,0 @@
-/*
- * Copyright 2016 WebAssembly Community Group participants
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "ast-writer.h"
-
-#include <assert.h>
-#include <inttypes.h>
-#include <stdarg.h>
-#include <stdio.h>
-
-#include <string>
-#include <vector>
-
-#include "ast.h"
-#include "common.h"
-#include "literal.h"
-#include "stream.h"
-#include "writer.h"
-
-#define INDENT_SIZE 2
-#define NO_FORCE_NEWLINE 0
-#define FORCE_NEWLINE 1
-
-namespace wabt {
-
-namespace {
-
-static const uint8_t s_is_char_escaped[] = {
-    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, 1, 1, 1, 1, 1, 1, 0, 0, 1, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    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, 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, 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, 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, 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};
-
-enum class NextChar {
-  None,
-  Space,
-  Newline,
-  ForceNewline,
-};
-
-struct Context {
-  Context() { WABT_ZERO_MEMORY(stream); }
-
-  Stream stream;
-  Result result = Result::Ok;
-  int indent = 0;
-  NextChar next_char = NextChar::None;
-  int depth = 0;
-  std::vector<std::string> index_to_name;
-
-  int func_index = 0;
-  int global_index = 0;
-  int export_index = 0;
-  int table_index = 0;
-  int memory_index = 0;
-  int func_type_index = 0;
-};
-
-}  // namespace
-
-static void indent(Context* ctx) {
-  ctx->indent += INDENT_SIZE;
-}
-
-static void dedent(Context* ctx) {
-  ctx->indent -= INDENT_SIZE;
-  assert(ctx->indent >= 0);
-}
-
-static void write_indent(Context* ctx) {
-  static char s_indent[] =
-      "                                                                       "
-      "                                                                       ";
-  static size_t s_indent_len = sizeof(s_indent) - 1;
-  size_t indent = ctx->indent;
-  while (indent > s_indent_len) {
-    write_data(&ctx->stream, s_indent, s_indent_len, nullptr);
-    indent -= s_indent_len;
-  }
-  if (indent > 0) {
-    write_data(&ctx->stream, s_indent, indent, nullptr);
-  }
-}
-
-static void write_next_char(Context* ctx) {
-  switch (ctx->next_char) {
-    case NextChar::Space:
-      write_data(&ctx->stream, " ", 1, nullptr);
-      break;
-    case NextChar::Newline:
-    case NextChar::ForceNewline:
-      write_data(&ctx->stream, "\n", 1, nullptr);
-      write_indent(ctx);
-      break;
-
-    default:
-    case NextChar::None:
-      break;
-  }
-  ctx->next_char = NextChar::None;
-}
-
-static void write_data_with_next_char(Context* ctx,
-                                      const void* src,
-                                      size_t size) {
-  write_next_char(ctx);
-  write_data(&ctx->stream, src, size, nullptr);
-}
-
-static void WABT_PRINTF_FORMAT(2, 3)
-    writef(Context* ctx, const char* format, ...) {
-  WABT_SNPRINTF_ALLOCA(buffer, length, format);
-  /* default to following space */
-  write_data_with_next_char(ctx, buffer, length);
-  ctx->next_char = NextChar::Space;
-}
-
-static void write_putc(Context* ctx, char c) {
-  write_data(&ctx->stream, &c, 1, nullptr);
-}
-
-static void write_puts(Context* ctx, const char* s, NextChar next_char) {
-  size_t len = strlen(s);
-  write_data_with_next_char(ctx, s, len);
-  ctx->next_char = next_char;
-}
-
-static void write_puts_space(Context* ctx, const char* s) {
-  write_puts(ctx, s, NextChar::Space);
-}
-
-static void write_puts_newline(Context* ctx, const char* s) {
-  write_puts(ctx, s, NextChar::Newline);
-}
-
-static void write_newline(Context* ctx, bool force) {
-  if (ctx->next_char == NextChar::ForceNewline)
-    write_next_char(ctx);
-  ctx->next_char = force ? NextChar::ForceNewline : NextChar::Newline;
-}
-
-static void write_open(Context* ctx, const char* name, NextChar next_char) {
-  write_puts(ctx, "(", NextChar::None);
-  write_puts(ctx, name, next_char);
-  indent(ctx);
-}
-
-static void write_open_newline(Context* ctx, const char* name) {
-  write_open(ctx, name, NextChar::Newline);
-}
-
-static void write_open_space(Context* ctx, const char* name) {
-  write_open(ctx, name, NextChar::Space);
-}
-
-static void write_close(Context* ctx, NextChar next_char) {
-  if (ctx->next_char != NextChar::ForceNewline)
-    ctx->next_char = NextChar::None;
-  dedent(ctx);
-  write_puts(ctx, ")", next_char);
-}
-
-static void write_close_newline(Context* ctx) {
-  write_close(ctx, NextChar::Newline);
-}
-
-static void write_close_space(Context* ctx) {
-  write_close(ctx, NextChar::Space);
-}
-
-static void write_string(Context* ctx,
-                         const std::string& str,
-                         NextChar next_char) {
-  write_puts(ctx, str.c_str(), next_char);
-}
-
-static void write_string_slice(Context* ctx,
-                               const StringSlice* str,
-                               NextChar next_char) {
-  writef(ctx, PRIstringslice, WABT_PRINTF_STRING_SLICE_ARG(*str));
-  ctx->next_char = next_char;
-}
-
-static bool write_string_slice_opt(Context* ctx,
-                                   const StringSlice* str,
-                                   NextChar next_char) {
-  if (str->start)
-    write_string_slice(ctx, str, next_char);
-  return !!str->start;
-}
-
-static void write_string_slice_or_index(Context* ctx,
-                                        const StringSlice* str,
-                                        uint32_t index,
-                                        NextChar next_char) {
-  if (str->start)
-    write_string_slice(ctx, str, next_char);
-  else
-    writef(ctx, "(;%u;)", index);
-}
-
-static void write_quoted_data(Context* ctx, const void* data, size_t length) {
-  const uint8_t* u8_data = static_cast<const uint8_t*>(data);
-  static const char s_hexdigits[] = "0123456789abcdef";
-  write_next_char(ctx);
-  write_putc(ctx, '\"');
-  for (size_t i = 0; i < length; ++i) {
-    uint8_t c = u8_data[i];
-    if (s_is_char_escaped[c]) {
-      write_putc(ctx, '\\');
-      write_putc(ctx, s_hexdigits[c >> 4]);
-      write_putc(ctx, s_hexdigits[c & 0xf]);
-    } else {
-      write_putc(ctx, c);
-    }
-  }
-  write_putc(ctx, '\"');
-  ctx->next_char = NextChar::Space;
-}
-
-static void write_quoted_string_slice(Context* ctx,
-                                      const StringSlice* str,
-                                      NextChar next_char) {
-  write_quoted_data(ctx, str->start, str->length);
-  ctx->next_char = next_char;
-}
-
-static void write_var(Context* ctx, const Var* var, NextChar next_char) {
-  if (var->type == VarType::Index) {
-    writef(ctx, "%" PRId64, var->index);
-    ctx->next_char = next_char;
-  } else {
-    write_string_slice(ctx, &var->name, next_char);
-  }
-}
-
-static void write_br_var(Context* ctx, const Var* var, NextChar next_char) {
-  if (var->type == VarType::Index) {
-    writef(ctx, "%" PRId64 " (;@%" PRId64 ";)", var->index,
-           ctx->depth - var->index - 1);
-    ctx->next_char = next_char;
-  } else {
-    write_string_slice(ctx, &var->name, next_char);
-  }
-}
-
-static void write_type(Context* ctx, Type type, NextChar next_char) {
-  const char* type_name = get_type_name(type);
-  assert(type_name);
-  write_puts(ctx, type_name, next_char);
-}
-
-static void write_types(Context* ctx,
-                        const TypeVector& types,
-                        const char* name) {
-  if (types.size()) {
-    if (name)
-      write_open_space(ctx, name);
-    for (Type type: types)
-      write_type(ctx, type, NextChar::Space);
-    if (name)
-      write_close_space(ctx);
-  }
-}
-
-static void write_func_sig_space(Context* ctx, const FuncSignature* func_sig) {
-  write_types(ctx, func_sig->param_types, "param");
-  write_types(ctx, func_sig->result_types, "result");
-}
-
-static void write_expr_list(Context* ctx, const Expr* first);
-
-static void write_expr(Context* ctx, const Expr* expr);
-
-static void write_begin_block(Context* ctx,
-                              const Block* block,
-                              const char* text) {
-  write_puts_space(ctx, text);
-  bool has_label = write_string_slice_opt(ctx, &block->label, NextChar::Space);
-  write_types(ctx, block->sig, nullptr);
-  if (!has_label)
-    writef(ctx, " ;; label = @%d", ctx->depth);
-  write_newline(ctx, FORCE_NEWLINE);
-  ctx->depth++;
-  indent(ctx);
-}
-
-static void write_end_block(Context* ctx) {
-  dedent(ctx);
-  ctx->depth--;
-  write_puts_newline(ctx, get_opcode_name(Opcode::End));
-}
-
-static void write_block(Context* ctx,
-                        const Block* block,
-                        const char* start_text) {
-  write_begin_block(ctx, block, start_text);
-  write_expr_list(ctx, block->first);
-  write_end_block(ctx);
-}
-
-static void write_const(Context* ctx, const Const* const_) {
-  switch (const_->type) {
-    case Type::I32:
-      write_puts_space(ctx, get_opcode_name(Opcode::I32Const));
-      writef(ctx, "%d", static_cast<int32_t>(const_->u32));
-      write_newline(ctx, NO_FORCE_NEWLINE);
-      break;
-
-    case Type::I64:
-      write_puts_space(ctx, get_opcode_name(Opcode::I64Const));
-      writef(ctx, "%" PRId64, static_cast<int64_t>(const_->u64));
-      write_newline(ctx, NO_FORCE_NEWLINE);
-      break;
-
-    case Type::F32: {
-      write_puts_space(ctx, get_opcode_name(Opcode::F32Const));
-      char buffer[128];
-      write_float_hex(buffer, 128, const_->f32_bits);
-      write_puts_space(ctx, buffer);
-      float f32;
-      memcpy(&f32, &const_->f32_bits, sizeof(f32));
-      writef(ctx, "(;=%g;)", f32);
-      write_newline(ctx, NO_FORCE_NEWLINE);
-      break;
-    }
-
-    case Type::F64: {
-      write_puts_space(ctx, get_opcode_name(Opcode::F64Const));
-      char buffer[128];
-      write_double_hex(buffer, 128, const_->f64_bits);
-      write_puts_space(ctx, buffer);
-      double f64;
-      memcpy(&f64, &const_->f64_bits, sizeof(f64));
-      writef(ctx, "(;=%g;)", f64);
-      write_newline(ctx, NO_FORCE_NEWLINE);
-      break;
-    }
-
-    default:
-      assert(0);
-      break;
-  }
-}
-
-static void write_expr(Context* ctx, const Expr* expr) {
-  switch (expr->type) {
-    case ExprType::Binary:
-      write_puts_newline(ctx, get_opcode_name(expr->binary.opcode));
-      break;
-
-    case ExprType::Block:
-      write_block(ctx, expr->block, get_opcode_name(Opcode::Block));
-      break;
-
-    case ExprType::Br:
-      write_puts_space(ctx, get_opcode_name(Opcode::Br));
-      write_br_var(ctx, &expr->br.var, NextChar::Newline);
-      break;
-
-    case ExprType::BrIf:
-      write_puts_space(ctx, get_opcode_name(Opcode::BrIf));
-      write_br_var(ctx, &expr->br_if.var, NextChar::Newline);
-      break;
-
-    case ExprType::BrTable: {
-      write_puts_space(ctx, get_opcode_name(Opcode::BrTable));
-      for (const Var& var : *expr->br_table.targets)
-        write_br_var(ctx, &var, NextChar::Space);
-      write_br_var(ctx, &expr->br_table.default_target, NextChar::Newline);
-      break;
-    }
-
-    case ExprType::Call:
-      write_puts_space(ctx, get_opcode_name(Opcode::Call));
-      write_var(ctx, &expr->call.var, NextChar::Newline);
-      break;
-
-    case ExprType::CallIndirect:
-      write_puts_space(ctx, get_opcode_name(Opcode::CallIndirect));
-      write_var(ctx, &expr->call_indirect.var, NextChar::Newline);
-      break;
-
-    case ExprType::Compare:
-      write_puts_newline(ctx, get_opcode_name(expr->compare.opcode));
-      break;
-
-    case ExprType::Const:
-      write_const(ctx, &expr->const_);
-      break;
-
-    case ExprType::Convert:
-      write_puts_newline(ctx, get_opcode_name(expr->convert.opcode));
-      break;
-
-    case ExprType::Drop:
-      write_puts_newline(ctx, get_opcode_name(Opcode::Drop));
-      break;
-
-    case ExprType::GetGlobal:
-      write_puts_space(ctx, get_opcode_name(Opcode::GetGlobal));
-      write_var(ctx, &expr->get_global.var, NextChar::Newline);
-      break;
-
-    case ExprType::GetLocal:
-      write_puts_space(ctx, get_opcode_name(Opcode::GetLocal));
-      write_var(ctx, &expr->get_local.var, NextChar::Newline);
-      break;
-
-    case ExprType::GrowMemory:
-      write_puts_newline(ctx, get_opcode_name(Opcode::GrowMemory));
-      break;
-
-    case ExprType::If:
-      write_begin_block(ctx, expr->if_.true_, get_opcode_name(Opcode::If));
-      write_expr_list(ctx, expr->if_.true_->first);
-      if (expr->if_.false_) {
-        dedent(ctx);
-        write_puts_space(ctx, get_opcode_name(Opcode::Else));
-        indent(ctx);
-        write_newline(ctx, FORCE_NEWLINE);
-        write_expr_list(ctx, expr->if_.false_);
-      }
-      write_end_block(ctx);
-      break;
-
-    case ExprType::Load:
-      write_puts_space(ctx, get_opcode_name(expr->load.opcode));
-      if (expr->load.offset)
-        writef(ctx, "offset=%" PRIu64, expr->load.offset);
-      if (!is_naturally_aligned(expr->load.opcode, expr->load.align))
-        writef(ctx, "align=%u", expr->load.align);
-      write_newline(ctx, NO_FORCE_NEWLINE);
-      break;
-
-    case ExprType::Loop:
-      write_block(ctx, expr->loop, get_opcode_name(Opcode::Loop));
-      break;
-
-    case ExprType::CurrentMemory:
-      write_puts_newline(ctx, get_opcode_name(Opcode::CurrentMemory));
-      break;
-
-    case ExprType::Nop:
-      write_puts_newline(ctx, get_opcode_name(Opcode::Nop));
-      break;
-
-    case ExprType::Return:
-      write_puts_newline(ctx, get_opcode_name(Opcode::Return));
-      break;
-
-    case ExprType::Select:
-      write_puts_newline(ctx, get_opcode_name(Opcode::Select));
-      break;
-
-    case ExprType::SetGlobal:
-      write_puts_space(ctx, get_opcode_name(Opcode::SetGlobal));
-      write_var(ctx, &expr->set_global.var, NextChar::Newline);
-      break;
-
-    case ExprType::SetLocal:
-      write_puts_space(ctx, get_opcode_name(Opcode::SetLocal));
-      write_var(ctx, &expr->set_local.var, NextChar::Newline);
-      break;
-
-    case ExprType::Store:
-      write_puts_space(ctx, get_opcode_name(expr->store.opcode));
-      if (expr->store.offset)
-        writef(ctx, "offset=%" PRIu64, expr->store.offset);
-      if (!is_naturally_aligned(expr->store.opcode, expr->store.align))
-        writef(ctx, "align=%u", expr->store.align);
-      write_newline(ctx, NO_FORCE_NEWLINE);
-      break;
-
-    case ExprType::TeeLocal:
-      write_puts_space(ctx, get_opcode_name(Opcode::TeeLocal));
-      write_var(ctx, &expr->tee_local.var, NextChar::Newline);
-      break;
-
-    case ExprType::Unary:
-      write_puts_newline(ctx, get_opcode_name(expr->unary.opcode));
-      break;
-
-    case ExprType::Unreachable:
-      write_puts_newline(ctx, get_opcode_name(Opcode::Unreachable));
-      break;
-
-    default:
-      fprintf(stderr, "bad expr type: %d\n", static_cast<int>(expr->type));
-      assert(0);
-      break;
-  }
-}
-
-static void write_expr_list(Context* ctx, const Expr* first) {
-  for (const Expr* expr = first; expr; expr = expr->next)
-    write_expr(ctx, expr);
-}
-
-static void write_init_expr(Context* ctx, const Expr* expr) {
-  if (expr) {
-    write_puts(ctx, "(", NextChar::None);
-    write_expr(ctx, expr);
-    /* clear the next char, so we don't write a newline after the expr */
-    ctx->next_char = NextChar::None;
-    write_puts(ctx, ")", NextChar::Space);
-  }
-}
-
-static void write_type_bindings(Context* ctx,
-                                const char* prefix,
-                                const Func* func,
-                                const TypeVector& types,
-                                const BindingHash& bindings) {
-  make_type_binding_reverse_mapping(types, bindings, &ctx->index_to_name);
-
-  /* named params/locals must be specified by themselves, but nameless
-   * params/locals can be compressed, e.g.:
-   *   (param $foo i32)
-   *   (param i32 i64 f32)
-   */
-  bool is_open = false;
-  for (size_t i = 0; i < types.size(); ++i) {
-    if (!is_open) {
-      write_open_space(ctx, prefix);
-      is_open = true;
-    }
-
-    const std::string& name = ctx->index_to_name[i];
-    if (!name.empty())
-      write_string(ctx, name, NextChar::Space);
-    write_type(ctx, types[i], NextChar::Space);
-    if (!name.empty()) {
-      write_close_space(ctx);
-      is_open = false;
-    }
-  }
-  if (is_open)
-    write_close_space(ctx);
-}
-
-static void write_func(Context* ctx, const Module* module, const Func* func) {
-  write_open_space(ctx, "func");
-  write_string_slice_or_index(ctx, &func->name, ctx->func_index++,
-                              NextChar::Space);
-  if (decl_has_func_type(&func->decl)) {
-    write_open_space(ctx, "type");
-    write_var(ctx, &func->decl.type_var, NextChar::None);
-    write_close_space(ctx);
-  }
-  write_type_bindings(ctx, "param", func, func->decl.sig.param_types,
-                      func->param_bindings);
-  write_types(ctx, func->decl.sig.result_types, "result");
-  write_newline(ctx, NO_FORCE_NEWLINE);
-  if (func->local_types.size()) {
-    write_type_bindings(ctx, "local", func, func->local_types,
-                        func->local_bindings);
-  }
-  write_newline(ctx, NO_FORCE_NEWLINE);
-  ctx->depth = 1; /* for the implicit "return" label */
-  write_expr_list(ctx, func->first_expr);
-  write_close_newline(ctx);
-}
-
-static void write_begin_global(Context* ctx, const Global* global) {
-  write_open_space(ctx, "global");
-  write_string_slice_or_index(ctx, &global->name, ctx->global_index++,
-                              NextChar::Space);
-  if (global->mutable_) {
-    write_open_space(ctx, "mut");
-    write_type(ctx, global->type, NextChar::Space);
-    write_close_space(ctx);
-  } else {
-    write_type(ctx, global->type, NextChar::Space);
-  }
-}
-
-static void write_global(Context* ctx, const Global* global) {
-  write_begin_global(ctx, global);
-  write_init_expr(ctx, global->init_expr);
-  write_close_newline(ctx);
-}
-
-static void write_limits(Context* ctx, const Limits* limits) {
-  writef(ctx, "%" PRIu64, limits->initial);
-  if (limits->has_max)
-    writef(ctx, "%" PRIu64, limits->max);
-}
-
-static void write_table(Context* ctx, const Table* table) {
-  write_open_space(ctx, "table");
-  write_string_slice_or_index(ctx, &table->name, ctx->table_index++,
-                              NextChar::Space);
-  write_limits(ctx, &table->elem_limits);
-  write_puts_space(ctx, "anyfunc");
-  write_close_newline(ctx);
-}
-
-static void write_elem_segment(Context* ctx, const ElemSegment* segment) {
-  write_open_space(ctx, "elem");
-  write_init_expr(ctx, segment->offset);
-  for (const Var& var : segment->vars)
-    write_var(ctx, &var, NextChar::Space);
-  write_close_newline(ctx);
-}
-
-static void write_memory(Context* ctx, const Memory* memory) {
-  write_open_space(ctx, "memory");
-  write_string_slice_or_index(ctx, &memory->name, ctx->memory_index++,
-                              NextChar::Space);
-  write_limits(ctx, &memory->page_limits);
-  write_close_newline(ctx);
-}
-
-static void write_data_segment(Context* ctx, const DataSegment* segment) {
-  write_open_space(ctx, "data");
-  write_init_expr(ctx, segment->offset);
-  write_quoted_data(ctx, segment->data, segment->size);
-  write_close_newline(ctx);
-}
-
-static void write_import(Context* ctx, const Import* import) {
-  write_open_space(ctx, "import");
-  write_quoted_string_slice(ctx, &import->module_name, NextChar::Space);
-  write_quoted_string_slice(ctx, &import->field_name, NextChar::Space);
-  switch (import->kind) {
-    case ExternalKind::Func:
-      write_open_space(ctx, "func");
-      write_string_slice_or_index(ctx, &import->func->name, ctx->func_index++,
-                                  NextChar::Space);
-      if (decl_has_func_type(&import->func->decl)) {
-        write_open_space(ctx, "type");
-        write_var(ctx, &import->func->decl.type_var, NextChar::None);
-        write_close_space(ctx);
-      } else {
-        write_func_sig_space(ctx, &import->func->decl.sig);
-      }
-      write_close_space(ctx);
-      break;
-
-    case ExternalKind::Table:
-      write_table(ctx, import->table);
-      break;
-
-    case ExternalKind::Memory:
-      write_memory(ctx, import->memory);
-      break;
-
-    case ExternalKind::Global:
-      write_begin_global(ctx, import->global);
-      write_close_space(ctx);
-      break;
-  }
-  write_close_newline(ctx);
-}
-
-static void write_export(Context* ctx, const Export* export_) {
-  static const char* s_kind_names[] = {"func", "table", "memory", "global"};
-  WABT_STATIC_ASSERT(WABT_ARRAY_SIZE(s_kind_names) == kExternalKindCount);
-  write_open_space(ctx, "export");
-  write_quoted_string_slice(ctx, &export_->name, NextChar::Space);
-  assert(static_cast<size_t>(export_->kind) < WABT_ARRAY_SIZE(s_kind_names));
-  write_open_space(ctx, s_kind_names[static_cast<size_t>(export_->kind)]);
-  write_var(ctx, &export_->var, NextChar::Space);
-  write_close_space(ctx);
-  write_close_newline(ctx);
-}
-
-static void write_func_type(Context* ctx, const FuncType* func_type) {
-  write_open_space(ctx, "type");
-  write_string_slice_or_index(ctx, &func_type->name, ctx->func_type_index++,
-                              NextChar::Space);
-  write_open_space(ctx, "func");
-  write_func_sig_space(ctx, &func_type->sig);
-  write_close_space(ctx);
-  write_close_newline(ctx);
-}
-
-static void write_start_function(Context* ctx, const Var* start) {
-  write_open_space(ctx, "start");
-  write_var(ctx, start, NextChar::None);
-  write_close_newline(ctx);
-}
-
-static void write_module(Context* ctx, const Module* module) {
-  write_open_newline(ctx, "module");
-  for (const ModuleField* field = module->first_field; field;
-       field = field->next) {
-    switch (field->type) {
-      case ModuleFieldType::Func:
-        write_func(ctx, module, field->func);
-        break;
-      case ModuleFieldType::Global:
-        write_global(ctx, field->global);
-        break;
-      case ModuleFieldType::Import:
-        write_import(ctx, field->import);
-        break;
-      case ModuleFieldType::Export:
-        write_export(ctx, field->export_);
-        break;
-      case ModuleFieldType::Table:
-        write_table(ctx, field->table);
-        break;
-      case ModuleFieldType::ElemSegment:
-        write_elem_segment(ctx, field->elem_segment);
-        break;
-      case ModuleFieldType::Memory:
-        write_memory(ctx, field->memory);
-        break;
-      case ModuleFieldType::DataSegment:
-        write_data_segment(ctx, field->data_segment);
-        break;
-      case ModuleFieldType::FuncType:
-        write_func_type(ctx, field->func_type);
-        break;
-      case ModuleFieldType::Start:
-        write_start_function(ctx, &field->start);
-        break;
-    }
-  }
-  write_close_newline(ctx);
-  /* force the newline to be written */
-  write_next_char(ctx);
-}
-
-Result write_ast(Writer* writer, const Module* module) {
-  Context ctx;
-  init_stream(&ctx.stream, writer, nullptr);
-  write_module(&ctx, module);
-  return ctx.result;
-}
-
-}  // namespace wabt
diff --git a/lib/wabt/src/ast.cc b/lib/wabt/src/ast.cc
deleted file mode 100644
index d133399..0000000
--- a/lib/wabt/src/ast.cc
+++ /dev/null
@@ -1,892 +0,0 @@
-/*
- * Copyright 2016 WebAssembly Community Group participants
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "ast.h"
-
-#include <assert.h>
-#include <stddef.h>
-
-namespace wabt {
-
-int get_index_from_var(const BindingHash* hash, const Var* var) {
-  if (var->type == VarType::Name)
-    return hash->find_index(var->name);
-  return static_cast<int>(var->index);
-}
-
-Export* get_export_by_name(const Module* module, const StringSlice* name) {
-  int index = module->export_bindings.find_index(*name);
-  if (index == -1)
-    return nullptr;
-  return module->exports[index];
-}
-
-int get_func_index_by_var(const Module* module, const Var* var) {
-  return get_index_from_var(&module->func_bindings, var);
-}
-
-int get_global_index_by_var(const Module* module, const Var* var) {
-  return get_index_from_var(&module->global_bindings, var);
-}
-
-int get_table_index_by_var(const Module* module, const Var* var) {
-  return get_index_from_var(&module->table_bindings, var);
-}
-
-int get_memory_index_by_var(const Module* module, const Var* var) {
-  return get_index_from_var(&module->memory_bindings, var);
-}
-
-int get_func_type_index_by_var(const Module* module, const Var* var) {
-  return get_index_from_var(&module->func_type_bindings, var);
-}
-
-int get_local_index_by_var(const Func* func, const Var* var) {
-  if (var->type == VarType::Index)
-    return static_cast<int>(var->index);
-
-  int result = func->param_bindings.find_index(var->name);
-  if (result != -1)
-    return result;
-
-  result = func->local_bindings.find_index(var->name);
-  if (result == -1)
-    return result;
-
-  /* the locals start after all the params */
-  return func->decl.sig.param_types.size() + result;
-}
-
-int get_module_index_by_var(const Script* script, const Var* var) {
-  return get_index_from_var(&script->module_bindings, var);
-}
-
-Func* get_func_by_var(const Module* module, const Var* var) {
-  int index = get_index_from_var(&module->func_bindings, var);
-  if (index < 0 || static_cast<size_t>(index) >= module->funcs.size())
-    return nullptr;
-  return module->funcs[index];
-}
-
-Global* get_global_by_var(const Module* module, const Var* var) {
-  int index = get_index_from_var(&module->global_bindings, var);
-  if (index < 0 || static_cast<size_t>(index) >= module->globals.size())
-    return nullptr;
-  return module->globals[index];
-}
-
-Table* get_table_by_var(const Module* module, const Var* var) {
-  int index = get_index_from_var(&module->table_bindings, var);
-  if (index < 0 || static_cast<size_t>(index) >= module->tables.size())
-    return nullptr;
-  return module->tables[index];
-}
-
-Memory* get_memory_by_var(const Module* module, const Var* var) {
-  int index = get_index_from_var(&module->memory_bindings, var);
-  if (index < 0 || static_cast<size_t>(index) >= module->memories.size())
-    return nullptr;
-  return module->memories[index];
-}
-
-FuncType* get_func_type_by_var(const Module* module, const Var* var) {
-  int index = get_index_from_var(&module->func_type_bindings, var);
-  if (index < 0 || static_cast<size_t>(index) >= module->func_types.size())
-    return nullptr;
-  return module->func_types[index];
-}
-
-int get_func_type_index_by_sig(const Module* module, const FuncSignature* sig) {
-  for (size_t i = 0; i < module->func_types.size(); ++i)
-    if (signatures_are_equal(&module->func_types[i]->sig, sig))
-      return i;
-  return -1;
-}
-
-int get_func_type_index_by_decl(const Module* module,
-                                const FuncDeclaration* decl) {
-  if (decl_has_func_type(decl)) {
-    return get_func_type_index_by_var(module, &decl->type_var);
-  } else {
-    return get_func_type_index_by_sig(module, &decl->sig);
-  }
-}
-
-Module* get_first_module(const Script* script) {
-  for (const std::unique_ptr<Command>& command : script->commands) {
-    if (command->type == CommandType::Module)
-      return command->module;
-  }
-  return nullptr;
-}
-
-Module* get_module_by_var(const Script* script, const Var* var) {
-  int index = get_index_from_var(&script->module_bindings, var);
-  if (index < 0 || static_cast<size_t>(index) >= script->commands.size())
-    return nullptr;
-  const Command& command = *script->commands[index].get();
-  assert(command.type == CommandType::Module);
-  return command.module;
-}
-
-void make_type_binding_reverse_mapping(
-    const TypeVector& types,
-    const BindingHash& bindings,
-    std::vector<std::string>* out_reverse_mapping) {
-  out_reverse_mapping->clear();
-  out_reverse_mapping->resize(types.size());
-  for (const auto& pair : bindings) {
-    assert(static_cast<size_t>(pair.second.index) <
-           out_reverse_mapping->size());
-    (*out_reverse_mapping)[pair.second.index] = pair.first;
-  }
-}
-
-ModuleField* append_module_field(Module* module) {
-  ModuleField* result = new ModuleField();
-  if (!module->first_field)
-    module->first_field = result;
-  else if (module->last_field)
-    module->last_field->next = result;
-  module->last_field = result;
-  return result;
-}
-
-FuncType* append_implicit_func_type(Location* loc,
-                                    Module* module,
-                                    FuncSignature* sig) {
-  ModuleField* field = append_module_field(module);
-  field->loc = *loc;
-  field->type = ModuleFieldType::FuncType;
-  field->func_type = new FuncType();
-  field->func_type->sig = *sig;
-
-  module->func_types.push_back(field->func_type);
-  return field->func_type;
-}
-
-void destroy_var(Var* var) {
-  if (var->type == VarType::Name)
-    destroy_string_slice(&var->name);
-}
-
-void destroy_expr_list(Expr* first) {
-  Expr* expr = first;
-  while (expr) {
-    Expr* next = expr->next;
-    delete expr;
-    expr = next;
-  }
-}
-
-Var::Var(int64_t index) : type(VarType::Index), index(index) {
-  WABT_ZERO_MEMORY(loc);
-}
-
-Var::Var(const StringSlice& name) : type(VarType::Name), name(name) {
-  WABT_ZERO_MEMORY(loc);
-}
-
-Const::Const(I32, uint32_t value) : type(Type::I32), u32(value) {
-  WABT_ZERO_MEMORY(loc);
-}
-
-Const::Const(I64, uint64_t value) : type(Type::I64), u64(value) {
-  WABT_ZERO_MEMORY(loc);
-}
-
-Const::Const(F32, uint32_t value) : type(Type::F32), f32_bits(value) {
-  WABT_ZERO_MEMORY(loc);
-}
-
-Const::Const(F64, uint64_t value) : type(Type::F64), f64_bits(value) {
-  WABT_ZERO_MEMORY(loc);
-}
-
-Block::Block(): first(nullptr) {
-  WABT_ZERO_MEMORY(label);
-}
-
-Block::Block(Expr* first) : first(first) {
-  WABT_ZERO_MEMORY(label);
-}
-
-Block::~Block() {
-  destroy_string_slice(&label);
-  destroy_expr_list(first);
-}
-
-Expr::Expr() : type(ExprType::Binary), next(nullptr) {
-  WABT_ZERO_MEMORY(loc);
-  binary.opcode = Opcode::Nop;
-}
-
-Expr::Expr(ExprType type) : type(type), next(nullptr) {
-  WABT_ZERO_MEMORY(loc);
-}
-
-Expr::~Expr() {
-  switch (type) {
-    case ExprType::Block:
-      delete block;
-      break;
-    case ExprType::Br:
-      destroy_var(&br.var);
-      break;
-    case ExprType::BrIf:
-      destroy_var(&br_if.var);
-      break;
-    case ExprType::BrTable:
-      for (Var& var : *br_table.targets)
-        destroy_var(&var);
-      delete br_table.targets;
-      destroy_var(&br_table.default_target);
-      break;
-    case ExprType::Call:
-      destroy_var(&call.var);
-      break;
-    case ExprType::CallIndirect:
-      destroy_var(&call_indirect.var);
-      break;
-    case ExprType::GetGlobal:
-      destroy_var(&get_global.var);
-      break;
-    case ExprType::GetLocal:
-      destroy_var(&get_local.var);
-      break;
-    case ExprType::If:
-      delete if_.true_;
-      destroy_expr_list(if_.false_);
-      break;
-    case ExprType::Loop:
-      delete loop;
-      break;
-    case ExprType::SetGlobal:
-      destroy_var(&set_global.var);
-      break;
-    case ExprType::SetLocal:
-      destroy_var(&set_local.var);
-      break;
-    case ExprType::TeeLocal:
-      destroy_var(&tee_local.var);
-      break;
-
-    case ExprType::Binary:
-    case ExprType::Compare:
-    case ExprType::Const:
-    case ExprType::Convert:
-    case ExprType::Drop:
-    case ExprType::CurrentMemory:
-    case ExprType::GrowMemory:
-    case ExprType::Load:
-    case ExprType::Nop:
-    case ExprType::Return:
-    case ExprType::Select:
-    case ExprType::Store:
-    case ExprType::Unary:
-    case ExprType::Unreachable:
-      break;
-  }
-}
-
-// static
-Expr* Expr::CreateBinary(Opcode opcode) {
-  Expr* expr = new Expr(ExprType::Binary);
-  expr->binary.opcode = opcode;
-  return expr;
-}
-
-// static
-Expr* Expr::CreateBlock(Block* block) {
-  Expr* expr = new Expr(ExprType::Block);
-  expr->block = block;
-  return expr;
-}
-
-// static
-Expr* Expr::CreateBr(Var var) {
-  Expr* expr = new Expr(ExprType::Br);
-  expr->br.var = var;
-  return expr;
-}
-
-// static
-Expr* Expr::CreateBrIf(Var var) {
-  Expr* expr = new Expr(ExprType::BrIf);
-  expr->br_if.var = var;
-  return expr;
-}
-
-// static
-Expr* Expr::CreateBrTable(VarVector* targets, Var default_target) {
-  Expr* expr = new Expr(ExprType::BrTable);
-  expr->br_table.targets = targets;
-  expr->br_table.default_target = default_target;
-  return expr;
-}
-
-// static
-Expr* Expr::CreateCall(Var var) {
-  Expr* expr = new Expr(ExprType::Call);
-  expr->call.var = var;
-  return expr;
-}
-
-// static
-Expr* Expr::CreateCallIndirect(Var var) {
-  Expr* expr = new Expr(ExprType::CallIndirect);
-  expr->call_indirect.var = var;
-  return expr;
-}
-
-// static
-Expr* Expr::CreateCompare(Opcode opcode) {
-  Expr* expr = new Expr(ExprType::Compare);
-  expr->compare.opcode = opcode;
-  return expr;
-}
-
-// static
-Expr* Expr::CreateConst(const Const& const_) {
-  Expr* expr = new Expr(ExprType::Const);
-  expr->const_ = const_;
-  return expr;
-}
-
-// static
-Expr* Expr::CreateConvert(Opcode opcode) {
-  Expr* expr = new Expr(ExprType::Convert);
-  expr->convert.opcode = opcode;
-  return expr;
-}
-
-// static
-Expr* Expr::CreateCurrentMemory() {
-  return new Expr(ExprType::CurrentMemory);
-}
-
-// static
-Expr* Expr::CreateDrop() {
-  return new Expr(ExprType::Drop);
-}
-
-// static
-Expr* Expr::CreateGetGlobal(Var var) {
-  Expr* expr = new Expr(ExprType::GetGlobal);
-  expr->get_global.var = var;
-  return expr;
-}
-
-// static
-Expr* Expr::CreateGetLocal(Var var) {
-  Expr* expr = new Expr(ExprType::GetLocal);
-  expr->get_local.var = var;
-  return expr;
-}
-
-// static
-Expr* Expr::CreateGrowMemory() {
-  return new Expr(ExprType::GrowMemory);
-}
-
-// static
-Expr* Expr::CreateIf(Block* true_, Expr* false_) {
-  Expr* expr = new Expr(ExprType::If);
-  expr->if_.true_ = true_;
-  expr->if_.false_ = false_;
-  return expr;
-}
-
-// static
-Expr* Expr::CreateLoad(Opcode opcode, uint32_t align, uint64_t offset) {
-  Expr* expr = new Expr(ExprType::Load);
-  expr->load.opcode = opcode;
-  expr->load.align = align;
-  expr->load.offset = offset;
-  return expr;
-}
-
-// static
-Expr* Expr::CreateLoop(Block* block) {
-  Expr* expr = new Expr(ExprType::Loop);
-  expr->loop = block;
-  return expr;
-}
-
-// static
-Expr* Expr::CreateNop() {
-  return new Expr(ExprType::Nop);
-}
-
-// static
-Expr* Expr::CreateReturn() {
-  return new Expr(ExprType::Return);
-}
-
-// static
-Expr* Expr::CreateSelect() {
-  return new Expr(ExprType::Select);
-}
-
-// static
-Expr* Expr::CreateSetGlobal(Var var) {
-  Expr* expr = new Expr(ExprType::SetGlobal);
-  expr->set_global.var = var;
-  return expr;
-}
-
-// static
-Expr* Expr::CreateSetLocal(Var var) {
-  Expr* expr = new Expr(ExprType::SetLocal);
-  expr->set_local.var = var;
-  return expr;
-}
-
-// static
-Expr* Expr::CreateStore(Opcode opcode, uint32_t align, uint64_t offset) {
-  Expr* expr = new Expr(ExprType::Store);
-  expr->store.opcode = opcode;
-  expr->store.align = align;
-  expr->store.offset = offset;
-  return expr;
-}
-
-// static
-Expr* Expr::CreateTeeLocal(Var var) {
-  Expr* expr = new Expr(ExprType::TeeLocal);
-  expr->tee_local.var = var;
-  return expr;
-}
-
-// static
-Expr* Expr::CreateUnary(Opcode opcode) {
-  Expr* expr = new Expr(ExprType::Unary);
-  expr->unary.opcode = opcode;
-  return expr;
-}
-
-// static
-Expr* Expr::CreateUnreachable() {
-  return new Expr(ExprType::Unreachable);
-}
-
-FuncType::FuncType() {
-  WABT_ZERO_MEMORY(name);
-}
-
-FuncType::~FuncType() {
-  destroy_string_slice(&name);
-}
-
-FuncDeclaration::FuncDeclaration() : has_func_type(false) {
-  WABT_ZERO_MEMORY(type_var);
-}
-
-FuncDeclaration::~FuncDeclaration() {
-  destroy_var(&type_var);
-}
-
-Func::Func() : first_expr(nullptr) {
-  WABT_ZERO_MEMORY(name);
-}
-
-Func::~Func() {
-  destroy_string_slice(&name);
-  destroy_expr_list(first_expr);
-}
-
-Global::Global() : type(Type::Void), mutable_(false), init_expr(nullptr) {
-  WABT_ZERO_MEMORY(name);
-}
-
-Global::~Global() {
-  destroy_string_slice(&name);
-  destroy_expr_list(init_expr);
-}
-
-Table::Table() {
-  WABT_ZERO_MEMORY(name);
-  WABT_ZERO_MEMORY(elem_limits);
-}
-
-Table::~Table() {
-  destroy_string_slice(&name);
-}
-
-ElemSegment::ElemSegment() : offset(nullptr) {
-  WABT_ZERO_MEMORY(table_var);
-}
-
-ElemSegment::~ElemSegment() {
-  destroy_var(&table_var);
-  destroy_expr_list(offset);
-  for (Var& var : vars)
-    destroy_var(&var);
-}
-
-DataSegment::DataSegment() : offset(nullptr), data(nullptr), size(0) {
-  WABT_ZERO_MEMORY(memory_var);
-}
-
-DataSegment::~DataSegment() {
-  destroy_var(&memory_var);
-  destroy_expr_list(offset);
-  delete [] data;
-}
-
-Memory::Memory() {
-  WABT_ZERO_MEMORY(name);
-  WABT_ZERO_MEMORY(page_limits);
-}
-
-Memory::~Memory() {
-  destroy_string_slice(&name);
-}
-
-Import::Import() : kind(ExternalKind::Func), func(nullptr) {
-  WABT_ZERO_MEMORY(module_name);
-  WABT_ZERO_MEMORY(field_name);
-}
-
-Import::~Import() {
-  destroy_string_slice(&module_name);
-  destroy_string_slice(&field_name);
-  switch (kind) {
-    case ExternalKind::Func:
-      delete func;
-      break;
-    case ExternalKind::Table:
-      delete table;
-      break;
-    case ExternalKind::Memory:
-      delete memory;
-      break;
-    case ExternalKind::Global:
-      delete global;
-      break;
-  }
-}
-
-Export::Export() {
-  WABT_ZERO_MEMORY(name);
-  WABT_ZERO_MEMORY(var);
-}
-
-Export::~Export() {
-  destroy_string_slice(&name);
-  destroy_var(&var);
-}
-
-void destroy_memory(Memory* memory) {
-  destroy_string_slice(&memory->name);
-}
-
-void destroy_table(Table* table) {
-  destroy_string_slice(&table->name);
-}
-
-ModuleField::ModuleField() : type(ModuleFieldType::Start), next(nullptr) {
-  WABT_ZERO_MEMORY(loc);
-  WABT_ZERO_MEMORY(start);
-}
-
-ModuleField::~ModuleField() {
-  switch (type) {
-    case ModuleFieldType::Func:
-      delete func;
-      break;
-    case ModuleFieldType::Global:
-      delete global;
-      break;
-    case ModuleFieldType::Import:
-      delete import;
-      break;
-    case ModuleFieldType::Export:
-      delete export_;
-      break;
-    case ModuleFieldType::FuncType:
-      delete func_type;
-      break;
-    case ModuleFieldType::Table:
-      delete table;
-      break;
-    case ModuleFieldType::ElemSegment:
-      delete elem_segment;
-      break;
-    case ModuleFieldType::Memory:
-      delete memory;
-      break;
-    case ModuleFieldType::DataSegment:
-      delete data_segment;
-      break;
-    case ModuleFieldType::Start:
-      destroy_var(&start);
-      break;
-  }
-}
-
-Module::Module()
-    : first_field(nullptr),
-      last_field(nullptr),
-      num_func_imports(0),
-      num_table_imports(0),
-      num_memory_imports(0),
-      num_global_imports(0),
-      start(0) {
-  WABT_ZERO_MEMORY(loc);
-  WABT_ZERO_MEMORY(name);
-}
-
-Module::~Module() {
-  destroy_string_slice(&name);
-
-  ModuleField* field = first_field;
-  while (field) {
-    ModuleField* next_field = field->next;
-    delete field;
-    field = next_field;
-  }
-}
-
-RawModule::RawModule() : type(RawModuleType::Text), text(nullptr) {}
-
-RawModule::~RawModule() {
-  if (type == RawModuleType::Text) {
-    delete text;
-  } else {
-    destroy_string_slice(&binary.name);
-    delete [] binary.data;
-  }
-}
-
-ActionInvoke::ActionInvoke() {}
-
-Action::Action() : type(ActionType::Get) {
-  WABT_ZERO_MEMORY(loc);
-  WABT_ZERO_MEMORY(module_var);
-  WABT_ZERO_MEMORY(name);
-}
-
-Action::~Action() {
-  destroy_var(&module_var);
-  destroy_string_slice(&name);
-  switch (type) {
-    case ActionType::Invoke:
-      delete invoke;
-      break;
-    case ActionType::Get:
-      break;
-  }
-}
-
-Command::Command() : type(CommandType::Module), module(nullptr) {}
-
-Command::~Command() {
-  switch (type) {
-    case CommandType::Module:
-      delete module;
-      break;
-    case CommandType::Action:
-      delete action;
-      break;
-    case CommandType::Register:
-      destroy_string_slice(&register_.module_name);
-      destroy_var(&register_.var);
-      break;
-    case CommandType::AssertMalformed:
-      delete assert_malformed.module;
-      destroy_string_slice(&assert_malformed.text);
-      break;
-    case CommandType::AssertInvalid:
-    case CommandType::AssertInvalidNonBinary:
-      delete assert_invalid.module;
-      destroy_string_slice(&assert_invalid.text);
-      break;
-    case CommandType::AssertUnlinkable:
-      delete assert_unlinkable.module;
-      destroy_string_slice(&assert_unlinkable.text);
-      break;
-    case CommandType::AssertUninstantiable:
-      delete assert_uninstantiable.module;
-      destroy_string_slice(&assert_uninstantiable.text);
-      break;
-    case CommandType::AssertReturn:
-      delete assert_return.action;
-      delete assert_return.expected;
-      break;
-    case CommandType::AssertReturnCanonicalNan:
-      delete assert_return_arithmetic_nan.action;
-      break;
-    case CommandType::AssertReturnArithmeticNan:
-      delete assert_return_canonical_nan.action;
-      break;
-    case CommandType::AssertTrap:
-    case CommandType::AssertExhaustion:
-      delete assert_trap.action;
-      destroy_string_slice(&assert_trap.text);
-      break;
-  }
-}
-
-Script::Script() {}
-
-#define CHECK_RESULT(expr)   \
-  do {                       \
-    if (WABT_FAILED((expr))) \
-      return Result::Error;  \
-  } while (0)
-
-#define CALLBACK(member)                                           \
-  CHECK_RESULT((visitor)->member                                   \
-                   ? (visitor)->member(expr, (visitor)->user_data) \
-                   : Result::Ok)
-
-static Result visit_expr(Expr* expr, ExprVisitor* visitor);
-
-Result visit_expr_list(Expr* first, ExprVisitor* visitor) {
-  for (Expr* expr = first; expr; expr = expr->next)
-    CHECK_RESULT(visit_expr(expr, visitor));
-  return Result::Ok;
-}
-
-static Result visit_expr(Expr* expr, ExprVisitor* visitor) {
-  switch (expr->type) {
-    case ExprType::Binary:
-      CALLBACK(on_binary_expr);
-      break;
-
-    case ExprType::Block:
-      CALLBACK(begin_block_expr);
-      CHECK_RESULT(visit_expr_list(expr->block->first, visitor));
-      CALLBACK(end_block_expr);
-      break;
-
-    case ExprType::Br:
-      CALLBACK(on_br_expr);
-      break;
-
-    case ExprType::BrIf:
-      CALLBACK(on_br_if_expr);
-      break;
-
-    case ExprType::BrTable:
-      CALLBACK(on_br_table_expr);
-      break;
-
-    case ExprType::Call:
-      CALLBACK(on_call_expr);
-      break;
-
-    case ExprType::CallIndirect:
-      CALLBACK(on_call_indirect_expr);
-      break;
-
-    case ExprType::Compare:
-      CALLBACK(on_compare_expr);
-      break;
-
-    case ExprType::Const:
-      CALLBACK(on_const_expr);
-      break;
-
-    case ExprType::Convert:
-      CALLBACK(on_convert_expr);
-      break;
-
-    case ExprType::CurrentMemory:
-      CALLBACK(on_current_memory_expr);
-      break;
-
-    case ExprType::Drop:
-      CALLBACK(on_drop_expr);
-      break;
-
-    case ExprType::GetGlobal:
-      CALLBACK(on_get_global_expr);
-      break;
-
-    case ExprType::GetLocal:
-      CALLBACK(on_get_local_expr);
-      break;
-
-    case ExprType::GrowMemory:
-      CALLBACK(on_grow_memory_expr);
-      break;
-
-    case ExprType::If:
-      CALLBACK(begin_if_expr);
-      CHECK_RESULT(visit_expr_list(expr->if_.true_->first, visitor));
-      CALLBACK(after_if_true_expr);
-      CHECK_RESULT(visit_expr_list(expr->if_.false_, visitor));
-      CALLBACK(end_if_expr);
-      break;
-
-    case ExprType::Load:
-      CALLBACK(on_load_expr);
-      break;
-
-    case ExprType::Loop:
-      CALLBACK(begin_loop_expr);
-      CHECK_RESULT(visit_expr_list(expr->loop->first, visitor));
-      CALLBACK(end_loop_expr);
-      break;
-
-    case ExprType::Nop:
-      CALLBACK(on_nop_expr);
-      break;
-
-    case ExprType::Return:
-      CALLBACK(on_return_expr);
-      break;
-
-    case ExprType::Select:
-      CALLBACK(on_select_expr);
-      break;
-
-    case ExprType::SetGlobal:
-      CALLBACK(on_set_global_expr);
-      break;
-
-    case ExprType::SetLocal:
-      CALLBACK(on_set_local_expr);
-      break;
-
-    case ExprType::Store:
-      CALLBACK(on_store_expr);
-      break;
-
-    case ExprType::TeeLocal:
-      CALLBACK(on_tee_local_expr);
-      break;
-
-    case ExprType::Unary:
-      CALLBACK(on_unary_expr);
-      break;
-
-    case ExprType::Unreachable:
-      CALLBACK(on_unreachable_expr);
-      break;
-  }
-
-  return Result::Ok;
-}
-
-/* TODO(binji): make the visitor non-recursive */
-Result visit_func(Func* func, ExprVisitor* visitor) {
-  return visit_expr_list(func->first_expr, visitor);
-}
-
-}  // namespace wabt
diff --git a/lib/wabt/src/ast.h b/lib/wabt/src/ast.h
deleted file mode 100644
index 346f225..0000000
--- a/lib/wabt/src/ast.h
+++ /dev/null
@@ -1,620 +0,0 @@
-/*
- * Copyright 2016 WebAssembly Community Group participants
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef WABT_AST_H_
-#define WABT_AST_H_
-
-#include <assert.h>
-#include <stddef.h>
-#include <stdint.h>
-
-#include <memory>
-#include <string>
-#include <vector>
-
-#include "binding-hash.h"
-#include "common.h"
-
-namespace wabt {
-
-enum class VarType {
-  Index,
-  Name,
-};
-
-struct Var {
-  // Keep the default constructor trivial so it can be used as a union member.
-  Var() = default;
-  explicit Var(int64_t index);
-  explicit Var(const StringSlice& name);
-
-  Location loc;
-  VarType type;
-  union {
-    int64_t index;
-    StringSlice name;
-  };
-};
-typedef std::vector<Var> VarVector;
-
-typedef StringSlice Label;
-
-struct Const {
-  // Struct tags to differentiate constructors.
-  struct I32 {};
-  struct I64 {};
-  struct F32 {};
-  struct F64 {};
-
-  // Keep the default constructor trivial so it can be used as a union member.
-  Const() = default;
-  Const(I32, uint32_t);
-  Const(I64, uint64_t);
-  Const(F32, uint32_t);
-  Const(F64, uint64_t);
-
-  Location loc;
-  Type type;
-  union {
-    uint32_t u32;
-    uint64_t u64;
-    uint32_t f32_bits;
-    uint64_t f64_bits;
-  };
-};
-typedef std::vector<Const> ConstVector;
-
-enum class ExprType {
-  Binary,
-  Block,
-  Br,
-  BrIf,
-  BrTable,
-  Call,
-  CallIndirect,
-  Compare,
-  Const,
-  Convert,
-  CurrentMemory,
-  Drop,
-  GetGlobal,
-  GetLocal,
-  GrowMemory,
-  If,
-  Load,
-  Loop,
-  Nop,
-  Return,
-  Select,
-  SetGlobal,
-  SetLocal,
-  Store,
-  TeeLocal,
-  Unary,
-  Unreachable,
-};
-
-typedef TypeVector BlockSignature;
-
-struct Block {
-  WABT_DISALLOW_COPY_AND_ASSIGN(Block);
-  Block();
-  explicit Block(struct Expr* first);
-  ~Block();
-
-  Label label;
-  BlockSignature sig;
-  struct Expr* first;
-};
-
-struct Expr {
-  WABT_DISALLOW_COPY_AND_ASSIGN(Expr);
-  Expr();
-  explicit Expr(ExprType);
-  ~Expr();
-
-  static Expr* CreateBinary(Opcode);
-  static Expr* CreateBlock(Block*);
-  static Expr* CreateBr(Var);
-  static Expr* CreateBrIf(Var);
-  static Expr* CreateBrTable(VarVector* targets, Var default_target);
-  static Expr* CreateCall(Var);
-  static Expr* CreateCallIndirect(Var);
-  static Expr* CreateCompare(Opcode);
-  static Expr* CreateConst(const Const&);
-  static Expr* CreateConvert(Opcode);
-  static Expr* CreateCurrentMemory();
-  static Expr* CreateDrop();
-  static Expr* CreateGetGlobal(Var);
-  static Expr* CreateGetLocal(Var);
-  static Expr* CreateGrowMemory();
-  static Expr* CreateIf(struct Block* true_, struct Expr* false_ = nullptr);
-  static Expr* CreateLoad(Opcode, uint32_t align, uint64_t offset);
-  static Expr* CreateLoop(struct Block*);
-  static Expr* CreateNop();
-  static Expr* CreateReturn();
-  static Expr* CreateSelect();
-  static Expr* CreateSetGlobal(Var);
-  static Expr* CreateSetLocal(Var);
-  static Expr* CreateStore(Opcode, uint32_t align, uint64_t offset);
-  static Expr* CreateTeeLocal(Var);
-  static Expr* CreateUnary(Opcode);
-  static Expr* CreateUnreachable();
-
-  Location loc;
-  ExprType type;
-  Expr* next;
-  union {
-    struct { Opcode opcode; } binary, compare, convert, unary;
-    struct Block *block, *loop;
-    struct { Var var; } br, br_if;
-    struct { VarVector* targets; Var default_target; } br_table;
-    struct { Var var; } call, call_indirect;
-    struct Const const_;
-    struct { Var var; } get_global, set_global;
-    struct { Var var; } get_local, set_local, tee_local;
-    struct { struct Block* true_; struct Expr* false_; } if_;
-    struct { Opcode opcode; uint32_t align; uint64_t offset; } load, store;
-  };
-};
-
-struct FuncSignature {
-  TypeVector param_types;
-  TypeVector result_types;
-};
-
-struct FuncType {
-  WABT_DISALLOW_COPY_AND_ASSIGN(FuncType);
-  FuncType();
-  ~FuncType();
-
-  StringSlice name;
-  FuncSignature sig;
-};
-
-struct FuncDeclaration {
-  WABT_DISALLOW_COPY_AND_ASSIGN(FuncDeclaration);
-  FuncDeclaration();
-  ~FuncDeclaration();
-
-  bool has_func_type;
-  Var type_var;
-  FuncSignature sig;
-};
-
-struct Func {
-  WABT_DISALLOW_COPY_AND_ASSIGN(Func);
-  Func();
-  ~Func();
-
-  StringSlice name;
-  FuncDeclaration decl;
-  TypeVector local_types;
-  BindingHash param_bindings;
-  BindingHash local_bindings;
-  Expr* first_expr;
-};
-
-struct Global {
-  WABT_DISALLOW_COPY_AND_ASSIGN(Global);
-  Global();
-  ~Global();
-
-  StringSlice name;
-  Type type;
-  bool mutable_;
-  Expr* init_expr;
-};
-
-struct Table {
-  WABT_DISALLOW_COPY_AND_ASSIGN(Table);
-  Table();
-  ~Table();
-
-  StringSlice name;
-  Limits elem_limits;
-};
-
-struct ElemSegment {
-  WABT_DISALLOW_COPY_AND_ASSIGN(ElemSegment);
-  ElemSegment();
-  ~ElemSegment();
-
-  Var table_var;
-  Expr* offset;
-  VarVector vars;
-};
-
-struct Memory {
-  WABT_DISALLOW_COPY_AND_ASSIGN(Memory);
-  Memory();
-  ~Memory();
-
-  StringSlice name;
-  Limits page_limits;
-};
-
-struct DataSegment {
-  WABT_DISALLOW_COPY_AND_ASSIGN(DataSegment);
-  DataSegment();
-  ~DataSegment();
-
-  Var memory_var;
-  Expr* offset;
-  char* data;
-  size_t size;
-};
-
-struct Import {
-  WABT_DISALLOW_COPY_AND_ASSIGN(Import);
-  Import();
-  ~Import();
-
-  StringSlice module_name;
-  StringSlice field_name;
-  ExternalKind kind;
-  union {
-    /* an imported func is has the type Func so it can be more easily
-     * included in the Module's vector of funcs; but only the
-     * FuncDeclaration will have any useful information */
-    Func* func;
-    Table* table;
-    Memory* memory;
-    Global* global;
-  };
-};
-
-struct Export {
-  WABT_DISALLOW_COPY_AND_ASSIGN(Export);
-  Export();
-  ~Export();
-
-  StringSlice name;
-  ExternalKind kind;
-  Var var;
-};
-
-enum class ModuleFieldType {
-  Func,
-  Global,
-  Import,
-  Export,
-  FuncType,
-  Table,
-  ElemSegment,
-  Memory,
-  DataSegment,
-  Start,
-};
-
-struct ModuleField {
-  WABT_DISALLOW_COPY_AND_ASSIGN(ModuleField);
-  ModuleField();
-  ~ModuleField();
-
-  Location loc;
-  ModuleFieldType type;
-  struct ModuleField* next;
-  union {
-    Func* func;
-    Global* global;
-    Import* import;
-    Export* export_;
-    FuncType* func_type;
-    Table* table;
-    ElemSegment* elem_segment;
-    Memory* memory;
-    DataSegment* data_segment;
-    Var start;
-  };
-};
-
-struct Module {
-  WABT_DISALLOW_COPY_AND_ASSIGN(Module);
-  Module();
-  ~Module();
-
-  Location loc;
-  StringSlice name;
-  ModuleField* first_field;
-  ModuleField* last_field;
-
-  uint32_t num_func_imports;
-  uint32_t num_table_imports;
-  uint32_t num_memory_imports;
-  uint32_t num_global_imports;
-
-  /* cached for convenience; the pointers are shared with values that are
-   * stored in either ModuleField or Import. */
-  std::vector<Func*> funcs;
-  std::vector<Global*> globals;
-  std::vector<Import*> imports;
-  std::vector<Export*> exports;
-  std::vector<FuncType*> func_types;
-  std::vector<Table*> tables;
-  std::vector<ElemSegment*> elem_segments;
-  std::vector<Memory*> memories;
-  std::vector<DataSegment*> data_segments;
-  Var* start;
-
-  BindingHash func_bindings;
-  BindingHash global_bindings;
-  BindingHash export_bindings;
-  BindingHash func_type_bindings;
-  BindingHash table_bindings;
-  BindingHash memory_bindings;
-};
-
-enum class RawModuleType {
-  Text,
-  Binary,
-};
-
-/* "raw" means that the binary module has not yet been decoded. This is only
- * necessary when embedded in assert_invalid. In that case we want to defer
- * decoding errors until wabt_check_assert_invalid is called. This isn't needed
- * when parsing text, as assert_invalid always assumes that text parsing
- * succeeds. */
-struct RawModule {
-  WABT_DISALLOW_COPY_AND_ASSIGN(RawModule);
-  RawModule();
-  ~RawModule();
-
-  RawModuleType type;
-  union {
-    Module* text;
-    struct {
-      Location loc;
-      StringSlice name;
-      char* data;
-      size_t size;
-    } binary;
-  };
-};
-
-enum class ActionType {
-  Invoke,
-  Get,
-};
-
-struct ActionInvoke {
-  WABT_DISALLOW_COPY_AND_ASSIGN(ActionInvoke);
-  ActionInvoke();
-
-  ConstVector args;
-};
-
-struct Action {
-  WABT_DISALLOW_COPY_AND_ASSIGN(Action);
-  Action();
-  ~Action();
-
-  Location loc;
-  ActionType type;
-  Var module_var;
-  StringSlice name;
-  union {
-    ActionInvoke* invoke;
-    struct {} get;
-  };
-};
-
-enum class CommandType {
-  Module,
-  Action,
-  Register,
-  AssertMalformed,
-  AssertInvalid,
-  /* This is a module that is invalid, but cannot be written as a binary module
-   * (e.g. it has unresolvable names.) */
-  AssertInvalidNonBinary,
-  AssertUnlinkable,
-  AssertUninstantiable,
-  AssertReturn,
-  AssertReturnCanonicalNan,
-  AssertReturnArithmeticNan,
-  AssertTrap,
-  AssertExhaustion,
-
-  First = Module,
-  Last = AssertExhaustion,
-};
-static const int kCommandTypeCount = WABT_ENUM_COUNT(CommandType);
-
-struct Command {
-  WABT_DISALLOW_COPY_AND_ASSIGN(Command);
-  Command();
-  ~Command();
-
-  CommandType type;
-  union {
-    Module* module;
-    Action* action;
-    struct { StringSlice module_name; Var var; } register_;
-    struct { Action* action; ConstVector* expected; } assert_return;
-    struct {
-      Action* action;
-    } assert_return_canonical_nan, assert_return_arithmetic_nan;
-    struct { Action* action; StringSlice text; } assert_trap;
-    struct {
-      RawModule* module;
-      StringSlice text;
-    } assert_malformed, assert_invalid, assert_unlinkable,
-        assert_uninstantiable;
-  };
-};
-typedef std::vector<std::unique_ptr<Command>> CommandPtrVector;
-
-struct Script {
-  WABT_DISALLOW_COPY_AND_ASSIGN(Script);
-  Script();
-
-  CommandPtrVector commands;
-  BindingHash module_bindings;
-};
-
-struct ExprVisitor {
-  void* user_data;
-  Result (*on_binary_expr)(Expr*, void* user_data);
-  Result (*begin_block_expr)(Expr*, void* user_data);
-  Result (*end_block_expr)(Expr*, void* user_data);
-  Result (*on_br_expr)(Expr*, void* user_data);
-  Result (*on_br_if_expr)(Expr*, void* user_data);
-  Result (*on_br_table_expr)(Expr*, void* user_data);
-  Result (*on_call_expr)(Expr*, void* user_data);
-  Result (*on_call_indirect_expr)(Expr*, void* user_data);
-  Result (*on_compare_expr)(Expr*, void* user_data);
-  Result (*on_const_expr)(Expr*, void* user_data);
-  Result (*on_convert_expr)(Expr*, void* user_data);
-  Result (*on_current_memory_expr)(Expr*, void* user_data);
-  Result (*on_drop_expr)(Expr*, void* user_data);
-  Result (*on_get_global_expr)(Expr*, void* user_data);
-  Result (*on_get_local_expr)(Expr*, void* user_data);
-  Result (*on_grow_memory_expr)(Expr*, void* user_data);
-  Result (*begin_if_expr)(Expr*, void* user_data);
-  Result (*after_if_true_expr)(Expr*, void* user_data);
-  Result (*end_if_expr)(Expr*, void* user_data);
-  Result (*on_load_expr)(Expr*, void* user_data);
-  Result (*begin_loop_expr)(Expr*, void* user_data);
-  Result (*end_loop_expr)(Expr*, void* user_data);
-  Result (*on_nop_expr)(Expr*, void* user_data);
-  Result (*on_return_expr)(Expr*, void* user_data);
-  Result (*on_select_expr)(Expr*, void* user_data);
-  Result (*on_set_global_expr)(Expr*, void* user_data);
-  Result (*on_set_local_expr)(Expr*, void* user_data);
-  Result (*on_store_expr)(Expr*, void* user_data);
-  Result (*on_tee_local_expr)(Expr*, void* user_data);
-  Result (*on_unary_expr)(Expr*, void* user_data);
-  Result (*on_unreachable_expr)(Expr*, void* user_data);
-};
-
-ModuleField* append_module_field(Module*);
-/* ownership of the function signature is passed to the module */
-FuncType* append_implicit_func_type(Location*, Module*, FuncSignature*);
-
-/* destruction functions. not needed unless you're creating your own AST
- elements */
-void destroy_expr_list(Expr*);
-void destroy_var(Var*);
-
-/* traversal functions */
-Result visit_func(Func* func, ExprVisitor*);
-Result visit_expr_list(Expr* expr, ExprVisitor*);
-
-/* convenience functions for looking through the AST */
-int get_index_from_var(const BindingHash* bindings, const Var* var);
-int get_func_index_by_var(const Module* module, const Var* var);
-int get_global_index_by_var(const Module* func, const Var* var);
-int get_func_type_index_by_var(const Module* module, const Var* var);
-int get_func_type_index_by_sig(const Module* module, const FuncSignature* sig);
-int get_func_type_index_by_decl(const Module* module,
-                                const FuncDeclaration* decl);
-int get_table_index_by_var(const Module* module, const Var* var);
-int get_memory_index_by_var(const Module* module, const Var* var);
-int get_import_index_by_var(const Module* module, const Var* var);
-int get_local_index_by_var(const Func* func, const Var* var);
-int get_module_index_by_var(const Script* script, const Var* var);
-
-Func* get_func_by_var(const Module* module, const Var* var);
-Global* get_global_by_var(const Module* func, const Var* var);
-FuncType* get_func_type_by_var(const Module* module, const Var* var);
-Table* get_table_by_var(const Module* module, const Var* var);
-Memory* get_memory_by_var(const Module* module, const Var* var);
-Import* get_import_by_var(const Module* module, const Var* var);
-Export* get_export_by_name(const Module* module, const StringSlice* name);
-Module* get_first_module(const Script* script);
-Module* get_module_by_var(const Script* script, const Var* var);
-
-void make_type_binding_reverse_mapping(
-    const TypeVector&,
-    const BindingHash&,
-    std::vector<std::string>* out_reverse_mapping);
-
-static WABT_INLINE bool decl_has_func_type(const FuncDeclaration* decl) {
-  return decl->has_func_type;
-}
-
-static WABT_INLINE bool signatures_are_equal(const FuncSignature* sig1,
-                                             const FuncSignature* sig2) {
-  return sig1->param_types == sig2->param_types &&
-         sig1->result_types == sig2->result_types;
-}
-
-static WABT_INLINE size_t get_num_params(const Func* func) {
-  return func->decl.sig.param_types.size();
-}
-
-static WABT_INLINE size_t get_num_results(const Func* func) {
-  return func->decl.sig.result_types.size();
-}
-
-static WABT_INLINE size_t get_num_locals(const Func* func) {
-  return func->local_types.size();
-}
-
-static WABT_INLINE size_t get_num_params_and_locals(const Func* func) {
-  return get_num_params(func) + get_num_locals(func);
-}
-
-static WABT_INLINE Type get_param_type(const Func* func, int index) {
-  assert(static_cast<size_t>(index) < func->decl.sig.param_types.size());
-  return func->decl.sig.param_types[index];
-}
-
-static WABT_INLINE Type get_local_type(const Func* func, int index) {
-  assert(static_cast<size_t>(index) < get_num_locals(func));
-  return func->local_types[index];
-}
-
-static WABT_INLINE Type get_result_type(const Func* func, int index) {
-  assert(static_cast<size_t>(index) < func->decl.sig.result_types.size());
-  return func->decl.sig.result_types[index];
-}
-
-static WABT_INLINE Type get_func_type_param_type(const FuncType* func_type,
-                                                 int index) {
-  return func_type->sig.param_types[index];
-}
-
-static WABT_INLINE size_t get_func_type_num_params(const FuncType* func_type) {
-  return func_type->sig.param_types.size();
-}
-
-static WABT_INLINE Type get_func_type_result_type(const FuncType* func_type,
-                                                  int index) {
-  return func_type->sig.result_types[index];
-}
-
-static WABT_INLINE size_t get_func_type_num_results(const FuncType* func_type) {
-  return func_type->sig.result_types.size();
-}
-
-static WABT_INLINE const Location* get_raw_module_location(
-    const RawModule* raw) {
-  switch (raw->type) {
-    case RawModuleType::Binary:
-      return &raw->binary.loc;
-    case RawModuleType::Text:
-      return &raw->text->loc;
-    default:
-      assert(0);
-      return nullptr;
-  }
-}
-
-}  // namespace wabt
-
-#endif /* WABT_AST_H_ */
diff --git a/lib/wabt/src/binary-error-handler.cc b/lib/wabt/src/binary-error-handler.cc
new file mode 100644
index 0000000..4b3c0a2
--- /dev/null
+++ b/lib/wabt/src/binary-error-handler.cc
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2017 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "binary-error-handler.h"
+
+#include "common.h"
+
+namespace wabt {
+
+std::string BinaryErrorHandler::DefaultErrorMessage(Offset offset,
+                                                    const std::string& error) {
+  if (offset == kInvalidOffset)
+    return string_printf("error: %s\n", error.c_str());
+  else
+    return string_printf("error: @0x%08" PRIzx ": %s\n", offset, error.c_str());
+}
+
+BinaryErrorHandlerFile::BinaryErrorHandlerFile(FILE* file,
+                                               const std::string& header,
+                                               PrintHeader print_header)
+    : file_(file), header_(header), print_header_(print_header) {}
+
+bool BinaryErrorHandlerFile::OnError(Offset offset, const std::string& error) {
+  PrintErrorHeader();
+  std::string message = DefaultErrorMessage(offset, error);
+  fwrite(message.data(), 1, message.size(), file_);
+  fflush(file_);
+  return true;
+}
+
+void BinaryErrorHandlerFile::PrintErrorHeader() {
+  if (header_.empty())
+    return;
+
+  switch (print_header_) {
+    case PrintHeader::Never:
+      break;
+
+    case PrintHeader::Once:
+      print_header_ = PrintHeader::Never;
+    // Fallthrough.
+
+    case PrintHeader::Always:
+      fprintf(file_, "%s:\n", header_.c_str());
+      break;
+  }
+  // If there's a header, indent the following message.
+  fprintf(file_, "  ");
+}
+
+bool BinaryErrorHandlerBuffer::OnError(Offset offset,
+                                       const std::string& error) {
+  buffer_ += DefaultErrorMessage(offset, error);
+  return true;
+}
+
+}  // namespace wabt
diff --git a/lib/wabt/src/binary-error-handler.h b/lib/wabt/src/binary-error-handler.h
new file mode 100644
index 0000000..e4644dd
--- /dev/null
+++ b/lib/wabt/src/binary-error-handler.h
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2017 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef WABT_BINARY_ERROR_HANDLER_H_
+#define WABT_BINARY_ERROR_HANDLER_H_
+
+#include <cstdint>
+#include <cstdio>
+#include <string>
+
+#include "common.h"
+
+namespace wabt {
+
+class BinaryErrorHandler {
+ public:
+  virtual ~BinaryErrorHandler() {}
+
+  // Returns true if the error was handled.
+  virtual bool OnError(Offset offset, const std::string& error) = 0;
+
+  std::string DefaultErrorMessage(Offset offset, const std::string& error);
+};
+
+class BinaryErrorHandlerFile : public BinaryErrorHandler {
+ public:
+  enum class PrintHeader {
+    Never,
+    Once,
+    Always,
+  };
+
+  BinaryErrorHandlerFile(FILE* file = stderr,
+                         const std::string& header = std::string(),
+                         PrintHeader print_header = PrintHeader::Never);
+
+  bool OnError(Offset offset, const std::string& error) override;
+
+ private:
+  void PrintErrorHeader();
+
+  FILE* file_;
+  std::string header_;
+  PrintHeader print_header_;
+};
+
+class BinaryErrorHandlerBuffer : public BinaryErrorHandler {
+ public:
+  BinaryErrorHandlerBuffer() = default;
+
+  bool OnError(Offset offset, const std::string& error) override;
+
+  const std::string& buffer() const { return buffer_; }
+
+ private:
+  std::string buffer_;
+};
+
+}  // namespace wabt
+
+#endif // WABT_BINARY_ERROR_HANDLER_H_
diff --git a/lib/wabt/src/binary-reader-ast.cc b/lib/wabt/src/binary-reader-ast.cc
deleted file mode 100644
index 39c9e8f..0000000
--- a/lib/wabt/src/binary-reader-ast.cc
+++ /dev/null
@@ -1,991 +0,0 @@
-/*
- * Copyright 2016 WebAssembly Community Group participants
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "binary-reader-ast.h"
-
-#include <assert.h>
-#include <inttypes.h>
-#include <stdarg.h>
-#include <stdint.h>
-#include <stdio.h>
-
-#include <vector>
-
-#include "ast.h"
-#include "binary-reader.h"
-#include "common.h"
-
-#define CHECK_RESULT(expr) \
-  do {                     \
-    if (WABT_FAILED(expr)) \
-      return Result::Error;   \
-  } while (0)
-
-namespace wabt {
-
-namespace {
-
-struct LabelNode {
-  LabelNode(LabelType, Expr** first);
-
-  LabelType label_type;
-  Expr** first;
-  Expr* last;
-};
-
-LabelNode::LabelNode(LabelType label_type, Expr** first)
-    : label_type(label_type), first(first), last(nullptr) {}
-
-struct Context {
-  BinaryErrorHandler* error_handler = nullptr;
-  Module* module = nullptr;
-
-  Func* current_func = nullptr;
-  std::vector<LabelNode> label_stack;
-  uint32_t max_depth = 0;
-  Expr** current_init_expr = nullptr;
-};
-
-}  // namespace
-
-static bool handle_error(Context* ctx, uint32_t offset, const char* message);
-
-static void WABT_PRINTF_FORMAT(2, 3)
-    print_error(Context* ctx, const char* format, ...) {
-  WABT_SNPRINTF_ALLOCA(buffer, length, format);
-  handle_error(ctx, WABT_UNKNOWN_OFFSET, buffer);
-}
-
-static void push_label(Context* ctx, LabelType label_type, Expr** first) {
-  ctx->max_depth++;
-  ctx->label_stack.emplace_back(label_type, first);
-}
-
-static Result pop_label(Context* ctx) {
-  if (ctx->label_stack.size() == 0) {
-    print_error(ctx, "popping empty label stack");
-    return Result::Error;
-  }
-
-  ctx->max_depth--;
-  ctx->label_stack.pop_back();
-  return Result::Ok;
-}
-
-static Result get_label_at(Context* ctx, LabelNode** label, uint32_t depth) {
-  if (depth >= ctx->label_stack.size()) {
-    print_error(ctx, "accessing stack depth: %u >= max: %" PRIzd, depth,
-                ctx->label_stack.size());
-    return Result::Error;
-  }
-
-  *label = &ctx->label_stack[ctx->label_stack.size() - depth - 1];
-  return Result::Ok;
-}
-
-static Result top_label(Context* ctx, LabelNode** label) {
-  return get_label_at(ctx, label, 0);
-}
-
-static Result append_expr(Context* ctx, Expr* expr) {
-  LabelNode* label;
-  if (WABT_FAILED(top_label(ctx, &label))) {
-    delete expr;
-    return Result::Error;
-  }
-  if (*label->first) {
-    label->last->next = expr;
-    label->last = expr;
-  } else {
-    *label->first = label->last = expr;
-  }
-  return Result::Ok;
-}
-
-static bool handle_error(Context* ctx, uint32_t offset, const char* message) {
-  if (ctx->error_handler->on_error) {
-    return ctx->error_handler->on_error(offset, message,
-                                        ctx->error_handler->user_data);
-  }
-  return false;
-}
-
-static bool on_error(BinaryReaderContext* reader_context, const char* message) {
-  Context* ctx = static_cast<Context*>(reader_context->user_data);
-  return handle_error(ctx, reader_context->offset, message);
-}
-
-static Result on_signature_count(uint32_t count, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  ctx->module->func_types.reserve(count);
-  return Result::Ok;
-}
-
-static Result on_signature(uint32_t index,
-                           uint32_t param_count,
-                           Type* param_types,
-                           uint32_t result_count,
-                           Type* result_types,
-                           void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  ModuleField* field = append_module_field(ctx->module);
-  field->type = ModuleFieldType::FuncType;
-  field->func_type = new FuncType();
-
-  FuncType* func_type = field->func_type;
-  func_type->sig.param_types.assign(param_types, param_types + param_count);
-  func_type->sig.result_types.assign(result_types, result_types + result_count);
-  ctx->module->func_types.push_back(func_type);
-  return Result::Ok;
-}
-
-static Result on_import_count(uint32_t count, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  ctx->module->imports.reserve(count);
-  return Result::Ok;
-}
-
-static Result on_import(uint32_t index,
-                        StringSlice module_name,
-                        StringSlice field_name,
-                        void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-
-  ModuleField* field = append_module_field(ctx->module);
-  field->type = ModuleFieldType::Import;
-  field->import = new Import();
-
-  Import* import = field->import;
-  import->module_name = dup_string_slice(module_name);
-  import->field_name = dup_string_slice(field_name);
-  ctx->module->imports.push_back(import);
-  return Result::Ok;
-}
-
-static Result on_import_func(uint32_t import_index,
-                             StringSlice module_name,
-                             StringSlice field_name,
-                             uint32_t func_index,
-                             uint32_t sig_index,
-                             void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  assert(import_index == ctx->module->imports.size() - 1);
-  Import* import = ctx->module->imports[import_index];
-
-  import->kind = ExternalKind::Func;
-  import->func = new Func();
-  import->func->decl.has_func_type = true;
-  import->func->decl.type_var.type = VarType::Index;
-  import->func->decl.type_var.index = sig_index;
-  import->func->decl.sig = ctx->module->func_types[sig_index]->sig;
-
-  ctx->module->funcs.push_back(import->func);
-  ctx->module->num_func_imports++;
-  return Result::Ok;
-}
-
-static Result on_import_table(uint32_t import_index,
-                              StringSlice module_name,
-                              StringSlice field_name,
-                              uint32_t table_index,
-                              Type elem_type,
-                              const Limits* elem_limits,
-                              void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  assert(import_index == ctx->module->imports.size() - 1);
-  Import* import = ctx->module->imports[import_index];
-  import->kind = ExternalKind::Table;
-  import->table = new Table();
-  import->table->elem_limits = *elem_limits;
-  ctx->module->tables.push_back(import->table);
-  ctx->module->num_table_imports++;
-  return Result::Ok;
-}
-
-static Result on_import_memory(uint32_t import_index,
-                               StringSlice module_name,
-                               StringSlice field_name,
-                               uint32_t memory_index,
-                               const Limits* page_limits,
-                               void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  assert(import_index == ctx->module->imports.size() - 1);
-  Import* import = ctx->module->imports[import_index];
-  import->kind = ExternalKind::Memory;
-  import->memory = new Memory();
-  import->memory->page_limits = *page_limits;
-  ctx->module->memories.push_back(import->memory);
-  ctx->module->num_memory_imports++;
-  return Result::Ok;
-}
-
-static Result on_import_global(uint32_t import_index,
-                               StringSlice module_name,
-                               StringSlice field_name,
-                               uint32_t global_index,
-                               Type type,
-                               bool mutable_,
-                               void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  assert(import_index == ctx->module->imports.size() - 1);
-  Import* import = ctx->module->imports[import_index];
-  import->kind = ExternalKind::Global;
-  import->global = new Global();
-  import->global->type = type;
-  import->global->mutable_ = mutable_;
-  ctx->module->globals.push_back(import->global);
-  ctx->module->num_global_imports++;
-  return Result::Ok;
-}
-
-static Result on_function_signatures_count(uint32_t count, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  ctx->module->funcs.reserve(ctx->module->num_func_imports + count);
-  return Result::Ok;
-}
-
-static Result on_function_signature(uint32_t index,
-                                    uint32_t sig_index,
-                                    void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-
-  ModuleField* field = append_module_field(ctx->module);
-  field->type = ModuleFieldType::Func;
-  field->func = new Func();
-
-  Func* func = field->func;
-  func->decl.has_func_type = true;
-  func->decl.type_var.type = VarType::Index;
-  func->decl.type_var.index = sig_index;
-  func->decl.sig = ctx->module->func_types[sig_index]->sig;
-
-  ctx->module->funcs.push_back(func);
-  return Result::Ok;
-}
-
-static Result on_table_count(uint32_t count, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  ctx->module->tables.reserve(ctx->module->num_table_imports + count);
-  return Result::Ok;
-}
-
-static Result on_table(uint32_t index,
-                       Type elem_type,
-                       const Limits* elem_limits,
-                       void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-
-  ModuleField* field = append_module_field(ctx->module);
-  field->type = ModuleFieldType::Table;
-  field->table = new Table();
-  field->table->elem_limits = *elem_limits;
-  ctx->module->tables.push_back(field->table);
-  return Result::Ok;
-}
-
-static Result on_memory_count(uint32_t count, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  ctx->module->memories.reserve(ctx->module->num_memory_imports + count);
-  return Result::Ok;
-}
-
-static Result on_memory(uint32_t index,
-                        const Limits* page_limits,
-                        void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-
-  ModuleField* field = append_module_field(ctx->module);
-  field->type = ModuleFieldType::Memory;
-  field->memory = new Memory();
-  field->memory->page_limits = *page_limits;
-  ctx->module->memories.push_back(field->memory);
-  return Result::Ok;
-}
-
-static Result on_global_count(uint32_t count, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  ctx->module->globals.reserve(ctx->module->num_global_imports + count);
-  return Result::Ok;
-}
-
-static Result begin_global(uint32_t index,
-                           Type type,
-                           bool mutable_,
-                           void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-
-  ModuleField* field = append_module_field(ctx->module);
-  field->type = ModuleFieldType::Global;
-  field->global = new Global();
-  field->global->type = type;
-  field->global->mutable_ = mutable_;
-  ctx->module->globals.push_back(field->global);
-  return Result::Ok;
-}
-
-static Result begin_global_init_expr(uint32_t index, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  assert(index == ctx->module->globals.size() - 1);
-  Global* global = ctx->module->globals[index];
-  ctx->current_init_expr = &global->init_expr;
-  return Result::Ok;
-}
-
-static Result end_global_init_expr(uint32_t index, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  ctx->current_init_expr = nullptr;
-  return Result::Ok;
-}
-
-static Result on_export_count(uint32_t count, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  ctx->module->exports.reserve(count);
-  return Result::Ok;
-}
-
-static Result on_export(uint32_t index,
-                        ExternalKind kind,
-                        uint32_t item_index,
-                        StringSlice name,
-                        void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  ModuleField* field = append_module_field(ctx->module);
-  field->type = ModuleFieldType::Export;
-  field->export_ = new Export();
-
-  Export* export_ = field->export_;
-  export_->name = dup_string_slice(name);
-  switch (kind) {
-    case ExternalKind::Func:
-      assert(item_index < ctx->module->funcs.size());
-      break;
-    case ExternalKind::Table:
-      assert(item_index < ctx->module->tables.size());
-      break;
-    case ExternalKind::Memory:
-      assert(item_index < ctx->module->memories.size());
-      break;
-    case ExternalKind::Global:
-      assert(item_index < ctx->module->globals.size());
-      break;
-  }
-  export_->var.type = VarType::Index;
-  export_->var.index = item_index;
-  export_->kind = kind;
-  ctx->module->exports.push_back(export_);
-  return Result::Ok;
-}
-
-static Result on_start_function(uint32_t func_index, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  ModuleField* field = append_module_field(ctx->module);
-  field->type = ModuleFieldType::Start;
-
-  field->start.type = VarType::Index;
-  assert(func_index < ctx->module->funcs.size());
-  field->start.index = func_index;
-
-  ctx->module->start = &field->start;
-  return Result::Ok;
-}
-
-static Result on_function_bodies_count(uint32_t count, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  assert(ctx->module->num_func_imports + count == ctx->module->funcs.size());
-  WABT_USE(ctx);
-  return Result::Ok;
-}
-
-static Result begin_function_body(BinaryReaderContext* context,
-                                  uint32_t index) {
-  Context* ctx = static_cast<Context*>(context->user_data);
-  ctx->current_func = ctx->module->funcs[index];
-  push_label(ctx, LabelType::Func, &ctx->current_func->first_expr);
-  return Result::Ok;
-}
-
-static Result on_local_decl(uint32_t decl_index,
-                            uint32_t count,
-                            Type type,
-                            void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  TypeVector& types = ctx->current_func->local_types;
-  types.reserve(types.size() + count);
-  for (size_t i = 0; i < count; ++i)
-    types.push_back(type);
-  return Result::Ok;
-}
-
-static Result on_binary_expr(Opcode opcode, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Expr* expr = Expr::CreateBinary(opcode);
-  return append_expr(ctx, expr);
-}
-
-static Result on_block_expr(uint32_t num_types,
-                            Type* sig_types,
-                            void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Expr* expr = Expr::CreateBlock(new Block());
-  expr->block->sig.assign(sig_types, sig_types + num_types);
-  append_expr(ctx, expr);
-  push_label(ctx, LabelType::Block, &expr->block->first);
-  return Result::Ok;
-}
-
-static Result on_br_expr(uint32_t depth, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Expr* expr = Expr::CreateBr(Var(depth));
-  return append_expr(ctx, expr);
-}
-
-static Result on_br_if_expr(uint32_t depth, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Expr* expr = Expr::CreateBrIf(Var(depth));
-  return append_expr(ctx, expr);
-}
-
-static Result on_br_table_expr(BinaryReaderContext* context,
-                               uint32_t num_targets,
-                               uint32_t* target_depths,
-                               uint32_t default_target_depth) {
-  Context* ctx = static_cast<Context*>(context->user_data);
-  VarVector* targets = new VarVector();
-  targets->resize(num_targets);
-  for (uint32_t i = 0; i < num_targets; ++i) {
-    (*targets)[i] = Var(target_depths[i]);
-  }
-  Expr* expr = Expr::CreateBrTable(targets, Var(default_target_depth));
-  return append_expr(ctx, expr);
-}
-
-static Result on_call_expr(uint32_t func_index, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  assert(func_index < ctx->module->funcs.size());
-  Expr* expr = Expr::CreateCall(Var(func_index));
-  return append_expr(ctx, expr);
-}
-
-static Result on_call_indirect_expr(uint32_t sig_index, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  assert(sig_index < ctx->module->func_types.size());
-  Expr* expr = Expr::CreateCallIndirect(Var(sig_index));
-  return append_expr(ctx, expr);
-}
-
-static Result on_compare_expr(Opcode opcode, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Expr* expr = Expr::CreateCompare(opcode);
-  return append_expr(ctx, expr);
-}
-
-static Result on_convert_expr(Opcode opcode, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Expr* expr = Expr::CreateConvert(opcode);
-  return append_expr(ctx, expr);
-}
-
-static Result on_current_memory_expr(void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Expr* expr = Expr::CreateCurrentMemory();
-  return append_expr(ctx, expr);
-}
-
-static Result on_drop_expr(void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Expr* expr = Expr::CreateDrop();
-  return append_expr(ctx, expr);
-}
-
-static Result on_else_expr(void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  LabelNode* label;
-  CHECK_RESULT(top_label(ctx, &label));
-  if (label->label_type != LabelType::If) {
-    print_error(ctx, "else expression without matching if");
-    return Result::Error;
-  }
-
-  LabelNode* parent_label;
-  CHECK_RESULT(get_label_at(ctx, &parent_label, 1));
-  assert(parent_label->last->type == ExprType::If);
-
-  label->label_type = LabelType::Else;
-  label->first = &parent_label->last->if_.false_;
-  label->last = nullptr;
-  return Result::Ok;
-}
-
-static Result on_end_expr(void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  return pop_label(ctx);
-}
-
-static Result on_f32_const_expr(uint32_t value_bits, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Expr* expr = Expr::CreateConst(Const(Const::F32(), value_bits));
-  return append_expr(ctx, expr);
-}
-
-static Result on_f64_const_expr(uint64_t value_bits, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Expr* expr = Expr::CreateConst(Const(Const::F64(), value_bits));
-  return append_expr(ctx, expr);
-}
-
-static Result on_get_global_expr(uint32_t global_index, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Expr* expr = Expr::CreateGetGlobal(Var(global_index));
-  return append_expr(ctx, expr);
-}
-
-static Result on_get_local_expr(uint32_t local_index, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Expr* expr = Expr::CreateGetLocal(Var(local_index));
-  return append_expr(ctx, expr);
-}
-
-static Result on_grow_memory_expr(void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Expr* expr = Expr::CreateGrowMemory();
-  return append_expr(ctx, expr);
-}
-
-static Result on_i32_const_expr(uint32_t value, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Expr* expr = Expr::CreateConst(Const(Const::I32(), value));
-  return append_expr(ctx, expr);
-}
-
-static Result on_i64_const_expr(uint64_t value, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Expr* expr = Expr::CreateConst(Const(Const::I64(), value));
-  return append_expr(ctx, expr);
-}
-
-static Result on_if_expr(uint32_t num_types, Type* sig_types, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Expr* expr = Expr::CreateIf(new Block());
-  expr->if_.true_->sig.assign(sig_types, sig_types + num_types);
-  expr->if_.false_ = nullptr;
-  append_expr(ctx, expr);
-  push_label(ctx, LabelType::If, &expr->if_.true_->first);
-  return Result::Ok;
-}
-
-static Result on_load_expr(Opcode opcode,
-                           uint32_t alignment_log2,
-                           uint32_t offset,
-                           void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Expr* expr = Expr::CreateLoad(opcode, 1 << alignment_log2, offset);
-  return append_expr(ctx, expr);
-}
-
-static Result on_loop_expr(uint32_t num_types,
-                           Type* sig_types,
-                           void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Expr* expr = Expr::CreateLoop(new Block());
-  expr->loop->sig.assign(sig_types, sig_types + num_types);
-  append_expr(ctx, expr);
-  push_label(ctx, LabelType::Loop, &expr->loop->first);
-  return Result::Ok;
-}
-
-static Result on_nop_expr(void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Expr* expr = Expr::CreateNop();
-  return append_expr(ctx, expr);
-}
-
-static Result on_return_expr(void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Expr* expr = Expr::CreateReturn();
-  return append_expr(ctx, expr);
-}
-
-static Result on_select_expr(void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Expr* expr = Expr::CreateSelect();
-  return append_expr(ctx, expr);
-}
-
-static Result on_set_global_expr(uint32_t global_index, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Expr* expr = Expr::CreateSetGlobal(Var(global_index));
-  return append_expr(ctx, expr);
-}
-
-static Result on_set_local_expr(uint32_t local_index, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Expr* expr = Expr::CreateSetLocal(Var(local_index));
-  return append_expr(ctx, expr);
-}
-
-static Result on_store_expr(Opcode opcode,
-                            uint32_t alignment_log2,
-                            uint32_t offset,
-                            void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Expr* expr = Expr::CreateStore(opcode, 1 << alignment_log2, offset);
-  return append_expr(ctx, expr);
-}
-
-static Result on_tee_local_expr(uint32_t local_index, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Expr* expr = Expr::CreateTeeLocal(Var(local_index));
-  return append_expr(ctx, expr);
-}
-
-static Result on_unary_expr(Opcode opcode, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Expr* expr = Expr::CreateUnary(opcode);
-  return append_expr(ctx, expr);
-}
-
-static Result on_unreachable_expr(void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Expr* expr = Expr::CreateUnreachable();
-  return append_expr(ctx, expr);
-}
-
-static Result end_function_body(uint32_t index, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  CHECK_RESULT(pop_label(ctx));
-  ctx->current_func = nullptr;
-  return Result::Ok;
-}
-
-static Result on_elem_segment_count(uint32_t count, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  ctx->module->elem_segments.reserve(count);
-  return Result::Ok;
-}
-
-static Result begin_elem_segment(uint32_t index,
-                                 uint32_t table_index,
-                                 void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  ModuleField* field = append_module_field(ctx->module);
-  field->type = ModuleFieldType::ElemSegment;
-  field->elem_segment = new ElemSegment();
-  field->elem_segment->table_var.type = VarType::Index;
-  field->elem_segment->table_var.index = table_index;
-  ctx->module->elem_segments.push_back(field->elem_segment);
-  return Result::Ok;
-}
-
-static Result begin_elem_segment_init_expr(uint32_t index, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  assert(index == ctx->module->elem_segments.size() - 1);
-  ElemSegment* segment = ctx->module->elem_segments[index];
-  ctx->current_init_expr = &segment->offset;
-  return Result::Ok;
-}
-
-static Result end_elem_segment_init_expr(uint32_t index, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  ctx->current_init_expr = nullptr;
-  return Result::Ok;
-}
-
-static Result on_elem_segment_function_index_count(BinaryReaderContext* context,
-                                                   uint32_t index,
-                                                   uint32_t count) {
-  Context* ctx = static_cast<Context*>(context->user_data);
-  assert(index == ctx->module->elem_segments.size() - 1);
-  ElemSegment* segment = ctx->module->elem_segments[index];
-  segment->vars.reserve(count);
-  return Result::Ok;
-}
-
-static Result on_elem_segment_function_index(uint32_t index,
-                                             uint32_t func_index,
-                                             void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  assert(index == ctx->module->elem_segments.size() - 1);
-  ElemSegment* segment = ctx->module->elem_segments[index];
-  segment->vars.emplace_back();
-  Var* var = &segment->vars.back();
-  var->type = VarType::Index;
-  var->index = func_index;
-  return Result::Ok;
-}
-
-static Result on_data_segment_count(uint32_t count, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  ctx->module->data_segments.reserve(count);
-  return Result::Ok;
-}
-
-static Result begin_data_segment(uint32_t index,
-                                 uint32_t memory_index,
-                                 void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  ModuleField* field = append_module_field(ctx->module);
-  field->type = ModuleFieldType::DataSegment;
-  field->data_segment = new DataSegment();
-  field->data_segment->memory_var.type = VarType::Index;
-  field->data_segment->memory_var.index = memory_index;
-  ctx->module->data_segments.push_back(field->data_segment);
-  return Result::Ok;
-}
-
-static Result begin_data_segment_init_expr(uint32_t index, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  assert(index == ctx->module->data_segments.size() - 1);
-  DataSegment* segment = ctx->module->data_segments[index];
-  ctx->current_init_expr = &segment->offset;
-  return Result::Ok;
-}
-
-static Result end_data_segment_init_expr(uint32_t index, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  ctx->current_init_expr = nullptr;
-  return Result::Ok;
-}
-
-static Result on_data_segment_data(uint32_t index,
-                                   const void* data,
-                                   uint32_t size,
-                                   void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  assert(index == ctx->module->data_segments.size() - 1);
-  DataSegment* segment = ctx->module->data_segments[index];
-  segment->data = new char[size];
-  segment->size = size;
-  memcpy(segment->data, data, size);
-  return Result::Ok;
-}
-
-static Result on_function_names_count(uint32_t count, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  if (count > ctx->module->funcs.size()) {
-    print_error(
-        ctx, "expected function name count (%u) <= function count (%" PRIzd ")",
-        count, ctx->module->funcs.size());
-    return Result::Error;
-  }
-  return Result::Ok;
-}
-
-static Result on_function_name(uint32_t index,
-                               StringSlice name,
-                               void* user_data) {
-  if (string_slice_is_empty(&name))
-    return Result::Ok;
-
-  Context* ctx = static_cast<Context*>(user_data);
-  ctx->module->func_bindings.emplace(string_slice_to_string(name),
-                                     Binding(index));
-  Func* func = ctx->module->funcs[index];
-  func->name = dup_string_slice(name);
-  return Result::Ok;
-}
-
-static Result on_local_name_local_count(uint32_t index,
-                                        uint32_t count,
-                                        void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Module* module = ctx->module;
-  assert(index < module->funcs.size());
-  Func* func = module->funcs[index];
-  uint32_t num_params_and_locals = get_num_params_and_locals(func);
-  if (count > num_params_and_locals) {
-    print_error(ctx, "expected local name count (%d) <= local count (%d)",
-                count, num_params_and_locals);
-    return Result::Error;
-  }
-  return Result::Ok;
-}
-
-static Result on_init_expr_f32_const_expr(uint32_t index,
-                                          uint32_t value,
-                                          void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  *ctx->current_init_expr = Expr::CreateConst(Const(Const::F32(), value));
-  return Result::Ok;
-}
-
-static Result on_init_expr_f64_const_expr(uint32_t index,
-                                          uint64_t value,
-                                          void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  *ctx->current_init_expr = Expr::CreateConst(Const(Const::F64(), value));
-  return Result::Ok;
-}
-
-static Result on_init_expr_get_global_expr(uint32_t index,
-                                           uint32_t global_index,
-                                           void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  *ctx->current_init_expr = Expr::CreateGetGlobal(Var(global_index));
-  return Result::Ok;
-}
-
-static Result on_init_expr_i32_const_expr(uint32_t index,
-                                          uint32_t value,
-                                          void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  *ctx->current_init_expr = Expr::CreateConst(Const(Const::I32(), value));
-  return Result::Ok;
-}
-
-static Result on_init_expr_i64_const_expr(uint32_t index,
-                                          uint64_t value,
-                                          void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  *ctx->current_init_expr = Expr::CreateConst(Const(Const::I64(), value));
-  return Result::Ok;
-}
-
-static Result on_local_name(uint32_t func_index,
-                            uint32_t local_index,
-                            StringSlice name,
-                            void* user_data) {
-  if (string_slice_is_empty(&name))
-    return Result::Ok;
-
-  Context* ctx = static_cast<Context*>(user_data);
-  Module* module = ctx->module;
-  Func* func = module->funcs[func_index];
-  uint32_t num_params = get_num_params(func);
-  BindingHash* bindings;
-  uint32_t index;
-  if (local_index < num_params) {
-    /* param name */
-    bindings = &func->param_bindings;
-    index = local_index;
-  } else {
-    /* local name */
-    bindings = &func->local_bindings;
-    index = local_index - num_params;
-  }
-  bindings->emplace(string_slice_to_string(name), Binding(index));
-  return Result::Ok;
-}
-
-Result read_binary_ast(const void* data,
-                       size_t size,
-                       const ReadBinaryOptions* options,
-                       BinaryErrorHandler* error_handler,
-                       struct Module* out_module) {
-  Context ctx;
-  ctx.error_handler = error_handler;
-  ctx.module = out_module;
-
-  BinaryReader reader;
-  WABT_ZERO_MEMORY(reader);
-  reader.user_data = &ctx;
-  reader.on_error = on_error;
-
-  reader.on_signature_count = on_signature_count;
-  reader.on_signature = on_signature;
-
-  reader.on_import_count = on_import_count;
-  reader.on_import = on_import;
-  reader.on_import_func = on_import_func;
-  reader.on_import_table = on_import_table;
-  reader.on_import_memory = on_import_memory;
-  reader.on_import_global = on_import_global;
-
-  reader.on_function_signatures_count = on_function_signatures_count;
-  reader.on_function_signature = on_function_signature;
-
-  reader.on_table_count = on_table_count;
-  reader.on_table = on_table;
-
-  reader.on_memory_count = on_memory_count;
-  reader.on_memory = on_memory;
-
-  reader.on_global_count = on_global_count;
-  reader.begin_global = begin_global;
-  reader.begin_global_init_expr = begin_global_init_expr;
-  reader.end_global_init_expr = end_global_init_expr;
-
-  reader.on_export_count = on_export_count;
-  reader.on_export = on_export;
-
-  reader.on_start_function = on_start_function;
-
-  reader.on_function_bodies_count = on_function_bodies_count;
-  reader.begin_function_body = begin_function_body;
-  reader.on_local_decl = on_local_decl;
-  reader.on_binary_expr = on_binary_expr;
-  reader.on_block_expr = on_block_expr;
-  reader.on_br_expr = on_br_expr;
-  reader.on_br_if_expr = on_br_if_expr;
-  reader.on_br_table_expr = on_br_table_expr;
-  reader.on_call_expr = on_call_expr;
-  reader.on_call_indirect_expr = on_call_indirect_expr;
-  reader.on_compare_expr = on_compare_expr;
-  reader.on_convert_expr = on_convert_expr;
-  reader.on_current_memory_expr = on_current_memory_expr;
-  reader.on_drop_expr = on_drop_expr;
-  reader.on_else_expr = on_else_expr;
-  reader.on_end_expr = on_end_expr;
-  reader.on_f32_const_expr = on_f32_const_expr;
-  reader.on_f64_const_expr = on_f64_const_expr;
-  reader.on_get_global_expr = on_get_global_expr;
-  reader.on_get_local_expr = on_get_local_expr;
-  reader.on_grow_memory_expr = on_grow_memory_expr;
-  reader.on_i32_const_expr = on_i32_const_expr;
-  reader.on_i64_const_expr = on_i64_const_expr;
-  reader.on_if_expr = on_if_expr;
-  reader.on_load_expr = on_load_expr;
-  reader.on_loop_expr = on_loop_expr;
-  reader.on_nop_expr = on_nop_expr;
-  reader.on_return_expr = on_return_expr;
-  reader.on_select_expr = on_select_expr;
-  reader.on_set_global_expr = on_set_global_expr;
-  reader.on_set_local_expr = on_set_local_expr;
-  reader.on_store_expr = on_store_expr;
-  reader.on_tee_local_expr = on_tee_local_expr;
-  reader.on_unary_expr = on_unary_expr;
-  reader.on_unreachable_expr = on_unreachable_expr;
-  reader.end_function_body = end_function_body;
-
-  reader.on_elem_segment_count = on_elem_segment_count;
-  reader.begin_elem_segment = begin_elem_segment;
-  reader.begin_elem_segment_init_expr = begin_elem_segment_init_expr;
-  reader.end_elem_segment_init_expr = end_elem_segment_init_expr;
-  reader.on_elem_segment_function_index_count =
-      on_elem_segment_function_index_count;
-  reader.on_elem_segment_function_index = on_elem_segment_function_index;
-
-  reader.on_data_segment_count = on_data_segment_count;
-  reader.begin_data_segment = begin_data_segment;
-  reader.begin_data_segment_init_expr = begin_data_segment_init_expr;
-  reader.end_data_segment_init_expr = end_data_segment_init_expr;
-  reader.on_data_segment_data = on_data_segment_data;
-
-  reader.on_function_names_count = on_function_names_count;
-  reader.on_function_name = on_function_name;
-  reader.on_local_name_local_count = on_local_name_local_count;
-  reader.on_local_name = on_local_name;
-
-  reader.on_init_expr_f32_const_expr = on_init_expr_f32_const_expr;
-  reader.on_init_expr_f64_const_expr = on_init_expr_f64_const_expr;
-  reader.on_init_expr_get_global_expr = on_init_expr_get_global_expr;
-  reader.on_init_expr_i32_const_expr = on_init_expr_i32_const_expr;
-  reader.on_init_expr_i64_const_expr = on_init_expr_i64_const_expr;
-
-  Result result = read_binary(data, size, &reader, 1, options);
-  return result;
-}
-
-}  // namespace wabt
diff --git a/lib/wabt/src/binary-reader-interpreter.cc b/lib/wabt/src/binary-reader-interpreter.cc
index b8948c0..53e83c4 100644
--- a/lib/wabt/src/binary-reader-interpreter.cc
+++ b/lib/wabt/src/binary-reader-interpreter.cc
@@ -16,1494 +16,1455 @@
 
 #include "binary-reader-interpreter.h"
 
-#include <assert.h>
-#include <inttypes.h>
-#include <stdarg.h>
-#include <stdio.h>
-
+#include <cassert>
+#include <cinttypes>
+#include <cstdarg>
+#include <cstdio>
 #include <vector>
 
-#include "binary-reader.h"
+#include "binary-error-handler.h"
+#include "binary-reader-nop.h"
 #include "interpreter.h"
 #include "type-checker.h"
 #include "writer.h"
 
-#define CHECK_RESULT(expr)  \
-  do {                      \
-    if (WABT_FAILED(expr))  \
-      return Result::Error; \
-  } while (0)
-
-#define CHECK_LOCAL(ctx, local_index)                                       \
-  do {                                                                      \
-    uint32_t max_local_index =                                              \
-        (ctx)->current_func->param_and_local_types.size();                  \
-    if ((local_index) >= max_local_index) {                                 \
-      print_error((ctx), "invalid local_index: %d (max %d)", (local_index), \
-                  max_local_index);                                         \
-      return Result::Error;                                                 \
-    }                                                                       \
-  } while (0)
-
-#define CHECK_GLOBAL(ctx, global_index)                                       \
-  do {                                                                        \
-    uint32_t max_global_index = (ctx)->global_index_mapping.size();           \
-    if ((global_index) >= max_global_index) {                                 \
-      print_error((ctx), "invalid global_index: %d (max %d)", (global_index), \
-                  max_global_index);                                          \
-      return Result::Error;                                                   \
-    }                                                                         \
+#define CHECK_RESULT(expr)        \
+  do {                            \
+    if (WABT_FAILED(expr))        \
+      return wabt::Result::Error; \
   } while (0)
 
 namespace wabt {
 
+using namespace interpreter;
+
 namespace {
 
-typedef std::vector<uint32_t> Uint32Vector;
-typedef std::vector<Uint32Vector> Uint32VectorVector;
+typedef std::vector<Index> IndexVector;
+typedef std::vector<IstreamOffset> IstreamOffsetVector;
+typedef std::vector<IstreamOffsetVector> IstreamOffsetVectorVector;
 
 struct Label {
-  Label(uint32_t offset, uint32_t fixup_offset);
+  Label(IstreamOffset offset, IstreamOffset fixup_offset);
 
-  uint32_t offset; /* branch location in the istream */
-  uint32_t fixup_offset;
+  IstreamOffset offset;
+  IstreamOffset fixup_offset;
 };
 
-Label::Label(uint32_t offset, uint32_t fixup_offset)
+Label::Label(IstreamOffset offset, IstreamOffset fixup_offset)
     : offset(offset), fixup_offset(fixup_offset) {}
 
-struct Context {
-  Context();
+struct ElemSegmentInfo {
+  ElemSegmentInfo(Index* dst, Index func_index)
+      : dst(dst), func_index(func_index) {}
 
-  BinaryReader* reader = nullptr;
-  BinaryErrorHandler* error_handler = nullptr;
-  InterpreterEnvironment* env = nullptr;
-  DefinedInterpreterModule* module = nullptr;
-  DefinedInterpreterFunc* current_func = nullptr;
-  TypeChecker typechecker;
-  std::vector<Label> label_stack;
-  Uint32VectorVector func_fixups;
-  Uint32VectorVector depth_fixups;
-  MemoryWriter istream_writer;
-  uint32_t istream_offset = 0;
-  /* mappings from module index space to env index space; this won't just be a
-   * translation, because imported values will be resolved as well */
-  Uint32Vector sig_index_mapping;
-  Uint32Vector func_index_mapping;
-  Uint32Vector global_index_mapping;
-
-  uint32_t num_func_imports = 0;
-  uint32_t num_global_imports = 0;
-
-  /* values cached in the Context so they can be shared between callbacks */
-  InterpreterTypedValue init_expr_value;
-  uint32_t table_offset = 0;
-  bool is_host_import = false;
-  HostInterpreterModule* host_import_module = nullptr;
-  uint32_t import_env_index = 0;
+  Index* dst;
+  Index func_index;
 };
 
-Context::Context() {
-  WABT_ZERO_MEMORY(istream_writer);
+struct DataSegmentInfo {
+  DataSegmentInfo(void* dst_data, const void* src_data, IstreamOffset size)
+      : dst_data(dst_data), src_data(src_data), size(size) {}
+
+  void* dst_data;        // Not owned.
+  const void* src_data;  // Not owned.
+  IstreamOffset size;
+};
+
+class BinaryReaderInterpreter : public BinaryReaderNop {
+ public:
+  BinaryReaderInterpreter(Environment* env,
+                          DefinedModule* module,
+                          std::unique_ptr<OutputBuffer> istream,
+                          BinaryErrorHandler* error_handler);
+
+  wabt::Result ReadBinary(DefinedModule* out_module);
+
+  std::unique_ptr<OutputBuffer> ReleaseOutputBuffer();
+
+  // Implement BinaryReader.
+  bool OnError(const char* message) override;
+
+  wabt::Result EndModule() override;
+
+  wabt::Result OnTypeCount(Index count) override;
+  wabt::Result OnType(Index index,
+                      Index param_count,
+                      Type* param_types,
+                      Index result_count,
+                      Type* result_types) override;
+
+  wabt::Result OnImportCount(Index count) override;
+  wabt::Result OnImport(Index index,
+                        StringSlice module_name,
+                        StringSlice field_name) override;
+  wabt::Result OnImportFunc(Index import_index,
+                            StringSlice module_name,
+                            StringSlice field_name,
+                            Index func_index,
+                            Index sig_index) override;
+  wabt::Result OnImportTable(Index import_index,
+                             StringSlice module_name,
+                             StringSlice field_name,
+                             Index table_index,
+                             Type elem_type,
+                             const Limits* elem_limits) override;
+  wabt::Result OnImportMemory(Index import_index,
+                              StringSlice module_name,
+                              StringSlice field_name,
+                              Index memory_index,
+                              const Limits* page_limits) override;
+  wabt::Result OnImportGlobal(Index import_index,
+                              StringSlice module_name,
+                              StringSlice field_name,
+                              Index global_index,
+                              Type type,
+                              bool mutable_) override;
+
+  wabt::Result OnFunctionCount(Index count) override;
+  wabt::Result OnFunction(Index index, Index sig_index) override;
+
+  wabt::Result OnTable(Index index,
+                       Type elem_type,
+                       const Limits* elem_limits) override;
+
+  wabt::Result OnMemory(Index index, const Limits* limits) override;
+
+  wabt::Result OnGlobalCount(Index count) override;
+  wabt::Result BeginGlobal(Index index, Type type, bool mutable_) override;
+  wabt::Result EndGlobalInitExpr(Index index) override;
+
+  wabt::Result OnExport(Index index,
+                        ExternalKind kind,
+                        Index item_index,
+                        StringSlice name) override;
+
+  wabt::Result OnStartFunction(Index func_index) override;
+
+  wabt::Result BeginFunctionBody(Index index) override;
+  wabt::Result OnLocalDeclCount(Index count) override;
+  wabt::Result OnLocalDecl(Index decl_index, Index count, Type type) override;
+
+  wabt::Result OnBinaryExpr(wabt::Opcode opcode) override;
+  wabt::Result OnBlockExpr(Index num_types, Type* sig_types) override;
+  wabt::Result OnBrExpr(Index depth) override;
+  wabt::Result OnBrIfExpr(Index depth) override;
+  wabt::Result OnBrTableExpr(Index num_targets,
+                             Index* target_depths,
+                             Index default_target_depth) override;
+  wabt::Result OnCallExpr(Index func_index) override;
+  wabt::Result OnCallIndirectExpr(Index sig_index) override;
+  wabt::Result OnCompareExpr(wabt::Opcode opcode) override;
+  wabt::Result OnConvertExpr(wabt::Opcode opcode) override;
+  wabt::Result OnCurrentMemoryExpr() override;
+  wabt::Result OnDropExpr() override;
+  wabt::Result OnElseExpr() override;
+  wabt::Result OnEndExpr() override;
+  wabt::Result OnF32ConstExpr(uint32_t value_bits) override;
+  wabt::Result OnF64ConstExpr(uint64_t value_bits) override;
+  wabt::Result OnGetGlobalExpr(Index global_index) override;
+  wabt::Result OnGetLocalExpr(Index local_index) override;
+  wabt::Result OnGrowMemoryExpr() override;
+  wabt::Result OnI32ConstExpr(uint32_t value) override;
+  wabt::Result OnI64ConstExpr(uint64_t value) override;
+  wabt::Result OnIfExpr(Index num_types, Type* sig_types) override;
+  wabt::Result OnLoadExpr(wabt::Opcode opcode,
+                          uint32_t alignment_log2,
+                          Address offset) override;
+  wabt::Result OnLoopExpr(Index num_types, Type* sig_types) override;
+  wabt::Result OnNopExpr() override;
+  wabt::Result OnReturnExpr() override;
+  wabt::Result OnSelectExpr() override;
+  wabt::Result OnSetGlobalExpr(Index global_index) override;
+  wabt::Result OnSetLocalExpr(Index local_index) override;
+  wabt::Result OnStoreExpr(wabt::Opcode opcode,
+                           uint32_t alignment_log2,
+                           Address offset) override;
+  wabt::Result OnTeeLocalExpr(Index local_index) override;
+  wabt::Result OnUnaryExpr(wabt::Opcode opcode) override;
+  wabt::Result OnUnreachableExpr() override;
+  wabt::Result EndFunctionBody(Index index) override;
+
+  wabt::Result EndElemSegmentInitExpr(Index index) override;
+  wabt::Result OnElemSegmentFunctionIndex(Index index,
+                                          Index func_index) override;
+
+  wabt::Result OnDataSegmentData(Index index,
+                                 const void* data,
+                                 Address size) override;
+
+  wabt::Result OnInitExprF32ConstExpr(Index index, uint32_t value) override;
+  wabt::Result OnInitExprF64ConstExpr(Index index, uint64_t value) override;
+  wabt::Result OnInitExprGetGlobalExpr(Index index,
+                                       Index global_index) override;
+  wabt::Result OnInitExprI32ConstExpr(Index index, uint32_t value) override;
+  wabt::Result OnInitExprI64ConstExpr(Index index, uint64_t value) override;
+
+ private:
+  Label* GetLabel(Index depth);
+  Label* TopLabel();
+  void PushLabel(IstreamOffset offset, IstreamOffset fixup_offset);
+  void PopLabel();
+
+  bool HandleError(Offset offset, const char* message);
+  void PrintError(const char* format, ...);
+
+  Index TranslateSigIndexToEnv(Index sig_index);
+  FuncSignature* GetSignatureByModuleIndex(Index sig_index);
+  Index TranslateFuncIndexToEnv(Index func_index);
+  Index TranslateModuleFuncIndexToDefined(Index func_index);
+  Func* GetFuncByModuleIndex(Index func_index);
+  Index TranslateGlobalIndexToEnv(Index global_index);
+  Global* GetGlobalByModuleIndex(Index global_index);
+  Type GetGlobalTypeByModuleIndex(Index global_index);
+  Index TranslateLocalIndex(Index local_index);
+  Type GetLocalTypeByIndex(Func* func, Index local_index);
+
+  IstreamOffset GetIstreamOffset();
+
+  wabt::Result EmitDataAt(IstreamOffset offset,
+                          const void* data,
+                          IstreamOffset size);
+  wabt::Result EmitData(const void* data, IstreamOffset size);
+  wabt::Result EmitOpcode(wabt::Opcode opcode);
+  wabt::Result EmitOpcode(interpreter::Opcode opcode);
+  wabt::Result EmitI8(uint8_t value);
+  wabt::Result EmitI32(uint32_t value);
+  wabt::Result EmitI64(uint64_t value);
+  wabt::Result EmitI32At(IstreamOffset offset, uint32_t value);
+  wabt::Result EmitDropKeep(uint32_t drop, uint8_t keep);
+  wabt::Result AppendFixup(IstreamOffsetVectorVector* fixups_vector,
+                           Index index);
+  wabt::Result EmitBrOffset(Index depth, IstreamOffset offset);
+  wabt::Result GetBrDropKeepCount(Index depth,
+                                  Index* out_drop_count,
+                                  Index* out_keep_count);
+  wabt::Result GetReturnDropKeepCount(Index* out_drop_count,
+                                      Index* out_keep_count);
+  wabt::Result EmitBr(Index depth, Index drop_count, Index keep_count);
+  wabt::Result EmitBrTableOffset(Index depth);
+  wabt::Result FixupTopLabel();
+  wabt::Result EmitFuncOffset(DefinedFunc* func, Index func_index);
+
+  wabt::Result CheckLocal(Index local_index);
+  wabt::Result CheckGlobal(Index global_index);
+  wabt::Result CheckImportKind(Import* import, ExternalKind expected_kind);
+  wabt::Result CheckImportLimits(const Limits* declared_limits,
+                                 const Limits* actual_limits);
+  wabt::Result CheckHasMemory(wabt::Opcode opcode);
+  wabt::Result CheckAlign(uint32_t alignment_log2, Address natural_alignment);
+
+  wabt::Result AppendExport(Module* module,
+                            ExternalKind kind,
+                            Index item_index,
+                            StringSlice name);
+
+  HostImportDelegate::ErrorCallback MakePrintErrorCallback();
+
+  BinaryErrorHandler* error_handler = nullptr;
+  Environment* env = nullptr;
+  DefinedModule* module = nullptr;
+  DefinedFunc* current_func = nullptr;
+  TypeChecker typechecker;
+  std::vector<Label> label_stack;
+  IstreamOffsetVectorVector func_fixups;
+  IstreamOffsetVectorVector depth_fixups;
+  MemoryWriter istream_writer;
+  IstreamOffset istream_offset = 0;
+  /* mappings from module index space to env index space; this won't just be a
+   * translation, because imported values will be resolved as well */
+  IndexVector sig_index_mapping;
+  IndexVector func_index_mapping;
+  IndexVector global_index_mapping;
+
+  Index num_func_imports = 0;
+  Index num_global_imports = 0;
+
+  // Changes to linear memory and tables should not apply if a validation error
+  // occurs; these vectors cache the changes that must be applied after we know
+  // that there are no validation errors.
+  std::vector<ElemSegmentInfo> elem_segment_infos;
+  std::vector<DataSegmentInfo> data_segment_infos;
+
+  /* values cached so they can be shared between callbacks */
+  TypedValue init_expr_value;
+  IstreamOffset table_offset = 0;
+  bool is_host_import = false;
+  HostModule* host_import_module = nullptr;
+  Index import_env_index = 0;
+};
+
+BinaryReaderInterpreter::BinaryReaderInterpreter(
+    Environment* env,
+    DefinedModule* module,
+    std::unique_ptr<OutputBuffer> istream,
+    BinaryErrorHandler* error_handler)
+    : error_handler(error_handler),
+      env(env),
+      module(module),
+      istream_writer(std::move(istream)),
+      istream_offset(istream_writer.output_buffer().size()) {
+  typechecker.set_error_callback(
+      [this](const char* msg) { PrintError("%s", msg); });
 }
 
-}  // namespace
-
-static Label* get_label(Context* ctx, uint32_t depth) {
-  assert(depth < ctx->label_stack.size());
-  return &ctx->label_stack[ctx->label_stack.size() - depth - 1];
+std::unique_ptr<OutputBuffer> BinaryReaderInterpreter::ReleaseOutputBuffer() {
+  return istream_writer.ReleaseOutputBuffer();
 }
 
-static Label* top_label(Context* ctx) {
-  return get_label(ctx, 0);
+Label* BinaryReaderInterpreter::GetLabel(Index depth) {
+  assert(depth < label_stack.size());
+  return &label_stack[label_stack.size() - depth - 1];
 }
 
-static bool handle_error(uint32_t offset, const char* message, Context* ctx) {
-  if (ctx->error_handler->on_error) {
-    return ctx->error_handler->on_error(offset, message,
-                                        ctx->error_handler->user_data);
-  }
-  return false;
+Label* BinaryReaderInterpreter::TopLabel() {
+  return GetLabel(0);
 }
 
-static void WABT_PRINTF_FORMAT(2, 3)
-    print_error(Context* ctx, const char* format, ...) {
+bool BinaryReaderInterpreter::HandleError(Offset offset, const char* message) {
+  return error_handler->OnError(offset, message);
+}
+
+void WABT_PRINTF_FORMAT(2, 3)
+    BinaryReaderInterpreter::PrintError(const char* format, ...) {
   WABT_SNPRINTF_ALLOCA(buffer, length, format);
-  handle_error(WABT_INVALID_OFFSET, buffer, ctx);
+  HandleError(kInvalidOffset, buffer);
 }
 
-static void on_typechecker_error(const char* msg, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  print_error(ctx, "%s", msg);
+Index BinaryReaderInterpreter::TranslateSigIndexToEnv(Index sig_index) {
+  assert(sig_index < sig_index_mapping.size());
+  return sig_index_mapping[sig_index];
 }
 
-static uint32_t translate_sig_index_to_env(Context* ctx, uint32_t sig_index) {
-  assert(sig_index < ctx->sig_index_mapping.size());
-  return ctx->sig_index_mapping[sig_index];
+FuncSignature* BinaryReaderInterpreter::GetSignatureByModuleIndex(
+    Index sig_index) {
+  return env->GetFuncSignature(TranslateSigIndexToEnv(sig_index));
 }
 
-static InterpreterFuncSignature* get_signature_by_env_index(
-    Context* ctx,
-    uint32_t sig_index) {
-  return &ctx->env->sigs[sig_index];
+Index BinaryReaderInterpreter::TranslateFuncIndexToEnv(Index func_index) {
+  assert(func_index < func_index_mapping.size());
+  return func_index_mapping[func_index];
 }
 
-static InterpreterFuncSignature* get_signature_by_module_index(
-    Context* ctx,
-    uint32_t sig_index) {
-  return get_signature_by_env_index(ctx,
-                                    translate_sig_index_to_env(ctx, sig_index));
+Index BinaryReaderInterpreter::TranslateModuleFuncIndexToDefined(
+    Index func_index) {
+  assert(func_index >= num_func_imports);
+  return func_index - num_func_imports;
 }
 
-static uint32_t translate_func_index_to_env(Context* ctx, uint32_t func_index) {
-  assert(func_index < ctx->func_index_mapping.size());
-  return ctx->func_index_mapping[func_index];
+Func* BinaryReaderInterpreter::GetFuncByModuleIndex(Index func_index) {
+  return env->GetFunc(TranslateFuncIndexToEnv(func_index));
 }
 
-static uint32_t translate_module_func_index_to_defined(Context* ctx,
-                                                       uint32_t func_index) {
-  assert(func_index >= ctx->num_func_imports);
-  return func_index - ctx->num_func_imports;
+Index BinaryReaderInterpreter::TranslateGlobalIndexToEnv(Index global_index) {
+  return global_index_mapping[global_index];
 }
 
-static InterpreterFunc* get_func_by_env_index(Context* ctx,
-                                              uint32_t func_index) {
-  return ctx->env->funcs[func_index].get();
+Global* BinaryReaderInterpreter::GetGlobalByModuleIndex(Index global_index) {
+  return env->GetGlobal(TranslateGlobalIndexToEnv(global_index));
 }
 
-static InterpreterFunc* get_func_by_module_index(Context* ctx,
-                                                 uint32_t func_index) {
-  return get_func_by_env_index(ctx,
-                               translate_func_index_to_env(ctx, func_index));
+Type BinaryReaderInterpreter::GetGlobalTypeByModuleIndex(Index global_index) {
+  return GetGlobalByModuleIndex(global_index)->typed_value.type;
 }
 
-static uint32_t translate_global_index_to_env(Context* ctx,
-                                              uint32_t global_index) {
-  return ctx->global_index_mapping[global_index];
-}
-
-static InterpreterGlobal* get_global_by_env_index(Context* ctx,
-                                                  uint32_t global_index) {
-  return &ctx->env->globals[global_index];
-}
-
-static InterpreterGlobal* get_global_by_module_index(Context* ctx,
-                                                     uint32_t global_index) {
-  return get_global_by_env_index(
-      ctx, translate_global_index_to_env(ctx, global_index));
-}
-
-static Type get_global_type_by_module_index(Context* ctx,
-                                            uint32_t global_index) {
-  return get_global_by_module_index(ctx, global_index)->typed_value.type;
-}
-
-static Type get_local_type_by_index(InterpreterFunc* func,
-                                    uint32_t local_index) {
+Type BinaryReaderInterpreter::GetLocalTypeByIndex(Func* func,
+                                                  Index local_index) {
   assert(!func->is_host);
   return func->as_defined()->param_and_local_types[local_index];
 }
 
-static uint32_t get_istream_offset(Context* ctx) {
-  return ctx->istream_offset;
+IstreamOffset BinaryReaderInterpreter::GetIstreamOffset() {
+  return istream_offset;
 }
 
-static Result emit_data_at(Context* ctx,
-                           size_t offset,
-                           const void* data,
-                           size_t size) {
-  return ctx->istream_writer.base.write_data(
-      offset, data, size, ctx->istream_writer.base.user_data);
+wabt::Result BinaryReaderInterpreter::EmitDataAt(IstreamOffset offset,
+                                                 const void* data,
+                                                 IstreamOffset size) {
+  return istream_writer.WriteData(offset, data, size);
 }
 
-static Result emit_data(Context* ctx, const void* data, size_t size) {
-  CHECK_RESULT(emit_data_at(ctx, ctx->istream_offset, data, size));
-  ctx->istream_offset += size;
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::EmitData(const void* data,
+                                               IstreamOffset size) {
+  CHECK_RESULT(EmitDataAt(istream_offset, data, size));
+  istream_offset += size;
+  return wabt::Result::Ok;
 }
 
-static Result emit_opcode(Context* ctx, Opcode opcode) {
-  return emit_data(ctx, &opcode, sizeof(uint8_t));
+wabt::Result BinaryReaderInterpreter::EmitOpcode(wabt::Opcode opcode) {
+  return EmitData(&opcode, sizeof(uint8_t));
 }
 
-static Result emit_opcode(Context* ctx, InterpreterOpcode opcode) {
-  return emit_data(ctx, &opcode, sizeof(uint8_t));
+wabt::Result BinaryReaderInterpreter::EmitOpcode(interpreter::Opcode opcode) {
+  return EmitData(&opcode, sizeof(uint8_t));
 }
 
-static Result emit_i8(Context* ctx, uint8_t value) {
-  return emit_data(ctx, &value, sizeof(value));
+wabt::Result BinaryReaderInterpreter::EmitI8(uint8_t value) {
+  return EmitData(&value, sizeof(value));
 }
 
-static Result emit_i32(Context* ctx, uint32_t value) {
-  return emit_data(ctx, &value, sizeof(value));
+wabt::Result BinaryReaderInterpreter::EmitI32(uint32_t value) {
+  return EmitData(&value, sizeof(value));
 }
 
-static Result emit_i64(Context* ctx, uint64_t value) {
-  return emit_data(ctx, &value, sizeof(value));
+wabt::Result BinaryReaderInterpreter::EmitI64(uint64_t value) {
+  return EmitData(&value, sizeof(value));
 }
 
-static Result emit_i32_at(Context* ctx, uint32_t offset, uint32_t value) {
-  return emit_data_at(ctx, offset, &value, sizeof(value));
+wabt::Result BinaryReaderInterpreter::EmitI32At(IstreamOffset offset,
+                                                uint32_t value) {
+  return EmitDataAt(offset, &value, sizeof(value));
 }
 
-static Result emit_drop_keep(Context* ctx, uint32_t drop, uint8_t keep) {
+wabt::Result BinaryReaderInterpreter::EmitDropKeep(uint32_t drop,
+                                                   uint8_t keep) {
   assert(drop != UINT32_MAX);
   assert(keep <= 1);
   if (drop > 0) {
     if (drop == 1 && keep == 0) {
-      CHECK_RESULT(emit_opcode(ctx, InterpreterOpcode::Drop));
+      CHECK_RESULT(EmitOpcode(interpreter::Opcode::Drop));
     } else {
-      CHECK_RESULT(emit_opcode(ctx, InterpreterOpcode::DropKeep));
-      CHECK_RESULT(emit_i32(ctx, drop));
-      CHECK_RESULT(emit_i8(ctx, keep));
+      CHECK_RESULT(EmitOpcode(interpreter::Opcode::DropKeep));
+      CHECK_RESULT(EmitI32(drop));
+      CHECK_RESULT(EmitI8(keep));
     }
   }
-  return Result::Ok;
+  return wabt::Result::Ok;
 }
 
-static Result append_fixup(Context* ctx,
-                           Uint32VectorVector* fixups_vector,
-                           uint32_t index) {
+wabt::Result BinaryReaderInterpreter::AppendFixup(
+    IstreamOffsetVectorVector* fixups_vector,
+    Index index) {
   if (index >= fixups_vector->size())
     fixups_vector->resize(index + 1);
-  (*fixups_vector)[index].push_back(get_istream_offset(ctx));
-  return Result::Ok;
+  (*fixups_vector)[index].push_back(GetIstreamOffset());
+  return wabt::Result::Ok;
 }
 
-static Result emit_br_offset(Context* ctx, uint32_t depth, uint32_t offset) {
-  if (offset == WABT_INVALID_OFFSET) {
+wabt::Result BinaryReaderInterpreter::EmitBrOffset(Index depth,
+                                                   IstreamOffset offset) {
+  if (offset == kInvalidIstreamOffset) {
     /* depth_fixups stores the depth counting up from zero, where zero is the
      * top-level function scope. */
-    depth = ctx->label_stack.size() - 1 - depth;
-    CHECK_RESULT(append_fixup(ctx, &ctx->depth_fixups, depth));
+    depth = label_stack.size() - 1 - depth;
+    CHECK_RESULT(AppendFixup(&depth_fixups, depth));
   }
-  CHECK_RESULT(emit_i32(ctx, offset));
-  return Result::Ok;
+  CHECK_RESULT(EmitI32(offset));
+  return wabt::Result::Ok;
 }
 
-static Result get_br_drop_keep_count(Context* ctx,
-                                     uint32_t depth,
-                                     uint32_t* out_drop_count,
-                                     uint32_t* out_keep_count) {
-  TypeCheckerLabel* label;
-  CHECK_RESULT(typechecker_get_label(&ctx->typechecker, depth, &label));
+wabt::Result BinaryReaderInterpreter::GetBrDropKeepCount(
+    Index depth,
+    Index* out_drop_count,
+    Index* out_keep_count) {
+  TypeChecker::Label* label;
+  CHECK_RESULT(typechecker.GetLabel(depth, &label));
   *out_keep_count =
       label->label_type != LabelType::Loop ? label->sig.size() : 0;
-  if (typechecker_is_unreachable(&ctx->typechecker)) {
+  if (typechecker.IsUnreachable()) {
     *out_drop_count = 0;
   } else {
     *out_drop_count =
-        (ctx->typechecker.type_stack.size() - label->type_stack_limit) -
+        (typechecker.type_stack_size() - label->type_stack_limit) -
         *out_keep_count;
   }
-  return Result::Ok;
+  return wabt::Result::Ok;
 }
 
-static Result get_return_drop_keep_count(Context* ctx,
-                                         uint32_t* out_drop_count,
-                                         uint32_t* out_keep_count) {
-  if (WABT_FAILED(get_br_drop_keep_count(ctx, ctx->label_stack.size() - 1,
-                                         out_drop_count, out_keep_count))) {
-    return Result::Error;
+wabt::Result BinaryReaderInterpreter::GetReturnDropKeepCount(
+    Index* out_drop_count,
+    Index* out_keep_count) {
+  if (WABT_FAILED(GetBrDropKeepCount(label_stack.size() - 1, out_drop_count,
+                                     out_keep_count))) {
+    return wabt::Result::Error;
   }
 
-  *out_drop_count += ctx->current_func->param_and_local_types.size();
-  return Result::Ok;
+  *out_drop_count += current_func->param_and_local_types.size();
+  return wabt::Result::Ok;
 }
 
-static Result emit_br(Context* ctx,
-                      uint32_t depth,
-                      uint32_t drop_count,
-                      uint32_t keep_count) {
-  CHECK_RESULT(emit_drop_keep(ctx, drop_count, keep_count));
-  CHECK_RESULT(emit_opcode(ctx, InterpreterOpcode::Br));
-  CHECK_RESULT(emit_br_offset(ctx, depth, get_label(ctx, depth)->offset));
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::EmitBr(Index depth,
+                                             Index drop_count,
+                                             Index keep_count) {
+  CHECK_RESULT(EmitDropKeep(drop_count, keep_count));
+  CHECK_RESULT(EmitOpcode(interpreter::Opcode::Br));
+  CHECK_RESULT(EmitBrOffset(depth, GetLabel(depth)->offset));
+  return wabt::Result::Ok;
 }
 
-static Result emit_br_table_offset(Context* ctx, uint32_t depth) {
-  uint32_t drop_count, keep_count;
-  CHECK_RESULT(get_br_drop_keep_count(ctx, depth, &drop_count, &keep_count));
-  CHECK_RESULT(emit_br_offset(ctx, depth, get_label(ctx, depth)->offset));
-  CHECK_RESULT(emit_i32(ctx, drop_count));
-  CHECK_RESULT(emit_i8(ctx, keep_count));
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::EmitBrTableOffset(Index depth) {
+  Index drop_count, keep_count;
+  CHECK_RESULT(GetBrDropKeepCount(depth, &drop_count, &keep_count));
+  CHECK_RESULT(EmitBrOffset(depth, GetLabel(depth)->offset));
+  CHECK_RESULT(EmitI32(drop_count));
+  CHECK_RESULT(EmitI8(keep_count));
+  return wabt::Result::Ok;
 }
 
-static Result fixup_top_label(Context* ctx) {
-  uint32_t offset = get_istream_offset(ctx);
-  uint32_t top = ctx->label_stack.size() - 1;
-  if (top >= ctx->depth_fixups.size()) {
+wabt::Result BinaryReaderInterpreter::FixupTopLabel() {
+  IstreamOffset offset = GetIstreamOffset();
+  Index top = label_stack.size() - 1;
+  if (top >= depth_fixups.size()) {
     /* nothing to fixup */
-    return Result::Ok;
+    return wabt::Result::Ok;
   }
 
-  Uint32Vector& fixups = ctx->depth_fixups[top];
-  for (uint32_t fixup: fixups)
-    CHECK_RESULT(emit_i32_at(ctx, fixup, offset));
+  IstreamOffsetVector& fixups = depth_fixups[top];
+  for (IstreamOffset fixup : fixups)
+    CHECK_RESULT(EmitI32At(fixup, offset));
   fixups.clear();
-  return Result::Ok;
+  return wabt::Result::Ok;
 }
 
-static Result emit_func_offset(Context* ctx,
-                               DefinedInterpreterFunc* func,
-                               uint32_t func_index) {
-  if (func->offset == WABT_INVALID_OFFSET) {
-    uint32_t defined_index =
-        translate_module_func_index_to_defined(ctx, func_index);
-    CHECK_RESULT(append_fixup(ctx, &ctx->func_fixups, defined_index));
+wabt::Result BinaryReaderInterpreter::EmitFuncOffset(DefinedFunc* func,
+                                                     Index func_index) {
+  if (func->offset == kInvalidIstreamOffset) {
+    Index defined_index = TranslateModuleFuncIndexToDefined(func_index);
+    CHECK_RESULT(AppendFixup(&func_fixups, defined_index));
   }
-  CHECK_RESULT(emit_i32(ctx, func->offset));
-  return Result::Ok;
+  CHECK_RESULT(EmitI32(func->offset));
+  return wabt::Result::Ok;
 }
 
-static bool on_error(BinaryReaderContext* ctx, const char* message) {
-  return handle_error(ctx->offset, message,
-                      static_cast<Context*>(ctx->user_data));
+bool BinaryReaderInterpreter::OnError(const char* message) {
+  return HandleError(state->offset, message);
 }
 
-static Result on_signature_count(uint32_t count, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  ctx->sig_index_mapping.resize(count);
-  for (uint32_t i = 0; i < count; ++i)
-    ctx->sig_index_mapping[i] = ctx->env->sigs.size() + i;
-  ctx->env->sigs.resize(ctx->env->sigs.size() + count);
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::OnTypeCount(Index count) {
+  Index sig_count = env->GetFuncSignatureCount();
+  sig_index_mapping.resize(count);
+  for (Index i = 0; i < count; ++i)
+    sig_index_mapping[i] = sig_count + i;
+  return wabt::Result::Ok;
 }
 
-static Result on_signature(uint32_t index,
-                           uint32_t param_count,
-                           Type* param_types,
-                           uint32_t result_count,
-                           Type* result_types,
-                           void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  InterpreterFuncSignature* sig = get_signature_by_module_index(ctx, index);
-  sig->param_types.insert(sig->param_types.end(), param_types,
-                          param_types + param_count);
-  sig->result_types.insert(sig->result_types.end(), result_types,
-                           result_types + result_count);
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::OnType(Index index,
+                                             Index param_count,
+                                             Type* param_types,
+                                             Index result_count,
+                                             Type* result_types) {
+  assert(TranslateSigIndexToEnv(index) == env->GetFuncSignatureCount());
+  env->EmplaceBackFuncSignature(param_count, param_types, result_count,
+                                result_types);
+  return wabt::Result::Ok;
 }
 
-static Result on_import_count(uint32_t count, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  ctx->module->imports.resize(count);
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::OnImportCount(Index count) {
+  module->imports.resize(count);
+  return wabt::Result::Ok;
 }
 
-static Result on_import(uint32_t index,
-                        StringSlice module_name,
-                        StringSlice field_name,
-                        void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  InterpreterImport* import = &ctx->module->imports[index];
+wabt::Result BinaryReaderInterpreter::OnImport(Index index,
+                                               StringSlice module_name,
+                                               StringSlice field_name) {
+  Import* import = &module->imports[index];
   import->module_name = dup_string_slice(module_name);
   import->field_name = dup_string_slice(field_name);
-  int module_index =
-      ctx->env->registered_module_bindings.find_index(import->module_name);
-  if (module_index < 0) {
-    print_error(ctx, "unknown import module \"" PRIstringslice "\"",
-                WABT_PRINTF_STRING_SLICE_ARG(import->module_name));
-    return Result::Error;
+  Module* module = env->FindRegisteredModule(import->module_name);
+  if (!module) {
+    PrintError("unknown import module \"" PRIstringslice "\"",
+               WABT_PRINTF_STRING_SLICE_ARG(import->module_name));
+    return wabt::Result::Error;
   }
-
-  InterpreterModule* module = ctx->env->modules[module_index].get();
   if (module->is_host) {
     /* We don't yet know the kind of a host import module, so just assume it
      * exists for now. We'll fail later (in on_import_* below) if it doesn't
      * exist). */
-    ctx->is_host_import = true;
-    ctx->host_import_module = module->as_host();
+    is_host_import = true;
+    host_import_module = module->as_host();
   } else {
-    InterpreterExport* export_ =
-        get_interpreter_export_by_name(module, &import->field_name);
+    Export* export_ = module->GetExport(import->field_name);
     if (!export_) {
-      print_error(ctx, "unknown module field \"" PRIstringslice "\"",
-                  WABT_PRINTF_STRING_SLICE_ARG(import->field_name));
-      return Result::Error;
+      PrintError("unknown module field \"" PRIstringslice "\"",
+                 WABT_PRINTF_STRING_SLICE_ARG(import->field_name));
+      return wabt::Result::Error;
     }
 
     import->kind = export_->kind;
-    ctx->is_host_import = false;
-    ctx->import_env_index = export_->index;
+    is_host_import = false;
+    import_env_index = export_->index;
   }
-  return Result::Ok;
+  return wabt::Result::Ok;
 }
 
-static Result check_import_kind(Context* ctx,
-                                InterpreterImport* import,
-                                ExternalKind expected_kind) {
+wabt::Result BinaryReaderInterpreter::CheckLocal(Index local_index) {
+  Index max_local_index = current_func->param_and_local_types.size();
+  if (local_index >= max_local_index) {
+    PrintError("invalid local_index: %" PRIindex " (max %" PRIindex ")",
+               local_index, max_local_index);
+    return wabt::Result::Error;
+  }
+  return wabt::Result::Ok;
+}
+
+wabt::Result BinaryReaderInterpreter::CheckGlobal(Index global_index) {
+  Index max_global_index = global_index_mapping.size();
+  if (global_index >= max_global_index) {
+    PrintError("invalid global_index: %" PRIindex " (max %" PRIindex ")",
+               global_index, max_global_index);
+    return wabt::Result::Error;
+  }
+  return wabt::Result::Ok;
+}
+
+wabt::Result BinaryReaderInterpreter::CheckImportKind(
+    Import* import,
+    ExternalKind expected_kind) {
   if (import->kind != expected_kind) {
-    print_error(ctx, "expected import \"" PRIstringslice "." PRIstringslice
-                     "\" to have kind %s, not %s",
-                WABT_PRINTF_STRING_SLICE_ARG(import->module_name),
-                WABT_PRINTF_STRING_SLICE_ARG(import->field_name),
-                get_kind_name(expected_kind), get_kind_name(import->kind));
-    return Result::Error;
+    PrintError("expected import \"" PRIstringslice "." PRIstringslice
+               "\" to have kind %s, not %s",
+               WABT_PRINTF_STRING_SLICE_ARG(import->module_name),
+               WABT_PRINTF_STRING_SLICE_ARG(import->field_name),
+               get_kind_name(expected_kind), get_kind_name(import->kind));
+    return wabt::Result::Error;
   }
-  return Result::Ok;
+  return wabt::Result::Ok;
 }
 
-static Result check_import_limits(Context* ctx,
-                                  const Limits* declared_limits,
-                                  const Limits* actual_limits) {
+wabt::Result BinaryReaderInterpreter::CheckImportLimits(
+    const Limits* declared_limits,
+    const Limits* actual_limits) {
   if (actual_limits->initial < declared_limits->initial) {
-    print_error(ctx,
-                "actual size (%" PRIu64 ") smaller than declared (%" PRIu64 ")",
-                actual_limits->initial, declared_limits->initial);
-    return Result::Error;
+    PrintError("actual size (%" PRIu64 ") smaller than declared (%" PRIu64 ")",
+               actual_limits->initial, declared_limits->initial);
+    return wabt::Result::Error;
   }
 
   if (declared_limits->has_max) {
     if (!actual_limits->has_max) {
-      print_error(ctx,
-                  "max size (unspecified) larger than declared (%" PRIu64 ")",
-                  declared_limits->max);
-      return Result::Error;
+      PrintError("max size (unspecified) larger than declared (%" PRIu64 ")",
+                 declared_limits->max);
+      return wabt::Result::Error;
     } else if (actual_limits->max > declared_limits->max) {
-      print_error(ctx,
-                  "max size (%" PRIu64 ") larger than declared (%" PRIu64 ")",
-                  actual_limits->max, declared_limits->max);
-      return Result::Error;
+      PrintError("max size (%" PRIu64 ") larger than declared (%" PRIu64 ")",
+                 actual_limits->max, declared_limits->max);
+      return wabt::Result::Error;
     }
   }
 
-  return Result::Ok;
+  return wabt::Result::Ok;
 }
 
-static Result append_export(Context* ctx,
-                            InterpreterModule* module,
-                            ExternalKind kind,
-                            uint32_t item_index,
-                            StringSlice name) {
-  if (module->export_bindings.find_index(name) != -1) {
-    print_error(ctx, "duplicate export \"" PRIstringslice "\"",
-                WABT_PRINTF_STRING_SLICE_ARG(name));
-    return Result::Error;
+wabt::Result BinaryReaderInterpreter::AppendExport(Module* module,
+                                                   ExternalKind kind,
+                                                   Index item_index,
+                                                   StringSlice name) {
+  if (module->export_bindings.FindIndex(name) != kInvalidIndex) {
+    PrintError("duplicate export \"" PRIstringslice "\"",
+               WABT_PRINTF_STRING_SLICE_ARG(name));
+    return wabt::Result::Error;
   }
 
   module->exports.emplace_back(dup_string_slice(name), kind, item_index);
-  InterpreterExport* export_ = &module->exports.back();
+  Export* export_ = &module->exports.back();
 
   module->export_bindings.emplace(string_slice_to_string(export_->name),
                                   Binding(module->exports.size() - 1));
-  return Result::Ok;
+  return wabt::Result::Ok;
 }
 
-static void on_host_import_print_error(const char* msg, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  print_error(ctx, "%s", msg);
+HostImportDelegate::ErrorCallback
+BinaryReaderInterpreter::MakePrintErrorCallback() {
+  return [this](const char* msg) { PrintError("%s", msg); };
 }
 
-static PrintErrorCallback make_print_error_callback(Context* ctx) {
-  PrintErrorCallback result;
-  result.print_error = on_host_import_print_error;
-  result.user_data = ctx;
-  return result;
-}
+wabt::Result BinaryReaderInterpreter::OnImportFunc(Index import_index,
+                                                   StringSlice module_name,
+                                                   StringSlice field_name,
+                                                   Index func_index,
+                                                   Index sig_index) {
+  Import* import = &module->imports[import_index];
+  import->func.sig_index = TranslateSigIndexToEnv(sig_index);
 
-static Result on_import_func(uint32_t import_index,
-                             StringSlice module_name,
-                             StringSlice field_name,
-                             uint32_t func_index,
-                             uint32_t sig_index,
-                             void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  InterpreterImport* import = &ctx->module->imports[import_index];
-  import->func.sig_index = translate_sig_index_to_env(ctx, sig_index);
+  Index func_env_index;
+  if (is_host_import) {
+    HostFunc* func = new HostFunc(import->module_name, import->field_name,
+                                  import->func.sig_index);
+    env->EmplaceBackFunc(func);
 
-  uint32_t func_env_index;
-  if (ctx->is_host_import) {
-    HostInterpreterFunc* func = new HostInterpreterFunc(
-        import->module_name, import->field_name, import->func.sig_index);
-
-    ctx->env->funcs.emplace_back(func);
-
-    InterpreterHostImportDelegate* host_delegate =
-        &ctx->host_import_module->import_delegate;
-    InterpreterFuncSignature* sig = &ctx->env->sigs[func->sig_index];
-    CHECK_RESULT(host_delegate->import_func(import, func, sig,
-                                            make_print_error_callback(ctx),
-                                            host_delegate->user_data));
+    FuncSignature* sig = env->GetFuncSignature(func->sig_index);
+    CHECK_RESULT(host_import_module->import_delegate->ImportFunc(
+        import, func, sig, MakePrintErrorCallback()));
     assert(func->callback);
 
-    func_env_index = ctx->env->funcs.size() - 1;
-    append_export(ctx, ctx->host_import_module, ExternalKind::Func,
-                  func_env_index, import->field_name);
+    func_env_index = env->GetFuncCount() - 1;
+    AppendExport(host_import_module, ExternalKind::Func, func_env_index,
+                 import->field_name);
   } else {
-    CHECK_RESULT(check_import_kind(ctx, import, ExternalKind::Func));
-    InterpreterFunc* func = ctx->env->funcs[ctx->import_env_index].get();
-    if (!func_signatures_are_equal(ctx->env, import->func.sig_index,
-                                   func->sig_index)) {
-      print_error(ctx, "import signature mismatch");
-      return Result::Error;
+    CHECK_RESULT(CheckImportKind(import, ExternalKind::Func));
+    Func* func = env->GetFunc(import_env_index);
+    if (!env->FuncSignaturesAreEqual(import->func.sig_index, func->sig_index)) {
+      PrintError("import signature mismatch");
+      return wabt::Result::Error;
     }
 
-    func_env_index = ctx->import_env_index;
+    func_env_index = import_env_index;
   }
-  ctx->func_index_mapping.push_back(func_env_index);
-  ctx->num_func_imports++;
-  return Result::Ok;
+  func_index_mapping.push_back(func_env_index);
+  num_func_imports++;
+  return wabt::Result::Ok;
 }
 
-static Result on_import_table(uint32_t import_index,
-                              StringSlice module_name,
-                              StringSlice field_name,
-                              uint32_t table_index,
-                              Type elem_type,
-                              const Limits* elem_limits,
-                              void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  if (ctx->module->table_index != WABT_INVALID_INDEX) {
-    print_error(ctx, "only one table allowed");
-    return Result::Error;
+wabt::Result BinaryReaderInterpreter::OnImportTable(Index import_index,
+                                                    StringSlice module_name,
+                                                    StringSlice field_name,
+                                                    Index table_index,
+                                                    Type elem_type,
+                                                    const Limits* elem_limits) {
+  if (module->table_index != kInvalidIndex) {
+    PrintError("only one table allowed");
+    return wabt::Result::Error;
   }
 
-  InterpreterImport* import = &ctx->module->imports[import_index];
+  Import* import = &module->imports[import_index];
 
-  if (ctx->is_host_import) {
-    ctx->env->tables.emplace_back(*elem_limits);
-    InterpreterTable* table = &ctx->env->tables.back();
+  if (is_host_import) {
+    Table* table = env->EmplaceBackTable(*elem_limits);
 
-    InterpreterHostImportDelegate* host_delegate =
-        &ctx->host_import_module->import_delegate;
-    CHECK_RESULT(host_delegate->import_table(import, table,
-                                             make_print_error_callback(ctx),
-                                             host_delegate->user_data));
+    CHECK_RESULT(host_import_module->import_delegate->ImportTable(
+        import, table, MakePrintErrorCallback()));
 
-    CHECK_RESULT(check_import_limits(ctx, elem_limits, &table->limits));
+    CHECK_RESULT(CheckImportLimits(elem_limits, &table->limits));
 
-    ctx->module->table_index = ctx->env->tables.size() - 1;
-    append_export(ctx, ctx->host_import_module, ExternalKind::Table,
-                  ctx->module->table_index, import->field_name);
+    module->table_index = env->GetTableCount() - 1;
+    AppendExport(host_import_module, ExternalKind::Table, module->table_index,
+                 import->field_name);
   } else {
-    CHECK_RESULT(check_import_kind(ctx, import, ExternalKind::Table));
-    InterpreterTable* table = &ctx->env->tables[ctx->import_env_index];
-    CHECK_RESULT(check_import_limits(ctx, elem_limits, &table->limits));
+    CHECK_RESULT(CheckImportKind(import, ExternalKind::Table));
+    Table* table = env->GetTable(import_env_index);
+    CHECK_RESULT(CheckImportLimits(elem_limits, &table->limits));
 
     import->table.limits = *elem_limits;
-    ctx->module->table_index = ctx->import_env_index;
+    module->table_index = import_env_index;
   }
-  return Result::Ok;
+  return wabt::Result::Ok;
 }
 
-static Result on_import_memory(uint32_t import_index,
-                               StringSlice module_name,
-                               StringSlice field_name,
-                               uint32_t memory_index,
-                               const Limits* page_limits,
-                               void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  if (ctx->module->memory_index != WABT_INVALID_INDEX) {
-    print_error(ctx, "only one memory allowed");
-    return Result::Error;
+wabt::Result BinaryReaderInterpreter::OnImportMemory(
+    Index import_index,
+    StringSlice module_name,
+    StringSlice field_name,
+    Index memory_index,
+    const Limits* page_limits) {
+  if (module->memory_index != kInvalidIndex) {
+    PrintError("only one memory allowed");
+    return wabt::Result::Error;
   }
 
-  InterpreterImport* import = &ctx->module->imports[import_index];
+  Import* import = &module->imports[import_index];
 
-  if (ctx->is_host_import) {
-    ctx->env->memories.emplace_back();
-    InterpreterMemory* memory = &ctx->env->memories.back();
+  if (is_host_import) {
+    Memory* memory = env->EmplaceBackMemory();
 
-    InterpreterHostImportDelegate* host_delegate =
-        &ctx->host_import_module->import_delegate;
-    CHECK_RESULT(host_delegate->import_memory(import, memory,
-                                              make_print_error_callback(ctx),
-                                              host_delegate->user_data));
+    CHECK_RESULT(host_import_module->import_delegate->ImportMemory(
+        import, memory, MakePrintErrorCallback()));
 
-    CHECK_RESULT(check_import_limits(ctx, page_limits, &memory->page_limits));
+    CHECK_RESULT(CheckImportLimits(page_limits, &memory->page_limits));
 
-    ctx->module->memory_index = ctx->env->memories.size() - 1;
-    append_export(ctx, ctx->host_import_module, ExternalKind::Memory,
-                  ctx->module->memory_index, import->field_name);
+    module->memory_index = env->GetMemoryCount() - 1;
+    AppendExport(host_import_module, ExternalKind::Memory, module->memory_index,
+                 import->field_name);
   } else {
-    CHECK_RESULT(check_import_kind(ctx, import, ExternalKind::Memory));
-    InterpreterMemory* memory = &ctx->env->memories[ctx->import_env_index];
-    CHECK_RESULT(check_import_limits(ctx, page_limits, &memory->page_limits));
+    CHECK_RESULT(CheckImportKind(import, ExternalKind::Memory));
+    Memory* memory = env->GetMemory(import_env_index);
+    CHECK_RESULT(CheckImportLimits(page_limits, &memory->page_limits));
 
     import->memory.limits = *page_limits;
-    ctx->module->memory_index = ctx->import_env_index;
+    module->memory_index = import_env_index;
   }
-  return Result::Ok;
+  return wabt::Result::Ok;
 }
 
-static Result on_import_global(uint32_t import_index,
-                               StringSlice module_name,
-                               StringSlice field_name,
-                               uint32_t global_index,
-                               Type type,
-                               bool mutable_,
-                               void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  InterpreterImport* import = &ctx->module->imports[import_index];
+wabt::Result BinaryReaderInterpreter::OnImportGlobal(Index import_index,
+                                                     StringSlice module_name,
+                                                     StringSlice field_name,
+                                                     Index global_index,
+                                                     Type type,
+                                                     bool mutable_) {
+  Import* import = &module->imports[import_index];
 
-  uint32_t global_env_index = ctx->env->globals.size() - 1;
-  if (ctx->is_host_import) {
-    ctx->env->globals.emplace_back(InterpreterTypedValue(type), mutable_);
-    InterpreterGlobal* global = &ctx->env->globals.back();
+  Index global_env_index = env->GetGlobalCount() - 1;
+  if (is_host_import) {
+    Global* global = env->EmplaceBackGlobal(TypedValue(type), mutable_);
 
-    InterpreterHostImportDelegate* host_delegate =
-        &ctx->host_import_module->import_delegate;
-    CHECK_RESULT(host_delegate->import_global(import, global,
-                                              make_print_error_callback(ctx),
-                                              host_delegate->user_data));
+    CHECK_RESULT(host_import_module->import_delegate->ImportGlobal(
+        import, global, MakePrintErrorCallback()));
 
-    global_env_index = ctx->env->globals.size() - 1;
-    append_export(ctx, ctx->host_import_module, ExternalKind::Global,
-                  global_env_index, import->field_name);
+    global_env_index = env->GetGlobalCount() - 1;
+    AppendExport(host_import_module, ExternalKind::Global, global_env_index,
+                 import->field_name);
   } else {
-    CHECK_RESULT(check_import_kind(ctx, import, ExternalKind::Global));
+    CHECK_RESULT(CheckImportKind(import, ExternalKind::Global));
     // TODO: check type and mutability
     import->global.type = type;
     import->global.mutable_ = mutable_;
-    global_env_index = ctx->import_env_index;
+    global_env_index = import_env_index;
   }
-  ctx->global_index_mapping.push_back(global_env_index);
-  ctx->num_global_imports++;
-  return Result::Ok;
+  global_index_mapping.push_back(global_env_index);
+  num_global_imports++;
+  return wabt::Result::Ok;
 }
 
-static Result on_function_signatures_count(uint32_t count, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  for (uint32_t i = 0; i < count; ++i)
-    ctx->func_index_mapping.push_back(ctx->env->funcs.size() + i);
-  ctx->env->funcs.reserve(ctx->env->funcs.size() + count);
-  ctx->func_fixups.resize(count);
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::OnFunctionCount(Index count) {
+  for (Index i = 0; i < count; ++i)
+    func_index_mapping.push_back(env->GetFuncCount() + i);
+  func_fixups.resize(count);
+  return wabt::Result::Ok;
 }
 
-static Result on_function_signature(uint32_t index,
-                                    uint32_t sig_index,
-                                    void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  DefinedInterpreterFunc* func =
-      new DefinedInterpreterFunc(translate_sig_index_to_env(ctx, sig_index));
-  ctx->env->funcs.emplace_back(func);
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::OnFunction(Index index, Index sig_index) {
+  env->EmplaceBackFunc(new DefinedFunc(TranslateSigIndexToEnv(sig_index)));
+  return wabt::Result::Ok;
 }
 
-static Result on_table(uint32_t index,
-                       Type elem_type,
-                       const Limits* elem_limits,
-                       void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  if (ctx->module->table_index != WABT_INVALID_INDEX) {
-    print_error(ctx, "only one table allowed");
-    return Result::Error;
+wabt::Result BinaryReaderInterpreter::OnTable(Index index,
+                                              Type elem_type,
+                                              const Limits* elem_limits) {
+  if (module->table_index != kInvalidIndex) {
+    PrintError("only one table allowed");
+    return wabt::Result::Error;
   }
-  ctx->env->tables.emplace_back(*elem_limits);
-  ctx->module->table_index = ctx->env->tables.size() - 1;
-  return Result::Ok;
+  env->EmplaceBackTable(*elem_limits);
+  module->table_index = env->GetTableCount() - 1;
+  return wabt::Result::Ok;
 }
 
-static Result on_memory(uint32_t index,
-                        const Limits* page_limits,
-                        void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  if (ctx->module->memory_index != WABT_INVALID_INDEX) {
-    print_error(ctx, "only one memory allowed");
-    return Result::Error;
+wabt::Result BinaryReaderInterpreter::OnMemory(Index index,
+                                               const Limits* page_limits) {
+  if (module->memory_index != kInvalidIndex) {
+    PrintError("only one memory allowed");
+    return wabt::Result::Error;
   }
-  ctx->env->memories.emplace_back(*page_limits);
-  ctx->module->memory_index = ctx->env->memories.size() - 1;
-  return Result::Ok;
+  env->EmplaceBackMemory(*page_limits);
+  module->memory_index = env->GetMemoryCount() - 1;
+  return wabt::Result::Ok;
 }
 
-static Result on_global_count(uint32_t count, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  for (uint32_t i = 0; i < count; ++i)
-    ctx->global_index_mapping.push_back(ctx->env->globals.size() + i);
-  ctx->env->globals.resize(ctx->env->globals.size() + count);
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::OnGlobalCount(Index count) {
+  for (Index i = 0; i < count; ++i)
+    global_index_mapping.push_back(env->GetGlobalCount() + i);
+  return wabt::Result::Ok;
 }
 
-static Result begin_global(uint32_t index,
-                           Type type,
-                           bool mutable_,
-                           void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  InterpreterGlobal* global = get_global_by_module_index(ctx, index);
-  global->typed_value.type = type;
-  global->mutable_ = mutable_;
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::BeginGlobal(Index index,
+                                                  Type type,
+                                                  bool mutable_) {
+  assert(TranslateGlobalIndexToEnv(index) == env->GetGlobalCount());
+  env->EmplaceBackGlobal(TypedValue(type), mutable_);
+  init_expr_value.type = Type::Void;
+  return wabt::Result::Ok;
 }
 
-static Result end_global_init_expr(uint32_t index, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  InterpreterGlobal* global = get_global_by_module_index(ctx, index);
-  if (ctx->init_expr_value.type != global->typed_value.type) {
-    print_error(ctx, "type mismatch in global, expected %s but got %s.",
-                get_type_name(global->typed_value.type),
-                get_type_name(ctx->init_expr_value.type));
-    return Result::Error;
+wabt::Result BinaryReaderInterpreter::EndGlobalInitExpr(Index index) {
+  Global* global = GetGlobalByModuleIndex(index);
+  if (init_expr_value.type != global->typed_value.type) {
+    PrintError("type mismatch in global, expected %s but got %s.",
+               get_type_name(global->typed_value.type),
+               get_type_name(init_expr_value.type));
+    return wabt::Result::Error;
   }
-  global->typed_value = ctx->init_expr_value;
-  return Result::Ok;
+  global->typed_value = init_expr_value;
+  return wabt::Result::Ok;
 }
 
-static Result on_init_expr_f32_const_expr(uint32_t index,
-                                          uint32_t value_bits,
-                                          void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  ctx->init_expr_value.type = Type::F32;
-  ctx->init_expr_value.value.f32_bits = value_bits;
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::OnInitExprF32ConstExpr(
+    Index index,
+    uint32_t value_bits) {
+  init_expr_value.type = Type::F32;
+  init_expr_value.value.f32_bits = value_bits;
+  return wabt::Result::Ok;
 }
 
-static Result on_init_expr_f64_const_expr(uint32_t index,
-                                          uint64_t value_bits,
-                                          void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  ctx->init_expr_value.type = Type::F64;
-  ctx->init_expr_value.value.f64_bits = value_bits;
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::OnInitExprF64ConstExpr(
+    Index index,
+    uint64_t value_bits) {
+  init_expr_value.type = Type::F64;
+  init_expr_value.value.f64_bits = value_bits;
+  return wabt::Result::Ok;
 }
 
-static Result on_init_expr_get_global_expr(uint32_t index,
-                                           uint32_t global_index,
-                                           void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  if (global_index >= ctx->num_global_imports) {
-    print_error(ctx,
-                "initializer expression can only reference an imported global");
-    return Result::Error;
+wabt::Result BinaryReaderInterpreter::OnInitExprGetGlobalExpr(
+    Index index,
+    Index global_index) {
+  if (global_index >= num_global_imports) {
+    PrintError("initializer expression can only reference an imported global");
+    return wabt::Result::Error;
   }
-  InterpreterGlobal* ref_global = get_global_by_module_index(ctx, global_index);
+  Global* ref_global = GetGlobalByModuleIndex(global_index);
   if (ref_global->mutable_) {
-    print_error(ctx,
-                "initializer expression cannot reference a mutable global");
-    return Result::Error;
+    PrintError("initializer expression cannot reference a mutable global");
+    return wabt::Result::Error;
   }
-  ctx->init_expr_value = ref_global->typed_value;
-  return Result::Ok;
+  init_expr_value = ref_global->typed_value;
+  return wabt::Result::Ok;
 }
 
-static Result on_init_expr_i32_const_expr(uint32_t index,
-                                          uint32_t value,
-                                          void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  ctx->init_expr_value.type = Type::I32;
-  ctx->init_expr_value.value.i32 = value;
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::OnInitExprI32ConstExpr(Index index,
+                                                             uint32_t value) {
+  init_expr_value.type = Type::I32;
+  init_expr_value.value.i32 = value;
+  return wabt::Result::Ok;
 }
 
-static Result on_init_expr_i64_const_expr(uint32_t index,
-                                          uint64_t value,
-                                          void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  ctx->init_expr_value.type = Type::I64;
-  ctx->init_expr_value.value.i64 = value;
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::OnInitExprI64ConstExpr(Index index,
+                                                             uint64_t value) {
+  init_expr_value.type = Type::I64;
+  init_expr_value.value.i64 = value;
+  return wabt::Result::Ok;
 }
 
-static Result on_export(uint32_t index,
-                        ExternalKind kind,
-                        uint32_t item_index,
-                        StringSlice name,
-                        void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
+wabt::Result BinaryReaderInterpreter::OnExport(Index index,
+                                               ExternalKind kind,
+                                               Index item_index,
+                                               StringSlice name) {
   switch (kind) {
     case ExternalKind::Func:
-      item_index = translate_func_index_to_env(ctx, item_index);
+      item_index = TranslateFuncIndexToEnv(item_index);
       break;
 
     case ExternalKind::Table:
-      item_index = ctx->module->table_index;
+      item_index = module->table_index;
       break;
 
     case ExternalKind::Memory:
-      item_index = ctx->module->memory_index;
+      item_index = module->memory_index;
       break;
 
     case ExternalKind::Global: {
-      item_index = translate_global_index_to_env(ctx, item_index);
-      InterpreterGlobal* global = &ctx->env->globals[item_index];
+      item_index = TranslateGlobalIndexToEnv(item_index);
+      Global* global = env->GetGlobal(item_index);
       if (global->mutable_) {
-        print_error(ctx, "mutable globals cannot be exported");
-        return Result::Error;
+        PrintError("mutable globals cannot be exported");
+        return wabt::Result::Error;
       }
       break;
     }
+
+    case ExternalKind::Except:
+      // TODO(karlschimpf) Define
+      WABT_FATAL("BinaryReaderInterpreter::OnExport(except) not implemented");
+      break;
   }
-  return append_export(ctx, ctx->module, kind, item_index, name);
+  return AppendExport(module, kind, item_index, name);
 }
 
-static Result on_start_function(uint32_t func_index, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  uint32_t start_func_index = translate_func_index_to_env(ctx, func_index);
-  InterpreterFunc* start_func = get_func_by_env_index(ctx, start_func_index);
-  InterpreterFuncSignature* sig =
-      get_signature_by_env_index(ctx, start_func->sig_index);
+wabt::Result BinaryReaderInterpreter::OnStartFunction(Index func_index) {
+  Index start_func_index = TranslateFuncIndexToEnv(func_index);
+  Func* start_func = env->GetFunc(start_func_index);
+  FuncSignature* sig = env->GetFuncSignature(start_func->sig_index);
   if (sig->param_types.size() != 0) {
-    print_error(ctx, "start function must be nullary");
-    return Result::Error;
+    PrintError("start function must be nullary");
+    return wabt::Result::Error;
   }
   if (sig->result_types.size() != 0) {
-    print_error(ctx, "start function must not return anything");
-    return Result::Error;
+    PrintError("start function must not return anything");
+    return wabt::Result::Error;
   }
-  ctx->module->start_func_index = start_func_index;
-  return Result::Ok;
+  module->start_func_index = start_func_index;
+  return wabt::Result::Ok;
 }
 
-static Result end_elem_segment_init_expr(uint32_t index, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  if (ctx->init_expr_value.type != Type::I32) {
-    print_error(ctx, "type mismatch in elem segment, expected i32 but got %s",
-                get_type_name(ctx->init_expr_value.type));
-    return Result::Error;
+wabt::Result BinaryReaderInterpreter::EndElemSegmentInitExpr(Index index) {
+  if (init_expr_value.type != Type::I32) {
+    PrintError("type mismatch in elem segment, expected i32 but got %s",
+               get_type_name(init_expr_value.type));
+    return wabt::Result::Error;
   }
-  ctx->table_offset = ctx->init_expr_value.value.i32;
-  return Result::Ok;
+  table_offset = init_expr_value.value.i32;
+  return wabt::Result::Ok;
 }
 
-static Result on_elem_segment_function_index_check(uint32_t index,
-                                                   uint32_t func_index,
-                                                   void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  assert(ctx->module->table_index != WABT_INVALID_INDEX);
-  InterpreterTable* table = &ctx->env->tables[ctx->module->table_index];
-  if (ctx->table_offset >= table->func_indexes.size()) {
-    print_error(ctx,
-                "elem segment offset is out of bounds: %u >= max value %" PRIzd,
-                ctx->table_offset, table->func_indexes.size());
-    return Result::Error;
+wabt::Result BinaryReaderInterpreter::OnElemSegmentFunctionIndex(
+    Index index,
+    Index func_index) {
+  assert(module->table_index != kInvalidIndex);
+  Table* table = env->GetTable(module->table_index);
+  if (table_offset >= table->func_indexes.size()) {
+    PrintError("elem segment offset is out of bounds: %u >= max value %" PRIzd,
+               table_offset, table->func_indexes.size());
+    return wabt::Result::Error;
   }
 
-  uint32_t max_func_index = ctx->func_index_mapping.size();
+  Index max_func_index = func_index_mapping.size();
   if (func_index >= max_func_index) {
-    print_error(ctx, "invalid func_index: %d (max %d)", func_index,
-                max_func_index);
-    return Result::Error;
+    PrintError("invalid func_index: %" PRIindex " (max %" PRIindex ")",
+               func_index, max_func_index);
+    return wabt::Result::Error;
   }
 
-  return Result::Ok;
+  elem_segment_infos.emplace_back(&table->func_indexes[table_offset++],
+                                  TranslateFuncIndexToEnv(func_index));
+  return wabt::Result::Ok;
 }
 
-static Result on_elem_segment_function_index(uint32_t index,
-                                             uint32_t func_index,
-                                             void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  assert(ctx->module->table_index != WABT_INVALID_INDEX);
-  InterpreterTable* table = &ctx->env->tables[ctx->module->table_index];
-  table->func_indexes[ctx->table_offset++] =
-      translate_func_index_to_env(ctx, func_index);
-  return Result::Ok;
-}
-
-static Result on_data_segment_data_check(uint32_t index,
-                                         const void* src_data,
-                                         uint32_t size,
-                                         void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  assert(ctx->module->memory_index != WABT_INVALID_INDEX);
-  InterpreterMemory* memory = &ctx->env->memories[ctx->module->memory_index];
-  if (ctx->init_expr_value.type != Type::I32) {
-    print_error(ctx, "type mismatch in data segment, expected i32 but got %s",
-                get_type_name(ctx->init_expr_value.type));
-    return Result::Error;
+wabt::Result BinaryReaderInterpreter::OnDataSegmentData(Index index,
+                                                        const void* src_data,
+                                                        Address size) {
+  assert(module->memory_index != kInvalidIndex);
+  Memory* memory = env->GetMemory(module->memory_index);
+  if (init_expr_value.type != Type::I32) {
+    PrintError("type mismatch in data segment, expected i32 but got %s",
+               get_type_name(init_expr_value.type));
+    return wabt::Result::Error;
   }
-  uint32_t address = ctx->init_expr_value.value.i32;
+  Address address = init_expr_value.value.i32;
   uint64_t end_address =
       static_cast<uint64_t>(address) + static_cast<uint64_t>(size);
   if (end_address > memory->data.size()) {
-    print_error(ctx,
-                "data segment is out of bounds: [%u, %" PRIu64
-                ") >= max value %" PRIzd,
-                address, end_address, memory->data.size());
-    return Result::Error;
+    PrintError("data segment is out of bounds: [%" PRIaddress ", %" PRIu64
+               ") >= max value %" PRIzd,
+               address, end_address, memory->data.size());
+    return wabt::Result::Error;
   }
-  return Result::Ok;
+
+  if (size > 0)
+    data_segment_infos.emplace_back(&memory->data[address], src_data, size);
+
+  return wabt::Result::Ok;
 }
 
-static Result on_data_segment_data(uint32_t index,
-                                   const void* src_data,
-                                   uint32_t size,
-                                   void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  if (size > 0) {
-    assert(ctx->module->memory_index != WABT_INVALID_INDEX);
-    InterpreterMemory* memory = &ctx->env->memories[ctx->module->memory_index];
-    uint32_t address = ctx->init_expr_value.value.i32;
-    memcpy(&memory->data[address], src_data, size);
-  }
-  return Result::Ok;
+void BinaryReaderInterpreter::PushLabel(IstreamOffset offset,
+                                        IstreamOffset fixup_offset) {
+  label_stack.emplace_back(offset, fixup_offset);
 }
 
-static void push_label(Context* ctx, uint32_t offset, uint32_t fixup_offset) {
-  ctx->label_stack.emplace_back(offset, fixup_offset);
-}
-
-static void pop_label(Context* ctx) {
-  ctx->label_stack.pop_back();
+void BinaryReaderInterpreter::PopLabel() {
+  label_stack.pop_back();
   /* reduce the depth_fixups stack as well, but it may be smaller than
    * label_stack so only do it conditionally. */
-  if (ctx->depth_fixups.size() > ctx->label_stack.size()) {
-    ctx->depth_fixups.erase(ctx->depth_fixups.begin() + ctx->label_stack.size(),
-                            ctx->depth_fixups.end());
+  if (depth_fixups.size() > label_stack.size()) {
+    depth_fixups.erase(depth_fixups.begin() + label_stack.size(),
+                       depth_fixups.end());
   }
 }
 
-// TODO(binji): remove this when the rest of the code is using std::vector
-#define INTERPRETER_TYPE_VECTOR_TO_TYPE_VECTOR(out, in)                \
-  TypeVector out;                                                      \
-  {                                                                    \
-    size_t byte_size = (in).size() * sizeof((in)[0]);                  \
-    (out).data = static_cast<decltype((out).data)>(alloca(byte_size)); \
-    (out).size = (in).size();                                          \
-    if (byte_size) {                                                   \
-      memcpy((out).data, (in).data(), byte_size);                      \
-    }                                                                  \
-  }
+wabt::Result BinaryReaderInterpreter::BeginFunctionBody(Index index) {
+  DefinedFunc* func = GetFuncByModuleIndex(index)->as_defined();
+  FuncSignature* sig = env->GetFuncSignature(func->sig_index);
 
-static Result begin_function_body(BinaryReaderContext* context,
-                                  uint32_t index) {
-  Context* ctx = static_cast<Context*>(context->user_data);
-  DefinedInterpreterFunc* func =
-      get_func_by_module_index(ctx, index)->as_defined();
-  InterpreterFuncSignature* sig =
-      get_signature_by_env_index(ctx, func->sig_index);
-
-  func->offset = get_istream_offset(ctx);
+  func->offset = GetIstreamOffset();
   func->local_decl_count = 0;
   func->local_count = 0;
 
-  ctx->current_func = func;
-  ctx->depth_fixups.clear();
-  ctx->label_stack.clear();
+  current_func = func;
+  depth_fixups.clear();
+  label_stack.clear();
 
   /* fixup function references */
-  uint32_t defined_index = translate_module_func_index_to_defined(ctx, index);
-  Uint32Vector& fixups = ctx->func_fixups[defined_index];
-  for (uint32_t fixup: fixups)
-    CHECK_RESULT(emit_i32_at(ctx, fixup, func->offset));
+  Index defined_index = TranslateModuleFuncIndexToDefined(index);
+  IstreamOffsetVector& fixups = func_fixups[defined_index];
+  for (IstreamOffset fixup : fixups)
+    CHECK_RESULT(EmitI32At(fixup, func->offset));
 
   /* append param types */
-  for (Type param_type: sig->param_types)
+  for (Type param_type : sig->param_types)
     func->param_and_local_types.push_back(param_type);
 
-  CHECK_RESULT(
-      typechecker_begin_function(&ctx->typechecker, &sig->result_types));
+  CHECK_RESULT(typechecker.BeginFunction(&sig->result_types));
 
   /* push implicit func label (equivalent to return) */
-  push_label(ctx, WABT_INVALID_OFFSET, WABT_INVALID_OFFSET);
-  return Result::Ok;
+  PushLabel(kInvalidIstreamOffset, kInvalidIstreamOffset);
+  return wabt::Result::Ok;
 }
 
-static Result end_function_body(uint32_t index, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  fixup_top_label(ctx);
-  uint32_t drop_count, keep_count;
-  CHECK_RESULT(get_return_drop_keep_count(ctx, &drop_count, &keep_count));
-  CHECK_RESULT(typechecker_end_function(&ctx->typechecker));
-  CHECK_RESULT(emit_drop_keep(ctx, drop_count, keep_count));
-  CHECK_RESULT(emit_opcode(ctx, InterpreterOpcode::Return));
-  pop_label(ctx);
-  ctx->current_func = nullptr;
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::EndFunctionBody(Index index) {
+  FixupTopLabel();
+  Index drop_count, keep_count;
+  CHECK_RESULT(GetReturnDropKeepCount(&drop_count, &keep_count));
+  CHECK_RESULT(typechecker.EndFunction());
+  CHECK_RESULT(EmitDropKeep(drop_count, keep_count));
+  CHECK_RESULT(EmitOpcode(interpreter::Opcode::Return));
+  PopLabel();
+  current_func = nullptr;
+  return wabt::Result::Ok;
 }
 
-static Result on_local_decl_count(uint32_t count, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  ctx->current_func->local_decl_count = count;
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::OnLocalDeclCount(Index count) {
+  current_func->local_decl_count = count;
+  return wabt::Result::Ok;
 }
 
-static Result on_local_decl(uint32_t decl_index,
-                            uint32_t count,
-                            Type type,
-                            void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  ctx->current_func->local_count += count;
+wabt::Result BinaryReaderInterpreter::OnLocalDecl(Index decl_index,
+                                                  Index count,
+                                                  Type type) {
+  current_func->local_count += count;
 
-  for (uint32_t i = 0; i < count; ++i)
-    ctx->current_func->param_and_local_types.push_back(type);
+  for (Index i = 0; i < count; ++i)
+    current_func->param_and_local_types.push_back(type);
 
-  if (decl_index == ctx->current_func->local_decl_count - 1) {
+  if (decl_index == current_func->local_decl_count - 1) {
     /* last local declaration, allocate space for all locals. */
-    CHECK_RESULT(emit_opcode(ctx, InterpreterOpcode::Alloca));
-    CHECK_RESULT(emit_i32(ctx, ctx->current_func->local_count));
+    CHECK_RESULT(EmitOpcode(interpreter::Opcode::Alloca));
+    CHECK_RESULT(EmitI32(current_func->local_count));
   }
-  return Result::Ok;
+  return wabt::Result::Ok;
 }
 
-static Result check_has_memory(Context* ctx, Opcode opcode) {
-  if (ctx->module->memory_index == WABT_INVALID_INDEX) {
-    print_error(ctx, "%s requires an imported or defined memory.",
-                get_opcode_name(opcode));
-    return Result::Error;
+wabt::Result BinaryReaderInterpreter::CheckHasMemory(wabt::Opcode opcode) {
+  if (module->memory_index == kInvalidIndex) {
+    PrintError("%s requires an imported or defined memory.",
+               get_opcode_name(opcode));
+    return wabt::Result::Error;
   }
-  return Result::Ok;
+  return wabt::Result::Ok;
 }
 
-static Result check_align(Context* ctx,
-                          uint32_t alignment_log2,
-                          uint32_t natural_alignment) {
+wabt::Result BinaryReaderInterpreter::CheckAlign(uint32_t alignment_log2,
+                                                 Address natural_alignment) {
   if (alignment_log2 >= 32 || (1U << alignment_log2) > natural_alignment) {
-    print_error(ctx, "alignment must not be larger than natural alignment (%u)",
-                natural_alignment);
-    return Result::Error;
+    PrintError("alignment must not be larger than natural alignment (%u)",
+               natural_alignment);
+    return wabt::Result::Error;
   }
-  return Result::Ok;
+  return wabt::Result::Ok;
 }
 
-static Result on_unary_expr(Opcode opcode, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  CHECK_RESULT(typechecker_on_unary(&ctx->typechecker, opcode));
-  CHECK_RESULT(emit_opcode(ctx, opcode));
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::OnUnaryExpr(wabt::Opcode opcode) {
+  CHECK_RESULT(typechecker.OnUnary(opcode));
+  CHECK_RESULT(EmitOpcode(opcode));
+  return wabt::Result::Ok;
 }
 
-static Result on_binary_expr(Opcode opcode, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  CHECK_RESULT(typechecker_on_binary(&ctx->typechecker, opcode));
-  CHECK_RESULT(emit_opcode(ctx, opcode));
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::OnBinaryExpr(wabt::Opcode opcode) {
+  CHECK_RESULT(typechecker.OnBinary(opcode));
+  CHECK_RESULT(EmitOpcode(opcode));
+  return wabt::Result::Ok;
 }
 
-static Result on_block_expr(uint32_t num_types,
-                            Type* sig_types,
-                            void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
+wabt::Result BinaryReaderInterpreter::OnBlockExpr(Index num_types,
+                                                  Type* sig_types) {
   TypeVector sig(sig_types, sig_types + num_types);
-  CHECK_RESULT(typechecker_on_block(&ctx->typechecker, &sig));
-  push_label(ctx, WABT_INVALID_OFFSET, WABT_INVALID_OFFSET);
-  return Result::Ok;
+  CHECK_RESULT(typechecker.OnBlock(&sig));
+  PushLabel(kInvalidIstreamOffset, kInvalidIstreamOffset);
+  return wabt::Result::Ok;
 }
 
-static Result on_loop_expr(uint32_t num_types,
-                           Type* sig_types,
-                           void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
+wabt::Result BinaryReaderInterpreter::OnLoopExpr(Index num_types,
+                                                 Type* sig_types) {
   TypeVector sig(sig_types, sig_types + num_types);
-  CHECK_RESULT(typechecker_on_loop(&ctx->typechecker, &sig));
-  push_label(ctx, get_istream_offset(ctx), WABT_INVALID_OFFSET);
-  return Result::Ok;
+  CHECK_RESULT(typechecker.OnLoop(&sig));
+  PushLabel(GetIstreamOffset(), kInvalidIstreamOffset);
+  return wabt::Result::Ok;
 }
 
-static Result on_if_expr(uint32_t num_types, Type* sig_types, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
+wabt::Result BinaryReaderInterpreter::OnIfExpr(Index num_types,
+                                               Type* sig_types) {
   TypeVector sig(sig_types, sig_types + num_types);
-  CHECK_RESULT(typechecker_on_if(&ctx->typechecker, &sig));
-  CHECK_RESULT(emit_opcode(ctx, InterpreterOpcode::BrUnless));
-  uint32_t fixup_offset = get_istream_offset(ctx);
-  CHECK_RESULT(emit_i32(ctx, WABT_INVALID_OFFSET));
-  push_label(ctx, WABT_INVALID_OFFSET, fixup_offset);
-  return Result::Ok;
+  CHECK_RESULT(typechecker.OnIf(&sig));
+  CHECK_RESULT(EmitOpcode(interpreter::Opcode::BrUnless));
+  IstreamOffset fixup_offset = GetIstreamOffset();
+  CHECK_RESULT(EmitI32(kInvalidIstreamOffset));
+  PushLabel(kInvalidIstreamOffset, fixup_offset);
+  return wabt::Result::Ok;
 }
 
-static Result on_else_expr(void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  CHECK_RESULT(typechecker_on_else(&ctx->typechecker));
-  Label* label = top_label(ctx);
-  uint32_t fixup_cond_offset = label->fixup_offset;
-  CHECK_RESULT(emit_opcode(ctx, InterpreterOpcode::Br));
-  label->fixup_offset = get_istream_offset(ctx);
-  CHECK_RESULT(emit_i32(ctx, WABT_INVALID_OFFSET));
-  CHECK_RESULT(emit_i32_at(ctx, fixup_cond_offset, get_istream_offset(ctx)));
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::OnElseExpr() {
+  CHECK_RESULT(typechecker.OnElse());
+  Label* label = TopLabel();
+  IstreamOffset fixup_cond_offset = label->fixup_offset;
+  CHECK_RESULT(EmitOpcode(interpreter::Opcode::Br));
+  label->fixup_offset = GetIstreamOffset();
+  CHECK_RESULT(EmitI32(kInvalidIstreamOffset));
+  CHECK_RESULT(EmitI32At(fixup_cond_offset, GetIstreamOffset()));
+  return wabt::Result::Ok;
 }
 
-static Result on_end_expr(void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  TypeCheckerLabel* label;
-  CHECK_RESULT(typechecker_get_label(&ctx->typechecker, 0, &label));
+wabt::Result BinaryReaderInterpreter::OnEndExpr() {
+  TypeChecker::Label* label;
+  CHECK_RESULT(typechecker.GetLabel(0, &label));
   LabelType label_type = label->label_type;
-  CHECK_RESULT(typechecker_on_end(&ctx->typechecker));
+  CHECK_RESULT(typechecker.OnEnd());
   if (label_type == LabelType::If || label_type == LabelType::Else) {
-    CHECK_RESULT(emit_i32_at(ctx, top_label(ctx)->fixup_offset,
-                             get_istream_offset(ctx)));
+    CHECK_RESULT(EmitI32At(TopLabel()->fixup_offset, GetIstreamOffset()));
   }
-  fixup_top_label(ctx);
-  pop_label(ctx);
-  return Result::Ok;
+  FixupTopLabel();
+  PopLabel();
+  return wabt::Result::Ok;
 }
 
-static Result on_br_expr(uint32_t depth, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  uint32_t drop_count, keep_count;
-  CHECK_RESULT(get_br_drop_keep_count(ctx, depth, &drop_count, &keep_count));
-  CHECK_RESULT(typechecker_on_br(&ctx->typechecker, depth));
-  CHECK_RESULT(emit_br(ctx, depth, drop_count, keep_count));
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::OnBrExpr(Index depth) {
+  Index drop_count, keep_count;
+  CHECK_RESULT(GetBrDropKeepCount(depth, &drop_count, &keep_count));
+  CHECK_RESULT(typechecker.OnBr(depth));
+  CHECK_RESULT(EmitBr(depth, drop_count, keep_count));
+  return wabt::Result::Ok;
 }
 
-static Result on_br_if_expr(uint32_t depth, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  uint32_t drop_count, keep_count;
-  CHECK_RESULT(typechecker_on_br_if(&ctx->typechecker, depth));
-  CHECK_RESULT(get_br_drop_keep_count(ctx, depth, &drop_count, &keep_count));
+wabt::Result BinaryReaderInterpreter::OnBrIfExpr(Index depth) {
+  Index drop_count, keep_count;
+  CHECK_RESULT(typechecker.OnBrIf(depth));
+  CHECK_RESULT(GetBrDropKeepCount(depth, &drop_count, &keep_count));
   /* flip the br_if so if <cond> is true it can drop values from the stack */
-  CHECK_RESULT(emit_opcode(ctx, InterpreterOpcode::BrUnless));
-  uint32_t fixup_br_offset = get_istream_offset(ctx);
-  CHECK_RESULT(emit_i32(ctx, WABT_INVALID_OFFSET));
-  CHECK_RESULT(emit_br(ctx, depth, drop_count, keep_count));
-  CHECK_RESULT(emit_i32_at(ctx, fixup_br_offset, get_istream_offset(ctx)));
-  return Result::Ok;
+  CHECK_RESULT(EmitOpcode(interpreter::Opcode::BrUnless));
+  IstreamOffset fixup_br_offset = GetIstreamOffset();
+  CHECK_RESULT(EmitI32(kInvalidIstreamOffset));
+  CHECK_RESULT(EmitBr(depth, drop_count, keep_count));
+  CHECK_RESULT(EmitI32At(fixup_br_offset, GetIstreamOffset()));
+  return wabt::Result::Ok;
 }
 
-static Result on_br_table_expr(BinaryReaderContext* context,
-                               uint32_t num_targets,
-                               uint32_t* target_depths,
-                               uint32_t default_target_depth) {
-  Context* ctx = static_cast<Context*>(context->user_data);
-  CHECK_RESULT(typechecker_begin_br_table(&ctx->typechecker));
-  CHECK_RESULT(emit_opcode(ctx, InterpreterOpcode::BrTable));
-  CHECK_RESULT(emit_i32(ctx, num_targets));
-  uint32_t fixup_table_offset = get_istream_offset(ctx);
-  CHECK_RESULT(emit_i32(ctx, WABT_INVALID_OFFSET));
+wabt::Result BinaryReaderInterpreter::OnBrTableExpr(
+    Index num_targets,
+    Index* target_depths,
+    Index default_target_depth) {
+  CHECK_RESULT(typechecker.BeginBrTable());
+  CHECK_RESULT(EmitOpcode(interpreter::Opcode::BrTable));
+  CHECK_RESULT(EmitI32(num_targets));
+  IstreamOffset fixup_table_offset = GetIstreamOffset();
+  CHECK_RESULT(EmitI32(kInvalidIstreamOffset));
   /* not necessary for the interpreter, but it makes it easier to disassemble.
    * This opcode specifies how many bytes of data follow. */
-  CHECK_RESULT(emit_opcode(ctx, InterpreterOpcode::Data));
-  CHECK_RESULT(emit_i32(ctx, (num_targets + 1) * WABT_TABLE_ENTRY_SIZE));
-  CHECK_RESULT(emit_i32_at(ctx, fixup_table_offset, get_istream_offset(ctx)));
+  CHECK_RESULT(EmitOpcode(interpreter::Opcode::Data));
+  CHECK_RESULT(EmitI32((num_targets + 1) * WABT_TABLE_ENTRY_SIZE));
+  CHECK_RESULT(EmitI32At(fixup_table_offset, GetIstreamOffset()));
 
-  for (uint32_t i = 0; i <= num_targets; ++i) {
-    uint32_t depth = i != num_targets ? target_depths[i] : default_target_depth;
-    CHECK_RESULT(typechecker_on_br_table_target(&ctx->typechecker, depth));
-    CHECK_RESULT(emit_br_table_offset(ctx, depth));
+  for (Index i = 0; i <= num_targets; ++i) {
+    Index depth = i != num_targets ? target_depths[i] : default_target_depth;
+    CHECK_RESULT(typechecker.OnBrTableTarget(depth));
+    CHECK_RESULT(EmitBrTableOffset(depth));
   }
 
-  CHECK_RESULT(typechecker_end_br_table(&ctx->typechecker));
-  return Result::Ok;
+  CHECK_RESULT(typechecker.EndBrTable());
+  return wabt::Result::Ok;
 }
 
-static Result on_call_expr(uint32_t func_index, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  InterpreterFunc* func = get_func_by_module_index(ctx, func_index);
-  InterpreterFuncSignature* sig =
-      get_signature_by_env_index(ctx, func->sig_index);
-  CHECK_RESULT(typechecker_on_call(&ctx->typechecker, &sig->param_types,
-                                   &sig->result_types));
+wabt::Result BinaryReaderInterpreter::OnCallExpr(Index func_index) {
+  Func* func = GetFuncByModuleIndex(func_index);
+  FuncSignature* sig = env->GetFuncSignature(func->sig_index);
+  CHECK_RESULT(
+      typechecker.OnCall(&sig->param_types, &sig->result_types));
 
   if (func->is_host) {
-    CHECK_RESULT(emit_opcode(ctx, InterpreterOpcode::CallHost));
-    CHECK_RESULT(emit_i32(ctx, translate_func_index_to_env(ctx, func_index)));
+    CHECK_RESULT(EmitOpcode(interpreter::Opcode::CallHost));
+    CHECK_RESULT(EmitI32(TranslateFuncIndexToEnv(func_index)));
   } else {
-    CHECK_RESULT(emit_opcode(ctx, InterpreterOpcode::Call));
-    CHECK_RESULT(emit_func_offset(ctx, func->as_defined(), func_index));
+    CHECK_RESULT(EmitOpcode(interpreter::Opcode::Call));
+    CHECK_RESULT(EmitFuncOffset(func->as_defined(), func_index));
   }
 
-  return Result::Ok;
+  return wabt::Result::Ok;
 }
 
-static Result on_call_indirect_expr(uint32_t sig_index, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  if (ctx->module->table_index == WABT_INVALID_INDEX) {
-    print_error(ctx, "found call_indirect operator, but no table");
-    return Result::Error;
+wabt::Result BinaryReaderInterpreter::OnCallIndirectExpr(Index sig_index) {
+  if (module->table_index == kInvalidIndex) {
+    PrintError("found call_indirect operator, but no table");
+    return wabt::Result::Error;
   }
-  InterpreterFuncSignature* sig = get_signature_by_module_index(ctx, sig_index);
-  CHECK_RESULT(typechecker_on_call_indirect(
-      &ctx->typechecker, &sig->param_types, &sig->result_types));
+  FuncSignature* sig = GetSignatureByModuleIndex(sig_index);
+  CHECK_RESULT(typechecker.OnCallIndirect(&sig->param_types,
+                                            &sig->result_types));
 
-  CHECK_RESULT(emit_opcode(ctx, InterpreterOpcode::CallIndirect));
-  CHECK_RESULT(emit_i32(ctx, ctx->module->table_index));
-  CHECK_RESULT(emit_i32(ctx, translate_sig_index_to_env(ctx, sig_index)));
-  return Result::Ok;
+  CHECK_RESULT(EmitOpcode(interpreter::Opcode::CallIndirect));
+  CHECK_RESULT(EmitI32(module->table_index));
+  CHECK_RESULT(EmitI32(TranslateSigIndexToEnv(sig_index)));
+  return wabt::Result::Ok;
 }
 
-static Result on_drop_expr(void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  CHECK_RESULT(typechecker_on_drop(&ctx->typechecker));
-  CHECK_RESULT(emit_opcode(ctx, InterpreterOpcode::Drop));
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::OnCompareExpr(wabt::Opcode opcode) {
+  return OnBinaryExpr(opcode);
 }
 
-static Result on_i32_const_expr(uint32_t value, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  CHECK_RESULT(typechecker_on_const(&ctx->typechecker, Type::I32));
-  CHECK_RESULT(emit_opcode(ctx, InterpreterOpcode::I32Const));
-  CHECK_RESULT(emit_i32(ctx, value));
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::OnConvertExpr(wabt::Opcode opcode) {
+  return OnUnaryExpr(opcode);
 }
 
-static Result on_i64_const_expr(uint64_t value, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  CHECK_RESULT(typechecker_on_const(&ctx->typechecker, Type::I64));
-  CHECK_RESULT(emit_opcode(ctx, InterpreterOpcode::I64Const));
-  CHECK_RESULT(emit_i64(ctx, value));
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::OnDropExpr() {
+  CHECK_RESULT(typechecker.OnDrop());
+  CHECK_RESULT(EmitOpcode(interpreter::Opcode::Drop));
+  return wabt::Result::Ok;
 }
 
-static Result on_f32_const_expr(uint32_t value_bits, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  CHECK_RESULT(typechecker_on_const(&ctx->typechecker, Type::F32));
-  CHECK_RESULT(emit_opcode(ctx, InterpreterOpcode::F32Const));
-  CHECK_RESULT(emit_i32(ctx, value_bits));
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::OnI32ConstExpr(uint32_t value) {
+  CHECK_RESULT(typechecker.OnConst(Type::I32));
+  CHECK_RESULT(EmitOpcode(interpreter::Opcode::I32Const));
+  CHECK_RESULT(EmitI32(value));
+  return wabt::Result::Ok;
 }
 
-static Result on_f64_const_expr(uint64_t value_bits, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  CHECK_RESULT(typechecker_on_const(&ctx->typechecker, Type::F64));
-  CHECK_RESULT(emit_opcode(ctx, InterpreterOpcode::F64Const));
-  CHECK_RESULT(emit_i64(ctx, value_bits));
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::OnI64ConstExpr(uint64_t value) {
+  CHECK_RESULT(typechecker.OnConst(Type::I64));
+  CHECK_RESULT(EmitOpcode(interpreter::Opcode::I64Const));
+  CHECK_RESULT(EmitI64(value));
+  return wabt::Result::Ok;
 }
 
-static Result on_get_global_expr(uint32_t global_index, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  CHECK_GLOBAL(ctx, global_index);
-  Type type = get_global_type_by_module_index(ctx, global_index);
-  CHECK_RESULT(typechecker_on_get_global(&ctx->typechecker, type));
-  CHECK_RESULT(emit_opcode(ctx, InterpreterOpcode::GetGlobal));
-  CHECK_RESULT(emit_i32(ctx, translate_global_index_to_env(ctx, global_index)));
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::OnF32ConstExpr(uint32_t value_bits) {
+  CHECK_RESULT(typechecker.OnConst(Type::F32));
+  CHECK_RESULT(EmitOpcode(interpreter::Opcode::F32Const));
+  CHECK_RESULT(EmitI32(value_bits));
+  return wabt::Result::Ok;
 }
 
-static Result on_set_global_expr(uint32_t global_index, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  CHECK_GLOBAL(ctx, global_index);
-  InterpreterGlobal* global = get_global_by_module_index(ctx, global_index);
+wabt::Result BinaryReaderInterpreter::OnF64ConstExpr(uint64_t value_bits) {
+  CHECK_RESULT(typechecker.OnConst(Type::F64));
+  CHECK_RESULT(EmitOpcode(interpreter::Opcode::F64Const));
+  CHECK_RESULT(EmitI64(value_bits));
+  return wabt::Result::Ok;
+}
+
+wabt::Result BinaryReaderInterpreter::OnGetGlobalExpr(Index global_index) {
+  CHECK_RESULT(CheckGlobal(global_index));
+  Type type = GetGlobalTypeByModuleIndex(global_index);
+  CHECK_RESULT(typechecker.OnGetGlobal(type));
+  CHECK_RESULT(EmitOpcode(interpreter::Opcode::GetGlobal));
+  CHECK_RESULT(EmitI32(TranslateGlobalIndexToEnv(global_index)));
+  return wabt::Result::Ok;
+}
+
+wabt::Result BinaryReaderInterpreter::OnSetGlobalExpr(Index global_index) {
+  CHECK_RESULT(CheckGlobal(global_index));
+  Global* global = GetGlobalByModuleIndex(global_index);
   if (!global->mutable_) {
-    print_error(ctx, "can't set_global on immutable global at index %u.",
-                global_index);
-    return Result::Error;
+    PrintError("can't set_global on immutable global at index %" PRIindex ".",
+               global_index);
+    return wabt::Result::Error;
   }
   CHECK_RESULT(
-      typechecker_on_set_global(&ctx->typechecker, global->typed_value.type));
-  CHECK_RESULT(emit_opcode(ctx, InterpreterOpcode::SetGlobal));
-  CHECK_RESULT(emit_i32(ctx, translate_global_index_to_env(ctx, global_index)));
-  return Result::Ok;
+      typechecker.OnSetGlobal(global->typed_value.type));
+  CHECK_RESULT(EmitOpcode(interpreter::Opcode::SetGlobal));
+  CHECK_RESULT(EmitI32(TranslateGlobalIndexToEnv(global_index)));
+  return wabt::Result::Ok;
 }
 
-static uint32_t translate_local_index(Context* ctx, uint32_t local_index) {
-  return ctx->typechecker.type_stack.size() +
-         ctx->current_func->param_and_local_types.size() - local_index;
+Index BinaryReaderInterpreter::TranslateLocalIndex(Index local_index) {
+  return typechecker.type_stack_size() +
+         current_func->param_and_local_types.size() - local_index;
 }
 
-static Result on_get_local_expr(uint32_t local_index, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  CHECK_LOCAL(ctx, local_index);
-  Type type = get_local_type_by_index(ctx->current_func, local_index);
-  /* Get the translated index before calling typechecker_on_get_local
-   * because it will update the type stack size. We need the index to be
-   * relative to the old stack size. */
-  uint32_t translated_local_index = translate_local_index(ctx, local_index);
-  CHECK_RESULT(typechecker_on_get_local(&ctx->typechecker, type));
-  CHECK_RESULT(emit_opcode(ctx, InterpreterOpcode::GetLocal));
-  CHECK_RESULT(emit_i32(ctx, translated_local_index));
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::OnGetLocalExpr(Index local_index) {
+  CHECK_RESULT(CheckLocal(local_index));
+  Type type = GetLocalTypeByIndex(current_func, local_index);
+  // Get the translated index before calling typechecker.OnGetLocal because it
+  // will update the type stack size. We need the index to be relative to the
+  // old stack size.
+  Index translated_local_index = TranslateLocalIndex(local_index);
+  CHECK_RESULT(typechecker.OnGetLocal(type));
+  CHECK_RESULT(EmitOpcode(interpreter::Opcode::GetLocal));
+  CHECK_RESULT(EmitI32(translated_local_index));
+  return wabt::Result::Ok;
 }
 
-static Result on_set_local_expr(uint32_t local_index, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  CHECK_LOCAL(ctx, local_index);
-  Type type = get_local_type_by_index(ctx->current_func, local_index);
-  CHECK_RESULT(typechecker_on_set_local(&ctx->typechecker, type));
-  CHECK_RESULT(emit_opcode(ctx, InterpreterOpcode::SetLocal));
-  CHECK_RESULT(emit_i32(ctx, translate_local_index(ctx, local_index)));
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::OnSetLocalExpr(Index local_index) {
+  CHECK_RESULT(CheckLocal(local_index));
+  Type type = GetLocalTypeByIndex(current_func, local_index);
+  CHECK_RESULT(typechecker.OnSetLocal(type));
+  CHECK_RESULT(EmitOpcode(interpreter::Opcode::SetLocal));
+  CHECK_RESULT(EmitI32(TranslateLocalIndex(local_index)));
+  return wabt::Result::Ok;
 }
 
-static Result on_tee_local_expr(uint32_t local_index, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  CHECK_LOCAL(ctx, local_index);
-  Type type = get_local_type_by_index(ctx->current_func, local_index);
-  CHECK_RESULT(typechecker_on_tee_local(&ctx->typechecker, type));
-  CHECK_RESULT(emit_opcode(ctx, InterpreterOpcode::TeeLocal));
-  CHECK_RESULT(emit_i32(ctx, translate_local_index(ctx, local_index)));
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::OnTeeLocalExpr(Index local_index) {
+  CHECK_RESULT(CheckLocal(local_index));
+  Type type = GetLocalTypeByIndex(current_func, local_index);
+  CHECK_RESULT(typechecker.OnTeeLocal(type));
+  CHECK_RESULT(EmitOpcode(interpreter::Opcode::TeeLocal));
+  CHECK_RESULT(EmitI32(TranslateLocalIndex(local_index)));
+  return wabt::Result::Ok;
 }
 
-static Result on_grow_memory_expr(void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  CHECK_RESULT(check_has_memory(ctx, Opcode::GrowMemory));
-  CHECK_RESULT(typechecker_on_grow_memory(&ctx->typechecker));
-  CHECK_RESULT(emit_opcode(ctx, InterpreterOpcode::GrowMemory));
-  CHECK_RESULT(emit_i32(ctx, ctx->module->memory_index));
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::OnGrowMemoryExpr() {
+  CHECK_RESULT(CheckHasMemory(wabt::Opcode::GrowMemory));
+  CHECK_RESULT(typechecker.OnGrowMemory());
+  CHECK_RESULT(EmitOpcode(interpreter::Opcode::GrowMemory));
+  CHECK_RESULT(EmitI32(module->memory_index));
+  return wabt::Result::Ok;
 }
 
-static Result on_load_expr(Opcode opcode,
-                           uint32_t alignment_log2,
-                           uint32_t offset,
-                           void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  CHECK_RESULT(check_has_memory(ctx, opcode));
-  CHECK_RESULT(
-      check_align(ctx, alignment_log2, get_opcode_memory_size(opcode)));
-  CHECK_RESULT(typechecker_on_load(&ctx->typechecker, opcode));
-  CHECK_RESULT(emit_opcode(ctx, opcode));
-  CHECK_RESULT(emit_i32(ctx, ctx->module->memory_index));
-  CHECK_RESULT(emit_i32(ctx, offset));
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::OnLoadExpr(wabt::Opcode opcode,
+                                                 uint32_t alignment_log2,
+                                                 Address offset) {
+  CHECK_RESULT(CheckHasMemory(opcode));
+  CHECK_RESULT(CheckAlign(alignment_log2, get_opcode_memory_size(opcode)));
+  CHECK_RESULT(typechecker.OnLoad(opcode));
+  CHECK_RESULT(EmitOpcode(opcode));
+  CHECK_RESULT(EmitI32(module->memory_index));
+  CHECK_RESULT(EmitI32(offset));
+  return wabt::Result::Ok;
 }
 
-static Result on_store_expr(Opcode opcode,
-                            uint32_t alignment_log2,
-                            uint32_t offset,
-                            void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  CHECK_RESULT(check_has_memory(ctx, opcode));
-  CHECK_RESULT(
-      check_align(ctx, alignment_log2, get_opcode_memory_size(opcode)));
-  CHECK_RESULT(typechecker_on_store(&ctx->typechecker, opcode));
-  CHECK_RESULT(emit_opcode(ctx, opcode));
-  CHECK_RESULT(emit_i32(ctx, ctx->module->memory_index));
-  CHECK_RESULT(emit_i32(ctx, offset));
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::OnStoreExpr(wabt::Opcode opcode,
+                                                  uint32_t alignment_log2,
+                                                  Address offset) {
+  CHECK_RESULT(CheckHasMemory(opcode));
+  CHECK_RESULT(CheckAlign(alignment_log2, get_opcode_memory_size(opcode)));
+  CHECK_RESULT(typechecker.OnStore(opcode));
+  CHECK_RESULT(EmitOpcode(opcode));
+  CHECK_RESULT(EmitI32(module->memory_index));
+  CHECK_RESULT(EmitI32(offset));
+  return wabt::Result::Ok;
 }
 
-static Result on_current_memory_expr(void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  CHECK_RESULT(check_has_memory(ctx, Opcode::CurrentMemory));
-  CHECK_RESULT(typechecker_on_current_memory(&ctx->typechecker));
-  CHECK_RESULT(emit_opcode(ctx, InterpreterOpcode::CurrentMemory));
-  CHECK_RESULT(emit_i32(ctx, ctx->module->memory_index));
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::OnCurrentMemoryExpr() {
+  CHECK_RESULT(CheckHasMemory(wabt::Opcode::CurrentMemory));
+  CHECK_RESULT(typechecker.OnCurrentMemory());
+  CHECK_RESULT(EmitOpcode(interpreter::Opcode::CurrentMemory));
+  CHECK_RESULT(EmitI32(module->memory_index));
+  return wabt::Result::Ok;
 }
 
-static Result on_nop_expr(void* user_data) {
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::OnNopExpr() {
+  return wabt::Result::Ok;
 }
 
-static Result on_return_expr(void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  uint32_t drop_count, keep_count;
-  CHECK_RESULT(get_return_drop_keep_count(ctx, &drop_count, &keep_count));
-  CHECK_RESULT(typechecker_on_return(&ctx->typechecker));
-  CHECK_RESULT(emit_drop_keep(ctx, drop_count, keep_count));
-  CHECK_RESULT(emit_opcode(ctx, InterpreterOpcode::Return));
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::OnReturnExpr() {
+  Index drop_count, keep_count;
+  CHECK_RESULT(GetReturnDropKeepCount(&drop_count, &keep_count));
+  CHECK_RESULT(typechecker.OnReturn());
+  CHECK_RESULT(EmitDropKeep(drop_count, keep_count));
+  CHECK_RESULT(EmitOpcode(interpreter::Opcode::Return));
+  return wabt::Result::Ok;
 }
 
-static Result on_select_expr(void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  CHECK_RESULT(typechecker_on_select(&ctx->typechecker));
-  CHECK_RESULT(emit_opcode(ctx, InterpreterOpcode::Select));
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::OnSelectExpr() {
+  CHECK_RESULT(typechecker.OnSelect());
+  CHECK_RESULT(EmitOpcode(interpreter::Opcode::Select));
+  return wabt::Result::Ok;
 }
 
-static Result on_unreachable_expr(void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  CHECK_RESULT(typechecker_on_unreachable(&ctx->typechecker));
-  CHECK_RESULT(emit_opcode(ctx, InterpreterOpcode::Unreachable));
-  return Result::Ok;
+wabt::Result BinaryReaderInterpreter::OnUnreachableExpr() {
+  CHECK_RESULT(typechecker.OnUnreachable());
+  CHECK_RESULT(EmitOpcode(interpreter::Opcode::Unreachable));
+  return wabt::Result::Ok;
 }
 
-Result read_binary_interpreter(InterpreterEnvironment* env,
-                               const void* data,
-                               size_t size,
-                               const ReadBinaryOptions* options,
-                               BinaryErrorHandler* error_handler,
-                               DefinedInterpreterModule** out_module) {
-  Context ctx;
-  BinaryReader reader;
+wabt::Result BinaryReaderInterpreter::EndModule() {
+  for (ElemSegmentInfo& info : elem_segment_infos) {
+    *info.dst = info.func_index;
+  }
+  for (DataSegmentInfo& info : data_segment_infos) {
+    memcpy(info.dst_data, info.src_data, info.size);
+  }
+  return wabt::Result::Ok;
+}
 
-  InterpreterEnvironmentMark mark = mark_interpreter_environment(env);
+}  // namespace
 
-  DefinedInterpreterModule* module =
-      new DefinedInterpreterModule(env->istream.size);
-  env->modules.emplace_back(module);
+wabt::Result read_binary_interpreter(Environment* env,
+                                     const void* data,
+                                     size_t size,
+                                     const ReadBinaryOptions* options,
+                                     BinaryErrorHandler* error_handler,
+                                     DefinedModule** out_module) {
+  // Need to mark before taking ownership of env->istream.
+  Environment::MarkPoint mark = env->Mark();
 
-  WABT_ZERO_MEMORY(reader);
+  std::unique_ptr<OutputBuffer> istream = env->ReleaseIstream();
+  IstreamOffset istream_offset = istream->size();
+  DefinedModule* module = new DefinedModule();
 
-  ctx.reader = &reader;
-  ctx.error_handler = error_handler;
-  ctx.env = env;
-  ctx.module = module;
-  ctx.istream_offset = env->istream.size;
-  CHECK_RESULT(init_mem_writer_existing(&ctx.istream_writer, &env->istream));
+  BinaryReaderInterpreter reader(env, module, std::move(istream),
+                                 error_handler);
+  env->EmplaceBackModule(module);
 
-  TypeCheckerErrorHandler tc_error_handler;
-  tc_error_handler.on_error = on_typechecker_error;
-  tc_error_handler.user_data = &ctx;
-  ctx.typechecker.error_handler = &tc_error_handler;
+  wabt::Result result = read_binary(data, size, &reader, options);
+  env->SetIstream(reader.ReleaseOutputBuffer());
 
-  WABT_ZERO_MEMORY(reader);
-  reader.user_data = &ctx;
-  reader.on_error = on_error;
-  reader.on_signature_count = on_signature_count;
-  reader.on_signature = on_signature;
-  reader.on_import_count = on_import_count;
-  reader.on_import = on_import;
-  reader.on_import_func = on_import_func;
-  reader.on_import_table = on_import_table;
-  reader.on_import_memory = on_import_memory;
-  reader.on_import_global = on_import_global;
-  reader.on_function_signatures_count = on_function_signatures_count;
-  reader.on_function_signature = on_function_signature;
-  reader.on_table = on_table;
-  reader.on_memory = on_memory;
-  reader.on_global_count = on_global_count;
-  reader.begin_global = begin_global;
-  reader.end_global_init_expr = end_global_init_expr;
-  reader.on_export = on_export;
-  reader.on_start_function = on_start_function;
-  reader.begin_function_body = begin_function_body;
-  reader.on_local_decl_count = on_local_decl_count;
-  reader.on_local_decl = on_local_decl;
-  reader.on_binary_expr = on_binary_expr;
-  reader.on_block_expr = on_block_expr;
-  reader.on_br_expr = on_br_expr;
-  reader.on_br_if_expr = on_br_if_expr;
-  reader.on_br_table_expr = on_br_table_expr;
-  reader.on_call_expr = on_call_expr;
-  reader.on_call_indirect_expr = on_call_indirect_expr;
-  reader.on_compare_expr = on_binary_expr;
-  reader.on_convert_expr = on_unary_expr;
-  reader.on_current_memory_expr = on_current_memory_expr;
-  reader.on_drop_expr = on_drop_expr;
-  reader.on_else_expr = on_else_expr;
-  reader.on_end_expr = on_end_expr;
-  reader.on_f32_const_expr = on_f32_const_expr;
-  reader.on_f64_const_expr = on_f64_const_expr;
-  reader.on_get_global_expr = on_get_global_expr;
-  reader.on_get_local_expr = on_get_local_expr;
-  reader.on_grow_memory_expr = on_grow_memory_expr;
-  reader.on_i32_const_expr = on_i32_const_expr;
-  reader.on_i64_const_expr = on_i64_const_expr;
-  reader.on_if_expr = on_if_expr;
-  reader.on_load_expr = on_load_expr;
-  reader.on_loop_expr = on_loop_expr;
-  reader.on_nop_expr = on_nop_expr;
-  reader.on_return_expr = on_return_expr;
-  reader.on_select_expr = on_select_expr;
-  reader.on_set_global_expr = on_set_global_expr;
-  reader.on_set_local_expr = on_set_local_expr;
-  reader.on_store_expr = on_store_expr;
-  reader.on_tee_local_expr = on_tee_local_expr;
-  reader.on_unary_expr = on_unary_expr;
-  reader.on_unreachable_expr = on_unreachable_expr;
-  reader.end_function_body = end_function_body;
-  reader.end_elem_segment_init_expr = end_elem_segment_init_expr;
-  reader.on_elem_segment_function_index = on_elem_segment_function_index_check;
-  reader.on_data_segment_data = on_data_segment_data_check;
-  reader.on_init_expr_f32_const_expr = on_init_expr_f32_const_expr;
-  reader.on_init_expr_f64_const_expr = on_init_expr_f64_const_expr;
-  reader.on_init_expr_get_global_expr = on_init_expr_get_global_expr;
-  reader.on_init_expr_i32_const_expr = on_init_expr_i32_const_expr;
-  reader.on_init_expr_i64_const_expr = on_init_expr_i64_const_expr;
-
-  const uint32_t num_function_passes = 1;
-  Result result =
-      read_binary(data, size, &reader, num_function_passes, options);
-  steal_mem_writer_output_buffer(&ctx.istream_writer, &env->istream);
   if (WABT_SUCCEEDED(result)) {
-    /* Another pass on the read binary to assign data and elem segments. */
-    WABT_ZERO_MEMORY(reader);
-    reader.user_data = &ctx;
-    reader.on_error = on_error;
-    reader.end_elem_segment_init_expr = end_elem_segment_init_expr;
-    reader.on_elem_segment_function_index = on_elem_segment_function_index;
-    reader.on_data_segment_data = on_data_segment_data;
-    reader.on_init_expr_f32_const_expr = on_init_expr_f32_const_expr;
-    reader.on_init_expr_f64_const_expr = on_init_expr_f64_const_expr;
-    reader.on_init_expr_get_global_expr = on_init_expr_get_global_expr;
-    reader.on_init_expr_i32_const_expr = on_init_expr_i32_const_expr;
-    reader.on_init_expr_i64_const_expr = on_init_expr_i64_const_expr;
-
-    result = read_binary(data, size, &reader, num_function_passes, options);
-    assert(WABT_SUCCEEDED(result));
-
-    env->istream.size = ctx.istream_offset;
-    ctx.module->istream_end = env->istream.size;
+    module->istream_start = istream_offset;
+    module->istream_end = env->istream().size();
     *out_module = module;
   } else {
-    reset_interpreter_environment_to_mark(env, mark);
+    env->ResetToMarkPoint(mark);
     *out_module = nullptr;
   }
   return result;
diff --git a/lib/wabt/src/binary-reader-interpreter.h b/lib/wabt/src/binary-reader-interpreter.h
index 66fa554..1c70d3b 100644
--- a/lib/wabt/src/binary-reader-interpreter.h
+++ b/lib/wabt/src/binary-reader-interpreter.h
@@ -21,16 +21,22 @@
 
 namespace wabt {
 
-struct DefinedInterpreterModule;
-struct InterpreterEnvironment;
+namespace interpreter {
+
+struct DefinedModule;
+class Environment;
+
+} // namespace interpreter
+
+class BinaryErrorHandler;
 struct ReadBinaryOptions;
 
-Result read_binary_interpreter(struct InterpreterEnvironment* env,
+Result read_binary_interpreter(interpreter::Environment* env,
                                const void* data,
                                size_t size,
-                               const struct ReadBinaryOptions* options,
+                               const ReadBinaryOptions* options,
                                BinaryErrorHandler*,
-                               DefinedInterpreterModule** out_module);
+                               interpreter::DefinedModule** out_module);
 
 }  // namespace wabt
 
diff --git a/lib/wabt/src/binary-reader-ir.cc b/lib/wabt/src/binary-reader-ir.cc
new file mode 100644
index 0000000..5094b71
--- /dev/null
+++ b/lib/wabt/src/binary-reader-ir.cc
@@ -0,0 +1,907 @@
+/*
+ * Copyright 2016 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "binary-reader-ir.h"
+
+#include <cassert>
+#include <cinttypes>
+#include <cstdarg>
+#include <cstdint>
+#include <cstdio>
+#include <vector>
+
+#include "binary-error-handler.h"
+#include "binary-reader-nop.h"
+#include "common.h"
+#include "ir.h"
+
+#define CHECK_RESULT(expr) \
+  do {                     \
+    if (WABT_FAILED(expr)) \
+      return Result::Error;   \
+  } while (0)
+
+namespace wabt {
+
+namespace {
+
+struct LabelNode {
+  LabelNode(LabelType, Expr** first);
+
+  LabelType label_type;
+  Expr** first;
+  Expr* last;
+};
+
+LabelNode::LabelNode(LabelType label_type, Expr** first)
+    : label_type(label_type), first(first), last(nullptr) {}
+
+class BinaryReaderIR : public BinaryReaderNop {
+ public:
+  BinaryReaderIR(Module* out_module, BinaryErrorHandler* error_handler);
+
+  bool OnError(const char* message) override;
+
+  Result OnTypeCount(Index count) override;
+  Result OnType(Index index,
+                Index param_count,
+                Type* param_types,
+                Index result_count,
+                Type* result_types) override;
+
+  Result OnImportCount(Index count) override;
+  Result OnImport(Index index,
+                  StringSlice module_name,
+                  StringSlice field_name) override;
+  Result OnImportFunc(Index import_index,
+                      StringSlice module_name,
+                      StringSlice field_name,
+                      Index func_index,
+                      Index sig_index) override;
+  Result OnImportTable(Index import_index,
+                       StringSlice module_name,
+                       StringSlice field_name,
+                       Index table_index,
+                       Type elem_type,
+                       const Limits* elem_limits) override;
+  Result OnImportMemory(Index import_index,
+                        StringSlice module_name,
+                        StringSlice field_name,
+                        Index memory_index,
+                        const Limits* page_limits) override;
+  Result OnImportGlobal(Index import_index,
+                        StringSlice module_name,
+                        StringSlice field_name,
+                        Index global_index,
+                        Type type,
+                        bool mutable_) override;
+
+  Result OnFunctionCount(Index count) override;
+  Result OnFunction(Index index, Index sig_index) override;
+
+  Result OnTableCount(Index count) override;
+  Result OnTable(Index index,
+                 Type elem_type,
+                 const Limits* elem_limits) override;
+
+  Result OnMemoryCount(Index count) override;
+  Result OnMemory(Index index, const Limits* limits) override;
+
+  Result OnGlobalCount(Index count) override;
+  Result BeginGlobal(Index index, Type type, bool mutable_) override;
+  Result BeginGlobalInitExpr(Index index) override;
+  Result EndGlobalInitExpr(Index index) override;
+
+  Result OnExportCount(Index count) override;
+  Result OnExport(Index index,
+                  ExternalKind kind,
+                  Index item_index,
+                  StringSlice name) override;
+
+  Result OnStartFunction(Index func_index) override;
+
+  Result OnFunctionBodyCount(Index count) override;
+  Result BeginFunctionBody(Index index) override;
+  Result OnLocalDecl(Index decl_index, Index count, Type type) override;
+
+  Result OnBinaryExpr(Opcode opcode) override;
+  Result OnBlockExpr(Index num_types, Type* sig_types) override;
+  Result OnBrExpr(Index depth) override;
+  Result OnBrIfExpr(Index depth) override;
+  Result OnBrTableExpr(Index num_targets,
+                       Index* target_depths,
+                       Index default_target_depth) override;
+  Result OnCallExpr(Index func_index) override;
+  Result OnCallIndirectExpr(Index sig_index) override;
+  Result OnCompareExpr(Opcode opcode) override;
+  Result OnConvertExpr(Opcode opcode) override;
+  Result OnDropExpr() override;
+  Result OnElseExpr() override;
+  Result OnEndExpr() override;
+  Result OnF32ConstExpr(uint32_t value_bits) override;
+  Result OnF64ConstExpr(uint64_t value_bits) override;
+  Result OnGetGlobalExpr(Index global_index) override;
+  Result OnGetLocalExpr(Index local_index) override;
+  Result OnGrowMemoryExpr() override;
+  Result OnI32ConstExpr(uint32_t value) override;
+  Result OnI64ConstExpr(uint64_t value) override;
+  Result OnIfExpr(Index num_types, Type* sig_types) override;
+  Result OnLoadExpr(Opcode opcode,
+                    uint32_t alignment_log2,
+                    Address offset) override;
+  Result OnLoopExpr(Index num_types, Type* sig_types) override;
+  Result OnCurrentMemoryExpr() override;
+  Result OnNopExpr() override;
+  Result OnReturnExpr() override;
+  Result OnSelectExpr() override;
+  Result OnSetGlobalExpr(Index global_index) override;
+  Result OnSetLocalExpr(Index local_index) override;
+  Result OnStoreExpr(Opcode opcode,
+                     uint32_t alignment_log2,
+                     Address offset) override;
+  Result OnTeeLocalExpr(Index local_index) override;
+  Result OnUnaryExpr(Opcode opcode) override;
+  Result OnUnreachableExpr() override;
+  Result EndFunctionBody(Index index) override;
+
+  Result OnElemSegmentCount(Index count) override;
+  Result BeginElemSegment(Index index, Index table_index) override;
+  Result BeginElemSegmentInitExpr(Index index) override;
+  Result EndElemSegmentInitExpr(Index index) override;
+  Result OnElemSegmentFunctionIndexCount(Index index,
+                                         Index count) override;
+  Result OnElemSegmentFunctionIndex(Index index,
+                                    Index func_index) override;
+
+  Result OnDataSegmentCount(Index count) override;
+  Result BeginDataSegment(Index index, Index memory_index) override;
+  Result BeginDataSegmentInitExpr(Index index) override;
+  Result EndDataSegmentInitExpr(Index index) override;
+  Result OnDataSegmentData(Index index,
+                           const void* data,
+                           Address size) override;
+
+  Result OnFunctionNamesCount(Index num_functions) override;
+  Result OnFunctionName(Index function_index,
+                        StringSlice function_name) override;
+  Result OnLocalNameLocalCount(Index function_index,
+                               Index num_locals) override;
+  Result OnLocalName(Index function_index,
+                     Index local_index,
+                     StringSlice local_name) override;
+
+  Result OnInitExprF32ConstExpr(Index index, uint32_t value) override;
+  Result OnInitExprF64ConstExpr(Index index, uint64_t value) override;
+  Result OnInitExprGetGlobalExpr(Index index, Index global_index) override;
+  Result OnInitExprI32ConstExpr(Index index, uint32_t value) override;
+  Result OnInitExprI64ConstExpr(Index index, uint64_t value) override;
+
+ private:
+  bool HandleError(Offset offset, const char* message);
+  void PrintError(const char* format, ...);
+  void PushLabel(LabelType label_type, Expr** first);
+  Result PopLabel();
+  Result GetLabelAt(LabelNode** label, Index depth);
+  Result TopLabel(LabelNode** label);
+  Result AppendExpr(Expr* expr);
+
+  BinaryErrorHandler* error_handler = nullptr;
+  Module* module = nullptr;
+
+  Func* current_func = nullptr;
+  std::vector<LabelNode> label_stack;
+  Expr** current_init_expr = nullptr;
+};
+
+BinaryReaderIR::BinaryReaderIR(Module* out_module,
+                                 BinaryErrorHandler* error_handler)
+    : error_handler(error_handler), module(out_module) {}
+
+void WABT_PRINTF_FORMAT(2, 3) BinaryReaderIR::PrintError(const char* format,
+                                                          ...) {
+  WABT_SNPRINTF_ALLOCA(buffer, length, format);
+  HandleError(kInvalidOffset, buffer);
+}
+
+void BinaryReaderIR::PushLabel(LabelType label_type, Expr** first) {
+  label_stack.emplace_back(label_type, first);
+}
+
+Result BinaryReaderIR::PopLabel() {
+  if (label_stack.size() == 0) {
+    PrintError("popping empty label stack");
+    return Result::Error;
+  }
+
+  label_stack.pop_back();
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::GetLabelAt(LabelNode** label, Index depth) {
+  if (depth >= label_stack.size()) {
+    PrintError("accessing stack depth: %" PRIindex " >= max: %" PRIzd, depth,
+               label_stack.size());
+    return Result::Error;
+  }
+
+  *label = &label_stack[label_stack.size() - depth - 1];
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::TopLabel(LabelNode** label) {
+  return GetLabelAt(label, 0);
+}
+
+Result BinaryReaderIR::AppendExpr(Expr* expr) {
+  LabelNode* label;
+  if (WABT_FAILED(TopLabel(&label))) {
+    delete expr;
+    return Result::Error;
+  }
+  if (*label->first) {
+    label->last->next = expr;
+    label->last = expr;
+  } else {
+    *label->first = label->last = expr;
+  }
+  return Result::Ok;
+}
+
+bool BinaryReaderIR::HandleError(Offset offset, const char* message) {
+  return error_handler->OnError(offset, message);
+}
+
+bool BinaryReaderIR::OnError(const char* message) {
+  return HandleError(state->offset, message);
+}
+
+Result BinaryReaderIR::OnTypeCount(Index count) {
+  module->func_types.reserve(count);
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnType(Index index,
+                               Index param_count,
+                               Type* param_types,
+                               Index result_count,
+                               Type* result_types) {
+  ModuleField* field = module->AppendField();
+  field->type = ModuleFieldType::FuncType;
+  field->func_type = new FuncType();
+
+  FuncType* func_type = field->func_type;
+  func_type->sig.param_types.assign(param_types, param_types + param_count);
+  func_type->sig.result_types.assign(result_types, result_types + result_count);
+  module->func_types.push_back(func_type);
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnImportCount(Index count) {
+  module->imports.reserve(count);
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnImport(Index index,
+                                 StringSlice module_name,
+                                 StringSlice field_name) {
+  ModuleField* field = module->AppendField();
+  field->type = ModuleFieldType::Import;
+  field->import = new Import();
+
+  Import* import = field->import;
+  import->module_name = dup_string_slice(module_name);
+  import->field_name = dup_string_slice(field_name);
+  module->imports.push_back(import);
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnImportFunc(Index import_index,
+                                    StringSlice module_name,
+                                    StringSlice field_name,
+                                    Index func_index,
+                                    Index sig_index) {
+  assert(import_index == module->imports.size() - 1);
+  Import* import = module->imports[import_index];
+
+  import->kind = ExternalKind::Func;
+  import->func = new Func();
+  import->func->decl.has_func_type = true;
+  import->func->decl.type_var.type = VarType::Index;
+  import->func->decl.type_var.index = sig_index;
+  import->func->decl.sig = module->func_types[sig_index]->sig;
+
+  module->funcs.push_back(import->func);
+  module->num_func_imports++;
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnImportTable(Index import_index,
+                                     StringSlice module_name,
+                                     StringSlice field_name,
+                                     Index table_index,
+                                     Type elem_type,
+                                     const Limits* elem_limits) {
+  assert(import_index == module->imports.size() - 1);
+  Import* import = module->imports[import_index];
+  import->kind = ExternalKind::Table;
+  import->table = new Table();
+  import->table->elem_limits = *elem_limits;
+  module->tables.push_back(import->table);
+  module->num_table_imports++;
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnImportMemory(Index import_index,
+                                      StringSlice module_name,
+                                      StringSlice field_name,
+                                      Index memory_index,
+                                      const Limits* page_limits) {
+  assert(import_index == module->imports.size() - 1);
+  Import* import = module->imports[import_index];
+  import->kind = ExternalKind::Memory;
+  import->memory = new Memory();
+  import->memory->page_limits = *page_limits;
+  module->memories.push_back(import->memory);
+  module->num_memory_imports++;
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnImportGlobal(Index import_index,
+                                      StringSlice module_name,
+                                      StringSlice field_name,
+                                      Index global_index,
+                                      Type type,
+                                      bool mutable_) {
+  assert(import_index == module->imports.size() - 1);
+  Import* import = module->imports[import_index];
+  import->kind = ExternalKind::Global;
+  import->global = new Global();
+  import->global->type = type;
+  import->global->mutable_ = mutable_;
+  module->globals.push_back(import->global);
+  module->num_global_imports++;
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnFunctionCount(Index count) {
+  module->funcs.reserve(module->num_func_imports + count);
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnFunction(Index index, Index sig_index) {
+  ModuleField* field = module->AppendField();
+  field->type = ModuleFieldType::Func;
+  field->func = new Func();
+
+  Func* func = field->func;
+  func->decl.has_func_type = true;
+  func->decl.type_var.type = VarType::Index;
+  func->decl.type_var.index = sig_index;
+  func->decl.sig = module->func_types[sig_index]->sig;
+
+  module->funcs.push_back(func);
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnTableCount(Index count) {
+  module->tables.reserve(module->num_table_imports + count);
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnTable(Index index,
+                               Type elem_type,
+                               const Limits* elem_limits) {
+  ModuleField* field = module->AppendField();
+  field->type = ModuleFieldType::Table;
+  field->table = new Table();
+  field->table->elem_limits = *elem_limits;
+  module->tables.push_back(field->table);
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnMemoryCount(Index count) {
+  module->memories.reserve(module->num_memory_imports + count);
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnMemory(Index index, const Limits* page_limits) {
+  ModuleField* field = module->AppendField();
+  field->type = ModuleFieldType::Memory;
+  field->memory = new Memory();
+  field->memory->page_limits = *page_limits;
+  module->memories.push_back(field->memory);
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnGlobalCount(Index count) {
+  module->globals.reserve(module->num_global_imports + count);
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::BeginGlobal(Index index, Type type, bool mutable_) {
+  ModuleField* field = module->AppendField();
+  field->type = ModuleFieldType::Global;
+  field->global = new Global();
+  field->global->type = type;
+  field->global->mutable_ = mutable_;
+  module->globals.push_back(field->global);
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::BeginGlobalInitExpr(Index index) {
+  assert(index == module->globals.size() - 1);
+  Global* global = module->globals[index];
+  current_init_expr = &global->init_expr;
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::EndGlobalInitExpr(Index index) {
+  current_init_expr = nullptr;
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnExportCount(Index count) {
+  module->exports.reserve(count);
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnExport(Index index,
+                                ExternalKind kind,
+                                Index item_index,
+                                StringSlice name) {
+  ModuleField* field = module->AppendField();
+  field->type = ModuleFieldType::Export;
+  field->export_ = new Export();
+
+  Export* export_ = field->export_;
+  export_->name = dup_string_slice(name);
+  switch (kind) {
+    case ExternalKind::Func:
+      assert(item_index < module->funcs.size());
+      break;
+    case ExternalKind::Table:
+      assert(item_index < module->tables.size());
+      break;
+    case ExternalKind::Memory:
+      assert(item_index < module->memories.size());
+      break;
+    case ExternalKind::Global:
+      assert(item_index < module->globals.size());
+      break;
+    case ExternalKind::Except:
+      WABT_FATAL("OnExport(except) not implemented\n");
+      break;
+  }
+  export_->var.type = VarType::Index;
+  export_->var.index = item_index;
+  export_->kind = kind;
+  module->exports.push_back(export_);
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnStartFunction(Index func_index) {
+  ModuleField* field = module->AppendField();
+  field->type = ModuleFieldType::Start;
+
+  field->start.type = VarType::Index;
+  assert(func_index < module->funcs.size());
+  field->start.index = func_index;
+
+  module->start = &field->start;
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnFunctionBodyCount(Index count) {
+  assert(module->num_func_imports + count == module->funcs.size());
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::BeginFunctionBody(Index index) {
+  current_func = module->funcs[index];
+  PushLabel(LabelType::Func, &current_func->first_expr);
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnLocalDecl(Index decl_index, Index count, Type type) {
+  TypeVector& types = current_func->local_types;
+  types.reserve(types.size() + count);
+  for (size_t i = 0; i < count; ++i)
+    types.push_back(type);
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnBinaryExpr(Opcode opcode) {
+  Expr* expr = Expr::CreateBinary(opcode);
+  return AppendExpr(expr);
+}
+
+Result BinaryReaderIR::OnBlockExpr(Index num_types, Type* sig_types) {
+  Expr* expr = Expr::CreateBlock(new Block());
+  expr->block->sig.assign(sig_types, sig_types + num_types);
+  AppendExpr(expr);
+  PushLabel(LabelType::Block, &expr->block->first);
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnBrExpr(Index depth) {
+  Expr* expr = Expr::CreateBr(Var(depth));
+  return AppendExpr(expr);
+}
+
+Result BinaryReaderIR::OnBrIfExpr(Index depth) {
+  Expr* expr = Expr::CreateBrIf(Var(depth));
+  return AppendExpr(expr);
+}
+
+Result BinaryReaderIR::OnBrTableExpr(Index num_targets,
+                                     Index* target_depths,
+                                     Index default_target_depth) {
+  VarVector* targets = new VarVector();
+  targets->resize(num_targets);
+  for (Index i = 0; i < num_targets; ++i) {
+    (*targets)[i] = Var(target_depths[i]);
+  }
+  Expr* expr = Expr::CreateBrTable(targets, Var(default_target_depth));
+  return AppendExpr(expr);
+}
+
+Result BinaryReaderIR::OnCallExpr(Index func_index) {
+  assert(func_index < module->funcs.size());
+  Expr* expr = Expr::CreateCall(Var(func_index));
+  return AppendExpr(expr);
+}
+
+Result BinaryReaderIR::OnCallIndirectExpr(Index sig_index) {
+  assert(sig_index < module->func_types.size());
+  Expr* expr = Expr::CreateCallIndirect(Var(sig_index));
+  return AppendExpr(expr);
+}
+
+Result BinaryReaderIR::OnCompareExpr(Opcode opcode) {
+  Expr* expr = Expr::CreateCompare(opcode);
+  return AppendExpr(expr);
+}
+
+Result BinaryReaderIR::OnConvertExpr(Opcode opcode) {
+  Expr* expr = Expr::CreateConvert(opcode);
+  return AppendExpr(expr);
+}
+
+Result BinaryReaderIR::OnCurrentMemoryExpr() {
+  Expr* expr = Expr::CreateCurrentMemory();
+  return AppendExpr(expr);
+}
+
+Result BinaryReaderIR::OnDropExpr() {
+  Expr* expr = Expr::CreateDrop();
+  return AppendExpr(expr);
+}
+
+Result BinaryReaderIR::OnElseExpr() {
+  LabelNode* label;
+  CHECK_RESULT(TopLabel(&label));
+  if (label->label_type != LabelType::If) {
+    PrintError("else expression without matching if");
+    return Result::Error;
+  }
+
+  LabelNode* parent_label;
+  CHECK_RESULT(GetLabelAt(&parent_label, 1));
+  assert(parent_label->last->type == ExprType::If);
+
+  label->label_type = LabelType::Else;
+  label->first = &parent_label->last->if_.false_;
+  label->last = nullptr;
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnEndExpr() {
+  return PopLabel();
+}
+
+Result BinaryReaderIR::OnF32ConstExpr(uint32_t value_bits) {
+  Expr* expr = Expr::CreateConst(Const(Const::F32(), value_bits));
+  return AppendExpr(expr);
+}
+
+Result BinaryReaderIR::OnF64ConstExpr(uint64_t value_bits) {
+  Expr* expr = Expr::CreateConst(Const(Const::F64(), value_bits));
+  return AppendExpr(expr);
+}
+
+Result BinaryReaderIR::OnGetGlobalExpr(Index global_index) {
+  Expr* expr = Expr::CreateGetGlobal(Var(global_index));
+  return AppendExpr(expr);
+}
+
+Result BinaryReaderIR::OnGetLocalExpr(Index local_index) {
+  Expr* expr = Expr::CreateGetLocal(Var(local_index));
+  return AppendExpr(expr);
+}
+
+Result BinaryReaderIR::OnGrowMemoryExpr() {
+  Expr* expr = Expr::CreateGrowMemory();
+  return AppendExpr(expr);
+}
+
+Result BinaryReaderIR::OnI32ConstExpr(uint32_t value) {
+  Expr* expr = Expr::CreateConst(Const(Const::I32(), value));
+  return AppendExpr(expr);
+}
+
+Result BinaryReaderIR::OnI64ConstExpr(uint64_t value) {
+  Expr* expr = Expr::CreateConst(Const(Const::I64(), value));
+  return AppendExpr(expr);
+}
+
+Result BinaryReaderIR::OnIfExpr(Index num_types, Type* sig_types) {
+  Expr* expr = Expr::CreateIf(new Block());
+  expr->if_.true_->sig.assign(sig_types, sig_types + num_types);
+  expr->if_.false_ = nullptr;
+  AppendExpr(expr);
+  PushLabel(LabelType::If, &expr->if_.true_->first);
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnLoadExpr(Opcode opcode,
+                                  uint32_t alignment_log2,
+                                  Address offset) {
+  Expr* expr = Expr::CreateLoad(opcode, 1 << alignment_log2, offset);
+  return AppendExpr(expr);
+}
+
+Result BinaryReaderIR::OnLoopExpr(Index num_types, Type* sig_types) {
+  Expr* expr = Expr::CreateLoop(new Block());
+  expr->loop->sig.assign(sig_types, sig_types + num_types);
+  AppendExpr(expr);
+  PushLabel(LabelType::Loop, &expr->loop->first);
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnNopExpr() {
+  Expr* expr = Expr::CreateNop();
+  return AppendExpr(expr);
+}
+
+Result BinaryReaderIR::OnReturnExpr() {
+  Expr* expr = Expr::CreateReturn();
+  return AppendExpr(expr);
+}
+
+Result BinaryReaderIR::OnSelectExpr() {
+  Expr* expr = Expr::CreateSelect();
+  return AppendExpr(expr);
+}
+
+Result BinaryReaderIR::OnSetGlobalExpr(Index global_index) {
+  Expr* expr = Expr::CreateSetGlobal(Var(global_index));
+  return AppendExpr(expr);
+}
+
+Result BinaryReaderIR::OnSetLocalExpr(Index local_index) {
+  Expr* expr = Expr::CreateSetLocal(Var(local_index));
+  return AppendExpr(expr);
+}
+
+Result BinaryReaderIR::OnStoreExpr(Opcode opcode,
+                                   uint32_t alignment_log2,
+                                   Address offset) {
+  Expr* expr = Expr::CreateStore(opcode, 1 << alignment_log2, offset);
+  return AppendExpr(expr);
+}
+
+Result BinaryReaderIR::OnTeeLocalExpr(Index local_index) {
+  Expr* expr = Expr::CreateTeeLocal(Var(local_index));
+  return AppendExpr(expr);
+}
+
+Result BinaryReaderIR::OnUnaryExpr(Opcode opcode) {
+  Expr* expr = Expr::CreateUnary(opcode);
+  return AppendExpr(expr);
+}
+
+Result BinaryReaderIR::OnUnreachableExpr() {
+  Expr* expr = Expr::CreateUnreachable();
+  return AppendExpr(expr);
+}
+
+Result BinaryReaderIR::EndFunctionBody(Index index) {
+  CHECK_RESULT(PopLabel());
+  current_func = nullptr;
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnElemSegmentCount(Index count) {
+  module->elem_segments.reserve(count);
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::BeginElemSegment(Index index, Index table_index) {
+  ModuleField* field = module->AppendField();
+  field->type = ModuleFieldType::ElemSegment;
+  field->elem_segment = new ElemSegment();
+  field->elem_segment->table_var.type = VarType::Index;
+  field->elem_segment->table_var.index = table_index;
+  module->elem_segments.push_back(field->elem_segment);
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::BeginElemSegmentInitExpr(Index index) {
+  assert(index == module->elem_segments.size() - 1);
+  ElemSegment* segment = module->elem_segments[index];
+  current_init_expr = &segment->offset;
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::EndElemSegmentInitExpr(Index index) {
+  current_init_expr = nullptr;
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnElemSegmentFunctionIndexCount(Index index,
+                                                       Index count) {
+  assert(index == module->elem_segments.size() - 1);
+  ElemSegment* segment = module->elem_segments[index];
+  segment->vars.reserve(count);
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnElemSegmentFunctionIndex(Index segment_index,
+                                                  Index func_index) {
+  assert(segment_index == module->elem_segments.size() - 1);
+  ElemSegment* segment = module->elem_segments[segment_index];
+  segment->vars.emplace_back();
+  Var* var = &segment->vars.back();
+  var->type = VarType::Index;
+  var->index = func_index;
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnDataSegmentCount(Index count) {
+  module->data_segments.reserve(count);
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::BeginDataSegment(Index index, Index memory_index) {
+  ModuleField* field = module->AppendField();
+  field->type = ModuleFieldType::DataSegment;
+  field->data_segment = new DataSegment();
+  field->data_segment->memory_var.type = VarType::Index;
+  field->data_segment->memory_var.index = memory_index;
+  module->data_segments.push_back(field->data_segment);
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::BeginDataSegmentInitExpr(Index index) {
+  assert(index == module->data_segments.size() - 1);
+  DataSegment* segment = module->data_segments[index];
+  current_init_expr = &segment->offset;
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::EndDataSegmentInitExpr(Index index) {
+  current_init_expr = nullptr;
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnDataSegmentData(Index index,
+                                         const void* data,
+                                         Address size) {
+  assert(index == module->data_segments.size() - 1);
+  DataSegment* segment = module->data_segments[index];
+  segment->data = new char[size];
+  segment->size = size;
+  memcpy(segment->data, data, size);
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnFunctionNamesCount(Index count) {
+  if (count > module->funcs.size()) {
+    PrintError("expected function name count (%" PRIindex
+               ") <= function count (%" PRIzd ")",
+               count, module->funcs.size());
+    return Result::Error;
+  }
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnFunctionName(Index index, StringSlice name) {
+  if (string_slice_is_empty(&name))
+    return Result::Ok;
+
+  Func* func = module->funcs[index];
+  std::string dollar_name = std::string("$") + string_slice_to_string(name);
+  func->name = dup_string_slice(string_to_string_slice(dollar_name));
+  module->func_bindings.emplace(dollar_name, Binding(index));
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnLocalNameLocalCount(Index index, Index count) {
+  assert(index < module->funcs.size());
+  Func* func = module->funcs[index];
+  Index num_params_and_locals = func->GetNumParamsAndLocals();
+  if (count > num_params_and_locals) {
+    PrintError("expected local name count (%" PRIindex
+               ") <= local count (%" PRIindex ")",
+               count, num_params_and_locals);
+    return Result::Error;
+  }
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnInitExprF32ConstExpr(Index index, uint32_t value) {
+  *current_init_expr = Expr::CreateConst(Const(Const::F32(), value));
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnInitExprF64ConstExpr(Index index, uint64_t value) {
+  *current_init_expr = Expr::CreateConst(Const(Const::F64(), value));
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnInitExprGetGlobalExpr(Index index,
+                                               Index global_index) {
+  *current_init_expr = Expr::CreateGetGlobal(Var(global_index));
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnInitExprI32ConstExpr(Index index, uint32_t value) {
+  *current_init_expr = Expr::CreateConst(Const(Const::I32(), value));
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnInitExprI64ConstExpr(Index index, uint64_t value) {
+  *current_init_expr = Expr::CreateConst(Const(Const::I64(), value));
+  return Result::Ok;
+}
+
+Result BinaryReaderIR::OnLocalName(Index func_index,
+                                   Index local_index,
+                                   StringSlice name) {
+  if (string_slice_is_empty(&name))
+    return Result::Ok;
+
+  Func* func = module->funcs[func_index];
+  Index num_params = func->GetNumParams();
+  BindingHash* bindings;
+  Index index;
+  if (local_index < num_params) {
+    /* param name */
+    bindings = &func->param_bindings;
+    index = local_index;
+  } else {
+    /* local name */
+    bindings = &func->local_bindings;
+    index = local_index - num_params;
+  }
+  bindings->emplace(std::string("$") + string_slice_to_string(name),
+                    Binding(index));
+  return Result::Ok;
+}
+
+}  // namespace
+
+Result read_binary_ir(const void* data,
+                      size_t size,
+                      const ReadBinaryOptions* options,
+                      BinaryErrorHandler* error_handler,
+                      struct Module* out_module) {
+  BinaryReaderIR reader(out_module, error_handler);
+  Result result = read_binary(data, size, &reader, options);
+  return result;
+}
+
+}  // namespace wabt
diff --git a/lib/wabt/src/binary-reader-ast.h b/lib/wabt/src/binary-reader-ir.h
similarity index 67%
rename from lib/wabt/src/binary-reader-ast.h
rename to lib/wabt/src/binary-reader-ir.h
index 0759903..50a95a0 100644
--- a/lib/wabt/src/binary-reader-ast.h
+++ b/lib/wabt/src/binary-reader-ir.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef WABT_BINARY_READER_AST_H_
-#define WABT_BINARY_READER_AST_H_
+#ifndef WABT_BINARY_READER_IR_H_
+#define WABT_BINARY_READER_IR_H_
 
 #include "common.h"
 
@@ -23,13 +23,14 @@
 
 struct Module;
 struct ReadBinaryOptions;
+class BinaryErrorHandler;
 
-Result read_binary_ast(const void* data,
-                       size_t size,
-                       const struct ReadBinaryOptions* options,
-                       BinaryErrorHandler*,
-                       struct Module* out_module);
+Result read_binary_ir(const void* data,
+                      size_t size,
+                      const ReadBinaryOptions* options,
+                      BinaryErrorHandler*,
+                      Module* out_module);
 
 } // namespace wabt
 
-#endif /* WABT_BINARY_READER_AST_H_ */
+#endif /* WABT_BINARY_READER_IR_H_ */
diff --git a/lib/wabt/src/binary-reader-linker.cc b/lib/wabt/src/binary-reader-linker.cc
index 026c2f9..add37f6 100644
--- a/lib/wabt/src/binary-reader-linker.cc
+++ b/lib/wabt/src/binary-reader-linker.cc
@@ -18,7 +18,7 @@
 
 #include <vector>
 
-#include "binary-reader.h"
+#include "binary-reader-nop.h"
 #include "wasm-link.h"
 
 #define RELOC_SIZE 5
@@ -28,29 +28,86 @@
 
 namespace {
 
-struct Context {
-  LinkerInputBinary* binary;
+class BinaryReaderLinker : public BinaryReaderNop {
+ public:
+  explicit BinaryReaderLinker(LinkerInputBinary* binary);
 
-  Section* reloc_section;
-  Section* current_section;
+  Result BeginSection(BinarySection section_type, Offset size) override;
+
+  Result OnImportFunc(Index import_index,
+                      StringSlice module_name,
+                      StringSlice field_name,
+                      Index func_index,
+                      Index sig_index) override;
+  Result OnImportGlobal(Index import_index,
+                        StringSlice module_name,
+                        StringSlice field_name,
+                        Index global_index,
+                        Type type,
+                        bool mutable_) override;
+  Result OnImportMemory(Index import_index,
+                        StringSlice module_name,
+                        StringSlice field_name,
+                        Index memory_index,
+                        const Limits* page_limits) override;
+
+  Result OnFunctionCount(Index count) override;
+
+  Result OnTable(Index index,
+                 Type elem_type,
+                 const Limits* elem_limits) override;
+
+  Result OnMemory(Index index, const Limits* limits) override;
+
+  Result OnExport(Index index,
+                  ExternalKind kind,
+                  Index item_index,
+                  StringSlice name) override;
+
+  Result OnElemSegmentFunctionIndexCount(Index index,
+                                         Index count) override;
+
+  Result BeginDataSegment(Index index, Index memory_index) override;
+  Result OnDataSegmentData(Index index,
+                           const void* data,
+                           Address size) override;
+
+  Result BeginNamesSection(Offset size) override;
+
+  Result OnFunctionName(Index function_index,
+                        StringSlice function_name) override;
+
+  Result OnRelocCount(Index count,
+                      BinarySection section_code,
+                      StringSlice section_name) override;
+  Result OnReloc(RelocType type,
+                 Offset offset,
+                 Index index,
+                 uint32_t addend) override;
+
+  Result OnInitExprI32ConstExpr(Index index, uint32_t value) override;
+
+ private:
+  LinkerInputBinary* binary_;
+
+  Section* reloc_section_ = nullptr;
+  Section* current_section_ = nullptr;
 };
 
-}  // namespace
+BinaryReaderLinker::BinaryReaderLinker(LinkerInputBinary* binary)
+    : binary_(binary) {}
 
-static Result on_reloc_count(uint32_t count,
-                             BinarySection section_code,
-                             StringSlice section_name,
-                             void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  LinkerInputBinary* binary = ctx->binary;
+Result BinaryReaderLinker::OnRelocCount(Index count,
+                                        BinarySection section_code,
+                                        StringSlice section_name) {
   if (section_code == BinarySection::Custom) {
     WABT_FATAL("relocation for custom sections not yet supported\n");
   }
 
-  for (const std::unique_ptr<Section>& section : binary->sections) {
+  for (const std::unique_ptr<Section>& section : binary_->sections) {
     if (section->section_code != section_code)
       continue;
-    ctx->reloc_section = section.get();
+    reloc_section_ = section.get();
     return Result::Ok;
   }
 
@@ -58,83 +115,78 @@
   return Result::Error;
 }
 
-static Result on_reloc(RelocType type,
-                       uint32_t offset,
-                       uint32_t index,
-                       int32_t addend,
-                       void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-
-  if (offset + RELOC_SIZE > ctx->reloc_section->size) {
-    WABT_FATAL("invalid relocation offset: %#x\n", offset);
+Result BinaryReaderLinker::OnReloc(RelocType type,
+                                   Offset offset,
+                                   Index index,
+                                   uint32_t addend) {
+  if (offset + RELOC_SIZE > reloc_section_->size) {
+    WABT_FATAL("invalid relocation offset: %#" PRIoffset "\n", offset);
   }
 
-  ctx->reloc_section->relocations.emplace_back(type, offset, index, addend);
+  reloc_section_->relocations.emplace_back(type, offset, index, addend);
 
   return Result::Ok;
 }
 
-static Result on_import(uint32_t index,
-                        StringSlice module_name,
-                        StringSlice field_name,
-                        void* user_data) {
-  if (!string_slice_eq_cstr(&module_name, WABT_LINK_MODULE_NAME)) {
-    WABT_FATAL("unsupported import module: " PRIstringslice,
-               WABT_PRINTF_STRING_SLICE_ARG(module_name));
-  }
-  return Result::Ok;
-}
-
-static Result on_import_func(uint32_t import_index,
-                             StringSlice module_name,
-                             StringSlice field_name,
-                             uint32_t global_index,
-                             uint32_t sig_index,
-                             void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  ctx->binary->function_imports.emplace_back();
-  FunctionImport* import = &ctx->binary->function_imports.back();
+Result BinaryReaderLinker::OnImportFunc(Index import_index,
+                                        StringSlice module_name,
+                                        StringSlice field_name,
+                                        Index global_index,
+                                        Index sig_index) {
+  binary_->function_imports.emplace_back();
+  FunctionImport* import = &binary_->function_imports.back();
+  import->module_name = module_name;
   import->name = field_name;
   import->sig_index = sig_index;
   import->active = true;
-  ctx->binary->active_function_imports++;
+  binary_->active_function_imports++;
   return Result::Ok;
 }
 
-static Result on_import_global(uint32_t import_index,
-                               StringSlice module_name,
-                               StringSlice field_name,
-                               uint32_t global_index,
-                               Type type,
-                               bool mutable_,
-                               void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  ctx->binary->global_imports.emplace_back();
-  GlobalImport* import = &ctx->binary->global_imports.back();
+Result BinaryReaderLinker::OnImportGlobal(Index import_index,
+                                          StringSlice module_name,
+                                          StringSlice field_name,
+                                          Index global_index,
+                                          Type type,
+                                          bool mutable_) {
+  binary_->global_imports.emplace_back();
+  GlobalImport* import = &binary_->global_imports.back();
+  import->module_name = module_name;
   import->name = field_name;
   import->type = type;
   import->mutable_ = mutable_;
-  ctx->binary->active_global_imports++;
+  binary_->active_global_imports++;
   return Result::Ok;
 }
 
-static Result begin_section(BinaryReaderContext* ctx,
-                            BinarySection section_code,
-                            uint32_t size) {
-  Context* context = static_cast<Context*>(ctx->user_data);
-  LinkerInputBinary* binary = context->binary;
+Result BinaryReaderLinker::OnImportMemory(Index import_index,
+                                          StringSlice module_name,
+                                          StringSlice field_name,
+                                          Index memory_index,
+                                          const Limits* page_limits) {
+  WABT_FATAL("Linker does not support imported memories");
+  return Result::Error;
+}
+
+Result BinaryReaderLinker::OnFunctionCount(Index count) {
+  binary_->function_count = count;
+  return Result::Ok;
+}
+
+Result BinaryReaderLinker::BeginSection(BinarySection section_code,
+                                        Offset size) {
   Section* sec = new Section();
-  binary->sections.emplace_back(sec);
-  context->current_section = sec;
+  binary_->sections.emplace_back(sec);
+  current_section_ = sec;
   sec->section_code = section_code;
   sec->size = size;
-  sec->offset = ctx->offset;
-  sec->binary = binary;
+  sec->offset = state->offset;
+  sec->binary = binary_;
 
   if (sec->section_code != BinarySection::Custom &&
       sec->section_code != BinarySection::Start) {
     size_t bytes_read = read_u32_leb128(
-        &binary->data[sec->offset], &binary->data[binary->size], &sec->count);
+        &binary_->data[sec->offset], &binary_->data[binary_->size], &sec->count);
     if (bytes_read == 0)
       WABT_FATAL("error reading section element count\n");
     sec->payload_offset = sec->offset + bytes_read;
@@ -143,202 +195,99 @@
   return Result::Ok;
 }
 
-static Result begin_custom_section(BinaryReaderContext* ctx,
-                                   uint32_t size,
-                                   StringSlice section_name) {
-  Context* context = static_cast<Context*>(ctx->user_data);
-  LinkerInputBinary* binary = context->binary;
-  Section* sec = context->current_section;
-  sec->data_custom.name = section_name;
-
-  /* Modify section size and offset to not include the name itself. */
-  size_t delta = ctx->offset - sec->offset;
-  sec->offset = sec->offset + delta;
-  sec->size = sec->size - delta;
-  sec->payload_offset = sec->offset;
-  sec->payload_size = sec->size;
-
-  /* Special handling for certain CUSTOM sections */
-  if (string_slice_eq_cstr(&section_name, "name")) {
-    uint32_t name_type;
-    size_t bytes_read = read_u32_leb128(
-        &binary->data[sec->offset], &binary->data[binary->size], &name_type);
-
-    if (static_cast<NameSectionSubsection>(name_type) != NameSectionSubsection::Function) {
-      WABT_FATAL("no function name section");
-    }
-
-    sec->payload_offset += bytes_read;
-    sec->payload_size -= bytes_read;
-
-    uint32_t subsection_size;
-    bytes_read = read_u32_leb128(
-        &binary->data[sec->offset], &binary->data[binary->size], &subsection_size);
-
-    sec->payload_offset += bytes_read;
-    sec->payload_size -= bytes_read;
-
-    bytes_read = read_u32_leb128(
-        &binary->data[sec->payload_offset], &binary->data[binary->size], &sec->count);
-    sec->payload_offset += bytes_read;
-    sec->payload_size -= bytes_read;
-
-    /* We don't currently support merging name sections unless they contain
-     * a name for every function. */
-    uint32_t total_funcs = binary->function_imports.size();
-    for (const std::unique_ptr<Section>& section : binary->sections) {
-      if (section->section_code == BinarySection::Function) {
-        total_funcs += section->count;
-        break;
-      }
-    }
-    if (total_funcs != sec->count) {
-      WABT_FATAL("name section count (%d) does not match function count (%d)\n",
-                 sec->count, total_funcs);
-    }
-  }
-
-  return Result::Ok;
-}
-
-static Result on_table(uint32_t index,
-                       Type elem_type,
-                       const Limits* elem_limits,
-                       void* user_data) {
+Result BinaryReaderLinker::OnTable(Index index,
+                                   Type elem_type,
+                                   const Limits* elem_limits) {
   if (elem_limits->has_max && (elem_limits->max != elem_limits->initial))
     WABT_FATAL("Tables with max != initial not supported by wabt-link\n");
 
-  Context* ctx = static_cast<Context*>(user_data);
-  ctx->binary->table_elem_count = elem_limits->initial;
+  binary_->table_elem_count = elem_limits->initial;
   return Result::Ok;
 }
 
-static Result on_elem_segment_function_index_count(BinaryReaderContext* ctx,
-                                                   uint32_t index,
-                                                   uint32_t count) {
-  Context* context = static_cast<Context*>(ctx->user_data);
-  Section* sec = context->current_section;
+Result BinaryReaderLinker::OnElemSegmentFunctionIndexCount(Index index,
+                                                           Index count) {
+  Section* sec = current_section_;
 
   /* Modify the payload to include only the actual function indexes */
-  size_t delta = ctx->offset - sec->payload_offset;
+  size_t delta = state->offset - sec->payload_offset;
   sec->payload_offset += delta;
   sec->payload_size -= delta;
   return Result::Ok;
 }
 
-static Result on_memory(uint32_t index,
-                        const Limits* page_limits,
-                        void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Section* sec = ctx->current_section;
-  sec->memory_limits = *page_limits;
-  ctx->binary->memory_page_count = page_limits->initial;
+Result BinaryReaderLinker::OnMemory(Index index, const Limits* page_limits) {
+  Section* sec = current_section_;
+  sec->data.memory_limits = *page_limits;
+  binary_->memory_page_count = page_limits->initial;
   return Result::Ok;
 }
 
-static Result begin_data_segment(uint32_t index,
-                                 uint32_t memory_index,
-                                 void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Section* sec = ctx->current_section;
-  if (!sec->data_segments) {
-    sec->data_segments = new std::vector<DataSegment>();
+Result BinaryReaderLinker::BeginDataSegment(Index index, Index memory_index) {
+  Section* sec = current_section_;
+  if (!sec->data.data_segments) {
+    sec->data.data_segments = new std::vector<DataSegment>();
   }
-  sec->data_segments->emplace_back();
-  DataSegment& segment = sec->data_segments->back();
+  sec->data.data_segments->emplace_back();
+  DataSegment& segment = sec->data.data_segments->back();
   segment.memory_index = memory_index;
   return Result::Ok;
 }
 
-static Result on_init_expr_i32_const_expr(uint32_t index,
-                                          uint32_t value,
-                                          void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Section* sec = ctx->current_section;
+Result BinaryReaderLinker::OnInitExprI32ConstExpr(Index index, uint32_t value) {
+  Section* sec = current_section_;
   if (sec->section_code != BinarySection::Data)
     return Result::Ok;
-  DataSegment& segment = sec->data_segments->back();
+  DataSegment& segment = sec->data.data_segments->back();
   segment.offset = value;
   return Result::Ok;
 }
 
-static Result on_data_segment_data(uint32_t index,
-                                   const void* src_data,
-                                   uint32_t size,
-                                   void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  Section* sec = ctx->current_section;
-  DataSegment& segment = sec->data_segments->back();
+Result BinaryReaderLinker::OnDataSegmentData(Index index,
+                                             const void* src_data,
+                                             Address size) {
+  Section* sec = current_section_;
+  DataSegment& segment = sec->data.data_segments->back();
   segment.data = static_cast<const uint8_t*>(src_data);
   segment.size = size;
   return Result::Ok;
 }
 
-static Result on_export(uint32_t index,
-                        ExternalKind kind,
-                        uint32_t item_index,
-                        StringSlice name,
-                        void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  ctx->binary->exports.emplace_back();
-  Export* export_ = &ctx->binary->exports.back();
+Result BinaryReaderLinker::OnExport(Index index,
+                                    ExternalKind kind,
+                                    Index item_index,
+                                    StringSlice name) {
+  if (kind == ExternalKind::Memory) {
+    WABT_FATAL("Linker does not support exported memories");
+  }
+  binary_->exports.emplace_back();
+  Export* export_ = &binary_->exports.back();
   export_->name = name;
   export_->kind = kind;
   export_->index = item_index;
   return Result::Ok;
 }
 
-static Result on_function_name(uint32_t index,
-                               StringSlice name,
-                               void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  while (ctx->binary->debug_names.size() < index) {
-    ctx->binary->debug_names.emplace_back();
-  }
-  if (ctx->binary->debug_names.size() == index) {
-    ctx->binary->debug_names.push_back(string_slice_to_string(name));
-  }
+Result BinaryReaderLinker::BeginNamesSection(Offset size) {
+  binary_->debug_names.resize(binary_->function_count +
+                              binary_->function_imports.size());
   return Result::Ok;
 }
 
-Result read_binary_linker(LinkerInputBinary* input_info,
-                          LinkOptions* options) {
-  Context context;
-  WABT_ZERO_MEMORY(context);
-  context.binary = input_info;
+Result BinaryReaderLinker::OnFunctionName(Index index, StringSlice name) {
+  binary_->debug_names[index] = string_slice_to_string(name);
+  return Result::Ok;
+}
 
-  BinaryReader reader;
-  WABT_ZERO_MEMORY(reader);
-  reader.user_data = &context;
-  reader.begin_section = begin_section;
-  reader.begin_custom_section = begin_custom_section;
+}  // namespace
 
-  reader.on_reloc_count = on_reloc_count;
-  reader.on_reloc = on_reloc;
-
-  reader.on_import = on_import;
-  reader.on_import_func = on_import_func;
-  reader.on_import_global = on_import_global;
-
-  reader.on_export = on_export;
-
-  reader.on_table = on_table;
-
-  reader.on_memory = on_memory;
-
-  reader.begin_data_segment = begin_data_segment;
-  reader.on_init_expr_i32_const_expr = on_init_expr_i32_const_expr;
-  reader.on_data_segment_data = on_data_segment_data;
-
-  reader.on_elem_segment_function_index_count =
-      on_elem_segment_function_index_count;
-
-  reader.on_function_name = on_function_name;
+Result read_binary_linker(LinkerInputBinary* input_info, LinkOptions* options) {
+  BinaryReaderLinker reader(input_info);
 
   ReadBinaryOptions read_options = WABT_READ_BINARY_OPTIONS_DEFAULT;
   read_options.read_debug_names = true;
   read_options.log_stream = options->log_stream;
-  return read_binary(input_info->data, input_info->size, &reader, 1,
+  return read_binary(input_info->data, input_info->size, &reader,
                      &read_options);
 }
 
diff --git a/lib/wabt/src/binary-reader-linker.h b/lib/wabt/src/binary-reader-linker.h
index 5a543bb..84b0f3c 100644
--- a/lib/wabt/src/binary-reader-linker.h
+++ b/lib/wabt/src/binary-reader-linker.h
@@ -22,18 +22,18 @@
 
 namespace wabt {
 
-struct Stream;
+class Stream;
 
 namespace link {
 
-struct LinkerInputBinary;
+class LinkerInputBinary;
 
 struct LinkOptions {
-  struct Stream* log_stream;
+  Stream* log_stream;
 };
 
-Result read_binary_linker(struct LinkerInputBinary* input_info,
-                          struct LinkOptions* options);
+Result read_binary_linker(LinkerInputBinary* input_info,
+                          LinkOptions* options);
 
 } // namespace link
 }  // namespace wabt
diff --git a/lib/wabt/src/binary-reader-logging.cc b/lib/wabt/src/binary-reader-logging.cc
new file mode 100644
index 0000000..6cdc7ad
--- /dev/null
+++ b/lib/wabt/src/binary-reader-logging.cc
@@ -0,0 +1,610 @@
+/*
+ * Copyright 2017 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "binary-reader-logging.h"
+
+#include <cinttypes>
+
+#include "stream.h"
+
+namespace wabt {
+
+#define INDENT_SIZE 2
+
+#define LOGF_NOINDENT(...) stream->Writef(__VA_ARGS__)
+
+#define LOGF(...)               \
+  do {                          \
+    WriteIndent();              \
+    LOGF_NOINDENT(__VA_ARGS__); \
+  } while (0)
+
+namespace {
+
+void sprint_limits(char* dst, size_t size, const Limits* limits) {
+  int result;
+  if (limits->has_max) {
+    result = wabt_snprintf(dst, size, "initial: %" PRIu64 ", max: %" PRIu64,
+                           limits->initial, limits->max);
+  } else {
+    result = wabt_snprintf(dst, size, "initial: %" PRIu64, limits->initial);
+  }
+  WABT_USE(result);
+  assert(static_cast<size_t>(result) < size);
+}
+
+}  // namespace
+
+BinaryReaderLogging::BinaryReaderLogging(Stream* stream,
+                                         BinaryReaderDelegate* forward)
+    : stream(stream), reader(forward), indent(0) {}
+
+void BinaryReaderLogging::Indent() {
+  indent += INDENT_SIZE;
+}
+
+void BinaryReaderLogging::Dedent() {
+  indent -= INDENT_SIZE;
+  assert(indent >= 0);
+}
+
+void BinaryReaderLogging::WriteIndent() {
+  static char s_indent[] =
+      "                                                                       "
+      "                                                                       ";
+  static const size_t s_indent_len = sizeof(s_indent) - 1;
+  size_t i = indent;
+  while (i > s_indent_len) {
+    stream->WriteData(s_indent, s_indent_len);
+    i -= s_indent_len;
+  }
+  if (i > 0) {
+    stream->WriteData(s_indent, indent);
+  }
+}
+
+void BinaryReaderLogging::LogTypes(Index type_count, Type* types) {
+  LOGF_NOINDENT("[");
+  for (Index i = 0; i < type_count; ++i) {
+    LOGF_NOINDENT("%s", get_type_name(types[i]));
+    if (i != type_count - 1)
+      LOGF_NOINDENT(", ");
+  }
+  LOGF_NOINDENT("]");
+}
+
+bool BinaryReaderLogging::OnError(const char* message) {
+  return reader->OnError(message);
+}
+
+void BinaryReaderLogging::OnSetState(const State* s) {
+  BinaryReaderDelegate::OnSetState(s);
+  reader->OnSetState(s);
+}
+
+Result BinaryReaderLogging::BeginModule(uint32_t version) {
+  LOGF("BeginModule(version: %u)\n", version);
+  Indent();
+  return reader->BeginModule(version);
+}
+
+Result BinaryReaderLogging::BeginSection(BinarySection section_type,
+                                         Offset size) {
+  return reader->BeginSection(section_type, size);
+}
+
+Result BinaryReaderLogging::BeginCustomSection(Offset size,
+                                               StringSlice section_name) {
+  LOGF("BeginCustomSection('" PRIstringslice "', size: %" PRIzd ")\n",
+       WABT_PRINTF_STRING_SLICE_ARG(section_name), size);
+  Indent();
+  return reader->BeginCustomSection(size, section_name);
+}
+
+Result BinaryReaderLogging::OnType(Index index,
+                                   Index param_count,
+                                   Type* param_types,
+                                   Index result_count,
+                                   Type* result_types) {
+  LOGF("OnType(index: %" PRIindex ", params: ", index);
+  LogTypes(param_count, param_types);
+  LOGF_NOINDENT(", results: ");
+  LogTypes(result_count, result_types);
+  LOGF_NOINDENT(")\n");
+  return reader->OnType(index, param_count, param_types, result_count,
+                        result_types);
+}
+
+Result BinaryReaderLogging::OnImport(Index index,
+                                     StringSlice module_name,
+                                     StringSlice field_name) {
+  LOGF("OnImport(index: %" PRIindex ", module: \"" PRIstringslice
+       "\", field: \"" PRIstringslice "\")\n",
+       index, WABT_PRINTF_STRING_SLICE_ARG(module_name),
+       WABT_PRINTF_STRING_SLICE_ARG(field_name));
+  return reader->OnImport(index, module_name, field_name);
+}
+
+Result BinaryReaderLogging::OnImportFunc(Index import_index,
+                                         StringSlice module_name,
+                                         StringSlice field_name,
+                                         Index func_index,
+                                         Index sig_index) {
+  LOGF("OnImportFunc(import_index: %" PRIindex ", func_index: %" PRIindex
+       ", sig_index: %" PRIindex ")\n",
+       import_index, func_index, sig_index);
+  return reader->OnImportFunc(import_index, module_name, field_name, func_index,
+                              sig_index);
+}
+
+Result BinaryReaderLogging::OnImportTable(Index import_index,
+                                          StringSlice module_name,
+                                          StringSlice field_name,
+                                          Index table_index,
+                                          Type elem_type,
+                                          const Limits* elem_limits) {
+  char buf[100];
+  sprint_limits(buf, sizeof(buf), elem_limits);
+  LOGF("OnImportTable(import_index: %" PRIindex ", table_index: %" PRIindex
+       ", elem_type: %s, %s)\n",
+       import_index, table_index, get_type_name(elem_type), buf);
+  return reader->OnImportTable(import_index, module_name, field_name,
+                               table_index, elem_type, elem_limits);
+}
+
+Result BinaryReaderLogging::OnImportMemory(Index import_index,
+                                           StringSlice module_name,
+                                           StringSlice field_name,
+                                           Index memory_index,
+                                           const Limits* page_limits) {
+  char buf[100];
+  sprint_limits(buf, sizeof(buf), page_limits);
+  LOGF("OnImportMemory(import_index: %" PRIindex ", memory_index: %" PRIindex
+       ", %s)\n",
+       import_index, memory_index, buf);
+  return reader->OnImportMemory(import_index, module_name, field_name,
+                                memory_index, page_limits);
+}
+
+Result BinaryReaderLogging::OnImportGlobal(Index import_index,
+                                           StringSlice module_name,
+                                           StringSlice field_name,
+                                           Index global_index,
+                                           Type type,
+                                           bool mutable_) {
+  LOGF("OnImportGlobal(import_index: %" PRIindex ", global_index: %" PRIindex
+       ", type: %s, mutable: "
+       "%s)\n",
+       import_index, global_index, get_type_name(type),
+       mutable_ ? "true" : "false");
+  return reader->OnImportGlobal(import_index, module_name, field_name,
+                                global_index, type, mutable_);
+}
+
+Result BinaryReaderLogging::OnTable(Index index,
+                                    Type elem_type,
+                                    const Limits* elem_limits) {
+  char buf[100];
+  sprint_limits(buf, sizeof(buf), elem_limits);
+  LOGF("OnTable(index: %" PRIindex ", elem_type: %s, %s)\n", index,
+       get_type_name(elem_type), buf);
+  return reader->OnTable(index, elem_type, elem_limits);
+}
+
+Result BinaryReaderLogging::OnMemory(Index index,
+                                     const Limits* page_limits) {
+  char buf[100];
+  sprint_limits(buf, sizeof(buf), page_limits);
+  LOGF("OnMemory(index: %" PRIindex ", %s)\n", index, buf);
+  return reader->OnMemory(index, page_limits);
+}
+
+Result BinaryReaderLogging::BeginGlobal(Index index,
+                                        Type type,
+                                        bool mutable_) {
+  LOGF("BeginGlobal(index: %" PRIindex ", type: %s, mutable: %s)\n", index,
+       get_type_name(type), mutable_ ? "true" : "false");
+  return reader->BeginGlobal(index, type, mutable_);
+}
+
+Result BinaryReaderLogging::OnExport(Index index,
+                                     ExternalKind kind,
+                                     Index item_index,
+                                     StringSlice name) {
+  LOGF("OnExport(index: %" PRIindex ", kind: %s, item_index: %" PRIindex
+       ", name: \"" PRIstringslice "\")\n",
+       index, get_kind_name(kind), item_index,
+       WABT_PRINTF_STRING_SLICE_ARG(name));
+  return reader->OnExport(index, kind, item_index, name);
+}
+
+Result BinaryReaderLogging::OnLocalDecl(Index decl_index,
+                                        Index count,
+                                        Type type) {
+  LOGF("OnLocalDecl(index: %" PRIindex ", count: %" PRIindex ", type: %s)\n",
+       decl_index, count, get_type_name(type));
+  return reader->OnLocalDecl(decl_index, count, type);
+}
+
+Result BinaryReaderLogging::OnBlockExpr(Index num_types, Type* sig_types) {
+  LOGF("OnBlockExpr(sig: ");
+  LogTypes(num_types, sig_types);
+  LOGF_NOINDENT(")\n");
+  return reader->OnBlockExpr(num_types, sig_types);
+}
+
+Result BinaryReaderLogging::OnBrExpr(Index depth) {
+  LOGF("OnBrExpr(depth: %" PRIindex ")\n", depth);
+  return reader->OnBrExpr(depth);
+}
+
+Result BinaryReaderLogging::OnBrIfExpr(Index depth) {
+  LOGF("OnBrIfExpr(depth: %" PRIindex ")\n", depth);
+  return reader->OnBrIfExpr(depth);
+}
+
+Result BinaryReaderLogging::OnBrTableExpr(Index num_targets,
+                                          Index* target_depths,
+                                          Index default_target_depth) {
+  LOGF("OnBrTableExpr(num_targets: %" PRIindex ", depths: [", num_targets);
+  for (Index i = 0; i < num_targets; ++i) {
+    LOGF_NOINDENT("%" PRIindex, target_depths[i]);
+    if (i != num_targets - 1)
+      LOGF_NOINDENT(", ");
+  }
+  LOGF_NOINDENT("], default: %" PRIindex ")\n", default_target_depth);
+  return reader->OnBrTableExpr(num_targets, target_depths,
+                               default_target_depth);
+}
+
+Result BinaryReaderLogging::OnF32ConstExpr(uint32_t value_bits) {
+  float value;
+  memcpy(&value, &value_bits, sizeof(value));
+  LOGF("OnF32ConstExpr(%g (0x04%x))\n", value, value_bits);
+  return reader->OnF32ConstExpr(value_bits);
+}
+
+Result BinaryReaderLogging::OnF64ConstExpr(uint64_t value_bits) {
+  double value;
+  memcpy(&value, &value_bits, sizeof(value));
+  LOGF("OnF64ConstExpr(%g (0x08%" PRIx64 "))\n", value, value_bits);
+  return reader->OnF64ConstExpr(value_bits);
+}
+
+Result BinaryReaderLogging::OnI32ConstExpr(uint32_t value) {
+  LOGF("OnI32ConstExpr(%u (0x%x))\n", value, value);
+  return reader->OnI32ConstExpr(value);
+}
+
+Result BinaryReaderLogging::OnI64ConstExpr(uint64_t value) {
+  LOGF("OnI64ConstExpr(%" PRIu64 " (0x%" PRIx64 "))\n", value, value);
+  return reader->OnI64ConstExpr(value);
+}
+
+Result BinaryReaderLogging::OnIfExpr(Index num_types, Type* sig_types) {
+  LOGF("OnIfExpr(sig: ");
+  LogTypes(num_types, sig_types);
+  LOGF_NOINDENT(")\n");
+  return reader->OnIfExpr(num_types, sig_types);
+}
+
+Result BinaryReaderLogging::OnLoadExpr(Opcode opcode,
+                                       uint32_t alignment_log2,
+                                       Address offset) {
+  LOGF("OnLoadExpr(opcode: \"%s\" (%u), align log2: %u, offset: %" PRIaddress
+       ")\n",
+       get_opcode_name(opcode), static_cast<unsigned>(opcode), alignment_log2,
+       offset);
+  return reader->OnLoadExpr(opcode, alignment_log2, offset);
+}
+
+Result BinaryReaderLogging::OnLoopExpr(Index num_types, Type* sig_types) {
+  LOGF("OnLoopExpr(sig: ");
+  LogTypes(num_types, sig_types);
+  LOGF_NOINDENT(")\n");
+  return reader->OnLoopExpr(num_types, sig_types);
+}
+
+Result BinaryReaderLogging::OnStoreExpr(Opcode opcode,
+                                        uint32_t alignment_log2,
+                                        Address offset) {
+  LOGF("OnStoreExpr(opcode: \"%s\" (%u), align log2: %u, offset: %" PRIaddress
+       ")\n",
+       get_opcode_name(opcode), static_cast<unsigned>(opcode), alignment_log2,
+       offset);
+  return reader->OnStoreExpr(opcode, alignment_log2, offset);
+}
+
+Result BinaryReaderLogging::OnDataSegmentData(Index index,
+                                              const void* data,
+                                              Address size) {
+  LOGF("OnDataSegmentData(index:%" PRIindex ", size:%" PRIaddress ")\n", index,
+       size);
+  return reader->OnDataSegmentData(index, data, size);
+}
+
+Result BinaryReaderLogging::OnFunctionNameSubsection(Index index,
+                                                     uint32_t name_type,
+                                                     Offset subsection_size) {
+  LOGF("OnFunctionNameSubsection(index:%" PRIindex ", nametype:%u, size:%" PRIzd
+       ")\n",
+       index, name_type, subsection_size);
+  return reader->OnFunctionNameSubsection(index, name_type, subsection_size);
+}
+
+Result BinaryReaderLogging::OnFunctionName(Index index, StringSlice name) {
+  LOGF("OnFunctionName(index: %" PRIindex ", name: \"" PRIstringslice "\")\n",
+       index, WABT_PRINTF_STRING_SLICE_ARG(name));
+  return reader->OnFunctionName(index, name);
+}
+
+Result BinaryReaderLogging::OnLocalNameSubsection(Index index,
+                                                  uint32_t name_type,
+                                                  Offset subsection_size) {
+  LOGF("OnLocalNameSubsection(index:%" PRIindex ", nametype:%u, size:%" PRIzd
+       ")\n",
+       index, name_type, subsection_size);
+  return reader->OnLocalNameSubsection(index, name_type, subsection_size);
+}
+
+Result BinaryReaderLogging::OnLocalName(Index func_index,
+                                        Index local_index,
+                                        StringSlice name) {
+  LOGF("OnLocalName(func_index: %" PRIindex ", local_index: %" PRIindex
+       ", name: \"" PRIstringslice "\")\n",
+       func_index, local_index, WABT_PRINTF_STRING_SLICE_ARG(name));
+  return reader->OnLocalName(func_index, local_index, name);
+}
+
+Result BinaryReaderLogging::OnInitExprF32ConstExpr(Index index,
+                                                   uint32_t value_bits) {
+  float value;
+  memcpy(&value, &value_bits, sizeof(value));
+  LOGF("OnInitExprF32ConstExpr(index: %" PRIindex ", value: %g (0x04%x))\n",
+       index, value, value_bits);
+  return reader->OnInitExprF32ConstExpr(index, value_bits);
+}
+
+Result BinaryReaderLogging::OnInitExprF64ConstExpr(Index index,
+                                                   uint64_t value_bits) {
+  double value;
+  memcpy(&value, &value_bits, sizeof(value));
+  LOGF("OnInitExprF64ConstExpr(index: %" PRIindex " value: %g (0x08%" PRIx64
+       "))\n",
+       index, value, value_bits);
+  return reader->OnInitExprF64ConstExpr(index, value_bits);
+}
+
+Result BinaryReaderLogging::OnInitExprI32ConstExpr(Index index,
+                                                   uint32_t value) {
+  LOGF("OnInitExprI32ConstExpr(index: %" PRIindex ", value: %u)\n", index,
+       value);
+  return reader->OnInitExprI32ConstExpr(index, value);
+}
+
+Result BinaryReaderLogging::OnInitExprI64ConstExpr(Index index,
+                                                   uint64_t value) {
+  LOGF("OnInitExprI64ConstExpr(index: %" PRIindex ", value: %" PRIu64 ")\n",
+       index, value);
+  return reader->OnInitExprI64ConstExpr(index, value);
+}
+
+Result BinaryReaderLogging::OnRelocCount(Index count,
+                                         BinarySection section_code,
+                                         StringSlice section_name) {
+  LOGF("OnRelocCount(count: %" PRIindex
+       ", section: %s, section_name: " PRIstringslice ")\n",
+       count, get_section_name(section_code),
+       WABT_PRINTF_STRING_SLICE_ARG(section_name));
+  return reader->OnRelocCount(count, section_code, section_name);
+}
+
+Result BinaryReaderLogging::OnReloc(RelocType type,
+                                    Offset offset,
+                                    Index index,
+                                    uint32_t addend) {
+  int32_t signed_addend = static_cast<int32_t>(addend);
+  LOGF("OnReloc(type: %s, offset: %" PRIzd ", index: %" PRIindex
+       ", addend: %d)\n",
+       get_reloc_type_name(type), offset, index, signed_addend);
+  return reader->OnReloc(type, offset, index, addend);
+}
+
+#define DEFINE_BEGIN(name)                        \
+  Result BinaryReaderLogging::name(Offset size) { \
+    LOGF(#name "(%" PRIzd ")\n", size);           \
+    Indent();                                     \
+    return reader->name(size);                    \
+  }
+
+#define DEFINE_END(name)               \
+  Result BinaryReaderLogging::name() { \
+    Dedent();                          \
+    LOGF(#name "\n");                  \
+    return reader->name();             \
+  }
+
+#define DEFINE_INDEX(name)                        \
+  Result BinaryReaderLogging::name(Index value) { \
+    LOGF(#name "(%" PRIindex ")\n", value);       \
+    return reader->name(value);                   \
+  }
+
+#define DEFINE_INDEX_DESC(name, desc)                 \
+  Result BinaryReaderLogging::name(Index value) {     \
+    LOGF(#name "(" desc ": %" PRIindex ")\n", value); \
+    return reader->name(value);                       \
+  }
+
+#define DEFINE_INDEX_INDEX(name, desc0, desc1)                           \
+  Result BinaryReaderLogging::name(Index value0, Index value1) {         \
+    LOGF(#name "(" desc0 ": %" PRIindex ", " desc1 ": %" PRIindex ")\n", \
+         value0, value1);                                                \
+    return reader->name(value0, value1);                                 \
+  }
+
+#define DEFINE_OPCODE(name)                                \
+  Result BinaryReaderLogging::name(Opcode opcode) {        \
+    LOGF(#name "(\"%s\" (%u))\n", get_opcode_name(opcode), \
+         static_cast<unsigned>(opcode));                   \
+    return reader->name(opcode);                           \
+  }
+
+#define DEFINE0(name)                  \
+  Result BinaryReaderLogging::name() { \
+    LOGF(#name "\n");                  \
+    return reader->name();             \
+  }
+
+DEFINE_END(EndModule)
+
+DEFINE_END(EndCustomSection)
+
+DEFINE_BEGIN(BeginTypeSection)
+DEFINE_INDEX(OnTypeCount)
+DEFINE_END(EndTypeSection)
+
+DEFINE_BEGIN(BeginImportSection)
+DEFINE_INDEX(OnImportCount)
+DEFINE_END(EndImportSection)
+
+DEFINE_BEGIN(BeginFunctionSection)
+DEFINE_INDEX(OnFunctionCount)
+DEFINE_INDEX_INDEX(OnFunction, "index", "sig_index")
+DEFINE_END(EndFunctionSection)
+
+DEFINE_BEGIN(BeginTableSection)
+DEFINE_INDEX(OnTableCount)
+DEFINE_END(EndTableSection)
+
+DEFINE_BEGIN(BeginMemorySection)
+DEFINE_INDEX(OnMemoryCount)
+DEFINE_END(EndMemorySection)
+
+DEFINE_BEGIN(BeginGlobalSection)
+DEFINE_INDEX(OnGlobalCount)
+DEFINE_INDEX(BeginGlobalInitExpr)
+DEFINE_INDEX(EndGlobalInitExpr)
+DEFINE_INDEX(EndGlobal)
+DEFINE_END(EndGlobalSection)
+
+DEFINE_BEGIN(BeginExportSection)
+DEFINE_INDEX(OnExportCount)
+DEFINE_END(EndExportSection)
+
+DEFINE_BEGIN(BeginStartSection)
+DEFINE_INDEX(OnStartFunction)
+DEFINE_END(EndStartSection)
+
+DEFINE_BEGIN(BeginCodeSection)
+DEFINE_INDEX(OnFunctionBodyCount)
+DEFINE_INDEX(BeginFunctionBody)
+DEFINE_INDEX(EndFunctionBody)
+DEFINE_INDEX(OnLocalDeclCount)
+DEFINE_OPCODE(OnBinaryExpr)
+DEFINE_INDEX_DESC(OnCallExpr, "func_index")
+DEFINE_INDEX_DESC(OnCallIndirectExpr, "sig_index")
+DEFINE_OPCODE(OnCompareExpr)
+DEFINE_OPCODE(OnConvertExpr)
+DEFINE0(OnCurrentMemoryExpr)
+DEFINE0(OnDropExpr)
+DEFINE0(OnElseExpr)
+DEFINE0(OnEndExpr)
+DEFINE_INDEX_DESC(OnGetGlobalExpr, "index")
+DEFINE_INDEX_DESC(OnGetLocalExpr, "index")
+DEFINE0(OnGrowMemoryExpr)
+DEFINE0(OnNopExpr)
+DEFINE0(OnReturnExpr)
+DEFINE0(OnSelectExpr)
+DEFINE_INDEX_DESC(OnSetGlobalExpr, "index")
+DEFINE_INDEX_DESC(OnSetLocalExpr, "index")
+DEFINE_INDEX_DESC(OnTeeLocalExpr, "index")
+DEFINE0(OnUnreachableExpr)
+DEFINE_OPCODE(OnUnaryExpr)
+DEFINE_END(EndCodeSection)
+
+DEFINE_BEGIN(BeginElemSection)
+DEFINE_INDEX(OnElemSegmentCount)
+DEFINE_INDEX_INDEX(BeginElemSegment, "index", "table_index")
+DEFINE_INDEX(BeginElemSegmentInitExpr)
+DEFINE_INDEX(EndElemSegmentInitExpr)
+DEFINE_INDEX_INDEX(OnElemSegmentFunctionIndexCount, "index", "count")
+DEFINE_INDEX_INDEX(OnElemSegmentFunctionIndex, "index", "func_index")
+DEFINE_INDEX(EndElemSegment)
+DEFINE_END(EndElemSection)
+
+DEFINE_BEGIN(BeginDataSection)
+DEFINE_INDEX(OnDataSegmentCount)
+DEFINE_INDEX_INDEX(BeginDataSegment, "index", "memory_index")
+DEFINE_INDEX(BeginDataSegmentInitExpr)
+DEFINE_INDEX(EndDataSegmentInitExpr)
+DEFINE_INDEX(EndDataSegment)
+DEFINE_END(EndDataSection)
+
+DEFINE_BEGIN(BeginNamesSection)
+DEFINE_INDEX(OnFunctionNamesCount)
+DEFINE_INDEX(OnLocalNameFunctionCount)
+DEFINE_INDEX_INDEX(OnLocalNameLocalCount, "index", "count")
+DEFINE_END(EndNamesSection)
+
+DEFINE_BEGIN(BeginRelocSection)
+DEFINE_END(EndRelocSection)
+DEFINE_INDEX_INDEX(OnInitExprGetGlobalExpr, "index", "global_index")
+
+// We don't need to log these (the individual opcodes are logged instead), but
+// we still need to forward the calls.
+Result BinaryReaderLogging::OnOpcode(Opcode opcode) {
+  return reader->OnOpcode(opcode);
+}
+
+Result BinaryReaderLogging::OnOpcodeBare() {
+  return reader->OnOpcodeBare();
+}
+
+Result BinaryReaderLogging::OnOpcodeIndex(Index value) {
+  return reader->OnOpcodeIndex(value);
+}
+
+Result BinaryReaderLogging::OnOpcodeUint32(uint32_t value) {
+  return reader->OnOpcodeUint32(value);
+}
+
+Result BinaryReaderLogging::OnOpcodeUint32Uint32(uint32_t value,
+                                                 uint32_t value2) {
+  return reader->OnOpcodeUint32Uint32(value, value2);
+}
+
+Result BinaryReaderLogging::OnOpcodeUint64(uint64_t value) {
+  return reader->OnOpcodeUint64(value);
+}
+
+Result BinaryReaderLogging::OnOpcodeF32(uint32_t value) {
+  return reader->OnOpcodeF32(value);
+}
+
+Result BinaryReaderLogging::OnOpcodeF64(uint64_t value) {
+  return reader->OnOpcodeF64(value);
+}
+
+Result BinaryReaderLogging::OnOpcodeBlockSig(Index num_types, Type* sig_types) {
+  return reader->OnOpcodeBlockSig(num_types, sig_types);
+}
+
+Result BinaryReaderLogging::OnEndFunc() {
+  return reader->OnEndFunc();
+}
+
+}  // namespace wabt
diff --git a/lib/wabt/src/binary-reader-logging.h b/lib/wabt/src/binary-reader-logging.h
new file mode 100644
index 0000000..db868d1
--- /dev/null
+++ b/lib/wabt/src/binary-reader-logging.h
@@ -0,0 +1,244 @@
+/*
+ * Copyright 2017 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef WABT_BINARY_READER_LOGGING_H_
+#define WABT_BINARY_READER_LOGGING_H_
+
+#include "binary-reader.h"
+
+namespace wabt {
+
+class Stream;
+
+class BinaryReaderLogging : public BinaryReaderDelegate {
+ public:
+  BinaryReaderLogging(Stream*, BinaryReaderDelegate* forward);
+
+  bool OnError(const char* message) override;
+  void OnSetState(const State* s) override;
+
+  Result BeginModule(uint32_t version) override;
+  Result EndModule() override;
+
+  Result BeginSection(BinarySection section_type, Offset size) override;
+
+  Result BeginCustomSection(Offset size, StringSlice section_name) override;
+  Result EndCustomSection() override;
+
+  Result BeginTypeSection(Offset size) override;
+  Result OnTypeCount(Index count) override;
+  Result OnType(Index index,
+                Index param_count,
+                Type* param_types,
+                Index result_count,
+                Type* result_types) override;
+  Result EndTypeSection() override;
+
+  Result BeginImportSection(Offset size) override;
+  Result OnImportCount(Index count) override;
+  Result OnImport(Index index,
+                  StringSlice module_name,
+                  StringSlice field_name) override;
+  Result OnImportFunc(Index import_index,
+                      StringSlice module_name,
+                      StringSlice field_name,
+                      Index func_index,
+                      Index sig_index) override;
+  Result OnImportTable(Index import_index,
+                       StringSlice module_name,
+                       StringSlice field_name,
+                       Index table_index,
+                       Type elem_type,
+                       const Limits* elem_limits) override;
+  Result OnImportMemory(Index import_index,
+                        StringSlice module_name,
+                        StringSlice field_name,
+                        Index memory_index,
+                        const Limits* page_limits) override;
+  Result OnImportGlobal(Index import_index,
+                        StringSlice module_name,
+                        StringSlice field_name,
+                        Index global_index,
+                        Type type,
+                        bool mutable_) override;
+  Result EndImportSection() override;
+
+  Result BeginFunctionSection(Offset size) override;
+  Result OnFunctionCount(Index count) override;
+  Result OnFunction(Index index, Index sig_index) override;
+  Result EndFunctionSection() override;
+
+  Result BeginTableSection(Offset size) override;
+  Result OnTableCount(Index count) override;
+  Result OnTable(Index index,
+                 Type elem_type,
+                 const Limits* elem_limits) override;
+  Result EndTableSection() override;
+
+  Result BeginMemorySection(Offset size) override;
+  Result OnMemoryCount(Index count) override;
+  Result OnMemory(Index index, const Limits* limits) override;
+  Result EndMemorySection() override;
+
+  Result BeginGlobalSection(Offset size) override;
+  Result OnGlobalCount(Index count) override;
+  Result BeginGlobal(Index index, Type type, bool mutable_) override;
+  Result BeginGlobalInitExpr(Index index) override;
+  Result EndGlobalInitExpr(Index index) override;
+  Result EndGlobal(Index index) override;
+  Result EndGlobalSection() override;
+
+  Result BeginExportSection(Offset size) override;
+  Result OnExportCount(Index count) override;
+  Result OnExport(Index index,
+                  ExternalKind kind,
+                  Index item_index,
+                  StringSlice name) override;
+  Result EndExportSection() override;
+
+  Result BeginStartSection(Offset size) override;
+  Result OnStartFunction(Index func_index) override;
+  Result EndStartSection() override;
+
+  Result BeginCodeSection(Offset size) override;
+  Result OnFunctionBodyCount(Index count) override;
+  Result BeginFunctionBody(Index index) override;
+  Result OnLocalDeclCount(Index count) override;
+  Result OnLocalDecl(Index decl_index, Index count, Type type) override;
+
+  Result OnOpcode(Opcode opcode) override;
+  Result OnOpcodeBare() override;
+  Result OnOpcodeIndex(Index value) override;
+  Result OnOpcodeUint32(uint32_t value) override;
+  Result OnOpcodeUint32Uint32(uint32_t value, uint32_t value2) override;
+  Result OnOpcodeUint64(uint64_t value) override;
+  Result OnOpcodeF32(uint32_t value) override;
+  Result OnOpcodeF64(uint64_t value) override;
+  Result OnOpcodeBlockSig(Index num_types, Type* sig_types) override;
+  Result OnBinaryExpr(Opcode opcode) override;
+  Result OnBlockExpr(Index num_types, Type* sig_types) override;
+  Result OnBrExpr(Index depth) override;
+  Result OnBrIfExpr(Index depth) override;
+  Result OnBrTableExpr(Index num_targets,
+                       Index* target_depths,
+                       Index default_target_depth) override;
+  Result OnCallExpr(Index func_index) override;
+  Result OnCallIndirectExpr(Index sig_index) override;
+  Result OnCompareExpr(Opcode opcode) override;
+  Result OnConvertExpr(Opcode opcode) override;
+  Result OnCurrentMemoryExpr() override;
+  Result OnDropExpr() override;
+  Result OnElseExpr() override;
+  Result OnEndExpr() override;
+  Result OnEndFunc() override;
+  Result OnF32ConstExpr(uint32_t value_bits) override;
+  Result OnF64ConstExpr(uint64_t value_bits) override;
+  Result OnGetGlobalExpr(Index global_index) override;
+  Result OnGetLocalExpr(Index local_index) override;
+  Result OnGrowMemoryExpr() override;
+  Result OnI32ConstExpr(uint32_t value) override;
+  Result OnI64ConstExpr(uint64_t value) override;
+  Result OnIfExpr(Index num_types, Type* sig_types) override;
+  Result OnLoadExpr(Opcode opcode,
+                    uint32_t alignment_log2,
+                    Address offset) override;
+  Result OnLoopExpr(Index num_types, Type* sig_types) override;
+  Result OnNopExpr() override;
+  Result OnReturnExpr() override;
+  Result OnSelectExpr() override;
+  Result OnSetGlobalExpr(Index global_index) override;
+  Result OnSetLocalExpr(Index local_index) override;
+  Result OnStoreExpr(Opcode opcode,
+                     uint32_t alignment_log2,
+                     Address offset) override;
+  Result OnTeeLocalExpr(Index local_index) override;
+  Result OnUnaryExpr(Opcode opcode) override;
+  Result OnUnreachableExpr() override;
+  Result EndFunctionBody(Index index) override;
+  Result EndCodeSection() override;
+
+  Result BeginElemSection(Offset size) override;
+  Result OnElemSegmentCount(Index count) override;
+  Result BeginElemSegment(Index index, Index table_index) override;
+  Result BeginElemSegmentInitExpr(Index index) override;
+  Result EndElemSegmentInitExpr(Index index) override;
+  Result OnElemSegmentFunctionIndexCount(Index index,
+                                         Index count) override;
+  Result OnElemSegmentFunctionIndex(Index index,
+                                    Index func_index) override;
+  Result EndElemSegment(Index index) override;
+  Result EndElemSection() override;
+
+  Result BeginDataSection(Offset size) override;
+  Result OnDataSegmentCount(Index count) override;
+  Result BeginDataSegment(Index index, Index memory_index) override;
+  Result BeginDataSegmentInitExpr(Index index) override;
+  Result EndDataSegmentInitExpr(Index index) override;
+  Result OnDataSegmentData(Index index,
+                           const void* data,
+                           Address size) override;
+  Result EndDataSegment(Index index) override;
+  Result EndDataSection() override;
+
+  Result BeginNamesSection(Offset size) override;
+  Result OnFunctionNameSubsection(Index index,
+                                  uint32_t name_type,
+                                  Offset subsection_size) override;
+  Result OnFunctionNamesCount(Index num_functions) override;
+  Result OnFunctionName(Index function_index,
+                        StringSlice function_name) override;
+  Result OnLocalNameSubsection(Index index,
+                               uint32_t name_type,
+                               Offset subsection_size) override;
+  Result OnLocalNameFunctionCount(Index num_functions) override;
+  Result OnLocalNameLocalCount(Index function_index,
+                               Index num_locals) override;
+  Result OnLocalName(Index function_index,
+                     Index local_index,
+                     StringSlice local_name) override;
+  Result EndNamesSection() override;
+
+  Result BeginRelocSection(Offset size) override;
+  Result OnRelocCount(Index count,
+                      BinarySection section_code,
+                      StringSlice section_name) override;
+  Result OnReloc(RelocType type,
+                 Offset offset,
+                 Index index,
+                 uint32_t addend) override;
+  Result EndRelocSection() override;
+
+  Result OnInitExprF32ConstExpr(Index index, uint32_t value) override;
+  Result OnInitExprF64ConstExpr(Index index, uint64_t value) override;
+  Result OnInitExprGetGlobalExpr(Index index,
+                                 Index global_index) override;
+  Result OnInitExprI32ConstExpr(Index index, uint32_t value) override;
+  Result OnInitExprI64ConstExpr(Index index, uint64_t value) override;
+
+ private:
+  void Indent();
+  void Dedent();
+  void WriteIndent();
+  void LogTypes(Index type_count, Type* types);
+
+  Stream* stream;
+  BinaryReaderDelegate* reader;
+  int indent;
+};
+
+}  // namespace wabt
+
+#endif  // WABT_BINARY_READER_LOGGING_H_
diff --git a/lib/wabt/src/binary-reader-nop.h b/lib/wabt/src/binary-reader-nop.h
new file mode 100644
index 0000000..7af11f7
--- /dev/null
+++ b/lib/wabt/src/binary-reader-nop.h
@@ -0,0 +1,327 @@
+/*
+ * Copyright 2016 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef WABT_BINARY_READER_NOP_H_
+#define WABT_BINARY_READER_NOP_H_
+
+#include "binary-reader.h"
+
+namespace wabt {
+
+class BinaryReaderNop : public BinaryReaderDelegate {
+ public:
+  bool OnError(const char* message) override { return false; }
+
+  /* Module */
+  Result BeginModule(uint32_t version) override { return Result::Ok; }
+  Result EndModule() override { return Result::Ok; }
+
+  Result BeginSection(BinarySection section_type, Offset size) override {
+    return Result::Ok;
+  }
+
+  /* Custom section */
+  Result BeginCustomSection(Offset size, StringSlice section_name) override {
+    return Result::Ok;
+  }
+  Result EndCustomSection() override { return Result::Ok; }
+
+  /* Type section */
+  Result BeginTypeSection(Offset size) override { return Result::Ok; }
+  Result OnTypeCount(Index count) override { return Result::Ok; }
+  Result OnType(Index index,
+                Index param_count,
+                Type* param_types,
+                Index result_count,
+                Type* result_types) override {
+    return Result::Ok;
+  }
+  Result EndTypeSection() override { return Result::Ok; }
+
+  /* Import section */
+  Result BeginImportSection(Offset size) override { return Result::Ok; }
+  Result OnImportCount(Index count) override { return Result::Ok; }
+  Result OnImport(Index index,
+                  StringSlice module_name,
+                  StringSlice field_name) override {
+    return Result::Ok;
+  }
+  Result OnImportFunc(Index import_index,
+                      StringSlice module_name,
+                      StringSlice field_name,
+                      Index func_index,
+                      Index sig_index) override {
+    return Result::Ok;
+  }
+  Result OnImportTable(Index import_index,
+                       StringSlice module_name,
+                       StringSlice field_name,
+                       Index table_index,
+                       Type elem_type,
+                       const Limits* elem_limits) override {
+    return Result::Ok;
+  }
+  Result OnImportMemory(Index import_index,
+                        StringSlice module_name,
+                        StringSlice field_name,
+                        Index memory_index,
+                        const Limits* page_limits) override {
+    return Result::Ok;
+  }
+  Result OnImportGlobal(Index import_index,
+                        StringSlice module_name,
+                        StringSlice field_name,
+                        Index global_index,
+                        Type type,
+                        bool mutable_) override {
+    return Result::Ok;
+  }
+  Result EndImportSection() override { return Result::Ok; }
+
+  /* Function section */
+  Result BeginFunctionSection(Offset size) override { return Result::Ok; }
+  Result OnFunctionCount(Index count) override { return Result::Ok; }
+  Result OnFunction(Index index, Index sig_index) override {
+    return Result::Ok;
+  }
+  Result EndFunctionSection() override { return Result::Ok; }
+
+  /* Table section */
+  Result BeginTableSection(Offset size) override { return Result::Ok; }
+  Result OnTableCount(Index count) override { return Result::Ok; }
+  Result OnTable(Index index,
+                 Type elem_type,
+                 const Limits* elem_limits) override {
+    return Result::Ok;
+  }
+  Result EndTableSection() override { return Result::Ok; }
+
+  /* Memory section */
+  Result BeginMemorySection(Offset size) override { return Result::Ok; }
+  Result OnMemoryCount(Index count) override { return Result::Ok; }
+  Result OnMemory(Index index, const Limits* limits) override {
+    return Result::Ok;
+  }
+  Result EndMemorySection() override { return Result::Ok; }
+
+  /* Global section */
+  Result BeginGlobalSection(Offset size) override { return Result::Ok; }
+  Result OnGlobalCount(Index count) override { return Result::Ok; }
+  Result BeginGlobal(Index index, Type type, bool mutable_) override {
+    return Result::Ok;
+  }
+  Result BeginGlobalInitExpr(Index index) override { return Result::Ok; }
+  Result EndGlobalInitExpr(Index index) override { return Result::Ok; }
+  Result EndGlobal(Index index) override { return Result::Ok; }
+  Result EndGlobalSection() override { return Result::Ok; }
+
+  /* Exports section */
+  Result BeginExportSection(Offset size) override { return Result::Ok; }
+  Result OnExportCount(Index count) override { return Result::Ok; }
+  Result OnExport(Index index,
+                  ExternalKind kind,
+                  Index item_index,
+                  StringSlice name) override {
+    return Result::Ok;
+  }
+  Result EndExportSection() override { return Result::Ok; }
+
+  /* Start section */
+  Result BeginStartSection(Offset size) override { return Result::Ok; }
+  Result OnStartFunction(Index func_index) override { return Result::Ok; }
+  Result EndStartSection() override { return Result::Ok; }
+
+  /* Code section */
+  Result BeginCodeSection(Offset size) override { return Result::Ok; }
+  Result OnFunctionBodyCount(Index count) override { return Result::Ok; }
+  Result BeginFunctionBody(Index index) override { return Result::Ok; }
+  Result OnLocalDeclCount(Index count) override { return Result::Ok; }
+  Result OnLocalDecl(Index decl_index, Index count, Type type) override {
+    return Result::Ok;
+  }
+
+  /* Function expressions; called between BeginFunctionBody and
+   EndFunctionBody */
+  Result OnOpcode(Opcode Opcode) override { return Result::Ok; }
+  Result OnOpcodeBare() override { return Result::Ok; }
+  Result OnOpcodeIndex(Index value) override { return Result::Ok; }
+  Result OnOpcodeUint32(uint32_t value) override { return Result::Ok; }
+  Result OnOpcodeUint32Uint32(uint32_t value, uint32_t value2) override {
+    return Result::Ok;
+  }
+  Result OnOpcodeUint64(uint64_t value) override { return Result::Ok; }
+  Result OnOpcodeF32(uint32_t value) override { return Result::Ok; }
+  Result OnOpcodeF64(uint64_t value) override { return Result::Ok; }
+  Result OnOpcodeBlockSig(Index num_types, Type* sig_types) override {
+    return Result::Ok;
+  }
+  Result OnBinaryExpr(Opcode opcode) override { return Result::Ok; }
+  Result OnBlockExpr(Index num_types, Type* sig_types) override {
+    return Result::Ok;
+  }
+  Result OnBrExpr(Index depth) override { return Result::Ok; }
+  Result OnBrIfExpr(Index depth) override { return Result::Ok; }
+  Result OnBrTableExpr(Index num_targets,
+                       Index* target_depths,
+                       Index default_target_depth) override {
+    return Result::Ok;
+  }
+  Result OnCallExpr(Index func_index) override { return Result::Ok; }
+  Result OnCallIndirectExpr(Index sig_index) override { return Result::Ok; }
+  Result OnCompareExpr(Opcode opcode) override { return Result::Ok; }
+  Result OnConvertExpr(Opcode opcode) override { return Result::Ok; }
+  Result OnCurrentMemoryExpr() override { return Result::Ok; }
+  Result OnDropExpr() override { return Result::Ok; }
+  Result OnElseExpr() override { return Result::Ok; }
+  Result OnEndExpr() override { return Result::Ok; }
+  Result OnEndFunc() override { return Result::Ok; }
+  Result OnF32ConstExpr(uint32_t value_bits) override { return Result::Ok; }
+  Result OnF64ConstExpr(uint64_t value_bits) override { return Result::Ok; }
+  Result OnGetGlobalExpr(Index global_index) override { return Result::Ok; }
+  Result OnGetLocalExpr(Index local_index) override { return Result::Ok; }
+  Result OnGrowMemoryExpr() override { return Result::Ok; }
+  Result OnI32ConstExpr(uint32_t value) override { return Result::Ok; }
+  Result OnI64ConstExpr(uint64_t value) override { return Result::Ok; }
+  Result OnIfExpr(Index num_types, Type* sig_types) override {
+    return Result::Ok;
+  }
+  Result OnLoadExpr(Opcode opcode,
+                    uint32_t alignment_log2,
+                    Address offset) override {
+    return Result::Ok;
+  }
+  Result OnLoopExpr(Index num_types, Type* sig_types) override {
+    return Result::Ok;
+  }
+  Result OnNopExpr() override { return Result::Ok; }
+  Result OnReturnExpr() override { return Result::Ok; }
+  Result OnSelectExpr() override { return Result::Ok; }
+  Result OnSetGlobalExpr(Index global_index) override { return Result::Ok; }
+  Result OnSetLocalExpr(Index local_index) override { return Result::Ok; }
+  Result OnStoreExpr(Opcode opcode,
+                     uint32_t alignment_log2,
+                     Address offset) override {
+    return Result::Ok;
+  }
+  Result OnTeeLocalExpr(Index local_index) override { return Result::Ok; }
+  Result OnUnaryExpr(Opcode opcode) override { return Result::Ok; }
+  Result OnUnreachableExpr() override { return Result::Ok; }
+  Result EndFunctionBody(Index index) override { return Result::Ok; }
+  Result EndCodeSection() override { return Result::Ok; }
+
+  /* Elem section */
+  Result BeginElemSection(Offset size) override { return Result::Ok; }
+  Result OnElemSegmentCount(Index count) override { return Result::Ok; }
+  Result BeginElemSegment(Index index, Index table_index) override {
+    return Result::Ok;
+  }
+  Result BeginElemSegmentInitExpr(Index index) override { return Result::Ok; }
+  Result EndElemSegmentInitExpr(Index index) override { return Result::Ok; }
+  Result OnElemSegmentFunctionIndexCount(Index index, Index count) override {
+    return Result::Ok;
+  }
+  Result OnElemSegmentFunctionIndex(Index index, Index func_index) override {
+    return Result::Ok;
+  }
+  Result EndElemSegment(Index index) override { return Result::Ok; }
+  Result EndElemSection() override { return Result::Ok; }
+
+  /* Data section */
+  Result BeginDataSection(Offset size) override { return Result::Ok; }
+  Result OnDataSegmentCount(Index count) override { return Result::Ok; }
+  Result BeginDataSegment(Index index, Index memory_index) override {
+    return Result::Ok;
+  }
+  Result BeginDataSegmentInitExpr(Index index) override { return Result::Ok; }
+  Result EndDataSegmentInitExpr(Index index) override { return Result::Ok; }
+  Result OnDataSegmentData(Index index,
+                           const void* data,
+                           Address size) override {
+    return Result::Ok;
+  }
+  Result EndDataSegment(Index index) override { return Result::Ok; }
+  Result EndDataSection() override { return Result::Ok; }
+
+  /* Names section */
+  Result BeginNamesSection(Offset size) override { return Result::Ok; }
+  Result OnFunctionNameSubsection(Index index,
+                                  uint32_t name_type,
+                                  Offset subsection_size) override {
+    return Result::Ok;
+  }
+  Result OnFunctionNamesCount(Index num_functions) override {
+    return Result::Ok;
+  }
+  Result OnFunctionName(Index function_index,
+                        StringSlice function_name) override {
+    return Result::Ok;
+  }
+  Result OnLocalNameSubsection(Index index,
+                               uint32_t name_type,
+                               Offset subsection_size) override {
+    return Result::Ok;
+  }
+  Result OnLocalNameFunctionCount(Index num_functions) override {
+    return Result::Ok;
+  }
+  Result OnLocalNameLocalCount(Index function_index,
+                               Index num_locals) override {
+    return Result::Ok;
+  }
+  Result OnLocalName(Index function_index,
+                     Index local_index,
+                     StringSlice local_name) override {
+    return Result::Ok;
+  }
+  Result EndNamesSection() override { return Result::Ok; }
+
+  /* Reloc section */
+  Result BeginRelocSection(Offset size) override { return Result::Ok; }
+  Result OnRelocCount(Index count,
+                      BinarySection section_code,
+                      StringSlice section_name) override {
+    return Result::Ok;
+  }
+  Result OnReloc(RelocType type,
+                 Offset offset,
+                 Index index,
+                 uint32_t addend) override {
+    return Result::Ok;
+  }
+  Result EndRelocSection() override { return Result::Ok; }
+
+  /* InitExpr - used by elem, data and global sections; these functions are
+   * only called between calls to Begin*InitExpr and End*InitExpr */
+  Result OnInitExprF32ConstExpr(Index index, uint32_t value) override {
+    return Result::Ok;
+  }
+  Result OnInitExprF64ConstExpr(Index index, uint64_t value) override {
+    return Result::Ok;
+  }
+  Result OnInitExprGetGlobalExpr(Index index, Index global_index) override {
+    return Result::Ok;
+  }
+  Result OnInitExprI32ConstExpr(Index index, uint32_t value) override {
+    return Result::Ok;
+  }
+  Result OnInitExprI64ConstExpr(Index index, uint64_t value) override {
+    return Result::Ok;
+  }
+};
+
+}  // namespace wabt
+
+#endif /* WABT_BINARY_READER_H_ */
diff --git a/lib/wabt/src/binary-reader-objdump.cc b/lib/wabt/src/binary-reader-objdump.cc
index 47f0577..f80248b 100644
--- a/lib/wabt/src/binary-reader-objdump.cc
+++ b/lib/wabt/src/binary-reader-objdump.cc
@@ -16,135 +16,66 @@
 
 #include "binary-reader-objdump.h"
 
-#include <assert.h>
-#include <inttypes.h>
-#include <string.h>
-#include <stdio.h>
-
+#include <algorithm>
+#include <cassert>
+#include <cinttypes>
+#include <cstdio>
+#include <cstring>
 #include <vector>
 
-#include "binary-reader.h"
+#include "binary-reader-nop.h"
 #include "literal.h"
 
 namespace wabt {
 
 namespace {
 
-typedef std::vector<uint32_t> Uint32Vector;
+class BinaryReaderObjdumpBase : public BinaryReaderNop {
+ public:
+  BinaryReaderObjdumpBase(const uint8_t* data,
+                          size_t size,
+                          ObjdumpOptions* options,
+                          ObjdumpState* state);
 
-struct Context {
+  Result BeginModule(uint32_t version) override;
+  Result BeginSection(BinarySection section_type, Offset size) override;
+
+  Result OnRelocCount(Index count,
+                      BinarySection section_code,
+                      StringSlice section_name) override;
+
+ protected:
+  const char* GetFunctionName(Index index);
+
   ObjdumpOptions* options;
-  Stream* out_stream;
+  ObjdumpState* objdump_state;
   const uint8_t* data;
   size_t size;
-  Opcode current_opcode;
-  size_t current_opcode_offset;
-  size_t last_opcode_end;
-  int indent_level;
-  bool print_details;
-  bool header_printed;
-  int section_found;
-
-  uint32_t section_starts[kBinarySectionCount];
-  BinarySection reloc_section;
-
-  uint32_t next_reloc;
+  bool print_details = false;
+  BinarySection reloc_section = BinarySection::Invalid;
+  Offset section_starts[kBinarySectionCount];
+  bool section_found = false;
 };
 
-}  // namespace
-
-static bool should_print_details(Context* ctx) {
-  if (ctx->options->mode != ObjdumpMode::Details)
-    return false;
-  return ctx->print_details;
+BinaryReaderObjdumpBase::BinaryReaderObjdumpBase(const uint8_t* data,
+                                                 size_t size,
+                                                 ObjdumpOptions* options,
+                                                 ObjdumpState* objdump_state)
+    : options(options),
+      objdump_state(objdump_state),
+      data(data),
+      size(size) {
+  WABT_ZERO_MEMORY(section_starts);
 }
 
-static void WABT_PRINTF_FORMAT(2, 3)
-    print_details(Context* ctx, const char* fmt, ...) {
-  if (!should_print_details(ctx))
-    return;
-  va_list args;
-  va_start(args, fmt);
-  vprintf(fmt, args);
-  va_end(args);
-}
-
-static Result begin_section(BinaryReaderContext* ctx,
-                            BinarySection section_code,
-                            uint32_t size) {
-  Context* context = static_cast<Context*>(ctx->user_data);
-  context->section_starts[static_cast<size_t>(section_code)] = ctx->offset;
-
-  const char* name = get_section_name(section_code);
-
-  bool section_match = !context->options->section_name ||
-                       !strcasecmp(context->options->section_name, name);
-  if (section_match)
-    context->section_found = true;
-
-  switch (context->options->mode) {
-    case ObjdumpMode::Prepass:
-      break;
-    case ObjdumpMode::Headers:
-      printf("%9s start=%#010" PRIzx " end=%#010" PRIzx " (size=%#010x) ", name,
-             ctx->offset, ctx->offset + size, size);
-      break;
-    case ObjdumpMode::Details:
-      if (section_match) {
-        if (section_code != BinarySection::Code)
-          printf("%s:\n", name);
-        context->print_details = true;
-      } else {
-        context->print_details = false;
-      }
-      break;
-    case ObjdumpMode::RawData:
-      if (section_match) {
-        printf("\nContents of section %s:\n", name);
-        write_memory_dump(context->out_stream, context->data + ctx->offset,
-                          size, ctx->offset, PrintChars::Yes, nullptr, nullptr);
-      }
-      break;
-    case ObjdumpMode::Disassemble:
-      break;
-  }
+Result BinaryReaderObjdumpBase::BeginSection(BinarySection section_code,
+                                             Offset size) {
+  section_starts[static_cast<size_t>(section_code)] = state->offset;
   return Result::Ok;
 }
 
-static Result begin_custom_section(BinaryReaderContext* ctx,
-                                   uint32_t size,
-                                   StringSlice section_name) {
-  Context* context = static_cast<Context*>(ctx->user_data);
-  print_details(context, " - name: \"" PRIstringslice "\"\n",
-                WABT_PRINTF_STRING_SLICE_ARG(section_name));
-  if (context->options->mode == ObjdumpMode::Headers) {
-    printf("\"" PRIstringslice "\"\n",
-           WABT_PRINTF_STRING_SLICE_ARG(section_name));
-  }
-  return Result::Ok;
-}
-
-static Result on_count(uint32_t count, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  if (ctx->options->mode == ObjdumpMode::Headers) {
-    printf("count: %d\n", count);
-  }
-  return Result::Ok;
-}
-
-static Result begin_module(uint32_t version, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  if (ctx->options->print_header) {
-    const char* basename = strrchr(ctx->options->infile, '/');
-    if (basename)
-      basename++;
-    else
-      basename = ctx->options->infile;
-    printf("%s:\tfile format wasm %#08x\n", basename, version);
-    ctx->header_printed = true;
-  }
-
-  switch (ctx->options->mode) {
+Result BinaryReaderObjdumpBase::BeginModule(uint32_t version) {
+  switch (options->mode) {
     case ObjdumpMode::Headers:
       printf("\n");
       printf("Sections:\n\n");
@@ -157,64 +88,142 @@
       printf("\n");
       printf("Code Disassembly:\n\n");
       break;
+    case ObjdumpMode::Prepass: {
+      const char* last_slash = strrchr(options->filename, '/');
+      const char* last_backslash = strrchr(options->filename, '\\');
+      const char* basename;
+      if (last_slash && last_backslash) {
+        basename = std::max(last_slash, last_backslash) + 1;
+      } else if (last_slash) {
+        basename = last_slash + 1;
+      } else if (last_backslash) {
+        basename = last_backslash + 1;
+      } else {
+        basename = options->filename;
+      }
+
+      printf("%s:\tfile format wasm %#x\n", basename, version);
+      break;
+    }
     case ObjdumpMode::RawData:
-    case ObjdumpMode::Prepass:
       break;
   }
 
   return Result::Ok;
 }
 
-static Result end_module(void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  if (ctx->options->section_name) {
-    if (!ctx->section_found) {
-      printf("Section not found: %s\n", ctx->options->section_name);
-      return Result::Error;
-    }
-  }
+const char* BinaryReaderObjdumpBase::GetFunctionName(Index index) {
+  if (index >= objdump_state->function_names.size() ||
+      objdump_state->function_names[index].empty())
+    return nullptr;
 
+  return objdump_state->function_names[index].c_str();
+}
+
+Result BinaryReaderObjdumpBase::OnRelocCount(Index count,
+                                             BinarySection section_code,
+                                             StringSlice section_name) {
+  reloc_section = section_code;
   return Result::Ok;
 }
 
-static Result on_opcode(BinaryReaderContext* ctx, Opcode opcode) {
-  Context* context = static_cast<Context*>(ctx->user_data);
+class BinaryReaderObjdumpPrepass : public BinaryReaderObjdumpBase {
+ public:
+  using BinaryReaderObjdumpBase::BinaryReaderObjdumpBase;
 
-  if (context->options->debug) {
+  Result OnFunctionName(Index function_index,
+                        StringSlice function_name) override;
+  Result OnReloc(RelocType type,
+                 Offset offset,
+                 Index index,
+                 uint32_t addend) override;
+};
+
+Result BinaryReaderObjdumpPrepass::OnFunctionName(Index index,
+                                                  StringSlice name) {
+  objdump_state->function_names.resize(index + 1);
+  objdump_state->function_names[index] = string_slice_to_string(name);
+  return Result::Ok;
+}
+
+Result BinaryReaderObjdumpPrepass::OnReloc(RelocType type,
+                                           Offset offset,
+                                           Index index,
+                                           uint32_t addend) {
+  BinaryReaderObjdumpBase::OnReloc(type, offset, index, addend);
+  if (reloc_section == BinarySection::Code) {
+    objdump_state->code_relocations.emplace_back(type, offset, index, addend);
+  }
+  return Result::Ok;
+}
+
+class BinaryReaderObjdumpDisassemble : public BinaryReaderObjdumpBase {
+ public:
+  using BinaryReaderObjdumpBase::BinaryReaderObjdumpBase;
+
+  Result BeginFunctionBody(Index index) override;
+
+  Result OnOpcode(Opcode Opcode) override;
+  Result OnOpcodeBare() override;
+  Result OnOpcodeIndex(Index value) override;
+  Result OnOpcodeUint32(uint32_t value) override;
+  Result OnOpcodeUint32Uint32(uint32_t value, uint32_t value2) override;
+  Result OnOpcodeUint64(uint64_t value) override;
+  Result OnOpcodeF32(uint32_t value) override;
+  Result OnOpcodeF64(uint64_t value) override;
+  Result OnOpcodeBlockSig(Index num_types, Type* sig_types) override;
+
+  Result OnBrTableExpr(Index num_targets,
+                       Index* target_depths,
+                       Index default_target_depth) override;
+  Result OnEndExpr() override;
+  Result OnEndFunc() override;
+
+ private:
+  void LogOpcode(const uint8_t* data, size_t data_size, const char* fmt, ...);
+
+  Opcode current_opcode = Opcode::Unreachable;
+  Offset current_opcode_offset = 0;
+  size_t last_opcode_end = 0;
+  int indent_level = 0;
+  Index next_reloc = 0;
+};
+
+Result BinaryReaderObjdumpDisassemble::OnOpcode(Opcode opcode) {
+  if (options->debug) {
     const char* opcode_name = get_opcode_name(opcode);
-    printf("on_opcode: %#" PRIzx ": %s\n", ctx->offset, opcode_name);
+    printf("on_opcode: %#" PRIzx ": %s\n", state->offset, opcode_name);
   }
 
-  if (context->last_opcode_end) {
-    if (ctx->offset != context->last_opcode_end + 1) {
-      uint8_t missing_opcode = ctx->data[context->last_opcode_end];
+  if (last_opcode_end) {
+    if (state->offset != last_opcode_end + 1) {
+      uint8_t missing_opcode = data[last_opcode_end];
       const char* opcode_name =
           get_opcode_name(static_cast<Opcode>(missing_opcode));
       fprintf(stderr, "warning: %#" PRIzx " missing opcode callback at %#" PRIzx
                       " (%#02x=%s)\n",
-              ctx->offset, context->last_opcode_end + 1,
-              ctx->data[context->last_opcode_end], opcode_name);
+              state->offset, last_opcode_end + 1, data[last_opcode_end],
+              opcode_name);
       return Result::Error;
     }
   }
 
-  context->current_opcode_offset = ctx->offset;
-  context->current_opcode = opcode;
+  current_opcode_offset = state->offset;
+  current_opcode = opcode;
   return Result::Ok;
 }
 
 #define IMMEDIATE_OCTET_COUNT 9
 
-static void log_opcode(Context* ctx,
-                       const uint8_t* data,
-                       size_t data_size,
-                       const char* fmt,
-                       ...) {
-  size_t offset = ctx->current_opcode_offset;
+void BinaryReaderObjdumpDisassemble::LogOpcode(const uint8_t* data,
+                                              size_t data_size,
+                                              const char* fmt,
+                                              ...) {
+  Offset offset = current_opcode_offset;
 
   // Print binary data
   printf(" %06" PRIzx ": %02x", offset - 1,
-         static_cast<unsigned>(ctx->current_opcode));
+         static_cast<unsigned>(current_opcode));
   for (size_t i = 0; i < data_size && i < IMMEDIATE_OCTET_COUNT;
        i++, offset++) {
     printf(" %02x", data[offset]);
@@ -225,14 +234,14 @@
   printf(" | ");
 
   // Print disassemble
-  int indent_level = ctx->indent_level;
-  if (ctx->current_opcode == Opcode::Else)
+  int indent_level = this->indent_level;
+  if (current_opcode == Opcode::Else)
     indent_level--;
   for (int j = 0; j < indent_level; j++) {
     printf("  ");
   }
 
-  const char* opcode_name = get_opcode_name(ctx->current_opcode);
+  const char* opcode_name = get_opcode_name(current_opcode);
   printf("%s", opcode_name);
   if (fmt) {
     printf(" ");
@@ -244,106 +253,119 @@
 
   printf("\n");
 
-  ctx->last_opcode_end = ctx->current_opcode_offset + data_size;
+  last_opcode_end = current_opcode_offset + data_size;
 
-  if (ctx->options->relocs) {
-    if (ctx->next_reloc < ctx->options->code_relocations.size()) {
-      Reloc* reloc = &ctx->options->code_relocations[ctx->next_reloc];
-      size_t code_start =
-          ctx->section_starts[static_cast<size_t>(BinarySection::Code)];
-      size_t abs_offset = code_start + reloc->offset;
-      if (ctx->last_opcode_end > abs_offset) {
-        printf("           %06" PRIzx ": %-18s %d", abs_offset,
-               get_reloc_type_name(reloc->type), reloc->index);
-        switch (reloc->type) {
-          case RelocType::MemoryAddressLEB:
-          case RelocType::MemoryAddressSLEB:
-          case RelocType::MemoryAddressI32:
-            printf(" + %d", reloc->addend);
-            break;
-          default:
-            break;
-        }
-        printf("\n");
-        ctx->next_reloc++;
+  if (options->relocs && next_reloc < objdump_state->code_relocations.size()) {
+    Reloc* reloc = &objdump_state->code_relocations[next_reloc];
+    Offset code_start =
+        section_starts[static_cast<size_t>(BinarySection::Code)];
+    Offset abs_offset = code_start + reloc->offset;
+    if (last_opcode_end > abs_offset) {
+      printf("           %06" PRIzx ": %-18s %" PRIindex "", abs_offset,
+             get_reloc_type_name(reloc->type), reloc->index);
+      switch (reloc->type) {
+        case RelocType::GlobalAddressLEB:
+        case RelocType::GlobalAddressSLEB:
+        case RelocType::GlobalAddressI32:
+          printf(" + %d", reloc->addend);
+          break;
+        case RelocType::FuncIndexLEB:
+          if (const char* name = GetFunctionName(reloc->index)) {
+            printf(" <%s>", name);
+          }
+        default:
+          break;
       }
+      printf("\n");
+      next_reloc++;
     }
   }
 }
 
-static Result on_opcode_bare(BinaryReaderContext* ctx) {
-  Context* context = static_cast<Context*>(ctx->user_data);
-  log_opcode(context, ctx->data, 0, nullptr);
+Result BinaryReaderObjdumpDisassemble::OnOpcodeBare() {
+  LogOpcode(data, 0, nullptr);
   return Result::Ok;
 }
 
-static Result on_opcode_uint32(BinaryReaderContext* ctx, uint32_t value) {
-  Context* context = static_cast<Context*>(ctx->user_data);
-  size_t immediate_len = ctx->offset - context->current_opcode_offset;
-  log_opcode(context, ctx->data, immediate_len, "%#x", value);
+Result BinaryReaderObjdumpDisassemble::OnOpcodeIndex(Index value) {
+  Offset immediate_len = state->offset - current_opcode_offset;
+  const char *name;
+  if (current_opcode == Opcode::Call && (name = GetFunctionName(value)))
+    LogOpcode(data, immediate_len, "%d <%s>", value, name);
+  else
+    LogOpcode(data, immediate_len, "%d", value);
   return Result::Ok;
 }
 
-static Result on_opcode_uint32_uint32(BinaryReaderContext* ctx,
-                                      uint32_t value,
-                                      uint32_t value2) {
-  Context* context = static_cast<Context*>(ctx->user_data);
-  size_t immediate_len = ctx->offset - context->current_opcode_offset;
-  log_opcode(context, ctx->data, immediate_len, "%lu %lu", value, value2);
+Result BinaryReaderObjdumpDisassemble::OnOpcodeUint32(uint32_t value) {
+  Offset immediate_len = state->offset - current_opcode_offset;
+  LogOpcode(data, immediate_len, "%u", value);
   return Result::Ok;
 }
 
-static Result on_opcode_uint64(BinaryReaderContext* ctx, uint64_t value) {
-  Context* context = static_cast<Context*>(ctx->user_data);
-  size_t immediate_len = ctx->offset - context->current_opcode_offset;
-  log_opcode(context, ctx->data, immediate_len, "%d", value);
+Result BinaryReaderObjdumpDisassemble::OnOpcodeUint32Uint32(uint32_t value,
+                                                 uint32_t value2) {
+  Offset immediate_len = state->offset - current_opcode_offset;
+  LogOpcode(data, immediate_len, "%lu %lu", value, value2);
   return Result::Ok;
 }
 
-static Result on_opcode_f32(BinaryReaderContext* ctx, uint32_t value) {
-  Context* context = static_cast<Context*>(ctx->user_data);
-  size_t immediate_len = ctx->offset - context->current_opcode_offset;
+Result BinaryReaderObjdumpDisassemble::OnOpcodeUint64(uint64_t value) {
+  Offset immediate_len = state->offset - current_opcode_offset;
+  LogOpcode(data, immediate_len, "%" PRId64, value);
+  return Result::Ok;
+}
+
+Result BinaryReaderObjdumpDisassemble::OnOpcodeF32(uint32_t value) {
+  Offset immediate_len = state->offset - current_opcode_offset;
   char buffer[WABT_MAX_FLOAT_HEX];
   write_float_hex(buffer, sizeof(buffer), value);
-  log_opcode(context, ctx->data, immediate_len, buffer);
+  LogOpcode(data, immediate_len, buffer);
   return Result::Ok;
 }
 
-static Result on_opcode_f64(BinaryReaderContext* ctx, uint64_t value) {
-  Context* context = static_cast<Context*>(ctx->user_data);
-  size_t immediate_len = ctx->offset - context->current_opcode_offset;
+Result BinaryReaderObjdumpDisassemble::OnOpcodeF64(uint64_t value) {
+  Offset immediate_len = state->offset - current_opcode_offset;
   char buffer[WABT_MAX_DOUBLE_HEX];
   write_double_hex(buffer, sizeof(buffer), value);
-  log_opcode(context, ctx->data, immediate_len, buffer);
+  LogOpcode(data, immediate_len, buffer);
   return Result::Ok;
 }
 
-Result on_br_table_expr(BinaryReaderContext* ctx,
-                        uint32_t num_targets,
-                        uint32_t* target_depths,
-                        uint32_t default_target_depth) {
-  Context* context = static_cast<Context*>(ctx->user_data);
-  size_t immediate_len = ctx->offset - context->current_opcode_offset;
+Result BinaryReaderObjdumpDisassemble::OnBrTableExpr(
+    Index num_targets,
+    Index* target_depths,
+    Index default_target_depth) {
+  Offset immediate_len = state->offset - current_opcode_offset;
   /* TODO(sbc): Print targets */
-  log_opcode(context, ctx->data, immediate_len, nullptr);
+  LogOpcode(data, immediate_len, nullptr);
   return Result::Ok;
 }
 
-static Result on_end_func(void* user_data) {
-  Context* context = static_cast<Context*>(user_data);
-  log_opcode(context, nullptr, 0, nullptr);
+Result BinaryReaderObjdumpDisassemble::OnEndFunc() {
+  LogOpcode(nullptr, 0, nullptr);
   return Result::Ok;
 }
 
-static Result on_end_expr(void* user_data) {
-  Context* context = static_cast<Context*>(user_data);
-  context->indent_level--;
-  assert(context->indent_level >= 0);
-  log_opcode(context, nullptr, 0, nullptr);
+Result BinaryReaderObjdumpDisassemble::OnEndExpr() {
+  indent_level--;
+  assert(indent_level >= 0);
+  LogOpcode(nullptr, 0, nullptr);
   return Result::Ok;
 }
 
-static const char* type_name(Type type) {
+Result BinaryReaderObjdumpDisassemble::BeginFunctionBody(Index index) {
+  const char* name = GetFunctionName(index);
+  if (name)
+    printf("%06" PRIzx " <%s>:\n", state->offset, name);
+  else
+    printf("%06" PRIzx " func[%" PRIindex "]:\n", state->offset, index);
+
+  last_opcode_end = 0;
+  return Result::Ok;
+}
+
+const char* type_name(Type type) {
   switch (type) {
     case Type::I32:
       return "i32";
@@ -363,30 +385,225 @@
   }
 }
 
-static Result on_opcode_block_sig(BinaryReaderContext* ctx,
-                                  uint32_t num_types,
-                                  Type* sig_types) {
-  Context* context = static_cast<Context*>(ctx->user_data);
+Result BinaryReaderObjdumpDisassemble::OnOpcodeBlockSig(Index num_types,
+                                                        Type* sig_types) {
   if (num_types)
-    log_opcode(context, ctx->data, 1, "%s", type_name(*sig_types));
+    LogOpcode(data, 1, "%s", type_name(*sig_types));
   else
-    log_opcode(context, ctx->data, 1, nullptr);
-  context->indent_level++;
+    LogOpcode(data, 1, nullptr);
+  indent_level++;
   return Result::Ok;
 }
 
-static Result on_signature(uint32_t index,
-                           uint32_t param_count,
-                           Type* param_types,
-                           uint32_t result_count,
-                           Type* result_types,
-                           void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
+class BinaryReaderObjdump : public BinaryReaderObjdumpBase {
+ public:
+  BinaryReaderObjdump(const uint8_t* data,
+                      size_t size,
+                      ObjdumpOptions* options,
+                      ObjdumpState* state);
 
-  if (!should_print_details(ctx))
+  Result EndModule() override;
+  Result BeginSection(BinarySection section_type, Offset size) override;
+  Result BeginCustomSection(Offset size, StringSlice section_name) override;
+
+  Result OnTypeCount(Index count) override;
+  Result OnType(Index index,
+                Index param_count,
+                Type* param_types,
+                Index result_count,
+                Type* result_types) override;
+
+  Result OnImportCount(Index count) override;
+  Result OnImportFunc(Index import_index,
+                      StringSlice module_name,
+                      StringSlice field_name,
+                      Index func_index,
+                      Index sig_index) override;
+  Result OnImportTable(Index import_index,
+                       StringSlice module_name,
+                       StringSlice field_name,
+                       Index table_index,
+                       Type elem_type,
+                       const Limits* elem_limits) override;
+  Result OnImportMemory(Index import_index,
+                        StringSlice module_name,
+                        StringSlice field_name,
+                        Index memory_index,
+                        const Limits* page_limits) override;
+  Result OnImportGlobal(Index import_index,
+                        StringSlice module_name,
+                        StringSlice field_name,
+                        Index global_index,
+                        Type type,
+                        bool mutable_) override;
+
+  Result OnFunctionCount(Index count) override;
+  Result OnFunction(Index index, Index sig_index) override;
+
+  Result OnTableCount(Index count) override;
+  Result OnTable(Index index,
+                 Type elem_type,
+                 const Limits* elem_limits) override;
+
+  Result OnMemoryCount(Index count) override;
+  Result OnMemory(Index index, const Limits* limits) override;
+
+  Result OnGlobalCount(Index count) override;
+  Result BeginGlobal(Index index, Type type, bool mutable_) override;
+
+  Result OnExportCount(Index count) override;
+  Result OnExport(Index index,
+                  ExternalKind kind,
+                  Index item_index,
+                  StringSlice name) override;
+
+  Result OnStartFunction(Index func_index) override;
+
+  Result OnFunctionBodyCount(Index count) override;
+
+  Result OnElemSegmentCount(Index count) override;
+  Result BeginElemSegment(Index index, Index table_index) override;
+  Result OnElemSegmentFunctionIndex(Index segment_index,
+                                    Index func_index) override;
+
+  Result OnDataSegmentCount(Index count) override;
+  Result BeginDataSegment(Index index, Index memory_index) override;
+  Result OnDataSegmentData(Index index,
+                           const void* data,
+                           Address size) override;
+
+  Result OnFunctionName(Index function_index,
+                        StringSlice function_name) override;
+  Result OnLocalName(Index function_index,
+                     Index local_index,
+                     StringSlice local_name) override;
+
+  Result OnInitExprF32ConstExpr(Index index, uint32_t value) override;
+  Result OnInitExprF64ConstExpr(Index index, uint64_t value) override;
+  Result OnInitExprGetGlobalExpr(Index index, Index global_index) override;
+  Result OnInitExprI32ConstExpr(Index index, uint32_t value) override;
+  Result OnInitExprI64ConstExpr(Index index, uint64_t value) override;
+
+  Result OnRelocCount(Index count,
+                      BinarySection section_code,
+                      StringSlice section_name) override;
+  Result OnReloc(RelocType type,
+                 Offset offset,
+                 Index index,
+                 uint32_t addend) override;
+
+ private:
+  bool ShouldPrintDetails();
+  void PrintDetails(const char* fmt, ...);
+  Result OnCount(Index count);
+
+  std::unique_ptr<FileStream> out_stream_;
+  Index elem_index_ = 0;
+};
+
+BinaryReaderObjdump::BinaryReaderObjdump(const uint8_t* data,
+                                         size_t size,
+                                         ObjdumpOptions* options,
+                                         ObjdumpState* objdump_state)
+    : BinaryReaderObjdumpBase(data, size, options, objdump_state),
+      out_stream_(FileStream::CreateStdout()) {}
+
+Result BinaryReaderObjdump::BeginCustomSection(Offset size,
+                                               StringSlice section_name) {
+  PrintDetails(" - name: \"" PRIstringslice "\"\n",
+               WABT_PRINTF_STRING_SLICE_ARG(section_name));
+  if (options->mode == ObjdumpMode::Headers) {
+    printf("\"" PRIstringslice "\"\n",
+           WABT_PRINTF_STRING_SLICE_ARG(section_name));
+  }
+  return Result::Ok;
+}
+
+Result BinaryReaderObjdump::BeginSection(BinarySection section_code,
+                                         Offset size) {
+  BinaryReaderObjdumpBase::BeginSection(section_code, size);
+
+  const char* name = get_section_name(section_code);
+
+  bool section_match =
+      !options->section_name || !strcasecmp(options->section_name, name);
+  if (section_match)
+    section_found = true;
+
+  switch (options->mode) {
+    case ObjdumpMode::Headers:
+      printf("%9s start=%#010" PRIzx " end=%#010" PRIzx
+             " (size=%#010" PRIoffset ") ",
+             name, state->offset, state->offset + size, size);
+      break;
+    case ObjdumpMode::Details:
+      if (section_match) {
+        if (section_code != BinarySection::Code)
+          printf("%s:\n", name);
+        print_details = true;
+      } else {
+        print_details = false;
+      }
+      break;
+    case ObjdumpMode::RawData:
+      if (section_match) {
+        printf("\nContents of section %s:\n", name);
+        out_stream_->WriteMemoryDump(data + state->offset, size, state->offset,
+                                     nullptr, nullptr, PrintChars::Yes);
+      }
+      break;
+    case ObjdumpMode::Prepass:
+    case ObjdumpMode::Disassemble:
+      break;
+  }
+  return Result::Ok;
+}
+
+bool BinaryReaderObjdump::ShouldPrintDetails() {
+  if (options->mode != ObjdumpMode::Details)
+    return false;
+  return print_details;
+}
+
+void WABT_PRINTF_FORMAT(2, 3)
+    BinaryReaderObjdump::PrintDetails(const char* fmt, ...) {
+  if (!ShouldPrintDetails())
+    return;
+  va_list args;
+  va_start(args, fmt);
+  vprintf(fmt, args);
+  va_end(args);
+}
+
+Result BinaryReaderObjdump::OnCount(Index count) {
+  if (options->mode == ObjdumpMode::Headers) {
+    printf("count: %" PRIindex "\n", count);
+  }
+  return Result::Ok;
+}
+
+Result BinaryReaderObjdump::EndModule() {
+  if (options->section_name && !section_found) {
+    printf("Section not found: %s\n", options->section_name);
+    return Result::Error;
+  }
+
+  return Result::Ok;
+}
+
+Result BinaryReaderObjdump::OnTypeCount(Index count) {
+  return OnCount(count);
+}
+
+Result BinaryReaderObjdump::OnType(Index index,
+                                   Index param_count,
+                                   Type* param_types,
+                                   Index result_count,
+                                   Type* result_types) {
+  if (!ShouldPrintDetails())
     return Result::Ok;
-  printf(" - [%d] (", index);
-  for (uint32_t i = 0; i < param_count; i++) {
+  printf(" - type[%" PRIindex "] (", index);
+  for (Index i = 0; i < param_count; i++) {
     if (i != 0) {
       printf(", ");
     }
@@ -401,383 +618,293 @@
   return Result::Ok;
 }
 
-static Result on_function_signature(uint32_t index,
-                                    uint32_t sig_index,
-                                    void* user_data) {
-  print_details(static_cast<Context*>(user_data), " - func[%d] sig=%d\n", index,
-                sig_index);
+Result BinaryReaderObjdump::OnFunctionCount(Index count) {
+  return OnCount(count);
+}
+
+Result BinaryReaderObjdump::OnFunction(Index index, Index sig_index) {
+  PrintDetails(" - func[%" PRIindex "] sig=%" PRIindex, index, sig_index);
+  if (const char* name = GetFunctionName(index))
+    PrintDetails(" <%s>", name);
+  PrintDetails("\n");
   return Result::Ok;
 }
 
-static Result begin_function_body(BinaryReaderContext* context,
-                                  uint32_t index) {
-  Context* ctx = static_cast<Context*>(context->user_data);
+Result BinaryReaderObjdump::OnFunctionBodyCount(Index count) {
+  return OnCount(count);
+}
 
-  if (ctx->options->mode == ObjdumpMode::Disassemble) {
-    if (index < ctx->options->function_names.size() &&
-        !ctx->options->function_names[index].empty())
-      printf("%06" PRIzx " <%s>:\n", context->offset,
-             ctx->options->function_names[index].c_str());
-    else
-      printf("%06" PRIzx " func[%d]:\n", context->offset, index);
+Result BinaryReaderObjdump::OnStartFunction(Index func_index) {
+  if (options->mode == ObjdumpMode::Headers) {
+    printf("start: %" PRIindex "\n", func_index);
+  } else {
+    PrintDetails(" - start function: %" PRIindex "\n", func_index);
+  }
+  return Result::Ok;
+}
+
+Result BinaryReaderObjdump::OnImportCount(Index count) {
+  return OnCount(count);
+}
+
+Result BinaryReaderObjdump::OnImportFunc(Index import_index,
+                                         StringSlice module_name,
+                                         StringSlice field_name,
+                                         Index func_index,
+                                         Index sig_index) {
+  PrintDetails(" - func[%" PRIindex "] sig=%" PRIindex, func_index, sig_index);
+  if (const char* name = GetFunctionName(func_index))
+    PrintDetails(" <%s>", name);
+  PrintDetails(" <- " PRIstringslice "." PRIstringslice "\n",
+               WABT_PRINTF_STRING_SLICE_ARG(module_name),
+               WABT_PRINTF_STRING_SLICE_ARG(field_name));
+  return Result::Ok;
+}
+
+Result BinaryReaderObjdump::OnImportTable(Index import_index,
+                                          StringSlice module_name,
+                                          StringSlice field_name,
+                                          Index table_index,
+                                          Type elem_type,
+                                          const Limits* elem_limits) {
+  PrintDetails(" - " PRIstringslice "." PRIstringslice
+               " -> table elem_type=%s init=%" PRId64 " max=%" PRId64 "\n",
+               WABT_PRINTF_STRING_SLICE_ARG(module_name),
+               WABT_PRINTF_STRING_SLICE_ARG(field_name),
+               get_type_name(elem_type), elem_limits->initial,
+               elem_limits->max);
+  return Result::Ok;
+}
+
+Result BinaryReaderObjdump::OnImportMemory(Index import_index,
+                                           StringSlice module_name,
+                                           StringSlice field_name,
+                                           Index memory_index,
+                                           const Limits* page_limits) {
+  PrintDetails(" - " PRIstringslice "." PRIstringslice " -> memory\n",
+               WABT_PRINTF_STRING_SLICE_ARG(module_name),
+               WABT_PRINTF_STRING_SLICE_ARG(field_name));
+  return Result::Ok;
+}
+
+Result BinaryReaderObjdump::OnImportGlobal(Index import_index,
+                                           StringSlice module_name,
+                                           StringSlice field_name,
+                                           Index global_index,
+                                           Type type,
+                                           bool mutable_) {
+  PrintDetails(" - global[%" PRIindex "] %s mutable=%d <- " PRIstringslice
+               "." PRIstringslice "\n",
+               global_index, get_type_name(type), mutable_,
+               WABT_PRINTF_STRING_SLICE_ARG(module_name),
+               WABT_PRINTF_STRING_SLICE_ARG(field_name));
+  return Result::Ok;
+}
+
+Result BinaryReaderObjdump::OnMemoryCount(Index count) {
+  return OnCount(count);
+}
+
+Result BinaryReaderObjdump::OnMemory(Index index, const Limits* page_limits) {
+  PrintDetails(" - memory[%" PRIindex "] pages: initial=%" PRId64, index,
+               page_limits->initial);
+  if (page_limits->has_max)
+    PrintDetails(" max=%" PRId64, page_limits->max);
+  PrintDetails("\n");
+  return Result::Ok;
+}
+
+Result BinaryReaderObjdump::OnTableCount(Index count) {
+  return OnCount(count);
+}
+
+Result BinaryReaderObjdump::OnTable(Index index,
+                                    Type elem_type,
+                                    const Limits* elem_limits) {
+  PrintDetails(" - table[%" PRIindex "] type=%s initial=%" PRId64, index,
+               get_type_name(elem_type), elem_limits->initial);
+  if (elem_limits->has_max)
+    PrintDetails(" max=%" PRId64, elem_limits->max);
+  PrintDetails("\n");
+  return Result::Ok;
+}
+
+Result BinaryReaderObjdump::OnExportCount(Index count) {
+  return OnCount(count);
+}
+
+Result BinaryReaderObjdump::OnExport(Index index,
+                                     ExternalKind kind,
+                                     Index item_index,
+                                     StringSlice name) {
+  PrintDetails(" - %s[%" PRIindex "]", get_kind_name(kind), item_index);
+  if (kind == ExternalKind::Func) {
+    if (const char* name = GetFunctionName(item_index))
+      PrintDetails(" <%s>", name);
   }
 
-  ctx->last_opcode_end = 0;
+  PrintDetails(" -> \"" PRIstringslice "\"\n",
+               WABT_PRINTF_STRING_SLICE_ARG(name));
   return Result::Ok;
 }
 
-static Result on_import_func(uint32_t import_index,
-                             StringSlice module_name,
-                             StringSlice field_name,
-                             uint32_t func_index,
-                             uint32_t sig_index,
-                             void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  print_details(ctx,
-                " - func[%d] sig=%d <- " PRIstringslice "." PRIstringslice "\n",
-                func_index, sig_index,
-                WABT_PRINTF_STRING_SLICE_ARG(module_name),
-                WABT_PRINTF_STRING_SLICE_ARG(field_name));
+Result BinaryReaderObjdump::OnElemSegmentFunctionIndex(Index segment_index,
+                                                       Index func_index) {
+  PrintDetails("  - elem[%" PRIindex "] = func[%" PRIindex "]", elem_index_,
+               func_index);
+  if (const char* name = GetFunctionName(func_index))
+    PrintDetails(" <%s>", name);
+  PrintDetails("\n");
+  elem_index_++;
   return Result::Ok;
 }
 
-static Result on_import_table(uint32_t import_index,
-                              StringSlice module_name,
-                              StringSlice field_name,
-                              uint32_t table_index,
-                              Type elem_type,
-                              const Limits* elem_limits,
-                              void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  print_details(
-      ctx, " - " PRIstringslice "." PRIstringslice
-           " -> table elem_type=%s init=%" PRId64 " max=%" PRId64 "\n",
-      WABT_PRINTF_STRING_SLICE_ARG(module_name),
-      WABT_PRINTF_STRING_SLICE_ARG(field_name),
-      get_type_name(elem_type), elem_limits->initial, elem_limits->max);
+Result BinaryReaderObjdump::OnElemSegmentCount(Index count) {
+  return OnCount(count);
+}
+
+Result BinaryReaderObjdump::BeginElemSegment(Index index, Index table_index) {
+  PrintDetails(" - segment[%" PRIindex "] table=%" PRIindex "\n", index,
+               table_index);
+  elem_index_ = 0;
   return Result::Ok;
 }
 
-static Result on_import_memory(uint32_t import_index,
-                               StringSlice module_name,
-                               StringSlice field_name,
-                               uint32_t memory_index,
-                               const Limits* page_limits,
-                               void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  print_details(ctx, " - " PRIstringslice "." PRIstringslice " -> memory\n",
-                WABT_PRINTF_STRING_SLICE_ARG(module_name),
-                WABT_PRINTF_STRING_SLICE_ARG(field_name));
+Result BinaryReaderObjdump::OnGlobalCount(Index count) {
+  return OnCount(count);
+}
+
+Result BinaryReaderObjdump::BeginGlobal(Index index, Type type, bool mutable_) {
+  PrintDetails(" - global[%" PRIindex "] %s mutable=%d", index,
+               get_type_name(type), mutable_);
   return Result::Ok;
 }
 
-static Result on_import_global(uint32_t import_index,
-                               StringSlice module_name,
-                               StringSlice field_name,
-                               uint32_t global_index,
-                               Type type,
-                               bool mutable_,
-                               void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  print_details(ctx, " - global[%d] %s mutable=%d <- " PRIstringslice
-                     "." PRIstringslice "\n",
-                global_index, get_type_name(type), mutable_,
-                WABT_PRINTF_STRING_SLICE_ARG(module_name),
-                WABT_PRINTF_STRING_SLICE_ARG(field_name));
-  return Result::Ok;
-}
-
-static Result on_memory(uint32_t index,
-                        const Limits* page_limits,
-                        void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  print_details(ctx, " - memory[%d] pages: initial=%" PRId64, index,
-                page_limits->initial);
-  if (page_limits->has_max)
-    print_details(ctx, " max=%" PRId64, page_limits->max);
-  print_details(ctx, "\n");
-  return Result::Ok;
-}
-
-static Result on_table(uint32_t index,
-                       Type elem_type,
-                       const Limits* elem_limits,
-                       void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  print_details(ctx, " - table[%d] type=%s initial=%" PRId64, index,
-                get_type_name(elem_type), elem_limits->initial);
-  if (elem_limits->has_max)
-    print_details(ctx, " max=%" PRId64, elem_limits->max);
-  print_details(ctx, "\n");
-  return Result::Ok;
-}
-
-static Result on_export(uint32_t index,
-                        ExternalKind kind,
-                        uint32_t item_index,
-                        StringSlice name,
-                        void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  print_details(ctx, " - %s[%d] ", get_kind_name(kind), item_index);
-  print_details(ctx, PRIstringslice, WABT_PRINTF_STRING_SLICE_ARG(name));
-  print_details(ctx, "\n");
-  return Result::Ok;
-}
-
-static Result on_elem_segment_function_index(uint32_t index,
-                                             uint32_t func_index,
-                                             void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  print_details(ctx, "  - func[%d]\n", func_index);
-  return Result::Ok;
-}
-
-static Result begin_elem_segment(uint32_t index,
-                                 uint32_t table_index,
-                                 void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  print_details(ctx, " - segment[%d] table=%d\n", index, table_index);
-  return Result::Ok;
-}
-
-static Result begin_global(uint32_t index,
-                           Type type,
-                           bool mutable_,
-                           void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  print_details(ctx, " - global[%d] %s mutable=%d", index, get_type_name(type),
-                mutable_);
-  return Result::Ok;
-}
-
-static Result on_init_expr_f32_const_expr(uint32_t index,
-                                          uint32_t value,
-                                          void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
+Result BinaryReaderObjdump::OnInitExprF32ConstExpr(Index index,
+                                                   uint32_t value) {
   char buffer[WABT_MAX_FLOAT_HEX];
   write_float_hex(buffer, sizeof(buffer), value);
-  print_details(ctx, " - init f32=%s\n", buffer);
+  PrintDetails(" - init f32=%s\n", buffer);
   return Result::Ok;
 }
 
-static Result on_init_expr_f64_const_expr(uint32_t index,
-                                          uint64_t value,
-                                          void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
+Result BinaryReaderObjdump::OnInitExprF64ConstExpr(Index index,
+                                                   uint64_t value) {
   char buffer[WABT_MAX_DOUBLE_HEX];
   write_float_hex(buffer, sizeof(buffer), value);
-  print_details(ctx, " - init f64=%s\n", buffer);
+  PrintDetails(" - init f64=%s\n", buffer);
   return Result::Ok;
 }
 
-static Result on_init_expr_get_global_expr(uint32_t index,
-                                           uint32_t global_index,
-                                           void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  print_details(ctx, " - init global=%d\n", global_index);
+Result BinaryReaderObjdump::OnInitExprGetGlobalExpr(Index index,
+                                                    Index global_index) {
+  PrintDetails(" - init global=%" PRIindex "\n", global_index);
   return Result::Ok;
 }
 
-static Result on_init_expr_i32_const_expr(uint32_t index,
-                                          uint32_t value,
-                                          void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  print_details(ctx, " - init i32=%d\n", value);
+Result BinaryReaderObjdump::OnInitExprI32ConstExpr(Index index,
+                                                   uint32_t value) {
+  PrintDetails(" - init i32=%d\n", value);
   return Result::Ok;
 }
 
-static Result on_init_expr_i64_const_expr(uint32_t index,
-                                          uint64_t value,
-                                          void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  print_details(ctx, " - init i64=%" PRId64 "\n", value);
+Result BinaryReaderObjdump::OnInitExprI64ConstExpr(Index index,
+                                                   uint64_t value) {
+  PrintDetails(" - init i64=%" PRId64 "\n", value);
   return Result::Ok;
 }
 
-static Result on_function_name(uint32_t index,
-                               StringSlice name,
-                               void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  print_details(ctx, " - func[%d] " PRIstringslice "\n", index,
-                WABT_PRINTF_STRING_SLICE_ARG(name));
-  if (ctx->options->mode == ObjdumpMode::Prepass) {
-    while (ctx->options->function_names.size() < index) {
-      ctx->options->function_names.emplace_back();
-    }
-    if (ctx->options->function_names.size() == index) {
-      ctx->options->function_names.push_back(string_slice_to_string(name));
-    }
-  }
+Result BinaryReaderObjdump::OnFunctionName(Index index, StringSlice name) {
+  PrintDetails(" - func[%" PRIindex "] " PRIstringslice "\n", index,
+               WABT_PRINTF_STRING_SLICE_ARG(name));
   return Result::Ok;
 }
 
-static Result on_local_name(uint32_t func_index,
-                            uint32_t local_index,
-                            StringSlice name,
-                            void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
+Result BinaryReaderObjdump::OnLocalName(Index func_index,
+                                        Index local_index,
+                                        StringSlice name) {
   if (name.length) {
-    print_details(ctx, "  - local[%d] " PRIstringslice "\n", local_index,
-                  WABT_PRINTF_STRING_SLICE_ARG(name));
+    PrintDetails(" - func[%" PRIindex "] local[%" PRIindex "] " PRIstringslice
+                 "\n",
+                 func_index, local_index, WABT_PRINTF_STRING_SLICE_ARG(name));
   }
   return Result::Ok;
 }
 
-Result on_reloc_count(uint32_t count,
-                      BinarySection section_code,
-                      StringSlice section_name,
-                      void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  ctx->reloc_section = section_code;
-  print_details(ctx, "  - section: %s\n", get_section_name(section_code));
+Result BinaryReaderObjdump::OnDataSegmentCount(Index count) {
+  return OnCount(count);
+}
+
+Result BinaryReaderObjdump::BeginDataSegment(Index index, Index memory_index) {
+  PrintDetails(" - memory[%" PRIindex "]", memory_index);
   return Result::Ok;
 }
 
-Result on_reloc(RelocType type,
-                uint32_t offset,
-                uint32_t index,
-                int32_t addend,
-                void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  uint32_t total_offset =
-      ctx->section_starts[static_cast<size_t>(ctx->reloc_section)] + offset;
-  print_details(ctx, "   - %-18s idx=%#-4x addend=%#-4x offset=%#x(file=%#x)\n",
-                get_reloc_type_name(type), index, addend, offset, total_offset);
-  if (ctx->options->mode == ObjdumpMode::Prepass &&
-      ctx->reloc_section == BinarySection::Code) {
-    ctx->options->code_relocations.emplace_back(type, offset, index, addend);
+Result BinaryReaderObjdump::OnDataSegmentData(Index index,
+                                              const void* src_data,
+                                              Address size) {
+  if (ShouldPrintDetails()) {
+    out_stream_->WriteMemoryDump(src_data, size, state->offset - size, "  - ",
+                                 nullptr, PrintChars::Yes);
   }
   return Result::Ok;
 }
 
-static Result begin_data_segment(uint32_t index,
-                                 uint32_t memory_index,
-                                 void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  print_details(ctx, " - memory[%d]", memory_index);
+Result BinaryReaderObjdump::OnRelocCount(Index count,
+                                         BinarySection section_code,
+                                         StringSlice section_name) {
+  BinaryReaderObjdumpBase::OnRelocCount(count, section_code, section_name);
+  PrintDetails("  - section: %s\n", get_section_name(section_code));
   return Result::Ok;
 }
 
-static Result on_data_segment_data(uint32_t index,
-                                   const void* src_data,
-                                   uint32_t size,
-                                   void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  if (should_print_details(ctx)) {
-    write_memory_dump(ctx->out_stream, src_data, size, 0, PrintChars::Yes,
-                      "  - ", nullptr);
+Result BinaryReaderObjdump::OnReloc(RelocType type,
+                                    Offset offset,
+                                    Index index,
+                                    uint32_t addend) {
+  Offset total_offset =
+      section_starts[static_cast<size_t>(reloc_section)] + offset;
+  PrintDetails("   - %-18s offset=%#08" PRIoffset "(file=%#08" PRIoffset
+               ") index=%" PRIindex,
+               get_reloc_type_name(type), offset, total_offset, index);
+  if (addend) {
+    int32_t signed_addend = static_cast<int32_t>(addend);
+    if (signed_addend < 0) {
+      PrintDetails("-");
+      signed_addend = -signed_addend;
+    } else {
+      PrintDetails("+");
+    }
+    PrintDetails("%#x", signed_addend);
   }
+  PrintDetails("\n");
   return Result::Ok;
 }
 
+}  // namespace
+
 Result read_binary_objdump(const uint8_t* data,
                            size_t size,
-                           ObjdumpOptions* options) {
-  Context context;
-  WABT_ZERO_MEMORY(context);
-  context.header_printed = false;
-  context.print_details = false;
-  context.section_found = false;
-  context.data = data;
-  context.size = size;
-  context.options = options;
-  context.out_stream = init_stdout_stream();
-
-  BinaryReader reader;
-  WABT_ZERO_MEMORY(reader);
-  if (options->mode == ObjdumpMode::Prepass) {
-    reader.on_function_name = on_function_name;
-    reader.on_reloc_count = on_reloc_count;
-    reader.on_reloc = on_reloc;
-  } else {
-    reader.begin_module = begin_module;
-    reader.end_module = end_module;
-
-    reader.begin_section = begin_section;
-
-    // User section
-    reader.begin_custom_section = begin_custom_section;
-
-    // Signature section
-    reader.on_signature_count = on_count;
-    reader.on_signature = on_signature;
-
-    // Import section
-    reader.on_import_count = on_count;
-    reader.on_import_func = on_import_func;
-    reader.on_import_table = on_import_table;
-    reader.on_import_memory = on_import_memory;
-    reader.on_import_global = on_import_global;
-
-    // Function sigs section
-    reader.on_function_signatures_count = on_count;
-    reader.on_function_signature = on_function_signature;
-
-    // Table section
-    reader.on_table_count = on_count;
-    reader.on_table = on_table;
-
-    // Memory section
-    reader.on_memory_count = on_count;
-    reader.on_memory = on_memory;
-
-    // Globl seciont
-    reader.begin_global = begin_global;
-    reader.on_global_count = on_count;
-
-    // Export section
-    reader.on_export_count = on_count;
-    reader.on_export = on_export;
-
-    // Body section
-    reader.on_function_bodies_count = on_count;
-    reader.begin_function_body = begin_function_body;
-
-    // Elems section
-    reader.begin_elem_segment = begin_elem_segment;
-    reader.on_elem_segment_count = on_count;
-    reader.on_elem_segment_function_index = on_elem_segment_function_index;
-
-    // Data section
-    reader.begin_data_segment = begin_data_segment;
-    reader.on_data_segment_data = on_data_segment_data;
-    reader.on_data_segment_count = on_count;
-
-    // Known "User" sections:
-    // - Names section
-    reader.on_function_name = on_function_name;
-    reader.on_local_name = on_local_name;
-
-    reader.on_reloc_count = on_reloc_count;
-    reader.on_reloc = on_reloc;
-
-    reader.on_init_expr_i32_const_expr = on_init_expr_i32_const_expr;
-    reader.on_init_expr_i64_const_expr = on_init_expr_i64_const_expr;
-    reader.on_init_expr_f32_const_expr = on_init_expr_f32_const_expr;
-    reader.on_init_expr_f64_const_expr = on_init_expr_f64_const_expr;
-    reader.on_init_expr_get_global_expr = on_init_expr_get_global_expr;
-  }
-
-  if (options->mode == ObjdumpMode::Disassemble) {
-    reader.on_opcode = on_opcode;
-    reader.on_opcode_bare = on_opcode_bare;
-    reader.on_opcode_uint32 = on_opcode_uint32;
-    reader.on_opcode_uint32_uint32 = on_opcode_uint32_uint32;
-    reader.on_opcode_uint64 = on_opcode_uint64;
-    reader.on_opcode_f32 = on_opcode_f32;
-    reader.on_opcode_f64 = on_opcode_f64;
-    reader.on_opcode_block_sig = on_opcode_block_sig;
-    reader.on_end_expr = on_end_expr;
-    reader.on_end_func = on_end_func;
-    reader.on_br_table_expr = on_br_table_expr;
-  }
-
-  reader.user_data = &context;
-
+                           ObjdumpOptions* options,
+                           ObjdumpState* state) {
   ReadBinaryOptions read_options = WABT_READ_BINARY_OPTIONS_DEFAULT;
   read_options.read_debug_names = true;
   read_options.log_stream = options->log_stream;
-  return read_binary(data, size, &reader, 1, &read_options);
+
+  switch (options->mode) {
+    case ObjdumpMode::Prepass: {
+      BinaryReaderObjdumpPrepass reader(data, size, options, state);
+      return read_binary(data, size, &reader, &read_options);
+    }
+    case ObjdumpMode::Disassemble: {
+      BinaryReaderObjdumpDisassemble reader(data, size, options, state);
+      return read_binary(data, size, &reader, &read_options);
+    }
+    default: {
+      BinaryReaderObjdump reader(data, size, options, state);
+      return read_binary(data, size, &reader, &read_options);
+    }
+  }
 }
 
 }  // namespace wabt
diff --git a/lib/wabt/src/binary-reader-objdump.h b/lib/wabt/src/binary-reader-objdump.h
index b2fb75b..5c10482 100644
--- a/lib/wabt/src/binary-reader-objdump.h
+++ b/lib/wabt/src/binary-reader-objdump.h
@@ -45,16 +45,21 @@
   bool debug;
   bool relocs;
   ObjdumpMode mode;
-  const char* infile;
+  const char* filename;
   const char* section_name;
-  bool print_header;
-  std::vector<std::string> function_names;
+};
+
+// read_binary_objdump uses this state to store information from previous runs
+// and use it to display more useful information.
+struct ObjdumpState {
   std::vector<Reloc> code_relocations;
+  std::vector<std::string> function_names;
 };
 
 Result read_binary_objdump(const uint8_t* data,
                            size_t size,
-                           ObjdumpOptions* options);
+                           ObjdumpOptions* options,
+                           ObjdumpState* state);
 
 }  // namespace wabt
 
diff --git a/lib/wabt/src/binary-reader-opcnt.cc b/lib/wabt/src/binary-reader-opcnt.cc
index 8e428e1..d87472f 100644
--- a/lib/wabt/src/binary-reader-opcnt.cc
+++ b/lib/wabt/src/binary-reader-opcnt.cc
@@ -16,26 +16,40 @@
 
 #include "binary-reader-opcnt.h"
 
-#include <assert.h>
-#include <inttypes.h>
-#include <stdarg.h>
-#include <stdint.h>
-#include <stdio.h>
+#include <cassert>
+#include <cinttypes>
+#include <cstdarg>
+#include <cstdint>
+#include <cstdio>
 
-#include "binary-reader.h"
+#include "binary-reader-nop.h"
 #include "common.h"
 
 namespace wabt {
 
 namespace {
 
-struct Context {
+class BinaryReaderOpcnt : public BinaryReaderNop {
+ public:
+  explicit BinaryReaderOpcnt(OpcntData* data);
+
+  Result OnOpcode(Opcode opcode) override;
+  Result OnI32ConstExpr(uint32_t value) override;
+  Result OnGetLocalExpr(Index local_index) override;
+  Result OnSetLocalExpr(Index local_index) override;
+  Result OnTeeLocalExpr(Index local_index) override;
+  Result OnLoadExpr(Opcode opcode,
+                    uint32_t alignment_log2,
+                    Address offset) override;
+  Result OnStoreExpr(Opcode opcode,
+                     uint32_t alignment_log2,
+                     Address offset) override;
+
+ private:
   OpcntData* opcnt_data;
 };
 
-}  // namespace
-
-static Result add_int_counter_value(IntCounterVector* vec, intmax_t value) {
+static Result AddIntCounterValue(IntCounterVector* vec, intmax_t value) {
   for (IntCounter& counter : *vec) {
     if (counter.value == value) {
       ++counter.count;
@@ -46,9 +60,9 @@
   return Result::Ok;
 }
 
-static Result add_int_pair_counter_value(IntPairCounterVector* vec,
-                                         intmax_t first,
-                                         intmax_t second) {
+static Result AddIntPairCounterValue(IntPairCounterVector* vec,
+                                     intmax_t first,
+                                     intmax_t second) {
   for (IntPairCounter& pair : *vec) {
     if (pair.first == first && pair.second == second) {
       ++pair.count;
@@ -59,9 +73,10 @@
   return Result::Ok;
 }
 
-static Result on_opcode(BinaryReaderContext* context, Opcode opcode) {
-  Context* ctx = static_cast<Context*>(context->user_data);
-  IntCounterVector& opcnt_vec = ctx->opcnt_data->opcode_vec;
+BinaryReaderOpcnt::BinaryReaderOpcnt(OpcntData* data) : opcnt_data(data) {}
+
+Result BinaryReaderOpcnt::OnOpcode(Opcode opcode) {
+  IntCounterVector& opcnt_vec = opcnt_data->opcode_vec;
   while (static_cast<size_t>(opcode) >= opcnt_vec.size()) {
     opcnt_vec.emplace_back(opcnt_vec.size(), 0);
   }
@@ -69,69 +84,51 @@
   return Result::Ok;
 }
 
-static Result on_i32_const_expr(uint32_t value, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  return add_int_counter_value(&ctx->opcnt_data->i32_const_vec,
-                               static_cast<int32_t>(value));
+Result BinaryReaderOpcnt::OnI32ConstExpr(uint32_t value) {
+  return AddIntCounterValue(&opcnt_data->i32_const_vec,
+                            static_cast<int32_t>(value));
 }
 
-static Result on_get_local_expr(uint32_t local_index, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  return add_int_counter_value(&ctx->opcnt_data->get_local_vec, local_index);
+Result BinaryReaderOpcnt::OnGetLocalExpr(Index local_index) {
+  return AddIntCounterValue(&opcnt_data->get_local_vec, local_index);
 }
 
-static Result on_set_local_expr(uint32_t local_index, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  return add_int_counter_value(&ctx->opcnt_data->set_local_vec, local_index);
+Result BinaryReaderOpcnt::OnSetLocalExpr(Index local_index) {
+  return AddIntCounterValue(&opcnt_data->set_local_vec, local_index);
 }
 
-static  Result on_tee_local_expr(uint32_t local_index, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  return add_int_counter_value(&ctx->opcnt_data->tee_local_vec, local_index);
+Result BinaryReaderOpcnt::OnTeeLocalExpr(Index local_index) {
+  return AddIntCounterValue(&opcnt_data->tee_local_vec, local_index);
 }
 
-static  Result on_load_expr(Opcode opcode,
-                                uint32_t alignment_log2,
-                                uint32_t offset,
-                                void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  if (opcode == Opcode::I32Load)
-    return add_int_pair_counter_value(&ctx->opcnt_data->i32_load_vec,
-                                      alignment_log2, offset);
+Result BinaryReaderOpcnt::OnLoadExpr(Opcode opcode,
+                                     uint32_t alignment_log2,
+                                     Address offset) {
+  if (opcode == Opcode::I32Load) {
+    return AddIntPairCounterValue(&opcnt_data->i32_load_vec, alignment_log2,
+                                  offset);
+  }
   return Result::Ok;
 }
 
-static  Result on_store_expr(Opcode opcode,
-                                 uint32_t alignment_log2,
-                                 uint32_t offset,
-                                 void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  if (opcode == Opcode::I32Store)
-    return add_int_pair_counter_value(&ctx->opcnt_data->i32_store_vec,
-                                      alignment_log2, offset);
+Result BinaryReaderOpcnt::OnStoreExpr(Opcode opcode,
+                                      uint32_t alignment_log2,
+                                      Address offset) {
+  if (opcode == Opcode::I32Store) {
+    return AddIntPairCounterValue(&opcnt_data->i32_store_vec, alignment_log2,
+                                  offset);
+  }
   return Result::Ok;
 }
 
+}  // namespace
+
 Result read_binary_opcnt(const void* data,
-                                  size_t size,
-                                  const struct ReadBinaryOptions* options,
-                                  OpcntData* opcnt_data) {
-  Context ctx;
-  WABT_ZERO_MEMORY(ctx);
-  ctx.opcnt_data = opcnt_data;
-
-  BinaryReader reader;
-  WABT_ZERO_MEMORY(reader);
-  reader.user_data = &ctx;
-  reader.on_opcode = on_opcode;
-  reader.on_i32_const_expr = on_i32_const_expr;
-  reader.on_get_local_expr = on_get_local_expr;
-  reader.on_set_local_expr = on_set_local_expr;
-  reader.on_tee_local_expr = on_tee_local_expr;
-  reader.on_load_expr = on_load_expr;
-  reader.on_store_expr = on_store_expr;
-
-  return read_binary(data, size, &reader, 1, options);
+                         size_t size,
+                         const struct ReadBinaryOptions* options,
+                         OpcntData* opcnt_data) {
+  BinaryReaderOpcnt reader(opcnt_data);
+  return read_binary(data, size, &reader, options);
 }
 
 }  // namespace wabt
diff --git a/lib/wabt/src/binary-reader.cc b/lib/wabt/src/binary-reader.cc
index f36ab0b..7effa8b 100644
--- a/lib/wabt/src/binary-reader.cc
+++ b/lib/wabt/src/binary-reader.cc
@@ -16,177 +16,49 @@
 
 #include "binary-reader.h"
 
-#include <assert.h>
-#include <inttypes.h>
-#include <setjmp.h>
-#include <stdarg.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <string.h>
-
+#include <cassert>
+#include <cinttypes>
+#include <cstdarg>
+#include <cstdint>
+#include <cstdio>
+#include <cstring>
 #include <vector>
 
 #include "binary.h"
+#include "binary-reader-logging.h"
 #include "config.h"
 #include "stream.h"
+#include "utf8.h"
 
 #if HAVE_ALLOCA
 #include <alloca.h>
 #endif
 
-#define INDENT_SIZE 2
+#define CHECK_RESULT(expr)  \
+  do {                      \
+    if (WABT_FAILED(expr))  \
+      return Result::Error; \
+  } while (0)
 
-#define INITIAL_PARAM_TYPES_CAPACITY 128
-#define INITIAL_BR_TABLE_TARGET_CAPACITY 1000
+#define ERROR_UNLESS(expr, ...) \
+  do {                          \
+    if (!(expr)) {              \
+      PrintError(__VA_ARGS__);  \
+      return Result::Error;     \
+    }                           \
+  } while (0)
+
+#define CALLBACK0(member)                                   \
+  ERROR_UNLESS(WABT_SUCCEEDED(delegate_->member()), #member \
+               " callback "                                 \
+               "failed")
+
+#define CALLBACK(member, ...)                                  \
+  ERROR_UNLESS(WABT_SUCCEEDED(delegate_->member(__VA_ARGS__)), \
+               #member " callback failed")
 
 namespace wabt {
 
-namespace {
-
-#define CALLBACK_CTX(member, ...)                                       \
-  RAISE_ERROR_UNLESS(                                                   \
-      WABT_SUCCEEDED(                                                   \
-          ctx->reader->member                                           \
-              ? ctx->reader->member(get_user_context(ctx), __VA_ARGS__) \
-              : Result::Ok),                                            \
-      #member " callback failed")
-
-#define CALLBACK_CTX0(member)                                         \
-  RAISE_ERROR_UNLESS(                                                 \
-      WABT_SUCCEEDED(ctx->reader->member                              \
-                         ? ctx->reader->member(get_user_context(ctx)) \
-                         : Result::Ok),                               \
-      #member " callback failed")
-
-#define CALLBACK_SECTION(member, section_size) \
-  CALLBACK_CTX(member, section_size)
-
-#define CALLBACK0(member)                                              \
-  RAISE_ERROR_UNLESS(                                                  \
-      WABT_SUCCEEDED(ctx->reader->member                               \
-                         ? ctx->reader->member(ctx->reader->user_data) \
-                         : Result::Ok),                                \
-      #member " callback failed")
-
-#define CALLBACK(member, ...)                                            \
-  RAISE_ERROR_UNLESS(                                                    \
-      WABT_SUCCEEDED(                                                    \
-          ctx->reader->member                                            \
-              ? ctx->reader->member(__VA_ARGS__, ctx->reader->user_data) \
-              : Result::Ok),                                             \
-      #member " callback failed")
-
-#define FORWARD0(member)                                                   \
-  return ctx->reader->member ? ctx->reader->member(ctx->reader->user_data) \
-                             : Result::Ok
-
-#define FORWARD_CTX0(member)                  \
-  if (!ctx->reader->member)                   \
-    return Result::Ok;                        \
-  BinaryReaderContext new_ctx = *context;     \
-  new_ctx.user_data = ctx->reader->user_data; \
-  return ctx->reader->member(&new_ctx);
-
-#define FORWARD_CTX(member, ...)              \
-  if (!ctx->reader->member)                   \
-    return Result::Ok;                        \
-  BinaryReaderContext new_ctx = *context;     \
-  new_ctx.user_data = ctx->reader->user_data; \
-  return ctx->reader->member(&new_ctx, __VA_ARGS__);
-
-#define FORWARD(member, ...)                                            \
-  return ctx->reader->member                                            \
-             ? ctx->reader->member(__VA_ARGS__, ctx->reader->user_data) \
-             : Result::Ok
-
-#define RAISE_ERROR(...) raise_error(ctx, __VA_ARGS__)
-
-#define RAISE_ERROR_UNLESS(cond, ...) \
-  if (!(cond))                        \
-    RAISE_ERROR(__VA_ARGS__);
-
-struct Context {
-  const uint8_t* data = nullptr;
-  size_t data_size = 0;
-  size_t offset = 0;
-  size_t read_end = 0; /* Either the section end or data_size. */
-  BinaryReaderContext user_ctx;
-  BinaryReader* reader = nullptr;
-  jmp_buf error_jmp_buf;
-  TypeVector param_types;
-  std::vector<uint32_t> target_depths;
-  const ReadBinaryOptions* options = nullptr;
-  BinarySection last_known_section = BinarySection::Invalid;
-  uint32_t num_signatures = 0;
-  uint32_t num_imports = 0;
-  uint32_t num_func_imports = 0;
-  uint32_t num_table_imports = 0;
-  uint32_t num_memory_imports = 0;
-  uint32_t num_global_imports = 0;
-  uint32_t num_function_signatures = 0;
-  uint32_t num_tables = 0;
-  uint32_t num_memories = 0;
-  uint32_t num_globals = 0;
-  uint32_t num_exports = 0;
-  uint32_t num_function_bodies = 0;
-};
-
-struct LoggingContext {
-  Stream* stream;
-  BinaryReader* reader;
-  int indent;
-};
-
-}  // namespace
-
-static BinaryReaderContext* get_user_context(Context* ctx) {
-  ctx->user_ctx.user_data = ctx->reader->user_data;
-  ctx->user_ctx.data = ctx->data;
-  ctx->user_ctx.size = ctx->data_size;
-  ctx->user_ctx.offset = ctx->offset;
-  return &ctx->user_ctx;
-}
-
-static void WABT_PRINTF_FORMAT(2, 3)
-    raise_error(Context* ctx, const char* format, ...) {
-  WABT_SNPRINTF_ALLOCA(buffer, length, format);
-  bool handled = false;
-  if (ctx->reader->on_error) {
-    handled = ctx->reader->on_error(get_user_context(ctx), buffer);
-  }
-
-  if (!handled) {
-    /* Not great to just print, but we don't want to eat the error either. */
-    fprintf(stderr, "*ERROR*: @0x%08zx: %s\n", ctx->offset, buffer);
-  }
-  longjmp(ctx->error_jmp_buf, 1);
-}
-
-#define IN_SIZE(type)                                       \
-  if (ctx->offset + sizeof(type) > ctx->read_end) {         \
-    RAISE_ERROR("unable to read " #type ": %s", desc);      \
-  }                                                         \
-  memcpy(out_value, ctx->data + ctx->offset, sizeof(type)); \
-  ctx->offset += sizeof(type)
-
-static void in_u8(Context* ctx, uint8_t* out_value, const char* desc) {
-  IN_SIZE(uint8_t);
-}
-
-static void in_u32(Context* ctx, uint32_t* out_value, const char* desc) {
-  IN_SIZE(uint32_t);
-}
-
-static void in_f32(Context* ctx, uint32_t* out_value, const char* desc) {
-  IN_SIZE(float);
-}
-
-static void in_f64(Context* ctx, uint64_t* out_value, const char* desc) {
-  IN_SIZE(double);
-}
-
-#undef IN_SIZE
-
 #define BYTE_AT(type, i, shift) ((static_cast<type>(p[i]) & 0x7f) << (shift))
 
 #define LEB128_1(type) (BYTE_AT(type, 0, 0))
@@ -205,6 +77,7 @@
   (static_cast<type>((value) << SHIFT_AMOUNT(type, sign_bit)) >> \
    SHIFT_AMOUNT(type, sign_bit))
 
+// TODO(binji): move LEB functions elsewhere
 size_t read_u32_leb128(const uint8_t* p,
                        const uint8_t* end,
                        uint32_t* out_value) {
@@ -233,15 +106,6 @@
   }
 }
 
-static void in_u32_leb128(Context* ctx, uint32_t* out_value, const char* desc) {
-  const uint8_t* p = ctx->data + ctx->offset;
-  const uint8_t* end = ctx->data + ctx->read_end;
-  size_t bytes_read = read_u32_leb128(p, end, out_value);
-  if (!bytes_read)
-    RAISE_ERROR("unable to read u32 leb128: %s", desc);
-  ctx->offset += bytes_read;
-}
-
 size_t read_i32_leb128(const uint8_t* p,
                        const uint8_t* end,
                        uint32_t* out_value) {
@@ -278,70 +142,210 @@
   }
 }
 
-static void in_i32_leb128(Context* ctx, uint32_t* out_value, const char* desc) {
-  const uint8_t* p = ctx->data + ctx->offset;
-  const uint8_t* end = ctx->data + ctx->read_end;
-  size_t bytes_read = read_i32_leb128(p, end, out_value);
-  if (!bytes_read)
-    RAISE_ERROR("unable to read i32 leb128: %s", desc);
-  ctx->offset += bytes_read;
+namespace {
+
+class BinaryReader {
+ public:
+  BinaryReader(const void* data,
+               size_t size,
+               BinaryReaderDelegate* delegate,
+               const ReadBinaryOptions* options);
+
+  Result ReadModule();
+
+ private:
+  void WABT_PRINTF_FORMAT(2, 3) PrintError(const char* format, ...);
+  Result ReadU8(uint8_t* out_value, const char* desc) WABT_WARN_UNUSED;
+  Result ReadU32(uint32_t* out_value, const char* desc) WABT_WARN_UNUSED;
+  Result ReadF32(uint32_t* out_value, const char* desc) WABT_WARN_UNUSED;
+  Result ReadF64(uint64_t* out_value, const char* desc) WABT_WARN_UNUSED;
+  Result ReadU32Leb128(uint32_t* out_value, const char* desc) WABT_WARN_UNUSED;
+  Result ReadI32Leb128(uint32_t* out_value, const char* desc) WABT_WARN_UNUSED;
+  Result ReadI64Leb128(uint64_t* out_value, const char* desc) WABT_WARN_UNUSED;
+  Result ReadType(Type* out_value, const char* desc) WABT_WARN_UNUSED;
+  Result ReadStr(StringSlice* out_str, const char* desc) WABT_WARN_UNUSED;
+  Result ReadBytes(const void** out_data,
+                   Address* out_data_size,
+                   const char* desc) WABT_WARN_UNUSED;
+  Result ReadIndex(Index* index, const char* desc) WABT_WARN_UNUSED;
+  Result ReadOffset(Offset* offset, const char* desc) WABT_WARN_UNUSED;
+
+  Index NumTotalFuncs();
+  Index NumTotalTables();
+  Index NumTotalMemories();
+  Index NumTotalGlobals();
+
+  Result ReadInitExpr(Index index) WABT_WARN_UNUSED;
+  Result ReadTable(Type* out_elem_type,
+                   Limits* out_elem_limits) WABT_WARN_UNUSED;
+  Result ReadMemory(Limits* out_page_limits) WABT_WARN_UNUSED;
+  Result ReadGlobalHeader(Type* out_type, bool* out_mutable) WABT_WARN_UNUSED;
+  Result ReadFunctionBody(Offset end_offset) WABT_WARN_UNUSED;
+  Result ReadNamesSection(Offset section_size) WABT_WARN_UNUSED;
+  Result ReadRelocSection(Offset section_size) WABT_WARN_UNUSED;
+  Result ReadCustomSection(Offset section_size) WABT_WARN_UNUSED;
+  Result ReadTypeSection(Offset section_size) WABT_WARN_UNUSED;
+  Result ReadImportSection(Offset section_size) WABT_WARN_UNUSED;
+  Result ReadFunctionSection(Offset section_size) WABT_WARN_UNUSED;
+  Result ReadTableSection(Offset section_size) WABT_WARN_UNUSED;
+  Result ReadMemorySection(Offset section_size) WABT_WARN_UNUSED;
+  Result ReadGlobalSection(Offset section_size) WABT_WARN_UNUSED;
+  Result ReadExportSection(Offset section_size) WABT_WARN_UNUSED;
+  Result ReadStartSection(Offset section_size) WABT_WARN_UNUSED;
+  Result ReadElemSection(Offset section_size) WABT_WARN_UNUSED;
+  Result ReadCodeSection(Offset section_size) WABT_WARN_UNUSED;
+  Result ReadDataSection(Offset section_size) WABT_WARN_UNUSED;
+  Result ReadSections() WABT_WARN_UNUSED;
+
+  size_t read_end_ = 0; /* Either the section end or data_size. */
+  BinaryReaderDelegate::State state_;
+  BinaryReaderLogging logging_delegate_;
+  BinaryReaderDelegate* delegate_ = nullptr;
+  TypeVector param_types_;
+  std::vector<Index> target_depths_;
+  const ReadBinaryOptions* options_ = nullptr;
+  BinarySection last_known_section_ = BinarySection::Invalid;
+  Index num_signatures_ = 0;
+  Index num_imports_ = 0;
+  Index num_func_imports_ = 0;
+  Index num_table_imports_ = 0;
+  Index num_memory_imports_ = 0;
+  Index num_global_imports_ = 0;
+  Index num_function_signatures_ = 0;
+  Index num_tables_ = 0;
+  Index num_memories_ = 0;
+  Index num_globals_ = 0;
+  Index num_exports_ = 0;
+  Index num_function_bodies_ = 0;
+};
+
+BinaryReader::BinaryReader(const void* data,
+                           size_t size,
+                           BinaryReaderDelegate* delegate,
+                           const ReadBinaryOptions* options)
+    : read_end_(size),
+      state_(static_cast<const uint8_t*>(data), size),
+      logging_delegate_(options->log_stream, delegate),
+      delegate_(options->log_stream ? &logging_delegate_ : delegate),
+      options_(options),
+      last_known_section_(BinarySection::Invalid) {
+  delegate->OnSetState(&state_);
 }
 
-static void in_i64_leb128(Context* ctx, uint64_t* out_value, const char* desc) {
-  const uint8_t* p = ctx->data + ctx->offset;
-  const uint8_t* end = ctx->data + ctx->read_end;
+void WABT_PRINTF_FORMAT(2, 3) BinaryReader::PrintError(const char* format,
+                                                       ...) {
+  WABT_SNPRINTF_ALLOCA(buffer, length, format);
+  bool handled = delegate_->OnError(buffer);
+
+  if (!handled) {
+    /* Not great to just print, but we don't want to eat the error either. */
+    fprintf(stderr, "*ERROR*: @0x%08zx: %s\n", state_.offset, buffer);
+  }
+}
+
+#define IN_SIZE(type)                                           \
+  if (state_.offset + sizeof(type) > read_end_) {               \
+    PrintError("unable to read " #type ": %s", desc);           \
+    return Result::Error;                                       \
+  }                                                             \
+  memcpy(out_value, state_.data + state_.offset, sizeof(type)); \
+  state_.offset += sizeof(type);                                \
+  return Result::Ok
+
+Result BinaryReader::ReadU8(uint8_t* out_value, const char* desc) {
+  IN_SIZE(uint8_t);
+}
+
+Result BinaryReader::ReadU32(uint32_t* out_value, const char* desc) {
+  IN_SIZE(uint32_t);
+}
+
+Result BinaryReader::ReadF32(uint32_t* out_value, const char* desc) {
+  IN_SIZE(float);
+}
+
+Result BinaryReader::ReadF64(uint64_t* out_value, const char* desc) {
+  IN_SIZE(double);
+}
+
+#undef IN_SIZE
+
+Result BinaryReader::ReadU32Leb128(uint32_t* out_value, const char* desc) {
+  const uint8_t* p = state_.data + state_.offset;
+  const uint8_t* end = state_.data + read_end_;
+  size_t bytes_read = read_u32_leb128(p, end, out_value);
+  ERROR_UNLESS(bytes_read > 0, "unable to read u32 leb128: %s", desc);
+  state_.offset += bytes_read;
+  return Result::Ok;
+}
+
+Result BinaryReader::ReadI32Leb128(uint32_t* out_value, const char* desc) {
+  const uint8_t* p = state_.data + state_.offset;
+  const uint8_t* end = state_.data + read_end_;
+  size_t bytes_read = read_i32_leb128(p, end, out_value);
+  ERROR_UNLESS(bytes_read > 0, "unable to read i32 leb128: %s", desc);
+  state_.offset += bytes_read;
+  return Result::Ok;
+}
+
+Result BinaryReader::ReadI64Leb128(uint64_t* out_value, const char* desc) {
+  const uint8_t* p = state_.data + state_.offset;
+  const uint8_t* end = state_.data + read_end_;
 
   if (p < end && (p[0] & 0x80) == 0) {
     uint64_t result = LEB128_1(uint64_t);
     *out_value = SIGN_EXTEND(int64_t, result, 6);
-    ctx->offset += 1;
+    state_.offset += 1;
   } else if (p + 1 < end && (p[1] & 0x80) == 0) {
     uint64_t result = LEB128_2(uint64_t);
     *out_value = SIGN_EXTEND(int64_t, result, 13);
-    ctx->offset += 2;
+    state_.offset += 2;
   } else if (p + 2 < end && (p[2] & 0x80) == 0) {
     uint64_t result = LEB128_3(uint64_t);
     *out_value = SIGN_EXTEND(int64_t, result, 20);
-    ctx->offset += 3;
+    state_.offset += 3;
   } else if (p + 3 < end && (p[3] & 0x80) == 0) {
     uint64_t result = LEB128_4(uint64_t);
     *out_value = SIGN_EXTEND(int64_t, result, 27);
-    ctx->offset += 4;
+    state_.offset += 4;
   } else if (p + 4 < end && (p[4] & 0x80) == 0) {
     uint64_t result = LEB128_5(uint64_t);
     *out_value = SIGN_EXTEND(int64_t, result, 34);
-    ctx->offset += 5;
+    state_.offset += 5;
   } else if (p + 5 < end && (p[5] & 0x80) == 0) {
     uint64_t result = LEB128_6(uint64_t);
     *out_value = SIGN_EXTEND(int64_t, result, 41);
-    ctx->offset += 6;
+    state_.offset += 6;
   } else if (p + 6 < end && (p[6] & 0x80) == 0) {
     uint64_t result = LEB128_7(uint64_t);
     *out_value = SIGN_EXTEND(int64_t, result, 48);
-    ctx->offset += 7;
+    state_.offset += 7;
   } else if (p + 7 < end && (p[7] & 0x80) == 0) {
     uint64_t result = LEB128_8(uint64_t);
     *out_value = SIGN_EXTEND(int64_t, result, 55);
-    ctx->offset += 8;
+    state_.offset += 8;
   } else if (p + 8 < end && (p[8] & 0x80) == 0) {
     uint64_t result = LEB128_9(uint64_t);
     *out_value = SIGN_EXTEND(int64_t, result, 62);
-    ctx->offset += 9;
+    state_.offset += 9;
   } else if (p + 9 < end && (p[9] & 0x80) == 0) {
     /* the top bits should be a sign-extension of the sign bit */
     bool sign_bit_set = (p[9] & 0x1);
     int top_bits = p[9] & 0xfe;
     if ((sign_bit_set && top_bits != 0x7e) ||
         (!sign_bit_set && top_bits != 0)) {
-      RAISE_ERROR("invalid i64 leb128: %s", desc);
+      PrintError("invalid i64 leb128: %s", desc);
+      return Result::Error;
     }
     uint64_t result = LEB128_10(uint64_t);
     *out_value = result;
-    ctx->offset += 10;
+    state_.offset += 10;
   } else {
     /* past the end */
-    RAISE_ERROR("unable to read i64 leb128: %s", desc);
+    PrintError("unable to read i64 leb128: %s", desc);
+    return Result::Error;
   }
+  return Result::Ok;
 }
 
 #undef BYTE_AT
@@ -358,40 +362,60 @@
 #undef SHIFT_AMOUNT
 #undef SIGN_EXTEND
 
-static void in_type(Context* ctx, Type* out_value, const char* desc) {
+Result BinaryReader::ReadType(Type* out_value, const char* desc) {
   uint32_t type = 0;
-  in_i32_leb128(ctx, &type, desc);
+  CHECK_RESULT(ReadI32Leb128(&type, desc));
   /* Must be in the vs7 range: [-128, 127). */
-  if (static_cast<int32_t>(type) < -128 || static_cast<int32_t>(type) > 127)
-    RAISE_ERROR("invalid type: %d", type);
+  ERROR_UNLESS(
+      static_cast<int32_t>(type) >= -128 && static_cast<int32_t>(type) <= 127,
+      "invalid type: %d", type);
   *out_value = static_cast<Type>(type);
+  return Result::Ok;
 }
 
-static void in_str(Context* ctx, StringSlice* out_str, const char* desc) {
+Result BinaryReader::ReadStr(StringSlice* out_str, const char* desc) {
   uint32_t str_len = 0;
-  in_u32_leb128(ctx, &str_len, "string length");
+  CHECK_RESULT(ReadU32Leb128(&str_len, "string length"));
 
-  if (ctx->offset + str_len > ctx->read_end)
-    RAISE_ERROR("unable to read string: %s", desc);
+  ERROR_UNLESS(state_.offset + str_len <= read_end_,
+               "unable to read string: %s", desc);
 
-  out_str->start = reinterpret_cast<const char*>(ctx->data) + ctx->offset;
+  out_str->start = reinterpret_cast<const char*>(state_.data) + state_.offset;
   out_str->length = str_len;
-  ctx->offset += str_len;
+  state_.offset += str_len;
+
+  ERROR_UNLESS(is_valid_utf8(out_str->start, out_str->length),
+               "invalid utf-8 encoding: %s", desc);
+  return Result::Ok;
 }
 
-static void in_bytes(Context* ctx,
-                     const void** out_data,
-                     uint32_t* out_data_size,
-                     const char* desc) {
+Result BinaryReader::ReadBytes(const void** out_data,
+                               Address* out_data_size,
+                               const char* desc) {
   uint32_t data_size = 0;
-  in_u32_leb128(ctx, &data_size, "data size");
+  CHECK_RESULT(ReadU32Leb128(&data_size, "data size"));
 
-  if (ctx->offset + data_size > ctx->read_end)
-    RAISE_ERROR("unable to read data: %s", desc);
+  ERROR_UNLESS(state_.offset + data_size <= read_end_,
+               "unable to read data: %s", desc);
 
-  *out_data = static_cast<const uint8_t*>(ctx->data) + ctx->offset;
+  *out_data = static_cast<const uint8_t*>(state_.data) + state_.offset;
   *out_data_size = data_size;
-  ctx->offset += data_size;
+  state_.offset += data_size;
+  return Result::Ok;
+}
+
+Result BinaryReader::ReadIndex(Index* index, const char* desc) {
+  uint32_t value;
+  CHECK_RESULT(ReadU32Leb128(&value, desc));
+  *index = value;
+  return Result::Ok;
+}
+
+Result BinaryReader::ReadOffset(Offset* offset, const char* desc) {
+  uint32_t value;
+  CHECK_RESULT(ReadU32Leb128(&value, desc));
+  *offset = value;
+  return Result::Ok;
 }
 
 static bool is_valid_external_kind(uint8_t kind) {
@@ -415,965 +439,344 @@
   return is_concrete_type(type) || type == Type::Void;
 }
 
-static uint32_t num_total_funcs(Context* ctx) {
-  return ctx->num_func_imports + ctx->num_function_signatures;
+Index BinaryReader::NumTotalFuncs() {
+  return num_func_imports_ + num_function_signatures_;
 }
 
-static uint32_t num_total_tables(Context* ctx) {
-  return ctx->num_table_imports + ctx->num_tables;
+Index BinaryReader::NumTotalTables() {
+  return num_table_imports_ + num_tables_;
 }
 
-static uint32_t num_total_memories(Context* ctx) {
-  return ctx->num_memory_imports + ctx->num_memories;
+Index BinaryReader::NumTotalMemories() {
+  return num_memory_imports_ + num_memories_;
 }
 
-static uint32_t num_total_globals(Context* ctx) {
-  return ctx->num_global_imports + ctx->num_globals;
+Index BinaryReader::NumTotalGlobals() {
+  return num_global_imports_ + num_globals_;
 }
 
-/* Logging */
-
-static void indent(LoggingContext* ctx) {
-  ctx->indent += INDENT_SIZE;
-}
-
-static void dedent(LoggingContext* ctx) {
-  ctx->indent -= INDENT_SIZE;
-  assert(ctx->indent >= 0);
-}
-
-static void write_indent(LoggingContext* ctx) {
-  static char s_indent[] =
-      "                                                                       "
-      "                                                                       ";
-  static size_t s_indent_len = sizeof(s_indent) - 1;
-  size_t indent = ctx->indent;
-  while (indent > s_indent_len) {
-    write_data(ctx->stream, s_indent, s_indent_len, nullptr);
-    indent -= s_indent_len;
-  }
-  if (indent > 0) {
-    write_data(ctx->stream, s_indent, indent, nullptr);
-  }
-}
-
-#define LOGF_NOINDENT(...) writef(ctx->stream, __VA_ARGS__)
-
-#define LOGF(...)               \
-  do {                          \
-    write_indent(ctx);          \
-    LOGF_NOINDENT(__VA_ARGS__); \
-  } while (0)
-
-static bool logging_on_error(BinaryReaderContext* context,
-                             const char* message) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(context->user_data);
-  // Can't use FORWARD_CTX because it returns Result by default.
-  if (!ctx->reader->on_error)
-    return false;
-  BinaryReaderContext new_ctx = *context;
-  new_ctx.user_data = ctx->reader->user_data;
-  return ctx->reader->on_error(&new_ctx, message);
-}
-
-static Result logging_begin_section(BinaryReaderContext* context,
-                                    BinarySection section_type,
-                                    uint32_t size) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(context->user_data);
-  FORWARD_CTX(begin_section, section_type, size);
-}
-
-static Result logging_begin_custom_section(BinaryReaderContext* context,
-                                           uint32_t size,
-                                           StringSlice section_name) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(context->user_data);
-  LOGF("begin_custom_section: '" PRIstringslice "' size=%d\n",
-       WABT_PRINTF_STRING_SLICE_ARG(section_name), size);
-  indent(ctx);
-  FORWARD_CTX(begin_custom_section, size, section_name);
-}
-
-#define LOGGING_BEGIN(name)                                                 \
-  static Result logging_begin_##name(BinaryReaderContext* context,          \
-                                     uint32_t size) {                       \
-    LoggingContext* ctx = static_cast<LoggingContext*>(context->user_data); \
-    LOGF("begin_" #name "(%u)\n", size);                                              \
-    indent(ctx);                                                            \
-    FORWARD_CTX(begin_##name, size);                                        \
-  }
-
-#define LOGGING_END(name)                                                   \
-  static Result logging_end_##name(BinaryReaderContext* context) {          \
-    LoggingContext* ctx = static_cast<LoggingContext*>(context->user_data); \
-    dedent(ctx);                                                            \
-    LOGF("end_" #name "\n");                                                \
-    FORWARD_CTX0(end_##name);                                               \
-  }
-
-#define LOGGING_UINT32(name)                                       \
-  static Result logging_##name(uint32_t value, void* user_data) {  \
-    LoggingContext* ctx = static_cast<LoggingContext*>(user_data); \
-    LOGF(#name "(%u)\n", value);                                   \
-    FORWARD(name, value);                                          \
-  }
-
-#define LOGGING_UINT32_CTX(name)                                               \
-  static Result logging_##name(BinaryReaderContext* context, uint32_t value) { \
-    LoggingContext* ctx = static_cast<LoggingContext*>(context->user_data);    \
-    LOGF(#name "(%u)\n", value);                                               \
-    FORWARD_CTX(name, value);                                                  \
-  }
-
-#define LOGGING_UINT32_DESC(name, desc)                            \
-  static Result logging_##name(uint32_t value, void* user_data) {  \
-    LoggingContext* ctx = static_cast<LoggingContext*>(user_data); \
-    LOGF(#name "(" desc ": %u)\n", value);                         \
-    FORWARD(name, value);                                          \
-  }
-
-#define LOGGING_UINT32_UINT32(name, desc0, desc1)                   \
-  static Result logging_##name(uint32_t value0, uint32_t value1,    \
-                               void* user_data) {                   \
-    LoggingContext* ctx = static_cast<LoggingContext*>(user_data);  \
-    LOGF(#name "(" desc0 ": %u, " desc1 ": %u)\n", value0, value1); \
-    FORWARD(name, value0, value1);                                  \
-  }
-
-#define LOGGING_UINT32_UINT32_CTX(name, desc0, desc1)                         \
-  static Result logging_##name(BinaryReaderContext* context, uint32_t value0, \
-                               uint32_t value1) {                             \
-    LoggingContext* ctx = static_cast<LoggingContext*>(context->user_data);   \
-    LOGF(#name "(" desc0 ": %u, " desc1 ": %u)\n", value0, value1);           \
-    FORWARD_CTX(name, value0, value1);                                        \
-  }
-
-#define LOGGING_OPCODE(name)                                       \
-  static Result logging_##name(Opcode opcode, void* user_data) {   \
-    LoggingContext* ctx = static_cast<LoggingContext*>(user_data); \
-    LOGF(#name "(\"%s\" (%u))\n", get_opcode_name(opcode),         \
-         static_cast<unsigned>(opcode));                           \
-    FORWARD(name, opcode);                                         \
-  }
-
-#define LOGGING0(name)                                             \
-  static Result logging_##name(void* user_data) {                  \
-    LoggingContext* ctx = static_cast<LoggingContext*>(user_data); \
-    LOGF(#name "\n");                                              \
-    FORWARD0(name);                                                \
-  }
-
-LOGGING_UINT32(begin_module)
-LOGGING0(end_module)
-LOGGING_END(custom_section)
-LOGGING_BEGIN(signature_section)
-LOGGING_UINT32(on_signature_count)
-LOGGING_END(signature_section)
-LOGGING_BEGIN(import_section)
-LOGGING_UINT32(on_import_count)
-LOGGING_END(import_section)
-LOGGING_BEGIN(function_signatures_section)
-LOGGING_UINT32(on_function_signatures_count)
-LOGGING_UINT32_UINT32(on_function_signature, "index", "sig_index")
-LOGGING_END(function_signatures_section)
-LOGGING_BEGIN(table_section)
-LOGGING_UINT32(on_table_count)
-LOGGING_END(table_section)
-LOGGING_BEGIN(memory_section)
-LOGGING_UINT32(on_memory_count)
-LOGGING_END(memory_section)
-LOGGING_BEGIN(global_section)
-LOGGING_UINT32(on_global_count)
-LOGGING_UINT32(begin_global_init_expr)
-LOGGING_UINT32(end_global_init_expr)
-LOGGING_UINT32(end_global)
-LOGGING_END(global_section)
-LOGGING_BEGIN(export_section)
-LOGGING_UINT32(on_export_count)
-LOGGING_END(export_section)
-LOGGING_BEGIN(start_section)
-LOGGING_UINT32(on_start_function)
-LOGGING_END(start_section)
-LOGGING_BEGIN(function_bodies_section)
-LOGGING_UINT32(on_function_bodies_count)
-LOGGING_UINT32_CTX(begin_function_body)
-LOGGING_UINT32(end_function_body)
-LOGGING_UINT32(on_local_decl_count)
-LOGGING_OPCODE(on_binary_expr)
-LOGGING_UINT32_DESC(on_call_expr, "func_index")
-LOGGING_UINT32_DESC(on_call_import_expr, "import_index")
-LOGGING_UINT32_DESC(on_call_indirect_expr, "sig_index")
-LOGGING_OPCODE(on_compare_expr)
-LOGGING_OPCODE(on_convert_expr)
-LOGGING0(on_current_memory_expr)
-LOGGING0(on_drop_expr)
-LOGGING0(on_else_expr)
-LOGGING0(on_end_expr)
-LOGGING_UINT32_DESC(on_get_global_expr, "index")
-LOGGING_UINT32_DESC(on_get_local_expr, "index")
-LOGGING0(on_grow_memory_expr)
-LOGGING0(on_nop_expr)
-LOGGING0(on_return_expr)
-LOGGING0(on_select_expr)
-LOGGING_UINT32_DESC(on_set_global_expr, "index")
-LOGGING_UINT32_DESC(on_set_local_expr, "index")
-LOGGING_UINT32_DESC(on_tee_local_expr, "index")
-LOGGING0(on_unreachable_expr)
-LOGGING_OPCODE(on_unary_expr)
-LOGGING_END(function_bodies_section)
-LOGGING_BEGIN(elem_section)
-LOGGING_UINT32(on_elem_segment_count)
-LOGGING_UINT32_UINT32(begin_elem_segment, "index", "table_index")
-LOGGING_UINT32(begin_elem_segment_init_expr)
-LOGGING_UINT32(end_elem_segment_init_expr)
-LOGGING_UINT32_UINT32_CTX(on_elem_segment_function_index_count,
-                          "index",
-                          "count")
-LOGGING_UINT32_UINT32(on_elem_segment_function_index, "index", "func_index")
-LOGGING_UINT32(end_elem_segment)
-LOGGING_END(elem_section)
-LOGGING_BEGIN(data_section)
-LOGGING_UINT32(on_data_segment_count)
-LOGGING_UINT32_UINT32(begin_data_segment, "index", "memory_index")
-LOGGING_UINT32(begin_data_segment_init_expr)
-LOGGING_UINT32(end_data_segment_init_expr)
-LOGGING_UINT32(end_data_segment)
-LOGGING_END(data_section)
-LOGGING_BEGIN(names_section)
-LOGGING_UINT32(on_function_names_count)
-LOGGING_UINT32(on_local_name_function_count)
-LOGGING_UINT32_UINT32(on_local_name_local_count, "index", "count")
-LOGGING_END(names_section)
-LOGGING_BEGIN(reloc_section)
-LOGGING_END(reloc_section)
-LOGGING_UINT32_UINT32(on_init_expr_get_global_expr, "index", "global_index")
-
-static void sprint_limits(char* dst, size_t size, const Limits* limits) {
-  int result;
-  if (limits->has_max) {
-    result = wabt_snprintf(dst, size, "initial: %" PRIu64 ", max: %" PRIu64,
-                      limits->initial, limits->max);
-  } else {
-    result = wabt_snprintf(dst, size, "initial: %" PRIu64, limits->initial);
-  }
-  WABT_USE(result);
-  assert(static_cast<size_t>(result) < size);
-}
-
-static void log_types(LoggingContext* ctx, uint32_t type_count, Type* types) {
-  LOGF_NOINDENT("[");
-  for (uint32_t i = 0; i < type_count; ++i) {
-    LOGF_NOINDENT("%s", get_type_name(types[i]));
-    if (i != type_count - 1)
-      LOGF_NOINDENT(", ");
-  }
-  LOGF_NOINDENT("]");
-}
-
-static Result logging_on_signature(uint32_t index,
-                                   uint32_t param_count,
-                                   Type* param_types,
-                                   uint32_t result_count,
-                                   Type* result_types,
-                                   void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  LOGF("on_signature(index: %u, params: ", index);
-  log_types(ctx, param_count, param_types);
-  LOGF_NOINDENT(", results: ");
-  log_types(ctx, result_count, result_types);
-  LOGF_NOINDENT(")\n");
-  FORWARD(on_signature, index, param_count, param_types, result_count,
-          result_types);
-}
-
-static Result logging_on_import(uint32_t index,
-                                StringSlice module_name,
-                                StringSlice field_name,
-                                void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  LOGF("on_import(index: %u, module: \"" PRIstringslice
-       "\", field: \"" PRIstringslice "\")\n",
-       index, WABT_PRINTF_STRING_SLICE_ARG(module_name),
-       WABT_PRINTF_STRING_SLICE_ARG(field_name));
-  FORWARD(on_import, index, module_name, field_name);
-}
-
-static Result logging_on_import_func(uint32_t import_index,
-                                     StringSlice module_name,
-                                     StringSlice field_name,
-                                     uint32_t func_index,
-                                     uint32_t sig_index,
-                                     void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  LOGF("on_import_func(import_index: %u, func_index: %u, sig_index: %u)\n",
-       import_index, func_index, sig_index);
-  FORWARD(on_import_func, import_index, module_name, field_name,
-          func_index, sig_index);
-}
-
-static Result logging_on_import_table(uint32_t import_index,
-                                      StringSlice module_name,
-                                      StringSlice field_name,
-                                      uint32_t table_index,
-                                      Type elem_type,
-                                      const Limits* elem_limits,
-                                      void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  char buf[100];
-  sprint_limits(buf, sizeof(buf), elem_limits);
-  LOGF(
-      "on_import_table(import_index: %u, table_index: %u, elem_type: %s, %s)\n",
-      import_index, table_index, get_type_name(elem_type), buf);
-  FORWARD(on_import_table, import_index, module_name, field_name,
-          table_index, elem_type, elem_limits);
-}
-
-static Result logging_on_import_memory(uint32_t import_index,
-                                       StringSlice module_name,
-                                       StringSlice field_name,
-                                       uint32_t memory_index,
-                                       const Limits* page_limits,
-                                       void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  char buf[100];
-  sprint_limits(buf, sizeof(buf), page_limits);
-  LOGF("on_import_memory(import_index: %u, memory_index: %u, %s)\n",
-       import_index, memory_index, buf);
-  FORWARD(on_import_memory, import_index, module_name, field_name,
-          memory_index, page_limits);
-}
-
-static Result logging_on_import_global(uint32_t import_index,
-                                       StringSlice module_name,
-                                       StringSlice field_name,
-                                       uint32_t global_index,
-                                       Type type,
-                                       bool mutable_,
-                                       void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  LOGF(
-      "on_import_global(import_index: %u, global_index: %u, type: %s, mutable: "
-      "%s)\n",
-      import_index, global_index, get_type_name(type),
-      mutable_ ? "true" : "false");
-  FORWARD(on_import_global, import_index, module_name, field_name,
-          global_index, type, mutable_);
-}
-
-static Result logging_on_table(uint32_t index,
-                               Type elem_type,
-                               const Limits* elem_limits,
-                               void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  char buf[100];
-  sprint_limits(buf, sizeof(buf), elem_limits);
-  LOGF("on_table(index: %u, elem_type: %s, %s)\n", index,
-       get_type_name(elem_type), buf);
-  FORWARD(on_table, index, elem_type, elem_limits);
-}
-
-static Result logging_on_memory(uint32_t index,
-                                const Limits* page_limits,
-                                void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  char buf[100];
-  sprint_limits(buf, sizeof(buf), page_limits);
-  LOGF("on_memory(index: %u, %s)\n", index, buf);
-  FORWARD(on_memory, index, page_limits);
-}
-
-static Result logging_begin_global(uint32_t index,
-                                   Type type,
-                                   bool mutable_,
-                                   void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  LOGF("begin_global(index: %u, type: %s, mutable: %s)\n", index,
-       get_type_name(type), mutable_ ? "true" : "false");
-  FORWARD(begin_global, index, type, mutable_);
-}
-
-static Result logging_on_export(uint32_t index,
-                                ExternalKind kind,
-                                uint32_t item_index,
-                                StringSlice name,
-                                void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  LOGF("on_export(index: %u, kind: %s, item_index: %u, name: \"" PRIstringslice
-       "\")\n",
-       index, get_kind_name(kind), item_index,
-       WABT_PRINTF_STRING_SLICE_ARG(name));
-  FORWARD(on_export, index, kind, item_index, name);
-}
-
-static Result logging_begin_function_body_pass(uint32_t index,
-                                               uint32_t pass,
-                                               void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  LOGF("begin_function_body_pass(index: %u, pass: %u)\n", index, pass);
-  indent(ctx);
-  FORWARD(begin_function_body_pass, index, pass);
-}
-
-static Result logging_on_local_decl(uint32_t decl_index,
-                                    uint32_t count,
-                                    Type type,
-                                    void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  LOGF("on_local_decl(index: %u, count: %u, type: %s)\n", decl_index, count,
-       get_type_name(type));
-  FORWARD(on_local_decl, decl_index, count, type);
-}
-
-static Result logging_on_block_expr(uint32_t num_types,
-                                    Type* sig_types,
-                                    void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  LOGF("on_block_expr(sig: ");
-  log_types(ctx, num_types, sig_types);
-  LOGF_NOINDENT(")\n");
-  FORWARD(on_block_expr, num_types, sig_types);
-}
-
-static Result logging_on_br_expr(uint32_t depth, void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  LOGF("on_br_expr(depth: %u)\n", depth);
-  FORWARD(on_br_expr, depth);
-}
-
-static Result logging_on_br_if_expr(uint32_t depth, void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  LOGF("on_br_if_expr(depth: %u)\n", depth);
-  FORWARD(on_br_if_expr, depth);
-}
-
-static Result logging_on_br_table_expr(BinaryReaderContext* context,
-                                       uint32_t num_targets,
-                                       uint32_t* target_depths,
-                                       uint32_t default_target_depth) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(context->user_data);
-  LOGF("on_br_table_expr(num_targets: %u, depths: [", num_targets);
-  for (uint32_t i = 0; i < num_targets; ++i) {
-    LOGF_NOINDENT("%u", target_depths[i]);
-    if (i != num_targets - 1)
-      LOGF_NOINDENT(", ");
-  }
-  LOGF_NOINDENT("], default: %u)\n", default_target_depth);
-  FORWARD_CTX(on_br_table_expr, num_targets, target_depths,
-              default_target_depth);
-}
-
-static Result logging_on_f32_const_expr(uint32_t value_bits, void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  float value;
-  memcpy(&value, &value_bits, sizeof(value));
-  LOGF("on_f32_const_expr(%g (0x04%x))\n", value, value_bits);
-  FORWARD(on_f32_const_expr, value_bits);
-}
-
-static Result logging_on_f64_const_expr(uint64_t value_bits, void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  double value;
-  memcpy(&value, &value_bits, sizeof(value));
-  LOGF("on_f64_const_expr(%g (0x08%" PRIx64 "))\n", value, value_bits);
-  FORWARD(on_f64_const_expr, value_bits);
-}
-
-static Result logging_on_i32_const_expr(uint32_t value, void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  LOGF("on_i32_const_expr(%u (0x%x))\n", value, value);
-  FORWARD(on_i32_const_expr, value);
-}
-
-static Result logging_on_i64_const_expr(uint64_t value, void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  LOGF("on_i64_const_expr(%" PRIu64 " (0x%" PRIx64 "))\n", value, value);
-  FORWARD(on_i64_const_expr, value);
-}
-
-static Result logging_on_if_expr(uint32_t num_types,
-                                 Type* sig_types,
-                                 void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  LOGF("on_if_expr(sig: ");
-  log_types(ctx, num_types, sig_types);
-  LOGF_NOINDENT(")\n");
-  FORWARD(on_if_expr, num_types, sig_types);
-}
-
-static Result logging_on_load_expr(Opcode opcode,
-                                   uint32_t alignment_log2,
-                                   uint32_t offset,
-                                   void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  LOGF("on_load_expr(opcode: \"%s\" (%u), align log2: %u, offset: %u)\n",
-       get_opcode_name(opcode), static_cast<unsigned>(opcode), alignment_log2,
-       offset);
-  FORWARD(on_load_expr, opcode, alignment_log2, offset);
-}
-
-static Result logging_on_loop_expr(uint32_t num_types,
-                                   Type* sig_types,
-                                   void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  LOGF("on_loop_expr(sig: ");
-  log_types(ctx, num_types, sig_types);
-  LOGF_NOINDENT(")\n");
-  FORWARD(on_loop_expr, num_types, sig_types);
-}
-
-static Result logging_on_store_expr(Opcode opcode,
-                                    uint32_t alignment_log2,
-                                    uint32_t offset,
-                                    void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  LOGF("on_store_expr(opcode: \"%s\" (%u), align log2: %u, offset: %u)\n",
-       get_opcode_name(opcode), static_cast<unsigned>(opcode), alignment_log2,
-       offset);
-  FORWARD(on_store_expr, opcode, alignment_log2, offset);
-}
-
-static Result logging_end_function_body_pass(uint32_t index,
-                                             uint32_t pass,
-                                             void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  dedent(ctx);
-  LOGF("end_function_body_pass(index: %u, pass: %u)\n", index, pass);
-  FORWARD(end_function_body_pass, index, pass);
-}
-
-static Result logging_on_data_segment_data(uint32_t index,
-                                           const void* data,
-                                           uint32_t size,
-                                           void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  LOGF("on_data_segment_data(index:%u, size:%u)\n", index, size);
-  FORWARD(on_data_segment_data, index, data, size);
-}
-
-static Result logging_on_function_name_subsection(uint32_t index,
-                                                  uint32_t name_type,
-                                                  uint32_t subsection_size,
-                                                  void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  LOGF("on_function_name_subsection(index:%u, nametype:%u, size:%u)\n", index, name_type, subsection_size);
-  FORWARD(on_function_name_subsection, index, name_type, subsection_size);
-}
-
-static Result logging_on_function_name(uint32_t index,
-                                       StringSlice name,
-                                       void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  LOGF("on_function_name(index: %u, name: \"" PRIstringslice "\")\n", index,
-       WABT_PRINTF_STRING_SLICE_ARG(name));
-  FORWARD(on_function_name, index, name);
-}
-
-static Result logging_on_local_name_subsection(uint32_t index,
-                                               uint32_t name_type,
-                                               uint32_t subsection_size,
-                                               void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  LOGF("on_local_name_subsection(index:%u, nametype:%u, size:%u)\n", index, name_type, subsection_size);
-  FORWARD(on_local_name_subsection, index, name_type, subsection_size);
-}
-
-static Result logging_on_local_name(uint32_t func_index,
-                                    uint32_t local_index,
-                                    StringSlice name,
-                                    void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  LOGF("on_local_name(func_index: %u, local_index: %u, name: \"" PRIstringslice
-       "\")\n",
-       func_index, local_index, WABT_PRINTF_STRING_SLICE_ARG(name));
-  FORWARD(on_local_name, func_index, local_index, name);
-}
-
-static Result logging_on_init_expr_f32_const_expr(uint32_t index,
-                                                  uint32_t value_bits,
-                                                  void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  float value;
-  memcpy(&value, &value_bits, sizeof(value));
-  LOGF("on_init_expr_f32_const_expr(index: %u, value: %g (0x04%x))\n", index,
-       value, value_bits);
-  FORWARD(on_init_expr_f32_const_expr, index, value_bits);
-}
-
-static Result logging_on_init_expr_f64_const_expr(uint32_t index,
-                                                  uint64_t value_bits,
-                                                  void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  double value;
-  memcpy(&value, &value_bits, sizeof(value));
-  LOGF("on_init_expr_f64_const_expr(index: %u value: %g (0x08%" PRIx64 "))\n",
-       index, value, value_bits);
-  FORWARD(on_init_expr_f64_const_expr, index, value_bits);
-}
-
-static Result logging_on_init_expr_i32_const_expr(uint32_t index,
-                                                  uint32_t value,
-                                                  void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  LOGF("on_init_expr_i32_const_expr(index: %u, value: %u)\n", index, value);
-  FORWARD(on_init_expr_i32_const_expr, index, value);
-}
-
-static Result logging_on_init_expr_i64_const_expr(uint32_t index,
-                                                  uint64_t value,
-                                                  void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  LOGF("on_init_expr_i64_const_expr(index: %u, value: %" PRIu64 ")\n", index,
-       value);
-  FORWARD(on_init_expr_i64_const_expr, index, value);
-}
-
-static Result logging_on_reloc_count(uint32_t count,
-                                     BinarySection section_code,
-                                     StringSlice section_name,
-                                     void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  LOGF("on_reloc_count(count: %d, section: %s, section_name: " PRIstringslice
-       ")\n",
-       count, get_section_name(section_code),
-       WABT_PRINTF_STRING_SLICE_ARG(section_name));
-  FORWARD(on_reloc_count, count, section_code, section_name);
-}
-
-static Result logging_on_reloc(RelocType type,
-                               uint32_t offset,
-                               uint32_t index,
-                               int32_t addend,
-                               void* user_data) {
-  LoggingContext* ctx = static_cast<LoggingContext*>(user_data);
-  LOGF("on_reloc(type: %s, offset: %u, index: %u, addend: %d)\n",
-       get_reloc_type_name(type), offset, index, addend);
-  FORWARD(on_reloc, type, offset, index, addend);
-}
-
-static void read_init_expr(Context* ctx, uint32_t index) {
-  uint8_t opcode;
-  in_u8(ctx, &opcode, "opcode");
+Result BinaryReader::ReadInitExpr(Index index) {
+  uint8_t opcode = 0;
+  CHECK_RESULT(ReadU8(&opcode, "opcode"));
   switch (static_cast<Opcode>(opcode)) {
     case Opcode::I32Const: {
       uint32_t value = 0;
-      in_i32_leb128(ctx, &value, "init_expr i32.const value");
-      CALLBACK(on_init_expr_i32_const_expr, index, value);
+      CHECK_RESULT(ReadI32Leb128(&value, "init_expr i32.const value"));
+      CALLBACK(OnInitExprI32ConstExpr, index, value);
       break;
     }
 
     case Opcode::I64Const: {
       uint64_t value = 0;
-      in_i64_leb128(ctx, &value, "init_expr i64.const value");
-      CALLBACK(on_init_expr_i64_const_expr, index, value);
+      CHECK_RESULT(ReadI64Leb128(&value, "init_expr i64.const value"));
+      CALLBACK(OnInitExprI64ConstExpr, index, value);
       break;
     }
 
     case Opcode::F32Const: {
       uint32_t value_bits = 0;
-      in_f32(ctx, &value_bits, "init_expr f32.const value");
-      CALLBACK(on_init_expr_f32_const_expr, index, value_bits);
+      CHECK_RESULT(ReadF32(&value_bits, "init_expr f32.const value"));
+      CALLBACK(OnInitExprF32ConstExpr, index, value_bits);
       break;
     }
 
     case Opcode::F64Const: {
       uint64_t value_bits = 0;
-      in_f64(ctx, &value_bits, "init_expr f64.const value");
-      CALLBACK(on_init_expr_f64_const_expr, index, value_bits);
+      CHECK_RESULT(ReadF64(&value_bits, "init_expr f64.const value"));
+      CALLBACK(OnInitExprF64ConstExpr, index, value_bits);
       break;
     }
 
     case Opcode::GetGlobal: {
-      uint32_t global_index;
-      in_u32_leb128(ctx, &global_index, "init_expr get_global index");
-      CALLBACK(on_init_expr_get_global_expr, index, global_index);
+      Index global_index;
+      CHECK_RESULT(ReadIndex(&global_index, "init_expr get_global index"));
+      CALLBACK(OnInitExprGetGlobalExpr, index, global_index);
       break;
     }
 
     case Opcode::End:
-      return;
+      return Result::Ok;
 
     default:
-      RAISE_ERROR("unexpected opcode in initializer expression: %d (0x%x)",
-                  opcode, opcode);
-      break;
+      PrintError("unexpected opcode in initializer expression: %d (0x%x)",
+                 opcode, opcode);
+      return Result::Error;
   }
 
-  in_u8(ctx, &opcode, "opcode");
-  RAISE_ERROR_UNLESS(static_cast<Opcode>(opcode) == Opcode::End,
-                     "expected END opcode after initializer expression");
+  CHECK_RESULT(ReadU8(&opcode, "opcode"));
+  ERROR_UNLESS(static_cast<Opcode>(opcode) == Opcode::End,
+               "expected END opcode after initializer expression");
+  return Result::Ok;
 }
 
-static void read_table(Context* ctx,
-                       Type* out_elem_type,
-                       Limits* out_elem_limits) {
-  in_type(ctx, out_elem_type, "table elem type");
-  RAISE_ERROR_UNLESS(*out_elem_type == Type::Anyfunc,
-                     "table elem type must by anyfunc");
+Result BinaryReader::ReadTable(Type* out_elem_type, Limits* out_elem_limits) {
+  CHECK_RESULT(ReadType(out_elem_type, "table elem type"));
+  ERROR_UNLESS(*out_elem_type == Type::Anyfunc,
+               "table elem type must by anyfunc");
 
   uint32_t flags;
   uint32_t initial;
   uint32_t max = 0;
-  in_u32_leb128(ctx, &flags, "table flags");
-  in_u32_leb128(ctx, &initial, "table initial elem count");
+  CHECK_RESULT(ReadU32Leb128(&flags, "table flags"));
+  CHECK_RESULT(ReadU32Leb128(&initial, "table initial elem count"));
   bool has_max = flags & WABT_BINARY_LIMITS_HAS_MAX_FLAG;
   if (has_max) {
-    in_u32_leb128(ctx, &max, "table max elem count");
-    RAISE_ERROR_UNLESS(initial <= max,
-                       "table initial elem count must be <= max elem count");
+    CHECK_RESULT(ReadU32Leb128(&max, "table max elem count"));
+    ERROR_UNLESS(initial <= max,
+                 "table initial elem count must be <= max elem count");
   }
 
   out_elem_limits->has_max = has_max;
   out_elem_limits->initial = initial;
   out_elem_limits->max = max;
+  return Result::Ok;
 }
 
-static void read_memory(Context* ctx, Limits* out_page_limits) {
+Result BinaryReader::ReadMemory(Limits* out_page_limits) {
   uint32_t flags;
   uint32_t initial;
   uint32_t max = 0;
-  in_u32_leb128(ctx, &flags, "memory flags");
-  in_u32_leb128(ctx, &initial, "memory initial page count");
+  CHECK_RESULT(ReadU32Leb128(&flags, "memory flags"));
+  CHECK_RESULT(ReadU32Leb128(&initial, "memory initial page count"));
   bool has_max = flags & WABT_BINARY_LIMITS_HAS_MAX_FLAG;
-  RAISE_ERROR_UNLESS(initial <= WABT_MAX_PAGES, "invalid memory initial size");
+  ERROR_UNLESS(initial <= WABT_MAX_PAGES, "invalid memory initial size");
   if (has_max) {
-    in_u32_leb128(ctx, &max, "memory max page count");
-    RAISE_ERROR_UNLESS(max <= WABT_MAX_PAGES, "invalid memory max size");
-    RAISE_ERROR_UNLESS(initial <= max,
-                       "memory initial size must be <= max size");
+    CHECK_RESULT(ReadU32Leb128(&max, "memory max page count"));
+    ERROR_UNLESS(max <= WABT_MAX_PAGES, "invalid memory max size");
+    ERROR_UNLESS(initial <= max, "memory initial size must be <= max size");
   }
 
   out_page_limits->has_max = has_max;
   out_page_limits->initial = initial;
   out_page_limits->max = max;
+  return Result::Ok;
 }
 
-static void read_global_header(Context* ctx,
-                               Type* out_type,
-                               bool* out_mutable) {
-  Type global_type;
-  uint8_t mutable_;
-  in_type(ctx, &global_type, "global type");
-  RAISE_ERROR_UNLESS(is_concrete_type(global_type),
-                     "invalid global type: %#x", static_cast<int>(global_type));
+Result BinaryReader::ReadGlobalHeader(Type* out_type, bool* out_mutable) {
+  Type global_type = Type::Void;
+  uint8_t mutable_ = 0;
+  CHECK_RESULT(ReadType(&global_type, "global type"));
+  ERROR_UNLESS(is_concrete_type(global_type), "invalid global type: %#x",
+               static_cast<int>(global_type));
 
-  in_u8(ctx, &mutable_, "global mutability");
-  RAISE_ERROR_UNLESS(mutable_ <= 1, "global mutability must be 0 or 1");
+  CHECK_RESULT(ReadU8(&mutable_, "global mutability"));
+  ERROR_UNLESS(mutable_ <= 1, "global mutability must be 0 or 1");
 
   *out_type = global_type;
   *out_mutable = mutable_;
+  return Result::Ok;
 }
 
-static void read_function_body(Context* ctx, uint32_t end_offset) {
+Result BinaryReader::ReadFunctionBody(Offset end_offset) {
   bool seen_end_opcode = false;
-  while (ctx->offset < end_offset) {
-    uint8_t opcode_u8;
-    in_u8(ctx, &opcode_u8, "opcode");
+  while (state_.offset < end_offset) {
+    uint8_t opcode_u8 = 0;
+    CHECK_RESULT(ReadU8(&opcode_u8, "opcode"));
     Opcode opcode = static_cast<Opcode>(opcode_u8);
-    CALLBACK_CTX(on_opcode, opcode);
+    CALLBACK(OnOpcode, opcode);
     switch (opcode) {
       case Opcode::Unreachable:
-        CALLBACK0(on_unreachable_expr);
-        CALLBACK_CTX0(on_opcode_bare);
+        CALLBACK0(OnUnreachableExpr);
+        CALLBACK0(OnOpcodeBare);
         break;
 
       case Opcode::Block: {
         Type sig_type;
-        in_type(ctx, &sig_type, "block signature type");
-        RAISE_ERROR_UNLESS(is_inline_sig_type(sig_type),
-                           "expected valid block signature type");
-        uint32_t num_types = sig_type == Type::Void ? 0 : 1;
-        CALLBACK(on_block_expr, num_types, &sig_type);
-        CALLBACK_CTX(on_opcode_block_sig, num_types, &sig_type);
+        CHECK_RESULT(ReadType(&sig_type, "block signature type"));
+        ERROR_UNLESS(is_inline_sig_type(sig_type),
+                     "expected valid block signature type");
+        Index num_types = sig_type == Type::Void ? 0 : 1;
+        CALLBACK(OnBlockExpr, num_types, &sig_type);
+        CALLBACK(OnOpcodeBlockSig, num_types, &sig_type);
         break;
       }
 
       case Opcode::Loop: {
         Type sig_type;
-        in_type(ctx, &sig_type, "loop signature type");
-        RAISE_ERROR_UNLESS(is_inline_sig_type(sig_type),
-                           "expected valid block signature type");
-        uint32_t num_types = sig_type == Type::Void ? 0 : 1;
-        CALLBACK(on_loop_expr, num_types, &sig_type);
-        CALLBACK_CTX(on_opcode_block_sig, num_types, &sig_type);
+        CHECK_RESULT(ReadType(&sig_type, "loop signature type"));
+        ERROR_UNLESS(is_inline_sig_type(sig_type),
+                     "expected valid block signature type");
+        Index num_types = sig_type == Type::Void ? 0 : 1;
+        CALLBACK(OnLoopExpr, num_types, &sig_type);
+        CALLBACK(OnOpcodeBlockSig, num_types, &sig_type);
         break;
       }
 
       case Opcode::If: {
         Type sig_type;
-        in_type(ctx, &sig_type, "if signature type");
-        RAISE_ERROR_UNLESS(is_inline_sig_type(sig_type),
-                           "expected valid block signature type");
-        uint32_t num_types = sig_type == Type::Void ? 0 : 1;
-        CALLBACK(on_if_expr, num_types, &sig_type);
-        CALLBACK_CTX(on_opcode_block_sig, num_types, &sig_type);
+        CHECK_RESULT(ReadType(&sig_type, "if signature type"));
+        ERROR_UNLESS(is_inline_sig_type(sig_type),
+                     "expected valid block signature type");
+        Index num_types = sig_type == Type::Void ? 0 : 1;
+        CALLBACK(OnIfExpr, num_types, &sig_type);
+        CALLBACK(OnOpcodeBlockSig, num_types, &sig_type);
         break;
       }
 
       case Opcode::Else:
-        CALLBACK0(on_else_expr);
-        CALLBACK_CTX0(on_opcode_bare);
+        CALLBACK0(OnElseExpr);
+        CALLBACK0(OnOpcodeBare);
         break;
 
       case Opcode::Select:
-        CALLBACK0(on_select_expr);
-        CALLBACK_CTX0(on_opcode_bare);
+        CALLBACK0(OnSelectExpr);
+        CALLBACK0(OnOpcodeBare);
         break;
 
       case Opcode::Br: {
-        uint32_t depth;
-        in_u32_leb128(ctx, &depth, "br depth");
-        CALLBACK(on_br_expr, depth);
-        CALLBACK_CTX(on_opcode_uint32, depth);
+        Index depth;
+        CHECK_RESULT(ReadIndex(&depth, "br depth"));
+        CALLBACK(OnBrExpr, depth);
+        CALLBACK(OnOpcodeIndex, depth);
         break;
       }
 
       case Opcode::BrIf: {
-        uint32_t depth;
-        in_u32_leb128(ctx, &depth, "br_if depth");
-        CALLBACK(on_br_if_expr, depth);
-        CALLBACK_CTX(on_opcode_uint32, depth);
+        Index depth;
+        CHECK_RESULT(ReadIndex(&depth, "br_if depth"));
+        CALLBACK(OnBrIfExpr, depth);
+        CALLBACK(OnOpcodeIndex, depth);
         break;
       }
 
       case Opcode::BrTable: {
-        uint32_t num_targets;
-        in_u32_leb128(ctx, &num_targets, "br_table target count");
-        ctx->target_depths.resize(num_targets);
+        Index num_targets;
+        CHECK_RESULT(ReadIndex(&num_targets, "br_table target count"));
+        target_depths_.resize(num_targets);
 
-        for (uint32_t i = 0; i < num_targets; ++i) {
-          uint32_t target_depth;
-          in_u32_leb128(ctx, &target_depth, "br_table target depth");
-          ctx->target_depths[i] = target_depth;
+        for (Index i = 0; i < num_targets; ++i) {
+          Index target_depth;
+          CHECK_RESULT(ReadIndex(&target_depth, "br_table target depth"));
+          target_depths_[i] = target_depth;
         }
 
-        uint32_t default_target_depth;
-        in_u32_leb128(ctx, &default_target_depth,
-                      "br_table default target depth");
+        Index default_target_depth;
+        CHECK_RESULT(
+            ReadIndex(&default_target_depth, "br_table default target depth"));
 
-        uint32_t* target_depths =
-            num_targets ? ctx->target_depths.data() : nullptr;
+        Index* target_depths = num_targets ? target_depths_.data() : nullptr;
 
-        CALLBACK_CTX(on_br_table_expr, num_targets, target_depths,
-                     default_target_depth);
+        CALLBACK(OnBrTableExpr, num_targets, target_depths,
+                 default_target_depth);
         break;
       }
 
       case Opcode::Return:
-        CALLBACK0(on_return_expr);
-        CALLBACK_CTX0(on_opcode_bare);
+        CALLBACK0(OnReturnExpr);
+        CALLBACK0(OnOpcodeBare);
         break;
 
       case Opcode::Nop:
-        CALLBACK0(on_nop_expr);
-        CALLBACK_CTX0(on_opcode_bare);
+        CALLBACK0(OnNopExpr);
+        CALLBACK0(OnOpcodeBare);
         break;
 
       case Opcode::Drop:
-        CALLBACK0(on_drop_expr);
-        CALLBACK_CTX0(on_opcode_bare);
+        CALLBACK0(OnDropExpr);
+        CALLBACK0(OnOpcodeBare);
         break;
 
       case Opcode::End:
-        if (ctx->offset == end_offset) {
+        if (state_.offset == end_offset) {
           seen_end_opcode = true;
-          CALLBACK0(on_end_func);
+          CALLBACK0(OnEndFunc);
         } else {
-          CALLBACK0(on_end_expr);
+          CALLBACK0(OnEndExpr);
         }
         break;
 
       case Opcode::I32Const: {
-        uint32_t value = 0;
-        in_i32_leb128(ctx, &value, "i32.const value");
-        CALLBACK(on_i32_const_expr, value);
-        CALLBACK_CTX(on_opcode_uint32, value);
+        uint32_t value;
+        CHECK_RESULT(ReadI32Leb128(&value, "i32.const value"));
+        CALLBACK(OnI32ConstExpr, value);
+        CALLBACK(OnOpcodeUint32, value);
         break;
       }
 
       case Opcode::I64Const: {
-        uint64_t value = 0;
-        in_i64_leb128(ctx, &value, "i64.const value");
-        CALLBACK(on_i64_const_expr, value);
-        CALLBACK_CTX(on_opcode_uint64, value);
+        uint64_t value;
+        CHECK_RESULT(ReadI64Leb128(&value, "i64.const value"));
+        CALLBACK(OnI64ConstExpr, value);
+        CALLBACK(OnOpcodeUint64, value);
         break;
       }
 
       case Opcode::F32Const: {
         uint32_t value_bits = 0;
-        in_f32(ctx, &value_bits, "f32.const value");
-        CALLBACK(on_f32_const_expr, value_bits);
-        CALLBACK_CTX(on_opcode_f32, value_bits);
+        CHECK_RESULT(ReadF32(&value_bits, "f32.const value"));
+        CALLBACK(OnF32ConstExpr, value_bits);
+        CALLBACK(OnOpcodeF32, value_bits);
         break;
       }
 
       case Opcode::F64Const: {
         uint64_t value_bits = 0;
-        in_f64(ctx, &value_bits, "f64.const value");
-        CALLBACK(on_f64_const_expr, value_bits);
-        CALLBACK_CTX(on_opcode_f64, value_bits);
+        CHECK_RESULT(ReadF64(&value_bits, "f64.const value"));
+        CALLBACK(OnF64ConstExpr, value_bits);
+        CALLBACK(OnOpcodeF64, value_bits);
         break;
       }
 
       case Opcode::GetGlobal: {
-        uint32_t global_index;
-        in_u32_leb128(ctx, &global_index, "get_global global index");
-        CALLBACK(on_get_global_expr, global_index);
-        CALLBACK_CTX(on_opcode_uint32, global_index);
+        Index global_index;
+        CHECK_RESULT(ReadIndex(&global_index, "get_global global index"));
+        CALLBACK(OnGetGlobalExpr, global_index);
+        CALLBACK(OnOpcodeIndex, global_index);
         break;
       }
 
       case Opcode::GetLocal: {
-        uint32_t local_index;
-        in_u32_leb128(ctx, &local_index, "get_local local index");
-        CALLBACK(on_get_local_expr, local_index);
-        CALLBACK_CTX(on_opcode_uint32, local_index);
+        Index local_index;
+        CHECK_RESULT(ReadIndex(&local_index, "get_local local index"));
+        CALLBACK(OnGetLocalExpr, local_index);
+        CALLBACK(OnOpcodeIndex, local_index);
         break;
       }
 
       case Opcode::SetGlobal: {
-        uint32_t global_index;
-        in_u32_leb128(ctx, &global_index, "set_global global index");
-        CALLBACK(on_set_global_expr, global_index);
-        CALLBACK_CTX(on_opcode_uint32, global_index);
+        Index global_index;
+        CHECK_RESULT(ReadIndex(&global_index, "set_global global index"));
+        CALLBACK(OnSetGlobalExpr, global_index);
+        CALLBACK(OnOpcodeIndex, global_index);
         break;
       }
 
       case Opcode::SetLocal: {
-        uint32_t local_index;
-        in_u32_leb128(ctx, &local_index, "set_local local index");
-        CALLBACK(on_set_local_expr, local_index);
-        CALLBACK_CTX(on_opcode_uint32, local_index);
+        Index local_index;
+        CHECK_RESULT(ReadIndex(&local_index, "set_local local index"));
+        CALLBACK(OnSetLocalExpr, local_index);
+        CALLBACK(OnOpcodeIndex, local_index);
         break;
       }
 
       case Opcode::Call: {
-        uint32_t func_index;
-        in_u32_leb128(ctx, &func_index, "call function index");
-        RAISE_ERROR_UNLESS(func_index < num_total_funcs(ctx),
-                           "invalid call function index");
-        CALLBACK(on_call_expr, func_index);
-        CALLBACK_CTX(on_opcode_uint32, func_index);
+        Index func_index;
+        CHECK_RESULT(ReadIndex(&func_index, "call function index"));
+        ERROR_UNLESS(func_index < NumTotalFuncs(),
+                     "invalid call function index: %" PRIindex, func_index);
+        CALLBACK(OnCallExpr, func_index);
+        CALLBACK(OnOpcodeIndex, func_index);
         break;
       }
 
       case Opcode::CallIndirect: {
-        uint32_t sig_index;
-        in_u32_leb128(ctx, &sig_index, "call_indirect signature index");
-        RAISE_ERROR_UNLESS(sig_index < ctx->num_signatures,
-                           "invalid call_indirect signature index");
+        Index sig_index;
+        CHECK_RESULT(ReadIndex(&sig_index, "call_indirect signature index"));
+        ERROR_UNLESS(sig_index < num_signatures_,
+                     "invalid call_indirect signature index");
         uint32_t reserved;
-        in_u32_leb128(ctx, &reserved, "call_indirect reserved");
-        RAISE_ERROR_UNLESS(reserved == 0,
-                           "call_indirect reserved value must be 0");
-        CALLBACK(on_call_indirect_expr, sig_index);
-        CALLBACK_CTX(on_opcode_uint32_uint32, sig_index, reserved);
+        CHECK_RESULT(ReadU32Leb128(&reserved, "call_indirect reserved"));
+        ERROR_UNLESS(reserved == 0, "call_indirect reserved value must be 0");
+        CALLBACK(OnCallIndirectExpr, sig_index);
+        CALLBACK(OnOpcodeUint32Uint32, sig_index, reserved);
         break;
       }
 
       case Opcode::TeeLocal: {
-        uint32_t local_index;
-        in_u32_leb128(ctx, &local_index, "tee_local local index");
-        CALLBACK(on_tee_local_expr, local_index);
-        CALLBACK_CTX(on_opcode_uint32, local_index);
+        Index local_index;
+        CHECK_RESULT(ReadIndex(&local_index, "tee_local local index"));
+        CALLBACK(OnTeeLocalExpr, local_index);
+        CALLBACK(OnOpcodeIndex, local_index);
         break;
       }
 
@@ -1392,12 +795,12 @@
       case Opcode::F32Load:
       case Opcode::F64Load: {
         uint32_t alignment_log2;
-        in_u32_leb128(ctx, &alignment_log2, "load alignment");
-        uint32_t offset;
-        in_u32_leb128(ctx, &offset, "load offset");
+        CHECK_RESULT(ReadU32Leb128(&alignment_log2, "load alignment"));
+        Address offset;
+        CHECK_RESULT(ReadU32Leb128(&offset, "load offset"));
 
-        CALLBACK(on_load_expr, opcode, alignment_log2, offset);
-        CALLBACK_CTX(on_opcode_uint32_uint32, alignment_log2, offset);
+        CALLBACK(OnLoadExpr, opcode, alignment_log2, offset);
+        CALLBACK(OnOpcodeUint32Uint32, alignment_log2, offset);
         break;
       }
 
@@ -1411,32 +814,30 @@
       case Opcode::F32Store:
       case Opcode::F64Store: {
         uint32_t alignment_log2;
-        in_u32_leb128(ctx, &alignment_log2, "store alignment");
-        uint32_t offset;
-        in_u32_leb128(ctx, &offset, "store offset");
+        CHECK_RESULT(ReadU32Leb128(&alignment_log2, "store alignment"));
+        Address offset;
+        CHECK_RESULT(ReadU32Leb128(&offset, "store offset"));
 
-        CALLBACK(on_store_expr, opcode, alignment_log2, offset);
-        CALLBACK_CTX(on_opcode_uint32_uint32, alignment_log2, offset);
+        CALLBACK(OnStoreExpr, opcode, alignment_log2, offset);
+        CALLBACK(OnOpcodeUint32Uint32, alignment_log2, offset);
         break;
       }
 
       case Opcode::CurrentMemory: {
         uint32_t reserved;
-        in_u32_leb128(ctx, &reserved, "current_memory reserved");
-        RAISE_ERROR_UNLESS(reserved == 0,
-                           "current_memory reserved value must be 0");
-        CALLBACK0(on_current_memory_expr);
-        CALLBACK_CTX(on_opcode_uint32, reserved);
+        CHECK_RESULT(ReadU32Leb128(&reserved, "current_memory reserved"));
+        ERROR_UNLESS(reserved == 0, "current_memory reserved value must be 0");
+        CALLBACK0(OnCurrentMemoryExpr);
+        CALLBACK(OnOpcodeUint32, reserved);
         break;
       }
 
       case Opcode::GrowMemory: {
         uint32_t reserved;
-        in_u32_leb128(ctx, &reserved, "grow_memory reserved");
-        RAISE_ERROR_UNLESS(reserved == 0,
-                           "grow_memory reserved value must be 0");
-        CALLBACK0(on_grow_memory_expr);
-        CALLBACK_CTX(on_opcode_uint32, reserved);
+        CHECK_RESULT(ReadU32Leb128(&reserved, "grow_memory reserved"));
+        ERROR_UNLESS(reserved == 0, "grow_memory reserved value must be 0");
+        CALLBACK0(OnGrowMemoryExpr);
+        CALLBACK(OnOpcodeUint32, reserved);
         break;
       }
 
@@ -1484,8 +885,8 @@
       case Opcode::F64Min:
       case Opcode::F64Max:
       case Opcode::F64Copysign:
-        CALLBACK(on_binary_expr, opcode);
-        CALLBACK_CTX0(on_opcode_bare);
+        CALLBACK(OnBinaryExpr, opcode);
+        CALLBACK0(OnOpcodeBare);
         break;
 
       case Opcode::I32Eq:
@@ -1520,8 +921,8 @@
       case Opcode::F64Le:
       case Opcode::F64Gt:
       case Opcode::F64Ge:
-        CALLBACK(on_compare_expr, opcode);
-        CALLBACK_CTX0(on_opcode_bare);
+        CALLBACK(OnCompareExpr, opcode);
+        CALLBACK0(OnOpcodeBare);
         break;
 
       case Opcode::I32Clz:
@@ -1544,8 +945,8 @@
       case Opcode::F64Trunc:
       case Opcode::F64Nearest:
       case Opcode::F64Sqrt:
-        CALLBACK(on_unary_expr, opcode);
-        CALLBACK_CTX0(on_opcode_bare);
+        CALLBACK(OnUnaryExpr, opcode);
+        CALLBACK0(OnOpcodeBare);
         break;
 
       case Opcode::I32TruncSF32:
@@ -1575,464 +976,537 @@
       case Opcode::I64ReinterpretF64:
       case Opcode::I32Eqz:
       case Opcode::I64Eqz:
-        CALLBACK(on_convert_expr, opcode);
-        CALLBACK_CTX0(on_opcode_bare);
+        CALLBACK(OnConvertExpr, opcode);
+        CALLBACK0(OnOpcodeBare);
         break;
 
       default:
-        RAISE_ERROR("unexpected opcode: %d (0x%x)", static_cast<int>(opcode),
-                    static_cast<unsigned>(opcode));
+        PrintError("unexpected opcode: %d (0x%x)", static_cast<int>(opcode),
+                   static_cast<unsigned>(opcode));
+        return Result::Error;
     }
   }
-  RAISE_ERROR_UNLESS(ctx->offset == end_offset,
-                     "function body longer than given size");
-  RAISE_ERROR_UNLESS(seen_end_opcode, "function body must end with END opcode");
+  ERROR_UNLESS(state_.offset == end_offset,
+               "function body longer than given size");
+  ERROR_UNLESS(seen_end_opcode, "function body must end with END opcode");
+  return Result::Ok;
 }
 
-static void read_custom_section(Context* ctx, uint32_t section_size) {
-  StringSlice section_name;
-  in_str(ctx, &section_name, "section name");
-  CALLBACK_CTX(begin_custom_section, section_size, section_name);
+Result BinaryReader::ReadNamesSection(Offset section_size) {
+  CALLBACK(BeginNamesSection, section_size);
+  Index i = 0;
+  Offset previous_read_end = read_end_;
+  uint32_t previous_subsection_type = 0;
+  while (state_.offset < read_end_) {
+    uint32_t name_type;
+    Offset subsection_size;
+    CHECK_RESULT(ReadU32Leb128(&name_type, "name type"));
+    if (i != 0) {
+      ERROR_UNLESS(name_type != previous_subsection_type,
+                   "duplicate sub-section");
+      ERROR_UNLESS(name_type >= previous_subsection_type,
+                   "out-of-order sub-section");
+    }
+    previous_subsection_type = name_type;
+    CHECK_RESULT(ReadOffset(&subsection_size, "subsection size"));
+    size_t subsection_end = state_.offset + subsection_size;
+    ERROR_UNLESS(subsection_end <= read_end_,
+                 "invalid sub-section size: extends past end");
+    read_end_ = subsection_end;
 
-  bool name_section_ok = ctx->last_known_section >= BinarySection::Import;
-  if (ctx->options->read_debug_names && name_section_ok &&
-      strncmp(section_name.start, WABT_BINARY_SECTION_NAME,
-              section_name.length) == 0) {
-    CALLBACK_SECTION(begin_names_section, section_size);
-    uint32_t i = 0;
-    while (ctx->offset < ctx->read_end) {
-      uint32_t name_type;
-      uint32_t subsection_size;
-      in_u32_leb128(ctx, &name_type, "name type");
-      in_u32_leb128(ctx, &subsection_size, "subsection size");
-
-      switch (static_cast<NameSectionSubsection>(name_type)) {
+    switch (static_cast<NameSectionSubsection>(name_type)) {
       case NameSectionSubsection::Function:
-        CALLBACK(on_function_name_subsection, i, name_type, subsection_size);
+        CALLBACK(OnFunctionNameSubsection, i, name_type, subsection_size);
         if (subsection_size) {
-          uint32_t num_names;
-          in_u32_leb128(ctx, &num_names, "name count");
-          CALLBACK(on_function_names_count, num_names);
-          for (uint32_t j = 0; j < num_names; ++j) {
-            uint32_t function_index;
+          Index num_names;
+          CHECK_RESULT(ReadIndex(&num_names, "name count"));
+          CALLBACK(OnFunctionNamesCount, num_names);
+          Index last_function_index = kInvalidIndex;
+
+          for (Index j = 0; j < num_names; ++j) {
+            Index function_index;
             StringSlice function_name;
 
-            in_u32_leb128(ctx, &function_index, "function index");
-            in_str(ctx, &function_name, "function name");
-            CALLBACK(on_function_name, function_index, function_name);
+            CHECK_RESULT(ReadIndex(&function_index, "function index"));
+            ERROR_UNLESS(function_index != last_function_index,
+                         "duplicate function name: %u", function_index);
+            ERROR_UNLESS(last_function_index == kInvalidIndex ||
+                             function_index > last_function_index,
+                         "function index out of order: %u", function_index);
+            last_function_index = function_index;
+            ERROR_UNLESS(function_index < NumTotalFuncs(),
+                         "invalid function index: %" PRIindex, function_index);
+            CHECK_RESULT(ReadStr(&function_name, "function name"));
+            CALLBACK(OnFunctionName, function_index, function_name);
           }
         }
-        ++i;
         break;
       case NameSectionSubsection::Local:
-        CALLBACK(on_local_name_subsection, i, name_type, subsection_size);
+        CALLBACK(OnLocalNameSubsection, i, name_type, subsection_size);
         if (subsection_size) {
-          uint32_t num_funcs;
-          in_u32_leb128(ctx, &num_funcs, "function count");
-          CALLBACK(on_local_name_function_count, num_funcs);
-          for (uint32_t j = 0; j < num_funcs; ++j) {
-            uint32_t function_index;
-            in_u32_leb128(ctx, &function_index, "function index");
-            uint32_t num_locals;
-            in_u32_leb128(ctx, &num_locals, "local count");
-            CALLBACK(on_local_name_local_count, function_index, num_locals);
-            for (uint32_t k = 0; k < num_locals; ++k) {
-              uint32_t local_index;
+          Index num_funcs;
+          CHECK_RESULT(ReadIndex(&num_funcs, "function count"));
+          CALLBACK(OnLocalNameFunctionCount, num_funcs);
+          Index last_function_index = kInvalidIndex;
+          for (Index j = 0; j < num_funcs; ++j) {
+            Index function_index;
+            CHECK_RESULT(ReadIndex(&function_index, "function index"));
+            ERROR_UNLESS(function_index < NumTotalFuncs(),
+                         "invalid function index: %u", function_index);
+            ERROR_UNLESS(last_function_index == kInvalidIndex ||
+                             function_index > last_function_index,
+                         "locals function index out of order: %u",
+                         function_index);
+            last_function_index = function_index;
+            Index num_locals;
+            CHECK_RESULT(ReadIndex(&num_locals, "local count"));
+            CALLBACK(OnLocalNameLocalCount, function_index, num_locals);
+            Index last_local_index = kInvalidIndex;
+            for (Index k = 0; k < num_locals; ++k) {
+              Index local_index;
               StringSlice local_name;
 
-              in_u32_leb128(ctx, &local_index, "named index");
-              in_str(ctx, &local_name, "name");
-              CALLBACK(on_local_name, function_index, local_index, local_name);
+              CHECK_RESULT(ReadIndex(&local_index, "named index"));
+              ERROR_UNLESS(local_index != last_local_index,
+                           "duplicate local index: %u", local_index);
+              ERROR_UNLESS(last_local_index == kInvalidIndex ||
+                               local_index > last_local_index,
+                           "local index out of order: %u", local_index);
+              last_local_index = local_index;
+              CHECK_RESULT(ReadStr(&local_name, "name"));
+              CALLBACK(OnLocalName, function_index, local_index, local_name);
             }
           }
         }
-        ++i;
         break;
       default:
-        /* unknown subsection, skip rest of section */
-        ctx->offset = ctx->read_end;
+        /* unknown subsection, skip it */
+        state_.offset = subsection_end;
         break;
-      }
     }
-    CALLBACK_CTX0(end_names_section);
-  } else if (strncmp(section_name.start, WABT_BINARY_SECTION_RELOC,
-                     strlen(WABT_BINARY_SECTION_RELOC)) == 0) {
-    CALLBACK_SECTION(begin_reloc_section, section_size);
-    uint32_t num_relocs, section;
-    in_u32_leb128(ctx, &section, "section");
-    WABT_ZERO_MEMORY(section_name);
-    if (static_cast<BinarySection>(section) == BinarySection::Custom)
-      in_str(ctx, &section_name, "section name");
-    in_u32_leb128(ctx, &num_relocs, "relocation count");
-    CALLBACK(on_reloc_count, num_relocs, static_cast<BinarySection>(section),
-             section_name);
-    for (uint32_t i = 0; i < num_relocs; ++i) {
-      uint32_t reloc_type, offset, index, addend = 0;
-      in_u32_leb128(ctx, &reloc_type, "relocation type");
-      in_u32_leb128(ctx, &offset, "offset");
-      in_u32_leb128(ctx, &index, "index");
-      RelocType type = static_cast<RelocType>(reloc_type);
-      switch (type) {
-        case RelocType::MemoryAddressLEB:
-        case RelocType::MemoryAddressSLEB:
-        case RelocType::MemoryAddressI32:
-          in_u32_leb128(ctx, &addend, "addend");
-          break;
-        default:
-          break;
-      }
-      CALLBACK(on_reloc, type, offset, index, addend);
-    }
-    CALLBACK_CTX0(end_reloc_section);
-  } else {
-    /* This is an unknown custom section, skip it. */
-    ctx->offset = ctx->read_end;
+    ++i;
+    ERROR_UNLESS(state_.offset == subsection_end,
+                 "unfinished sub-section (expected end: 0x%" PRIzx ")",
+                 subsection_end);
+    read_end_ = previous_read_end;
   }
-  CALLBACK_CTX0(end_custom_section);
+  CALLBACK0(EndNamesSection);
+  return Result::Ok;
 }
 
-static void read_type_section(Context* ctx, uint32_t section_size) {
-  CALLBACK_SECTION(begin_signature_section, section_size);
-  in_u32_leb128(ctx, &ctx->num_signatures, "type count");
-  CALLBACK(on_signature_count, ctx->num_signatures);
+Result BinaryReader::ReadRelocSection(Offset section_size) {
+  CALLBACK(BeginRelocSection, section_size);
+  uint32_t section;
+  CHECK_RESULT(ReadU32Leb128(&section, "section"));
+  StringSlice section_name;
+  WABT_ZERO_MEMORY(section_name);
+  if (static_cast<BinarySection>(section) == BinarySection::Custom)
+    CHECK_RESULT(ReadStr(&section_name, "section name"));
+  Index num_relocs;
+  CHECK_RESULT(ReadIndex(&num_relocs, "relocation count"));
+  CALLBACK(OnRelocCount, num_relocs, static_cast<BinarySection>(section),
+           section_name);
+  for (Index i = 0; i < num_relocs; ++i) {
+    Offset offset;
+    Index index;
+    uint32_t reloc_type, addend = 0;
+    CHECK_RESULT(ReadU32Leb128(&reloc_type, "relocation type"));
+    CHECK_RESULT(ReadOffset(&offset, "offset"));
+    CHECK_RESULT(ReadIndex(&index, "index"));
+    RelocType type = static_cast<RelocType>(reloc_type);
+    switch (type) {
+      case RelocType::GlobalAddressLEB:
+      case RelocType::GlobalAddressSLEB:
+      case RelocType::GlobalAddressI32:
+        CHECK_RESULT(ReadI32Leb128(&addend, "addend"));
+        break;
+      default:
+        break;
+    }
+    CALLBACK(OnReloc, type, offset, index, addend);
+  }
+  CALLBACK0(EndRelocSection);
+  return Result::Ok;
+}
 
-  for (uint32_t i = 0; i < ctx->num_signatures; ++i) {
+Result BinaryReader::ReadCustomSection(Offset section_size) {
+  StringSlice section_name;
+  CHECK_RESULT(ReadStr(&section_name, "section name"));
+  CALLBACK(BeginCustomSection, section_size, section_name);
+
+  bool name_section_ok = last_known_section_ >= BinarySection::Import;
+  if (options_->read_debug_names && name_section_ok &&
+      strncmp(section_name.start, WABT_BINARY_SECTION_NAME,
+              section_name.length) == 0) {
+    CHECK_RESULT(ReadNamesSection(section_size));
+  } else if (strncmp(section_name.start, WABT_BINARY_SECTION_RELOC,
+                     strlen(WABT_BINARY_SECTION_RELOC)) == 0) {
+    CHECK_RESULT(ReadRelocSection(section_size));
+  } else {
+    /* This is an unknown custom section, skip it. */
+    state_.offset = read_end_;
+  }
+  CALLBACK0(EndCustomSection);
+  return Result::Ok;
+}
+
+Result BinaryReader::ReadTypeSection(Offset section_size) {
+  CALLBACK(BeginTypeSection, section_size);
+  CHECK_RESULT(ReadIndex(&num_signatures_, "type count"));
+  CALLBACK(OnTypeCount, num_signatures_);
+
+  for (Index i = 0; i < num_signatures_; ++i) {
     Type form;
-    in_type(ctx, &form, "type form");
-    RAISE_ERROR_UNLESS(form == Type::Func, "unexpected type form: %d",
-                       static_cast<int>(form));
+    CHECK_RESULT(ReadType(&form, "type form"));
+    ERROR_UNLESS(form == Type::Func, "unexpected type form: %d",
+                 static_cast<int>(form));
 
-    uint32_t num_params;
-    in_u32_leb128(ctx, &num_params, "function param count");
+    Index num_params;
+    CHECK_RESULT(ReadIndex(&num_params, "function param count"));
 
-    ctx->param_types.resize(num_params);
+    param_types_.resize(num_params);
 
-    for (uint32_t j = 0; j < num_params; ++j) {
+    for (Index j = 0; j < num_params; ++j) {
       Type param_type;
-      in_type(ctx, &param_type, "function param type");
-      RAISE_ERROR_UNLESS(is_concrete_type(param_type),
-                         "expected valid param type (got %d)",
-                         static_cast<int>(param_type));
-      ctx->param_types[j] = param_type;
+      CHECK_RESULT(ReadType(&param_type, "function param type"));
+      ERROR_UNLESS(is_concrete_type(param_type),
+                   "expected valid param type (got %d)",
+                   static_cast<int>(param_type));
+      param_types_[j] = param_type;
     }
 
-    uint32_t num_results;
-    in_u32_leb128(ctx, &num_results, "function result count");
-    RAISE_ERROR_UNLESS(num_results <= 1, "result count must be 0 or 1");
+    Index num_results;
+    CHECK_RESULT(ReadIndex(&num_results, "function result count"));
+    ERROR_UNLESS(num_results <= 1, "result count must be 0 or 1");
 
     Type result_type = Type::Void;
     if (num_results) {
-      in_type(ctx, &result_type, "function result type");
-      RAISE_ERROR_UNLESS(is_concrete_type(result_type),
-                         "expected valid result type: %d",
-                         static_cast<int>(result_type));
+      CHECK_RESULT(ReadType(&result_type, "function result type"));
+      ERROR_UNLESS(is_concrete_type(result_type),
+                   "expected valid result type: %d",
+                   static_cast<int>(result_type));
     }
 
-    Type* param_types = num_params ? ctx->param_types.data() : nullptr;
+    Type* param_types = num_params ? param_types_.data() : nullptr;
 
-    CALLBACK(on_signature, i, num_params, param_types, num_results,
-             &result_type);
+    CALLBACK(OnType, i, num_params, param_types, num_results, &result_type);
   }
-  CALLBACK_CTX0(end_signature_section);
+  CALLBACK0(EndTypeSection);
+  return Result::Ok;
 }
 
-static void read_import_section(Context* ctx, uint32_t section_size) {
-  CALLBACK_SECTION(begin_import_section, section_size);
-  in_u32_leb128(ctx, &ctx->num_imports, "import count");
-  CALLBACK(on_import_count, ctx->num_imports);
-  for (uint32_t i = 0; i < ctx->num_imports; ++i) {
+Result BinaryReader::ReadImportSection(Offset section_size) {
+  CALLBACK(BeginImportSection, section_size);
+  CHECK_RESULT(ReadIndex(&num_imports_, "import count"));
+  CALLBACK(OnImportCount, num_imports_);
+  for (Index i = 0; i < num_imports_; ++i) {
     StringSlice module_name;
-    in_str(ctx, &module_name, "import module name");
+    CHECK_RESULT(ReadStr(&module_name, "import module name"));
     StringSlice field_name;
-    in_str(ctx, &field_name, "import field name");
+    CHECK_RESULT(ReadStr(&field_name, "import field name"));
 
     uint32_t kind;
-    in_u32_leb128(ctx, &kind, "import kind");
+    CHECK_RESULT(ReadU32Leb128(&kind, "import kind"));
     switch (static_cast<ExternalKind>(kind)) {
       case ExternalKind::Func: {
-        uint32_t sig_index;
-        in_u32_leb128(ctx, &sig_index, "import signature index");
-        RAISE_ERROR_UNLESS(sig_index < ctx->num_signatures,
-                           "invalid import signature index");
-        CALLBACK(on_import, i, module_name, field_name);
-        CALLBACK(on_import_func, i, module_name, field_name,
-                 ctx->num_func_imports, sig_index);
-        ctx->num_func_imports++;
+        Index sig_index;
+        CHECK_RESULT(ReadIndex(&sig_index, "import signature index"));
+        ERROR_UNLESS(sig_index < num_signatures_,
+                     "invalid import signature index");
+        CALLBACK(OnImport, i, module_name, field_name);
+        CALLBACK(OnImportFunc, i, module_name, field_name, num_func_imports_,
+                 sig_index);
+        num_func_imports_++;
         break;
       }
 
       case ExternalKind::Table: {
         Type elem_type;
         Limits elem_limits;
-        read_table(ctx, &elem_type, &elem_limits);
-        CALLBACK(on_import, i, module_name, field_name);
-        CALLBACK(on_import_table, i, module_name, field_name,
-                 ctx->num_table_imports, elem_type, &elem_limits);
-        ctx->num_table_imports++;
+        CHECK_RESULT(ReadTable(&elem_type, &elem_limits));
+        CALLBACK(OnImport, i, module_name, field_name);
+        CALLBACK(OnImportTable, i, module_name, field_name, num_table_imports_,
+                 elem_type, &elem_limits);
+        num_table_imports_++;
         break;
       }
 
       case ExternalKind::Memory: {
         Limits page_limits;
-        read_memory(ctx, &page_limits);
-        CALLBACK(on_import, i, module_name, field_name);
-        CALLBACK(on_import_memory, i, module_name, field_name,
-                 ctx->num_memory_imports, &page_limits);
-        ctx->num_memory_imports++;
+        CHECK_RESULT(ReadMemory(&page_limits));
+        CALLBACK(OnImport, i, module_name, field_name);
+        CALLBACK(OnImportMemory, i, module_name, field_name,
+                 num_memory_imports_, &page_limits);
+        num_memory_imports_++;
         break;
       }
 
       case ExternalKind::Global: {
         Type type;
         bool mutable_;
-        read_global_header(ctx, &type, &mutable_);
-        CALLBACK(on_import, i, module_name, field_name);
-        CALLBACK(on_import_global, i, module_name, field_name,
-                 ctx->num_global_imports, type, mutable_);
-        ctx->num_global_imports++;
+        CHECK_RESULT(ReadGlobalHeader(&type, &mutable_));
+        CALLBACK(OnImport, i, module_name, field_name);
+        CALLBACK(OnImportGlobal, i, module_name, field_name,
+                 num_global_imports_, type, mutable_);
+        num_global_imports_++;
         break;
       }
 
       default:
-        RAISE_ERROR("invalid import kind: %d", kind);
+        PrintError("invalid import kind: %d", kind);
+        return Result::Error;
     }
   }
-  CALLBACK_CTX0(end_import_section);
+  CALLBACK0(EndImportSection);
+  return Result::Ok;
 }
 
-static void read_function_section(Context* ctx, uint32_t section_size) {
-  CALLBACK_SECTION(begin_function_signatures_section, section_size);
-  in_u32_leb128(ctx, &ctx->num_function_signatures, "function signature count");
-  CALLBACK(on_function_signatures_count, ctx->num_function_signatures);
-  for (uint32_t i = 0; i < ctx->num_function_signatures; ++i) {
-    uint32_t func_index = ctx->num_func_imports + i;
-    uint32_t sig_index;
-    in_u32_leb128(ctx, &sig_index, "function signature index");
-    RAISE_ERROR_UNLESS(sig_index < ctx->num_signatures,
-                       "invalid function signature index: %d", sig_index);
-    CALLBACK(on_function_signature, func_index, sig_index);
+Result BinaryReader::ReadFunctionSection(Offset section_size) {
+  CALLBACK(BeginFunctionSection, section_size);
+  CHECK_RESULT(
+      ReadIndex(&num_function_signatures_, "function signature count"));
+  CALLBACK(OnFunctionCount, num_function_signatures_);
+  for (Index i = 0; i < num_function_signatures_; ++i) {
+    Index func_index = num_func_imports_ + i;
+    Index sig_index;
+    CHECK_RESULT(ReadIndex(&sig_index, "function signature index"));
+    ERROR_UNLESS(sig_index < num_signatures_,
+                 "invalid function signature index: %" PRIindex, sig_index);
+    CALLBACK(OnFunction, func_index, sig_index);
   }
-  CALLBACK_CTX0(end_function_signatures_section);
+  CALLBACK0(EndFunctionSection);
+  return Result::Ok;
 }
 
-static void read_table_section(Context* ctx, uint32_t section_size) {
-  CALLBACK_SECTION(begin_table_section, section_size);
-  in_u32_leb128(ctx, &ctx->num_tables, "table count");
-  RAISE_ERROR_UNLESS(ctx->num_tables <= 1, "table count (%d) must be 0 or 1",
-                     ctx->num_tables);
-  CALLBACK(on_table_count, ctx->num_tables);
-  for (uint32_t i = 0; i < ctx->num_tables; ++i) {
-    uint32_t table_index = ctx->num_table_imports + i;
+Result BinaryReader::ReadTableSection(Offset section_size) {
+  CALLBACK(BeginTableSection, section_size);
+  CHECK_RESULT(ReadIndex(&num_tables_, "table count"));
+  ERROR_UNLESS(num_tables_ <= 1, "table count (%" PRIindex ") must be 0 or 1",
+               num_tables_);
+  CALLBACK(OnTableCount, num_tables_);
+  for (Index i = 0; i < num_tables_; ++i) {
+    Index table_index = num_table_imports_ + i;
     Type elem_type;
     Limits elem_limits;
-    read_table(ctx, &elem_type, &elem_limits);
-    CALLBACK(on_table, table_index, elem_type, &elem_limits);
+    CHECK_RESULT(ReadTable(&elem_type, &elem_limits));
+    CALLBACK(OnTable, table_index, elem_type, &elem_limits);
   }
-  CALLBACK_CTX0(end_table_section);
+  CALLBACK0(EndTableSection);
+  return Result::Ok;
 }
 
-static void read_memory_section(Context* ctx, uint32_t section_size) {
-  CALLBACK_SECTION(begin_memory_section, section_size);
-  in_u32_leb128(ctx, &ctx->num_memories, "memory count");
-  RAISE_ERROR_UNLESS(ctx->num_memories <= 1, "memory count must be 0 or 1");
-  CALLBACK(on_memory_count, ctx->num_memories);
-  for (uint32_t i = 0; i < ctx->num_memories; ++i) {
-    uint32_t memory_index = ctx->num_memory_imports + i;
+Result BinaryReader::ReadMemorySection(Offset section_size) {
+  CALLBACK(BeginMemorySection, section_size);
+  CHECK_RESULT(ReadIndex(&num_memories_, "memory count"));
+  ERROR_UNLESS(num_memories_ <= 1, "memory count must be 0 or 1");
+  CALLBACK(OnMemoryCount, num_memories_);
+  for (Index i = 0; i < num_memories_; ++i) {
+    Index memory_index = num_memory_imports_ + i;
     Limits page_limits;
-    read_memory(ctx, &page_limits);
-    CALLBACK(on_memory, memory_index, &page_limits);
+    CHECK_RESULT(ReadMemory(&page_limits));
+    CALLBACK(OnMemory, memory_index, &page_limits);
   }
-  CALLBACK_CTX0(end_memory_section);
+  CALLBACK0(EndMemorySection);
+  return Result::Ok;
 }
 
-static void read_global_section(Context* ctx, uint32_t section_size) {
-  CALLBACK_SECTION(begin_global_section, section_size);
-  in_u32_leb128(ctx, &ctx->num_globals, "global count");
-  CALLBACK(on_global_count, ctx->num_globals);
-  for (uint32_t i = 0; i < ctx->num_globals; ++i) {
-    uint32_t global_index = ctx->num_global_imports + i;
+Result BinaryReader::ReadGlobalSection(Offset section_size) {
+  CALLBACK(BeginGlobalSection, section_size);
+  CHECK_RESULT(ReadIndex(&num_globals_, "global count"));
+  CALLBACK(OnGlobalCount, num_globals_);
+  for (Index i = 0; i < num_globals_; ++i) {
+    Index global_index = num_global_imports_ + i;
     Type global_type;
     bool mutable_;
-    read_global_header(ctx, &global_type, &mutable_);
-    CALLBACK(begin_global, global_index, global_type, mutable_);
-    CALLBACK(begin_global_init_expr, global_index);
-    read_init_expr(ctx, global_index);
-    CALLBACK(end_global_init_expr, global_index);
-    CALLBACK(end_global, global_index);
+    CHECK_RESULT(ReadGlobalHeader(&global_type, &mutable_));
+    CALLBACK(BeginGlobal, global_index, global_type, mutable_);
+    CALLBACK(BeginGlobalInitExpr, global_index);
+    CHECK_RESULT(ReadInitExpr(global_index));
+    CALLBACK(EndGlobalInitExpr, global_index);
+    CALLBACK(EndGlobal, global_index);
   }
-  CALLBACK_CTX0(end_global_section);
+  CALLBACK0(EndGlobalSection);
+  return Result::Ok;
 }
 
-static void read_export_section(Context* ctx, uint32_t section_size) {
-  CALLBACK_SECTION(begin_export_section, section_size);
-  in_u32_leb128(ctx, &ctx->num_exports, "export count");
-  CALLBACK(on_export_count, ctx->num_exports);
-  for (uint32_t i = 0; i < ctx->num_exports; ++i) {
+Result BinaryReader::ReadExportSection(Offset section_size) {
+  CALLBACK(BeginExportSection, section_size);
+  CHECK_RESULT(ReadIndex(&num_exports_, "export count"));
+  CALLBACK(OnExportCount, num_exports_);
+  for (Index i = 0; i < num_exports_; ++i) {
     StringSlice name;
-    in_str(ctx, &name, "export item name");
+    CHECK_RESULT(ReadStr(&name, "export item name"));
 
-    uint8_t external_kind;
-    in_u8(ctx, &external_kind, "export external kind");
-    RAISE_ERROR_UNLESS(is_valid_external_kind(external_kind),
-                       "invalid export external kind");
+    uint8_t external_kind = 0;
+    CHECK_RESULT(ReadU8(&external_kind, "export external kind"));
+    ERROR_UNLESS(is_valid_external_kind(external_kind),
+                 "invalid export external kind: %d", external_kind);
 
-    uint32_t item_index;
-    in_u32_leb128(ctx, &item_index, "export item index");
+    Index item_index;
+    CHECK_RESULT(ReadIndex(&item_index, "export item index"));
     switch (static_cast<ExternalKind>(external_kind)) {
       case ExternalKind::Func:
-        RAISE_ERROR_UNLESS(item_index < num_total_funcs(ctx),
-                           "invalid export func index: %d", item_index);
+        ERROR_UNLESS(item_index < NumTotalFuncs(),
+                     "invalid export func index: %" PRIindex, item_index);
         break;
       case ExternalKind::Table:
-        RAISE_ERROR_UNLESS(item_index < num_total_tables(ctx),
-                           "invalid export table index");
+        ERROR_UNLESS(item_index < NumTotalTables(),
+                     "invalid export table index: %" PRIindex, item_index);
         break;
       case ExternalKind::Memory:
-        RAISE_ERROR_UNLESS(item_index < num_total_memories(ctx),
-                           "invalid export memory index");
+        ERROR_UNLESS(item_index < NumTotalMemories(),
+                     "invalid export memory index: %" PRIindex, item_index);
         break;
       case ExternalKind::Global:
-        RAISE_ERROR_UNLESS(item_index < num_total_globals(ctx),
-                           "invalid export global index");
+        ERROR_UNLESS(item_index < NumTotalGlobals(),
+                     "invalid export global index: %" PRIindex, item_index);
+        break;
+      case ExternalKind::Except:
+        // TODO(karlschimpf) Define.
+        WABT_FATAL("read export except not implemented");
         break;
     }
 
-    CALLBACK(on_export, i, static_cast<ExternalKind>(external_kind), item_index,
+    CALLBACK(OnExport, i, static_cast<ExternalKind>(external_kind), item_index,
              name);
   }
-  CALLBACK_CTX0(end_export_section);
+  CALLBACK0(EndExportSection);
+  return Result::Ok;
 }
 
-static void read_start_section(Context* ctx, uint32_t section_size) {
-  CALLBACK_SECTION(begin_start_section, section_size);
-  uint32_t func_index;
-  in_u32_leb128(ctx, &func_index, "start function index");
-  RAISE_ERROR_UNLESS(func_index < num_total_funcs(ctx),
-                     "invalid start function index");
-  CALLBACK(on_start_function, func_index);
-  CALLBACK_CTX0(end_start_section);
+Result BinaryReader::ReadStartSection(Offset section_size) {
+  CALLBACK(BeginStartSection, section_size);
+  Index func_index;
+  CHECK_RESULT(ReadIndex(&func_index, "start function index"));
+  ERROR_UNLESS(func_index < NumTotalFuncs(),
+               "invalid start function index: %" PRIindex, func_index);
+  CALLBACK(OnStartFunction, func_index);
+  CALLBACK0(EndStartSection);
+  return Result::Ok;
 }
 
-static void read_elem_section(Context* ctx, uint32_t section_size) {
-  CALLBACK_SECTION(begin_elem_section, section_size);
-  uint32_t num_elem_segments;
-  in_u32_leb128(ctx, &num_elem_segments, "elem segment count");
-  CALLBACK(on_elem_segment_count, num_elem_segments);
-  RAISE_ERROR_UNLESS(num_elem_segments == 0 || num_total_tables(ctx) > 0,
-                     "elem section without table section");
-  for (uint32_t i = 0; i < num_elem_segments; ++i) {
-    uint32_t table_index;
-    in_u32_leb128(ctx, &table_index, "elem segment table index");
-    CALLBACK(begin_elem_segment, i, table_index);
-    CALLBACK(begin_elem_segment_init_expr, i);
-    read_init_expr(ctx, i);
-    CALLBACK(end_elem_segment_init_expr, i);
+Result BinaryReader::ReadElemSection(Offset section_size) {
+  CALLBACK(BeginElemSection, section_size);
+  Index num_elem_segments;
+  CHECK_RESULT(ReadIndex(&num_elem_segments, "elem segment count"));
+  CALLBACK(OnElemSegmentCount, num_elem_segments);
+  ERROR_UNLESS(num_elem_segments == 0 || NumTotalTables() > 0,
+               "elem section without table section");
+  for (Index i = 0; i < num_elem_segments; ++i) {
+    Index table_index;
+    CHECK_RESULT(ReadIndex(&table_index, "elem segment table index"));
+    CALLBACK(BeginElemSegment, i, table_index);
+    CALLBACK(BeginElemSegmentInitExpr, i);
+    CHECK_RESULT(ReadInitExpr(i));
+    CALLBACK(EndElemSegmentInitExpr, i);
 
-    uint32_t num_function_indexes;
-    in_u32_leb128(ctx, &num_function_indexes,
-                  "elem segment function index count");
-    CALLBACK_CTX(on_elem_segment_function_index_count, i, num_function_indexes);
-    for (uint32_t j = 0; j < num_function_indexes; ++j) {
-      uint32_t func_index;
-      in_u32_leb128(ctx, &func_index, "elem segment function index");
-      CALLBACK(on_elem_segment_function_index, i, func_index);
+    Index num_function_indexes;
+    CHECK_RESULT(
+        ReadIndex(&num_function_indexes, "elem segment function index count"));
+    CALLBACK(OnElemSegmentFunctionIndexCount, i, num_function_indexes);
+    for (Index j = 0; j < num_function_indexes; ++j) {
+      Index func_index;
+      CHECK_RESULT(ReadIndex(&func_index, "elem segment function index"));
+      CALLBACK(OnElemSegmentFunctionIndex, i, func_index);
     }
-    CALLBACK(end_elem_segment, i);
+    CALLBACK(EndElemSegment, i);
   }
-  CALLBACK_CTX0(end_elem_section);
+  CALLBACK0(EndElemSection);
+  return Result::Ok;
 }
 
-static void read_code_section(Context* ctx, uint32_t section_size) {
-  CALLBACK_SECTION(begin_function_bodies_section, section_size);
-  in_u32_leb128(ctx, &ctx->num_function_bodies, "function body count");
-  RAISE_ERROR_UNLESS(ctx->num_function_signatures == ctx->num_function_bodies,
-                     "function signature count != function body count");
-  CALLBACK(on_function_bodies_count, ctx->num_function_bodies);
-  for (uint32_t i = 0; i < ctx->num_function_bodies; ++i) {
-    uint32_t func_index = ctx->num_func_imports + i;
-    uint32_t func_offset = ctx->offset;
-    ctx->offset = func_offset;
-    CALLBACK_CTX(begin_function_body, func_index);
+Result BinaryReader::ReadCodeSection(Offset section_size) {
+  CALLBACK(BeginCodeSection, section_size);
+  CHECK_RESULT(ReadIndex(&num_function_bodies_, "function body count"));
+  ERROR_UNLESS(num_function_signatures_ == num_function_bodies_,
+               "function signature count != function body count");
+  CALLBACK(OnFunctionBodyCount, num_function_bodies_);
+  for (Index i = 0; i < num_function_bodies_; ++i) {
+    Index func_index = num_func_imports_ + i;
+    Offset func_offset = state_.offset;
+    state_.offset = func_offset;
+    CALLBACK(BeginFunctionBody, func_index);
     uint32_t body_size;
-    in_u32_leb128(ctx, &body_size, "function body size");
-    uint32_t body_start_offset = ctx->offset;
-    uint32_t end_offset = body_start_offset + body_size;
+    CHECK_RESULT(ReadU32Leb128(&body_size, "function body size"));
+    Offset body_start_offset = state_.offset;
+    Offset end_offset = body_start_offset + body_size;
 
-    uint32_t num_local_decls;
-    in_u32_leb128(ctx, &num_local_decls, "local declaration count");
-    CALLBACK(on_local_decl_count, num_local_decls);
-    for (uint32_t k = 0; k < num_local_decls; ++k) {
-      uint32_t num_local_types;
-      in_u32_leb128(ctx, &num_local_types, "local type count");
+    Index num_local_decls;
+    CHECK_RESULT(ReadIndex(&num_local_decls, "local declaration count"));
+    CALLBACK(OnLocalDeclCount, num_local_decls);
+    for (Index k = 0; k < num_local_decls; ++k) {
+      Index num_local_types;
+      CHECK_RESULT(ReadIndex(&num_local_types, "local type count"));
       Type local_type;
-      in_type(ctx, &local_type, "local type");
-      RAISE_ERROR_UNLESS(is_concrete_type(local_type),
-                         "expected valid local type");
-      CALLBACK(on_local_decl, k, num_local_types, local_type);
+      CHECK_RESULT(ReadType(&local_type, "local type"));
+      ERROR_UNLESS(is_concrete_type(local_type), "expected valid local type");
+      CALLBACK(OnLocalDecl, k, num_local_types, local_type);
     }
 
-    read_function_body(ctx, end_offset);
+    CHECK_RESULT(ReadFunctionBody(end_offset));
 
-    CALLBACK(end_function_body, func_index);
+    CALLBACK(EndFunctionBody, func_index);
   }
-  CALLBACK_CTX0(end_function_bodies_section);
+  CALLBACK0(EndCodeSection);
+  return Result::Ok;
 }
 
-static void read_data_section(Context* ctx, uint32_t section_size) {
-  CALLBACK_SECTION(begin_data_section, section_size);
-  uint32_t num_data_segments;
-  in_u32_leb128(ctx, &num_data_segments, "data segment count");
-  CALLBACK(on_data_segment_count, num_data_segments);
-  RAISE_ERROR_UNLESS(num_data_segments == 0 || num_total_memories(ctx) > 0,
-                     "data section without memory section");
-  for (uint32_t i = 0; i < num_data_segments; ++i) {
-    uint32_t memory_index;
-    in_u32_leb128(ctx, &memory_index, "data segment memory index");
-    CALLBACK(begin_data_segment, i, memory_index);
-    CALLBACK(begin_data_segment_init_expr, i);
-    read_init_expr(ctx, i);
-    CALLBACK(end_data_segment_init_expr, i);
+Result BinaryReader::ReadDataSection(Offset section_size) {
+  CALLBACK(BeginDataSection, section_size);
+  Index num_data_segments;
+  CHECK_RESULT(ReadIndex(&num_data_segments, "data segment count"));
+  CALLBACK(OnDataSegmentCount, num_data_segments);
+  ERROR_UNLESS(num_data_segments == 0 || NumTotalMemories() > 0,
+               "data section without memory section");
+  for (Index i = 0; i < num_data_segments; ++i) {
+    Index memory_index;
+    CHECK_RESULT(ReadIndex(&memory_index, "data segment memory index"));
+    CALLBACK(BeginDataSegment, i, memory_index);
+    CALLBACK(BeginDataSegmentInitExpr, i);
+    CHECK_RESULT(ReadInitExpr(i));
+    CALLBACK(EndDataSegmentInitExpr, i);
 
-    uint32_t data_size;
+    Address data_size;
     const void* data;
-    in_bytes(ctx, &data, &data_size, "data segment data");
-    CALLBACK(on_data_segment_data, i, data, data_size);
-    CALLBACK(end_data_segment, i);
+    CHECK_RESULT(ReadBytes(&data, &data_size, "data segment data"));
+    CALLBACK(OnDataSegmentData, i, data, data_size);
+    CALLBACK(EndDataSegment, i);
   }
-  CALLBACK_CTX0(end_data_section);
+  CALLBACK0(EndDataSection);
+  return Result::Ok;
 }
 
-static void read_sections(Context* ctx) {
-  while (ctx->offset < ctx->data_size) {
+Result BinaryReader::ReadSections() {
+  while (state_.offset < state_.size) {
     uint32_t section_code;
-    uint32_t section_size;
-    /* Temporarily reset read_end to the full data size so the next section
+    Offset section_size;
+    /* Temporarily reset read_end_ to the full data size so the next section
      * can be read. */
-    ctx->read_end = ctx->data_size;
-    in_u32_leb128(ctx, &section_code, "section code");
-    in_u32_leb128(ctx, &section_size, "section size");
-    ctx->read_end = ctx->offset + section_size;
+    read_end_ = state_.size;
+    CHECK_RESULT(ReadU32Leb128(&section_code, "section code"));
+    CHECK_RESULT(ReadOffset(&section_size, "section size"));
+    read_end_ = state_.offset + section_size;
     if (section_code >= kBinarySectionCount) {
-      RAISE_ERROR("invalid section code: %u; max is %u", section_code,
-                  kBinarySectionCount - 1);
+      PrintError("invalid section code: %u; max is %u", section_code,
+                 kBinarySectionCount - 1);
+      return Result::Error;
     }
 
     BinarySection section = static_cast<BinarySection>(section_code);
 
-    if (ctx->read_end > ctx->data_size)
-      RAISE_ERROR("invalid section size: extends past end");
+    ERROR_UNLESS(read_end_ <= state_.size,
+                 "invalid section size: extends past end");
 
-    if (ctx->last_known_section != BinarySection::Invalid &&
-        section != BinarySection::Custom &&
-        section <= ctx->last_known_section) {
-      RAISE_ERROR("section %s out of order", get_section_name(section));
-    }
+    ERROR_UNLESS(last_known_section_ == BinarySection::Invalid ||
+                     section == BinarySection::Custom ||
+                     section > last_known_section_,
+                 "section %s out of order", get_section_name(section));
 
-    CALLBACK_CTX(begin_section, section, section_size);
+    CALLBACK(BeginSection, section, section_size);
 
-#define V(Name, name, code)                   \
-  case BinarySection::Name:                   \
-    read_##name##_section(ctx, section_size); \
+#define V(Name, name, code)                          \
+  case BinarySection::Name:                          \
+    CHECK_RESULT(Read##Name##Section(section_size)); \
     break;
 
     switch (section) {
@@ -2045,209 +1519,40 @@
 
 #undef V
 
-    if (ctx->offset != ctx->read_end) {
-      RAISE_ERROR("unfinished section (expected end: 0x%" PRIzx ")",
-                  ctx->read_end);
-    }
+    ERROR_UNLESS(state_.offset == read_end_,
+                 "unfinished section (expected end: 0x%" PRIzx ")", read_end_);
 
     if (section != BinarySection::Custom)
-      ctx->last_known_section = section;
+      last_known_section_ = section;
   }
+  return Result::Ok;
 }
 
+Result BinaryReader::ReadModule() {
+  uint32_t magic = 0;
+  CHECK_RESULT(ReadU32(&magic, "magic"));
+  ERROR_UNLESS(magic == WABT_BINARY_MAGIC, "bad magic value");
+  uint32_t version = 0;
+  CHECK_RESULT(ReadU32(&version, "version"));
+  ERROR_UNLESS(version == WABT_BINARY_VERSION,
+               "bad wasm file version: %#x (expected %#x)", version,
+               WABT_BINARY_VERSION);
+
+  CALLBACK(BeginModule, version);
+  CHECK_RESULT(ReadSections());
+  CALLBACK0(EndModule);
+
+  return Result::Ok;
+}
+
+}  // namespace
+
 Result read_binary(const void* data,
                    size_t size,
-                   BinaryReader* reader,
-                   uint32_t num_function_passes,
+                   BinaryReaderDelegate* delegate,
                    const ReadBinaryOptions* options) {
-  LoggingContext logging_context;
-  WABT_ZERO_MEMORY(logging_context);
-  logging_context.reader = reader;
-  logging_context.stream = options->log_stream;
-
-  BinaryReader logging_reader;
-  WABT_ZERO_MEMORY(logging_reader);
-  logging_reader.user_data = &logging_context;
-
-  logging_reader.on_error = logging_on_error;
-  logging_reader.begin_section = logging_begin_section;
-  logging_reader.begin_module = logging_begin_module;
-  logging_reader.end_module = logging_end_module;
-
-  logging_reader.begin_custom_section = logging_begin_custom_section;
-  logging_reader.end_custom_section = logging_end_custom_section;
-
-  logging_reader.begin_signature_section = logging_begin_signature_section;
-  logging_reader.on_signature_count = logging_on_signature_count;
-  logging_reader.on_signature = logging_on_signature;
-  logging_reader.end_signature_section = logging_end_signature_section;
-
-  logging_reader.begin_import_section = logging_begin_import_section;
-  logging_reader.on_import_count = logging_on_import_count;
-  logging_reader.on_import = logging_on_import;
-  logging_reader.on_import_func = logging_on_import_func;
-  logging_reader.on_import_table = logging_on_import_table;
-  logging_reader.on_import_memory = logging_on_import_memory;
-  logging_reader.on_import_global = logging_on_import_global;
-  logging_reader.end_import_section = logging_end_import_section;
-
-  logging_reader.begin_function_signatures_section =
-      logging_begin_function_signatures_section;
-  logging_reader.on_function_signatures_count =
-      logging_on_function_signatures_count;
-  logging_reader.on_function_signature = logging_on_function_signature;
-  logging_reader.end_function_signatures_section =
-      logging_end_function_signatures_section;
-
-  logging_reader.begin_table_section = logging_begin_table_section;
-  logging_reader.on_table_count = logging_on_table_count;
-  logging_reader.on_table = logging_on_table;
-  logging_reader.end_table_section = logging_end_table_section;
-
-  logging_reader.begin_memory_section = logging_begin_memory_section;
-  logging_reader.on_memory_count = logging_on_memory_count;
-  logging_reader.on_memory = logging_on_memory;
-  logging_reader.end_memory_section = logging_end_memory_section;
-
-  logging_reader.begin_global_section = logging_begin_global_section;
-  logging_reader.on_global_count = logging_on_global_count;
-  logging_reader.begin_global = logging_begin_global;
-  logging_reader.begin_global_init_expr = logging_begin_global_init_expr;
-  logging_reader.end_global_init_expr = logging_end_global_init_expr;
-  logging_reader.end_global = logging_end_global;
-  logging_reader.end_global_section = logging_end_global_section;
-
-  logging_reader.begin_export_section = logging_begin_export_section;
-  logging_reader.on_export_count = logging_on_export_count;
-  logging_reader.on_export = logging_on_export;
-  logging_reader.end_export_section = logging_end_export_section;
-
-  logging_reader.begin_start_section = logging_begin_start_section;
-  logging_reader.on_start_function = logging_on_start_function;
-  logging_reader.end_start_section = logging_end_start_section;
-
-  logging_reader.begin_function_bodies_section =
-      logging_begin_function_bodies_section;
-  logging_reader.on_function_bodies_count = logging_on_function_bodies_count;
-  logging_reader.begin_function_body_pass = logging_begin_function_body_pass;
-  logging_reader.begin_function_body = logging_begin_function_body;
-  logging_reader.on_local_decl_count = logging_on_local_decl_count;
-  logging_reader.on_local_decl = logging_on_local_decl;
-  logging_reader.on_binary_expr = logging_on_binary_expr;
-  logging_reader.on_block_expr = logging_on_block_expr;
-  logging_reader.on_br_expr = logging_on_br_expr;
-  logging_reader.on_br_if_expr = logging_on_br_if_expr;
-  logging_reader.on_br_table_expr = logging_on_br_table_expr;
-  logging_reader.on_call_expr = logging_on_call_expr;
-  logging_reader.on_call_import_expr = logging_on_call_import_expr;
-  logging_reader.on_call_indirect_expr = logging_on_call_indirect_expr;
-  logging_reader.on_compare_expr = logging_on_compare_expr;
-  logging_reader.on_convert_expr = logging_on_convert_expr;
-  logging_reader.on_drop_expr = logging_on_drop_expr;
-  logging_reader.on_else_expr = logging_on_else_expr;
-  logging_reader.on_end_expr = logging_on_end_expr;
-  logging_reader.on_f32_const_expr = logging_on_f32_const_expr;
-  logging_reader.on_f64_const_expr = logging_on_f64_const_expr;
-  logging_reader.on_get_global_expr = logging_on_get_global_expr;
-  logging_reader.on_get_local_expr = logging_on_get_local_expr;
-  logging_reader.on_grow_memory_expr = logging_on_grow_memory_expr;
-  logging_reader.on_i32_const_expr = logging_on_i32_const_expr;
-  logging_reader.on_i64_const_expr = logging_on_i64_const_expr;
-  logging_reader.on_if_expr = logging_on_if_expr;
-  logging_reader.on_load_expr = logging_on_load_expr;
-  logging_reader.on_loop_expr = logging_on_loop_expr;
-  logging_reader.on_current_memory_expr = logging_on_current_memory_expr;
-  logging_reader.on_nop_expr = logging_on_nop_expr;
-  logging_reader.on_return_expr = logging_on_return_expr;
-  logging_reader.on_select_expr = logging_on_select_expr;
-  logging_reader.on_set_global_expr = logging_on_set_global_expr;
-  logging_reader.on_set_local_expr = logging_on_set_local_expr;
-  logging_reader.on_store_expr = logging_on_store_expr;
-  logging_reader.on_tee_local_expr = logging_on_tee_local_expr;
-  logging_reader.on_unary_expr = logging_on_unary_expr;
-  logging_reader.on_unreachable_expr = logging_on_unreachable_expr;
-  logging_reader.end_function_body = logging_end_function_body;
-  logging_reader.end_function_body_pass = logging_end_function_body_pass;
-  logging_reader.end_function_bodies_section =
-      logging_end_function_bodies_section;
-
-  logging_reader.begin_elem_section = logging_begin_elem_section;
-  logging_reader.on_elem_segment_count = logging_on_elem_segment_count;
-  logging_reader.begin_elem_segment = logging_begin_elem_segment;
-  logging_reader.begin_elem_segment_init_expr =
-      logging_begin_elem_segment_init_expr;
-  logging_reader.end_elem_segment_init_expr =
-      logging_end_elem_segment_init_expr;
-  logging_reader.on_elem_segment_function_index_count =
-      logging_on_elem_segment_function_index_count;
-  logging_reader.on_elem_segment_function_index =
-      logging_on_elem_segment_function_index;
-  logging_reader.end_elem_segment = logging_end_elem_segment;
-  logging_reader.end_elem_section = logging_end_elem_section;
-
-  logging_reader.begin_data_section = logging_begin_data_section;
-  logging_reader.on_data_segment_count = logging_on_data_segment_count;
-  logging_reader.begin_data_segment = logging_begin_data_segment;
-  logging_reader.begin_data_segment_init_expr =
-      logging_begin_data_segment_init_expr;
-  logging_reader.end_data_segment_init_expr =
-      logging_end_data_segment_init_expr;
-  logging_reader.on_data_segment_data = logging_on_data_segment_data;
-  logging_reader.end_data_segment = logging_end_data_segment;
-  logging_reader.end_data_section = logging_end_data_section;
-
-  logging_reader.begin_names_section = logging_begin_names_section;
-  logging_reader.on_function_name_subsection = logging_on_function_name_subsection;
-  logging_reader.on_function_names_count = logging_on_function_names_count;
-  logging_reader.on_function_name = logging_on_function_name;
-  logging_reader.on_local_name_subsection = logging_on_local_name_subsection;
-  logging_reader.on_local_name_function_count = logging_on_local_name_function_count;
-  logging_reader.on_local_name_local_count = logging_on_local_name_local_count;
-  logging_reader.on_local_name = logging_on_local_name;
-  logging_reader.end_names_section = logging_end_names_section;
-
-  logging_reader.begin_reloc_section = logging_begin_reloc_section;
-  logging_reader.on_reloc_count = logging_on_reloc_count;
-  logging_reader.on_reloc = logging_on_reloc;
-  logging_reader.end_reloc_section = logging_end_reloc_section;
-
-  logging_reader.on_init_expr_f32_const_expr =
-      logging_on_init_expr_f32_const_expr;
-  logging_reader.on_init_expr_f64_const_expr =
-      logging_on_init_expr_f64_const_expr;
-  logging_reader.on_init_expr_get_global_expr =
-      logging_on_init_expr_get_global_expr;
-  logging_reader.on_init_expr_i32_const_expr =
-      logging_on_init_expr_i32_const_expr;
-  logging_reader.on_init_expr_i64_const_expr =
-      logging_on_init_expr_i64_const_expr;
-
-  Context context;
-  /* all the macros assume a Context* named ctx */
-  Context* ctx = &context;
-  ctx->data = static_cast<const uint8_t*>(data);
-  ctx->data_size = ctx->read_end = size;
-  ctx->reader = options->log_stream ? &logging_reader : reader;
-  ctx->options = options;
-  ctx->last_known_section = BinarySection::Invalid;
-
-  if (setjmp(ctx->error_jmp_buf) == 1) {
-    return Result::Error;
-  }
-
-  uint32_t magic;
-  in_u32(ctx, &magic, "magic");
-  RAISE_ERROR_UNLESS(magic == WABT_BINARY_MAGIC, "bad magic value");
-  uint32_t version;
-  in_u32(ctx, &version, "version");
-  RAISE_ERROR_UNLESS(version == WABT_BINARY_VERSION,
-                     "bad wasm file version: %#x (expected %#x)", version,
-                     WABT_BINARY_VERSION);
-
-  CALLBACK(begin_module, version);
-  read_sections(ctx);
-  CALLBACK0(end_module);
-  return Result::Ok;
+  BinaryReader reader(data, size, delegate, options);
+  return reader.ReadModule();
 }
 
 }  // namespace wabt
diff --git a/lib/wabt/src/binary-reader.h b/lib/wabt/src/binary-reader.h
index df7e807..2c72f6d 100644
--- a/lib/wabt/src/binary-reader.h
+++ b/lib/wabt/src/binary-reader.h
@@ -22,314 +22,257 @@
 
 #include "binary.h"
 #include "common.h"
+#include "opcode.h"
 
 #define WABT_READ_BINARY_OPTIONS_DEFAULT \
   { nullptr, false }
 
 namespace wabt {
 
+class Stream;
+
 struct ReadBinaryOptions {
-  struct Stream* log_stream;
+  Stream* log_stream;
   bool read_debug_names;
 };
 
-struct BinaryReaderContext {
-  const uint8_t* data;
-  size_t size;
-  size_t offset;
-  void* user_data;
-};
+class BinaryReaderDelegate {
+ public:
+  struct State {
+    State(const uint8_t* data, Offset size)
+        : data(data), size(size), offset(0) {}
 
-struct BinaryReader {
-  void* user_data;
+    const uint8_t* data;
+    Offset size;
+    Offset offset;
+  };
 
-  bool (*on_error)(BinaryReaderContext* ctx, const char* message);
+  virtual ~BinaryReaderDelegate() {}
 
-  /* module */
-  Result (*begin_module)(uint32_t version, void* user_data);
-  Result (*end_module)(void* user_data);
+  virtual bool OnError(const char* message) = 0;
+  virtual void OnSetState(const State* s) { state = s; }
 
-  Result (*begin_section)(BinaryReaderContext* ctx,
-                          BinarySection section_type,
-                          uint32_t size);
+  /* Module */
+  virtual Result BeginModule(uint32_t version) = 0;
+  virtual Result EndModule() = 0;
 
-  /* custom section */
-  Result (*begin_custom_section)(BinaryReaderContext* ctx,
-                                 uint32_t size,
-                                 StringSlice section_name);
-  Result (*end_custom_section)(BinaryReaderContext* ctx);
+  virtual Result BeginSection(BinarySection section_type, Offset size) = 0;
 
-  /* signatures section */
-  /* TODO(binji): rename to "type" section */
-  Result (*begin_signature_section)(BinaryReaderContext* ctx, uint32_t size);
-  Result (*on_signature_count)(uint32_t count, void* user_data);
-  Result (*on_signature)(uint32_t index,
-                         uint32_t param_count,
-                         Type* param_types,
-                         uint32_t result_count,
-                         Type* result_types,
-                         void* user_data);
-  Result (*end_signature_section)(BinaryReaderContext* ctx);
+  /* Custom section */
+  virtual Result BeginCustomSection(Offset size, StringSlice section_name) = 0;
+  virtual Result EndCustomSection() = 0;
 
-  /* import section */
-  Result (*begin_import_section)(BinaryReaderContext* ctx, uint32_t size);
-  Result (*on_import_count)(uint32_t count, void* user_data);
-  Result (*on_import)(uint32_t index,
-                      StringSlice module_name,
-                      StringSlice field_name,
-                      void* user_data);
-  Result (*on_import_func)(uint32_t import_index,
-                           StringSlice module_name,
-                           StringSlice field_name,
-                           uint32_t func_index,
-                           uint32_t sig_index,
-                           void* user_data);
-  Result (*on_import_table)(uint32_t import_index,
-                            StringSlice module_name,
-                            StringSlice field_name,
-                            uint32_t table_index,
-                            Type elem_type,
-                            const Limits* elem_limits,
-                            void* user_data);
-  Result (*on_import_memory)(uint32_t import_index,
-                             StringSlice module_name,
-                             StringSlice field_name,
-                             uint32_t memory_index,
-                             const Limits* page_limits,
-                             void* user_data);
-  Result (*on_import_global)(uint32_t import_index,
-                             StringSlice module_name,
-                             StringSlice field_name,
-                             uint32_t global_index,
-                             Type type,
-                             bool mutable_,
-                             void* user_data);
-  Result (*end_import_section)(BinaryReaderContext* ctx);
+  /* Type section */
+  virtual Result BeginTypeSection(Offset size) = 0;
+  virtual Result OnTypeCount(Index count) = 0;
+  virtual Result OnType(Index index,
+                        Index param_count,
+                        Type* param_types,
+                        Index result_count,
+                        Type* result_types) = 0;
+  virtual Result EndTypeSection() = 0;
 
-  /* function signatures section */
-  /* TODO(binji): rename to "function" section */
-  Result (*begin_function_signatures_section)(BinaryReaderContext* ctx,
-                                              uint32_t size);
-  Result (*on_function_signatures_count)(uint32_t count, void* user_data);
-  Result (*on_function_signature)(uint32_t index,
-                                  uint32_t sig_index,
-                                  void* user_data);
-  Result (*end_function_signatures_section)(BinaryReaderContext* ctx);
+  /* Import section */
+  virtual Result BeginImportSection(Offset size) = 0;
+  virtual Result OnImportCount(Index count) = 0;
+  virtual Result OnImport(Index index,
+                          StringSlice module_name,
+                          StringSlice field_name) = 0;
+  virtual Result OnImportFunc(Index import_index,
+                              StringSlice module_name,
+                              StringSlice field_name,
+                              Index func_index,
+                              Index sig_index) = 0;
+  virtual Result OnImportTable(Index import_index,
+                               StringSlice module_name,
+                               StringSlice field_name,
+                               Index table_index,
+                               Type elem_type,
+                               const Limits* elem_limits) = 0;
+  virtual Result OnImportMemory(Index import_index,
+                                StringSlice module_name,
+                                StringSlice field_name,
+                                Index memory_index,
+                                const Limits* page_limits) = 0;
+  virtual Result OnImportGlobal(Index import_index,
+                                StringSlice module_name,
+                                StringSlice field_name,
+                                Index global_index,
+                                Type type,
+                                bool mutable_) = 0;
+  virtual Result EndImportSection() = 0;
 
-  /* table section */
-  Result (*begin_table_section)(BinaryReaderContext* ctx, uint32_t size);
-  Result (*on_table_count)(uint32_t count, void* user_data);
-  Result (*on_table)(uint32_t index,
-                     Type elem_type,
-                     const Limits* elem_limits,
-                     void* user_data);
-  Result (*end_table_section)(BinaryReaderContext* ctx);
+  /* Function section */
+  virtual Result BeginFunctionSection(Offset size) = 0;
+  virtual Result OnFunctionCount(Index count) = 0;
+  virtual Result OnFunction(Index index, Index sig_index) = 0;
+  virtual Result EndFunctionSection() = 0;
 
-  /* memory section */
-  Result (*begin_memory_section)(BinaryReaderContext* ctx, uint32_t size);
-  Result (*on_memory_count)(uint32_t count, void* user_data);
-  Result (*on_memory)(uint32_t index, const Limits* limits, void* user_data);
-  Result (*end_memory_section)(BinaryReaderContext* ctx);
+  /* Table section */
+  virtual Result BeginTableSection(Offset size) = 0;
+  virtual Result OnTableCount(Index count) = 0;
+  virtual Result OnTable(Index index,
+                         Type elem_type,
+                         const Limits* elem_limits) = 0;
+  virtual Result EndTableSection() = 0;
 
-  /* global section */
-  Result (*begin_global_section)(BinaryReaderContext* ctx, uint32_t size);
-  Result (*on_global_count)(uint32_t count, void* user_data);
-  Result (*begin_global)(uint32_t index,
-                         Type type,
-                         bool mutable_,
-                         void* user_data);
-  Result (*begin_global_init_expr)(uint32_t index, void* user_data);
-  Result (*end_global_init_expr)(uint32_t index, void* user_data);
-  Result (*end_global)(uint32_t index, void* user_data);
-  Result (*end_global_section)(BinaryReaderContext* ctx);
+  /* Memory section */
+  virtual Result BeginMemorySection(Offset size) = 0;
+  virtual Result OnMemoryCount(Index count) = 0;
+  virtual Result OnMemory(Index index, const Limits* limits) = 0;
+  virtual Result EndMemorySection() = 0;
 
-  /* exports section */
-  Result (*begin_export_section)(BinaryReaderContext* ctx, uint32_t size);
-  Result (*on_export_count)(uint32_t count, void* user_data);
-  Result (*on_export)(uint32_t index,
-                      ExternalKind kind,
-                      uint32_t item_index,
-                      StringSlice name,
-                      void* user_data);
-  Result (*end_export_section)(BinaryReaderContext* ctx);
+  /* Global section */
+  virtual Result BeginGlobalSection(Offset size) = 0;
+  virtual Result OnGlobalCount(Index count) = 0;
+  virtual Result BeginGlobal(Index index, Type type, bool mutable_) = 0;
+  virtual Result BeginGlobalInitExpr(Index index) = 0;
+  virtual Result EndGlobalInitExpr(Index index) = 0;
+  virtual Result EndGlobal(Index index) = 0;
+  virtual Result EndGlobalSection() = 0;
 
-  /* start section */
-  Result (*begin_start_section)(BinaryReaderContext* ctx, uint32_t size);
-  Result (*on_start_function)(uint32_t func_index, void* user_data);
-  Result (*end_start_section)(BinaryReaderContext* ctx);
+  /* Exports section */
+  virtual Result BeginExportSection(Offset size) = 0;
+  virtual Result OnExportCount(Index count) = 0;
+  virtual Result OnExport(Index index,
+                          ExternalKind kind,
+                          Index item_index,
+                          StringSlice name) = 0;
+  virtual Result EndExportSection() = 0;
 
-  /* function bodies section */
-  /* TODO(binji): rename to code section */
-  Result (*begin_function_bodies_section)(BinaryReaderContext* ctx,
-                                          uint32_t size);
-  Result (*on_function_bodies_count)(uint32_t count, void* user_data);
-  Result (*begin_function_body_pass)(uint32_t index,
-                                     uint32_t pass,
-                                     void* user_data);
-  Result (*begin_function_body)(BinaryReaderContext* ctx, uint32_t index);
-  Result (*on_local_decl_count)(uint32_t count, void* user_data);
-  Result (*on_local_decl)(uint32_t decl_index,
-                          uint32_t count,
-                          Type type,
-                          void* user_data);
+  /* Start section */
+  virtual Result BeginStartSection(Offset size) = 0;
+  virtual Result OnStartFunction(Index func_index) = 0;
+  virtual Result EndStartSection() = 0;
 
-  /* function expressions; called between begin_function_body and
-   end_function_body */
-  Result (*on_opcode)(BinaryReaderContext* ctx, Opcode Opcode);
-  Result (*on_opcode_bare)(BinaryReaderContext* ctx);
-  Result (*on_opcode_uint32)(BinaryReaderContext* ctx, uint32_t value);
-  Result (*on_opcode_uint32_uint32)(BinaryReaderContext* ctx,
-                                    uint32_t value,
-                                    uint32_t value2);
-  Result (*on_opcode_uint64)(BinaryReaderContext* ctx, uint64_t value);
-  Result (*on_opcode_f32)(BinaryReaderContext* ctx, uint32_t value);
-  Result (*on_opcode_f64)(BinaryReaderContext* ctx, uint64_t value);
-  Result (*on_opcode_block_sig)(BinaryReaderContext* ctx,
-                                uint32_t num_types,
-                                Type* sig_types);
-  Result (*on_binary_expr)(Opcode opcode, void* user_data);
-  Result (*on_block_expr)(uint32_t num_types, Type* sig_types, void* user_data);
-  Result (*on_br_expr)(uint32_t depth, void* user_data);
-  Result (*on_br_if_expr)(uint32_t depth, void* user_data);
-  Result (*on_br_table_expr)(BinaryReaderContext* ctx,
-                             uint32_t num_targets,
-                             uint32_t* target_depths,
-                             uint32_t default_target_depth);
-  Result (*on_call_expr)(uint32_t func_index, void* user_data);
-  Result (*on_call_import_expr)(uint32_t import_index, void* user_data);
-  Result (*on_call_indirect_expr)(uint32_t sig_index, void* user_data);
-  Result (*on_compare_expr)(Opcode opcode, void* user_data);
-  Result (*on_convert_expr)(Opcode opcode, void* user_data);
-  Result (*on_drop_expr)(void* user_data);
-  Result (*on_else_expr)(void* user_data);
-  Result (*on_end_expr)(void* user_data);
-  Result (*on_end_func)(void* user_data);
-  Result (*on_f32_const_expr)(uint32_t value_bits, void* user_data);
-  Result (*on_f64_const_expr)(uint64_t value_bits, void* user_data);
-  Result (*on_get_global_expr)(uint32_t global_index, void* user_data);
-  Result (*on_get_local_expr)(uint32_t local_index, void* user_data);
-  Result (*on_grow_memory_expr)(void* user_data);
-  Result (*on_i32_const_expr)(uint32_t value, void* user_data);
-  Result (*on_i64_const_expr)(uint64_t value, void* user_data);
-  Result (*on_if_expr)(uint32_t num_types, Type* sig_types, void* user_data);
-  Result (*on_load_expr)(Opcode opcode,
-                         uint32_t alignment_log2,
-                         uint32_t offset,
-                         void* user_data);
-  Result (*on_loop_expr)(uint32_t num_types, Type* sig_types, void* user_data);
-  Result (*on_current_memory_expr)(void* user_data);
-  Result (*on_nop_expr)(void* user_data);
-  Result (*on_return_expr)(void* user_data);
-  Result (*on_select_expr)(void* user_data);
-  Result (*on_set_global_expr)(uint32_t global_index, void* user_data);
-  Result (*on_set_local_expr)(uint32_t local_index, void* user_data);
-  Result (*on_store_expr)(Opcode opcode,
-                          uint32_t alignment_log2,
-                          uint32_t offset,
-                          void* user_data);
-  Result (*on_tee_local_expr)(uint32_t local_index, void* user_data);
-  Result (*on_unary_expr)(Opcode opcode, void* user_data);
-  Result (*on_unreachable_expr)(void* user_data);
-  Result (*end_function_body)(uint32_t index, void* user_data);
-  Result (*end_function_body_pass)(uint32_t index,
-                                   uint32_t pass,
-                                   void* user_data);
-  Result (*end_function_bodies_section)(BinaryReaderContext* ctx);
+  /* Code section */
+  virtual Result BeginCodeSection(Offset size) = 0;
+  virtual Result OnFunctionBodyCount(Index count) = 0;
+  virtual Result BeginFunctionBody(Index index) = 0;
+  virtual Result OnLocalDeclCount(Index count) = 0;
+  virtual Result OnLocalDecl(Index decl_index, Index count, Type type) = 0;
 
-  /* elem section */
-  Result (*begin_elem_section)(BinaryReaderContext* ctx, uint32_t size);
-  Result (*on_elem_segment_count)(uint32_t count, void* user_data);
-  Result (*begin_elem_segment)(uint32_t index,
-                               uint32_t table_index,
-                               void* user_data);
-  Result (*begin_elem_segment_init_expr)(uint32_t index, void* user_data);
-  Result (*end_elem_segment_init_expr)(uint32_t index, void* user_data);
-  Result (*on_elem_segment_function_index_count)(BinaryReaderContext* ctx,
-                                                 uint32_t index,
-                                                 uint32_t count);
-  Result (*on_elem_segment_function_index)(uint32_t index,
-                                           uint32_t func_index,
-                                           void* user_data);
-  Result (*end_elem_segment)(uint32_t index, void* user_data);
-  Result (*end_elem_section)(BinaryReaderContext* ctx);
+  /* Function expressions; called between BeginFunctionBody and
+   EndFunctionBody */
+  virtual Result OnOpcode(Opcode Opcode) = 0;
+  virtual Result OnOpcodeBare() = 0;
+  virtual Result OnOpcodeUint32(uint32_t value) = 0;
+  virtual Result OnOpcodeIndex(Index value) = 0;
+  virtual Result OnOpcodeUint32Uint32(uint32_t value, uint32_t value2) = 0;
+  virtual Result OnOpcodeUint64(uint64_t value) = 0;
+  virtual Result OnOpcodeF32(uint32_t value) = 0;
+  virtual Result OnOpcodeF64(uint64_t value) = 0;
+  virtual Result OnOpcodeBlockSig(Index num_types, Type* sig_types) = 0;
+  virtual Result OnBinaryExpr(Opcode opcode) = 0;
+  virtual Result OnBlockExpr(Index num_types, Type* sig_types) = 0;
+  virtual Result OnBrExpr(Index depth) = 0;
+  virtual Result OnBrIfExpr(Index depth) = 0;
+  virtual Result OnBrTableExpr(Index num_targets,
+                               Index* target_depths,
+                               Index default_target_depth) = 0;
+  virtual Result OnCallExpr(Index func_index) = 0;
+  virtual Result OnCallIndirectExpr(Index sig_index) = 0;
+  virtual Result OnCompareExpr(Opcode opcode) = 0;
+  virtual Result OnConvertExpr(Opcode opcode) = 0;
+  virtual Result OnCurrentMemoryExpr() = 0;
+  virtual Result OnDropExpr() = 0;
+  virtual Result OnElseExpr() = 0;
+  virtual Result OnEndExpr() = 0;
+  virtual Result OnEndFunc() = 0;
+  virtual Result OnF32ConstExpr(uint32_t value_bits) = 0;
+  virtual Result OnF64ConstExpr(uint64_t value_bits) = 0;
+  virtual Result OnGetGlobalExpr(Index global_index) = 0;
+  virtual Result OnGetLocalExpr(Index local_index) = 0;
+  virtual Result OnGrowMemoryExpr() = 0;
+  virtual Result OnI32ConstExpr(uint32_t value) = 0;
+  virtual Result OnI64ConstExpr(uint64_t value) = 0;
+  virtual Result OnIfExpr(Index num_types, Type* sig_types) = 0;
+  virtual Result OnLoadExpr(Opcode opcode,
+                            uint32_t alignment_log2,
+                            Address offset) = 0;
+  virtual Result OnLoopExpr(Index num_types, Type* sig_types) = 0;
+  virtual Result OnNopExpr() = 0;
+  virtual Result OnReturnExpr() = 0;
+  virtual Result OnSelectExpr() = 0;
+  virtual Result OnSetGlobalExpr(Index global_index) = 0;
+  virtual Result OnSetLocalExpr(Index local_index) = 0;
+  virtual Result OnStoreExpr(Opcode opcode,
+                             uint32_t alignment_log2,
+                             Address offset) = 0;
+  virtual Result OnTeeLocalExpr(Index local_index) = 0;
+  virtual Result OnUnaryExpr(Opcode opcode) = 0;
+  virtual Result OnUnreachableExpr() = 0;
+  virtual Result EndFunctionBody(Index index) = 0;
+  virtual Result EndCodeSection() = 0;
 
-  /* data section */
-  Result (*begin_data_section)(BinaryReaderContext* ctx, uint32_t size);
-  Result (*on_data_segment_count)(uint32_t count, void* user_data);
-  Result (*begin_data_segment)(uint32_t index,
-                               uint32_t memory_index,
-                               void* user_data);
-  Result (*begin_data_segment_init_expr)(uint32_t index, void* user_data);
-  Result (*end_data_segment_init_expr)(uint32_t index, void* user_data);
-  Result (*on_data_segment_data)(uint32_t index,
-                                 const void* data,
-                                 uint32_t size,
-                                 void* user_data);
-  Result (*end_data_segment)(uint32_t index, void* user_data);
-  Result (*end_data_section)(BinaryReaderContext* ctx);
+  /* Elem section */
+  virtual Result BeginElemSection(Offset size) = 0;
+  virtual Result OnElemSegmentCount(Index count) = 0;
+  virtual Result BeginElemSegment(Index index, Index table_index) = 0;
+  virtual Result BeginElemSegmentInitExpr(Index index) = 0;
+  virtual Result EndElemSegmentInitExpr(Index index) = 0;
+  virtual Result OnElemSegmentFunctionIndexCount(Index index, Index count) = 0;
+  virtual Result OnElemSegmentFunctionIndex(Index segment_index,
+                                            Index func_index) = 0;
+  virtual Result EndElemSegment(Index index) = 0;
+  virtual Result EndElemSection() = 0;
 
-  /* names section */
-  Result (*begin_names_section)(BinaryReaderContext* ctx, uint32_t size);
-  Result (*on_function_name_subsection)(uint32_t index,
-                                        uint32_t name_type,
-                                        uint32_t subsection_size,
-                                        void* user_data);
-  Result (*on_function_names_count)(uint32_t num_functions,
-                                    void* user_data);
-  Result (*on_function_name)(uint32_t function_index,
-                             StringSlice function_name,
-                             void* user_data);
-  Result (*on_local_name_subsection)(uint32_t index,
-                                     uint32_t name_type,
-                                     uint32_t subsection_size,
-                                     void* user_data);
-  Result (*on_local_name_function_count)(uint32_t num_functions,
-                                         void* user_data);
-  Result (*on_local_name_local_count)(uint32_t function_index,
-                                      uint32_t num_locals,
-                                      void* user_data);
-  Result (*on_local_name)(uint32_t function_index,
-                          uint32_t local_index,
-                          StringSlice local_name,
-                          void* user_data);
-  Result (*end_names_section)(BinaryReaderContext* ctx);
+  /* Data section */
+  virtual Result BeginDataSection(Offset size) = 0;
+  virtual Result OnDataSegmentCount(Index count) = 0;
+  virtual Result BeginDataSegment(Index index, Index memory_index) = 0;
+  virtual Result BeginDataSegmentInitExpr(Index index) = 0;
+  virtual Result EndDataSegmentInitExpr(Index index) = 0;
+  virtual Result OnDataSegmentData(Index index,
+                                   const void* data,
+                                   Address size) = 0;
+  virtual Result EndDataSegment(Index index) = 0;
+  virtual Result EndDataSection() = 0;
 
-  /* names section */
-  Result (*begin_reloc_section)(BinaryReaderContext* ctx, uint32_t size);
-  Result (*on_reloc_count)(uint32_t count,
-                           BinarySection section_code,
-                           StringSlice section_name,
-                           void* user_data);
-  Result (*on_reloc)(RelocType type,
-                     uint32_t offset,
-                     uint32_t index,
-                     int32_t addend,
-                     void* user_data);
-  Result (*end_reloc_section)(BinaryReaderContext* ctx);
+  /* Names section */
+  virtual Result BeginNamesSection(Offset size) = 0;
+  virtual Result OnFunctionNameSubsection(Index index,
+                                          uint32_t name_type,
+                                          Offset subsection_size) = 0;
+  virtual Result OnFunctionNamesCount(Index num_functions) = 0;
+  virtual Result OnFunctionName(Index function_index,
+                                StringSlice function_name) = 0;
+  virtual Result OnLocalNameSubsection(Index index,
+                                       uint32_t name_type,
+                                       Offset subsection_size) = 0;
+  virtual Result OnLocalNameFunctionCount(Index num_functions) = 0;
+  virtual Result OnLocalNameLocalCount(Index function_index,
+                                       Index num_locals) = 0;
+  virtual Result OnLocalName(Index function_index,
+                             Index local_index,
+                             StringSlice local_name) = 0;
+  virtual Result EndNamesSection() = 0;
 
-  /* init_expr - used by elem, data and global sections; these functions are
-   * only called between calls to begin_*_init_expr and end_*_init_expr */
-  Result (*on_init_expr_f32_const_expr)(uint32_t index,
-                                        uint32_t value,
-                                        void* user_data);
-  Result (*on_init_expr_f64_const_expr)(uint32_t index,
-                                        uint64_t value,
-                                        void* user_data);
-  Result (*on_init_expr_get_global_expr)(uint32_t index,
-                                         uint32_t global_index,
-                                         void* user_data);
-  Result (*on_init_expr_i32_const_expr)(uint32_t index,
-                                        uint32_t value,
-                                        void* user_data);
-  Result (*on_init_expr_i64_const_expr)(uint32_t index,
-                                        uint64_t value,
-                                        void* user_data);
+  /* Reloc section */
+  virtual Result BeginRelocSection(Offset size) = 0;
+  virtual Result OnRelocCount(Index count,
+                              BinarySection section_code,
+                              StringSlice section_name) = 0;
+  virtual Result OnReloc(RelocType type,
+                         Offset offset,
+                         Index index,
+                         uint32_t addend) = 0;
+  virtual Result EndRelocSection() = 0;
+
+  /* InitExpr - used by elem, data and global sections; these functions are
+   * only called between calls to Begin*InitExpr and End*InitExpr */
+  virtual Result OnInitExprF32ConstExpr(Index index, uint32_t value) = 0;
+  virtual Result OnInitExprF64ConstExpr(Index index, uint64_t value) = 0;
+  virtual Result OnInitExprGetGlobalExpr(Index index, Index global_index) = 0;
+  virtual Result OnInitExprI32ConstExpr(Index index, uint32_t value) = 0;
+  virtual Result OnInitExprI64ConstExpr(Index index, uint64_t value) = 0;
+
+  const State* state = nullptr;
 };
 
 Result read_binary(const void* data,
                    size_t size,
-                   BinaryReader* reader,
-                   uint32_t num_function_passes,
+                   BinaryReaderDelegate* reader,
                    const ReadBinaryOptions* options);
 
 size_t read_u32_leb128(const uint8_t* ptr,
diff --git a/lib/wabt/src/binary-writer-spec.cc b/lib/wabt/src/binary-writer-spec.cc
index d87fe82..3289bea 100644
--- a/lib/wabt/src/binary-writer-spec.cc
+++ b/lib/wabt/src/binary-writer-spec.cc
@@ -16,33 +16,18 @@
 
 #include "binary-writer-spec.h"
 
-#include <assert.h>
-#include <inttypes.h>
+#include <cassert>
+#include <cinttypes>
 
-#include "ast.h"
 #include "binary.h"
 #include "binary-writer.h"
 #include "config.h"
+#include "ir.h"
 #include "stream.h"
 #include "writer.h"
 
 namespace wabt {
 
-namespace {
-
-struct Context {
-  MemoryWriter json_writer;
-  Stream json_stream;
-  StringSlice source_filename;
-  StringSlice module_filename_noext;
-  bool write_modules; /* Whether to write the modules files. */
-  const WriteBinarySpecOptions* spec_options;
-  Result result;
-  size_t num_modules;
-};
-
-}  // namespace
-
 static void convert_backslash_to_slash(char* s, size_t length) {
   for (size_t i = 0; i < length; ++i)
     if (s[i] == '\\')
@@ -99,43 +84,99 @@
   return result;
 }
 
-static char* get_module_filename(Context* ctx) {
-  size_t buflen = ctx->module_filename_noext.length + 20;
+namespace {
+
+class BinaryWriterSpec {
+ public:
+  BinaryWriterSpec(const char* source_filename,
+                   const WriteBinarySpecOptions* spec_options);
+
+  Result WriteScript(Script* script);
+
+ private:
+  char* GetModuleFilename(const char* extension);
+  void WriteString(const char* s);
+  void WriteKey(const char* key);
+  void WriteSeparator();
+  void WriteEscapedStringSlice(StringSlice ss);
+  void WriteCommandType(const Command& command);
+  void WriteLocation(const Location* loc);
+  void WriteVar(const Var* var);
+  void WriteTypeObject(Type type);
+  void WriteConst(const Const* const_);
+  void WriteConstVector(const ConstVector& consts);
+  void WriteAction(const Action* action);
+  void WriteActionResultType(Script* script, const Action* action);
+  void WriteModule(char* filename, const Module* module);
+  void WriteScriptModule(char* filename, const ScriptModule* script_module);
+  void WriteInvalidModule(const ScriptModule* module, StringSlice text);
+  void WriteCommands(Script* script);
+
+  MemoryStream json_stream_;
+  StringSlice source_filename_;
+  StringSlice module_filename_noext_;
+  bool write_modules_ = false; /* Whether to write the modules files. */
+  const WriteBinarySpecOptions* spec_options_ = nullptr;
+  Result result_ = Result::Ok;
+  size_t num_modules_ = 0;
+
+  static const char* kWasmExtension;
+  static const char* kWastExtension;
+};
+
+// static
+const char* BinaryWriterSpec::kWasmExtension = ".wasm";
+// static
+const char* BinaryWriterSpec::kWastExtension = ".wast";
+
+BinaryWriterSpec::BinaryWriterSpec(const char* source_filename,
+                                   const WriteBinarySpecOptions* spec_options)
+    : spec_options_(spec_options) {
+  source_filename_.start = source_filename;
+  source_filename_.length = strlen(source_filename);
+  module_filename_noext_ = strip_extension(spec_options_->json_filename
+                                               ? spec_options_->json_filename
+                                               : source_filename);
+  write_modules_ = !!spec_options_->json_filename;
+}
+
+char* BinaryWriterSpec::GetModuleFilename(const char* extension) {
+  size_t buflen = module_filename_noext_.length + 20;
   char* str = new char[buflen];
   size_t length =
-      wabt_snprintf(str, buflen, PRIstringslice ".%" PRIzd ".wasm",
-               WABT_PRINTF_STRING_SLICE_ARG(ctx->module_filename_noext),
-               ctx->num_modules);
+      wabt_snprintf(str, buflen, PRIstringslice ".%" PRIzd "%s",
+                    WABT_PRINTF_STRING_SLICE_ARG(module_filename_noext_),
+                    num_modules_, extension);
   convert_backslash_to_slash(str, length);
   return str;
 }
 
-static void write_string(Context* ctx, const char* s) {
-  writef(&ctx->json_stream, "\"%s\"", s);
+void BinaryWriterSpec::WriteString(const char* s) {
+  json_stream_.Writef("\"%s\"", s);
 }
 
-static void write_key(Context* ctx, const char* key) {
-  writef(&ctx->json_stream, "\"%s\": ", key);
+void BinaryWriterSpec::WriteKey(const char* key) {
+  json_stream_.Writef("\"%s\": ", key);
 }
 
-static void write_separator(Context* ctx) {
-  writef(&ctx->json_stream, ", ");
+void BinaryWriterSpec::WriteSeparator() {
+  json_stream_.Writef(", ");
 }
 
-static void write_escaped_string_slice(Context* ctx, StringSlice ss) {
-  write_char(&ctx->json_stream, '"');
+void BinaryWriterSpec::WriteEscapedStringSlice(StringSlice ss) {
+  json_stream_.WriteChar('"');
   for (size_t i = 0; i < ss.length; ++i) {
     uint8_t c = ss.start[i];
-    if (c < 0x20 || c == '\\' || c == '"') {
-      writef(&ctx->json_stream, "\\u%04x", c);
+    if (c < 0x20 || c == '\\' || c == '"' || c > 0x7f) {
+      json_stream_.Writef("\\u%04x", c);
     } else {
-      write_char(&ctx->json_stream, c);
+      json_stream_.WriteChar(c);
     }
   }
-  write_char(&ctx->json_stream, '"');
+  json_stream_.WriteChar('"');
 }
 
-static void write_command_type(Context* ctx, const Command& command) {
+void BinaryWriterSpec::WriteCommandType(const Command& command) {
   static const char* s_command_names[] = {
       "module",
       "action",
@@ -154,66 +195,66 @@
   };
   WABT_STATIC_ASSERT(WABT_ARRAY_SIZE(s_command_names) == kCommandTypeCount);
 
-  write_key(ctx, "type");
+  WriteKey("type");
   assert(s_command_names[static_cast<size_t>(command.type)]);
-  write_string(ctx, s_command_names[static_cast<size_t>(command.type)]);
+  WriteString(s_command_names[static_cast<size_t>(command.type)]);
 }
 
-static void write_location(Context* ctx, const Location* loc) {
-  write_key(ctx, "line");
-  writef(&ctx->json_stream, "%d", loc->line);
+void BinaryWriterSpec::WriteLocation(const Location* loc) {
+  WriteKey("line");
+  json_stream_.Writef("%d", loc->line);
 }
 
-static void write_var(Context* ctx, const Var* var) {
+void BinaryWriterSpec::WriteVar(const Var* var) {
   if (var->type == VarType::Index)
-    writef(&ctx->json_stream, "\"%" PRIu64 "\"", var->index);
+    json_stream_.Writef("\"%" PRIindex "\"", var->index);
   else
-    write_escaped_string_slice(ctx, var->name);
+    WriteEscapedStringSlice(var->name);
 }
 
-static void write_type_object(Context* ctx, Type type) {
-  writef(&ctx->json_stream, "{");
-  write_key(ctx, "type");
-  write_string(ctx, get_type_name(type));
-  writef(&ctx->json_stream, "}");
+void BinaryWriterSpec::WriteTypeObject(Type type) {
+  json_stream_.Writef("{");
+  WriteKey("type");
+  WriteString(get_type_name(type));
+  json_stream_.Writef("}");
 }
 
-static void write_const(Context* ctx, const Const* const_) {
-  writef(&ctx->json_stream, "{");
-  write_key(ctx, "type");
+void BinaryWriterSpec::WriteConst(const Const* const_) {
+  json_stream_.Writef("{");
+  WriteKey("type");
 
   /* Always write the values as strings, even though they may be representable
    * as JSON numbers. This way the formatting is consistent. */
   switch (const_->type) {
     case Type::I32:
-      write_string(ctx, "i32");
-      write_separator(ctx);
-      write_key(ctx, "value");
-      writef(&ctx->json_stream, "\"%u\"", const_->u32);
+      WriteString("i32");
+      WriteSeparator();
+      WriteKey("value");
+      json_stream_.Writef("\"%u\"", const_->u32);
       break;
 
     case Type::I64:
-      write_string(ctx, "i64");
-      write_separator(ctx);
-      write_key(ctx, "value");
-      writef(&ctx->json_stream, "\"%" PRIu64 "\"", const_->u64);
+      WriteString("i64");
+      WriteSeparator();
+      WriteKey("value");
+      json_stream_.Writef("\"%" PRIu64 "\"", const_->u64);
       break;
 
     case Type::F32: {
       /* TODO(binji): write as hex float */
-      write_string(ctx, "f32");
-      write_separator(ctx);
-      write_key(ctx, "value");
-      writef(&ctx->json_stream, "\"%u\"", const_->f32_bits);
+      WriteString("f32");
+      WriteSeparator();
+      WriteKey("value");
+      json_stream_.Writef("\"%u\"", const_->f32_bits);
       break;
     }
 
     case Type::F64: {
       /* TODO(binji): write as hex float */
-      write_string(ctx, "f64");
-      write_separator(ctx);
-      write_key(ctx, "value");
-      writef(&ctx->json_stream, "\"%" PRIu64 "\"", const_->f64_bits);
+      WriteString("f64");
+      WriteSeparator();
+      WriteKey("value");
+      json_stream_.Writef("\"%" PRIu64 "\"", const_->f64_bits);
       break;
     }
 
@@ -221,252 +262,284 @@
       assert(0);
   }
 
-  writef(&ctx->json_stream, "}");
+  json_stream_.Writef("}");
 }
 
-static void write_const_vector(Context* ctx, const ConstVector& consts) {
-  writef(&ctx->json_stream, "[");
+void BinaryWriterSpec::WriteConstVector(const ConstVector& consts) {
+  json_stream_.Writef("[");
   for (size_t i = 0; i < consts.size(); ++i) {
     const Const* const_ = &consts[i];
-    write_const(ctx, const_);
+    WriteConst(const_);
     if (i != consts.size() - 1)
-      write_separator(ctx);
+      WriteSeparator();
   }
-  writef(&ctx->json_stream, "]");
+  json_stream_.Writef("]");
 }
 
-static void write_action(Context* ctx, const Action* action) {
-  write_key(ctx, "action");
-  writef(&ctx->json_stream, "{");
-  write_key(ctx, "type");
+void BinaryWriterSpec::WriteAction(const Action* action) {
+  WriteKey("action");
+  json_stream_.Writef("{");
+  WriteKey("type");
   if (action->type == ActionType::Invoke) {
-    write_string(ctx, "invoke");
+    WriteString("invoke");
   } else {
     assert(action->type == ActionType::Get);
-    write_string(ctx, "get");
+    WriteString("get");
   }
-  write_separator(ctx);
+  WriteSeparator();
   if (action->module_var.type != VarType::Index) {
-    write_key(ctx, "module");
-    write_var(ctx, &action->module_var);
-    write_separator(ctx);
+    WriteKey("module");
+    WriteVar(&action->module_var);
+    WriteSeparator();
   }
   if (action->type == ActionType::Invoke) {
-    write_key(ctx, "field");
-    write_escaped_string_slice(ctx, action->name);
-    write_separator(ctx);
-    write_key(ctx, "args");
-    write_const_vector(ctx, action->invoke->args);
+    WriteKey("field");
+    WriteEscapedStringSlice(action->name);
+    WriteSeparator();
+    WriteKey("args");
+    WriteConstVector(action->invoke->args);
   } else {
-    write_key(ctx, "field");
-    write_escaped_string_slice(ctx, action->name);
+    WriteKey("field");
+    WriteEscapedStringSlice(action->name);
   }
-  writef(&ctx->json_stream, "}");
+  json_stream_.Writef("}");
 }
 
-static void write_action_result_type(Context* ctx,
-                                     Script* script,
-                                     const Action* action) {
-  const Module* module = get_module_by_var(script, &action->module_var);
+void BinaryWriterSpec::WriteActionResultType(Script* script,
+                                             const Action* action) {
+  const Module* module = script->GetModule(action->module_var);
   const Export* export_;
-  writef(&ctx->json_stream, "[");
+  json_stream_.Writef("[");
   switch (action->type) {
     case ActionType::Invoke: {
-      export_ = get_export_by_name(module, &action->name);
+      export_ = module->GetExport(action->name);
       assert(export_->kind == ExternalKind::Func);
-      Func* func = get_func_by_var(module, &export_->var);
-      size_t num_results = get_num_results(func);
-      for (size_t i = 0; i < num_results; ++i)
-        write_type_object(ctx, get_result_type(func, i));
+      const Func* func = module->GetFunc(export_->var);
+      Index num_results = func->GetNumResults();
+      for (Index i = 0; i < num_results; ++i)
+        WriteTypeObject(func->GetResultType(i));
       break;
     }
 
     case ActionType::Get: {
-      export_ = get_export_by_name(module, &action->name);
+      export_ = module->GetExport(action->name);
       assert(export_->kind == ExternalKind::Global);
-      Global* global = get_global_by_var(module, &export_->var);
-      write_type_object(ctx, global->type);
+      const Global* global = module->GetGlobal(export_->var);
+      WriteTypeObject(global->type);
       break;
     }
   }
-  writef(&ctx->json_stream, "]");
+  json_stream_.Writef("]");
 }
 
-static void write_module(Context* ctx, char* filename, const Module* module) {
-  MemoryWriter writer;
-  Result result = init_mem_writer(&writer);
-  if (WABT_SUCCEEDED(result)) {
-    WriteBinaryOptions options = ctx->spec_options->write_binary_options;
-    result = write_binary_module(&writer.base, module, &options);
-    if (WABT_SUCCEEDED(result) && ctx->write_modules)
-      result = write_output_buffer_to_file(&writer.buf, filename);
-    close_mem_writer(&writer);
-  }
-
-  ctx->result = result;
+void BinaryWriterSpec::WriteModule(char* filename, const Module* module) {
+  MemoryStream memory_stream;
+  result_ = write_binary_module(&memory_stream.writer(), module,
+                                &spec_options_->write_binary_options);
+  if (WABT_SUCCEEDED(result_) && write_modules_)
+    result_ = memory_stream.WriteToFile(filename);
 }
 
-static void write_raw_module(Context* ctx,
-                             char* filename,
-                             const RawModule* raw_module) {
-  if (raw_module->type == RawModuleType::Text) {
-    write_module(ctx, filename, raw_module->text);
-  } else if (ctx->write_modules) {
-    FileStream stream;
-    Result result = init_file_writer(&stream.writer, filename);
-    if (WABT_SUCCEEDED(result)) {
-      init_stream(&stream.base, &stream.writer.base, nullptr);
-      write_data(&stream.base, raw_module->binary.data, raw_module->binary.size,
-                 "");
-      close_file_writer(&stream.writer);
-    }
-    ctx->result = result;
+void BinaryWriterSpec::WriteScriptModule(char* filename,
+                                         const ScriptModule* script_module) {
+  switch (script_module->type) {
+    case ScriptModule::Type::Text:
+      WriteModule(filename, script_module->text);
+      break;
+
+    case ScriptModule::Type::Binary:
+      if (write_modules_) {
+        FileStream file_stream(filename);
+        if (file_stream.is_open()) {
+          file_stream.WriteData(script_module->binary.data,
+                                script_module->binary.size, "");
+          result_ = file_stream.result();
+        } else {
+          result_ = Result::Error;
+        }
+      }
+      break;
+
+    case ScriptModule::Type::Quoted:
+      if (write_modules_) {
+        FileStream file_stream(filename);
+        if (file_stream.is_open()) {
+          file_stream.WriteData(script_module->quoted.data,
+                                script_module->quoted.size, "");
+          result_ = file_stream.result();
+        } else {
+          result_ = Result::Error;
+        }
+      }
+      break;
   }
 }
 
-static void write_invalid_module(Context* ctx,
-                                 const RawModule* module,
-                                 StringSlice text) {
-  char* filename = get_module_filename(ctx);
-  write_location(ctx, get_raw_module_location(module));
-  write_separator(ctx);
-  write_key(ctx, "filename");
-  write_escaped_string_slice(ctx, get_basename(filename));
-  write_separator(ctx);
-  write_key(ctx, "text");
-  write_escaped_string_slice(ctx, text);
-  write_raw_module(ctx, filename, module);
+void BinaryWriterSpec::WriteInvalidModule(const ScriptModule* module,
+                                          StringSlice text) {
+  const char* extension = "";
+  const char* module_type = "";
+  switch (module->type) {
+    case ScriptModule::Type::Text:
+      extension = kWasmExtension;
+      module_type = "binary";
+      break;
+
+    case ScriptModule::Type::Binary:
+      extension = kWasmExtension;
+      module_type = "binary";
+      break;
+
+    case ScriptModule::Type::Quoted:
+      extension = kWastExtension;
+      module_type = "text";
+      break;
+  }
+
+  WriteLocation(&module->GetLocation());
+  WriteSeparator();
+  char* filename = GetModuleFilename(extension);
+  WriteKey("filename");
+  WriteEscapedStringSlice(get_basename(filename));
+  WriteSeparator();
+  WriteKey("text");
+  WriteEscapedStringSlice(text);
+  WriteSeparator();
+  WriteKey("module_type");
+  WriteString(module_type);
+  WriteScriptModule(filename, module);
   delete [] filename;
 }
 
-static void write_commands(Context* ctx, Script* script) {
-  writef(&ctx->json_stream, "{\"source_filename\": ");
-  write_escaped_string_slice(ctx, ctx->source_filename);
-  writef(&ctx->json_stream, ",\n \"commands\": [\n");
-  int last_module_index = -1;
+void BinaryWriterSpec::WriteCommands(Script* script) {
+  json_stream_.Writef("{\"source_filename\": ");
+  WriteEscapedStringSlice(source_filename_);
+  json_stream_.Writef(",\n \"commands\": [\n");
+  Index last_module_index = kInvalidIndex;
   for (size_t i = 0; i < script->commands.size(); ++i) {
     const Command& command = *script->commands[i].get();
 
     if (command.type == CommandType::AssertInvalidNonBinary)
       continue;
 
-    if (i != 0)
-      write_separator(ctx);
-    writef(&ctx->json_stream, "\n");
+    if (i != 0) {
+      WriteSeparator();
+      json_stream_.Writef("\n");
+    }
 
-    writef(&ctx->json_stream, "  {");
-    write_command_type(ctx, command);
-    write_separator(ctx);
+    json_stream_.Writef("  {");
+    WriteCommandType(command);
+    WriteSeparator();
 
     switch (command.type) {
       case CommandType::Module: {
         Module* module = command.module;
-        char* filename = get_module_filename(ctx);
-        write_location(ctx, &module->loc);
-        write_separator(ctx);
+        char* filename = GetModuleFilename(kWasmExtension);
+        WriteLocation(&module->loc);
+        WriteSeparator();
         if (module->name.start) {
-          write_key(ctx, "name");
-          write_escaped_string_slice(ctx, module->name);
-          write_separator(ctx);
+          WriteKey("name");
+          WriteEscapedStringSlice(module->name);
+          WriteSeparator();
         }
-        write_key(ctx, "filename");
-        write_escaped_string_slice(ctx, get_basename(filename));
-        write_module(ctx, filename, module);
+        WriteKey("filename");
+        WriteEscapedStringSlice(get_basename(filename));
+        WriteModule(filename, module);
         delete [] filename;
-        ctx->num_modules++;
-        last_module_index = static_cast<int>(i);
+        num_modules_++;
+        last_module_index = i;
         break;
       }
 
       case CommandType::Action:
-        write_location(ctx, &command.action->loc);
-        write_separator(ctx);
-        write_action(ctx, command.action);
+        WriteLocation(&command.action->loc);
+        WriteSeparator();
+        WriteAction(command.action);
         break;
 
       case CommandType::Register:
-        write_location(ctx, &command.register_.var.loc);
-        write_separator(ctx);
+        WriteLocation(&command.register_.var.loc);
+        WriteSeparator();
         if (command.register_.var.type == VarType::Name) {
-          write_key(ctx, "name");
-          write_var(ctx, &command.register_.var);
-          write_separator(ctx);
+          WriteKey("name");
+          WriteVar(&command.register_.var);
+          WriteSeparator();
         } else {
           /* If we're not registering by name, then we should only be
            * registering the last module. */
           WABT_USE(last_module_index);
           assert(command.register_.var.index == last_module_index);
         }
-        write_key(ctx, "as");
-        write_escaped_string_slice(ctx, command.register_.module_name);
+        WriteKey("as");
+        WriteEscapedStringSlice(command.register_.module_name);
         break;
 
       case CommandType::AssertMalformed:
-        write_invalid_module(ctx, command.assert_malformed.module,
-                             command.assert_malformed.text);
-        ctx->num_modules++;
+        WriteInvalidModule(command.assert_malformed.module,
+                           command.assert_malformed.text);
+        num_modules_++;
         break;
 
       case CommandType::AssertInvalid:
-        write_invalid_module(ctx, command.assert_invalid.module,
-                             command.assert_invalid.text);
-        ctx->num_modules++;
+        WriteInvalidModule(command.assert_invalid.module,
+                           command.assert_invalid.text);
+        num_modules_++;
         break;
 
       case CommandType::AssertUnlinkable:
-        write_invalid_module(ctx, command.assert_unlinkable.module,
-                             command.assert_unlinkable.text);
-        ctx->num_modules++;
+        WriteInvalidModule(command.assert_unlinkable.module,
+                           command.assert_unlinkable.text);
+        num_modules_++;
         break;
 
       case CommandType::AssertUninstantiable:
-        write_invalid_module(ctx, command.assert_uninstantiable.module,
-                             command.assert_uninstantiable.text);
-        ctx->num_modules++;
+        WriteInvalidModule(command.assert_uninstantiable.module,
+                           command.assert_uninstantiable.text);
+        num_modules_++;
         break;
 
       case CommandType::AssertReturn:
-        write_location(ctx, &command.assert_return.action->loc);
-        write_separator(ctx);
-        write_action(ctx, command.assert_return.action);
-        write_separator(ctx);
-        write_key(ctx, "expected");
-        write_const_vector(ctx, *command.assert_return.expected);
+        WriteLocation(&command.assert_return.action->loc);
+        WriteSeparator();
+        WriteAction(command.assert_return.action);
+        WriteSeparator();
+        WriteKey("expected");
+        WriteConstVector(*command.assert_return.expected);
         break;
 
       case CommandType::AssertReturnCanonicalNan:
-        write_location(ctx, &command.assert_return_canonical_nan.action->loc);
-        write_separator(ctx);
-        write_action(ctx, command.assert_return_canonical_nan.action);
-        write_separator(ctx);
-        write_key(ctx, "expected");
-        write_action_result_type(ctx, script,
-                                 command.assert_return_canonical_nan.action);
+        WriteLocation(&command.assert_return_canonical_nan.action->loc);
+        WriteSeparator();
+        WriteAction(command.assert_return_canonical_nan.action);
+        WriteSeparator();
+        WriteKey("expected");
+        WriteActionResultType(script,
+                              command.assert_return_canonical_nan.action);
         break;
 
       case CommandType::AssertReturnArithmeticNan:
-        write_location(ctx, &command.assert_return_arithmetic_nan.action->loc);
-        write_separator(ctx);
-        write_action(ctx, command.assert_return_arithmetic_nan.action);
-        write_separator(ctx);
-        write_key(ctx, "expected");
-        write_action_result_type(ctx, script,
-                                 command.assert_return_arithmetic_nan.action);
+        WriteLocation(&command.assert_return_arithmetic_nan.action->loc);
+        WriteSeparator();
+        WriteAction(command.assert_return_arithmetic_nan.action);
+        WriteSeparator();
+        WriteKey("expected");
+        WriteActionResultType(script,
+                              command.assert_return_arithmetic_nan.action);
         break;
 
       case CommandType::AssertTrap:
-        write_location(ctx, &command.assert_trap.action->loc);
-        write_separator(ctx);
-        write_action(ctx, command.assert_trap.action);
-        write_separator(ctx);
-        write_key(ctx, "text");
-        write_escaped_string_slice(ctx, command.assert_trap.text);
+        WriteLocation(&command.assert_trap.action->loc);
+        WriteSeparator();
+        WriteAction(command.assert_trap.action);
+        WriteSeparator();
+        WriteKey("text");
+        WriteEscapedStringSlice(command.assert_trap.text);
         break;
 
       case CommandType::AssertExhaustion:
-        write_location(ctx, &command.assert_trap.action->loc);
-        write_separator(ctx);
-        write_action(ctx, command.assert_trap.action);
+        WriteLocation(&command.assert_trap.action->loc);
+        WriteSeparator();
+        WriteAction(command.assert_trap.action);
         break;
 
       case CommandType::AssertInvalidNonBinary:
@@ -474,38 +547,27 @@
         break;
     }
 
-    writef(&ctx->json_stream, "}");
+    json_stream_.Writef("}");
   }
-  writef(&ctx->json_stream, "]}\n");
+  json_stream_.Writef("]}\n");
 }
 
+Result BinaryWriterSpec::WriteScript(Script* script) {
+  WriteCommands(script);
+  if (spec_options_->json_filename) {
+    json_stream_.WriteToFile(spec_options_->json_filename);
+  }
+  return result_;
+}
+
+}  // namespace
+
 Result write_binary_spec_script(Script* script,
                                 const char* source_filename,
                                 const WriteBinarySpecOptions* spec_options) {
   assert(source_filename);
-  Context ctx;
-  WABT_ZERO_MEMORY(ctx);
-  ctx.spec_options = spec_options;
-  ctx.result = Result::Ok;
-  ctx.source_filename.start = source_filename;
-  ctx.source_filename.length = strlen(source_filename);
-  ctx.module_filename_noext = strip_extension(
-      ctx.spec_options->json_filename ? ctx.spec_options->json_filename
-                                      : source_filename);
-  ctx.write_modules = !!ctx.spec_options->json_filename;
-
-  Result result = init_mem_writer(&ctx.json_writer);
-  if (WABT_SUCCEEDED(result)) {
-    init_stream(&ctx.json_stream, &ctx.json_writer.base, nullptr);
-    write_commands(&ctx, script);
-    if (ctx.spec_options->json_filename) {
-      write_output_buffer_to_file(&ctx.json_writer.buf,
-                                  ctx.spec_options->json_filename);
-    }
-    close_mem_writer(&ctx.json_writer);
-  }
-
-  return ctx.result;
+  BinaryWriterSpec binary_writer_spec(source_filename, spec_options);
+  return binary_writer_spec.WriteScript(script);
 }
 
 }  // namespace wabt
diff --git a/lib/wabt/src/binary-writer-spec.h b/lib/wabt/src/binary-writer-spec.h
index 974af5f..3266342 100644
--- a/lib/wabt/src/binary-writer-spec.h
+++ b/lib/wabt/src/binary-writer-spec.h
@@ -17,14 +17,12 @@
 #ifndef WABT_BINARY_WRITER_SPEC_H_
 #define WABT_BINARY_WRITER_SPEC_H_
 
-#include "ast.h"
 #include "binary-writer.h"
 #include "common.h"
+#include "ir.h"
 
 namespace wabt {
 
-struct Writer;
-
 #define WABT_WRITE_BINARY_SPEC_OPTIONS_DEFAULT \
   { nullptr, WABT_WRITE_BINARY_OPTIONS_DEFAULT }
 
diff --git a/lib/wabt/src/binary-writer.cc b/lib/wabt/src/binary-writer.cc
index 839752d..3abc12b 100644
--- a/lib/wabt/src/binary-writer.cc
+++ b/lib/wabt/src/binary-writer.cc
@@ -17,17 +17,15 @@
 #include "binary-writer.h"
 #include "config.h"
 
-#include <assert.h>
-#include <math.h>
-#include <memory.h>
-#include <stdarg.h>
-#include <stdint.h>
-#include <stdio.h>
-
+#include <cassert>
+#include <cmath>
+#include <cstdarg>
+#include <cstdint>
+#include <cstdio>
 #include <vector>
 
-#include "ast.h"
 #include "binary.h"
+#include "ir.h"
 #include "stream.h"
 #include "writer.h"
 
@@ -37,6 +35,139 @@
 
 namespace wabt {
 
+// TODO(binji): move the LEB128 functions somewhere else.
+
+Offset u32_leb128_length(uint32_t value) {
+  uint32_t size = 0;
+  do {
+    value >>= 7;
+    size++;
+  } while (value != 0);
+  return size;
+}
+
+#define LEB128_LOOP_UNTIL(end_cond) \
+  do {                              \
+    uint8_t byte = value & 0x7f;    \
+    value >>= 7;                    \
+    if (end_cond) {                 \
+      data[length++] = byte;        \
+      break;                        \
+    } else {                        \
+      data[length++] = byte | 0x80; \
+    }                               \
+  } while (1)
+
+Offset write_fixed_u32_leb128_at(Stream* stream,
+                                 Offset offset,
+                                 uint32_t value,
+                                 const char* desc) {
+  uint8_t data[MAX_U32_LEB128_BYTES];
+  Offset length =
+      write_fixed_u32_leb128_raw(data, data + MAX_U32_LEB128_BYTES, value);
+  stream->WriteDataAt(offset, data, length, desc);
+  return length;
+}
+
+void write_u32_leb128(Stream* stream, uint32_t value, const char* desc) {
+  uint8_t data[MAX_U32_LEB128_BYTES];
+  Offset length = 0;
+  LEB128_LOOP_UNTIL(value == 0);
+  stream->WriteData(data, length, desc);
+}
+
+void write_fixed_u32_leb128(Stream* stream, uint32_t value, const char* desc) {
+  uint8_t data[MAX_U32_LEB128_BYTES];
+  Offset length =
+      write_fixed_u32_leb128_raw(data, data + MAX_U32_LEB128_BYTES, value);
+  stream->WriteData(data, length, desc);
+}
+
+/* returns the length of the leb128 */
+Offset write_u32_leb128_at(Stream* stream,
+                           Offset offset,
+                           uint32_t value,
+                           const char* desc) {
+  uint8_t data[MAX_U32_LEB128_BYTES];
+  Offset length = 0;
+  LEB128_LOOP_UNTIL(value == 0);
+  stream->WriteDataAt(offset, data, length, desc);
+  return length;
+}
+
+Offset write_fixed_u32_leb128_raw(uint8_t* data, uint8_t* end, uint32_t value) {
+  if (end - data < MAX_U32_LEB128_BYTES)
+    return 0;
+  data[0] = (value & 0x7f) | 0x80;
+  data[1] = ((value >> 7) & 0x7f) | 0x80;
+  data[2] = ((value >> 14) & 0x7f) | 0x80;
+  data[3] = ((value >> 21) & 0x7f) | 0x80;
+  data[4] = ((value >> 28) & 0x0f);
+  return MAX_U32_LEB128_BYTES;
+}
+
+void write_i32_leb128(Stream* stream, int32_t value, const char* desc) {
+  uint8_t data[MAX_U32_LEB128_BYTES];
+  Offset length = 0;
+  if (value < 0)
+    LEB128_LOOP_UNTIL(value == -1 && (byte & 0x40));
+  else
+    LEB128_LOOP_UNTIL(value == 0 && !(byte & 0x40));
+
+  stream->WriteData(data, length, desc);
+}
+
+static void write_i64_leb128(Stream* stream, int64_t value, const char* desc) {
+  uint8_t data[MAX_U64_LEB128_BYTES];
+  Offset length = 0;
+  if (value < 0)
+    LEB128_LOOP_UNTIL(value == -1 && (byte & 0x40));
+  else
+    LEB128_LOOP_UNTIL(value == 0 && !(byte & 0x40));
+
+  stream->WriteData(data, length, desc);
+}
+
+
+#undef LEB128_LOOP_UNTIL
+
+void write_str(Stream* stream,
+               const char* s,
+               size_t length,
+               const char* desc,
+               PrintChars print_chars) {
+  write_u32_leb128(stream, length, "string length");
+  stream->WriteData(s, length, desc, print_chars);
+}
+
+void write_opcode(Stream* stream, Opcode opcode) {
+  stream->WriteU8Enum(opcode, get_opcode_name(opcode));
+}
+
+void write_type(Stream* stream, Type type) {
+  write_i32_leb128_enum(stream, type, get_type_name(type));
+}
+
+void write_limits(Stream* stream, const Limits* limits) {
+  uint32_t flags = limits->has_max ? WABT_BINARY_LIMITS_HAS_MAX_FLAG : 0;
+  write_u32_leb128(stream, flags, "limits: flags");
+  write_u32_leb128(stream, limits->initial, "limits: initial");
+  if (limits->has_max)
+    write_u32_leb128(stream, limits->max, "limits: max");
+}
+
+void write_debug_name(Stream* stream,
+                      StringSlice name,
+                      const char* desc) {
+  if (name.length > 0) {
+    // Strip leading $ from name
+    assert(*name.start == '$');
+    name.start++;
+    name.length--;
+  }
+  write_str(stream, name.start, name.length, desc, PrintChars::Yes);
+}
+
 namespace {
 
 /* TODO(binji): better leb size guess. Some sections we know will only be 1
@@ -57,33 +188,59 @@
 RelocSection::RelocSection(const char* name, BinarySection code)
     : name(name), section_code(code) {}
 
-struct Context {
-  WABT_DISALLOW_COPY_AND_ASSIGN(Context);
-  Context();
+class BinaryWriter {
+  WABT_DISALLOW_COPY_AND_ASSIGN(BinaryWriter);
 
-  Stream stream;
-  Stream* log_stream = nullptr;
-  const WriteBinaryOptions* options = nullptr;
+ public:
+  BinaryWriter(Writer*, const WriteBinaryOptions* options);
 
-  std::vector<RelocSection> reloc_sections;
-  RelocSection* current_reloc_section = nullptr;
+  Result WriteModule(const Module* module);
 
-  size_t last_section_offset = 0;
-  size_t last_section_leb_size_guess = 0;
-  BinarySection last_section_type = BinarySection::Invalid;
-  size_t last_section_payload_offset = 0;
+ private:
+  void WriteHeader(const char* name, int index);
+  Offset WriteU32Leb128Space(Offset leb_size_guess, const char* desc);
+  Offset WriteFixupU32Leb128Size(Offset offset,
+                                 Offset leb_size_guess,
+                                 const char* desc);
+  void BeginKnownSection(BinarySection section_code, size_t leb_size_guess);
+  void BeginCustomSection(const char* name, size_t leb_size_guess);
+  void EndSection();
+  void BeginSubsection(const char* name, size_t leb_size_guess);
+  void EndSubsection();
+  Index GetLabelVarDepth(const Var* var);
+  Index GetLocalIndex(const Func* func, const Var& var);
+  void AddReloc(RelocType reloc_type, Index index);
+  void WriteU32Leb128WithReloc(Index index,
+                               const char* desc,
+                               RelocType reloc_type);
+  void WriteExpr(const Module* module, const Func* func, const Expr* expr);
+  void WriteExprList(const Module* module, const Func* func, const Expr* first);
+  void WriteInitExpr(const Module* module, const Expr* expr);
+  void WriteFuncLocals(const Module* module,
+                       const Func* func,
+                       const TypeVector& local_types);
+  void WriteFunc(const Module* module, const Func* func);
+  void WriteTable(const Table* table);
+  void WriteMemory(const Memory* memory);
+  void WriteGlobalHeader(const Global* global);
+  void WriteRelocSection(const RelocSection* reloc_section);
 
-  size_t last_subsection_offset = 0;
-  size_t last_subsection_leb_size_guess = 0;
-  size_t last_subsection_payload_offset = 0;
+  Stream stream_;
+  const WriteBinaryOptions* options_ = nullptr;
+
+  std::vector<RelocSection> reloc_sections_;
+  RelocSection* current_reloc_section_ = nullptr;
+
+  size_t last_section_offset_ = 0;
+  size_t last_section_leb_size_guess_ = 0;
+  BinarySection last_section_type_ = BinarySection::Invalid;
+  size_t last_section_payload_offset_ = 0;
+
+  size_t last_subsection_offset_ = 0;
+  size_t last_subsection_leb_size_guess_ = 0;
+  size_t last_subsection_payload_offset_ = 0;
 };
 
-Context::Context() {
-  WABT_ZERO_MEMORY(stream);
-}
-
-}  // namespace
-
 static uint8_t log2_u32(uint32_t x) {
   uint8_t result = 0;
   while (x > 1) {
@@ -93,171 +250,53 @@
   return result;
 }
 
-static void write_header(Context* ctx, const char* name, int index) {
-  if (ctx->log_stream) {
+BinaryWriter::BinaryWriter(Writer* writer, const WriteBinaryOptions* options)
+    : stream_(writer, options->log_stream), options_(options) {}
+
+void BinaryWriter::WriteHeader(const char* name, int index) {
+  if (stream_.has_log_stream()) {
     if (index == PRINT_HEADER_NO_INDEX) {
-      writef(ctx->log_stream, "; %s\n", name);
+      stream_.log_stream().Writef("; %s\n", name);
     } else {
-      writef(ctx->log_stream, "; %s %d\n", name, index);
+      stream_.log_stream().Writef("; %s %d\n", name, index);
     }
   }
 }
 
-#define LEB128_LOOP_UNTIL(end_cond) \
-  do {                              \
-    uint8_t byte = value & 0x7f;    \
-    value >>= 7;                    \
-    if (end_cond) {                 \
-      data[i++] = byte;             \
-      break;                        \
-    } else {                        \
-      data[i++] = byte | 0x80;      \
-    }                               \
-  } while (1)
-
-uint32_t u32_leb128_length(uint32_t value) {
-  uint8_t data[MAX_U32_LEB128_BYTES] WABT_UNUSED;
-  uint32_t i = 0;
-  LEB128_LOOP_UNTIL(value == 0);
-  return i;
-}
-
-/* returns the length of the leb128 */
-uint32_t write_u32_leb128_at(Stream* stream,
-                             uint32_t offset,
-                             uint32_t value,
-                             const char* desc) {
-  uint8_t data[MAX_U32_LEB128_BYTES];
-  uint32_t i = 0;
-  LEB128_LOOP_UNTIL(value == 0);
-  uint32_t length = i;
-  write_data_at(stream, offset, data, length, PrintChars::No, desc);
-  return length;
-}
-
-uint32_t write_fixed_u32_leb128_raw(uint8_t* data,
-                                    uint8_t* end,
-                                    uint32_t value) {
-  if (end - data < MAX_U32_LEB128_BYTES)
-    return 0;
-  data[0] = (value & 0x7f) | 0x80;
-  data[1] = ((value >> 7) & 0x7f) | 0x80;
-  data[2] = ((value >> 14) & 0x7f) | 0x80;
-  data[3] = ((value >> 21) & 0x7f) | 0x80;
-  data[4] = ((value >> 28) & 0x0f);
-  return MAX_U32_LEB128_BYTES;
-}
-
-uint32_t write_fixed_u32_leb128_at(Stream* stream,
-                                   uint32_t offset,
-                                   uint32_t value,
-                                   const char* desc) {
-  uint8_t data[MAX_U32_LEB128_BYTES];
-  uint32_t length =
-      write_fixed_u32_leb128_raw(data, data + MAX_U32_LEB128_BYTES, value);
-  write_data_at(stream, offset, data, length, PrintChars::No, desc);
-  return length;
-}
-
-void write_u32_leb128(Stream* stream, uint32_t value, const char* desc) {
-  uint32_t length = write_u32_leb128_at(stream, stream->offset, value, desc);
-  stream->offset += length;
-}
-
-void write_fixed_u32_leb128(Stream* stream, uint32_t value, const char* desc) {
-  uint32_t length =
-      write_fixed_u32_leb128_at(stream, stream->offset, value, desc);
-  stream->offset += length;
-}
-
-void write_i32_leb128(Stream* stream, int32_t value, const char* desc) {
-  uint8_t data[MAX_U32_LEB128_BYTES];
-  uint32_t i = 0;
-  if (value < 0)
-    LEB128_LOOP_UNTIL(value == -1 && (byte & 0x40));
-  else
-    LEB128_LOOP_UNTIL(value == 0 && !(byte & 0x40));
-
-  uint32_t length = i;
-  write_data_at(stream, stream->offset, data, length, PrintChars::No, desc);
-  stream->offset += length;
-}
-
-static void write_i64_leb128(Stream* stream, int64_t value, const char* desc) {
-  uint8_t data[MAX_U64_LEB128_BYTES];
-  uint32_t i = 0;
-  if (value < 0)
-    LEB128_LOOP_UNTIL(value == -1 && (byte & 0x40));
-  else
-    LEB128_LOOP_UNTIL(value == 0 && !(byte & 0x40));
-
-  int length = i;
-  write_data_at(stream, stream->offset, data, length, PrintChars::No, desc);
-  stream->offset += length;
-}
-
-#undef LEB128_LOOP_UNTIL
-
-static uint32_t size_u32_leb128(uint32_t value) {
-  uint32_t size = 0;
-  do {
-    value >>= 7;
-    size++;
-  } while (value != 0);
-  return size;
-}
-
 /* returns offset of leb128 */
-static uint32_t write_u32_leb128_space(Context* ctx,
-                                       uint32_t leb_size_guess,
-                                       const char* desc) {
+Offset BinaryWriter::WriteU32Leb128Space(Offset leb_size_guess,
+                                         const char* desc) {
   assert(leb_size_guess <= MAX_U32_LEB128_BYTES);
   uint8_t data[MAX_U32_LEB128_BYTES] = {0};
-  uint32_t result = ctx->stream.offset;
-  uint32_t bytes_to_write =
-      ctx->options->canonicalize_lebs ? leb_size_guess : MAX_U32_LEB128_BYTES;
-  write_data(&ctx->stream, data, bytes_to_write, desc);
+  Offset result = stream_.offset();
+  Offset bytes_to_write =
+      options_->canonicalize_lebs ? leb_size_guess : MAX_U32_LEB128_BYTES;
+  stream_.WriteData(data, bytes_to_write, desc);
   return result;
 }
 
-static void write_fixup_u32_leb128_size(Context* ctx,
-                                        uint32_t offset,
-                                        uint32_t leb_size_guess,
-                                        const char* desc) {
-  if (ctx->options->canonicalize_lebs) {
-    uint32_t size = ctx->stream.offset - offset - leb_size_guess;
-    uint32_t leb_size = size_u32_leb128(size);
-    if (leb_size != leb_size_guess) {
-      uint32_t src_offset = offset + leb_size_guess;
-      uint32_t dst_offset = offset + leb_size;
-      move_data(&ctx->stream, dst_offset, src_offset, size);
+Offset BinaryWriter::WriteFixupU32Leb128Size(Offset offset,
+                                             Offset leb_size_guess,
+                                             const char* desc) {
+  if (options_->canonicalize_lebs) {
+    Offset size = stream_.offset() - offset - leb_size_guess;
+    Offset leb_size = u32_leb128_length(size);
+    Offset delta = leb_size - leb_size_guess;
+    if (delta != 0) {
+      Offset src_offset = offset + leb_size_guess;
+      Offset dst_offset = offset + leb_size;
+      stream_.MoveData(dst_offset, src_offset, size);
     }
-    write_u32_leb128_at(&ctx->stream, offset, size, desc);
-    ctx->stream.offset += leb_size - leb_size_guess;
+    write_u32_leb128_at(&stream_, offset, size, desc);
+    stream_.AddOffset(delta);
+    return delta;
   } else {
-    uint32_t size = ctx->stream.offset - offset - MAX_U32_LEB128_BYTES;
-    write_fixed_u32_leb128_at(&ctx->stream, offset, size, desc);
+    Offset size = stream_.offset() - offset - MAX_U32_LEB128_BYTES;
+    write_fixed_u32_leb128_at(&stream_, offset, size, desc);
+    return 0;
   }
 }
 
-void write_str(Stream* stream,
-               const char* s,
-               size_t length,
-               PrintChars print_chars,
-               const char* desc) {
-  write_u32_leb128(stream, length, "string length");
-  write_data_at(stream, stream->offset, s, length, print_chars, desc);
-  stream->offset += length;
-}
-
-void write_opcode(Stream* stream, Opcode opcode) {
-  write_u8_enum(stream, opcode, get_opcode_name(opcode));
-}
-
-void write_type(Stream* stream, Type type) {
-  write_i32_leb128_enum(stream, type, get_type_name(type));
-}
-
 static void write_inline_signature_type(Stream* stream,
                                         const BlockSignature& sig) {
   if (sig.size() == 0) {
@@ -266,307 +305,319 @@
     write_type(stream, sig[0]);
   } else {
     /* this is currently unrepresentable */
-    write_u8(stream, 0xff, "INVALID INLINE SIGNATURE");
+    stream->WriteU8(0xff, "INVALID INLINE SIGNATURE");
   }
 }
 
-static void begin_known_section(Context* ctx,
-                                BinarySection section_code,
-                                size_t leb_size_guess) {
-  assert(ctx->last_section_leb_size_guess == 0);
+void BinaryWriter::BeginKnownSection(BinarySection section_code,
+                                     size_t leb_size_guess) {
+  assert(last_section_leb_size_guess_ == 0);
   char desc[100];
   wabt_snprintf(desc, sizeof(desc), "section \"%s\" (%u)",
-           get_section_name(section_code), static_cast<unsigned>(section_code));
-  write_header(ctx, desc, PRINT_HEADER_NO_INDEX);
-  write_u8_enum(&ctx->stream, section_code, "section code");
-  ctx->last_section_type = section_code;
-  ctx->last_section_leb_size_guess = leb_size_guess;
-  ctx->last_section_offset =
-      write_u32_leb128_space(ctx, leb_size_guess, "section size (guess)");
-  ctx->last_section_payload_offset = ctx->stream.offset;
+                get_section_name(section_code),
+                static_cast<unsigned>(section_code));
+  WriteHeader(desc, PRINT_HEADER_NO_INDEX);
+  stream_.WriteU8Enum(section_code, "section code");
+  last_section_type_ = section_code;
+  last_section_leb_size_guess_ = leb_size_guess;
+  last_section_offset_ =
+      WriteU32Leb128Space(leb_size_guess, "section size (guess)");
+  last_section_payload_offset_ = stream_.offset();
 }
 
-static void begin_custom_section(Context* ctx,
-                                 const char* name,
-                                 size_t leb_size_guess) {
-  assert(ctx->last_section_leb_size_guess == 0);
+void BinaryWriter::BeginCustomSection(const char* name, size_t leb_size_guess) {
+  assert(last_section_leb_size_guess_ == 0);
   char desc[100];
   wabt_snprintf(desc, sizeof(desc), "section \"%s\"", name);
-  write_header(ctx, desc, PRINT_HEADER_NO_INDEX);
-  write_u8_enum(&ctx->stream, BinarySection::Custom, "custom section code");
-  ctx->last_section_type = BinarySection::Custom;
-  ctx->last_section_leb_size_guess = leb_size_guess;
-  ctx->last_section_offset =
-      write_u32_leb128_space(ctx, leb_size_guess, "section size (guess)");
-  ctx->last_section_payload_offset = ctx->stream.offset;
-  write_str(&ctx->stream, name, strlen(name), PrintChars::Yes,
-            "custom section name");
+  WriteHeader(desc, PRINT_HEADER_NO_INDEX);
+  stream_.WriteU8Enum(BinarySection::Custom, "custom section code");
+  last_section_type_ = BinarySection::Custom;
+  last_section_leb_size_guess_ = leb_size_guess;
+  last_section_offset_ =
+      WriteU32Leb128Space(leb_size_guess, "section size (guess)");
+  last_section_payload_offset_ = stream_.offset();
+  write_str(&stream_, name, strlen(name), "custom section name",
+            PrintChars::Yes);
 }
 
-static void end_section(Context* ctx) {
-  assert(ctx->last_section_leb_size_guess != 0);
-  write_fixup_u32_leb128_size(ctx, ctx->last_section_offset,
-                              ctx->last_section_leb_size_guess,
-                              "FIXUP section size");
-  ctx->last_section_leb_size_guess = 0;
+void BinaryWriter::EndSection() {
+  assert(last_section_leb_size_guess_ != 0);
+  Offset delta = WriteFixupU32Leb128Size(
+      last_section_offset_, last_section_leb_size_guess_, "FIXUP section size");
+  if (current_reloc_section_ && delta != 0) {
+    for (Reloc& reloc: current_reloc_section_->relocations)
+      reloc.offset += delta;
+  }
+  last_section_leb_size_guess_ = 0;
 }
 
-static void begin_subsection(Context* ctx,
-                             const char* name,
-                             size_t leb_size_guess) {
-  assert(ctx->last_subsection_leb_size_guess == 0);
-  char desc[100];
-  wabt_snprintf(desc, sizeof(desc), "subsection \"%s\"", name);
-  ctx->last_subsection_leb_size_guess = leb_size_guess;
-  ctx->last_subsection_offset =
-      write_u32_leb128_space(ctx, leb_size_guess, "subsection size (guess)");
-  ctx->last_subsection_payload_offset = ctx->stream.offset;
+void BinaryWriter::BeginSubsection(const char* name, size_t leb_size_guess) {
+  assert(last_subsection_leb_size_guess_ == 0);
+  last_subsection_leb_size_guess_ = leb_size_guess;
+  last_subsection_offset_ =
+      WriteU32Leb128Space(leb_size_guess, "subsection size (guess)");
+  last_subsection_payload_offset_ = stream_.offset();
 }
 
-static void end_subsection(Context* ctx) {
-  assert(ctx->last_subsection_leb_size_guess != 0);
-  write_fixup_u32_leb128_size(ctx, ctx->last_subsection_offset,
-                              ctx->last_subsection_leb_size_guess,
-                              "FIXUP subsection size");
-  ctx->last_subsection_leb_size_guess = 0;
+void BinaryWriter::EndSubsection() {
+  assert(last_subsection_leb_size_guess_ != 0);
+  WriteFixupU32Leb128Size(last_subsection_offset_,
+                          last_subsection_leb_size_guess_,
+                          "FIXUP subsection size");
+  last_subsection_leb_size_guess_ = 0;
 }
 
-static uint32_t get_label_var_depth(Context* ctx, const Var* var) {
+Index BinaryWriter::GetLabelVarDepth(const Var* var) {
   assert(var->type == VarType::Index);
   return var->index;
 }
 
-static void write_expr_list(Context* ctx,
-                            const Module* module,
-                            const Func* func,
-                            const Expr* first_expr);
-
-static void add_reloc(Context* ctx, RelocType reloc_type, uint32_t index) {
+void BinaryWriter::AddReloc(RelocType reloc_type, Index index) {
   // Add a new reloc section if needed
-  if (!ctx->current_reloc_section ||
-      ctx->current_reloc_section->section_code != ctx->last_section_type) {
-    ctx->reloc_sections.emplace_back(get_section_name(ctx->last_section_type),
-                                     ctx->last_section_type);
-    ctx->current_reloc_section = &ctx->reloc_sections.back();
+  if (!current_reloc_section_ ||
+      current_reloc_section_->section_code != last_section_type_) {
+    reloc_sections_.emplace_back(get_section_name(last_section_type_),
+                                 last_section_type_);
+    current_reloc_section_ = &reloc_sections_.back();
   }
 
   // Add a new relocation to the curent reloc section
-  size_t offset = ctx->stream.offset - ctx->last_section_payload_offset;
-  ctx->current_reloc_section->relocations.emplace_back(reloc_type, offset,
-                                                       index);
+  size_t offset = stream_.offset() - last_section_payload_offset_;
+  current_reloc_section_->relocations.emplace_back(reloc_type, offset, index);
 }
 
-static void write_u32_leb128_with_reloc(Context* ctx,
-                                        uint32_t index,
-                                        const char* desc,
-                                        RelocType reloc_type) {
-  if (ctx->options->relocatable) {
-    add_reloc(ctx, reloc_type, index);
-    write_fixed_u32_leb128(&ctx->stream, index, desc);
+void BinaryWriter::WriteU32Leb128WithReloc(Index index,
+                                           const char* desc,
+                                           RelocType reloc_type) {
+  if (options_->relocatable) {
+    AddReloc(reloc_type, index);
+    write_fixed_u32_leb128(&stream_, index, desc);
   } else {
-    write_u32_leb128(&ctx->stream, index, desc);
+    write_u32_leb128(&stream_, index, desc);
   }
 }
 
-static void write_expr(Context* ctx,
-                       const Module* module,
-                       const Func* func,
-                       const Expr* expr) {
+Index BinaryWriter::GetLocalIndex(const Func* func, const Var& var) {
+  // func can be nullptr when using get_local/set_local/tee_local in an
+  // init_expr.
+  if (func) {
+    return func->GetLocalIndex(var);
+  } else if (var.type == VarType::Index) {
+    return var.index;
+  } else {
+    return kInvalidIndex;
+  }
+}
+
+void BinaryWriter::WriteExpr(const Module* module,
+                             const Func* func,
+                             const Expr* expr) {
   switch (expr->type) {
     case ExprType::Binary:
-      write_opcode(&ctx->stream, expr->binary.opcode);
+      write_opcode(&stream_, expr->binary.opcode);
       break;
     case ExprType::Block:
-      write_opcode(&ctx->stream, Opcode::Block);
-      write_inline_signature_type(&ctx->stream, expr->block->sig);
-      write_expr_list(ctx, module, func, expr->block->first);
-      write_opcode(&ctx->stream, Opcode::End);
+      write_opcode(&stream_, Opcode::Block);
+      write_inline_signature_type(&stream_, expr->block->sig);
+      WriteExprList(module, func, expr->block->first);
+      write_opcode(&stream_, Opcode::End);
       break;
     case ExprType::Br:
-      write_opcode(&ctx->stream, Opcode::Br);
-      write_u32_leb128(&ctx->stream, get_label_var_depth(ctx, &expr->br.var),
+      write_opcode(&stream_, Opcode::Br);
+      write_u32_leb128(&stream_, GetLabelVarDepth(&expr->br.var),
                        "break depth");
       break;
     case ExprType::BrIf:
-      write_opcode(&ctx->stream, Opcode::BrIf);
-      write_u32_leb128(&ctx->stream, get_label_var_depth(ctx, &expr->br_if.var),
+      write_opcode(&stream_, Opcode::BrIf);
+      write_u32_leb128(&stream_, GetLabelVarDepth(&expr->br_if.var),
                        "break depth");
       break;
     case ExprType::BrTable: {
-      write_opcode(&ctx->stream, Opcode::BrTable);
-      write_u32_leb128(&ctx->stream, expr->br_table.targets->size(),
-                       "num targets");
-      uint32_t depth;
-      for (const Var& var: *expr->br_table.targets) {
-        depth = get_label_var_depth(ctx, &var);
-        write_u32_leb128(&ctx->stream, depth, "break depth");
+      write_opcode(&stream_, Opcode::BrTable);
+      write_u32_leb128(&stream_, expr->br_table.targets->size(), "num targets");
+      Index depth;
+      for (const Var& var : *expr->br_table.targets) {
+        depth = GetLabelVarDepth(&var);
+        write_u32_leb128(&stream_, depth, "break depth");
       }
-      depth = get_label_var_depth(ctx, &expr->br_table.default_target);
-      write_u32_leb128(&ctx->stream, depth, "break depth for default");
+      depth = GetLabelVarDepth(&expr->br_table.default_target);
+      write_u32_leb128(&stream_, depth, "break depth for default");
       break;
     }
     case ExprType::Call: {
-      int index = get_func_index_by_var(module, &expr->call.var);
-      write_opcode(&ctx->stream, Opcode::Call);
-      write_u32_leb128_with_reloc(ctx, index, "function index",
-                                  RelocType::FuncIndexLEB);
+      Index index = module->GetFuncIndex(expr->call.var);
+      write_opcode(&stream_, Opcode::Call);
+      WriteU32Leb128WithReloc(index, "function index", RelocType::FuncIndexLEB);
       break;
     }
     case ExprType::CallIndirect: {
-      int index = get_func_type_index_by_var(module, &expr->call_indirect.var);
-      write_opcode(&ctx->stream, Opcode::CallIndirect);
-      write_u32_leb128(&ctx->stream, index, "signature index");
-      write_u32_leb128(&ctx->stream, 0, "call_indirect reserved");
+      Index index = module->GetFuncTypeIndex(expr->call_indirect.var);
+      write_opcode(&stream_, Opcode::CallIndirect);
+      WriteU32Leb128WithReloc(index, "signature index", RelocType::TypeIndexLEB);
+      write_u32_leb128(&stream_, 0, "call_indirect reserved");
       break;
     }
+    case ExprType::Catch:
+      // TODO(karlschimpf): Define
+      WABT_FATAL("Catch: Don't know how to write\n");
+      break;
+    case ExprType::CatchAll:
+      // TODO(karlschimpf): Define
+      WABT_FATAL("CatchAll: Don't know how to write\n");
+      break;
     case ExprType::Compare:
-      write_opcode(&ctx->stream, expr->compare.opcode);
+      write_opcode(&stream_, expr->compare.opcode);
       break;
     case ExprType::Const:
       switch (expr->const_.type) {
         case Type::I32: {
-          write_opcode(&ctx->stream, Opcode::I32Const);
-          write_i32_leb128(&ctx->stream, expr->const_.u32, "i32 literal");
+          write_opcode(&stream_, Opcode::I32Const);
+          write_i32_leb128(&stream_, expr->const_.u32, "i32 literal");
           break;
         }
         case Type::I64:
-          write_opcode(&ctx->stream, Opcode::I64Const);
-          write_i64_leb128(&ctx->stream, expr->const_.u64, "i64 literal");
+          write_opcode(&stream_, Opcode::I64Const);
+          write_i64_leb128(&stream_, expr->const_.u64, "i64 literal");
           break;
         case Type::F32:
-          write_opcode(&ctx->stream, Opcode::F32Const);
-          write_u32(&ctx->stream, expr->const_.f32_bits, "f32 literal");
+          write_opcode(&stream_, Opcode::F32Const);
+          stream_.WriteU32(expr->const_.f32_bits, "f32 literal");
           break;
         case Type::F64:
-          write_opcode(&ctx->stream, Opcode::F64Const);
-          write_u64(&ctx->stream, expr->const_.f64_bits, "f64 literal");
+          write_opcode(&stream_, Opcode::F64Const);
+          stream_.WriteU64(expr->const_.f64_bits, "f64 literal");
           break;
         default:
           assert(0);
       }
       break;
     case ExprType::Convert:
-      write_opcode(&ctx->stream, expr->convert.opcode);
+      write_opcode(&stream_, expr->convert.opcode);
       break;
     case ExprType::CurrentMemory:
-      write_opcode(&ctx->stream, Opcode::CurrentMemory);
-      write_u32_leb128(&ctx->stream, 0, "current_memory reserved");
+      write_opcode(&stream_, Opcode::CurrentMemory);
+      write_u32_leb128(&stream_, 0, "current_memory reserved");
       break;
     case ExprType::Drop:
-      write_opcode(&ctx->stream, Opcode::Drop);
+      write_opcode(&stream_, Opcode::Drop);
       break;
     case ExprType::GetGlobal: {
-      int index = get_global_index_by_var(module, &expr->get_global.var);
-      write_opcode(&ctx->stream, Opcode::GetGlobal);
-      write_u32_leb128_with_reloc(ctx, index, "global index",
-                                  RelocType::GlobalIndexLEB);
+      Index index = module->GetGlobalIndex(expr->get_global.var);
+      write_opcode(&stream_, Opcode::GetGlobal);
+      WriteU32Leb128WithReloc(index, "global index", RelocType::GlobalIndexLEB);
       break;
     }
     case ExprType::GetLocal: {
-      int index = get_local_index_by_var(func, &expr->get_local.var);
-      write_opcode(&ctx->stream, Opcode::GetLocal);
-      write_u32_leb128(&ctx->stream, index, "local index");
+      Index index = GetLocalIndex(func, expr->get_local.var);
+      write_opcode(&stream_, Opcode::GetLocal);
+      write_u32_leb128(&stream_, index, "local index");
       break;
     }
     case ExprType::GrowMemory:
-      write_opcode(&ctx->stream, Opcode::GrowMemory);
-      write_u32_leb128(&ctx->stream, 0, "grow_memory reserved");
+      write_opcode(&stream_, Opcode::GrowMemory);
+      write_u32_leb128(&stream_, 0, "grow_memory reserved");
       break;
     case ExprType::If:
-      write_opcode(&ctx->stream, Opcode::If);
-      write_inline_signature_type(&ctx->stream, expr->if_.true_->sig);
-      write_expr_list(ctx, module, func, expr->if_.true_->first);
+      write_opcode(&stream_, Opcode::If);
+      write_inline_signature_type(&stream_, expr->if_.true_->sig);
+      WriteExprList(module, func, expr->if_.true_->first);
       if (expr->if_.false_) {
-        write_opcode(&ctx->stream, Opcode::Else);
-        write_expr_list(ctx, module, func, expr->if_.false_);
+        write_opcode(&stream_, Opcode::Else);
+        WriteExprList(module, func, expr->if_.false_);
       }
-      write_opcode(&ctx->stream, Opcode::End);
+      write_opcode(&stream_, Opcode::End);
       break;
     case ExprType::Load: {
-      write_opcode(&ctx->stream, expr->load.opcode);
-      uint32_t align =
-          get_opcode_alignment(expr->load.opcode, expr->load.align);
-      write_u8(&ctx->stream, log2_u32(align), "alignment");
-      write_u32_leb128(&ctx->stream, expr->load.offset, "load offset");
+      write_opcode(&stream_, expr->load.opcode);
+      Address align = get_opcode_alignment(expr->load.opcode, expr->load.align);
+      stream_.WriteU8(log2_u32(align), "alignment");
+      write_u32_leb128(&stream_, expr->load.offset, "load offset");
       break;
     }
     case ExprType::Loop:
-      write_opcode(&ctx->stream, Opcode::Loop);
-      write_inline_signature_type(&ctx->stream, expr->loop->sig);
-      write_expr_list(ctx, module, func, expr->loop->first);
-      write_opcode(&ctx->stream, Opcode::End);
+      write_opcode(&stream_, Opcode::Loop);
+      write_inline_signature_type(&stream_, expr->loop->sig);
+      WriteExprList(module, func, expr->loop->first);
+      write_opcode(&stream_, Opcode::End);
       break;
     case ExprType::Nop:
-      write_opcode(&ctx->stream, Opcode::Nop);
+      write_opcode(&stream_, Opcode::Nop);
+      break;
+    case ExprType::Rethrow:
+      // TODO(karlschimpf): Define
+      WABT_FATAL("Rethrow: Don't know how to write\n");
       break;
     case ExprType::Return:
-      write_opcode(&ctx->stream, Opcode::Return);
+      write_opcode(&stream_, Opcode::Return);
       break;
     case ExprType::Select:
-      write_opcode(&ctx->stream, Opcode::Select);
+      write_opcode(&stream_, Opcode::Select);
       break;
     case ExprType::SetGlobal: {
-      int index = get_global_index_by_var(module, &expr->get_global.var);
-      write_opcode(&ctx->stream, Opcode::SetGlobal);
-      write_u32_leb128_with_reloc(ctx, index, "global index",
-                                  RelocType::GlobalIndexLEB);
+      Index index = module->GetGlobalIndex(expr->get_global.var);
+      write_opcode(&stream_, Opcode::SetGlobal);
+      WriteU32Leb128WithReloc(index, "global index", RelocType::GlobalIndexLEB);
       break;
     }
     case ExprType::SetLocal: {
-      int index = get_local_index_by_var(func, &expr->get_local.var);
-      write_opcode(&ctx->stream, Opcode::SetLocal);
-      write_u32_leb128(&ctx->stream, index, "local index");
+      Index index = GetLocalIndex(func, expr->get_local.var);
+      write_opcode(&stream_, Opcode::SetLocal);
+      write_u32_leb128(&stream_, index, "local index");
       break;
     }
     case ExprType::Store: {
-      write_opcode(&ctx->stream, expr->store.opcode);
-      uint32_t align =
+      write_opcode(&stream_, expr->store.opcode);
+      Address align =
           get_opcode_alignment(expr->store.opcode, expr->store.align);
-      write_u8(&ctx->stream, log2_u32(align), "alignment");
-      write_u32_leb128(&ctx->stream, expr->store.offset, "store offset");
+      stream_.WriteU8(log2_u32(align), "alignment");
+      write_u32_leb128(&stream_, expr->store.offset, "store offset");
       break;
     }
     case ExprType::TeeLocal: {
-      int index = get_local_index_by_var(func, &expr->get_local.var);
-      write_opcode(&ctx->stream, Opcode::TeeLocal);
-      write_u32_leb128(&ctx->stream, index, "local index");
+      Index index = GetLocalIndex(func, expr->get_local.var);
+      write_opcode(&stream_, Opcode::TeeLocal);
+      write_u32_leb128(&stream_, index, "local index");
       break;
     }
+    case ExprType::Throw:
+      // TODO(karlschimpf): Define
+      WABT_FATAL("Throw: Don't know how to write\n");
+      break;
+    case ExprType::TryBlock:
+      // TODO(karlschimpf): Define
+      WABT_FATAL("TryBlock: Don't know how to write\n");
+      break;
     case ExprType::Unary:
-      write_opcode(&ctx->stream, expr->unary.opcode);
+      write_opcode(&stream_, expr->unary.opcode);
       break;
     case ExprType::Unreachable:
-      write_opcode(&ctx->stream, Opcode::Unreachable);
+      write_opcode(&stream_, Opcode::Unreachable);
       break;
   }
 }
 
-static void write_expr_list(Context* ctx,
-                            const Module* module,
-                            const Func* func,
-                            const Expr* first) {
+void BinaryWriter::WriteExprList(const Module* module,
+                                 const Func* func,
+                                 const Expr* first) {
   for (const Expr* expr = first; expr; expr = expr->next)
-    write_expr(ctx, module, func, expr);
+    WriteExpr(module, func, expr);
 }
 
-static void write_init_expr(Context* ctx,
-                            const Module* module,
-                            const Expr* expr) {
+void BinaryWriter::WriteInitExpr(const Module* module, const Expr* expr) {
   if (expr)
-    write_expr_list(ctx, module, nullptr, expr);
-  write_opcode(&ctx->stream, Opcode::End);
+    WriteExprList(module, nullptr, expr);
+  write_opcode(&stream_, Opcode::End);
 }
 
-static void write_func_locals(Context* ctx,
-                              const Module* module,
-                              const Func* func,
-                              const TypeVector& local_types) {
+void BinaryWriter::WriteFuncLocals(const Module* module,
+                                   const Func* func,
+                                   const TypeVector& local_types) {
   if (local_types.size() == 0) {
-    write_u32_leb128(&ctx->stream, 0, "local decl count");
+    write_u32_leb128(&stream_, 0, "local decl count");
     return;
   }
 
-  uint32_t num_params = get_num_params(func);
+  Index num_params = func->GetNumParams();
 
 #define FIRST_LOCAL_INDEX (num_params)
 #define LAST_LOCAL_INDEX (num_params + local_types.size())
@@ -574,8 +625,8 @@
 
   /* loop through once to count the number of local declaration runs */
   Type current_type = GET_LOCAL_TYPE(FIRST_LOCAL_INDEX);
-  uint32_t local_decl_count = 1;
-  for (uint32_t i = FIRST_LOCAL_INDEX + 1; i < LAST_LOCAL_INDEX; ++i) {
+  Index local_decl_count = 1;
+  for (Index i = FIRST_LOCAL_INDEX + 1; i < LAST_LOCAL_INDEX; ++i) {
     Type type = GET_LOCAL_TYPE(i);
     if (current_type != type) {
       local_decl_count++;
@@ -584,368 +635,371 @@
   }
 
   /* loop through again to write everything out */
-  write_u32_leb128(&ctx->stream, local_decl_count, "local decl count");
+  write_u32_leb128(&stream_, local_decl_count, "local decl count");
   current_type = GET_LOCAL_TYPE(FIRST_LOCAL_INDEX);
-  uint32_t local_type_count = 1;
-  for (uint32_t i = FIRST_LOCAL_INDEX + 1; i <= LAST_LOCAL_INDEX; ++i) {
+  Index local_type_count = 1;
+  for (Index i = FIRST_LOCAL_INDEX + 1; i <= LAST_LOCAL_INDEX; ++i) {
     /* loop through an extra time to catch the final type transition */
     Type type = i == LAST_LOCAL_INDEX ? Type::Void : GET_LOCAL_TYPE(i);
     if (current_type == type) {
       local_type_count++;
     } else {
-      write_u32_leb128(&ctx->stream, local_type_count, "local type count");
-      write_type(&ctx->stream, current_type);
+      write_u32_leb128(&stream_, local_type_count, "local type count");
+      write_type(&stream_, current_type);
       local_type_count = 1;
       current_type = type;
     }
   }
 }
 
-static void write_func(Context* ctx, const Module* module, const Func* func) {
-  write_func_locals(ctx, module, func, func->local_types);
-  write_expr_list(ctx, module, func, func->first_expr);
-  write_opcode(&ctx->stream, Opcode::End);
+void BinaryWriter::WriteFunc(const Module* module, const Func* func) {
+  WriteFuncLocals(module, func, func->local_types);
+  WriteExprList(module, func, func->first_expr);
+  write_opcode(&stream_, Opcode::End);
 }
 
-void write_limits(Stream* stream, const Limits* limits) {
-  uint32_t flags = limits->has_max ? WABT_BINARY_LIMITS_HAS_MAX_FLAG : 0;
-  write_u32_leb128(stream, flags, "limits: flags");
-  write_u32_leb128(stream, limits->initial, "limits: initial");
-  if (limits->has_max)
-    write_u32_leb128(stream, limits->max, "limits: max");
+void BinaryWriter::WriteTable(const Table* table) {
+  write_type(&stream_, Type::Anyfunc);
+  write_limits(&stream_, &table->elem_limits);
 }
 
-static void write_table(Context* ctx, const Table* table) {
-  write_type(&ctx->stream, Type::Anyfunc);
-  write_limits(&ctx->stream, &table->elem_limits);
+void BinaryWriter::WriteMemory(const Memory* memory) {
+  write_limits(&stream_, &memory->page_limits);
 }
 
-static void write_memory(Context* ctx, const Memory* memory) {
-  write_limits(&ctx->stream, &memory->page_limits);
+void BinaryWriter::WriteGlobalHeader(const Global* global) {
+  write_type(&stream_, global->type);
+  stream_.WriteU8(global->mutable_, "global mutability");
 }
 
-static void write_global_header(Context* ctx, const Global* global) {
-  write_type(&ctx->stream, global->type);
-  write_u8(&ctx->stream, global->mutable_, "global mutability");
-}
-
-static void write_reloc_section(Context* ctx, RelocSection* reloc_section) {
+void BinaryWriter::WriteRelocSection(const RelocSection* reloc_section) {
   char section_name[128];
   wabt_snprintf(section_name, sizeof(section_name), "%s.%s",
-           WABT_BINARY_SECTION_RELOC, reloc_section->name);
-  begin_custom_section(ctx, section_name, LEB_SECTION_SIZE_GUESS);
-  write_u32_leb128_enum(&ctx->stream, reloc_section->section_code,
+                WABT_BINARY_SECTION_RELOC, reloc_section->name);
+  BeginCustomSection(section_name, LEB_SECTION_SIZE_GUESS);
+  write_u32_leb128_enum(&stream_, reloc_section->section_code,
                         "reloc section type");
-  std::vector<Reloc>& relocs = reloc_section->relocations;
-  write_u32_leb128(&ctx->stream, relocs.size(), "num relocs");
+  const std::vector<Reloc>& relocs = reloc_section->relocations;
+  write_u32_leb128(&stream_, relocs.size(), "num relocs");
 
-  for (const Reloc& reloc: relocs) {
-    write_u32_leb128_enum(&ctx->stream, reloc.type, "reloc type");
-    write_u32_leb128(&ctx->stream, reloc.offset, "reloc offset");
-    write_u32_leb128(&ctx->stream, reloc.index, "reloc index");
+  for (const Reloc& reloc : relocs) {
+    write_u32_leb128_enum(&stream_, reloc.type, "reloc type");
+    write_u32_leb128(&stream_, reloc.offset, "reloc offset");
+    write_u32_leb128(&stream_, reloc.index, "reloc index");
     switch (reloc.type) {
-      case RelocType::MemoryAddressLEB:
-      case RelocType::MemoryAddressSLEB:
-      case RelocType::MemoryAddressI32:
-        write_u32_leb128(&ctx->stream, reloc.addend, "reloc addend");
+      case RelocType::GlobalAddressLEB:
+      case RelocType::GlobalAddressSLEB:
+      case RelocType::GlobalAddressI32:
+        write_u32_leb128(&stream_, reloc.addend, "reloc addend");
         break;
       default:
         break;
     }
   }
 
-  end_section(ctx);
+  EndSection();
 }
 
-static Result write_module(Context* ctx, const Module* module) {
-  write_u32(&ctx->stream, WABT_BINARY_MAGIC, "WASM_BINARY_MAGIC");
-  write_u32(&ctx->stream, WABT_BINARY_VERSION, "WASM_BINARY_VERSION");
+Result BinaryWriter::WriteModule(const Module* module) {
+  stream_.WriteU32(WABT_BINARY_MAGIC, "WASM_BINARY_MAGIC");
+  stream_.WriteU32(WABT_BINARY_VERSION, "WASM_BINARY_VERSION");
 
   if (module->func_types.size()) {
-    begin_known_section(ctx, BinarySection::Type, LEB_SECTION_SIZE_GUESS);
-    write_u32_leb128(&ctx->stream, module->func_types.size(), "num types");
+    BeginKnownSection(BinarySection::Type, LEB_SECTION_SIZE_GUESS);
+    write_u32_leb128(&stream_, module->func_types.size(), "num types");
     for (size_t i = 0; i < module->func_types.size(); ++i) {
       const FuncType* func_type = module->func_types[i];
       const FuncSignature* sig = &func_type->sig;
-      write_header(ctx, "type", i);
-      write_type(&ctx->stream, Type::Func);
+      WriteHeader("type", i);
+      write_type(&stream_, Type::Func);
 
-      uint32_t num_params = sig->param_types.size();
-      uint32_t num_results = sig->result_types.size();
-      write_u32_leb128(&ctx->stream, num_params, "num params");
+      Index num_params = sig->param_types.size();
+      Index num_results = sig->result_types.size();
+      write_u32_leb128(&stream_, num_params, "num params");
       for (size_t j = 0; j < num_params; ++j)
-        write_type(&ctx->stream, sig->param_types[j]);
+        write_type(&stream_, sig->param_types[j]);
 
-      write_u32_leb128(&ctx->stream, num_results, "num results");
+      write_u32_leb128(&stream_, num_results, "num results");
       for (size_t j = 0; j < num_results; ++j)
-        write_type(&ctx->stream, sig->result_types[j]);
+        write_type(&stream_, sig->result_types[j]);
     }
-    end_section(ctx);
+    EndSection();
   }
 
   if (module->imports.size()) {
-    begin_known_section(ctx, BinarySection::Import, LEB_SECTION_SIZE_GUESS);
-    write_u32_leb128(&ctx->stream, module->imports.size(), "num imports");
+    BeginKnownSection(BinarySection::Import, LEB_SECTION_SIZE_GUESS);
+    write_u32_leb128(&stream_, module->imports.size(), "num imports");
 
     for (size_t i = 0; i < module->imports.size(); ++i) {
       const Import* import = module->imports[i];
-      write_header(ctx, "import header", i);
-      write_str(&ctx->stream, import->module_name.start,
-                import->module_name.length, PrintChars::Yes,
-                "import module name");
-      write_str(&ctx->stream, import->field_name.start,
-                import->field_name.length, PrintChars::Yes,
-                "import field name");
-      write_u8_enum(&ctx->stream, import->kind, "import kind");
+      WriteHeader("import header", i);
+      write_str(&stream_, import->module_name.start, import->module_name.length,
+                "import module name", PrintChars::Yes);
+      write_str(&stream_, import->field_name.start, import->field_name.length,
+                "import field name", PrintChars::Yes);
+      stream_.WriteU8Enum(import->kind, "import kind");
       switch (import->kind) {
         case ExternalKind::Func:
-          write_u32_leb128(&ctx->stream, get_func_type_index_by_decl(
-                                             module, &import->func->decl),
+          write_u32_leb128(&stream_,
+                           module->GetFuncTypeIndex(import->func->decl),
                            "import signature index");
           break;
         case ExternalKind::Table:
-          write_table(ctx, import->table);
+          WriteTable(import->table);
           break;
         case ExternalKind::Memory:
-          write_memory(ctx, import->memory);
+          WriteMemory(import->memory);
           break;
         case ExternalKind::Global:
-          write_global_header(ctx, import->global);
+          WriteGlobalHeader(import->global);
+          break;
+        case ExternalKind::Except:
+          // TODO(karlschimpf) Define.
+          WABT_FATAL("write import except not implemented\n");
           break;
       }
     }
-    end_section(ctx);
+    EndSection();
   }
 
   assert(module->funcs.size() >= module->num_func_imports);
-  uint32_t num_funcs = module->funcs.size() - module->num_func_imports;
+  Index num_funcs = module->funcs.size() - module->num_func_imports;
   if (num_funcs) {
-    begin_known_section(ctx, BinarySection::Function, LEB_SECTION_SIZE_GUESS);
-    write_u32_leb128(&ctx->stream, num_funcs, "num functions");
+    BeginKnownSection(BinarySection::Function, LEB_SECTION_SIZE_GUESS);
+    write_u32_leb128(&stream_, num_funcs, "num functions");
 
     for (size_t i = 0; i < num_funcs; ++i) {
       const Func* func = module->funcs[i + module->num_func_imports];
       char desc[100];
       wabt_snprintf(desc, sizeof(desc), "function %" PRIzd " signature index",
                     i);
-      write_u32_leb128(&ctx->stream,
-                       get_func_type_index_by_decl(module, &func->decl), desc);
+      write_u32_leb128(&stream_, module->GetFuncTypeIndex(func->decl), desc);
     }
-    end_section(ctx);
+    EndSection();
   }
 
   assert(module->tables.size() >= module->num_table_imports);
-  uint32_t num_tables = module->tables.size() - module->num_table_imports;
+  Index num_tables = module->tables.size() - module->num_table_imports;
   if (num_tables) {
-    begin_known_section(ctx, BinarySection::Table, LEB_SECTION_SIZE_GUESS);
-    write_u32_leb128(&ctx->stream, num_tables, "num tables");
+    BeginKnownSection(BinarySection::Table, LEB_SECTION_SIZE_GUESS);
+    write_u32_leb128(&stream_, num_tables, "num tables");
     for (size_t i = 0; i < num_tables; ++i) {
       const Table* table = module->tables[i + module->num_table_imports];
-      write_header(ctx, "table", i);
-      write_table(ctx, table);
+      WriteHeader("table", i);
+      WriteTable(table);
     }
-    end_section(ctx);
+    EndSection();
   }
 
   assert(module->memories.size() >= module->num_memory_imports);
-  uint32_t num_memories = module->memories.size() - module->num_memory_imports;
+  Index num_memories = module->memories.size() - module->num_memory_imports;
   if (num_memories) {
-    begin_known_section(ctx, BinarySection::Memory, LEB_SECTION_SIZE_GUESS);
-    write_u32_leb128(&ctx->stream, num_memories, "num memories");
+    BeginKnownSection(BinarySection::Memory, LEB_SECTION_SIZE_GUESS);
+    write_u32_leb128(&stream_, num_memories, "num memories");
     for (size_t i = 0; i < num_memories; ++i) {
       const Memory* memory = module->memories[i + module->num_memory_imports];
-      write_header(ctx, "memory", i);
-      write_memory(ctx, memory);
+      WriteHeader("memory", i);
+      WriteMemory(memory);
     }
-    end_section(ctx);
+    EndSection();
   }
 
   assert(module->globals.size() >= module->num_global_imports);
-  uint32_t num_globals = module->globals.size() - module->num_global_imports;
+  Index num_globals = module->globals.size() - module->num_global_imports;
   if (num_globals) {
-    begin_known_section(ctx, BinarySection::Global, LEB_SECTION_SIZE_GUESS);
-    write_u32_leb128(&ctx->stream, num_globals, "num globals");
+    BeginKnownSection(BinarySection::Global, LEB_SECTION_SIZE_GUESS);
+    write_u32_leb128(&stream_, num_globals, "num globals");
 
     for (size_t i = 0; i < num_globals; ++i) {
       const Global* global = module->globals[i + module->num_global_imports];
-      write_global_header(ctx, global);
-      write_init_expr(ctx, module, global->init_expr);
+      WriteGlobalHeader(global);
+      WriteInitExpr(module, global->init_expr);
     }
-    end_section(ctx);
+    EndSection();
   }
 
   if (module->exports.size()) {
-    begin_known_section(ctx, BinarySection::Export, LEB_SECTION_SIZE_GUESS);
-    write_u32_leb128(&ctx->stream, module->exports.size(), "num exports");
+    BeginKnownSection(BinarySection::Export, LEB_SECTION_SIZE_GUESS);
+    write_u32_leb128(&stream_, module->exports.size(), "num exports");
 
     for (const Export* export_ : module->exports) {
-      write_str(&ctx->stream, export_->name.start, export_->name.length,
-                PrintChars::Yes, "export name");
-      write_u8_enum(&ctx->stream, export_->kind, "export kind");
+      write_str(&stream_, export_->name.start, export_->name.length,
+                "export name", PrintChars::Yes);
+      stream_.WriteU8Enum(export_->kind, "export kind");
       switch (export_->kind) {
         case ExternalKind::Func: {
-          int index = get_func_index_by_var(module, &export_->var);
-          write_u32_leb128(&ctx->stream, index, "export func index");
+          Index index = module->GetFuncIndex(export_->var);
+          write_u32_leb128(&stream_, index, "export func index");
           break;
         }
         case ExternalKind::Table: {
-          int index = get_table_index_by_var(module, &export_->var);
-          write_u32_leb128(&ctx->stream, index, "export table index");
+          Index index = module->GetTableIndex(export_->var);
+          write_u32_leb128(&stream_, index, "export table index");
           break;
         }
         case ExternalKind::Memory: {
-          int index = get_memory_index_by_var(module, &export_->var);
-          write_u32_leb128(&ctx->stream, index, "export memory index");
+          Index index = module->GetMemoryIndex(export_->var);
+          write_u32_leb128(&stream_, index, "export memory index");
           break;
         }
         case ExternalKind::Global: {
-          int index = get_global_index_by_var(module, &export_->var);
-          write_u32_leb128(&ctx->stream, index, "export global index");
+          Index index = module->GetGlobalIndex(export_->var);
+          write_u32_leb128(&stream_, index, "export global index");
           break;
         }
+        case ExternalKind::Except:
+          // TODO(karlschimpf) Define.
+          WABT_FATAL("write export except not implemented\n");
+          break;
       }
     }
-    end_section(ctx);
+    EndSection();
   }
 
   if (module->start) {
-    int start_func_index = get_func_index_by_var(module, module->start);
-    if (start_func_index != -1) {
-      begin_known_section(ctx, BinarySection::Start, LEB_SECTION_SIZE_GUESS);
-      write_u32_leb128(&ctx->stream, start_func_index, "start func index");
-      end_section(ctx);
+    Index start_func_index = module->GetFuncIndex(*module->start);
+    if (start_func_index != kInvalidIndex) {
+      BeginKnownSection(BinarySection::Start, LEB_SECTION_SIZE_GUESS);
+      write_u32_leb128(&stream_, start_func_index, "start func index");
+      EndSection();
     }
   }
 
   if (module->elem_segments.size()) {
-    begin_known_section(ctx, BinarySection::Elem, LEB_SECTION_SIZE_GUESS);
-    write_u32_leb128(&ctx->stream, module->elem_segments.size(),
+    BeginKnownSection(BinarySection::Elem, LEB_SECTION_SIZE_GUESS);
+    write_u32_leb128(&stream_, module->elem_segments.size(),
                      "num elem segments");
     for (size_t i = 0; i < module->elem_segments.size(); ++i) {
       ElemSegment* segment = module->elem_segments[i];
-      int table_index = get_table_index_by_var(module, &segment->table_var);
-      write_header(ctx, "elem segment header", i);
-      write_u32_leb128(&ctx->stream, table_index, "table index");
-      write_init_expr(ctx, module, segment->offset);
-      write_u32_leb128(&ctx->stream, segment->vars.size(),
-                       "num function indices");
-      for (const Var& var: segment->vars) {
-        int index = get_func_index_by_var(module, &var);
-        write_u32_leb128_with_reloc(ctx, index, "function index",
-                                    RelocType::FuncIndexLEB);
+      Index table_index = module->GetTableIndex(segment->table_var);
+      WriteHeader("elem segment header", i);
+      write_u32_leb128(&stream_, table_index, "table index");
+      WriteInitExpr(module, segment->offset);
+      write_u32_leb128(&stream_, segment->vars.size(), "num function indices");
+      for (const Var& var : segment->vars) {
+        Index index = module->GetFuncIndex(var);
+        WriteU32Leb128WithReloc(index, "function index",
+                                RelocType::FuncIndexLEB);
       }
     }
-    end_section(ctx);
+    EndSection();
   }
 
   if (num_funcs) {
-    begin_known_section(ctx, BinarySection::Code, LEB_SECTION_SIZE_GUESS);
-    write_u32_leb128(&ctx->stream, num_funcs, "num functions");
+    BeginKnownSection(BinarySection::Code, LEB_SECTION_SIZE_GUESS);
+    write_u32_leb128(&stream_, num_funcs, "num functions");
 
     for (size_t i = 0; i < num_funcs; ++i) {
-      write_header(ctx, "function body", i);
+      WriteHeader("function body", i);
       const Func* func = module->funcs[i + module->num_func_imports];
 
       /* TODO(binji): better guess of the size of the function body section */
-      const uint32_t leb_size_guess = 1;
-      uint32_t body_size_offset =
-          write_u32_leb128_space(ctx, leb_size_guess, "func body size (guess)");
-      write_func(ctx, module, func);
-      write_fixup_u32_leb128_size(ctx, body_size_offset, leb_size_guess,
-                                  "FIXUP func body size");
+      const Offset leb_size_guess = 1;
+      Offset body_size_offset =
+          WriteU32Leb128Space(leb_size_guess, "func body size (guess)");
+      WriteFunc(module, func);
+      WriteFixupU32Leb128Size(body_size_offset, leb_size_guess,
+                              "FIXUP func body size");
     }
-    end_section(ctx);
+    EndSection();
   }
 
   if (module->data_segments.size()) {
-    begin_known_section(ctx, BinarySection::Data, LEB_SECTION_SIZE_GUESS);
-    write_u32_leb128(&ctx->stream, module->data_segments.size(),
+    BeginKnownSection(BinarySection::Data, LEB_SECTION_SIZE_GUESS);
+    write_u32_leb128(&stream_, module->data_segments.size(),
                      "num data segments");
     for (size_t i = 0; i < module->data_segments.size(); ++i) {
       const DataSegment* segment = module->data_segments[i];
-      write_header(ctx, "data segment header", i);
-      int memory_index = get_memory_index_by_var(module, &segment->memory_var);
-      write_u32_leb128(&ctx->stream, memory_index, "memory index");
-      write_init_expr(ctx, module, segment->offset);
-      write_u32_leb128(&ctx->stream, segment->size, "data segment size");
-      write_header(ctx, "data segment data", i);
-      write_data(&ctx->stream, segment->data, segment->size,
-                 "data segment data");
+      WriteHeader("data segment header", i);
+      Index memory_index = module->GetMemoryIndex(segment->memory_var);
+      write_u32_leb128(&stream_, memory_index, "memory index");
+      WriteInitExpr(module, segment->offset);
+      write_u32_leb128(&stream_, segment->size, "data segment size");
+      WriteHeader("data segment data", i);
+      stream_.WriteData(segment->data, segment->size, "data segment data");
     }
-    end_section(ctx);
+    EndSection();
   }
 
-  if (ctx->options->write_debug_names) {
+  if (options_->write_debug_names) {
     std::vector<std::string> index_to_name;
 
     char desc[100];
-    begin_custom_section(ctx, WABT_BINARY_SECTION_NAME, LEB_SECTION_SIZE_GUESS);
-    write_u32_leb128(&ctx->stream, 1, "function name type");
-    begin_subsection(ctx, "function name subsection", LEB_SECTION_SIZE_GUESS);
-    write_u32_leb128(&ctx->stream, module->funcs.size(), "num functions");
-    for (size_t i = 0; i < module->funcs.size(); ++i) {
-      const Func* func = module->funcs[i];
-      write_u32_leb128(&ctx->stream, i, "function index");
-      wabt_snprintf(desc, sizeof(desc), "func name %" PRIzd, i);
-      write_str(&ctx->stream, func->name.start, func->name.length,
-                PrintChars::Yes, desc);
+    BeginCustomSection(WABT_BINARY_SECTION_NAME, LEB_SECTION_SIZE_GUESS);
+
+    size_t named_functions = 0;
+    for (const Func* func : module->funcs) {
+      if (func->name.length > 0)
+        named_functions++;
     }
-    end_subsection(ctx);
 
-    write_u32_leb128(&ctx->stream, 2, "local name type");
+    if (named_functions > 0) {
+      write_u32_leb128(&stream_, 1, "function name type");
+      BeginSubsection("function name subsection", LEB_SECTION_SIZE_GUESS);
 
-    begin_subsection(ctx, "local name subsection", LEB_SECTION_SIZE_GUESS);
-    write_u32_leb128(&ctx->stream, module->funcs.size(), "num functions");
+      write_u32_leb128(&stream_, named_functions, "num functions");
+      for (size_t i = 0; i < module->funcs.size(); ++i) {
+        const Func* func = module->funcs[i];
+        if (func->name.length == 0)
+          continue;
+        write_u32_leb128(&stream_, i, "function index");
+        wabt_snprintf(desc, sizeof(desc), "func name %" PRIzd, i);
+        write_debug_name(&stream_, func->name, desc);
+      }
+      EndSubsection();
+    }
+
+    write_u32_leb128(&stream_, 2, "local name type");
+
+    BeginSubsection("local name subsection", LEB_SECTION_SIZE_GUESS);
+    write_u32_leb128(&stream_, module->funcs.size(), "num functions");
     for (size_t i = 0; i < module->funcs.size(); ++i) {
       const Func* func = module->funcs[i];
-      uint32_t num_params = get_num_params(func);
-      uint32_t num_locals = func->local_types.size();
-      uint32_t num_params_and_locals = get_num_params_and_locals(func);
+      Index num_params = func->GetNumParams();
+      Index num_locals = func->local_types.size();
+      Index num_params_and_locals = func->GetNumParamsAndLocals();
 
-      write_u32_leb128(&ctx->stream, i, "function index");
-      write_u32_leb128(&ctx->stream, num_params_and_locals, "num locals");
+      write_u32_leb128(&stream_, i, "function index");
+      write_u32_leb128(&stream_, num_params_and_locals, "num locals");
 
-      make_type_binding_reverse_mapping(func->decl.sig.param_types,
-                                        func->param_bindings, &index_to_name);
+      MakeTypeBindingReverseMapping(func->decl.sig.param_types,
+                                    func->param_bindings, &index_to_name);
       for (size_t j = 0; j < num_params; ++j) {
         const std::string& name = index_to_name[j];
         wabt_snprintf(desc, sizeof(desc), "local name %" PRIzd, j);
-        write_u32_leb128(&ctx->stream, j, "local index");
-        write_str(&ctx->stream, name.data(), name.length(), PrintChars::Yes,
-                  desc);
+        write_u32_leb128(&stream_, j, "local index");
+        write_debug_name(&stream_, string_to_string_slice(name), desc);
       }
 
-      make_type_binding_reverse_mapping(func->local_types, func->local_bindings,
-                                        &index_to_name);
+      MakeTypeBindingReverseMapping(func->local_types, func->local_bindings,
+                                    &index_to_name);
       for (size_t j = 0; j < num_locals; ++j) {
         const std::string& name = index_to_name[j];
         wabt_snprintf(desc, sizeof(desc), "local name %" PRIzd, num_params + j);
-        write_u32_leb128(&ctx->stream, num_params + j, "local index");
-        write_str(&ctx->stream, name.data(), name.length(), PrintChars::Yes,
-                  desc);
+        write_u32_leb128(&stream_, num_params + j, "local index");
+        write_debug_name(&stream_, string_to_string_slice(name), desc);
       }
     }
-    end_subsection(ctx);
-    end_section(ctx);
+    EndSubsection();
+    EndSection();
   }
 
-  if (ctx->options->relocatable) {
-    for (size_t i = 0; i < ctx->reloc_sections.size(); i++) {
-      write_reloc_section(ctx, &ctx->reloc_sections[i]);
+  if (options_->relocatable) {
+    for (RelocSection& section : reloc_sections_) {
+      WriteRelocSection(&section);
     }
   }
 
-  return ctx->stream.result;
+  return stream_.result();
 }
 
+}  // namespace
+
 Result write_binary_module(Writer* writer,
                            const Module* module,
                            const WriteBinaryOptions* options) {
-  Context ctx;
-  ctx.options = options;
-  ctx.log_stream = options->log_stream;
-  init_stream(&ctx.stream, writer, ctx.log_stream);
-  return write_module(&ctx, module);
+  BinaryWriter binary_writer(writer, options);
+  return binary_writer.WriteModule(module);
 }
 
 }  // namespace wabt
diff --git a/lib/wabt/src/binary-writer.h b/lib/wabt/src/binary-writer.h
index 830f0d9..e94b581 100644
--- a/lib/wabt/src/binary-writer.h
+++ b/lib/wabt/src/binary-writer.h
@@ -18,69 +18,63 @@
 #define WABT_BINARY_WRITER_H_
 
 #include "common.h"
+#include "opcode.h"
 #include "stream.h"
 
 namespace wabt {
 
+class Writer;
 struct Module;
 struct Script;
-struct Writer;
-struct Stream;
 
 #define WABT_WRITE_BINARY_OPTIONS_DEFAULT \
   { nullptr, true, false, false }
 
 struct WriteBinaryOptions {
-  struct Stream* log_stream;
+  Stream* log_stream;
   bool canonicalize_lebs;
   bool relocatable;
   bool write_debug_names;
 };
 
-Result write_binary_module(struct Writer*,
-                           const struct Module*,
-                           const WriteBinaryOptions*);
+Result write_binary_module(Writer*, const Module*, const WriteBinaryOptions*);
 
 /* returns the length of the leb128 */
-uint32_t u32_leb128_length(uint32_t value);
+Offset u32_leb128_length(uint32_t value);
 
-void write_u32_leb128(struct Stream* stream, uint32_t value, const char* desc);
+void write_u32_leb128(Stream* stream, uint32_t value, const char* desc);
 
-void write_i32_leb128(struct Stream* stream, int32_t value, const char* desc);
+void write_i32_leb128(Stream* stream, int32_t value, const char* desc);
 
-void write_fixed_u32_leb128(struct Stream* stream,
-                            uint32_t value,
-                            const char* desc);
+void write_fixed_u32_leb128(Stream* stream, uint32_t value, const char* desc);
 
-uint32_t write_fixed_u32_leb128_at(struct Stream* stream,
-                                   uint32_t offset,
-                                   uint32_t value,
-                                   const char* desc);
+Offset write_fixed_u32_leb128_at(Stream* stream,
+                                 Offset offset,
+                                 uint32_t value,
+                                 const char* desc);
 
-uint32_t write_fixed_u32_leb128_raw(uint8_t* data,
-                                    uint8_t* end,
-                                    uint32_t value);
+Offset write_fixed_u32_leb128_raw(uint8_t* data, uint8_t* end, uint32_t value);
 
-void write_type(struct Stream* stream, Type type);
+void write_type(Stream* stream, Type type);
 
-void write_str(struct Stream* stream,
+void write_str(Stream* stream,
                const char* s,
                size_t length,
-               PrintChars print_chars,
-               const char* desc);
+               const char* desc,
+               PrintChars print_chars = PrintChars::No);
 
-void write_opcode(struct Stream* stream, Opcode opcode);
+void write_opcode(Stream* stream, Opcode opcode);
 
-void write_limits(struct Stream* stream, const Limits* limits);
+void write_limits(Stream* stream, const Limits* limits);
 
 /* Convenience functions for writing enums as LEB128s. */
 template <typename T>
-void write_u32_leb128_enum(struct Stream* stream, T value, const char* desc) {
+void write_u32_leb128_enum(Stream* stream, T value, const char* desc) {
   write_u32_leb128(stream, static_cast<uint32_t>(value), desc);
 }
 
 template <typename T>
-void write_i32_leb128_enum(struct Stream* stream, T value, const char* desc) {
+void write_i32_leb128_enum(Stream* stream, T value, const char* desc) {
   write_i32_leb128(stream, static_cast<int32_t>(value), desc);
 }
 
diff --git a/lib/wabt/src/binding-hash.cc b/lib/wabt/src/binding-hash.cc
index 1e87ad5..d1297d9 100644
--- a/lib/wabt/src/binding-hash.cc
+++ b/lib/wabt/src/binding-hash.cc
@@ -19,19 +19,26 @@
 #include <algorithm>
 #include <vector>
 
+#include "ir.h"
+
 namespace wabt {
 
-void BindingHash::find_duplicates(DuplicateCallback callback,
-                                  void* user_data) const {
+void BindingHash::FindDuplicates(DuplicateCallback callback) const {
   if (size() > 0) {
     ValueTypeVector duplicates;
-    create_duplicates_vector(&duplicates);
-    sort_duplicates_vector_by_location(&duplicates);
-    call_callbacks(duplicates, callback, user_data);
+    CreateDuplicatesVector(&duplicates);
+    SortDuplicatesVectorByLocation(&duplicates);
+    CallCallbacks(duplicates, callback);
   }
 }
 
-void BindingHash::create_duplicates_vector(
+Index BindingHash::FindIndex(const Var& var) const {
+  if (var.type == VarType::Name)
+    return FindIndex(var.name);
+  return var.index;
+}
+
+void BindingHash::CreateDuplicatesVector(
     ValueTypeVector* out_duplicates) const {
   // This relies on the fact that in an unordered_multimap, all values with the
   // same key are adjacent in iteration order.
@@ -50,7 +57,7 @@
   }
 }
 
-void BindingHash::sort_duplicates_vector_by_location(
+void BindingHash::SortDuplicatesVectorByLocation(
     ValueTypeVector* duplicates) const {
   std::sort(
       duplicates->begin(), duplicates->end(),
@@ -61,9 +68,8 @@
       });
 }
 
-void BindingHash::call_callbacks(const ValueTypeVector& duplicates,
-                                 DuplicateCallback callback,
-                                 void* user_data) const {
+void BindingHash::CallCallbacks(const ValueTypeVector& duplicates,
+                                DuplicateCallback callback) const {
   // Loop through all duplicates in order, and call callback with first
   // occurrence.
   for (auto iter = duplicates.begin(), end = duplicates.end(); iter != end;
@@ -75,7 +81,7 @@
     if (first == iter)
       continue;
     assert(first != duplicates.end());
-    callback(**first, **iter, user_data);
+    callback(**first, **iter);
   }
 }
 
diff --git a/lib/wabt/src/binding-hash.h b/lib/wabt/src/binding-hash.h
index 4aa8c16..3b4cd7e 100644
--- a/lib/wabt/src/binding-hash.h
+++ b/lib/wabt/src/binding-hash.h
@@ -17,6 +17,7 @@
 #ifndef WABT_BINDING_HASH_H_
 #define WABT_BINDING_HASH_H_
 
+#include <functional>
 #include <string>
 #include <vector>
 #include <unordered_map>
@@ -25,14 +26,16 @@
 
 namespace wabt {
 
+struct Var;
+
 struct Binding {
-  explicit Binding(int index) : index(index) {
+  explicit Binding(Index index) : index(index) {
     WABT_ZERO_MEMORY(loc);
   }
-  Binding(const Location& loc, int index) : loc(loc), index(index) {}
+  Binding(const Location& loc, Index index) : loc(loc), index(index) {}
 
   Location loc;
-  int index;
+  Index index;
 };
 
 // This class derives from a C++ container, which is usually not advisable
@@ -40,27 +43,27 @@
 // object through a pointer to std::unordered_multimap.
 class BindingHash : public std::unordered_multimap<std::string, Binding> {
  public:
-  typedef void (*DuplicateCallback)(const value_type& a,
-                                    const value_type& b,
-                                    void* user_data);
+  typedef std::function<void(const value_type&, const value_type&)>
+      DuplicateCallback;
 
-  void find_duplicates(DuplicateCallback callback, void* user_data) const;
+  void FindDuplicates(DuplicateCallback callback) const;
 
-  int find_index(const StringSlice& name) const {
+  Index FindIndex(const Var&) const;
+
+  Index FindIndex(const StringSlice& name) const {
     auto iter = find(string_slice_to_string(name));
     if (iter != end())
       return iter->second.index;
-    return -1;
+    return kInvalidIndex;
   }
 
  private:
   typedef std::vector<const value_type*> ValueTypeVector;
 
-  void create_duplicates_vector(ValueTypeVector* out_duplicates) const;
-  void sort_duplicates_vector_by_location(ValueTypeVector* duplicates) const;
-  void call_callbacks(const ValueTypeVector& duplicates,
-                      DuplicateCallback callback,
-                      void* user_data) const;
+  void CreateDuplicatesVector(ValueTypeVector* out_duplicates) const;
+  void SortDuplicatesVectorByLocation(ValueTypeVector* duplicates) const;
+  void CallCallbacks(const ValueTypeVector& duplicates,
+                     DuplicateCallback callback) const;
 };
 
 }  // namespace wabt
diff --git a/lib/wabt/src/common.cc b/lib/wabt/src/common.cc
index aca5b78..634d3a6 100644
--- a/lib/wabt/src/common.cc
+++ b/lib/wabt/src/common.cc
@@ -16,11 +16,11 @@
 
 #include "common.h"
 
-#include <assert.h>
-#include <stdio.h>
-#include <stdint.h>
-#include <string.h>
-#include <limits.h>
+#include <cassert>
+#include <climits>
+#include <cstdint>
+#include <cstdio>
+#include <cstring>
 
 #if COMPILER_IS_MSVC
 #include <fcntl.h>
@@ -31,55 +31,23 @@
 
 namespace wabt {
 
-Reloc::Reloc(RelocType type, size_t offset, uint32_t index, int32_t addend)
+Reloc::Reloc(RelocType type, Offset offset, Index index, int32_t addend)
     : type(type), offset(offset), index(index), addend(addend) {}
 
-OpcodeInfo g_opcode_info[kOpcodeCount];
-
-/* TODO(binji): It's annoying to have to have an initializer function, but it
- * seems to be necessary as g++ doesn't allow non-trival designated
- * initializers (e.g. [314] = "blah") */
-void init_opcode_info(void) {
-  static bool s_initialized = false;
-  if (!s_initialized) {
-#define V(rtype, type1, type2, mem_size, code, NAME, text) \
-  g_opcode_info[code].name = text;                         \
-  g_opcode_info[code].result_type = Type::rtype;           \
-  g_opcode_info[code].param1_type = Type::type1;           \
-  g_opcode_info[code].param2_type = Type::type2;           \
-  g_opcode_info[code].memory_size = mem_size;
-
-    WABT_FOREACH_OPCODE(V)
-
-#undef V
-  }
-}
-
-const char* g_kind_name[] = {"func", "table", "memory", "global"};
+const char* g_kind_name[] = {"func", "table", "memory", "global", "except"};
 WABT_STATIC_ASSERT(WABT_ARRAY_SIZE(g_kind_name) == kExternalKindCount);
 
 const char* g_reloc_type_name[] = {"R_FUNC_INDEX_LEB",
                                    "R_TABLE_INDEX_SLEB",
                                    "R_TABLE_INDEX_I32",
-                                   "R_MEMORY_ADDR_LEB",
-                                   "R_MEMORY_ADDR_SLEB",
-                                   "R_MEMORY_ADDR_I32",
+                                   "R_GLOBAL_ADDR_LEB",
+                                   "R_GLOBAL_ADDR_SLEB",
+                                   "R_GLOBAL_ADDR_I32",
                                    "R_TYPE_INDEX_LEB",
                                    "R_GLOBAL_INDEX_LEB",
                                    };
 WABT_STATIC_ASSERT(WABT_ARRAY_SIZE(g_reloc_type_name) == kRelocTypeCount);
 
-bool is_naturally_aligned(Opcode opcode, uint32_t alignment) {
-  uint32_t opcode_align = get_opcode_memory_size(opcode);
-  return alignment == WABT_USE_NATURAL_ALIGNMENT || alignment == opcode_align;
-}
-
-uint32_t get_opcode_alignment(Opcode opcode, uint32_t alignment) {
-  if (alignment == WABT_USE_NATURAL_ALIGNMENT)
-    return get_opcode_memory_size(opcode);
-  return alignment;
-}
-
 StringSlice empty_string_slice(void) {
   StringSlice result;
   result.start = "";
@@ -164,92 +132,6 @@
   return Result::Ok;
 }
 
-static void print_carets(FILE* out,
-                         size_t num_spaces,
-                         size_t num_carets,
-                         size_t max_line) {
-  /* print the caret */
-  char* carets = static_cast<char*>(alloca(max_line));
-  memset(carets, '^', max_line);
-  if (num_carets > max_line - num_spaces)
-    num_carets = max_line - num_spaces;
-  /* always print at least one caret */
-  if (num_carets == 0)
-    num_carets = 1;
-  fprintf(out, "%*s%.*s\n", static_cast<int>(num_spaces), "",
-          static_cast<int>(num_carets), carets);
-}
-
-static void print_source_error(FILE* out,
-                               const Location* loc,
-                               const char* error,
-                               const char* source_line,
-                               size_t source_line_length,
-                               size_t source_line_column_offset) {
-  fprintf(out, "%s:%d:%d: %s\n", loc->filename, loc->line, loc->first_column,
-          error);
-  if (source_line && source_line_length > 0) {
-    fprintf(out, "%s\n", source_line);
-    size_t num_spaces = (loc->first_column - 1) - source_line_column_offset;
-    size_t num_carets = loc->last_column - loc->first_column;
-    print_carets(out, num_spaces, num_carets, source_line_length);
-  }
-}
-
-static void print_error_header(FILE* out, DefaultErrorHandlerInfo* info) {
-  if (info && info->header) {
-    switch (info->print_header) {
-      case PrintErrorHeader::Never:
-        break;
-
-      case PrintErrorHeader::Once:
-        info->print_header = PrintErrorHeader::Never;
-      /* Fallthrough. */
-
-      case PrintErrorHeader::Always:
-        fprintf(out, "%s:\n", info->header);
-        break;
-    }
-    /* If there's a header, indent the following message. */
-    fprintf(out, "  ");
-  }
-}
-
-static FILE* get_default_error_handler_info_output_file(
-    DefaultErrorHandlerInfo* info) {
-  return info && info->out_file ? info->out_file : stderr;
-}
-
-bool default_source_error_callback(const Location* loc,
-                                   const char* error,
-                                   const char* source_line,
-                                   size_t source_line_length,
-                                   size_t source_line_column_offset,
-                                   void* user_data) {
-  DefaultErrorHandlerInfo* info =
-      static_cast<DefaultErrorHandlerInfo*>(user_data);
-  FILE* out = get_default_error_handler_info_output_file(info);
-  print_error_header(out, info);
-  print_source_error(out, loc, error, source_line, source_line_length,
-                     source_line_column_offset);
-  return true;
-}
-
-bool default_binary_error_callback(uint32_t offset,
-                                   const char* error,
-                                   void* user_data) {
-  DefaultErrorHandlerInfo* info =
-      static_cast<DefaultErrorHandlerInfo*>(user_data);
-  FILE* out = get_default_error_handler_info_output_file(info);
-  print_error_header(out, info);
-  if (offset == WABT_UNKNOWN_OFFSET)
-    fprintf(out, "error: %s\n", error);
-  else
-    fprintf(out, "error: @0x%08x: %s\n", offset, error);
-  fflush(out);
-  return true;
-}
-
 void init_stdio() {
 #if COMPILER_IS_MSVC
   int result = _setmode(_fileno(stdout), _O_BINARY);
diff --git a/lib/wabt/src/common.h b/lib/wabt/src/common.h
index 35e8435..3b4d5a5 100644
--- a/lib/wabt/src/common.h
+++ b/lib/wabt/src/common.h
@@ -17,14 +17,13 @@
 #ifndef WABT_COMMON_H_
 #define WABT_COMMON_H_
 
-#include <assert.h>
-#include <stdarg.h>
-#include <stddef.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
+#include <cassert>
+#include <cstdarg>
+#include <cstddef>
+#include <cstdint>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
 #include <string>
 #include <type_traits>
 #include <vector>
@@ -40,7 +39,6 @@
 
 #define WABT_USE(x) static_cast<void>(x)
 
-#define WABT_UNKNOWN_OFFSET (static_cast<uint32_t>(~0))
 #define WABT_PAGE_SIZE 0x10000 /* 64k */
 #define WABT_MAX_PAGES 0x10000 /* # of pages that fit in 32-bit address space */
 #define WABT_BYTES_TO_PAGES(x) ((x) >> 16)
@@ -73,15 +71,53 @@
   type(const type&) = delete;               \
   type& operator=(const type&) = delete;
 
+#if WITH_EXCEPTIONS
+#define WABT_TRY try {
+#define WABT_CATCH_BAD_ALLOC_AND_EXIT           \
+  }                                             \
+  catch (std::bad_alloc&) {                     \
+    WABT_FATAL("Memory allocation failure.\n"); \
+  }
+#else
+#define WABT_TRY
+#define WABT_CATCH_BAD_ALLOC_AND_EXIT
+#endif
+
+#define PRIindex "u"
+#define PRIaddress "u"
+#define PRIoffset PRIzx
+
 namespace wabt {
 
+typedef uint32_t Index;    // An index into one of the many index spaces.
+typedef uint32_t Address;  // An address or size in linear memory.
+typedef size_t Offset;     // An offset into a host's file or memory buffer.
+
+static const Address kInvalidAddress = ~0;
+static const Index kInvalidIndex = ~0;
+static const Offset kInvalidOffset = ~0;
+
 enum class Result {
   Ok,
   Error,
 };
 
-#define WABT_SUCCEEDED(x) ((x) == Result::Ok)
-#define WABT_FAILED(x) ((x) == Result::Error)
+#define WABT_SUCCEEDED(x) ((x) == ::wabt::Result::Ok)
+#define WABT_FAILED(x) ((x) == ::wabt::Result::Error)
+
+inline std::string WABT_PRINTF_FORMAT(1, 2)
+    string_printf(const char* format, ...) {
+  va_list args;
+  va_list args_copy;
+  va_start(args, format);
+  va_copy(args_copy, args);
+  size_t len = wabt_vsnprintf(nullptr, 0, format, args) + 1;  // For \0.
+  std::vector<char> buffer(len);
+  va_end(args);
+  wabt_vsnprintf(buffer.data(), len, format, args_copy);
+  va_end(args_copy);
+  return std::string(buffer.data(), len - 1);
+}
 
 enum class LabelType {
   Func,
@@ -107,55 +143,6 @@
   int last_column;
 };
 
-/* Returns true if the error was handled. */
-typedef bool (*SourceErrorCallback)(const Location*,
-                                    const char* error,
-                                    const char* source_line,
-                                    size_t source_line_length,
-                                    size_t source_line_column_offset,
-                                    void* user_data);
-
-struct SourceErrorHandler {
-  SourceErrorCallback on_error;
-  /* on_error will be called with with source_line trimmed to this length */
-  size_t source_line_max_length;
-  void* user_data;
-};
-
-#define WABT_SOURCE_LINE_MAX_LENGTH_DEFAULT 80
-#define WABT_SOURCE_ERROR_HANDLER_DEFAULT                               \
-  {                                                                     \
-    default_source_error_callback, WABT_SOURCE_LINE_MAX_LENGTH_DEFAULT, \
-        nullptr                                                         \
-  }
-
-/* Returns true if the error was handled. */
-typedef bool (*BinaryErrorCallback)(uint32_t offset,
-                                    const char* error,
-                                    void* user_data);
-
-struct BinaryErrorHandler {
-  BinaryErrorCallback on_error;
-  void* user_data;
-};
-
-#define WABT_BINARY_ERROR_HANDLER_DEFAULT \
-  { default_binary_error_callback, nullptr }
-
-/* This data structure is not required; it is just used by the default error
- * handler callbacks. */
-enum class PrintErrorHeader {
-  Never,
-  Once,
-  Always,
-};
-
-struct DefaultErrorHandlerInfo {
-  const char* header;
-  FILE* out_file;
-  PrintErrorHeader print_header;
-};
-
 /* matches binary format, do not change */
 enum class Type {
   I32 = -0x01,
@@ -165,7 +152,7 @@
   Anyfunc = -0x10,
   Func = -0x20,
   Void = -0x40,
-  ___ = Void, /* convenient for the opcode table below */
+  ___ = Void, /* convenient for the opcode table in opcode.h */
   Any = 0,    /* Not actually specified, but useful for type-checking */
 };
 typedef std::vector<Type> TypeVector;
@@ -174,9 +161,9 @@
   FuncIndexLEB = 0,   /* e.g. immediate of call instruction */
   TableIndexSLEB = 1, /* e.g. loading address of function */
   TableIndexI32 = 2,  /* e.g. function address in DATA */
-  MemoryAddressLEB = 3,
-  MemoryAddressSLEB = 4,
-  MemoryAddressI32 = 5,
+  GlobalAddressLEB = 3,
+  GlobalAddressSLEB = 4,
+  GlobalAddressI32 = 5,
   TypeIndexLEB = 6, /* e.g immediate type in call_indirect */
   GlobalIndexLEB = 7, /* e.g immediate of get_global inst */
 
@@ -186,11 +173,11 @@
 static const int kRelocTypeCount = WABT_ENUM_COUNT(RelocType);
 
 struct Reloc {
-  Reloc(RelocType, size_t offset, uint32_t index, int32_t addend = 0);
+  Reloc(RelocType, size_t offset, Index index, int32_t addend = 0);
 
   RelocType type;
   size_t offset;
-  uint32_t index;
+  Index index;
   int32_t addend;
 };
 
@@ -200,9 +187,10 @@
   Table = 1,
   Memory = 2,
   Global = 3,
+  Except = 4,
 
   First = Func,
-  Last = Global,
+  Last = Except,
 };
 static const int kExternalKindCount = WABT_ENUM_COUNT(ExternalKind);
 
@@ -214,209 +202,6 @@
 
 enum { WABT_USE_NATURAL_ALIGNMENT = 0xFFFFFFFF };
 
-/*
- *   tr: result type
- *   t1: type of the 1st parameter
- *   t2: type of the 2nd parameter
- *    m: memory size of the operation, if any
- * code: opcode
- * NAME: used to generate the opcode enum
- * text: a string of the opcode name in the AST format
- *
- *  tr  t1    t2   m  code  NAME text
- *  ============================ */
-#define WABT_FOREACH_OPCODE(V)                                        \
-  V(___, ___, ___, 0, 0x00, Unreachable, "unreachable")               \
-  V(___, ___, ___, 0, 0x01, Nop, "nop")                               \
-  V(___, ___, ___, 0, 0x02, Block, "block")                           \
-  V(___, ___, ___, 0, 0x03, Loop, "loop")                             \
-  V(___, ___, ___, 0, 0x04, If, "if")                                 \
-  V(___, ___, ___, 0, 0x05, Else, "else")                             \
-  V(___, ___, ___, 0, 0x0b, End, "end")                               \
-  V(___, ___, ___, 0, 0x0c, Br, "br")                                 \
-  V(___, ___, ___, 0, 0x0d, BrIf, "br_if")                            \
-  V(___, ___, ___, 0, 0x0e, BrTable, "br_table")                      \
-  V(___, ___, ___, 0, 0x0f, Return, "return")                         \
-  V(___, ___, ___, 0, 0x10, Call, "call")                             \
-  V(___, ___, ___, 0, 0x11, CallIndirect, "call_indirect")            \
-  V(___, ___, ___, 0, 0x1a, Drop, "drop")                             \
-  V(___, ___, ___, 0, 0x1b, Select, "select")                         \
-  V(___, ___, ___, 0, 0x20, GetLocal, "get_local")                    \
-  V(___, ___, ___, 0, 0x21, SetLocal, "set_local")                    \
-  V(___, ___, ___, 0, 0x22, TeeLocal, "tee_local")                    \
-  V(___, ___, ___, 0, 0x23, GetGlobal, "get_global")                  \
-  V(___, ___, ___, 0, 0x24, SetGlobal, "set_global")                  \
-  V(I32, I32, ___, 4, 0x28, I32Load, "i32.load")                      \
-  V(I64, I32, ___, 8, 0x29, I64Load, "i64.load")                      \
-  V(F32, I32, ___, 4, 0x2a, F32Load, "f32.load")                      \
-  V(F64, I32, ___, 8, 0x2b, F64Load, "f64.load")                      \
-  V(I32, I32, ___, 1, 0x2c, I32Load8S, "i32.load8_s")                 \
-  V(I32, I32, ___, 1, 0x2d, I32Load8U, "i32.load8_u")                 \
-  V(I32, I32, ___, 2, 0x2e, I32Load16S, "i32.load16_s")               \
-  V(I32, I32, ___, 2, 0x2f, I32Load16U, "i32.load16_u")               \
-  V(I64, I32, ___, 1, 0x30, I64Load8S, "i64.load8_s")                 \
-  V(I64, I32, ___, 1, 0x31, I64Load8U, "i64.load8_u")                 \
-  V(I64, I32, ___, 2, 0x32, I64Load16S, "i64.load16_s")               \
-  V(I64, I32, ___, 2, 0x33, I64Load16U, "i64.load16_u")               \
-  V(I64, I32, ___, 4, 0x34, I64Load32S, "i64.load32_s")               \
-  V(I64, I32, ___, 4, 0x35, I64Load32U, "i64.load32_u")               \
-  V(___, I32, I32, 4, 0x36, I32Store, "i32.store")                    \
-  V(___, I32, I64, 8, 0x37, I64Store, "i64.store")                    \
-  V(___, I32, F32, 4, 0x38, F32Store, "f32.store")                    \
-  V(___, I32, F64, 8, 0x39, F64Store, "f64.store")                    \
-  V(___, I32, I32, 1, 0x3a, I32Store8, "i32.store8")                  \
-  V(___, I32, I32, 2, 0x3b, I32Store16, "i32.store16")                \
-  V(___, I32, I64, 1, 0x3c, I64Store8, "i64.store8")                  \
-  V(___, I32, I64, 2, 0x3d, I64Store16, "i64.store16")                \
-  V(___, I32, I64, 4, 0x3e, I64Store32, "i64.store32")                \
-  V(I32, ___, ___, 0, 0x3f, CurrentMemory, "current_memory")          \
-  V(I32, I32, ___, 0, 0x40, GrowMemory, "grow_memory")                \
-  V(I32, ___, ___, 0, 0x41, I32Const, "i32.const")                    \
-  V(I64, ___, ___, 0, 0x42, I64Const, "i64.const")                    \
-  V(F32, ___, ___, 0, 0x43, F32Const, "f32.const")                    \
-  V(F64, ___, ___, 0, 0x44, F64Const, "f64.const")                    \
-  V(I32, I32, ___, 0, 0x45, I32Eqz, "i32.eqz")                        \
-  V(I32, I32, I32, 0, 0x46, I32Eq, "i32.eq")                          \
-  V(I32, I32, I32, 0, 0x47, I32Ne, "i32.ne")                          \
-  V(I32, I32, I32, 0, 0x48, I32LtS, "i32.lt_s")                       \
-  V(I32, I32, I32, 0, 0x49, I32LtU, "i32.lt_u")                       \
-  V(I32, I32, I32, 0, 0x4a, I32GtS, "i32.gt_s")                       \
-  V(I32, I32, I32, 0, 0x4b, I32GtU, "i32.gt_u")                       \
-  V(I32, I32, I32, 0, 0x4c, I32LeS, "i32.le_s")                       \
-  V(I32, I32, I32, 0, 0x4d, I32LeU, "i32.le_u")                       \
-  V(I32, I32, I32, 0, 0x4e, I32GeS, "i32.ge_s")                       \
-  V(I32, I32, I32, 0, 0x4f, I32GeU, "i32.ge_u")                       \
-  V(I32, I64, ___, 0, 0x50, I64Eqz, "i64.eqz")                        \
-  V(I32, I64, I64, 0, 0x51, I64Eq, "i64.eq")                          \
-  V(I32, I64, I64, 0, 0x52, I64Ne, "i64.ne")                          \
-  V(I32, I64, I64, 0, 0x53, I64LtS, "i64.lt_s")                       \
-  V(I32, I64, I64, 0, 0x54, I64LtU, "i64.lt_u")                       \
-  V(I32, I64, I64, 0, 0x55, I64GtS, "i64.gt_s")                       \
-  V(I32, I64, I64, 0, 0x56, I64GtU, "i64.gt_u")                       \
-  V(I32, I64, I64, 0, 0x57, I64LeS, "i64.le_s")                       \
-  V(I32, I64, I64, 0, 0x58, I64LeU, "i64.le_u")                       \
-  V(I32, I64, I64, 0, 0x59, I64GeS, "i64.ge_s")                       \
-  V(I32, I64, I64, 0, 0x5a, I64GeU, "i64.ge_u")                       \
-  V(I32, F32, F32, 0, 0x5b, F32Eq, "f32.eq")                          \
-  V(I32, F32, F32, 0, 0x5c, F32Ne, "f32.ne")                          \
-  V(I32, F32, F32, 0, 0x5d, F32Lt, "f32.lt")                          \
-  V(I32, F32, F32, 0, 0x5e, F32Gt, "f32.gt")                          \
-  V(I32, F32, F32, 0, 0x5f, F32Le, "f32.le")                          \
-  V(I32, F32, F32, 0, 0x60, F32Ge, "f32.ge")                          \
-  V(I32, F64, F64, 0, 0x61, F64Eq, "f64.eq")                          \
-  V(I32, F64, F64, 0, 0x62, F64Ne, "f64.ne")                          \
-  V(I32, F64, F64, 0, 0x63, F64Lt, "f64.lt")                          \
-  V(I32, F64, F64, 0, 0x64, F64Gt, "f64.gt")                          \
-  V(I32, F64, F64, 0, 0x65, F64Le, "f64.le")                          \
-  V(I32, F64, F64, 0, 0x66, F64Ge, "f64.ge")                          \
-  V(I32, I32, ___, 0, 0x67, I32Clz, "i32.clz")                        \
-  V(I32, I32, ___, 0, 0x68, I32Ctz, "i32.ctz")                        \
-  V(I32, I32, ___, 0, 0x69, I32Popcnt, "i32.popcnt")                  \
-  V(I32, I32, I32, 0, 0x6a, I32Add, "i32.add")                        \
-  V(I32, I32, I32, 0, 0x6b, I32Sub, "i32.sub")                        \
-  V(I32, I32, I32, 0, 0x6c, I32Mul, "i32.mul")                        \
-  V(I32, I32, I32, 0, 0x6d, I32DivS, "i32.div_s")                     \
-  V(I32, I32, I32, 0, 0x6e, I32DivU, "i32.div_u")                     \
-  V(I32, I32, I32, 0, 0x6f, I32RemS, "i32.rem_s")                     \
-  V(I32, I32, I32, 0, 0x70, I32RemU, "i32.rem_u")                     \
-  V(I32, I32, I32, 0, 0x71, I32And, "i32.and")                        \
-  V(I32, I32, I32, 0, 0x72, I32Or, "i32.or")                          \
-  V(I32, I32, I32, 0, 0x73, I32Xor, "i32.xor")                        \
-  V(I32, I32, I32, 0, 0x74, I32Shl, "i32.shl")                        \
-  V(I32, I32, I32, 0, 0x75, I32ShrS, "i32.shr_s")                     \
-  V(I32, I32, I32, 0, 0x76, I32ShrU, "i32.shr_u")                     \
-  V(I32, I32, I32, 0, 0x77, I32Rotl, "i32.rotl")                      \
-  V(I32, I32, I32, 0, 0x78, I32Rotr, "i32.rotr")                      \
-  V(I64, I64, I64, 0, 0x79, I64Clz, "i64.clz")                        \
-  V(I64, I64, I64, 0, 0x7a, I64Ctz, "i64.ctz")                        \
-  V(I64, I64, I64, 0, 0x7b, I64Popcnt, "i64.popcnt")                  \
-  V(I64, I64, I64, 0, 0x7c, I64Add, "i64.add")                        \
-  V(I64, I64, I64, 0, 0x7d, I64Sub, "i64.sub")                        \
-  V(I64, I64, I64, 0, 0x7e, I64Mul, "i64.mul")                        \
-  V(I64, I64, I64, 0, 0x7f, I64DivS, "i64.div_s")                     \
-  V(I64, I64, I64, 0, 0x80, I64DivU, "i64.div_u")                     \
-  V(I64, I64, I64, 0, 0x81, I64RemS, "i64.rem_s")                     \
-  V(I64, I64, I64, 0, 0x82, I64RemU, "i64.rem_u")                     \
-  V(I64, I64, I64, 0, 0x83, I64And, "i64.and")                        \
-  V(I64, I64, I64, 0, 0x84, I64Or, "i64.or")                          \
-  V(I64, I64, I64, 0, 0x85, I64Xor, "i64.xor")                        \
-  V(I64, I64, I64, 0, 0x86, I64Shl, "i64.shl")                        \
-  V(I64, I64, I64, 0, 0x87, I64ShrS, "i64.shr_s")                     \
-  V(I64, I64, I64, 0, 0x88, I64ShrU, "i64.shr_u")                     \
-  V(I64, I64, I64, 0, 0x89, I64Rotl, "i64.rotl")                      \
-  V(I64, I64, I64, 0, 0x8a, I64Rotr, "i64.rotr")                      \
-  V(F32, F32, F32, 0, 0x8b, F32Abs, "f32.abs")                        \
-  V(F32, F32, F32, 0, 0x8c, F32Neg, "f32.neg")                        \
-  V(F32, F32, F32, 0, 0x8d, F32Ceil, "f32.ceil")                      \
-  V(F32, F32, F32, 0, 0x8e, F32Floor, "f32.floor")                    \
-  V(F32, F32, F32, 0, 0x8f, F32Trunc, "f32.trunc")                    \
-  V(F32, F32, F32, 0, 0x90, F32Nearest, "f32.nearest")                \
-  V(F32, F32, F32, 0, 0x91, F32Sqrt, "f32.sqrt")                      \
-  V(F32, F32, F32, 0, 0x92, F32Add, "f32.add")                        \
-  V(F32, F32, F32, 0, 0x93, F32Sub, "f32.sub")                        \
-  V(F32, F32, F32, 0, 0x94, F32Mul, "f32.mul")                        \
-  V(F32, F32, F32, 0, 0x95, F32Div, "f32.div")                        \
-  V(F32, F32, F32, 0, 0x96, F32Min, "f32.min")                        \
-  V(F32, F32, F32, 0, 0x97, F32Max, "f32.max")                        \
-  V(F32, F32, F32, 0, 0x98, F32Copysign, "f32.copysign")              \
-  V(F64, F64, F64, 0, 0x99, F64Abs, "f64.abs")                        \
-  V(F64, F64, F64, 0, 0x9a, F64Neg, "f64.neg")                        \
-  V(F64, F64, F64, 0, 0x9b, F64Ceil, "f64.ceil")                      \
-  V(F64, F64, F64, 0, 0x9c, F64Floor, "f64.floor")                    \
-  V(F64, F64, F64, 0, 0x9d, F64Trunc, "f64.trunc")                    \
-  V(F64, F64, F64, 0, 0x9e, F64Nearest, "f64.nearest")                \
-  V(F64, F64, F64, 0, 0x9f, F64Sqrt, "f64.sqrt")                      \
-  V(F64, F64, F64, 0, 0xa0, F64Add, "f64.add")                        \
-  V(F64, F64, F64, 0, 0xa1, F64Sub, "f64.sub")                        \
-  V(F64, F64, F64, 0, 0xa2, F64Mul, "f64.mul")                        \
-  V(F64, F64, F64, 0, 0xa3, F64Div, "f64.div")                        \
-  V(F64, F64, F64, 0, 0xa4, F64Min, "f64.min")                        \
-  V(F64, F64, F64, 0, 0xa5, F64Max, "f64.max")                        \
-  V(F64, F64, F64, 0, 0xa6, F64Copysign, "f64.copysign")              \
-  V(I32, I64, ___, 0, 0xa7, I32WrapI64, "i32.wrap/i64")               \
-  V(I32, F32, ___, 0, 0xa8, I32TruncSF32, "i32.trunc_s/f32")          \
-  V(I32, F32, ___, 0, 0xa9, I32TruncUF32, "i32.trunc_u/f32")          \
-  V(I32, F64, ___, 0, 0xaa, I32TruncSF64, "i32.trunc_s/f64")          \
-  V(I32, F64, ___, 0, 0xab, I32TruncUF64, "i32.trunc_u/f64")          \
-  V(I64, I32, ___, 0, 0xac, I64ExtendSI32, "i64.extend_s/i32")        \
-  V(I64, I32, ___, 0, 0xad, I64ExtendUI32, "i64.extend_u/i32")        \
-  V(I64, F32, ___, 0, 0xae, I64TruncSF32, "i64.trunc_s/f32")          \
-  V(I64, F32, ___, 0, 0xaf, I64TruncUF32, "i64.trunc_u/f32")          \
-  V(I64, F64, ___, 0, 0xb0, I64TruncSF64, "i64.trunc_s/f64")          \
-  V(I64, F64, ___, 0, 0xb1, I64TruncUF64, "i64.trunc_u/f64")          \
-  V(F32, I32, ___, 0, 0xb2, F32ConvertSI32, "f32.convert_s/i32")      \
-  V(F32, I32, ___, 0, 0xb3, F32ConvertUI32, "f32.convert_u/i32")      \
-  V(F32, I64, ___, 0, 0xb4, F32ConvertSI64, "f32.convert_s/i64")      \
-  V(F32, I64, ___, 0, 0xb5, F32ConvertUI64, "f32.convert_u/i64")      \
-  V(F32, F64, ___, 0, 0xb6, F32DemoteF64, "f32.demote/f64")           \
-  V(F64, I32, ___, 0, 0xb7, F64ConvertSI32, "f64.convert_s/i32")      \
-  V(F64, I32, ___, 0, 0xb8, F64ConvertUI32, "f64.convert_u/i32")      \
-  V(F64, I64, ___, 0, 0xb9, F64ConvertSI64, "f64.convert_s/i64")      \
-  V(F64, I64, ___, 0, 0xba, F64ConvertUI64, "f64.convert_u/i64")      \
-  V(F64, F32, ___, 0, 0xbb, F64PromoteF32, "f64.promote/f32")         \
-  V(I32, F32, ___, 0, 0xbc, I32ReinterpretF32, "i32.reinterpret/f32") \
-  V(I64, F64, ___, 0, 0xbd, I64ReinterpretF64, "i64.reinterpret/f64") \
-  V(F32, I32, ___, 0, 0xbe, F32ReinterpretI32, "f32.reinterpret/i32") \
-  V(F64, I64, ___, 0, 0xbf, F64ReinterpretI64, "f64.reinterpret/i64")
-
-enum class Opcode {
-#define V(rtype, type1, type2, mem_size, code, Name, text) Name = code,
-  WABT_FOREACH_OPCODE(V)
-#undef V
-
-      First = Unreachable,
-  Last = F64ReinterpretI64,
-};
-static const int kOpcodeCount = WABT_ENUM_COUNT(Opcode);
-
-struct OpcodeInfo {
-  const char* name;
-  Type result_type;
-  Type param1_type;
-  Type param2_type;
-  int memory_size;
-};
-
 enum class LiteralType {
   Int,
   Float,
@@ -451,19 +236,13 @@
 
 static WABT_INLINE StringSlice dup_string_slice(StringSlice str) {
   StringSlice result;
-  result.start = wabt_strndup(str.start, str.length);
+  char* new_data = new char[str.length];
+  memcpy(new_data, str.start, str.length);
+  result.start = new_data;
   result.length = str.length;
   return result;
 }
 
-/* return 1 if |alignment| matches the alignment of |opcode|, or if |alignment|
- * is WABT_USE_NATURAL_ALIGNMENT */
-bool is_naturally_aligned(Opcode opcode, uint32_t alignment);
-
-/* if |alignment| is WABT_USE_NATURAL_ALIGNMENT, return the alignment of
- * |opcode|, else return |alignment| */
-uint32_t get_opcode_alignment(Opcode opcode, uint32_t alignment);
-
 StringSlice empty_string_slice(void);
 bool string_slice_eq_cstr(const StringSlice* s1, const char* s2);
 bool string_slice_startswith(const StringSlice* s1, const char* s2);
@@ -484,53 +263,8 @@
   return ss;
 }
 
-bool default_source_error_callback(const Location*,
-                                   const char* error,
-                                   const char* source_line,
-                                   size_t source_line_length,
-                                   size_t source_line_column_offset,
-                                   void* user_data);
-
-bool default_binary_error_callback(uint32_t offset,
-                                   const char* error,
-                                   void* user_data);
-
 void init_stdio();
 
-/* opcode info */
-extern OpcodeInfo g_opcode_info[];
-void init_opcode_info(void);
-
-static WABT_INLINE const char* get_opcode_name(Opcode opcode) {
-  assert(static_cast<int>(opcode) < kOpcodeCount);
-  init_opcode_info();
-  return g_opcode_info[static_cast<size_t>(opcode)].name;
-}
-
-static WABT_INLINE Type get_opcode_result_type(Opcode opcode) {
-  assert(static_cast<int>(opcode) < kOpcodeCount);
-  init_opcode_info();
-  return g_opcode_info[static_cast<size_t>(opcode)].result_type;
-}
-
-static WABT_INLINE Type get_opcode_param_type_1(Opcode opcode) {
-  assert(static_cast<int>(opcode) < kOpcodeCount);
-  init_opcode_info();
-  return g_opcode_info[static_cast<size_t>(opcode)].param1_type;
-}
-
-static WABT_INLINE Type get_opcode_param_type_2(Opcode opcode) {
-  assert(static_cast<int>(opcode) < kOpcodeCount);
-  init_opcode_info();
-  return g_opcode_info[static_cast<size_t>(opcode)].param2_type;
-}
-
-static WABT_INLINE int get_opcode_memory_size(Opcode opcode) {
-  assert(static_cast<int>(opcode) < kOpcodeCount);
-  init_opcode_info();
-  return g_opcode_info[static_cast<size_t>(opcode)].memory_size;
-}
-
 /* external kind */
 
 extern const char* g_kind_name[];
diff --git a/lib/wabt/src/config.cc b/lib/wabt/src/config.cc
index e9dc087..34ebd3d 100644
--- a/lib/wabt/src/config.cc
+++ b/lib/wabt/src/config.cc
@@ -16,8 +16,8 @@
 
 #include "config.h"
 
-#include <stdarg.h>
-#include <stdio.h>
+#include <cstdarg>
+#include <cstdio>
 
 /* c99-style vsnprintf for MSVC < 2015. See http://stackoverflow.com/a/8712996
  using _snprintf or vsnprintf will not-properly null-terminate, and will return
diff --git a/lib/wabt/src/config.h.in b/lib/wabt/src/config.h.in
index 453e798..b2dc04b 100644
--- a/lib/wabt/src/config.h.in
+++ b/lib/wabt/src/config.h.in
@@ -41,6 +41,8 @@
 #cmakedefine01 COMPILER_IS_GNU
 #cmakedefine01 COMPILER_IS_MSVC
 
+#cmakedefine01 WITH_EXCEPTIONS
+
 #define SIZEOF_SIZE_T @SIZEOF_SIZE_T@
 #define SIZEOF_INT @SIZEOF_INT@
 #define SIZEOF_LONG @SIZEOF_LONG@
@@ -119,8 +121,8 @@
 
 #elif COMPILER_IS_MSVC
 
+#include <cstring>
 #include <intrin.h>
-#include <string.h>
 
 #define WABT_UNUSED
 #define WABT_WARN_UNUSED _Check_return_
@@ -240,7 +242,7 @@
 #define wabt_snprintf snprintf
 #elif COMPILER_IS_MSVC
 /* can't just use _snprintf because it doesn't always null terminate */
-#include <stdarg.h>
+#include <cstdarg>
 int wabt_snprintf(char* str, size_t size, const char* format, ...);
 #else
 #error no snprintf
@@ -265,4 +267,35 @@
 #endif
 #endif
 
+#if COMPILER_IS_MSVC && defined(_M_X64)
+// MSVC on x64 generates uint64 -> float conversions but doesn't do
+// round-to-nearest-ties-to-even, which is required by WebAssembly.
+#include <emmintrin.h>
+__inline double wabt_convert_uint64_to_double(unsigned __int64 x) {
+  __m128d result = _mm_setzero_pd();
+  if (x & 0x8000000000000000ULL) {
+    result = _mm_cvtsi64_sd(result, (x >> 1) | (x & 1));
+    result = _mm_add_sd(result, result);
+  } else {
+    result = _mm_cvtsi64_sd(result, x);
+  }
+  return _mm_cvtsd_f64(result);
+}
+
+__inline float wabt_convert_uint64_to_float(unsigned __int64 x) {
+  __m128 result = _mm_setzero_ps();
+  if (x & 0x8000000000000000ULL) {
+    result = _mm_cvtsi64_ss(result, (x >> 1) | (x & 1));
+    result = _mm_add_ss(result, result);
+  } else {
+    result = _mm_cvtsi64_ss(result, x);
+  }
+  return _mm_cvtss_f32(result);
+}
+
+#else
+#define wabt_convert_uint64_to_double(x) static_cast<double>(x)
+#define wabt_convert_uint64_to_float(x) static_cast<float>(x)
+#endif
+
 #endif /* WABT_CONFIG_H_ */
diff --git a/lib/wabt/src/emscripten-exported.json b/lib/wabt/src/emscripten-exported.json
index 43f4dff..6c0ed71 100644
--- a/lib/wabt/src/emscripten-exported.json
+++ b/lib/wabt/src/emscripten-exported.json
@@ -1,223 +1,37 @@
-["_wabt_append_element",
-"_wabt_append_host_module",
-"_wabt_append_implicit_func_type",
-"_wabt_append_module_field",
-"_wabt_apply_names",
-"_wabt_ast_format_error",
-"_wabt_ast_lexer_get_source_line",
-"_wabt_ast_lexer_lex",
-"_wabt_ast_parser_error",
-"_wabt_ast_parser_parse",
-"_wabt_call_host",
-"_wabt_close_file_writer",
-"_wabt_close_mem_writer",
-"_wabt_default_binary_error_callback",
-"_wabt_default_source_error_callback",
-"_wabt_destroy_action",
-"_wabt_destroy_ast_lexer",
-"_wabt_destroy_binding_hash",
-"_wabt_destroy_block",
-"_wabt_destroy_command",
-"_wabt_destroy_command_vector_and_elements",
-"_wabt_destroy_data_segment",
-"_wabt_destroy_elem_segment",
-"_wabt_destroy_export",
-"_wabt_destroy_exported_func",
-"_wabt_destroy_exported_memory",
-"_wabt_destroy_exported_table",
-"_wabt_destroy_expr",
-"_wabt_destroy_expr_list",
-"_wabt_destroy_func",
-"_wabt_destroy_func_declaration",
-"_wabt_destroy_func_fields",
-"_wabt_destroy_func_signature",
-"_wabt_destroy_func_type",
-"_wabt_destroy_global",
-"_wabt_destroy_import",
-"_wabt_destroy_interpreter_environment",
-"_wabt_destroy_interpreter_thread",
-"_wabt_destroy_memory",
+[
+"_malloc",
+"_wabt_apply_names_module",
+"_wabt_binary_error_handler_buffer_get_data",
+"_wabt_binary_error_handler_buffer_get_size",
+"_wabt_destroy_binary_error_handler_buffer",
 "_wabt_destroy_module",
-"_wabt_destroy_optional_export",
 "_wabt_destroy_output_buffer",
-"_wabt_destroy_raw_module",
-"_wabt_destroy_reloc_section",
+"_wabt_destroy_parse_wast_result",
+"_wabt_destroy_read_binary_result",
 "_wabt_destroy_script",
-"_wabt_destroy_string_slice",
-"_wabt_destroy_table",
-"_wabt_destroy_text_list",
-"_wabt_destroy_var",
-"_wabt_destroy_var_vector_and_elements",
-"_wabt_disassemble",
-"_wabt_disassemble_module",
-"_wabt_empty_string_slice",
-"_wabt_ensure_capacity",
-"_wabt_extend_elements",
-"_wabt_find_binding_index_by_name",
-"_wabt_find_duplicate_bindings",
-"_wabt_func_signatures_are_equal",
-"_wabt_generate_names",
-"_wabt_get_export_by_name",
+"_wabt_destroy_source_error_handler_buffer",
+"_wabt_destroy_wast_lexer",
+"_wabt_destroy_write_module_result",
+"_wabt_generate_names_module",
 "_wabt_get_first_module",
-"_wabt_get_func_by_var",
-"_wabt_get_func_index_by_var",
-"_wabt_get_func_type_by_var",
-"_wabt_get_func_type_index_by_decl",
-"_wabt_get_func_type_index_by_sig",
-"_wabt_get_func_type_index_by_var",
-"_wabt_get_global_by_var",
-"_wabt_get_global_index_by_var",
-"_wabt_get_index_from_var",
-"_wabt_get_interpreter_export_by_name",
-"_wabt_get_local_index_by_var",
-"_wabt_get_memory_by_var",
-"_wabt_get_memory_index_by_var",
-"_wabt_get_module_by_var",
-"_wabt_get_module_index_by_var",
-"_wabt_get_opcode_alignment",
-"_wabt_get_table_by_var",
-"_wabt_get_table_index_by_var",
-"_wabt_hash_entry_is_free",
-"_wabt_init_file_stream_from_existing",
-"_wabt_init_file_writer",
-"_wabt_init_file_writer_existing",
-"_wabt_init_interpreter_environment",
-"_wabt_init_interpreter_thread",
-"_wabt_init_mem_writer",
-"_wabt_init_mem_writer_existing",
-"_wabt_init_output_buffer",
-"_wabt_init_stderr_stream",
-"_wabt_init_stdio",
-"_wabt_init_stdout_stream",
-"_wabt_init_stream",
-"_wabt_insert_binding",
-"_wabt_is_nan_f32",
-"_wabt_is_nan_f64",
-"_wabt_is_naturally_aligned",
-"_wabt_make_type_binding_reverse_mapping",
-"_wabt_mark_interpreter_environment",
-"_wabt_move_data",
-"_wabt_new_ast_buffer_lexer",
-"_wabt_new_ast_file_lexer",
-"_wabt_new_binary_expr",
-"_wabt_new_block_expr",
-"_wabt_new_br_expr",
-"_wabt_new_br_if_expr",
-"_wabt_new_br_table_expr",
-"_wabt_new_call_expr",
-"_wabt_new_call_indirect_expr",
-"_wabt_new_compare_expr",
-"_wabt_new_const_expr",
-"_wabt_new_convert_expr",
-"_wabt_new_current_memory_expr",
-"_wabt_new_drop_expr",
-"_wabt_new_empty_expr",
-"_wabt_new_get_global_expr",
-"_wabt_new_get_local_expr",
-"_wabt_new_grow_memory_expr",
-"_wabt_new_if_expr",
-"_wabt_new_load_expr",
-"_wabt_new_loop_expr",
-"_wabt_new_nop_expr",
-"_wabt_new_return_expr",
-"_wabt_new_select_expr",
-"_wabt_new_set_global_expr",
-"_wabt_new_set_local_expr",
-"_wabt_new_store_expr",
-"_wabt_new_tee_local_expr",
-"_wabt_new_unary_expr",
-"_wabt_new_unreachable_expr",
-"_wabt_offsetof_binary_error_handler_on_error",
-"_wabt_offsetof_binary_error_handler_user_data",
-"_wabt_offsetof_location_filename",
-"_wabt_offsetof_location_first_column",
-"_wabt_offsetof_location_last_column",
-"_wabt_offsetof_location_line",
-"_wabt_offsetof_memory_writer_base",
-"_wabt_offsetof_memory_writer_buf",
-"_wabt_offsetof_output_buffer_capacity",
-"_wabt_offsetof_output_buffer_size",
-"_wabt_offsetof_output_buffer_start",
-"_wabt_offsetof_read_binary_options_read_debug_names",
-"_wabt_offsetof_source_error_handler_on_error",
-"_wabt_offsetof_source_error_handler_source_line_max_length",
-"_wabt_offsetof_source_error_handler_user_data",
-"_wabt_offsetof_stream_log_stream",
-"_wabt_offsetof_stream_offset",
-"_wabt_offsetof_stream_result",
-"_wabt_offsetof_stream_writer",
-"_wabt_offsetof_string_slice_length",
-"_wabt_offsetof_string_slice_start",
-"_wabt_offsetof_write_binary_options_canonicalize_lebs",
-"_wabt_offsetof_write_binary_options_log_stream",
-"_wabt_offsetof_write_binary_options_write_debug_names",
-"_wabt_offsetof_writer_move_data",
-"_wabt_offsetof_writer_write_data",
-"_wabt_parse_ast",
-"_wabt_parse_double",
-"_wabt_parse_float",
-"_wabt_parse_hexdigit",
-"_wabt_parse_int32",
-"_wabt_parse_int64",
-"_wabt_parse_options",
-"_wabt_parse_uint64",
-"_wabt_print_help",
-"_wabt_push_thread_value",
+"_wabt_new_binary_error_handler_buffer",
+"_wabt_new_source_error_handler_buffer",
+"_wabt_new_wast_buffer_lexer",
+"_wabt_output_buffer_get_data",
+"_wabt_output_buffer_get_size",
+"_wabt_parse_wast",
+"_wabt_parse_wast_result_get_result",
+"_wabt_parse_wast_result_release_script",
 "_wabt_read_binary",
-"_wabt_read_binary_ast",
-"_wabt_read_binary_interpreter",
-"_wabt_read_file",
-"_wabt_read_i32_leb128",
-"_wabt_read_u32_leb128",
-"_wabt_remove_binding",
-"_wabt_reset_interpreter_environment_to_mark",
-"_wabt_resize_vector",
-"_wabt_resolve_names_module",
+"_wabt_read_binary_result_get_result",
+"_wabt_read_binary_result_release_module",
 "_wabt_resolve_names_script",
-"_wabt_run_interpreter",
-"_wabt_sizeof_binary_error_handler",
-"_wabt_sizeof_location",
-"_wabt_sizeof_memory_writer",
-"_wabt_sizeof_module",
-"_wabt_sizeof_output_buffer",
-"_wabt_sizeof_read_binary_options",
-"_wabt_sizeof_script",
-"_wabt_sizeof_source_error_handler",
-"_wabt_sizeof_stream",
-"_wabt_sizeof_string_slice",
-"_wabt_sizeof_write_binary_options",
-"_wabt_sizeof_writer",
-"_wabt_steal_mem_writer_output_buffer",
-"_wabt_string_slice_eq_cstr",
-"_wabt_string_slice_from_cstr",
-"_wabt_string_slice_is_empty",
-"_wabt_string_slice_startswith",
-"_wabt_string_slices_are_equal",
-"_wabt_trace_pc",
-"_wabt_u32_leb128_length",
+"_wabt_source_error_handler_buffer_get_data",
+"_wabt_source_error_handler_buffer_get_size",
 "_wabt_validate_script",
-"_wabt_visit_expr_list",
-"_wabt_visit_func",
-"_wabt_write_ast",
 "_wabt_write_binary_module",
-"_wabt_write_binary_spec_script",
-"_wabt_write_data",
-"_wabt_write_data_at",
-"_wabt_write_double_hex",
-"_wabt_write_fixed_u32_leb128",
-"_wabt_write_fixed_u32_leb128_at",
-"_wabt_write_fixed_u32_leb128_raw",
-"_wabt_write_float_hex",
-"_wabt_write_i32_leb128",
-"_wabt_write_limits",
-"_wabt_write_memory_dump",
-"_wabt_write_opcode",
-"_wabt_write_output_buffer_to_file",
-"_wabt_write_str",
-"_wabt_write_type",
-"_wabt_write_u32",
-"_wabt_write_u32_leb128",
-"_wabt_write_u32_leb128_at",
-"_wabt_write_u64",
-"_wabt_write_u8",
-"_wabt_writef"]
+"_wabt_write_module_result_get_result",
+"_wabt_write_module_result_release_log_output_buffer",
+"_wabt_write_module_result_release_output_buffer",
+"_wabt_write_text_module"
+]
diff --git a/lib/wabt/src/emscripten-helpers.cc b/lib/wabt/src/emscripten-helpers.cc
index 4e8d92f..6bf63fa 100644
--- a/lib/wabt/src/emscripten-helpers.cc
+++ b/lib/wabt/src/emscripten-helpers.cc
@@ -17,99 +17,265 @@
 #ifndef WABT_EMSCRIPTEN_HELPERS_H_
 #define WABT_EMSCRIPTEN_HELPERS_H_
 
-#include <stddef.h>
+#include <cstddef>
 
-#include "ast.h"
+#include <memory>
+
+#include "apply-names.h"
 #include "binary-reader.h"
+#include "binary-reader-ir.h"
 #include "binary-writer.h"
+#include "binary-error-handler.h"
 #include "common.h"
+#include "ir.h"
+#include "generate-names.h"
+#include "resolve-names.h"
+#include "source-error-handler.h"
 #include "stream.h"
+#include "validator.h"
+#include "wast-lexer.h"
+#include "wast-parser.h"
+#include "wat-writer.h"
 #include "writer.h"
 
-/* TODO(binji): it would be nicer to generate this as static data, but it's not
- * currently easy to do. Maybe use LLVM's python bindings for this? */
+struct WabtParseWastResult {
+  wabt::Result result;
+  std::unique_ptr<wabt::Script> script;
+};
 
-#define DEFINE_SIZEOF(Name, name) \
-  size_t wabt_sizeof_##name(void) { return sizeof(Name); }
+struct WabtReadBinaryResult {
+  wabt::Result result;
+  std::unique_ptr<wabt::Module> module;
+};
 
-#define DEFINE_OFFSETOF(Name, name, member)      \
-  size_t wabt_offsetof_##name##_##member(void) { \
-    return offsetof(Name, member);               \
+struct WabtWriteModuleResult {
+  wabt::Result result;
+  std::unique_ptr<wabt::OutputBuffer> buffer;
+  std::unique_ptr<wabt::OutputBuffer> log_buffer;
+};
+
+extern "C" {
+
+wabt::WastLexer* wabt_new_wast_buffer_lexer(const char* filename,
+                                            const void* data,
+                                            size_t size) {
+  std::unique_ptr<wabt::WastLexer> lexer =
+      wabt::WastLexer::CreateBufferLexer(filename, data, size);
+  return lexer.release();
+}
+
+WabtParseWastResult* wabt_parse_wast(
+    wabt::WastLexer* lexer,
+    wabt::SourceErrorHandlerBuffer* error_handler) {
+  WabtParseWastResult* result = new WabtParseWastResult();
+  wabt::Script* script = nullptr;
+  result->result = wabt::parse_wast(lexer, &script, error_handler);
+  result->script.reset(script);
+  return result;
+}
+
+WabtReadBinaryResult* wabt_read_binary(
+    const void* data,
+    size_t size,
+    int read_debug_names,
+    wabt::BinaryErrorHandlerBuffer* error_handler) {
+  wabt::ReadBinaryOptions options;
+  options.log_stream = nullptr;
+  options.read_debug_names = read_debug_names;
+
+  WabtReadBinaryResult* result = new WabtReadBinaryResult();
+  wabt::Module* module = new wabt::Module();
+  result->result =
+      wabt::read_binary_ir(data, size, &options, error_handler, module);
+  result->module.reset(module);
+  return result;
+}
+
+wabt::Result wabt_resolve_names_script(
+    wabt::WastLexer* lexer,
+    wabt::Script* script,
+    wabt::SourceErrorHandlerBuffer* error_handler) {
+  return resolve_names_script(lexer, script, error_handler);
+}
+
+wabt::Result wabt_resolve_names_module(
+    wabt::WastLexer* lexer,
+    wabt::Module* module,
+    wabt::SourceErrorHandlerBuffer* error_handler) {
+  return resolve_names_module(lexer, module, error_handler);
+}
+
+wabt::Result wabt_validate_script(
+    wabt::WastLexer* lexer,
+    wabt::Script* script,
+    wabt::SourceErrorHandlerBuffer* error_handler) {
+  return validate_script(lexer, script, error_handler);
+}
+
+wabt::Result wabt_apply_names_module(wabt::Module* module) {
+  return apply_names(module);
+}
+
+wabt::Result wabt_generate_names_module(wabt::Module* module) {
+  return generate_names(module);
+}
+
+wabt::Module* wabt_get_first_module(wabt::Script* script) {
+  return script->GetFirstModule();
+}
+
+WabtWriteModuleResult* wabt_write_binary_module(wabt::Module* module,
+                                                int log,
+                                                int canonicalize_lebs,
+                                                int relocatable,
+                                                int write_debug_names) {
+  wabt::MemoryStream stream;
+  wabt::WriteBinaryOptions options;
+  options.log_stream = log ? &stream : nullptr;
+  options.canonicalize_lebs = canonicalize_lebs;
+  options.relocatable = relocatable;
+  options.write_debug_names = write_debug_names;
+
+  wabt::MemoryWriter writer;
+  WabtWriteModuleResult* result = new WabtWriteModuleResult();
+  result->result = write_binary_module(&writer, module, &options);
+  if (result->result == wabt::Result::Ok) {
+    result->buffer = writer.ReleaseOutputBuffer();
+    result->log_buffer = log ? stream.ReleaseOutputBuffer() : nullptr;
   }
+  return result;
+}
 
-/* See http://stackoverflow.com/a/1872506 */
-#define CONCAT(a, b) CONCAT_(a, b)
-#define CONCAT_(a, b) CONCAT__(a, b)
-#define CONCAT__(a, b) a##b
-#define FOREACH_1(m, S, s, x, ...) m(S, s, x)
-#define FOREACH_2(m, S, s, x, ...) m(S, s, x) FOREACH_1(m, S, s, __VA_ARGS__)
-#define FOREACH_3(m, S, s, x, ...) m(S, s, x) FOREACH_2(m, S, s, __VA_ARGS__)
-#define FOREACH_4(m, S, s, x, ...) m(S, s, x) FOREACH_3(m, S, s, __VA_ARGS__)
-#define FOREACH_5(m, S, s, x, ...) m(S, s, x) FOREACH_4(m, S, s, __VA_ARGS__)
-#define FOREACH_6(m, S, s, x, ...) m(S, s, x) FOREACH_5(m, S, s, __VA_ARGS__)
-#define FOREACH_7(m, S, s, x, ...) m(S, s, x) FOREACH_6(m, S, s, __VA_ARGS__)
-#define FOREACH_8(m, S, s, x, ...) m(S, s, x) FOREACH_7(m, S, s, __VA_ARGS__)
-#define NARG(...) NARG_(__VA_ARGS__, RSEQ_N())
-#define NARG_(...) ARG_N(__VA_ARGS__)
-#define ARG_N(_1, _2, _3, _4, _5, _6, _7, _8, N, ...) N
-#define RSEQ_N() 8, 7, 6, 5, 4, 3, 2, 1, 0
-#define FOREACH(m, S, s, ...) FOREACH_(NARG(__VA_ARGS__), m, S, s, __VA_ARGS__)
-#define FOREACH_(N, m, S, s, ...) CONCAT(FOREACH_, N)(m, S, s, __VA_ARGS__)
-#define DEFINE_STRUCT0(Name, name) DEFINE_SIZEOF(Name, name)
-#define DEFINE_STRUCT(Name, name, ...) \
-  DEFINE_SIZEOF(Name, name)            \
-  FOREACH(DEFINE_OFFSETOF, Name, name, __VA_ARGS__)
+WabtWriteModuleResult* wabt_write_text_module(wabt::Module* module,
+                                              int fold_exprs,
+                                              int inline_export) {
+  wabt::MemoryStream stream;
+  wabt::WriteWatOptions options;
+  options.fold_exprs = fold_exprs;
+  options.inline_export = inline_export;
 
-WABT_EXTERN_C_BEGIN
+  wabt::MemoryWriter writer;
+  WabtWriteModuleResult* result = new WabtWriteModuleResult();
+  result->result = write_wat(&writer, module, &options);
+  if (result->result == wabt::Result::Ok) {
+    result->buffer = writer.ReleaseOutputBuffer();
+  }
+  return result;
+}
 
-/* clang-format off */
-DEFINE_STRUCT(
-    WabtBinaryErrorHandler, binary_error_handler,
-    on_error, user_data)
+void wabt_destroy_script(wabt::Script* script) {
+  delete script;
+}
 
-DEFINE_STRUCT(
-    WabtLocation, location,
-    filename, line, first_column, last_column)
+void wabt_destroy_module(wabt::Module* module) {
+  delete module;
+}
 
-DEFINE_STRUCT(
-    WabtMemoryWriter, memory_writer,
-    base, buf)
+void wabt_destroy_wast_lexer(wabt::WastLexer* lexer) {
+  delete lexer;
+}
 
-DEFINE_STRUCT0(
-    WabtModule, module)
+// SourceErrorHandlerBuffer
+wabt::SourceErrorHandlerBuffer* wabt_new_source_error_handler_buffer(void) {
+  return new wabt::SourceErrorHandlerBuffer();
+}
 
-DEFINE_STRUCT(
-    WabtOutputBuffer, output_buffer,
-    start, size, capacity)
+const void* wabt_source_error_handler_buffer_get_data(
+    wabt::SourceErrorHandlerBuffer* error_handler) {
+  return error_handler->buffer().data();
+}
 
-DEFINE_STRUCT(
-    WabtReadBinaryOptions, read_binary_options,
-    read_debug_names)
+size_t wabt_source_error_handler_buffer_get_size(
+    wabt::SourceErrorHandlerBuffer* error_handler) {
+  return error_handler->buffer().size();
+}
 
-DEFINE_STRUCT0(
-    WabtScript, script)
+void wabt_destroy_source_error_handler_buffer(
+    wabt::SourceErrorHandlerBuffer* error_handler) {
+  delete error_handler;
+}
 
-DEFINE_STRUCT(
-    WabtSourceErrorHandler, source_error_handler,
-    on_error, source_line_max_length, user_data)
+// BinaryErrorHandlerBuffer
+wabt::BinaryErrorHandlerBuffer* wabt_new_binary_error_handler_buffer(void) {
+  return new wabt::BinaryErrorHandlerBuffer();
+}
 
-DEFINE_STRUCT(
-    WabtStream, stream,
-    writer, offset, result, log_stream)
+const void* wabt_binary_error_handler_buffer_get_data(
+    wabt::BinaryErrorHandlerBuffer* error_handler) {
+  return error_handler->buffer().data();
+}
 
-DEFINE_STRUCT(
-    WabtStringSlice, string_slice,
-    start, length)
+size_t wabt_binary_error_handler_buffer_get_size(
+    wabt::BinaryErrorHandlerBuffer* error_handler) {
+  return error_handler->buffer().size();
+}
 
-DEFINE_STRUCT(
-    WabtWriter, writer,
-    write_data, move_data)
+void wabt_destroy_binary_error_handler_buffer(
+    wabt::BinaryErrorHandlerBuffer* error_handler) {
+  delete error_handler;
+}
 
-DEFINE_STRUCT(
-    WabtWriteBinaryOptions, write_binary_options,
-    log_stream, canonicalize_lebs, write_debug_names)
-/* clang-format on */
+// WabtParseWastResult
+wabt::Result wabt_parse_wast_result_get_result(WabtParseWastResult* result) {
+  return result->result;
+}
 
-WABT_EXTERN_C_END
+wabt::Script* wabt_parse_wast_result_release_script(
+    WabtParseWastResult* result) {
+  return result->script.release();
+}
+
+void wabt_destroy_parse_wast_result(WabtParseWastResult* result) {
+  delete result;
+}
+
+// WabtReadBinaryResult
+wabt::Result wabt_read_binary_result_get_result(WabtReadBinaryResult* result) {
+  return result->result;
+}
+
+wabt::Module* wabt_read_binary_result_release_module(
+    WabtReadBinaryResult* result) {
+  return result->module.release();
+}
+
+void wabt_destroy_read_binary_result(WabtReadBinaryResult* result) {
+  delete result;
+}
+
+// WabtWriteModuleResult
+wabt::Result wabt_write_module_result_get_result(
+    WabtWriteModuleResult* result) {
+  return result->result;
+}
+
+wabt::OutputBuffer* wabt_write_module_result_release_output_buffer(
+    WabtWriteModuleResult* result) {
+  return result->buffer.release();
+}
+
+wabt::OutputBuffer* wabt_write_module_result_release_log_output_buffer(
+    WabtWriteModuleResult* result) {
+  return result->log_buffer.release();
+}
+
+void wabt_destroy_write_module_result(WabtWriteModuleResult* result) {
+  delete result;
+}
+
+// wabt::OutputBuffer*
+const void* wabt_output_buffer_get_data(wabt::OutputBuffer* output_buffer) {
+  return output_buffer->data.data();
+}
+
+size_t wabt_output_buffer_get_size(wabt::OutputBuffer* output_buffer) {
+  return output_buffer->data.size();
+}
+
+void wabt_destroy_output_buffer(wabt::OutputBuffer* output_buffer) {
+  delete output_buffer;
+}
+
+}  // extern "C"
 
 #endif /* WABT_EMSCRIPTEN_HELPERS_H_ */
diff --git a/lib/wabt/src/expr-visitor.cc b/lib/wabt/src/expr-visitor.cc
new file mode 100644
index 0000000..961e91f
--- /dev/null
+++ b/lib/wabt/src/expr-visitor.cc
@@ -0,0 +1,189 @@
+/*
+ * Copyright 2017 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "expr-visitor.h"
+
+#include "ir.h"
+
+#define CHECK_RESULT(expr)   \
+  do {                       \
+    if (WABT_FAILED((expr))) \
+      return Result::Error;  \
+  } while (0)
+
+namespace wabt {
+
+ExprVisitor::ExprVisitor(Delegate* delegate) : delegate_(delegate) {}
+
+Result ExprVisitor::VisitExpr(Expr* expr) {
+  switch (expr->type) {
+    case ExprType::Binary:
+      CHECK_RESULT(delegate_->OnBinaryExpr(expr));
+      break;
+
+    case ExprType::Block:
+      CHECK_RESULT(delegate_->BeginBlockExpr(expr));
+      CHECK_RESULT(VisitExprList(expr->block->first));
+      CHECK_RESULT(delegate_->EndBlockExpr(expr));
+      break;
+
+    case ExprType::Br:
+      CHECK_RESULT(delegate_->OnBrExpr(expr));
+      break;
+
+    case ExprType::BrIf:
+      CHECK_RESULT(delegate_->OnBrIfExpr(expr));
+      break;
+
+    case ExprType::BrTable:
+      CHECK_RESULT(delegate_->OnBrTableExpr(expr));
+      break;
+
+    case ExprType::Call:
+      CHECK_RESULT(delegate_->OnCallExpr(expr));
+      break;
+
+    case ExprType::CallIndirect:
+      CHECK_RESULT(delegate_->OnCallIndirectExpr(expr));
+      break;
+
+    case ExprType::Catch:
+      // TODO(karlschimpf): Define
+      WABT_FATAL("Catch: don't know how to visit\n");
+      return Result::Error;
+
+    case ExprType::CatchAll:
+      // TODO(karlschimpf): Define
+      WABT_FATAL("CatchAll: don't know how to visit\n");
+      return Result::Error;
+
+    case ExprType::Compare:
+      CHECK_RESULT(delegate_->OnCompareExpr(expr));
+      break;
+
+    case ExprType::Const:
+      CHECK_RESULT(delegate_->OnConstExpr(expr));
+      break;
+
+    case ExprType::Convert:
+      CHECK_RESULT(delegate_->OnConvertExpr(expr));
+      break;
+
+    case ExprType::CurrentMemory:
+      CHECK_RESULT(delegate_->OnCurrentMemoryExpr(expr));
+      break;
+
+    case ExprType::Drop:
+      CHECK_RESULT(delegate_->OnDropExpr(expr));
+      break;
+
+    case ExprType::GetGlobal:
+      CHECK_RESULT(delegate_->OnGetGlobalExpr(expr));
+      break;
+
+    case ExprType::GetLocal:
+      CHECK_RESULT(delegate_->OnGetLocalExpr(expr));
+      break;
+
+    case ExprType::GrowMemory:
+      CHECK_RESULT(delegate_->OnGrowMemoryExpr(expr));
+      break;
+
+    case ExprType::If:
+      CHECK_RESULT(delegate_->BeginIfExpr(expr));
+      CHECK_RESULT(VisitExprList(expr->if_.true_->first));
+      CHECK_RESULT(delegate_->AfterIfTrueExpr(expr));
+      CHECK_RESULT(VisitExprList(expr->if_.false_));
+      CHECK_RESULT(delegate_->EndIfExpr(expr));
+      break;
+
+    case ExprType::Load:
+      CHECK_RESULT(delegate_->OnLoadExpr(expr));
+      break;
+
+    case ExprType::Loop:
+      CHECK_RESULT(delegate_->BeginLoopExpr(expr));
+      CHECK_RESULT(VisitExprList(expr->loop->first));
+      CHECK_RESULT(delegate_->EndLoopExpr(expr));
+      break;
+
+    case ExprType::Nop:
+      CHECK_RESULT(delegate_->OnNopExpr(expr));
+      break;
+
+    case ExprType::Rethrow:
+      // TODO(karlschimpf): Define
+      WABT_FATAL("Rethrow: don't know how to visit\n");
+      return Result::Error;
+
+    case ExprType::Return:
+      CHECK_RESULT(delegate_->OnReturnExpr(expr));
+      break;
+
+    case ExprType::Select:
+      CHECK_RESULT(delegate_->OnSelectExpr(expr));
+      break;
+
+    case ExprType::SetGlobal:
+      CHECK_RESULT(delegate_->OnSetGlobalExpr(expr));
+      break;
+
+    case ExprType::SetLocal:
+      CHECK_RESULT(delegate_->OnSetLocalExpr(expr));
+      break;
+
+    case ExprType::Store:
+      CHECK_RESULT(delegate_->OnStoreExpr(expr));
+      break;
+
+    case ExprType::TeeLocal:
+      CHECK_RESULT(delegate_->OnTeeLocalExpr(expr));
+      break;
+
+    case ExprType::Throw:
+      // TODO(karlschimpf): Define
+      WABT_FATAL("Throw: don't know how to visit\n");
+      return Result::Error;
+
+    case ExprType::TryBlock:
+      // TODO(karlschimpf): Define
+      WABT_FATAL("TryBlock: don't know how to visit\n");
+      return Result::Error;
+      break;
+
+    case ExprType::Unary:
+      CHECK_RESULT(delegate_->OnUnaryExpr(expr));
+      break;
+
+    case ExprType::Unreachable:
+      CHECK_RESULT(delegate_->OnUnreachableExpr(expr));
+      break;
+  }
+
+  return Result::Ok;
+}
+
+Result ExprVisitor::VisitExprList(Expr* first) {
+  for (Expr* expr = first; expr; expr = expr->next)
+    CHECK_RESULT(VisitExpr(expr));
+  return Result::Ok;
+}
+
+Result ExprVisitor::VisitFunc(Func* func) {
+  return VisitExprList(func->first_expr);
+}
+
+}  // namespace wabt
diff --git a/lib/wabt/src/expr-visitor.h b/lib/wabt/src/expr-visitor.h
new file mode 100644
index 0000000..11103d5
--- /dev/null
+++ b/lib/wabt/src/expr-visitor.h
@@ -0,0 +1,116 @@
+/*
+ * Copyright 2017 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef WABT_EXPR_VISITOR_H_
+#define WABT_EXPR_VISITOR_H_
+
+#include "common.h"
+
+namespace wabt {
+
+struct Expr;
+struct Func;
+
+class ExprVisitor {
+ public:
+  class Delegate;
+  class DelegateNop;
+
+  explicit ExprVisitor(Delegate* delegate);
+
+  Result VisitExpr(Expr*);
+  Result VisitExprList(Expr*);
+  Result VisitFunc(Func*);
+
+ private:
+  Delegate* delegate_;
+};
+
+class ExprVisitor::Delegate {
+ public:
+  virtual ~Delegate() {}
+
+  virtual Result OnBinaryExpr(Expr*) = 0;
+  virtual Result BeginBlockExpr(Expr*) = 0;
+  virtual Result EndBlockExpr(Expr*) = 0;
+  virtual Result OnBrExpr(Expr*) = 0;
+  virtual Result OnBrIfExpr(Expr*) = 0;
+  virtual Result OnBrTableExpr(Expr*) = 0;
+  virtual Result OnCallExpr(Expr*) = 0;
+  virtual Result OnCallIndirectExpr(Expr*) = 0;
+  virtual Result OnCompareExpr(Expr*) = 0;
+  virtual Result OnConstExpr(Expr*) = 0;
+  virtual Result OnConvertExpr(Expr*) = 0;
+  virtual Result OnCurrentMemoryExpr(Expr*) = 0;
+  virtual Result OnDropExpr(Expr*) = 0;
+  virtual Result OnGetGlobalExpr(Expr*) = 0;
+  virtual Result OnGetLocalExpr(Expr*) = 0;
+  virtual Result OnGrowMemoryExpr(Expr*) = 0;
+  virtual Result BeginIfExpr(Expr*) = 0;
+  virtual Result AfterIfTrueExpr(Expr*) = 0;
+  virtual Result EndIfExpr(Expr*) = 0;
+  virtual Result OnLoadExpr(Expr*) = 0;
+  virtual Result BeginLoopExpr(Expr*) = 0;
+  virtual Result EndLoopExpr(Expr*) = 0;
+  virtual Result OnNopExpr(Expr*) = 0;
+  virtual Result OnReturnExpr(Expr*) = 0;
+  virtual Result OnSelectExpr(Expr*) = 0;
+  virtual Result OnSetGlobalExpr(Expr*) = 0;
+  virtual Result OnSetLocalExpr(Expr*) = 0;
+  virtual Result OnStoreExpr(Expr*) = 0;
+  virtual Result OnTeeLocalExpr(Expr*) = 0;
+  virtual Result OnUnaryExpr(Expr*) = 0;
+  virtual Result OnUnreachableExpr(Expr*) = 0;
+};
+
+class ExprVisitor::DelegateNop : public ExprVisitor::Delegate {
+ public:
+  Result OnBinaryExpr(Expr*) override { return Result::Ok; }
+  Result BeginBlockExpr(Expr*) override { return Result::Ok; }
+  Result EndBlockExpr(Expr*) override { return Result::Ok; }
+  Result OnBrExpr(Expr*) override { return Result::Ok; }
+  Result OnBrIfExpr(Expr*) override { return Result::Ok; }
+  Result OnBrTableExpr(Expr*) override { return Result::Ok; }
+  Result OnCallExpr(Expr*) override { return Result::Ok; }
+  Result OnCallIndirectExpr(Expr*) override { return Result::Ok; }
+  Result OnCompareExpr(Expr*) override { return Result::Ok; }
+  Result OnConstExpr(Expr*) override { return Result::Ok; }
+  Result OnConvertExpr(Expr*) override { return Result::Ok; }
+  Result OnCurrentMemoryExpr(Expr*) override { return Result::Ok; }
+  Result OnDropExpr(Expr*) override { return Result::Ok; }
+  Result OnGetGlobalExpr(Expr*) override { return Result::Ok; }
+  Result OnGetLocalExpr(Expr*) override { return Result::Ok; }
+  Result OnGrowMemoryExpr(Expr*) override { return Result::Ok; }
+  Result BeginIfExpr(Expr*) override { return Result::Ok; }
+  Result AfterIfTrueExpr(Expr*) override { return Result::Ok; }
+  Result EndIfExpr(Expr*) override { return Result::Ok; }
+  Result OnLoadExpr(Expr*) override { return Result::Ok; }
+  Result BeginLoopExpr(Expr*) override { return Result::Ok; }
+  Result EndLoopExpr(Expr*) override { return Result::Ok; }
+  Result OnNopExpr(Expr*) override { return Result::Ok; }
+  Result OnReturnExpr(Expr*) override { return Result::Ok; }
+  Result OnSelectExpr(Expr*) override { return Result::Ok; }
+  Result OnSetGlobalExpr(Expr*) override { return Result::Ok; }
+  Result OnSetLocalExpr(Expr*) override { return Result::Ok; }
+  Result OnStoreExpr(Expr*) override { return Result::Ok; }
+  Result OnTeeLocalExpr(Expr*) override { return Result::Ok; }
+  Result OnUnaryExpr(Expr*) override { return Result::Ok; }
+  Result OnUnreachableExpr(Expr*) override { return Result::Ok; }
+};
+
+}  // namespace wabt
+
+#endif  // WABT_EXPR_VISITOR_H_
diff --git a/lib/wabt/src/generate-names.cc b/lib/wabt/src/generate-names.cc
index e3ccfe6..258d9b0 100644
--- a/lib/wabt/src/generate-names.cc
+++ b/lib/wabt/src/generate-names.cc
@@ -16,42 +16,73 @@
 
 #include "generate-names.h"
 
-#include <assert.h>
-#include <stdio.h>
-
+#include <cassert>
+#include <cstdio>
 #include <string>
 #include <vector>
 
-#include "ast.h"
+#include "expr-visitor.h"
+#include "ir.h"
 
-#define CHECK_RESULT(expr) \
-  do {                     \
-    if (WABT_FAILED(expr)) \
-      return Result::Error;   \
+#define CHECK_RESULT(expr)  \
+  do {                      \
+    if (WABT_FAILED(expr))  \
+      return Result::Error; \
   } while (0)
 
 namespace wabt {
 
 namespace {
 
-struct Context {
-  Context() : module(nullptr), label_count(0) { WABT_ZERO_MEMORY(visitor); }
+class NameGenerator : public ExprVisitor::DelegateNop {
+ public:
+  NameGenerator();
 
-  Module* module;
-  ExprVisitor visitor;
-  std::vector<std::string> index_to_name;
-  uint32_t label_count;
+  Result VisitModule(Module* module);
+
+  // Implementation of ExprVisitor::DelegateNop.
+  Result BeginBlockExpr(Expr* expr) override;
+  Result BeginLoopExpr(Expr* expr) override;
+  Result BeginIfExpr(Expr* expr) override;
+
+ private:
+  static bool HasName(StringSlice* str);
+  static void GenerateName(const char* prefix, Index index, StringSlice* str);
+  static void MaybeGenerateName(const char* prefix,
+                                Index index,
+                                StringSlice* str);
+  static void GenerateAndBindName(BindingHash* bindings,
+                                  const char* prefix,
+                                  Index index,
+                                  StringSlice* str);
+  static void MaybeGenerateAndBindName(BindingHash* bindings,
+                                       const char* prefix,
+                                       Index index,
+                                       StringSlice* str);
+  void GenerateAndBindLocalNames(BindingHash* bindings, const char* prefix);
+  Result VisitFunc(Index func_index, Func* func);
+  Result VisitGlobal(Index global_index, Global* global);
+  Result VisitFuncType(Index func_type_index, FuncType* func_type);
+  Result VisitTable(Index table_index, Table* table);
+  Result VisitMemory(Index memory_index, Memory* memory);
+
+  Module* module_ = nullptr;
+  ExprVisitor visitor_;
+  std::vector<std::string> index_to_name_;
+  Index label_count_ = 0;
 };
 
-}  // namespace
+NameGenerator::NameGenerator() : visitor_(this) {}
 
-static bool has_name(StringSlice* str) {
+// static
+bool NameGenerator::HasName(StringSlice* str) {
   return str->length > 0;
 }
 
-static void generate_name(const char* prefix,
-                          uint32_t index,
-                          StringSlice* str) {
+// static
+void NameGenerator::GenerateName(const char* prefix,
+                                 Index index,
+                                 StringSlice* str) {
   size_t prefix_len = strlen(prefix);
   size_t buffer_len = prefix_len + 20; /* add space for the number */
   char* buffer = static_cast<char*>(alloca(buffer_len));
@@ -63,133 +94,124 @@
   *str = dup_string_slice(buf);
 }
 
-static void maybe_generate_name(const char* prefix,
-                                uint32_t index,
-                                StringSlice* str) {
-  if (!has_name(str))
-    generate_name(prefix, index, str);
+// static
+void NameGenerator::MaybeGenerateName(const char* prefix,
+                                      Index index,
+                                      StringSlice* str) {
+  if (!HasName(str))
+    GenerateName(prefix, index, str);
 }
 
-static void generate_and_bind_name(BindingHash* bindings,
-                                   const char* prefix,
-                                   uint32_t index,
-                                   StringSlice* str) {
-  generate_name(prefix, index, str);
+// static
+void NameGenerator::GenerateAndBindName(BindingHash* bindings,
+                                        const char* prefix,
+                                        Index index,
+                                        StringSlice* str) {
+  GenerateName(prefix, index, str);
   bindings->emplace(string_slice_to_string(*str), Binding(index));
 }
 
-static void maybe_generate_and_bind_name(BindingHash* bindings,
-                                         const char* prefix,
-                                         uint32_t index,
-                                         StringSlice* str) {
-  if (!has_name(str))
-    generate_and_bind_name(bindings, prefix, index, str);
+// static
+void NameGenerator::MaybeGenerateAndBindName(BindingHash* bindings,
+                                             const char* prefix,
+                                             Index index,
+                                             StringSlice* str) {
+  if (!HasName(str))
+    GenerateAndBindName(bindings, prefix, index, str);
 }
 
-static void generate_and_bind_local_names(
-    Context* ctx,
-    BindingHash* bindings,
-    const char* prefix) {
-  for (size_t i = 0; i < ctx->index_to_name.size(); ++i) {
-    const std::string& old_name = ctx->index_to_name[i];
+void NameGenerator::GenerateAndBindLocalNames(BindingHash* bindings,
+                                              const char* prefix) {
+  for (size_t i = 0; i < index_to_name_.size(); ++i) {
+    const std::string& old_name = index_to_name_[i];
     if (!old_name.empty())
       continue;
 
     StringSlice new_name;
-    generate_and_bind_name(bindings, prefix, i, &new_name);
-    ctx->index_to_name[i] = string_slice_to_string(new_name);
+    GenerateAndBindName(bindings, prefix, i, &new_name);
+    index_to_name_[i] = string_slice_to_string(new_name);
     destroy_string_slice(&new_name);
   }
 }
 
-static Result begin_block_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  maybe_generate_name("$B", ctx->label_count++, &expr->block->label);
+Result NameGenerator::BeginBlockExpr(Expr* expr) {
+  MaybeGenerateName("$B", label_count_++, &expr->block->label);
   return Result::Ok;
 }
 
-static Result begin_loop_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  maybe_generate_name("$L", ctx->label_count++, &expr->loop->label);
+Result NameGenerator::BeginLoopExpr(Expr* expr) {
+  MaybeGenerateName("$L", label_count_++, &expr->loop->label);
   return Result::Ok;
 }
 
-static Result begin_if_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  maybe_generate_name("$L", ctx->label_count++, &expr->if_.true_->label);
+Result NameGenerator::BeginIfExpr(Expr* expr) {
+  MaybeGenerateName("$I", label_count_++, &expr->if_.true_->label);
   return Result::Ok;
 }
 
-static Result visit_func(Context* ctx, uint32_t func_index, Func* func) {
-  maybe_generate_and_bind_name(&ctx->module->func_bindings, "$f", func_index,
-                               &func->name);
+Result NameGenerator::VisitFunc(Index func_index, Func* func) {
+  MaybeGenerateAndBindName(&module_->func_bindings, "$f", func_index,
+                           &func->name);
 
-  make_type_binding_reverse_mapping(func->decl.sig.param_types,
-                                    func->param_bindings, &ctx->index_to_name);
-  generate_and_bind_local_names(ctx, &func->param_bindings, "$p");
+  MakeTypeBindingReverseMapping(func->decl.sig.param_types,
+                                func->param_bindings, &index_to_name_);
+  GenerateAndBindLocalNames(&func->param_bindings, "$p");
 
-  make_type_binding_reverse_mapping(func->local_types, func->local_bindings,
-                                    &ctx->index_to_name);
-  generate_and_bind_local_names(ctx, &func->local_bindings, "$l");
+  MakeTypeBindingReverseMapping(func->local_types, func->local_bindings,
+                                &index_to_name_);
+  GenerateAndBindLocalNames(&func->local_bindings, "$l");
 
-  ctx->label_count = 0;
-  CHECK_RESULT(visit_func(func, &ctx->visitor));
+  label_count_ = 0;
+  CHECK_RESULT(visitor_.VisitFunc(func));
   return Result::Ok;
 }
 
-static Result visit_global(Context* ctx,
-                           uint32_t global_index,
-                           Global* global) {
-  maybe_generate_and_bind_name(&ctx->module->global_bindings, "$g",
-                               global_index, &global->name);
+Result NameGenerator::VisitGlobal(Index global_index, Global* global) {
+  MaybeGenerateAndBindName(&module_->global_bindings, "$g", global_index,
+                           &global->name);
   return Result::Ok;
 }
 
-static Result visit_func_type(Context* ctx,
-                              uint32_t func_type_index,
-                              FuncType* func_type) {
-  maybe_generate_and_bind_name(&ctx->module->func_type_bindings, "$t",
-                               func_type_index, &func_type->name);
+Result NameGenerator::VisitFuncType(Index func_type_index,
+                                    FuncType* func_type) {
+  MaybeGenerateAndBindName(&module_->func_type_bindings, "$t", func_type_index,
+                           &func_type->name);
   return Result::Ok;
 }
 
-static Result visit_table(Context* ctx, uint32_t table_index, Table* table) {
-  maybe_generate_and_bind_name(&ctx->module->table_bindings, "$T", table_index,
-                               &table->name);
+Result NameGenerator::VisitTable(Index table_index, Table* table) {
+  MaybeGenerateAndBindName(&module_->table_bindings, "$T", table_index,
+                           &table->name);
   return Result::Ok;
 }
 
-static Result visit_memory(Context* ctx,
-                           uint32_t memory_index,
-                           Memory* memory) {
-  maybe_generate_and_bind_name(&ctx->module->memory_bindings, "$M",
-                               memory_index, &memory->name);
+Result NameGenerator::VisitMemory(Index memory_index, Memory* memory) {
+  MaybeGenerateAndBindName(&module_->memory_bindings, "$M", memory_index,
+                           &memory->name);
   return Result::Ok;
 }
 
-static Result visit_module(Context* ctx, Module* module) {
-  for (size_t i = 0; i < module->globals.size(); ++i)
-    CHECK_RESULT(visit_global(ctx, i, module->globals[i]));
-  for (size_t i = 0; i < module->func_types.size(); ++i)
-    CHECK_RESULT(visit_func_type(ctx, i, module->func_types[i]));
-  for (size_t i = 0; i < module->funcs.size(); ++i)
-    CHECK_RESULT(visit_func(ctx, i, module->funcs[i]));
-  for (size_t i = 0; i < module->tables.size(); ++i)
-    CHECK_RESULT(visit_table(ctx, i, module->tables[i]));
-  for (size_t i = 0; i < module->memories.size(); ++i)
-    CHECK_RESULT(visit_memory(ctx, i, module->memories[i]));
+Result NameGenerator::VisitModule(Module* module) {
+  module_ = module;
+  for (Index i = 0; i < module->globals.size(); ++i)
+    CHECK_RESULT(VisitGlobal(i, module->globals[i]));
+  for (Index i = 0; i < module->func_types.size(); ++i)
+    CHECK_RESULT(VisitFuncType(i, module->func_types[i]));
+  for (Index i = 0; i < module->funcs.size(); ++i)
+    CHECK_RESULT(VisitFunc(i, module->funcs[i]));
+  for (Index i = 0; i < module->tables.size(); ++i)
+    CHECK_RESULT(VisitTable(i, module->tables[i]));
+  for (Index i = 0; i < module->memories.size(); ++i)
+    CHECK_RESULT(VisitMemory(i, module->memories[i]));
+  module_ = nullptr;
   return Result::Ok;
 }
 
+}  // namespace
+
 Result generate_names(Module* module) {
-  Context ctx;
-  ctx.visitor.user_data = &ctx;
-  ctx.visitor.begin_block_expr = begin_block_expr;
-  ctx.visitor.begin_loop_expr = begin_loop_expr;
-  ctx.visitor.begin_if_expr = begin_if_expr;
-  ctx.module = module;
-  Result result = visit_module(&ctx, module);
-  return result;
+  NameGenerator generator;
+  return generator.VisitModule(module);
 }
 
 }  // namespace wabt
diff --git a/lib/wabt/src/interpreter-opcode.def b/lib/wabt/src/interpreter-opcode.def
new file mode 100644
index 0000000..7256933
--- /dev/null
+++ b/lib/wabt/src/interpreter-opcode.def
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2017 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef WABT_OPCODE
+#error "You must define WABT_OPCODE before including this file."
+#endif
+
+/*
+ *   tr: result type
+ *   t1: type of the 1st parameter
+ *   t2: type of the 2nd parameter
+ *    m: memory size of the operation, if any
+ * code: opcode
+ * Name: used to generate the opcode enum
+ * text: a string of the opcode name in the text format
+ *
+ *          tr  t1    t2   m  code  Name text
+ * ============================================================  */
+
+#include "opcode.def"
+WABT_OPCODE(___, ___, ___, 0, 0xc0, Alloca, "alloca")
+WABT_OPCODE(___, ___, ___, 0, 0xc1, BrUnless, "br_unless")
+WABT_OPCODE(___, ___, ___, 0, 0xc2, CallHost, "call_host")
+WABT_OPCODE(___, ___, ___, 0, 0xc3, Data, "data")
+WABT_OPCODE(___, ___, ___, 0, 0xc4, DropKeep, "drop_keep")
diff --git a/lib/wabt/src/interpreter.cc b/lib/wabt/src/interpreter.cc
index bb1e6a9..29a6ee5 100644
--- a/lib/wabt/src/interpreter.cc
+++ b/lib/wabt/src/interpreter.cc
@@ -16,20 +16,24 @@
 
 #include "interpreter.h"
 
-#include <assert.h>
-#include <inttypes.h>
-#include <math.h>
-
 #include <algorithm>
+#include <cassert>
+#include <cinttypes>
+#include <cmath>
 #include <vector>
 
 #include "stream.h"
 
-#define INITIAL_ISTREAM_CAPACITY (64 * 1024)
-
 namespace wabt {
+namespace interpreter {
 
-static const char* s_interpreter_opcode_name[256];
+static const char* s_opcode_name[256] = {
+
+#define WABT_OPCODE(rtype, type1, type2, mem_size, code, NAME, text) text,
+#include "interpreter-opcode.def"
+#undef WABT_OPCODE
+
+};
 
 #define CHECK_RESULT(expr)  \
   do {                      \
@@ -37,51 +41,66 @@
       return Result::Error; \
   } while (0)
 
-/* TODO(binji): It's annoying to have to have an initializer function, but it
- * seems to be necessary as g++ doesn't allow non-trival designated
- * initializers (e.g. [314] = "blah") */
-static void init_interpreter_opcode_table(void) {
-  static bool s_initialized = false;
-  if (!s_initialized) {
-#define V(rtype, type1, type2, mem_size, code, NAME, text) \
-  s_interpreter_opcode_name[code] = text;
-
-    WABT_FOREACH_INTERPRETER_OPCODE(V)
-
-#undef V
-  }
+static const char* get_opcode_name(Opcode opcode) {
+  return s_opcode_name[static_cast<int>(opcode)];
 }
 
-static const char* get_interpreter_opcode_name(InterpreterOpcode opcode) {
-  init_interpreter_opcode_table();
-  return s_interpreter_opcode_name[static_cast<int>(opcode)];
+Environment::Environment() : istream_(new OutputBuffer()) {}
+
+Index Environment::FindModuleIndex(StringSlice name) const {
+  auto iter = module_bindings_.find(string_slice_to_string(name));
+  if (iter == module_bindings_.end())
+    return kInvalidIndex;
+  return iter->second.index;
 }
 
-InterpreterEnvironment::InterpreterEnvironment() {
-  WABT_ZERO_MEMORY(istream);
-  init_output_buffer(&istream, INITIAL_ISTREAM_CAPACITY);
+Module* Environment::FindModule(StringSlice name) {
+  Index index = FindModuleIndex(name);
+  return index == kInvalidIndex ? nullptr : modules_[index].get();
 }
 
-InterpreterThread::InterpreterThread()
-    : env(nullptr),
-      value_stack_top(nullptr),
-      value_stack_end(nullptr),
-      call_stack_top(nullptr),
-      call_stack_end(nullptr),
-      pc(0) {}
+Module* Environment::FindRegisteredModule(StringSlice name) {
+  auto iter = registered_module_bindings_.find(string_slice_to_string(name));
+  if (iter == registered_module_bindings_.end())
+    return nullptr;
+  return modules_[iter->second.index].get();
+}
 
-InterpreterImport::InterpreterImport() 
-  : kind(ExternalKind::Func) {
+Thread::Options::Options(uint32_t value_stack_size,
+                         uint32_t call_stack_size,
+                         IstreamOffset pc)
+    : value_stack_size(value_stack_size),
+      call_stack_size(call_stack_size),
+      pc(pc) {}
+
+Thread::Thread(Environment* env, const Options& options)
+    : env_(env),
+      value_stack_(options.value_stack_size),
+      call_stack_(options.call_stack_size),
+      value_stack_top_(value_stack_.data()),
+      value_stack_end_(value_stack_.data() + value_stack_.size()),
+      call_stack_top_(call_stack_.data()),
+      call_stack_end_(call_stack_.data() + call_stack_.size()),
+      pc_(options.pc) {}
+
+FuncSignature::FuncSignature(Index param_count,
+                             Type* param_types,
+                             Index result_count,
+                             Type* result_types)
+    : param_types(param_types, param_types + param_count),
+      result_types(result_types, result_types + result_count) {}
+
+Import::Import() : kind(ExternalKind::Func) {
   WABT_ZERO_MEMORY(module_name);
   WABT_ZERO_MEMORY(field_name);
   WABT_ZERO_MEMORY(func.sig_index);
 }
 
-InterpreterImport::InterpreterImport(InterpreterImport&& other) {
+Import::Import(Import&& other) {
   *this = std::move(other);
 }
 
-InterpreterImport& InterpreterImport::operator=(InterpreterImport&& other) {
+Import& Import::operator=(Import&& other) {
   kind = other.kind;
   module_name = other.module_name;
   WABT_ZERO_MEMORY(other.module_name);
@@ -101,24 +120,25 @@
       global.type = other.global.type;
       global.mutable_ = other.global.mutable_;
       break;
+    case ExternalKind::Except:
+      // TODO(karlschimpf) Define
+      WABT_FATAL("Import::operator=() not implemented for exceptions");
+      break;
   }
   return *this;
 }
 
-
-InterpreterImport::~InterpreterImport() {
+Import::~Import() {
   destroy_string_slice(&module_name);
   destroy_string_slice(&field_name);
 }
 
-InterpreterExport::InterpreterExport(InterpreterExport&& other)
-  : name(other.name),
-    kind(other.kind),
-    index(other.index) {
+Export::Export(Export&& other)
+    : name(other.name), kind(other.kind), index(other.index) {
   WABT_ZERO_MEMORY(other.name);
 }
 
-InterpreterExport& InterpreterExport::operator=(InterpreterExport&& other) {
+Export& Export::operator=(Export&& other) {
   name = other.name;
   kind = other.kind;
   index = other.index;
@@ -126,125 +146,124 @@
   return *this;
 }
 
-InterpreterExport::~InterpreterExport() {
+Export::~Export() {
   destroy_string_slice(&name);
 }
 
-InterpreterModule::InterpreterModule(bool is_host)
-    : memory_index(WABT_INVALID_INDEX),
-      table_index(WABT_INVALID_INDEX),
+Module::Module(bool is_host)
+    : memory_index(kInvalidIndex),
+      table_index(kInvalidIndex),
       is_host(is_host) {
   WABT_ZERO_MEMORY(name);
 }
 
-InterpreterModule::InterpreterModule(const StringSlice& name, bool is_host)
+Module::Module(const StringSlice& name, bool is_host)
     : name(name),
-      memory_index(WABT_INVALID_INDEX),
-      table_index(WABT_INVALID_INDEX),
+      memory_index(kInvalidIndex),
+      table_index(kInvalidIndex),
       is_host(is_host) {}
 
-InterpreterModule::~InterpreterModule() {
+Module::~Module() {
   destroy_string_slice(&name);
 }
 
-DefinedInterpreterModule::DefinedInterpreterModule(size_t istream_start)
-    : InterpreterModule(false),
-      start_func_index(WABT_INVALID_INDEX),
-      istream_start(istream_start),
-      istream_end(istream_start) {}
-
-HostInterpreterModule::HostInterpreterModule(const StringSlice& name)
-    : InterpreterModule(name, true) {}
-
-void destroy_interpreter_environment(InterpreterEnvironment* env) {
-  destroy_output_buffer(&env->istream);
+Export* Module::GetExport(StringSlice name) {
+  int field_index = export_bindings.FindIndex(name);
+  if (field_index < 0)
+    return nullptr;
+  return &exports[field_index];
 }
 
-InterpreterEnvironmentMark mark_interpreter_environment(
-    InterpreterEnvironment* env) {
-  InterpreterEnvironmentMark mark;
-  WABT_ZERO_MEMORY(mark);
-  mark.modules_size = env->modules.size();
-  mark.sigs_size = env->sigs.size();
-  mark.funcs_size = env->funcs.size();
-  mark.memories_size = env->memories.size();
-  mark.tables_size = env->tables.size();
-  mark.globals_size = env->globals.size();
-  mark.istream_size = env->istream.size;
+DefinedModule::DefinedModule()
+    : Module(false),
+      start_func_index(kInvalidIndex),
+      istream_start(kInvalidIstreamOffset),
+      istream_end(kInvalidIstreamOffset) {}
+
+HostModule::HostModule(const StringSlice& name) : Module(name, true) {}
+
+Environment::MarkPoint Environment::Mark() {
+  MarkPoint mark;
+  mark.modules_size = modules_.size();
+  mark.sigs_size = sigs_.size();
+  mark.funcs_size = funcs_.size();
+  mark.memories_size = memories_.size();
+  mark.tables_size = tables_.size();
+  mark.globals_size = globals_.size();
+  mark.istream_size = istream_->data.size();
   return mark;
 }
 
-void reset_interpreter_environment_to_mark(InterpreterEnvironment* env,
-                                           InterpreterEnvironmentMark mark) {
-  /* Destroy entries in the binding hash. */
-  for (size_t i = mark.modules_size; i < env->modules.size(); ++i) {
-    const StringSlice* name = &env->modules[i]->name;
+void Environment::ResetToMarkPoint(const MarkPoint& mark) {
+  // Destroy entries in the binding hash.
+  for (size_t i = mark.modules_size; i < modules_.size(); ++i) {
+    const StringSlice* name = &modules_[i]->name;
     if (!string_slice_is_empty(name))
-      env->module_bindings.erase(string_slice_to_string(*name));
+      module_bindings_.erase(string_slice_to_string(*name));
   }
 
-  /* registered_module_bindings maps from an arbitrary name to a module index,
-   * so we have to iterate through the entire table to find entries to remove.
-   */
-  auto iter = env->registered_module_bindings.begin();
-  while (iter != env->registered_module_bindings.end()) {
-    if (iter->second.index >= static_cast<int>(mark.modules_size))
-      iter = env->registered_module_bindings.erase(iter);
+  // registered_module_bindings_ maps from an arbitrary name to a module index,
+  // so we have to iterate through the entire table to find entries to remove.
+  auto iter = registered_module_bindings_.begin();
+  while (iter != registered_module_bindings_.end()) {
+    if (iter->second.index >= mark.modules_size)
+      iter = registered_module_bindings_.erase(iter);
     else
       ++iter;
   }
 
-  env->modules.erase(env->modules.begin() + mark.modules_size,
-                     env->modules.end());
-  env->sigs.erase(env->sigs.begin() + mark.sigs_size, env->sigs.end());
-  env->funcs.erase(env->funcs.begin() + mark.funcs_size, env->funcs.end());
-  env->memories.erase(env->memories.begin() + mark.memories_size,
-                      env->memories.end());
-  env->tables.erase(env->tables.begin() + mark.tables_size, env->tables.end());
-  env->globals.erase(env->globals.begin() + mark.globals_size,
-                     env->globals.end());
-  env->istream.size = mark.istream_size;
+  modules_.erase(modules_.begin() + mark.modules_size, modules_.end());
+  sigs_.erase(sigs_.begin() + mark.sigs_size, sigs_.end());
+  funcs_.erase(funcs_.begin() + mark.funcs_size, funcs_.end());
+  memories_.erase(memories_.begin() + mark.memories_size, memories_.end());
+  tables_.erase(tables_.begin() + mark.tables_size, tables_.end());
+  globals_.erase(globals_.begin() + mark.globals_size, globals_.end());
+  istream_->data.resize(mark.istream_size);
 }
 
-HostInterpreterModule* append_host_module(InterpreterEnvironment* env,
-                                          StringSlice name) {
-  HostInterpreterModule* module =
-      new HostInterpreterModule(dup_string_slice(name));
-  env->modules.emplace_back(module);
-  env->registered_module_bindings.emplace(string_slice_to_string(name),
-                                          Binding(env->modules.size() - 1));
+HostModule* Environment::AppendHostModule(StringSlice name) {
+  HostModule* module = new HostModule(dup_string_slice(name));
+  modules_.emplace_back(module);
+  registered_module_bindings_.emplace(string_slice_to_string(name),
+                                      Binding(modules_.size() - 1));
   return module;
 }
 
-void init_interpreter_thread(InterpreterEnvironment* env,
-                             InterpreterThread* thread,
-                             InterpreterThreadOptions* options) {
-  thread->value_stack.resize(options->value_stack_size);
-  thread->call_stack.resize(options->call_stack_size);
-  thread->env = env;
-  thread->value_stack_top = thread->value_stack.data();
-  thread->value_stack_end =
-      thread->value_stack.data() + thread->value_stack.size();
-  thread->call_stack_top = thread->call_stack.data();
-  thread->call_stack_end =
-      thread->call_stack.data() + thread->call_stack.size();
-  thread->pc = options->pc;
+Result Thread::PushValue(Value value) {
+  if (value_stack_top_ >= value_stack_end_)
+    return Result::TrapValueStackExhausted;
+  *value_stack_top_++ = value;
+  return Result::Ok;
 }
 
-InterpreterResult push_thread_value(InterpreterThread* thread,
-                                    InterpreterValue value) {
-  if (thread->value_stack_top >= thread->value_stack_end)
-    return InterpreterResult::TrapValueStackExhausted;
-  *thread->value_stack_top++ = value;
-  return InterpreterResult::Ok;
+Result Thread::PushArgs(const FuncSignature* sig,
+                        const std::vector<TypedValue>& args) {
+  if (sig->param_types.size() != args.size())
+    return interpreter::Result::ArgumentTypeMismatch;
+
+  for (size_t i = 0; i < sig->param_types.size(); ++i) {
+    if (sig->param_types[i] != args[i].type)
+      return interpreter::Result::ArgumentTypeMismatch;
+
+    interpreter::Result iresult = PushValue(args[i].value);
+    if (iresult != interpreter::Result::Ok) {
+      value_stack_top_ = value_stack_.data();
+      return iresult;
+    }
+  }
+  return interpreter::Result::Ok;
 }
 
-InterpreterExport* get_interpreter_export_by_name(InterpreterModule* module,
-                                                  const StringSlice* name) {
-  int field_index = module->export_bindings.find_index(*name);
-  if (field_index < 0)
-    return nullptr;
-  return &module->exports[field_index];
+void Thread::CopyResults(const FuncSignature* sig,
+                         std::vector<TypedValue>* out_results) {
+  size_t expected_results = sig->result_types.size();
+  size_t value_stack_depth = value_stack_top_ - value_stack_.data();
+  WABT_USE(value_stack_depth);
+  assert(expected_results == value_stack_depth);
+
+  out_results->clear();
+  for (size_t i = 0; i < expected_results; ++i)
+    out_results->emplace_back(sig->result_types[i], value_stack_[i]);
 }
 
 /* 3 32222222 222...00
@@ -494,7 +513,7 @@
 #define TYPE_FIELD_NAME_F32 f32_bits
 #define TYPE_FIELD_NAME_F64 f64_bits
 
-#define TRAP(type) return InterpreterResult::Trap##type
+#define TRAP(type) return Result::Trap##type
 #define TRAP_UNLESS(cond, type) TRAP_IF(!(cond), type)
 #define TRAP_IF(cond, type)  \
   do {                       \
@@ -502,9 +521,8 @@
       TRAP(type);            \
   } while (0)
 
-#define CHECK_STACK()                                         \
-  TRAP_IF(thread->value_stack_top >= thread->value_stack_end, \
-          ValueStackExhausted)
+#define CHECK_STACK() \
+  TRAP_IF(value_stack_top_ >= value_stack_end_, ValueStackExhausted)
 
 #define PUSH_NEG_1_AND_BREAK_IF(cond) \
   if (WABT_UNLIKELY(cond)) {          \
@@ -512,17 +530,17 @@
     break;                            \
   }
 
-#define PUSH(v)                         \
-  do {                                  \
-    CHECK_STACK();                      \
-    (*thread->value_stack_top++) = (v); \
+#define PUSH(v)                  \
+  do {                           \
+    CHECK_STACK();               \
+    (*value_stack_top_++) = (v); \
   } while (0)
 
-#define PUSH_TYPE(type, v)                                \
-  do {                                                    \
-    CHECK_STACK();                                        \
-    (*thread->value_stack_top++).TYPE_FIELD_NAME_##type = \
-        static_cast<VALUE_TYPE_##type>(v);                \
+#define PUSH_TYPE(type, v)                         \
+  do {                                             \
+    CHECK_STACK();                                 \
+    (*value_stack_top_++).TYPE_FIELD_NAME_##type = \
+        static_cast<VALUE_TYPE_##type>(v);         \
   } while (0)
 
 #define PUSH_I32(v) PUSH_TYPE(I32, (v))
@@ -530,35 +548,34 @@
 #define PUSH_F32(v) PUSH_TYPE(F32, (v))
 #define PUSH_F64(v) PUSH_TYPE(F64, (v))
 
-#define PICK(depth) (*(thread->value_stack_top - (depth)))
+#define PICK(depth) (*(value_stack_top_ - (depth)))
 #define TOP() (PICK(1))
-#define POP() (*--thread->value_stack_top)
+#define POP() (*--value_stack_top_)
 #define POP_I32() (POP().i32)
 #define POP_I64() (POP().i64)
 #define POP_F32() (POP().f32_bits)
 #define POP_F64() (POP().f64_bits)
-#define DROP_KEEP(drop, keep)          \
-  do {                                 \
-    assert((keep) <= 1);               \
-    if ((keep) == 1)                   \
-      PICK((drop) + 1) = TOP();        \
-    thread->value_stack_top -= (drop); \
+#define DROP_KEEP(drop, keep)   \
+  do {                          \
+    assert((keep) <= 1);        \
+    if ((keep) == 1)            \
+      PICK((drop) + 1) = TOP(); \
+    value_stack_top_ -= (drop); \
   } while (0)
 
 #define GOTO(offset) pc = &istream[offset]
 
-#define PUSH_CALL()                                           \
-  do {                                                        \
-    TRAP_IF(thread->call_stack_top >= thread->call_stack_end, \
-            CallStackExhausted);                              \
-    (*thread->call_stack_top++) = (pc - istream);             \
+#define PUSH_CALL()                                                  \
+  do {                                                               \
+    TRAP_IF(call_stack_top_ >= call_stack_end_, CallStackExhausted); \
+    (*call_stack_top_++) = (pc - istream);                           \
   } while (0)
 
-#define POP_CALL() (*--thread->call_stack_top)
+#define POP_CALL() (*--call_stack_top_)
 
-#define GET_MEMORY(var)                  \
-  uint32_t memory_index = read_u32(&pc); \
-  InterpreterMemory* var = &env->memories[memory_index]
+#define GET_MEMORY(var)               \
+  Index memory_index = read_u32(&pc); \
+  Memory* var = &env_->memories_[memory_index]
 
 #define LOAD(type, mem_type)                                              \
   do {                                                                    \
@@ -567,23 +584,21 @@
     MEM_TYPE_##mem_type value;                                            \
     TRAP_IF(offset + sizeof(value) > memory->data.size(),                 \
             MemoryAccessOutOfBounds);                                     \
-    void* src = static_cast<void*>(memory->data.data() +                  \
-                                   static_cast<uint32_t>(offset));        \
+    void* src = memory->data.data() + static_cast<IstreamOffset>(offset); \
     memcpy(&value, src, sizeof(MEM_TYPE_##mem_type));                     \
     PUSH_##type(static_cast<MEM_TYPE_EXTEND_##type##_##mem_type>(value)); \
   } while (0)
 
-#define STORE(type, mem_type)                                           \
-  do {                                                                  \
-    GET_MEMORY(memory);                                                 \
-    VALUE_TYPE_##type value = POP_##type();                             \
-    uint64_t offset = static_cast<uint64_t>(POP_I32()) + read_u32(&pc); \
-    MEM_TYPE_##mem_type src = static_cast<MEM_TYPE_##mem_type>(value);  \
-    TRAP_IF(offset + sizeof(src) > memory->data.size(),                 \
-            MemoryAccessOutOfBounds);                                   \
-    void* dst = static_cast<void*>(memory->data.data() +                \
-                                   static_cast<uint32_t>(offset));      \
-    memcpy(dst, &src, sizeof(MEM_TYPE_##mem_type));                     \
+#define STORE(type, mem_type)                                             \
+  do {                                                                    \
+    GET_MEMORY(memory);                                                   \
+    VALUE_TYPE_##type value = POP_##type();                               \
+    uint64_t offset = static_cast<uint64_t>(POP_I32()) + read_u32(&pc);   \
+    MEM_TYPE_##mem_type src = static_cast<MEM_TYPE_##mem_type>(value);    \
+    TRAP_IF(offset + sizeof(src) > memory->data.size(),                   \
+            MemoryAccessOutOfBounds);                                     \
+    void* dst = memory->data.data() + static_cast<IstreamOffset>(offset); \
+    memcpy(dst, &src, sizeof(MEM_TYPE_##mem_type));                       \
   } while (0)
 
 #define BINOP(rtype, type, op)            \
@@ -668,11 +683,15 @@
     }                                                           \
   } while (0)
 
-#define UNOP_FLOAT(type, func)                                 \
-  do {                                                         \
-    FLOAT_TYPE_##type value = BITCAST_TO_##type(POP_##type()); \
-    PUSH_##type(BITCAST_FROM_##type(func(value)));             \
-    break;                                                     \
+#define UNOP_FLOAT(type, func)                                   \
+  do {                                                           \
+    FLOAT_TYPE_##type value = BITCAST_TO_##type(POP_##type());   \
+    VALUE_TYPE_##type result = BITCAST_FROM_##type(func(value)); \
+    if (WABT_UNLIKELY(IS_NAN_##type(result))) {                  \
+      result |= type##_QUIET_NAN_BIT;                            \
+    }                                                            \
+    PUSH_##type(result);                                         \
+    break;                                                       \
   } while (0)
 
 #define BINOP_FLOAT(type, op)                                \
@@ -760,7 +779,7 @@
 }
 
 static WABT_INLINE void read_table_entry_at(const uint8_t* pc,
-                                            uint32_t* out_offset,
+                                            IstreamOffset* out_offset,
                                             uint32_t* out_drop,
                                             uint8_t* out_keep) {
   *out_offset = read_u32_at(pc + WABT_TABLE_ENTRY_OFFSET_OFFSET);
@@ -768,27 +787,97 @@
   *out_keep = *(pc + WABT_TABLE_ENTRY_KEEP_OFFSET);
 }
 
-bool func_signatures_are_equal(InterpreterEnvironment* env,
-                               uint32_t sig_index_0,
-                               uint32_t sig_index_1) {
+bool Environment::FuncSignaturesAreEqual(Index sig_index_0,
+                                         Index sig_index_1) const {
   if (sig_index_0 == sig_index_1)
     return true;
-  InterpreterFuncSignature* sig_0 = &env->sigs[sig_index_0];
-  InterpreterFuncSignature* sig_1 = &env->sigs[sig_index_1];
+  const FuncSignature* sig_0 = &sigs_[sig_index_0];
+  const FuncSignature* sig_1 = &sigs_[sig_index_1];
   return sig_0->param_types == sig_1->param_types &&
          sig_0->result_types == sig_1->result_types;
 }
 
-InterpreterResult call_host(InterpreterThread* thread,
-                            HostInterpreterFunc* func) {
-  InterpreterFuncSignature* sig = &thread->env->sigs[func->sig_index];
+Result Thread::RunFunction(Index func_index,
+                           const std::vector<TypedValue>& args,
+                           std::vector<TypedValue>* out_results) {
+  Func* func = env_->GetFunc(func_index);
+  FuncSignature* sig = env_->GetFuncSignature(func->sig_index);
+
+  Result result = PushArgs(sig, args);
+  if (result == Result::Ok) {
+    result = func->is_host ? CallHost(func->as_host())
+                           : RunDefinedFunction(func->as_defined()->offset);
+    if (result == Result::Ok)
+      CopyResults(sig, out_results);
+  }
+
+  // Always reset the value and call stacks.
+  value_stack_top_ = value_stack_.data();
+  call_stack_top_ = call_stack_.data();
+  return result;
+}
+
+Result Thread::TraceFunction(Index func_index,
+                             Stream* stream,
+                             const std::vector<TypedValue>& args,
+                             std::vector<TypedValue>* out_results) {
+  Func* func = env_->GetFunc(func_index);
+  FuncSignature* sig = env_->GetFuncSignature(func->sig_index);
+
+  Result result = PushArgs(sig, args);
+  if (result == Result::Ok) {
+    result = func->is_host
+                 ? CallHost(func->as_host())
+                 : TraceDefinedFunction(func->as_defined()->offset, stream);
+    if (result == Result::Ok)
+      CopyResults(sig, out_results);
+  }
+
+  // Always reset the value and call stacks.
+  value_stack_top_ = value_stack_.data();
+  call_stack_top_ = call_stack_.data();
+  return result;
+}
+
+Result Thread::RunDefinedFunction(IstreamOffset function_offset) {
+  const int kNumInstructions = 1000;
+  Result result = Result::Ok;
+  pc_ = function_offset;
+  IstreamOffset* call_stack_return_top = call_stack_top_;
+  while (result == Result::Ok) {
+    result = Run(kNumInstructions, call_stack_return_top);
+  }
+  if (result != Result::Returned)
+    return result;
+  // Use OK instead of RETURNED for consistency.
+  return Result::Ok;
+}
+
+Result Thread::TraceDefinedFunction(IstreamOffset function_offset,
+                                    Stream* stream) {
+  const int kNumInstructions = 1;
+  Result result = Result::Ok;
+  pc_ = function_offset;
+  IstreamOffset* call_stack_return_top = call_stack_top_;
+  while (result == Result::Ok) {
+    Trace(stream);
+    result = Run(kNumInstructions, call_stack_return_top);
+  }
+  if (result != Result::Returned)
+    return result;
+  // Use OK instead of RETURNED for consistency.
+  return Result::Ok;
+}
+
+Result Thread::CallHost(HostFunc* func) {
+  FuncSignature* sig = &env_->sigs_[func->sig_index];
 
   size_t num_params = sig->param_types.size();
   size_t num_results = sig->result_types.size();
   // + 1 is a workaround for using data() below; UBSAN doesn't like calling
   // data() with an empty vector.
-  std::vector<InterpreterTypedValue> params(num_params + 1);
-  std::vector<InterpreterTypedValue> results(num_results + 1);
+  std::vector<TypedValue> params(num_params + 1);
+  std::vector<TypedValue> results(num_results + 1);
 
   for (size_t i = num_params; i > 0; --i) {
     params[i - 1].value = POP();
@@ -805,49 +894,45 @@
     PUSH(results[i].value);
   }
 
-  return InterpreterResult::Ok;
+  return Result::Ok;
 }
 
-InterpreterResult run_interpreter(InterpreterThread* thread,
-                                  uint32_t num_instructions,
-                                  uint32_t* call_stack_return_top) {
-  InterpreterResult result = InterpreterResult::Ok;
-  assert(call_stack_return_top < thread->call_stack_end);
+Result Thread::Run(int num_instructions, IstreamOffset* call_stack_return_top) {
+  Result result = Result::Ok;
+  assert(call_stack_return_top < call_stack_end_);
 
-  InterpreterEnvironment* env = thread->env;
-
-  const uint8_t* istream = reinterpret_cast<const uint8_t*>(env->istream.start);
-  const uint8_t* pc = &istream[thread->pc];
-  for (uint32_t i = 0; i < num_instructions; ++i) {
-    InterpreterOpcode opcode = static_cast<InterpreterOpcode>(*pc++);
+  const uint8_t* istream = env_->istream_->data.data();
+  const uint8_t* pc = &istream[pc_];
+  for (int i = 0; i < num_instructions; ++i) {
+    Opcode opcode = static_cast<Opcode>(*pc++);
     switch (opcode) {
-      case InterpreterOpcode::Select: {
+      case Opcode::Select: {
         VALUE_TYPE_I32 cond = POP_I32();
-        InterpreterValue false_ = POP();
-        InterpreterValue true_ = POP();
+        Value false_ = POP();
+        Value true_ = POP();
         PUSH(cond ? true_ : false_);
         break;
       }
 
-      case InterpreterOpcode::Br:
+      case Opcode::Br:
         GOTO(read_u32(&pc));
         break;
 
-      case InterpreterOpcode::BrIf: {
-        uint32_t new_pc = read_u32(&pc);
+      case Opcode::BrIf: {
+        IstreamOffset new_pc = read_u32(&pc);
         if (POP_I32())
           GOTO(new_pc);
         break;
       }
 
-      case InterpreterOpcode::BrTable: {
-        uint32_t num_targets = read_u32(&pc);
-        uint32_t table_offset = read_u32(&pc);
+      case Opcode::BrTable: {
+        Index num_targets = read_u32(&pc);
+        IstreamOffset table_offset = read_u32(&pc);
         VALUE_TYPE_I32 key = POP_I32();
-        uint32_t key_offset =
+        IstreamOffset key_offset =
             (key >= num_targets ? num_targets : key) * WABT_TABLE_ENTRY_SIZE;
         const uint8_t* entry = istream + table_offset + key_offset;
-        uint32_t new_pc;
+        IstreamOffset new_pc;
         uint32_t drop_count;
         uint8_t keep_count;
         read_table_entry_at(entry, &new_pc, &drop_count, &keep_count);
@@ -856,84 +941,84 @@
         break;
       }
 
-      case InterpreterOpcode::Return:
-        if (thread->call_stack_top == call_stack_return_top) {
-          result = InterpreterResult::Returned;
+      case Opcode::Return:
+        if (call_stack_top_ == call_stack_return_top) {
+          result = Result::Returned;
           goto exit_loop;
         }
         GOTO(POP_CALL());
         break;
 
-      case InterpreterOpcode::Unreachable:
+      case Opcode::Unreachable:
         TRAP(Unreachable);
         break;
 
-      case InterpreterOpcode::I32Const:
+      case Opcode::I32Const:
         PUSH_I32(read_u32(&pc));
         break;
 
-      case InterpreterOpcode::I64Const:
+      case Opcode::I64Const:
         PUSH_I64(read_u64(&pc));
         break;
 
-      case InterpreterOpcode::F32Const:
+      case Opcode::F32Const:
         PUSH_F32(read_u32(&pc));
         break;
 
-      case InterpreterOpcode::F64Const:
+      case Opcode::F64Const:
         PUSH_F64(read_u64(&pc));
         break;
 
-      case InterpreterOpcode::GetGlobal: {
-        uint32_t index = read_u32(&pc);
-        assert(index < env->globals.size());
-        PUSH(env->globals[index].typed_value.value);
+      case Opcode::GetGlobal: {
+        Index index = read_u32(&pc);
+        assert(index < env_->globals_.size());
+        PUSH(env_->globals_[index].typed_value.value);
         break;
       }
 
-      case InterpreterOpcode::SetGlobal: {
-        uint32_t index = read_u32(&pc);
-        assert(index < env->globals.size());
-        env->globals[index].typed_value.value = POP();
+      case Opcode::SetGlobal: {
+        Index index = read_u32(&pc);
+        assert(index < env_->globals_.size());
+        env_->globals_[index].typed_value.value = POP();
         break;
       }
 
-      case InterpreterOpcode::GetLocal: {
-        InterpreterValue value = PICK(read_u32(&pc));
+      case Opcode::GetLocal: {
+        Value value = PICK(read_u32(&pc));
         PUSH(value);
         break;
       }
 
-      case InterpreterOpcode::SetLocal: {
-        InterpreterValue value = POP();
+      case Opcode::SetLocal: {
+        Value value = POP();
         PICK(read_u32(&pc)) = value;
         break;
       }
 
-      case InterpreterOpcode::TeeLocal:
+      case Opcode::TeeLocal:
         PICK(read_u32(&pc)) = TOP();
         break;
 
-      case InterpreterOpcode::Call: {
-        uint32_t offset = read_u32(&pc);
+      case Opcode::Call: {
+        IstreamOffset offset = read_u32(&pc);
         PUSH_CALL();
         GOTO(offset);
         break;
       }
 
-      case InterpreterOpcode::CallIndirect: {
-        uint32_t table_index = read_u32(&pc);
-        InterpreterTable* table = &env->tables[table_index];
-        uint32_t sig_index = read_u32(&pc);
+      case Opcode::CallIndirect: {
+        Index table_index = read_u32(&pc);
+        Table* table = &env_->tables_[table_index];
+        Index sig_index = read_u32(&pc);
         VALUE_TYPE_I32 entry_index = POP_I32();
         TRAP_IF(entry_index >= table->func_indexes.size(), UndefinedTableIndex);
-        uint32_t func_index = table->func_indexes[entry_index];
-        TRAP_IF(func_index == WABT_INVALID_INDEX, UninitializedTableElement);
-        InterpreterFunc* func = env->funcs[func_index].get();
-        TRAP_UNLESS(func_signatures_are_equal(env, func->sig_index, sig_index),
+        Index func_index = table->func_indexes[entry_index];
+        TRAP_IF(func_index == kInvalidIndex, UninitializedTableElement);
+        Func* func = env_->funcs_[func_index].get();
+        TRAP_UNLESS(env_->FuncSignaturesAreEqual(func->sig_index, sig_index),
                     IndirectCallSignatureMismatch);
         if (func->is_host) {
-          call_host(thread, func->as_host());
+          CallHost(func->as_host());
         } else {
           PUSH_CALL();
           GOTO(func->as_defined()->offset);
@@ -941,111 +1026,111 @@
         break;
       }
 
-      case InterpreterOpcode::CallHost: {
-        uint32_t func_index = read_u32(&pc);
-        call_host(thread, env->funcs[func_index]->as_host());
+      case Opcode::CallHost: {
+        Index func_index = read_u32(&pc);
+        CallHost(env_->funcs_[func_index]->as_host());
         break;
       }
 
-      case InterpreterOpcode::I32Load8S:
+      case Opcode::I32Load8S:
         LOAD(I32, I8);
         break;
 
-      case InterpreterOpcode::I32Load8U:
+      case Opcode::I32Load8U:
         LOAD(I32, U8);
         break;
 
-      case InterpreterOpcode::I32Load16S:
+      case Opcode::I32Load16S:
         LOAD(I32, I16);
         break;
 
-      case InterpreterOpcode::I32Load16U:
+      case Opcode::I32Load16U:
         LOAD(I32, U16);
         break;
 
-      case InterpreterOpcode::I64Load8S:
+      case Opcode::I64Load8S:
         LOAD(I64, I8);
         break;
 
-      case InterpreterOpcode::I64Load8U:
+      case Opcode::I64Load8U:
         LOAD(I64, U8);
         break;
 
-      case InterpreterOpcode::I64Load16S:
+      case Opcode::I64Load16S:
         LOAD(I64, I16);
         break;
 
-      case InterpreterOpcode::I64Load16U:
+      case Opcode::I64Load16U:
         LOAD(I64, U16);
         break;
 
-      case InterpreterOpcode::I64Load32S:
+      case Opcode::I64Load32S:
         LOAD(I64, I32);
         break;
 
-      case InterpreterOpcode::I64Load32U:
+      case Opcode::I64Load32U:
         LOAD(I64, U32);
         break;
 
-      case InterpreterOpcode::I32Load:
+      case Opcode::I32Load:
         LOAD(I32, U32);
         break;
 
-      case InterpreterOpcode::I64Load:
+      case Opcode::I64Load:
         LOAD(I64, U64);
         break;
 
-      case InterpreterOpcode::F32Load:
+      case Opcode::F32Load:
         LOAD(F32, F32);
         break;
 
-      case InterpreterOpcode::F64Load:
+      case Opcode::F64Load:
         LOAD(F64, F64);
         break;
 
-      case InterpreterOpcode::I32Store8:
+      case Opcode::I32Store8:
         STORE(I32, U8);
         break;
 
-      case InterpreterOpcode::I32Store16:
+      case Opcode::I32Store16:
         STORE(I32, U16);
         break;
 
-      case InterpreterOpcode::I64Store8:
+      case Opcode::I64Store8:
         STORE(I64, U8);
         break;
 
-      case InterpreterOpcode::I64Store16:
+      case Opcode::I64Store16:
         STORE(I64, U16);
         break;
 
-      case InterpreterOpcode::I64Store32:
+      case Opcode::I64Store32:
         STORE(I64, U32);
         break;
 
-      case InterpreterOpcode::I32Store:
+      case Opcode::I32Store:
         STORE(I32, U32);
         break;
 
-      case InterpreterOpcode::I64Store:
+      case Opcode::I64Store:
         STORE(I64, U64);
         break;
 
-      case InterpreterOpcode::F32Store:
+      case Opcode::F32Store:
         STORE(F32, F32);
         break;
 
-      case InterpreterOpcode::F64Store:
+      case Opcode::F64Store:
         STORE(F64, F64);
         break;
 
-      case InterpreterOpcode::CurrentMemory: {
+      case Opcode::CurrentMemory: {
         GET_MEMORY(memory);
         PUSH_I32(memory->page_limits.initial);
         break;
       }
 
-      case InterpreterOpcode::GrowMemory: {
+      case Opcode::GrowMemory: {
         GET_MEMORY(memory);
         uint32_t old_page_size = memory->page_limits.initial;
         VALUE_TYPE_I32 grow_pages = POP_I32();
@@ -1062,399 +1147,399 @@
         break;
       }
 
-      case InterpreterOpcode::I32Add:
+      case Opcode::I32Add:
         BINOP(I32, I32, +);
         break;
 
-      case InterpreterOpcode::I32Sub:
+      case Opcode::I32Sub:
         BINOP(I32, I32, -);
         break;
 
-      case InterpreterOpcode::I32Mul:
+      case Opcode::I32Mul:
         BINOP(I32, I32, *);
         break;
 
-      case InterpreterOpcode::I32DivS:
+      case Opcode::I32DivS:
         BINOP_DIV_S(I32);
         break;
 
-      case InterpreterOpcode::I32DivU:
+      case Opcode::I32DivU:
         BINOP_DIV_REM_U(I32, /);
         break;
 
-      case InterpreterOpcode::I32RemS:
+      case Opcode::I32RemS:
         BINOP_REM_S(I32);
         break;
 
-      case InterpreterOpcode::I32RemU:
+      case Opcode::I32RemU:
         BINOP_DIV_REM_U(I32, %);
         break;
 
-      case InterpreterOpcode::I32And:
+      case Opcode::I32And:
         BINOP(I32, I32, &);
         break;
 
-      case InterpreterOpcode::I32Or:
+      case Opcode::I32Or:
         BINOP(I32, I32, |);
         break;
 
-      case InterpreterOpcode::I32Xor:
+      case Opcode::I32Xor:
         BINOP(I32, I32, ^);
         break;
 
-      case InterpreterOpcode::I32Shl:
+      case Opcode::I32Shl:
         BINOP_SHIFT(I32, <<, UNSIGNED);
         break;
 
-      case InterpreterOpcode::I32ShrU:
+      case Opcode::I32ShrU:
         BINOP_SHIFT(I32, >>, UNSIGNED);
         break;
 
-      case InterpreterOpcode::I32ShrS:
+      case Opcode::I32ShrS:
         BINOP_SHIFT(I32, >>, SIGNED);
         break;
 
-      case InterpreterOpcode::I32Eq:
+      case Opcode::I32Eq:
         BINOP(I32, I32, ==);
         break;
 
-      case InterpreterOpcode::I32Ne:
+      case Opcode::I32Ne:
         BINOP(I32, I32, !=);
         break;
 
-      case InterpreterOpcode::I32LtS:
+      case Opcode::I32LtS:
         BINOP_SIGNED(I32, I32, <);
         break;
 
-      case InterpreterOpcode::I32LeS:
+      case Opcode::I32LeS:
         BINOP_SIGNED(I32, I32, <=);
         break;
 
-      case InterpreterOpcode::I32LtU:
+      case Opcode::I32LtU:
         BINOP(I32, I32, <);
         break;
 
-      case InterpreterOpcode::I32LeU:
+      case Opcode::I32LeU:
         BINOP(I32, I32, <=);
         break;
 
-      case InterpreterOpcode::I32GtS:
+      case Opcode::I32GtS:
         BINOP_SIGNED(I32, I32, >);
         break;
 
-      case InterpreterOpcode::I32GeS:
+      case Opcode::I32GeS:
         BINOP_SIGNED(I32, I32, >=);
         break;
 
-      case InterpreterOpcode::I32GtU:
+      case Opcode::I32GtU:
         BINOP(I32, I32, >);
         break;
 
-      case InterpreterOpcode::I32GeU:
+      case Opcode::I32GeU:
         BINOP(I32, I32, >=);
         break;
 
-      case InterpreterOpcode::I32Clz: {
+      case Opcode::I32Clz: {
         VALUE_TYPE_I32 value = POP_I32();
         PUSH_I32(value != 0 ? wabt_clz_u32(value) : 32);
         break;
       }
 
-      case InterpreterOpcode::I32Ctz: {
+      case Opcode::I32Ctz: {
         VALUE_TYPE_I32 value = POP_I32();
         PUSH_I32(value != 0 ? wabt_ctz_u32(value) : 32);
         break;
       }
 
-      case InterpreterOpcode::I32Popcnt: {
+      case Opcode::I32Popcnt: {
         VALUE_TYPE_I32 value = POP_I32();
         PUSH_I32(wabt_popcount_u32(value));
         break;
       }
 
-      case InterpreterOpcode::I32Eqz: {
+      case Opcode::I32Eqz: {
         VALUE_TYPE_I32 value = POP_I32();
         PUSH_I32(value == 0);
         break;
       }
 
-      case InterpreterOpcode::I64Add:
+      case Opcode::I64Add:
         BINOP(I64, I64, +);
         break;
 
-      case InterpreterOpcode::I64Sub:
+      case Opcode::I64Sub:
         BINOP(I64, I64, -);
         break;
 
-      case InterpreterOpcode::I64Mul:
+      case Opcode::I64Mul:
         BINOP(I64, I64, *);
         break;
 
-      case InterpreterOpcode::I64DivS:
+      case Opcode::I64DivS:
         BINOP_DIV_S(I64);
         break;
 
-      case InterpreterOpcode::I64DivU:
+      case Opcode::I64DivU:
         BINOP_DIV_REM_U(I64, /);
         break;
 
-      case InterpreterOpcode::I64RemS:
+      case Opcode::I64RemS:
         BINOP_REM_S(I64);
         break;
 
-      case InterpreterOpcode::I64RemU:
+      case Opcode::I64RemU:
         BINOP_DIV_REM_U(I64, %);
         break;
 
-      case InterpreterOpcode::I64And:
+      case Opcode::I64And:
         BINOP(I64, I64, &);
         break;
 
-      case InterpreterOpcode::I64Or:
+      case Opcode::I64Or:
         BINOP(I64, I64, |);
         break;
 
-      case InterpreterOpcode::I64Xor:
+      case Opcode::I64Xor:
         BINOP(I64, I64, ^);
         break;
 
-      case InterpreterOpcode::I64Shl:
+      case Opcode::I64Shl:
         BINOP_SHIFT(I64, <<, UNSIGNED);
         break;
 
-      case InterpreterOpcode::I64ShrU:
+      case Opcode::I64ShrU:
         BINOP_SHIFT(I64, >>, UNSIGNED);
         break;
 
-      case InterpreterOpcode::I64ShrS:
+      case Opcode::I64ShrS:
         BINOP_SHIFT(I64, >>, SIGNED);
         break;
 
-      case InterpreterOpcode::I64Eq:
+      case Opcode::I64Eq:
         BINOP(I32, I64, ==);
         break;
 
-      case InterpreterOpcode::I64Ne:
+      case Opcode::I64Ne:
         BINOP(I32, I64, !=);
         break;
 
-      case InterpreterOpcode::I64LtS:
+      case Opcode::I64LtS:
         BINOP_SIGNED(I32, I64, <);
         break;
 
-      case InterpreterOpcode::I64LeS:
+      case Opcode::I64LeS:
         BINOP_SIGNED(I32, I64, <=);
         break;
 
-      case InterpreterOpcode::I64LtU:
+      case Opcode::I64LtU:
         BINOP(I32, I64, <);
         break;
 
-      case InterpreterOpcode::I64LeU:
+      case Opcode::I64LeU:
         BINOP(I32, I64, <=);
         break;
 
-      case InterpreterOpcode::I64GtS:
+      case Opcode::I64GtS:
         BINOP_SIGNED(I32, I64, >);
         break;
 
-      case InterpreterOpcode::I64GeS:
+      case Opcode::I64GeS:
         BINOP_SIGNED(I32, I64, >=);
         break;
 
-      case InterpreterOpcode::I64GtU:
+      case Opcode::I64GtU:
         BINOP(I32, I64, >);
         break;
 
-      case InterpreterOpcode::I64GeU:
+      case Opcode::I64GeU:
         BINOP(I32, I64, >=);
         break;
 
-      case InterpreterOpcode::I64Clz: {
+      case Opcode::I64Clz: {
         VALUE_TYPE_I64 value = POP_I64();
         PUSH_I64(value != 0 ? wabt_clz_u64(value) : 64);
         break;
       }
 
-      case InterpreterOpcode::I64Ctz: {
+      case Opcode::I64Ctz: {
         VALUE_TYPE_I64 value = POP_I64();
         PUSH_I64(value != 0 ? wabt_ctz_u64(value) : 64);
         break;
       }
 
-      case InterpreterOpcode::I64Popcnt: {
+      case Opcode::I64Popcnt: {
         VALUE_TYPE_I64 value = POP_I64();
         PUSH_I64(wabt_popcount_u64(value));
         break;
       }
 
-      case InterpreterOpcode::F32Add:
+      case Opcode::F32Add:
         BINOP_FLOAT(F32, +);
         break;
 
-      case InterpreterOpcode::F32Sub:
+      case Opcode::F32Sub:
         BINOP_FLOAT(F32, -);
         break;
 
-      case InterpreterOpcode::F32Mul:
+      case Opcode::F32Mul:
         BINOP_FLOAT(F32, *);
         break;
 
-      case InterpreterOpcode::F32Div:
+      case Opcode::F32Div:
         BINOP_FLOAT_DIV(F32);
         break;
 
-      case InterpreterOpcode::F32Min:
+      case Opcode::F32Min:
         MINMAX_FLOAT(F32, MIN);
         break;
 
-      case InterpreterOpcode::F32Max:
+      case Opcode::F32Max:
         MINMAX_FLOAT(F32, MAX);
         break;
 
-      case InterpreterOpcode::F32Abs:
+      case Opcode::F32Abs:
         TOP().f32_bits &= ~F32_SIGN_MASK;
         break;
 
-      case InterpreterOpcode::F32Neg:
+      case Opcode::F32Neg:
         TOP().f32_bits ^= F32_SIGN_MASK;
         break;
 
-      case InterpreterOpcode::F32Copysign: {
+      case Opcode::F32Copysign: {
         VALUE_TYPE_F32 rhs = POP_F32();
         VALUE_TYPE_F32 lhs = POP_F32();
         PUSH_F32((lhs & ~F32_SIGN_MASK) | (rhs & F32_SIGN_MASK));
         break;
       }
 
-      case InterpreterOpcode::F32Ceil:
+      case Opcode::F32Ceil:
         UNOP_FLOAT(F32, ceilf);
         break;
 
-      case InterpreterOpcode::F32Floor:
+      case Opcode::F32Floor:
         UNOP_FLOAT(F32, floorf);
         break;
 
-      case InterpreterOpcode::F32Trunc:
+      case Opcode::F32Trunc:
         UNOP_FLOAT(F32, truncf);
         break;
 
-      case InterpreterOpcode::F32Nearest:
+      case Opcode::F32Nearest:
         UNOP_FLOAT(F32, nearbyintf);
         break;
 
-      case InterpreterOpcode::F32Sqrt:
+      case Opcode::F32Sqrt:
         UNOP_FLOAT(F32, sqrtf);
         break;
 
-      case InterpreterOpcode::F32Eq:
+      case Opcode::F32Eq:
         BINOP_FLOAT_COMPARE(F32, ==);
         break;
 
-      case InterpreterOpcode::F32Ne:
+      case Opcode::F32Ne:
         BINOP_FLOAT_COMPARE(F32, !=);
         break;
 
-      case InterpreterOpcode::F32Lt:
+      case Opcode::F32Lt:
         BINOP_FLOAT_COMPARE(F32, <);
         break;
 
-      case InterpreterOpcode::F32Le:
+      case Opcode::F32Le:
         BINOP_FLOAT_COMPARE(F32, <=);
         break;
 
-      case InterpreterOpcode::F32Gt:
+      case Opcode::F32Gt:
         BINOP_FLOAT_COMPARE(F32, >);
         break;
 
-      case InterpreterOpcode::F32Ge:
+      case Opcode::F32Ge:
         BINOP_FLOAT_COMPARE(F32, >=);
         break;
 
-      case InterpreterOpcode::F64Add:
+      case Opcode::F64Add:
         BINOP_FLOAT(F64, +);
         break;
 
-      case InterpreterOpcode::F64Sub:
+      case Opcode::F64Sub:
         BINOP_FLOAT(F64, -);
         break;
 
-      case InterpreterOpcode::F64Mul:
+      case Opcode::F64Mul:
         BINOP_FLOAT(F64, *);
         break;
 
-      case InterpreterOpcode::F64Div:
+      case Opcode::F64Div:
         BINOP_FLOAT_DIV(F64);
         break;
 
-      case InterpreterOpcode::F64Min:
+      case Opcode::F64Min:
         MINMAX_FLOAT(F64, MIN);
         break;
 
-      case InterpreterOpcode::F64Max:
+      case Opcode::F64Max:
         MINMAX_FLOAT(F64, MAX);
         break;
 
-      case InterpreterOpcode::F64Abs:
+      case Opcode::F64Abs:
         TOP().f64_bits &= ~F64_SIGN_MASK;
         break;
 
-      case InterpreterOpcode::F64Neg:
+      case Opcode::F64Neg:
         TOP().f64_bits ^= F64_SIGN_MASK;
         break;
 
-      case InterpreterOpcode::F64Copysign: {
+      case Opcode::F64Copysign: {
         VALUE_TYPE_F64 rhs = POP_F64();
         VALUE_TYPE_F64 lhs = POP_F64();
         PUSH_F64((lhs & ~F64_SIGN_MASK) | (rhs & F64_SIGN_MASK));
         break;
       }
 
-      case InterpreterOpcode::F64Ceil:
+      case Opcode::F64Ceil:
         UNOP_FLOAT(F64, ceil);
         break;
 
-      case InterpreterOpcode::F64Floor:
+      case Opcode::F64Floor:
         UNOP_FLOAT(F64, floor);
         break;
 
-      case InterpreterOpcode::F64Trunc:
+      case Opcode::F64Trunc:
         UNOP_FLOAT(F64, trunc);
         break;
 
-      case InterpreterOpcode::F64Nearest:
+      case Opcode::F64Nearest:
         UNOP_FLOAT(F64, nearbyint);
         break;
 
-      case InterpreterOpcode::F64Sqrt:
+      case Opcode::F64Sqrt:
         UNOP_FLOAT(F64, sqrt);
         break;
 
-      case InterpreterOpcode::F64Eq:
+      case Opcode::F64Eq:
         BINOP_FLOAT_COMPARE(F64, ==);
         break;
 
-      case InterpreterOpcode::F64Ne:
+      case Opcode::F64Ne:
         BINOP_FLOAT_COMPARE(F64, !=);
         break;
 
-      case InterpreterOpcode::F64Lt:
+      case Opcode::F64Lt:
         BINOP_FLOAT_COMPARE(F64, <);
         break;
 
-      case InterpreterOpcode::F64Le:
+      case Opcode::F64Le:
         BINOP_FLOAT_COMPARE(F64, <=);
         break;
 
-      case InterpreterOpcode::F64Gt:
+      case Opcode::F64Gt:
         BINOP_FLOAT_COMPARE(F64, >);
         break;
 
-      case InterpreterOpcode::F64Ge:
+      case Opcode::F64Ge:
         BINOP_FLOAT_COMPARE(F64, >=);
         break;
 
-      case InterpreterOpcode::I32TruncSF32: {
+      case Opcode::I32TruncSF32: {
         VALUE_TYPE_F32 value = POP_F32();
         TRAP_IF(is_nan_f32(value), InvalidConversionToInteger);
         TRAP_UNLESS(is_in_range_i32_trunc_s_f32(value), IntegerOverflow);
@@ -1462,7 +1547,7 @@
         break;
       }
 
-      case InterpreterOpcode::I32TruncSF64: {
+      case Opcode::I32TruncSF64: {
         VALUE_TYPE_F64 value = POP_F64();
         TRAP_IF(is_nan_f64(value), InvalidConversionToInteger);
         TRAP_UNLESS(is_in_range_i32_trunc_s_f64(value), IntegerOverflow);
@@ -1470,7 +1555,7 @@
         break;
       }
 
-      case InterpreterOpcode::I32TruncUF32: {
+      case Opcode::I32TruncUF32: {
         VALUE_TYPE_F32 value = POP_F32();
         TRAP_IF(is_nan_f32(value), InvalidConversionToInteger);
         TRAP_UNLESS(is_in_range_i32_trunc_u_f32(value), IntegerOverflow);
@@ -1478,7 +1563,7 @@
         break;
       }
 
-      case InterpreterOpcode::I32TruncUF64: {
+      case Opcode::I32TruncUF64: {
         VALUE_TYPE_F64 value = POP_F64();
         TRAP_IF(is_nan_f64(value), InvalidConversionToInteger);
         TRAP_UNLESS(is_in_range_i32_trunc_u_f64(value), IntegerOverflow);
@@ -1486,13 +1571,13 @@
         break;
       }
 
-      case InterpreterOpcode::I32WrapI64: {
+      case Opcode::I32WrapI64: {
         VALUE_TYPE_I64 value = POP_I64();
         PUSH_I32(static_cast<uint32_t>(value));
         break;
       }
 
-      case InterpreterOpcode::I64TruncSF32: {
+      case Opcode::I64TruncSF32: {
         VALUE_TYPE_F32 value = POP_F32();
         TRAP_IF(is_nan_f32(value), InvalidConversionToInteger);
         TRAP_UNLESS(is_in_range_i64_trunc_s_f32(value), IntegerOverflow);
@@ -1500,7 +1585,7 @@
         break;
       }
 
-      case InterpreterOpcode::I64TruncSF64: {
+      case Opcode::I64TruncSF64: {
         VALUE_TYPE_F64 value = POP_F64();
         TRAP_IF(is_nan_f64(value), InvalidConversionToInteger);
         TRAP_UNLESS(is_in_range_i64_trunc_s_f64(value), IntegerOverflow);
@@ -1508,7 +1593,7 @@
         break;
       }
 
-      case InterpreterOpcode::I64TruncUF32: {
+      case Opcode::I64TruncUF32: {
         VALUE_TYPE_F32 value = POP_F32();
         TRAP_IF(is_nan_f32(value), InvalidConversionToInteger);
         TRAP_UNLESS(is_in_range_i64_trunc_u_f32(value), IntegerOverflow);
@@ -1516,7 +1601,7 @@
         break;
       }
 
-      case InterpreterOpcode::I64TruncUF64: {
+      case Opcode::I64TruncUF64: {
         VALUE_TYPE_F64 value = POP_F64();
         TRAP_IF(is_nan_f64(value), InvalidConversionToInteger);
         TRAP_UNLESS(is_in_range_i64_trunc_u_f64(value), IntegerOverflow);
@@ -1524,45 +1609,45 @@
         break;
       }
 
-      case InterpreterOpcode::I64ExtendSI32: {
+      case Opcode::I64ExtendSI32: {
         VALUE_TYPE_I32 value = POP_I32();
         PUSH_I64(static_cast<int64_t>(BITCAST_I32_TO_SIGNED(value)));
         break;
       }
 
-      case InterpreterOpcode::I64ExtendUI32: {
+      case Opcode::I64ExtendUI32: {
         VALUE_TYPE_I32 value = POP_I32();
         PUSH_I64(static_cast<uint64_t>(value));
         break;
       }
 
-      case InterpreterOpcode::F32ConvertSI32: {
+      case Opcode::F32ConvertSI32: {
         VALUE_TYPE_I32 value = POP_I32();
         PUSH_F32(
             BITCAST_FROM_F32(static_cast<float>(BITCAST_I32_TO_SIGNED(value))));
         break;
       }
 
-      case InterpreterOpcode::F32ConvertUI32: {
+      case Opcode::F32ConvertUI32: {
         VALUE_TYPE_I32 value = POP_I32();
         PUSH_F32(BITCAST_FROM_F32(static_cast<float>(value)));
         break;
       }
 
-      case InterpreterOpcode::F32ConvertSI64: {
+      case Opcode::F32ConvertSI64: {
         VALUE_TYPE_I64 value = POP_I64();
         PUSH_F32(
             BITCAST_FROM_F32(static_cast<float>(BITCAST_I64_TO_SIGNED(value))));
         break;
       }
 
-      case InterpreterOpcode::F32ConvertUI64: {
+      case Opcode::F32ConvertUI64: {
         VALUE_TYPE_I64 value = POP_I64();
-        PUSH_F32(BITCAST_FROM_F32(static_cast<float>(value)));
+        PUSH_F32(BITCAST_FROM_F32(wabt_convert_uint64_to_float(value)));
         break;
       }
 
-      case InterpreterOpcode::F32DemoteF64: {
+      case Opcode::F32DemoteF64: {
         VALUE_TYPE_F64 value = POP_F64();
         if (WABT_LIKELY(is_in_range_f64_demote_f32(value))) {
           PUSH_F32(BITCAST_FROM_F32(static_cast<float>(BITCAST_TO_F64(value))));
@@ -1582,118 +1667,117 @@
         break;
       }
 
-      case InterpreterOpcode::F32ReinterpretI32: {
+      case Opcode::F32ReinterpretI32: {
         VALUE_TYPE_I32 value = POP_I32();
         PUSH_F32(value);
         break;
       }
 
-      case InterpreterOpcode::F64ConvertSI32: {
+      case Opcode::F64ConvertSI32: {
         VALUE_TYPE_I32 value = POP_I32();
         PUSH_F64(BITCAST_FROM_F64(
             static_cast<double>(BITCAST_I32_TO_SIGNED(value))));
         break;
       }
 
-      case InterpreterOpcode::F64ConvertUI32: {
+      case Opcode::F64ConvertUI32: {
         VALUE_TYPE_I32 value = POP_I32();
         PUSH_F64(BITCAST_FROM_F64(static_cast<double>(value)));
         break;
       }
 
-      case InterpreterOpcode::F64ConvertSI64: {
+      case Opcode::F64ConvertSI64: {
         VALUE_TYPE_I64 value = POP_I64();
         PUSH_F64(BITCAST_FROM_F64(
             static_cast<double>(BITCAST_I64_TO_SIGNED(value))));
         break;
       }
 
-      case InterpreterOpcode::F64ConvertUI64: {
+      case Opcode::F64ConvertUI64: {
         VALUE_TYPE_I64 value = POP_I64();
-        PUSH_F64(BITCAST_FROM_F64(static_cast<double>(value)));
+        PUSH_F64(BITCAST_FROM_F64(wabt_convert_uint64_to_double(value)));
         break;
       }
 
-      case InterpreterOpcode::F64PromoteF32: {
+      case Opcode::F64PromoteF32: {
         VALUE_TYPE_F32 value = POP_F32();
         PUSH_F64(BITCAST_FROM_F64(static_cast<double>(BITCAST_TO_F32(value))));
         break;
       }
 
-      case InterpreterOpcode::F64ReinterpretI64: {
+      case Opcode::F64ReinterpretI64: {
         VALUE_TYPE_I64 value = POP_I64();
         PUSH_F64(value);
         break;
       }
 
-      case InterpreterOpcode::I32ReinterpretF32: {
+      case Opcode::I32ReinterpretF32: {
         VALUE_TYPE_F32 value = POP_F32();
         PUSH_I32(value);
         break;
       }
 
-      case InterpreterOpcode::I64ReinterpretF64: {
+      case Opcode::I64ReinterpretF64: {
         VALUE_TYPE_F64 value = POP_F64();
         PUSH_I64(value);
         break;
       }
 
-      case InterpreterOpcode::I32Rotr:
+      case Opcode::I32Rotr:
         BINOP_ROT(I32, RIGHT);
         break;
 
-      case InterpreterOpcode::I32Rotl:
+      case Opcode::I32Rotl:
         BINOP_ROT(I32, LEFT);
         break;
 
-      case InterpreterOpcode::I64Rotr:
+      case Opcode::I64Rotr:
         BINOP_ROT(I64, RIGHT);
         break;
 
-      case InterpreterOpcode::I64Rotl:
+      case Opcode::I64Rotl:
         BINOP_ROT(I64, LEFT);
         break;
 
-      case InterpreterOpcode::I64Eqz: {
+      case Opcode::I64Eqz: {
         VALUE_TYPE_I64 value = POP_I64();
         PUSH_I64(value == 0);
         break;
       }
 
-      case InterpreterOpcode::Alloca: {
-        InterpreterValue* old_value_stack_top = thread->value_stack_top;
-        thread->value_stack_top += read_u32(&pc);
+      case Opcode::Alloca: {
+        Value* old_value_stack_top = value_stack_top_;
+        value_stack_top_ += read_u32(&pc);
         CHECK_STACK();
         memset(old_value_stack_top, 0,
-               (thread->value_stack_top - old_value_stack_top) *
-                   sizeof(InterpreterValue));
+               (value_stack_top_ - old_value_stack_top) * sizeof(Value));
         break;
       }
 
-      case InterpreterOpcode::BrUnless: {
-        uint32_t new_pc = read_u32(&pc);
+      case Opcode::BrUnless: {
+        IstreamOffset new_pc = read_u32(&pc);
         if (!POP_I32())
           GOTO(new_pc);
         break;
       }
 
-      case InterpreterOpcode::Drop:
+      case Opcode::Drop:
         (void)POP();
         break;
 
-      case InterpreterOpcode::DropKeep: {
+      case Opcode::DropKeep: {
         uint32_t drop_count = read_u32(&pc);
         uint8_t keep_count = *pc++;
         DROP_KEEP(drop_count, keep_count);
         break;
       }
 
-      case InterpreterOpcode::Data:
+      case Opcode::Data:
         /* shouldn't ever execute this */
         assert(0);
         break;
 
-      case InterpreterOpcode::Nop:
+      case Opcode::Nop:
         break;
 
       default:
@@ -1703,360 +1787,350 @@
   }
 
 exit_loop:
-  thread->pc = pc - istream;
+  pc_ = pc - istream;
   return result;
 }
 
-void trace_pc(InterpreterThread* thread, Stream* stream) {
-  const uint8_t* istream =
-      reinterpret_cast<const uint8_t*>(thread->env->istream.start);
-  const uint8_t* pc = &istream[thread->pc];
-  size_t value_stack_depth =
-      thread->value_stack_top - thread->value_stack.data();
-  size_t call_stack_depth = thread->call_stack_top - thread->call_stack.data();
+void Thread::Trace(Stream* stream) {
+  const uint8_t* istream = env_->istream_->data.data();
+  const uint8_t* pc = &istream[pc_];
+  size_t value_stack_depth = value_stack_top_ - value_stack_.data();
+  size_t call_stack_depth = call_stack_top_ - call_stack_.data();
 
-  writef(stream, "#%" PRIzd ". %4" PRIzd ": V:%-3" PRIzd "| ", call_stack_depth,
-         pc - reinterpret_cast<uint8_t*>(thread->env->istream.start),
-         value_stack_depth);
+  stream->Writef("#%" PRIzd ". %4" PRIzd ": V:%-3" PRIzd "| ", call_stack_depth,
+                 pc - env_->istream_->data.data(), value_stack_depth);
 
-  InterpreterOpcode opcode = static_cast<InterpreterOpcode>(*pc++);
+  Opcode opcode = static_cast<Opcode>(*pc++);
   switch (opcode) {
-    case InterpreterOpcode::Select:
-      writef(stream, "%s %u, %" PRIu64 ", %" PRIu64 "\n",
-             get_interpreter_opcode_name(opcode), PICK(3).i32, PICK(2).i64,
-             PICK(1).i64);
+    case Opcode::Select:
+      stream->Writef("%s %u, %" PRIu64 ", %" PRIu64 "\n",
+                     get_opcode_name(opcode), PICK(3).i32, PICK(2).i64,
+                     PICK(1).i64);
       break;
 
-    case InterpreterOpcode::Br:
-      writef(stream, "%s @%u\n", get_interpreter_opcode_name(opcode),
-             read_u32_at(pc));
+    case Opcode::Br:
+      stream->Writef("%s @%u\n", get_opcode_name(opcode), read_u32_at(pc));
       break;
 
-    case InterpreterOpcode::BrIf:
-      writef(stream, "%s @%u, %u\n", get_interpreter_opcode_name(opcode),
-             read_u32_at(pc), TOP().i32);
+    case Opcode::BrIf:
+      stream->Writef("%s @%u, %u\n", get_opcode_name(opcode), read_u32_at(pc),
+                     TOP().i32);
       break;
 
-    case InterpreterOpcode::BrTable: {
-      uint32_t num_targets = read_u32_at(pc);
-      uint32_t table_offset = read_u32_at(pc + 4);
+    case Opcode::BrTable: {
+      Index num_targets = read_u32_at(pc);
+      IstreamOffset table_offset = read_u32_at(pc + 4);
       VALUE_TYPE_I32 key = TOP().i32;
-      writef(stream, "%s %u, $#%u, table:$%u\n",
-             get_interpreter_opcode_name(opcode), key, num_targets,
-             table_offset);
+      stream->Writef("%s %u, $#%" PRIindex ", table:$%u\n",
+                     get_opcode_name(opcode), key, num_targets, table_offset);
       break;
     }
 
-    case InterpreterOpcode::Nop:
-    case InterpreterOpcode::Return:
-    case InterpreterOpcode::Unreachable:
-    case InterpreterOpcode::Drop:
-      writef(stream, "%s\n", get_interpreter_opcode_name(opcode));
+    case Opcode::Nop:
+    case Opcode::Return:
+    case Opcode::Unreachable:
+    case Opcode::Drop:
+      stream->Writef("%s\n", get_opcode_name(opcode));
       break;
 
-    case InterpreterOpcode::CurrentMemory: {
-      uint32_t memory_index = read_u32(&pc);
-      writef(stream, "%s $%u\n", get_interpreter_opcode_name(opcode),
-             memory_index);
+    case Opcode::CurrentMemory: {
+      Index memory_index = read_u32(&pc);
+      stream->Writef("%s $%" PRIindex "\n", get_opcode_name(opcode),
+                     memory_index);
       break;
     }
 
-    case InterpreterOpcode::I32Const:
-      writef(stream, "%s $%u\n", get_interpreter_opcode_name(opcode),
-             read_u32_at(pc));
+    case Opcode::I32Const:
+      stream->Writef("%s $%u\n", get_opcode_name(opcode), read_u32_at(pc));
       break;
 
-    case InterpreterOpcode::I64Const:
-      writef(stream, "%s $%" PRIu64 "\n", get_interpreter_opcode_name(opcode),
-             read_u64_at(pc));
+    case Opcode::I64Const:
+      stream->Writef("%s $%" PRIu64 "\n", get_opcode_name(opcode),
+                     read_u64_at(pc));
       break;
 
-    case InterpreterOpcode::F32Const:
-      writef(stream, "%s $%g\n", get_interpreter_opcode_name(opcode),
-             bitcast_u32_to_f32(read_u32_at(pc)));
+    case Opcode::F32Const:
+      stream->Writef("%s $%g\n", get_opcode_name(opcode),
+                     bitcast_u32_to_f32(read_u32_at(pc)));
       break;
 
-    case InterpreterOpcode::F64Const:
-      writef(stream, "%s $%g\n", get_interpreter_opcode_name(opcode),
-             bitcast_u64_to_f64(read_u64_at(pc)));
+    case Opcode::F64Const:
+      stream->Writef("%s $%g\n", get_opcode_name(opcode),
+                     bitcast_u64_to_f64(read_u64_at(pc)));
       break;
 
-    case InterpreterOpcode::GetLocal:
-    case InterpreterOpcode::GetGlobal:
-      writef(stream, "%s $%u\n", get_interpreter_opcode_name(opcode),
-             read_u32_at(pc));
+    case Opcode::GetLocal:
+    case Opcode::GetGlobal:
+      stream->Writef("%s $%u\n", get_opcode_name(opcode), read_u32_at(pc));
       break;
 
-    case InterpreterOpcode::SetLocal:
-    case InterpreterOpcode::SetGlobal:
-    case InterpreterOpcode::TeeLocal:
-      writef(stream, "%s $%u, %u\n", get_interpreter_opcode_name(opcode),
-             read_u32_at(pc), TOP().i32);
+    case Opcode::SetLocal:
+    case Opcode::SetGlobal:
+    case Opcode::TeeLocal:
+      stream->Writef("%s $%u, %u\n", get_opcode_name(opcode), read_u32_at(pc),
+                     TOP().i32);
       break;
 
-    case InterpreterOpcode::Call:
-      writef(stream, "%s @%u\n", get_interpreter_opcode_name(opcode),
-             read_u32_at(pc));
+    case Opcode::Call:
+      stream->Writef("%s @%u\n", get_opcode_name(opcode), read_u32_at(pc));
       break;
 
-    case InterpreterOpcode::CallIndirect:
-      writef(stream, "%s $%u, %u\n", get_interpreter_opcode_name(opcode),
-             read_u32_at(pc), TOP().i32);
+    case Opcode::CallIndirect:
+      stream->Writef("%s $%u, %u\n", get_opcode_name(opcode), read_u32_at(pc),
+                     TOP().i32);
       break;
 
-    case InterpreterOpcode::CallHost:
-      writef(stream, "%s $%u\n", get_interpreter_opcode_name(opcode),
-             read_u32_at(pc));
+    case Opcode::CallHost:
+      stream->Writef("%s $%u\n", get_opcode_name(opcode), read_u32_at(pc));
       break;
 
-    case InterpreterOpcode::I32Load8S:
-    case InterpreterOpcode::I32Load8U:
-    case InterpreterOpcode::I32Load16S:
-    case InterpreterOpcode::I32Load16U:
-    case InterpreterOpcode::I64Load8S:
-    case InterpreterOpcode::I64Load8U:
-    case InterpreterOpcode::I64Load16S:
-    case InterpreterOpcode::I64Load16U:
-    case InterpreterOpcode::I64Load32S:
-    case InterpreterOpcode::I64Load32U:
-    case InterpreterOpcode::I32Load:
-    case InterpreterOpcode::I64Load:
-    case InterpreterOpcode::F32Load:
-    case InterpreterOpcode::F64Load: {
-      uint32_t memory_index = read_u32(&pc);
-      writef(stream, "%s $%u:%u+$%u\n", get_interpreter_opcode_name(opcode),
-             memory_index, TOP().i32, read_u32_at(pc));
+    case Opcode::I32Load8S:
+    case Opcode::I32Load8U:
+    case Opcode::I32Load16S:
+    case Opcode::I32Load16U:
+    case Opcode::I64Load8S:
+    case Opcode::I64Load8U:
+    case Opcode::I64Load16S:
+    case Opcode::I64Load16U:
+    case Opcode::I64Load32S:
+    case Opcode::I64Load32U:
+    case Opcode::I32Load:
+    case Opcode::I64Load:
+    case Opcode::F32Load:
+    case Opcode::F64Load: {
+      Index memory_index = read_u32(&pc);
+      stream->Writef("%s $%" PRIindex ":%u+$%u\n", get_opcode_name(opcode),
+                     memory_index, TOP().i32, read_u32_at(pc));
       break;
     }
 
-    case InterpreterOpcode::I32Store8:
-    case InterpreterOpcode::I32Store16:
-    case InterpreterOpcode::I32Store: {
-      uint32_t memory_index = read_u32(&pc);
-      writef(stream, "%s $%u:%u+$%u, %u\n", get_interpreter_opcode_name(opcode),
-             memory_index, PICK(2).i32, read_u32_at(pc), PICK(1).i32);
+    case Opcode::I32Store8:
+    case Opcode::I32Store16:
+    case Opcode::I32Store: {
+      Index memory_index = read_u32(&pc);
+      stream->Writef("%s $%" PRIindex ":%u+$%u, %u\n", get_opcode_name(opcode),
+                     memory_index, PICK(2).i32, read_u32_at(pc), PICK(1).i32);
       break;
     }
 
-    case InterpreterOpcode::I64Store8:
-    case InterpreterOpcode::I64Store16:
-    case InterpreterOpcode::I64Store32:
-    case InterpreterOpcode::I64Store: {
-      uint32_t memory_index = read_u32(&pc);
-      writef(stream, "%s $%u:%u+$%u, %" PRIu64 "\n",
-             get_interpreter_opcode_name(opcode), memory_index, PICK(2).i32,
-             read_u32_at(pc), PICK(1).i64);
+    case Opcode::I64Store8:
+    case Opcode::I64Store16:
+    case Opcode::I64Store32:
+    case Opcode::I64Store: {
+      Index memory_index = read_u32(&pc);
+      stream->Writef("%s $%" PRIindex ":%u+$%u, %" PRIu64 "\n",
+                     get_opcode_name(opcode), memory_index, PICK(2).i32,
+                     read_u32_at(pc), PICK(1).i64);
       break;
     }
 
-    case InterpreterOpcode::F32Store: {
-      uint32_t memory_index = read_u32(&pc);
-      writef(stream, "%s $%u:%u+$%u, %g\n", get_interpreter_opcode_name(opcode),
-             memory_index, PICK(2).i32, read_u32_at(pc),
-             bitcast_u32_to_f32(PICK(1).f32_bits));
+    case Opcode::F32Store: {
+      Index memory_index = read_u32(&pc);
+      stream->Writef("%s $%" PRIindex ":%u+$%u, %g\n", get_opcode_name(opcode),
+                     memory_index, PICK(2).i32, read_u32_at(pc),
+                     bitcast_u32_to_f32(PICK(1).f32_bits));
       break;
     }
 
-    case InterpreterOpcode::F64Store: {
-      uint32_t memory_index = read_u32(&pc);
-      writef(stream, "%s $%u:%u+$%u, %g\n", get_interpreter_opcode_name(opcode),
-             memory_index, PICK(2).i32, read_u32_at(pc),
-             bitcast_u64_to_f64(PICK(1).f64_bits));
+    case Opcode::F64Store: {
+      Index memory_index = read_u32(&pc);
+      stream->Writef("%s $%" PRIindex ":%u+$%u, %g\n", get_opcode_name(opcode),
+                     memory_index, PICK(2).i32, read_u32_at(pc),
+                     bitcast_u64_to_f64(PICK(1).f64_bits));
       break;
     }
 
-    case InterpreterOpcode::GrowMemory: {
-      uint32_t memory_index = read_u32(&pc);
-      writef(stream, "%s $%u:%u\n", get_interpreter_opcode_name(opcode),
-             memory_index, TOP().i32);
+    case Opcode::GrowMemory: {
+      Index memory_index = read_u32(&pc);
+      stream->Writef("%s $%" PRIindex ":%u\n", get_opcode_name(opcode),
+                     memory_index, TOP().i32);
       break;
     }
 
-    case InterpreterOpcode::I32Add:
-    case InterpreterOpcode::I32Sub:
-    case InterpreterOpcode::I32Mul:
-    case InterpreterOpcode::I32DivS:
-    case InterpreterOpcode::I32DivU:
-    case InterpreterOpcode::I32RemS:
-    case InterpreterOpcode::I32RemU:
-    case InterpreterOpcode::I32And:
-    case InterpreterOpcode::I32Or:
-    case InterpreterOpcode::I32Xor:
-    case InterpreterOpcode::I32Shl:
-    case InterpreterOpcode::I32ShrU:
-    case InterpreterOpcode::I32ShrS:
-    case InterpreterOpcode::I32Eq:
-    case InterpreterOpcode::I32Ne:
-    case InterpreterOpcode::I32LtS:
-    case InterpreterOpcode::I32LeS:
-    case InterpreterOpcode::I32LtU:
-    case InterpreterOpcode::I32LeU:
-    case InterpreterOpcode::I32GtS:
-    case InterpreterOpcode::I32GeS:
-    case InterpreterOpcode::I32GtU:
-    case InterpreterOpcode::I32GeU:
-    case InterpreterOpcode::I32Rotr:
-    case InterpreterOpcode::I32Rotl:
-      writef(stream, "%s %u, %u\n", get_interpreter_opcode_name(opcode),
-             PICK(2).i32, PICK(1).i32);
+    case Opcode::I32Add:
+    case Opcode::I32Sub:
+    case Opcode::I32Mul:
+    case Opcode::I32DivS:
+    case Opcode::I32DivU:
+    case Opcode::I32RemS:
+    case Opcode::I32RemU:
+    case Opcode::I32And:
+    case Opcode::I32Or:
+    case Opcode::I32Xor:
+    case Opcode::I32Shl:
+    case Opcode::I32ShrU:
+    case Opcode::I32ShrS:
+    case Opcode::I32Eq:
+    case Opcode::I32Ne:
+    case Opcode::I32LtS:
+    case Opcode::I32LeS:
+    case Opcode::I32LtU:
+    case Opcode::I32LeU:
+    case Opcode::I32GtS:
+    case Opcode::I32GeS:
+    case Opcode::I32GtU:
+    case Opcode::I32GeU:
+    case Opcode::I32Rotr:
+    case Opcode::I32Rotl:
+      stream->Writef("%s %u, %u\n", get_opcode_name(opcode), PICK(2).i32,
+                     PICK(1).i32);
       break;
 
-    case InterpreterOpcode::I32Clz:
-    case InterpreterOpcode::I32Ctz:
-    case InterpreterOpcode::I32Popcnt:
-    case InterpreterOpcode::I32Eqz:
-      writef(stream, "%s %u\n", get_interpreter_opcode_name(opcode), TOP().i32);
+    case Opcode::I32Clz:
+    case Opcode::I32Ctz:
+    case Opcode::I32Popcnt:
+    case Opcode::I32Eqz:
+      stream->Writef("%s %u\n", get_opcode_name(opcode), TOP().i32);
       break;
 
-    case InterpreterOpcode::I64Add:
-    case InterpreterOpcode::I64Sub:
-    case InterpreterOpcode::I64Mul:
-    case InterpreterOpcode::I64DivS:
-    case InterpreterOpcode::I64DivU:
-    case InterpreterOpcode::I64RemS:
-    case InterpreterOpcode::I64RemU:
-    case InterpreterOpcode::I64And:
-    case InterpreterOpcode::I64Or:
-    case InterpreterOpcode::I64Xor:
-    case InterpreterOpcode::I64Shl:
-    case InterpreterOpcode::I64ShrU:
-    case InterpreterOpcode::I64ShrS:
-    case InterpreterOpcode::I64Eq:
-    case InterpreterOpcode::I64Ne:
-    case InterpreterOpcode::I64LtS:
-    case InterpreterOpcode::I64LeS:
-    case InterpreterOpcode::I64LtU:
-    case InterpreterOpcode::I64LeU:
-    case InterpreterOpcode::I64GtS:
-    case InterpreterOpcode::I64GeS:
-    case InterpreterOpcode::I64GtU:
-    case InterpreterOpcode::I64GeU:
-    case InterpreterOpcode::I64Rotr:
-    case InterpreterOpcode::I64Rotl:
-      writef(stream, "%s %" PRIu64 ", %" PRIu64 "\n",
-             get_interpreter_opcode_name(opcode), PICK(2).i64, PICK(1).i64);
+    case Opcode::I64Add:
+    case Opcode::I64Sub:
+    case Opcode::I64Mul:
+    case Opcode::I64DivS:
+    case Opcode::I64DivU:
+    case Opcode::I64RemS:
+    case Opcode::I64RemU:
+    case Opcode::I64And:
+    case Opcode::I64Or:
+    case Opcode::I64Xor:
+    case Opcode::I64Shl:
+    case Opcode::I64ShrU:
+    case Opcode::I64ShrS:
+    case Opcode::I64Eq:
+    case Opcode::I64Ne:
+    case Opcode::I64LtS:
+    case Opcode::I64LeS:
+    case Opcode::I64LtU:
+    case Opcode::I64LeU:
+    case Opcode::I64GtS:
+    case Opcode::I64GeS:
+    case Opcode::I64GtU:
+    case Opcode::I64GeU:
+    case Opcode::I64Rotr:
+    case Opcode::I64Rotl:
+      stream->Writef("%s %" PRIu64 ", %" PRIu64 "\n", get_opcode_name(opcode),
+                     PICK(2).i64, PICK(1).i64);
       break;
 
-    case InterpreterOpcode::I64Clz:
-    case InterpreterOpcode::I64Ctz:
-    case InterpreterOpcode::I64Popcnt:
-    case InterpreterOpcode::I64Eqz:
-      writef(stream, "%s %" PRIu64 "\n", get_interpreter_opcode_name(opcode),
-             TOP().i64);
+    case Opcode::I64Clz:
+    case Opcode::I64Ctz:
+    case Opcode::I64Popcnt:
+    case Opcode::I64Eqz:
+      stream->Writef("%s %" PRIu64 "\n", get_opcode_name(opcode), TOP().i64);
       break;
 
-    case InterpreterOpcode::F32Add:
-    case InterpreterOpcode::F32Sub:
-    case InterpreterOpcode::F32Mul:
-    case InterpreterOpcode::F32Div:
-    case InterpreterOpcode::F32Min:
-    case InterpreterOpcode::F32Max:
-    case InterpreterOpcode::F32Copysign:
-    case InterpreterOpcode::F32Eq:
-    case InterpreterOpcode::F32Ne:
-    case InterpreterOpcode::F32Lt:
-    case InterpreterOpcode::F32Le:
-    case InterpreterOpcode::F32Gt:
-    case InterpreterOpcode::F32Ge:
-      writef(stream, "%s %g, %g\n", get_interpreter_opcode_name(opcode),
-             bitcast_u32_to_f32(PICK(2).i32), bitcast_u32_to_f32(PICK(1).i32));
+    case Opcode::F32Add:
+    case Opcode::F32Sub:
+    case Opcode::F32Mul:
+    case Opcode::F32Div:
+    case Opcode::F32Min:
+    case Opcode::F32Max:
+    case Opcode::F32Copysign:
+    case Opcode::F32Eq:
+    case Opcode::F32Ne:
+    case Opcode::F32Lt:
+    case Opcode::F32Le:
+    case Opcode::F32Gt:
+    case Opcode::F32Ge:
+      stream->Writef("%s %g, %g\n", get_opcode_name(opcode),
+                     bitcast_u32_to_f32(PICK(2).i32),
+                     bitcast_u32_to_f32(PICK(1).i32));
       break;
 
-    case InterpreterOpcode::F32Abs:
-    case InterpreterOpcode::F32Neg:
-    case InterpreterOpcode::F32Ceil:
-    case InterpreterOpcode::F32Floor:
-    case InterpreterOpcode::F32Trunc:
-    case InterpreterOpcode::F32Nearest:
-    case InterpreterOpcode::F32Sqrt:
-      writef(stream, "%s %g\n", get_interpreter_opcode_name(opcode),
-             bitcast_u32_to_f32(TOP().i32));
+    case Opcode::F32Abs:
+    case Opcode::F32Neg:
+    case Opcode::F32Ceil:
+    case Opcode::F32Floor:
+    case Opcode::F32Trunc:
+    case Opcode::F32Nearest:
+    case Opcode::F32Sqrt:
+      stream->Writef("%s %g\n", get_opcode_name(opcode),
+                     bitcast_u32_to_f32(TOP().i32));
       break;
 
-    case InterpreterOpcode::F64Add:
-    case InterpreterOpcode::F64Sub:
-    case InterpreterOpcode::F64Mul:
-    case InterpreterOpcode::F64Div:
-    case InterpreterOpcode::F64Min:
-    case InterpreterOpcode::F64Max:
-    case InterpreterOpcode::F64Copysign:
-    case InterpreterOpcode::F64Eq:
-    case InterpreterOpcode::F64Ne:
-    case InterpreterOpcode::F64Lt:
-    case InterpreterOpcode::F64Le:
-    case InterpreterOpcode::F64Gt:
-    case InterpreterOpcode::F64Ge:
-      writef(stream, "%s %g, %g\n", get_interpreter_opcode_name(opcode),
-             bitcast_u64_to_f64(PICK(2).i64), bitcast_u64_to_f64(PICK(1).i64));
+    case Opcode::F64Add:
+    case Opcode::F64Sub:
+    case Opcode::F64Mul:
+    case Opcode::F64Div:
+    case Opcode::F64Min:
+    case Opcode::F64Max:
+    case Opcode::F64Copysign:
+    case Opcode::F64Eq:
+    case Opcode::F64Ne:
+    case Opcode::F64Lt:
+    case Opcode::F64Le:
+    case Opcode::F64Gt:
+    case Opcode::F64Ge:
+      stream->Writef("%s %g, %g\n", get_opcode_name(opcode),
+                     bitcast_u64_to_f64(PICK(2).i64),
+                     bitcast_u64_to_f64(PICK(1).i64));
       break;
 
-    case InterpreterOpcode::F64Abs:
-    case InterpreterOpcode::F64Neg:
-    case InterpreterOpcode::F64Ceil:
-    case InterpreterOpcode::F64Floor:
-    case InterpreterOpcode::F64Trunc:
-    case InterpreterOpcode::F64Nearest:
-    case InterpreterOpcode::F64Sqrt:
-      writef(stream, "%s %g\n", get_interpreter_opcode_name(opcode),
-             bitcast_u64_to_f64(TOP().i64));
+    case Opcode::F64Abs:
+    case Opcode::F64Neg:
+    case Opcode::F64Ceil:
+    case Opcode::F64Floor:
+    case Opcode::F64Trunc:
+    case Opcode::F64Nearest:
+    case Opcode::F64Sqrt:
+      stream->Writef("%s %g\n", get_opcode_name(opcode),
+                     bitcast_u64_to_f64(TOP().i64));
       break;
 
-    case InterpreterOpcode::I32TruncSF32:
-    case InterpreterOpcode::I32TruncUF32:
-    case InterpreterOpcode::I64TruncSF32:
-    case InterpreterOpcode::I64TruncUF32:
-    case InterpreterOpcode::F64PromoteF32:
-    case InterpreterOpcode::I32ReinterpretF32:
-      writef(stream, "%s %g\n", get_interpreter_opcode_name(opcode),
-             bitcast_u32_to_f32(TOP().i32));
+    case Opcode::I32TruncSF32:
+    case Opcode::I32TruncUF32:
+    case Opcode::I64TruncSF32:
+    case Opcode::I64TruncUF32:
+    case Opcode::F64PromoteF32:
+    case Opcode::I32ReinterpretF32:
+      stream->Writef("%s %g\n", get_opcode_name(opcode),
+                     bitcast_u32_to_f32(TOP().i32));
       break;
 
-    case InterpreterOpcode::I32TruncSF64:
-    case InterpreterOpcode::I32TruncUF64:
-    case InterpreterOpcode::I64TruncSF64:
-    case InterpreterOpcode::I64TruncUF64:
-    case InterpreterOpcode::F32DemoteF64:
-    case InterpreterOpcode::I64ReinterpretF64:
-      writef(stream, "%s %g\n", get_interpreter_opcode_name(opcode),
-             bitcast_u64_to_f64(TOP().i64));
+    case Opcode::I32TruncSF64:
+    case Opcode::I32TruncUF64:
+    case Opcode::I64TruncSF64:
+    case Opcode::I64TruncUF64:
+    case Opcode::F32DemoteF64:
+    case Opcode::I64ReinterpretF64:
+      stream->Writef("%s %g\n", get_opcode_name(opcode),
+                     bitcast_u64_to_f64(TOP().i64));
       break;
 
-    case InterpreterOpcode::I32WrapI64:
-    case InterpreterOpcode::F32ConvertSI64:
-    case InterpreterOpcode::F32ConvertUI64:
-    case InterpreterOpcode::F64ConvertSI64:
-    case InterpreterOpcode::F64ConvertUI64:
-    case InterpreterOpcode::F64ReinterpretI64:
-      writef(stream, "%s %" PRIu64 "\n", get_interpreter_opcode_name(opcode),
-             TOP().i64);
+    case Opcode::I32WrapI64:
+    case Opcode::F32ConvertSI64:
+    case Opcode::F32ConvertUI64:
+    case Opcode::F64ConvertSI64:
+    case Opcode::F64ConvertUI64:
+    case Opcode::F64ReinterpretI64:
+      stream->Writef("%s %" PRIu64 "\n", get_opcode_name(opcode), TOP().i64);
       break;
 
-    case InterpreterOpcode::I64ExtendSI32:
-    case InterpreterOpcode::I64ExtendUI32:
-    case InterpreterOpcode::F32ConvertSI32:
-    case InterpreterOpcode::F32ConvertUI32:
-    case InterpreterOpcode::F32ReinterpretI32:
-    case InterpreterOpcode::F64ConvertSI32:
-    case InterpreterOpcode::F64ConvertUI32:
-      writef(stream, "%s %u\n", get_interpreter_opcode_name(opcode), TOP().i32);
+    case Opcode::I64ExtendSI32:
+    case Opcode::I64ExtendUI32:
+    case Opcode::F32ConvertSI32:
+    case Opcode::F32ConvertUI32:
+    case Opcode::F32ReinterpretI32:
+    case Opcode::F64ConvertSI32:
+    case Opcode::F64ConvertUI32:
+      stream->Writef("%s %u\n", get_opcode_name(opcode), TOP().i32);
       break;
 
-    case InterpreterOpcode::Alloca:
-      writef(stream, "%s $%u\n", get_interpreter_opcode_name(opcode),
-             read_u32_at(pc));
+    case Opcode::Alloca:
+      stream->Writef("%s $%u\n", get_opcode_name(opcode), read_u32_at(pc));
       break;
 
-    case InterpreterOpcode::BrUnless:
-      writef(stream, "%s @%u, %u\n", get_interpreter_opcode_name(opcode),
-             read_u32_at(pc), TOP().i32);
+    case Opcode::BrUnless:
+      stream->Writef("%s @%u, %u\n", get_opcode_name(opcode), read_u32_at(pc),
+                     TOP().i32);
       break;
 
-    case InterpreterOpcode::DropKeep:
-      writef(stream, "%s $%u $%u\n", get_interpreter_opcode_name(opcode),
-             read_u32_at(pc), *(pc + 4));
+    case Opcode::DropKeep:
+      stream->Writef("%s $%u $%u\n", get_opcode_name(opcode), read_u32_at(pc),
+                     *(pc + 4));
       break;
 
-    case InterpreterOpcode::Data:
+    case Opcode::Data:
       /* shouldn't ever execute this */
       assert(0);
       break;
@@ -2067,319 +2141,306 @@
   }
 }
 
-void disassemble(InterpreterEnvironment* env,
-                 Stream* stream,
-                 uint32_t from,
-                 uint32_t to) {
+void Environment::Disassemble(Stream* stream,
+                              IstreamOffset from,
+                              IstreamOffset to) {
   /* TODO(binji): mark function entries */
   /* TODO(binji): track value stack size */
-  if (from >= env->istream.size)
+  if (from >= istream_->data.size())
     return;
-  if (to > env->istream.size)
-    to = env->istream.size;
-  const uint8_t* istream = reinterpret_cast<const uint8_t*>(env->istream.start);
+  to = std::min<IstreamOffset>(to, istream_->data.size());
+  const uint8_t* istream = istream_->data.data();
   const uint8_t* pc = &istream[from];
 
-  while (static_cast<uint32_t>(pc - istream) < to) {
-    writef(stream, "%4" PRIzd "| ", pc - istream);
+  while (static_cast<IstreamOffset>(pc - istream) < to) {
+    stream->Writef("%4" PRIzd "| ", pc - istream);
 
-    InterpreterOpcode opcode = static_cast<InterpreterOpcode>(*pc++);
+    Opcode opcode = static_cast<Opcode>(*pc++);
     switch (opcode) {
-      case InterpreterOpcode::Select:
-        writef(stream, "%s %%[-3], %%[-2], %%[-1]\n",
-               get_interpreter_opcode_name(opcode));
+      case Opcode::Select:
+        stream->Writef("%s %%[-3], %%[-2], %%[-1]\n", get_opcode_name(opcode));
         break;
 
-      case InterpreterOpcode::Br:
-        writef(stream, "%s @%u\n", get_interpreter_opcode_name(opcode),
-               read_u32(&pc));
+      case Opcode::Br:
+        stream->Writef("%s @%u\n", get_opcode_name(opcode), read_u32(&pc));
         break;
 
-      case InterpreterOpcode::BrIf:
-        writef(stream, "%s @%u, %%[-1]\n", get_interpreter_opcode_name(opcode),
-               read_u32(&pc));
+      case Opcode::BrIf:
+        stream->Writef("%s @%u, %%[-1]\n", get_opcode_name(opcode),
+                       read_u32(&pc));
         break;
 
-      case InterpreterOpcode::BrTable: {
-        uint32_t num_targets = read_u32(&pc);
-        uint32_t table_offset = read_u32(&pc);
-        writef(stream, "%s %%[-1], $#%u, table:$%u\n",
-               get_interpreter_opcode_name(opcode), num_targets, table_offset);
+      case Opcode::BrTable: {
+        Index num_targets = read_u32(&pc);
+        IstreamOffset table_offset = read_u32(&pc);
+        stream->Writef("%s %%[-1], $#%" PRIindex ", table:$%u\n",
+                       get_opcode_name(opcode), num_targets, table_offset);
         break;
       }
 
-      case InterpreterOpcode::Nop:
-      case InterpreterOpcode::Return:
-      case InterpreterOpcode::Unreachable:
-      case InterpreterOpcode::Drop:
-        writef(stream, "%s\n", get_interpreter_opcode_name(opcode));
+      case Opcode::Nop:
+      case Opcode::Return:
+      case Opcode::Unreachable:
+      case Opcode::Drop:
+        stream->Writef("%s\n", get_opcode_name(opcode));
         break;
 
-      case InterpreterOpcode::CurrentMemory: {
-        uint32_t memory_index = read_u32(&pc);
-        writef(stream, "%s $%u\n", get_interpreter_opcode_name(opcode),
-               memory_index);
+      case Opcode::CurrentMemory: {
+        Index memory_index = read_u32(&pc);
+        stream->Writef("%s $%" PRIindex "\n", get_opcode_name(opcode),
+                       memory_index);
         break;
       }
 
-      case InterpreterOpcode::I32Const:
-        writef(stream, "%s $%u\n", get_interpreter_opcode_name(opcode),
-               read_u32(&pc));
+      case Opcode::I32Const:
+        stream->Writef("%s $%u\n", get_opcode_name(opcode), read_u32(&pc));
         break;
 
-      case InterpreterOpcode::I64Const:
-        writef(stream, "%s $%" PRIu64 "\n", get_interpreter_opcode_name(opcode),
-               read_u64(&pc));
+      case Opcode::I64Const:
+        stream->Writef("%s $%" PRIu64 "\n", get_opcode_name(opcode),
+                       read_u64(&pc));
         break;
 
-      case InterpreterOpcode::F32Const:
-        writef(stream, "%s $%g\n", get_interpreter_opcode_name(opcode),
-               bitcast_u32_to_f32(read_u32(&pc)));
+      case Opcode::F32Const:
+        stream->Writef("%s $%g\n", get_opcode_name(opcode),
+                       bitcast_u32_to_f32(read_u32(&pc)));
         break;
 
-      case InterpreterOpcode::F64Const:
-        writef(stream, "%s $%g\n", get_interpreter_opcode_name(opcode),
-               bitcast_u64_to_f64(read_u64(&pc)));
+      case Opcode::F64Const:
+        stream->Writef("%s $%g\n", get_opcode_name(opcode),
+                       bitcast_u64_to_f64(read_u64(&pc)));
         break;
 
-      case InterpreterOpcode::GetLocal:
-      case InterpreterOpcode::GetGlobal:
-        writef(stream, "%s $%u\n", get_interpreter_opcode_name(opcode),
-               read_u32(&pc));
+      case Opcode::GetLocal:
+      case Opcode::GetGlobal:
+        stream->Writef("%s $%u\n", get_opcode_name(opcode), read_u32(&pc));
         break;
 
-      case InterpreterOpcode::SetLocal:
-      case InterpreterOpcode::SetGlobal:
-      case InterpreterOpcode::TeeLocal:
-        writef(stream, "%s $%u, %%[-1]\n", get_interpreter_opcode_name(opcode),
-               read_u32(&pc));
+      case Opcode::SetLocal:
+      case Opcode::SetGlobal:
+      case Opcode::TeeLocal:
+        stream->Writef("%s $%u, %%[-1]\n", get_opcode_name(opcode),
+                       read_u32(&pc));
         break;
 
-      case InterpreterOpcode::Call:
-        writef(stream, "%s @%u\n", get_interpreter_opcode_name(opcode),
-               read_u32(&pc));
+      case Opcode::Call:
+        stream->Writef("%s @%u\n", get_opcode_name(opcode), read_u32(&pc));
         break;
 
-      case InterpreterOpcode::CallIndirect: {
-        uint32_t table_index = read_u32(&pc);
-        writef(stream, "%s $%u:%u, %%[-1]\n",
-               get_interpreter_opcode_name(opcode), table_index, read_u32(&pc));
+      case Opcode::CallIndirect: {
+        Index table_index = read_u32(&pc);
+        stream->Writef("%s $%" PRIindex ":%u, %%[-1]\n",
+                       get_opcode_name(opcode), table_index, read_u32(&pc));
         break;
       }
 
-      case InterpreterOpcode::CallHost:
-        writef(stream, "%s $%u\n", get_interpreter_opcode_name(opcode),
-               read_u32(&pc));
+      case Opcode::CallHost:
+        stream->Writef("%s $%u\n", get_opcode_name(opcode), read_u32(&pc));
         break;
 
-      case InterpreterOpcode::I32Load8S:
-      case InterpreterOpcode::I32Load8U:
-      case InterpreterOpcode::I32Load16S:
-      case InterpreterOpcode::I32Load16U:
-      case InterpreterOpcode::I64Load8S:
-      case InterpreterOpcode::I64Load8U:
-      case InterpreterOpcode::I64Load16S:
-      case InterpreterOpcode::I64Load16U:
-      case InterpreterOpcode::I64Load32S:
-      case InterpreterOpcode::I64Load32U:
-      case InterpreterOpcode::I32Load:
-      case InterpreterOpcode::I64Load:
-      case InterpreterOpcode::F32Load:
-      case InterpreterOpcode::F64Load: {
-        uint32_t memory_index = read_u32(&pc);
-        writef(stream, "%s $%u:%%[-1]+$%u\n",
-               get_interpreter_opcode_name(opcode), memory_index,
-               read_u32(&pc));
+      case Opcode::I32Load8S:
+      case Opcode::I32Load8U:
+      case Opcode::I32Load16S:
+      case Opcode::I32Load16U:
+      case Opcode::I64Load8S:
+      case Opcode::I64Load8U:
+      case Opcode::I64Load16S:
+      case Opcode::I64Load16U:
+      case Opcode::I64Load32S:
+      case Opcode::I64Load32U:
+      case Opcode::I32Load:
+      case Opcode::I64Load:
+      case Opcode::F32Load:
+      case Opcode::F64Load: {
+        Index memory_index = read_u32(&pc);
+        stream->Writef("%s $%" PRIindex ":%%[-1]+$%u\n",
+                       get_opcode_name(opcode), memory_index, read_u32(&pc));
         break;
       }
 
-      case InterpreterOpcode::I32Store8:
-      case InterpreterOpcode::I32Store16:
-      case InterpreterOpcode::I32Store:
-      case InterpreterOpcode::I64Store8:
-      case InterpreterOpcode::I64Store16:
-      case InterpreterOpcode::I64Store32:
-      case InterpreterOpcode::I64Store:
-      case InterpreterOpcode::F32Store:
-      case InterpreterOpcode::F64Store: {
-        uint32_t memory_index = read_u32(&pc);
-        writef(stream, "%s %%[-2]+$%u, $%u:%%[-1]\n",
-               get_interpreter_opcode_name(opcode), memory_index,
-               read_u32(&pc));
+      case Opcode::I32Store8:
+      case Opcode::I32Store16:
+      case Opcode::I32Store:
+      case Opcode::I64Store8:
+      case Opcode::I64Store16:
+      case Opcode::I64Store32:
+      case Opcode::I64Store:
+      case Opcode::F32Store:
+      case Opcode::F64Store: {
+        Index memory_index = read_u32(&pc);
+        stream->Writef("%s %%[-2]+$%" PRIindex ", $%u:%%[-1]\n",
+                       get_opcode_name(opcode), memory_index, read_u32(&pc));
         break;
       }
 
-      case InterpreterOpcode::I32Add:
-      case InterpreterOpcode::I32Sub:
-      case InterpreterOpcode::I32Mul:
-      case InterpreterOpcode::I32DivS:
-      case InterpreterOpcode::I32DivU:
-      case InterpreterOpcode::I32RemS:
-      case InterpreterOpcode::I32RemU:
-      case InterpreterOpcode::I32And:
-      case InterpreterOpcode::I32Or:
-      case InterpreterOpcode::I32Xor:
-      case InterpreterOpcode::I32Shl:
-      case InterpreterOpcode::I32ShrU:
-      case InterpreterOpcode::I32ShrS:
-      case InterpreterOpcode::I32Eq:
-      case InterpreterOpcode::I32Ne:
-      case InterpreterOpcode::I32LtS:
-      case InterpreterOpcode::I32LeS:
-      case InterpreterOpcode::I32LtU:
-      case InterpreterOpcode::I32LeU:
-      case InterpreterOpcode::I32GtS:
-      case InterpreterOpcode::I32GeS:
-      case InterpreterOpcode::I32GtU:
-      case InterpreterOpcode::I32GeU:
-      case InterpreterOpcode::I32Rotr:
-      case InterpreterOpcode::I32Rotl:
-      case InterpreterOpcode::F32Add:
-      case InterpreterOpcode::F32Sub:
-      case InterpreterOpcode::F32Mul:
-      case InterpreterOpcode::F32Div:
-      case InterpreterOpcode::F32Min:
-      case InterpreterOpcode::F32Max:
-      case InterpreterOpcode::F32Copysign:
-      case InterpreterOpcode::F32Eq:
-      case InterpreterOpcode::F32Ne:
-      case InterpreterOpcode::F32Lt:
-      case InterpreterOpcode::F32Le:
-      case InterpreterOpcode::F32Gt:
-      case InterpreterOpcode::F32Ge:
-      case InterpreterOpcode::I64Add:
-      case InterpreterOpcode::I64Sub:
-      case InterpreterOpcode::I64Mul:
-      case InterpreterOpcode::I64DivS:
-      case InterpreterOpcode::I64DivU:
-      case InterpreterOpcode::I64RemS:
-      case InterpreterOpcode::I64RemU:
-      case InterpreterOpcode::I64And:
-      case InterpreterOpcode::I64Or:
-      case InterpreterOpcode::I64Xor:
-      case InterpreterOpcode::I64Shl:
-      case InterpreterOpcode::I64ShrU:
-      case InterpreterOpcode::I64ShrS:
-      case InterpreterOpcode::I64Eq:
-      case InterpreterOpcode::I64Ne:
-      case InterpreterOpcode::I64LtS:
-      case InterpreterOpcode::I64LeS:
-      case InterpreterOpcode::I64LtU:
-      case InterpreterOpcode::I64LeU:
-      case InterpreterOpcode::I64GtS:
-      case InterpreterOpcode::I64GeS:
-      case InterpreterOpcode::I64GtU:
-      case InterpreterOpcode::I64GeU:
-      case InterpreterOpcode::I64Rotr:
-      case InterpreterOpcode::I64Rotl:
-      case InterpreterOpcode::F64Add:
-      case InterpreterOpcode::F64Sub:
-      case InterpreterOpcode::F64Mul:
-      case InterpreterOpcode::F64Div:
-      case InterpreterOpcode::F64Min:
-      case InterpreterOpcode::F64Max:
-      case InterpreterOpcode::F64Copysign:
-      case InterpreterOpcode::F64Eq:
-      case InterpreterOpcode::F64Ne:
-      case InterpreterOpcode::F64Lt:
-      case InterpreterOpcode::F64Le:
-      case InterpreterOpcode::F64Gt:
-      case InterpreterOpcode::F64Ge:
-        writef(stream, "%s %%[-2], %%[-1]\n",
-               get_interpreter_opcode_name(opcode));
+      case Opcode::I32Add:
+      case Opcode::I32Sub:
+      case Opcode::I32Mul:
+      case Opcode::I32DivS:
+      case Opcode::I32DivU:
+      case Opcode::I32RemS:
+      case Opcode::I32RemU:
+      case Opcode::I32And:
+      case Opcode::I32Or:
+      case Opcode::I32Xor:
+      case Opcode::I32Shl:
+      case Opcode::I32ShrU:
+      case Opcode::I32ShrS:
+      case Opcode::I32Eq:
+      case Opcode::I32Ne:
+      case Opcode::I32LtS:
+      case Opcode::I32LeS:
+      case Opcode::I32LtU:
+      case Opcode::I32LeU:
+      case Opcode::I32GtS:
+      case Opcode::I32GeS:
+      case Opcode::I32GtU:
+      case Opcode::I32GeU:
+      case Opcode::I32Rotr:
+      case Opcode::I32Rotl:
+      case Opcode::F32Add:
+      case Opcode::F32Sub:
+      case Opcode::F32Mul:
+      case Opcode::F32Div:
+      case Opcode::F32Min:
+      case Opcode::F32Max:
+      case Opcode::F32Copysign:
+      case Opcode::F32Eq:
+      case Opcode::F32Ne:
+      case Opcode::F32Lt:
+      case Opcode::F32Le:
+      case Opcode::F32Gt:
+      case Opcode::F32Ge:
+      case Opcode::I64Add:
+      case Opcode::I64Sub:
+      case Opcode::I64Mul:
+      case Opcode::I64DivS:
+      case Opcode::I64DivU:
+      case Opcode::I64RemS:
+      case Opcode::I64RemU:
+      case Opcode::I64And:
+      case Opcode::I64Or:
+      case Opcode::I64Xor:
+      case Opcode::I64Shl:
+      case Opcode::I64ShrU:
+      case Opcode::I64ShrS:
+      case Opcode::I64Eq:
+      case Opcode::I64Ne:
+      case Opcode::I64LtS:
+      case Opcode::I64LeS:
+      case Opcode::I64LtU:
+      case Opcode::I64LeU:
+      case Opcode::I64GtS:
+      case Opcode::I64GeS:
+      case Opcode::I64GtU:
+      case Opcode::I64GeU:
+      case Opcode::I64Rotr:
+      case Opcode::I64Rotl:
+      case Opcode::F64Add:
+      case Opcode::F64Sub:
+      case Opcode::F64Mul:
+      case Opcode::F64Div:
+      case Opcode::F64Min:
+      case Opcode::F64Max:
+      case Opcode::F64Copysign:
+      case Opcode::F64Eq:
+      case Opcode::F64Ne:
+      case Opcode::F64Lt:
+      case Opcode::F64Le:
+      case Opcode::F64Gt:
+      case Opcode::F64Ge:
+        stream->Writef("%s %%[-2], %%[-1]\n", get_opcode_name(opcode));
         break;
 
-      case InterpreterOpcode::I32Clz:
-      case InterpreterOpcode::I32Ctz:
-      case InterpreterOpcode::I32Popcnt:
-      case InterpreterOpcode::I32Eqz:
-      case InterpreterOpcode::I64Clz:
-      case InterpreterOpcode::I64Ctz:
-      case InterpreterOpcode::I64Popcnt:
-      case InterpreterOpcode::I64Eqz:
-      case InterpreterOpcode::F32Abs:
-      case InterpreterOpcode::F32Neg:
-      case InterpreterOpcode::F32Ceil:
-      case InterpreterOpcode::F32Floor:
-      case InterpreterOpcode::F32Trunc:
-      case InterpreterOpcode::F32Nearest:
-      case InterpreterOpcode::F32Sqrt:
-      case InterpreterOpcode::F64Abs:
-      case InterpreterOpcode::F64Neg:
-      case InterpreterOpcode::F64Ceil:
-      case InterpreterOpcode::F64Floor:
-      case InterpreterOpcode::F64Trunc:
-      case InterpreterOpcode::F64Nearest:
-      case InterpreterOpcode::F64Sqrt:
-      case InterpreterOpcode::I32TruncSF32:
-      case InterpreterOpcode::I32TruncUF32:
-      case InterpreterOpcode::I64TruncSF32:
-      case InterpreterOpcode::I64TruncUF32:
-      case InterpreterOpcode::F64PromoteF32:
-      case InterpreterOpcode::I32ReinterpretF32:
-      case InterpreterOpcode::I32TruncSF64:
-      case InterpreterOpcode::I32TruncUF64:
-      case InterpreterOpcode::I64TruncSF64:
-      case InterpreterOpcode::I64TruncUF64:
-      case InterpreterOpcode::F32DemoteF64:
-      case InterpreterOpcode::I64ReinterpretF64:
-      case InterpreterOpcode::I32WrapI64:
-      case InterpreterOpcode::F32ConvertSI64:
-      case InterpreterOpcode::F32ConvertUI64:
-      case InterpreterOpcode::F64ConvertSI64:
-      case InterpreterOpcode::F64ConvertUI64:
-      case InterpreterOpcode::F64ReinterpretI64:
-      case InterpreterOpcode::I64ExtendSI32:
-      case InterpreterOpcode::I64ExtendUI32:
-      case InterpreterOpcode::F32ConvertSI32:
-      case InterpreterOpcode::F32ConvertUI32:
-      case InterpreterOpcode::F32ReinterpretI32:
-      case InterpreterOpcode::F64ConvertSI32:
-      case InterpreterOpcode::F64ConvertUI32:
-        writef(stream, "%s %%[-1]\n", get_interpreter_opcode_name(opcode));
+      case Opcode::I32Clz:
+      case Opcode::I32Ctz:
+      case Opcode::I32Popcnt:
+      case Opcode::I32Eqz:
+      case Opcode::I64Clz:
+      case Opcode::I64Ctz:
+      case Opcode::I64Popcnt:
+      case Opcode::I64Eqz:
+      case Opcode::F32Abs:
+      case Opcode::F32Neg:
+      case Opcode::F32Ceil:
+      case Opcode::F32Floor:
+      case Opcode::F32Trunc:
+      case Opcode::F32Nearest:
+      case Opcode::F32Sqrt:
+      case Opcode::F64Abs:
+      case Opcode::F64Neg:
+      case Opcode::F64Ceil:
+      case Opcode::F64Floor:
+      case Opcode::F64Trunc:
+      case Opcode::F64Nearest:
+      case Opcode::F64Sqrt:
+      case Opcode::I32TruncSF32:
+      case Opcode::I32TruncUF32:
+      case Opcode::I64TruncSF32:
+      case Opcode::I64TruncUF32:
+      case Opcode::F64PromoteF32:
+      case Opcode::I32ReinterpretF32:
+      case Opcode::I32TruncSF64:
+      case Opcode::I32TruncUF64:
+      case Opcode::I64TruncSF64:
+      case Opcode::I64TruncUF64:
+      case Opcode::F32DemoteF64:
+      case Opcode::I64ReinterpretF64:
+      case Opcode::I32WrapI64:
+      case Opcode::F32ConvertSI64:
+      case Opcode::F32ConvertUI64:
+      case Opcode::F64ConvertSI64:
+      case Opcode::F64ConvertUI64:
+      case Opcode::F64ReinterpretI64:
+      case Opcode::I64ExtendSI32:
+      case Opcode::I64ExtendUI32:
+      case Opcode::F32ConvertSI32:
+      case Opcode::F32ConvertUI32:
+      case Opcode::F32ReinterpretI32:
+      case Opcode::F64ConvertSI32:
+      case Opcode::F64ConvertUI32:
+        stream->Writef("%s %%[-1]\n", get_opcode_name(opcode));
         break;
 
-      case InterpreterOpcode::GrowMemory: {
-        uint32_t memory_index = read_u32(&pc);
-        writef(stream, "%s $%u:%%[-1]\n", get_interpreter_opcode_name(opcode),
-               memory_index);
+      case Opcode::GrowMemory: {
+        Index memory_index = read_u32(&pc);
+        stream->Writef("%s $%" PRIindex ":%%[-1]\n", get_opcode_name(opcode),
+                       memory_index);
         break;
       }
 
-      case InterpreterOpcode::Alloca:
-        writef(stream, "%s $%u\n", get_interpreter_opcode_name(opcode),
-               read_u32(&pc));
+      case Opcode::Alloca:
+        stream->Writef("%s $%u\n", get_opcode_name(opcode), read_u32(&pc));
         break;
 
-      case InterpreterOpcode::BrUnless:
-        writef(stream, "%s @%u, %%[-1]\n", get_interpreter_opcode_name(opcode),
-               read_u32(&pc));
+      case Opcode::BrUnless:
+        stream->Writef("%s @%u, %%[-1]\n", get_opcode_name(opcode),
+                       read_u32(&pc));
         break;
 
-      case InterpreterOpcode::DropKeep: {
+      case Opcode::DropKeep: {
         uint32_t drop = read_u32(&pc);
-        uint32_t keep = *pc++;
-        writef(stream, "%s $%u $%u\n", get_interpreter_opcode_name(opcode),
-               drop, keep);
+        uint8_t keep = *pc++;
+        stream->Writef("%s $%u $%u\n", get_opcode_name(opcode), drop, keep);
         break;
       }
 
-      case InterpreterOpcode::Data: {
+      case Opcode::Data: {
         uint32_t num_bytes = read_u32(&pc);
-        writef(stream, "%s $%u\n", get_interpreter_opcode_name(opcode),
-               num_bytes);
+        stream->Writef("%s $%u\n", get_opcode_name(opcode), num_bytes);
         /* for now, the only reason this is emitted is for br_table, so display
          * it as a list of table entries */
         if (num_bytes % WABT_TABLE_ENTRY_SIZE == 0) {
-          uint32_t num_entries = num_bytes / WABT_TABLE_ENTRY_SIZE;
-          for (uint32_t i = 0; i < num_entries; ++i) {
-            writef(stream, "%4" PRIzd "| ", pc - istream);
-            uint32_t offset;
+          Index num_entries = num_bytes / WABT_TABLE_ENTRY_SIZE;
+          for (Index i = 0; i < num_entries; ++i) {
+            stream->Writef("%4" PRIzd "| ", pc - istream);
+            IstreamOffset offset;
             uint32_t drop;
             uint8_t keep;
             read_table_entry_at(pc, &offset, &drop, &keep);
-            writef(stream, "  entry %d: offset: %u drop: %u keep: %u\n", i,
-                   offset, drop, keep);
+            stream->Writef("  entry %" PRIindex
+                           ": offset: %u drop: %u keep: %u\n",
+                           i, offset, drop, keep);
             pc += WABT_TABLE_ENTRY_SIZE;
           }
         } else {
@@ -2397,12 +2458,11 @@
   }
 }
 
-void disassemble_module(InterpreterEnvironment* env,
-                        Stream* stream,
-                        InterpreterModule* module) {
+void Environment::DisassembleModule(Stream* stream, Module* module) {
   assert(!module->is_host);
-  disassemble(env, stream, module->as_defined()->istream_start,
+  Disassemble(stream, module->as_defined()->istream_start,
               module->as_defined()->istream_end);
 }
 
+}  // namespace interpreter
 }  // namespace wabt
diff --git a/lib/wabt/src/interpreter.h b/lib/wabt/src/interpreter.h
index 28b15b3..cd5c6b5 100644
--- a/lib/wabt/src/interpreter.h
+++ b/lib/wabt/src/interpreter.h
@@ -19,16 +19,20 @@
 
 #include <stdint.h>
 
+#include <functional>
 #include <memory>
 #include <vector>
 
-#include "common.h"
 #include "binding-hash.h"
+#include "common.h"
+#include "opcode.h"
 #include "writer.h"
 
 namespace wabt {
 
-struct Stream;
+class Stream;
+
+namespace interpreter {
 
 #define FOREACH_INTERPRETER_RESULT(V)                                       \
   V(Ok, "ok")                                                               \
@@ -67,101 +71,106 @@
   /* the expected export kind doesn't match. */                             \
   V(ExportKindMismatch, "export kind mismatch")
 
-enum class InterpreterResult {
+enum class Result {
 #define V(Name, str) Name,
   FOREACH_INTERPRETER_RESULT(V)
 #undef V
 };
 
-#define WABT_INVALID_INDEX static_cast<uint32_t>(~0)
-#define WABT_INVALID_OFFSET static_cast<uint32_t>(~0)
-#define WABT_TABLE_ENTRY_SIZE (sizeof(uint32_t) * 2 + sizeof(uint8_t))
+typedef uint32_t IstreamOffset;
+static const IstreamOffset kInvalidIstreamOffset = ~0;
+
+// A table entry has the following packed layout:
+//
+//   struct {
+//     IstreamOffset offset;
+//     uint32_t drop_count;
+//     uint8_t keep_count;
+//   };
+#define WABT_TABLE_ENTRY_SIZE \
+  (sizeof(IstreamOffset) + sizeof(uint32_t) + sizeof(uint8_t))
 #define WABT_TABLE_ENTRY_OFFSET_OFFSET 0
 #define WABT_TABLE_ENTRY_DROP_OFFSET sizeof(uint32_t)
-#define WABT_TABLE_ENTRY_KEEP_OFFSET (sizeof(uint32_t) * 2)
+#define WABT_TABLE_ENTRY_KEEP_OFFSET (sizeof(IstreamOffset) + sizeof(uint32_t))
 
-#define WABT_FOREACH_INTERPRETER_OPCODE(V)         \
-  WABT_FOREACH_OPCODE(V)                           \
-  V(___, ___, ___, 0, 0xfb, Alloca, "alloca")      \
-  V(___, ___, ___, 0, 0xfc, BrUnless, "br_unless") \
-  V(___, ___, ___, 0, 0xfd, CallHost, "call_host") \
-  V(___, ___, ___, 0, 0xfe, Data, "data")          \
-  V(___, ___, ___, 0, 0xff, DropKeep, "drop_keep")
-
-enum class InterpreterOpcode {
+enum class Opcode {
 /* push space on the value stack for N entries */
-#define V(rtype, type1, type2, mem_size, code, Name, text) Name = code,
-  WABT_FOREACH_INTERPRETER_OPCODE(V)
-#undef V
+#define WABT_OPCODE(rtype, type1, type2, mem_size, code, Name, text) \
+  Name = code,
+#include "interpreter-opcode.def"
+#undef WABT_OPCODE
 
-      First = static_cast<int>(Opcode::First),
+  First = static_cast<int>(::wabt::Opcode::First),
   Last = DropKeep,
 };
-static const int kInterpreterOpcodeCount = WABT_ENUM_COUNT(InterpreterOpcode);
+static const int kOpcodeCount = WABT_ENUM_COUNT(Opcode);
 
-struct InterpreterFuncSignature {
+struct FuncSignature {
+  FuncSignature() = default;
+  FuncSignature(Index param_count,
+                Type* param_types,
+                Index result_count,
+                Type* result_types);
+
   std::vector<Type> param_types;
   std::vector<Type> result_types;
 };
 
-struct InterpreterTable {
-  explicit InterpreterTable(const Limits& limits)
-      : limits(limits), func_indexes(limits.initial, WABT_INVALID_INDEX) {}
+struct Table {
+  explicit Table(const Limits& limits)
+      : limits(limits), func_indexes(limits.initial, kInvalidIndex) {}
 
   Limits limits;
-  std::vector<uint32_t> func_indexes;
+  std::vector<Index> func_indexes;
 };
 
-struct InterpreterMemory {
-  InterpreterMemory() {
-    WABT_ZERO_MEMORY(page_limits);
-  }
-  explicit InterpreterMemory(const Limits& limits)
+struct Memory {
+  Memory() { WABT_ZERO_MEMORY(page_limits); }
+  explicit Memory(const Limits& limits)
       : page_limits(limits), data(limits.initial * WABT_PAGE_SIZE) {}
 
   Limits page_limits;
   std::vector<char> data;
 };
 
-union InterpreterValue {
+union Value {
   uint32_t i32;
   uint64_t i64;
   uint32_t f32_bits;
   uint64_t f64_bits;
 };
 
-struct InterpreterTypedValue {
-  InterpreterTypedValue() {}
-  explicit InterpreterTypedValue(Type type): type(type) {}
-  InterpreterTypedValue(Type type, const InterpreterValue& value)
-      : type(type), value(value) {}
+struct TypedValue {
+  TypedValue() {}
+  explicit TypedValue(Type type) : type(type) {}
+  TypedValue(Type type, const Value& value) : type(type), value(value) {}
 
   Type type;
-  InterpreterValue value;
+  Value value;
 };
 
-struct InterpreterGlobal {
-  InterpreterGlobal() : mutable_(false), import_index(WABT_INVALID_INDEX) {}
-  InterpreterGlobal(const InterpreterTypedValue& typed_value, bool mutable_)
+struct Global {
+  Global() : mutable_(false), import_index(kInvalidIndex) {}
+  Global(const TypedValue& typed_value, bool mutable_)
       : typed_value(typed_value), mutable_(mutable_) {}
 
-  InterpreterTypedValue typed_value;
+  TypedValue typed_value;
   bool mutable_;
-  uint32_t import_index; /* or INVALID_INDEX if not imported */
+  Index import_index; /* or INVALID_INDEX if not imported */
 };
 
-struct InterpreterImport {
-  InterpreterImport();
-  InterpreterImport(InterpreterImport&&);
-  InterpreterImport& operator=(InterpreterImport&&);
-  ~InterpreterImport();
+struct Import {
+  Import();
+  Import(Import&&);
+  Import& operator=(Import&&);
+  ~Import();
 
   StringSlice module_name;
   StringSlice field_name;
   ExternalKind kind;
   union {
     struct {
-      uint32_t sig_index;
+      Index sig_index;
     } func;
     struct {
       Limits limits;
@@ -173,232 +182,324 @@
   };
 };
 
-struct InterpreterFunc;
+struct Func;
 
-typedef Result (*InterpreterHostFuncCallback)(
-    const struct HostInterpreterFunc* func,
-    const InterpreterFuncSignature* sig,
-    uint32_t num_args,
-    InterpreterTypedValue* args,
-    uint32_t num_results,
-    InterpreterTypedValue* out_results,
-    void* user_data);
+typedef Result (*HostFuncCallback)(const struct HostFunc* func,
+                                   const FuncSignature* sig,
+                                   Index num_args,
+                                   TypedValue* args,
+                                   Index num_results,
+                                   TypedValue* out_results,
+                                   void* user_data);
 
-struct InterpreterFunc {
-  WABT_DISALLOW_COPY_AND_ASSIGN(InterpreterFunc);
-  InterpreterFunc(uint32_t sig_index, bool is_host)
+struct Func {
+  WABT_DISALLOW_COPY_AND_ASSIGN(Func);
+  Func(Index sig_index, bool is_host)
       : sig_index(sig_index), is_host(is_host) {}
-  virtual ~InterpreterFunc() {}
+  virtual ~Func() {}
 
-  inline struct DefinedInterpreterFunc* as_defined();
-  inline struct HostInterpreterFunc* as_host();
+  inline struct DefinedFunc* as_defined();
+  inline struct HostFunc* as_host();
 
-  uint32_t sig_index;
+  Index sig_index;
   bool is_host;
 };
 
-struct DefinedInterpreterFunc : InterpreterFunc {
-  DefinedInterpreterFunc(uint32_t sig_index)
-      : InterpreterFunc(sig_index, false),
-        offset(WABT_INVALID_INDEX),
+struct DefinedFunc : Func {
+  DefinedFunc(Index sig_index)
+      : Func(sig_index, false),
+        offset(kInvalidIstreamOffset),
         local_decl_count(0),
         local_count(0) {}
 
-  uint32_t offset;
-  uint32_t local_decl_count;
-  uint32_t local_count;
+  IstreamOffset offset;
+  Index local_decl_count;
+  Index local_count;
   std::vector<Type> param_and_local_types;
 };
 
-struct HostInterpreterFunc : InterpreterFunc {
-  HostInterpreterFunc(const StringSlice& module_name,
-                      const StringSlice& field_name,
-                      uint32_t sig_index)
-      : InterpreterFunc(sig_index, true),
+struct HostFunc : Func {
+  HostFunc(const StringSlice& module_name,
+           const StringSlice& field_name,
+           Index sig_index)
+      : Func(sig_index, true),
         module_name(module_name),
         field_name(field_name) {}
 
   StringSlice module_name;
   StringSlice field_name;
-  InterpreterHostFuncCallback callback;
+  HostFuncCallback callback;
   void* user_data;
 };
 
-DefinedInterpreterFunc* InterpreterFunc::as_defined() {
+DefinedFunc* Func::as_defined() {
   assert(!is_host);
-  return static_cast<DefinedInterpreterFunc*>(this);
+  return static_cast<DefinedFunc*>(this);
 }
 
-HostInterpreterFunc* InterpreterFunc::as_host() {
+HostFunc* Func::as_host() {
   assert(is_host);
-  return static_cast<HostInterpreterFunc*>(this);
+  return static_cast<HostFunc*>(this);
 }
 
-struct InterpreterExport {
-  InterpreterExport(const StringSlice& name, ExternalKind kind, uint32_t index)
+struct Export {
+  Export(const StringSlice& name, ExternalKind kind, Index index)
       : name(name), kind(kind), index(index) {}
-  InterpreterExport(InterpreterExport&&);
-  InterpreterExport& operator=(InterpreterExport&&);
-  ~InterpreterExport();
+  Export(Export&&);
+  Export& operator=(Export&&);
+  ~Export();
 
   StringSlice name;
   ExternalKind kind;
-  uint32_t index;
+  Index index;
 };
 
-struct PrintErrorCallback {
-  void* user_data;
-  void (*print_error)(const char* msg, void* user_data);
+class HostImportDelegate {
+ public:
+  typedef std::function<void(const char* msg)> ErrorCallback;
+
+  virtual ~HostImportDelegate() {}
+  virtual wabt::Result ImportFunc(Import*,
+                                  Func*,
+                                  FuncSignature*,
+                                  const ErrorCallback&) = 0;
+  virtual wabt::Result ImportTable(Import*, Table*, const ErrorCallback&) = 0;
+  virtual wabt::Result ImportMemory(Import*, Memory*, const ErrorCallback&) = 0;
+  virtual wabt::Result ImportGlobal(Import*, Global*, const ErrorCallback&) = 0;
 };
 
-struct InterpreterHostImportDelegate {
-  void* user_data;
-  Result (*import_func)(InterpreterImport*,
-                        InterpreterFunc*,
-                        InterpreterFuncSignature*,
-                        PrintErrorCallback,
-                        void* user_data);
-  Result (*import_table)(InterpreterImport*,
-                         InterpreterTable*,
-                         PrintErrorCallback,
-                         void* user_data);
-  Result (*import_memory)(InterpreterImport*,
-                          InterpreterMemory*,
-                          PrintErrorCallback,
-                          void* user_data);
-  Result (*import_global)(InterpreterImport*,
-                          InterpreterGlobal*,
-                          PrintErrorCallback,
-                          void* user_data);
-};
+struct Module {
+  WABT_DISALLOW_COPY_AND_ASSIGN(Module);
+  explicit Module(bool is_host);
+  Module(const StringSlice& name, bool is_host);
+  virtual ~Module();
 
-struct InterpreterModule {
-  WABT_DISALLOW_COPY_AND_ASSIGN(InterpreterModule);
-  explicit InterpreterModule(bool is_host);
-  InterpreterModule(const StringSlice& name, bool is_host);
-  virtual ~InterpreterModule();
+  inline struct DefinedModule* as_defined();
+  inline struct HostModule* as_host();
 
-  inline struct DefinedInterpreterModule* as_defined();
-  inline struct HostInterpreterModule* as_host();
+  Export* GetExport(StringSlice name);
 
   StringSlice name;
-  std::vector<InterpreterExport> exports;
+  std::vector<Export> exports;
   BindingHash export_bindings;
-  uint32_t memory_index; /* INVALID_INDEX if not defined */
-  uint32_t table_index;  /* INVALID_INDEX if not defined */
+  Index memory_index; /* kInvalidIndex if not defined */
+  Index table_index;  /* kInvalidIndex if not defined */
   bool is_host;
 };
 
-struct DefinedInterpreterModule : InterpreterModule {
-  explicit DefinedInterpreterModule(size_t istream_start);
+struct DefinedModule : Module {
+  DefinedModule();
 
-  std::vector<InterpreterImport> imports;
-  uint32_t start_func_index; /* INVALID_INDEX if not defined */
-  size_t istream_start;
-  size_t istream_end;
+  std::vector<Import> imports;
+  Index start_func_index; /* kInvalidIndex if not defined */
+  IstreamOffset istream_start;
+  IstreamOffset istream_end;
 };
 
-struct HostInterpreterModule : InterpreterModule {
-  HostInterpreterModule(const StringSlice& name);
+struct HostModule : Module {
+  explicit HostModule(const StringSlice& name);
 
-  InterpreterHostImportDelegate import_delegate;
+  std::unique_ptr<HostImportDelegate> import_delegate;
 };
 
-DefinedInterpreterModule* InterpreterModule::as_defined() {
+DefinedModule* Module::as_defined() {
   assert(!is_host);
-  return static_cast<DefinedInterpreterModule*>(this);
+  return static_cast<DefinedModule*>(this);
 }
 
-HostInterpreterModule* InterpreterModule::as_host() {
+HostModule* Module::as_host() {
   assert(is_host);
-  return static_cast<HostInterpreterModule*>(this);
+  return static_cast<HostModule*>(this);
 }
 
-/* Used to track and reset the state of the environment. */
-struct InterpreterEnvironmentMark {
-  size_t modules_size;
-  size_t sigs_size;
-  size_t funcs_size;
-  size_t memories_size;
-  size_t tables_size;
-  size_t globals_size;
-  size_t istream_size;
+class Environment {
+ public:
+  // Used to track and reset the state of the environment.
+  struct MarkPoint {
+    size_t modules_size = 0;
+    size_t sigs_size = 0;
+    size_t funcs_size = 0;
+    size_t memories_size = 0;
+    size_t tables_size = 0;
+    size_t globals_size = 0;
+    size_t istream_size = 0;
+  };
+
+  Environment();
+
+  OutputBuffer& istream() { return *istream_; }
+  void SetIstream(std::unique_ptr<OutputBuffer> istream) {
+    istream_ = std::move(istream);
+  }
+  std::unique_ptr<OutputBuffer> ReleaseIstream() { return std::move(istream_); }
+
+  Index GetFuncSignatureCount() const { return sigs_.size(); }
+  Index GetFuncCount() const { return funcs_.size(); }
+  Index GetGlobalCount() const { return globals_.size(); }
+  Index GetMemoryCount() const { return memories_.size(); }
+  Index GetTableCount() const { return tables_.size(); }
+  Index GetModuleCount() const { return modules_.size(); }
+
+  Index GetLastModuleIndex() const {
+    return modules_.empty() ? kInvalidIndex : modules_.size() - 1;
+  }
+  Index FindModuleIndex(StringSlice name) const;
+
+  FuncSignature* GetFuncSignature(Index index) { return &sigs_[index]; }
+  Func* GetFunc(Index index) {
+    assert(index < funcs_.size());
+    return funcs_[index].get();
+  }
+  Global* GetGlobal(Index index) {
+    assert(index < globals_.size());
+    return &globals_[index];
+  }
+  Memory* GetMemory(Index index) {
+    assert(index < memories_.size());
+    return &memories_[index];
+  }
+  Table* GetTable(Index index) {
+    assert(index < tables_.size());
+    return &tables_[index];
+  }
+  Module* GetModule(Index index) {
+    assert(index < modules_.size());
+    return modules_[index].get();
+  }
+
+  Module* GetLastModule() {
+    return modules_.empty() ? nullptr : modules_.back().get();
+  }
+  Module* FindModule(StringSlice name);
+  Module* FindRegisteredModule(StringSlice name);
+
+  template <typename... Args>
+  FuncSignature* EmplaceBackFuncSignature(Args&&... args) {
+    sigs_.emplace_back(args...);
+    return &sigs_.back();
+  }
+
+  template <typename... Args>
+  Func* EmplaceBackFunc(Args&&... args) {
+    funcs_.emplace_back(args...);
+    return funcs_.back().get();
+  }
+
+  template <typename... Args>
+  Global* EmplaceBackGlobal(Args&&... args) {
+    globals_.emplace_back(args...);
+    return &globals_.back();
+  }
+
+  template <typename... Args>
+  Table* EmplaceBackTable(Args&&... args) {
+    tables_.emplace_back(args...);
+    return &tables_.back();
+  }
+
+  template <typename... Args>
+  Memory* EmplaceBackMemory(Args&&... args) {
+    memories_.emplace_back(args...);
+    return &memories_.back();
+  }
+
+  template <typename... Args>
+  Module* EmplaceBackModule(Args&&... args) {
+    modules_.emplace_back(args...);
+    return modules_.back().get();
+  }
+
+  template <typename... Args>
+  void EmplaceModuleBinding(Args&&... args) {
+    module_bindings_.emplace(args...);
+  }
+
+  template <typename... Args>
+  void EmplaceRegisteredModuleBinding(Args&&... args) {
+    registered_module_bindings_.emplace(args...);
+  }
+
+  HostModule* AppendHostModule(StringSlice name);
+
+  bool FuncSignaturesAreEqual(Index sig_index_0, Index sig_index_1) const;
+
+  MarkPoint Mark();
+  void ResetToMarkPoint(const MarkPoint&);
+
+  void Disassemble(Stream* stream, IstreamOffset from, IstreamOffset to);
+  void DisassembleModule(Stream* stream, Module*);
+
+ private:
+  friend class Thread;
+
+  std::vector<std::unique_ptr<Module>> modules_;
+  std::vector<FuncSignature> sigs_;
+  std::vector<std::unique_ptr<Func>> funcs_;
+  std::vector<Memory> memories_;
+  std::vector<Table> tables_;
+  std::vector<Global> globals_;
+  std::unique_ptr<OutputBuffer> istream_;
+  BindingHash module_bindings_;
+  BindingHash registered_module_bindings_;
 };
 
-struct InterpreterEnvironment {
-  InterpreterEnvironment();
+class Thread {
+ public:
+  struct Options {
+    static const uint32_t kDefaultValueStackSize = 512 * 1024 / sizeof(Value);
+    static const uint32_t kDefaultCallStackSize = 64 * 1024;
 
-  std::vector<std::unique_ptr<InterpreterModule>> modules;
-  std::vector<InterpreterFuncSignature> sigs;
-  std::vector<std::unique_ptr<InterpreterFunc>> funcs;
-  std::vector<InterpreterMemory> memories;
-  std::vector<InterpreterTable> tables;
-  std::vector<InterpreterGlobal> globals;
-  OutputBuffer istream;
-  BindingHash module_bindings;
-  BindingHash registered_module_bindings;
-};
+    explicit Options(uint32_t value_stack_size = kDefaultValueStackSize,
+                     uint32_t call_stack_size = kDefaultCallStackSize,
+                     IstreamOffset pc = kInvalidIstreamOffset);
 
-struct InterpreterThread {
-  InterpreterThread();
+    uint32_t value_stack_size;
+    uint32_t call_stack_size;
+    IstreamOffset pc;
+  };
 
-  InterpreterEnvironment* env;
-  std::vector<InterpreterValue> value_stack;
-  std::vector<uint32_t> call_stack;
-  InterpreterValue* value_stack_top;
-  InterpreterValue* value_stack_end;
-  uint32_t* call_stack_top;
-  uint32_t* call_stack_end;
-  uint32_t pc;
-};
+  explicit Thread(Environment*, const Options& = Options());
 
-#define WABT_INTERPRETER_THREAD_OPTIONS_DEFAULT \
-  { 512 * 1024 / sizeof(InterpreterValue), 64 * 1024, WABT_INVALID_OFFSET }
+  Environment* env() { return env_; }
 
-struct InterpreterThreadOptions {
-  uint32_t value_stack_size;
-  uint32_t call_stack_size;
-  uint32_t pc;
+  Result RunFunction(Index func_index,
+                     const std::vector<TypedValue>& args,
+                     std::vector<TypedValue>* out_results);
+
+  Result TraceFunction(Index func_index,
+                       Stream*,
+                       const std::vector<TypedValue>& args,
+                       std::vector<TypedValue>* out_results);
+
+ private:
+  Result PushValue(Value);
+  Result PushArgs(const FuncSignature*, const std::vector<TypedValue>& args);
+  void CopyResults(const FuncSignature*, std::vector<TypedValue>* out_results);
+
+  Result Run(int num_instructions, IstreamOffset* call_stack_return_top);
+  void Trace(Stream*);
+
+  Result RunDefinedFunction(IstreamOffset);
+  Result TraceDefinedFunction(IstreamOffset, Stream*);
+
+  Result CallHost(HostFunc*);
+
+  Environment* env_;
+  std::vector<Value> value_stack_;
+  std::vector<IstreamOffset> call_stack_;
+  Value* value_stack_top_;
+  Value* value_stack_end_;
+  IstreamOffset* call_stack_top_;
+  IstreamOffset* call_stack_end_;
+  IstreamOffset pc_;
 };
 
 bool is_canonical_nan_f32(uint32_t f32_bits);
 bool is_canonical_nan_f64(uint64_t f64_bits);
 bool is_arithmetic_nan_f32(uint32_t f32_bits);
 bool is_arithmetic_nan_f64(uint64_t f64_bits);
-bool func_signatures_are_equal(InterpreterEnvironment* env,
-                               uint32_t sig_index_0,
-                               uint32_t sig_index_1);
 
-void destroy_interpreter_environment(InterpreterEnvironment* env);
-InterpreterEnvironmentMark mark_interpreter_environment(
-    InterpreterEnvironment* env);
-void reset_interpreter_environment_to_mark(InterpreterEnvironment* env,
-                                           InterpreterEnvironmentMark mark);
-HostInterpreterModule* append_host_module(InterpreterEnvironment* env,
-                                          StringSlice name);
-void init_interpreter_thread(InterpreterEnvironment* env,
-                             InterpreterThread* thread,
-                             InterpreterThreadOptions* options);
-InterpreterResult push_thread_value(InterpreterThread* thread,
-                                    InterpreterValue value);
-void destroy_interpreter_thread(InterpreterThread* thread);
-InterpreterResult call_host(InterpreterThread* thread,
-                            HostInterpreterFunc* func);
-InterpreterResult run_interpreter(InterpreterThread* thread,
-                                  uint32_t num_instructions,
-                                  uint32_t* call_stack_return_top);
-void trace_pc(InterpreterThread* thread, struct Stream* stream);
-void disassemble(InterpreterEnvironment* env,
-                 struct Stream* stream,
-                 uint32_t from,
-                 uint32_t to);
-void disassemble_module(InterpreterEnvironment* env,
-                        struct Stream* stream,
-                        InterpreterModule* module);
-
-InterpreterExport* get_interpreter_export_by_name(InterpreterModule* module,
-                                                  const StringSlice* name);
-
+}  // namespace interpreter
 }  // namespace wabt
 
 #endif /* WABT_INTERPRETER_H_ */
diff --git a/lib/wabt/src/ir.cc b/lib/wabt/src/ir.cc
new file mode 100644
index 0000000..2e4d8b4
--- /dev/null
+++ b/lib/wabt/src/ir.cc
@@ -0,0 +1,845 @@
+/*
+ * Copyright 2016 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "ir.h"
+
+#include <cassert>
+#include <cstddef>
+
+namespace wabt {
+
+bool FuncSignature::operator==(const FuncSignature& rhs) const {
+  return param_types == rhs.param_types && result_types == rhs.result_types;
+}
+
+const Export* Module::GetExport(const StringSlice& name) const {
+  Index index = export_bindings.FindIndex(name);
+  if (index >= exports.size())
+    return nullptr;
+  return exports[index];
+}
+
+Index Module::GetFuncIndex(const Var& var) const {
+  return func_bindings.FindIndex(var);
+}
+
+Index Module::GetGlobalIndex(const Var& var) const {
+  return global_bindings.FindIndex(var);
+}
+
+Index Module::GetTableIndex(const Var& var) const {
+  return table_bindings.FindIndex(var);
+}
+
+Index Module::GetMemoryIndex(const Var& var) const {
+  return memory_bindings.FindIndex(var);
+}
+
+Index Module::GetFuncTypeIndex(const Var& var) const {
+  return func_type_bindings.FindIndex(var);
+}
+
+Index Func::GetLocalIndex(const Var& var) const {
+  if (var.type == VarType::Index)
+    return var.index;
+
+  Index result = param_bindings.FindIndex(var.name);
+  if (result != kInvalidIndex)
+    return result;
+
+  result = local_bindings.FindIndex(var.name);
+  if (result == kInvalidIndex)
+    return result;
+
+  // The locals start after all the params.
+  return decl.GetNumParams() + result;
+}
+
+const Func* Module::GetFunc(const Var& var) const {
+  return const_cast<Module*>(this)->GetFunc(var);
+}
+
+Func* Module::GetFunc(const Var& var) {
+  Index index = func_bindings.FindIndex(var);
+  if (index >= funcs.size())
+    return nullptr;
+  return funcs[index];
+}
+
+const Global* Module::GetGlobal(const Var& var) const {
+  return const_cast<Module*>(this)->GetGlobal(var);
+}
+
+Global* Module::GetGlobal(const Var& var) {
+  Index index = global_bindings.FindIndex(var);
+  if (index >= globals.size())
+    return nullptr;
+  return globals[index];
+}
+
+Table* Module::GetTable(const Var& var) {
+  Index index = table_bindings.FindIndex(var);
+  if (index >= tables.size())
+    return nullptr;
+  return tables[index];
+}
+
+Memory* Module::GetMemory(const Var& var) {
+  Index index = memory_bindings.FindIndex(var);
+  if (index >= memories.size())
+    return nullptr;
+  return memories[index];
+}
+
+const FuncType* Module::GetFuncType(const Var& var) const {
+  return const_cast<Module*>(this)->GetFuncType(var);
+}
+
+FuncType* Module::GetFuncType(const Var& var) {
+  Index index = func_type_bindings.FindIndex(var);
+  if (index >= func_types.size())
+    return nullptr;
+  return func_types[index];
+}
+
+
+Index Module::GetFuncTypeIndex(const FuncSignature& sig) const {
+  for (size_t i = 0; i < func_types.size(); ++i)
+    if (func_types[i]->sig == sig)
+      return i;
+  return kInvalidIndex;
+}
+
+Index Module::GetFuncTypeIndex(const FuncDeclaration& decl) const {
+  if (decl.has_func_type) {
+    return GetFuncTypeIndex(decl.type_var);
+  } else {
+    return GetFuncTypeIndex(decl.sig);
+  }
+}
+
+const Module* Script::GetFirstModule() const {
+  return const_cast<Script*>(this)->GetFirstModule();
+}
+
+Module* Script::GetFirstModule() {
+  for (const std::unique_ptr<Command>& command : commands) {
+    if (command->type == CommandType::Module)
+      return command->module;
+  }
+  return nullptr;
+}
+
+const Module* Script::GetModule(const Var& var) const {
+  Index index = module_bindings.FindIndex(var);
+  if (index >= commands.size())
+    return nullptr;
+  const Command& command = *commands[index].get();
+  assert(command.type == CommandType::Module);
+  return command.module;
+}
+
+void MakeTypeBindingReverseMapping(
+    const TypeVector& types,
+    const BindingHash& bindings,
+    std::vector<std::string>* out_reverse_mapping) {
+  out_reverse_mapping->clear();
+  out_reverse_mapping->resize(types.size());
+  for (const auto& pair : bindings) {
+    assert(static_cast<size_t>(pair.second.index) <
+           out_reverse_mapping->size());
+    (*out_reverse_mapping)[pair.second.index] = pair.first;
+  }
+}
+
+ModuleField* Module::AppendField() {
+  ModuleField* result = new ModuleField();
+  if (!first_field)
+    first_field = result;
+  else if (last_field)
+    last_field->next = result;
+  last_field = result;
+  return result;
+}
+
+FuncType* Module::AppendImplicitFuncType(const Location& loc,
+                                         const FuncSignature& sig) {
+  ModuleField* field = AppendField();
+  field->loc = loc;
+  field->type = ModuleFieldType::FuncType;
+  field->func_type = new FuncType();
+  field->func_type->sig = sig;
+
+  func_types.push_back(field->func_type);
+  return field->func_type;
+}
+
+void DestroyExprList(Expr* first) {
+  Expr* expr = first;
+  while (expr) {
+    Expr* next = expr->next;
+    delete expr;
+    expr = next;
+  }
+}
+
+Var::Var(Index index) : type(VarType::Index), index(index) {
+  WABT_ZERO_MEMORY(loc);
+}
+
+Var::Var(const StringSlice& name) : type(VarType::Name), name(name) {
+  WABT_ZERO_MEMORY(loc);
+}
+
+Var::Var(Var&& rhs) : loc(rhs.loc), type(rhs.type) {
+  if (rhs.type == VarType::Index) {
+    index = rhs.index;
+  } else {
+    name = rhs.name;
+    rhs = Var(kInvalidIndex);
+  }
+}
+
+Var::Var(const Var& rhs) : loc(rhs.loc), type(rhs.type) {
+  if (rhs.type == VarType::Index) {
+    index = rhs.index;
+  } else {
+    name = dup_string_slice(rhs.name);
+  }
+}
+
+Var& Var::operator =(Var&& rhs) {
+  loc = rhs.loc;
+  type = rhs.type;
+  if (rhs.type == VarType::Index) {
+    index = rhs.index;
+  } else {
+    name = rhs.name;
+    rhs = Var(kInvalidIndex);
+  }
+  return *this;
+}
+
+Var& Var::operator =(const Var& rhs) {
+  loc = rhs.loc;
+  type = rhs.type;
+  if (rhs.type == VarType::Index) {
+    index = rhs.index;
+  } else {
+    name = dup_string_slice(rhs.name);
+  }
+  return *this;
+}
+
+Var::~Var() {
+  if (type == VarType::Name)
+    destroy_string_slice(&name);
+}
+
+Const::Const(I32, uint32_t value) : type(Type::I32), u32(value) {
+  WABT_ZERO_MEMORY(loc);
+}
+
+Const::Const(I64, uint64_t value) : type(Type::I64), u64(value) {
+  WABT_ZERO_MEMORY(loc);
+}
+
+Const::Const(F32, uint32_t value) : type(Type::F32), f32_bits(value) {
+  WABT_ZERO_MEMORY(loc);
+}
+
+Const::Const(F64, uint64_t value) : type(Type::F64), f64_bits(value) {
+  WABT_ZERO_MEMORY(loc);
+}
+
+Block::Block(): first(nullptr) {
+  WABT_ZERO_MEMORY(label);
+}
+
+Block::Block(Expr* first) : first(first) {
+  WABT_ZERO_MEMORY(label);
+}
+
+Block::~Block() {
+  destroy_string_slice(&label);
+  DestroyExprList(first);
+}
+
+Expr::Expr() : type(ExprType::Binary), next(nullptr) {
+  WABT_ZERO_MEMORY(loc);
+  binary.opcode = Opcode::Nop;
+}
+
+Expr::Expr(ExprType type) : type(type), next(nullptr) {
+  WABT_ZERO_MEMORY(loc);
+}
+
+Expr::~Expr() {
+  switch (type) {
+    case ExprType::Block:
+      delete block;
+      break;
+    case ExprType::Br:
+      br.var.~Var();
+      break;
+    case ExprType::BrIf:
+      br_if.var.~Var();
+      break;
+    case ExprType::BrTable:
+      delete br_table.targets;
+      br_table.default_target.~Var();
+      break;
+    case ExprType::Call:
+      call.var.~Var();
+      break;
+    case ExprType::CallIndirect:
+      call_indirect.var.~Var();
+      break;
+    case ExprType::Catch:
+    case ExprType::CatchAll:
+      catch_.var.~Var();
+      DestroyExprList(catch_.first);
+      break;
+    case ExprType::GetGlobal:
+      get_global.var.~Var();
+      break;
+    case ExprType::GetLocal:
+      get_local.var.~Var();
+      break;
+    case ExprType::If:
+      delete if_.true_;
+      DestroyExprList(if_.false_);
+      break;
+    case ExprType::Loop:
+      delete loop;
+      break;
+    case ExprType::Rethrow:
+      rethrow_.var.~Var();
+      break;
+    case ExprType::SetGlobal:
+      set_global.var.~Var();
+      break;
+    case ExprType::SetLocal:
+      set_local.var.~Var();
+      break;
+    case ExprType::TeeLocal:
+      tee_local.var.~Var();
+      break;
+    case ExprType::Throw:
+      throw_.var.~Var();
+      break;
+    case ExprType::TryBlock:
+      delete try_block.block;
+      DestroyExprList(try_block.first_catch);
+      break;
+    case ExprType::Binary:
+    case ExprType::Compare:
+    case ExprType::Const:
+    case ExprType::Convert:
+    case ExprType::Drop:
+    case ExprType::CurrentMemory:
+    case ExprType::GrowMemory:
+    case ExprType::Load:
+    case ExprType::Nop:
+    case ExprType::Return:
+    case ExprType::Select:
+    case ExprType::Store:
+    case ExprType::Unary:
+    case ExprType::Unreachable:
+      break;
+  }
+}
+
+// static
+Expr* Expr::CreateBinary(Opcode opcode) {
+  Expr* expr = new Expr(ExprType::Binary);
+  expr->binary.opcode = opcode;
+  return expr;
+}
+
+// static
+Expr* Expr::CreateBlock(Block* block) {
+  Expr* expr = new Expr(ExprType::Block);
+  expr->block = block;
+  return expr;
+}
+
+// static
+Expr* Expr::CreateBr(Var var) {
+  Expr* expr = new Expr(ExprType::Br);
+  expr->br.var = var;
+  return expr;
+}
+
+// static
+Expr* Expr::CreateBrIf(Var var) {
+  Expr* expr = new Expr(ExprType::BrIf);
+  expr->br_if.var = var;
+  return expr;
+}
+
+// static
+Expr* Expr::CreateBrTable(VarVector* targets, Var default_target) {
+  Expr* expr = new Expr(ExprType::BrTable);
+  expr->br_table.targets = targets;
+  expr->br_table.default_target = default_target;
+  return expr;
+}
+
+// static
+Expr* Expr::CreateCall(Var var) {
+  Expr* expr = new Expr(ExprType::Call);
+  expr->call.var = var;
+  return expr;
+}
+
+// static
+Expr* Expr::CreateCallIndirect(Var var) {
+  Expr* expr = new Expr(ExprType::CallIndirect);
+  expr->call_indirect.var = var;
+  return expr;
+}
+
+// static
+Expr* Expr::CreateCatch(Var var, Expr* first) {
+  Expr* expr = new Expr(ExprType::Catch);
+  expr->catch_.var = var;
+  expr->catch_.first = first;
+  return expr;
+}
+
+// static
+Expr* Expr::CreateCatchAll(Expr* first) {
+  Expr* expr = new Expr(ExprType::CatchAll);
+  expr->catch_.first = first;
+  return expr;
+}
+
+// static
+Expr* Expr::CreateCompare(Opcode opcode) {
+  Expr* expr = new Expr(ExprType::Compare);
+  expr->compare.opcode = opcode;
+  return expr;
+}
+
+// static
+Expr* Expr::CreateConst(const Const& const_) {
+  Expr* expr = new Expr(ExprType::Const);
+  expr->const_ = const_;
+  return expr;
+}
+
+// static
+Expr* Expr::CreateConvert(Opcode opcode) {
+  Expr* expr = new Expr(ExprType::Convert);
+  expr->convert.opcode = opcode;
+  return expr;
+}
+
+// static
+Expr* Expr::CreateCurrentMemory() {
+  return new Expr(ExprType::CurrentMemory);
+}
+
+// static
+Expr* Expr::CreateDrop() {
+  return new Expr(ExprType::Drop);
+}
+
+// static
+Expr* Expr::CreateGetGlobal(Var var) {
+  Expr* expr = new Expr(ExprType::GetGlobal);
+  expr->get_global.var = var;
+  return expr;
+}
+
+// static
+Expr* Expr::CreateGetLocal(Var var) {
+  Expr* expr = new Expr(ExprType::GetLocal);
+  expr->get_local.var = var;
+  return expr;
+}
+
+// static
+Expr* Expr::CreateGrowMemory() {
+  return new Expr(ExprType::GrowMemory);
+}
+
+// static
+Expr* Expr::CreateIf(Block* true_, Expr* false_) {
+  Expr* expr = new Expr(ExprType::If);
+  expr->if_.true_ = true_;
+  expr->if_.false_ = false_;
+  return expr;
+}
+
+// static
+Expr* Expr::CreateLoad(Opcode opcode, Address align, uint32_t offset) {
+  Expr* expr = new Expr(ExprType::Load);
+  expr->load.opcode = opcode;
+  expr->load.align = align;
+  expr->load.offset = offset;
+  return expr;
+}
+
+// static
+Expr* Expr::CreateLoop(Block* block) {
+  Expr* expr = new Expr(ExprType::Loop);
+  expr->loop = block;
+  return expr;
+}
+
+// static
+Expr* Expr::CreateNop() {
+  return new Expr(ExprType::Nop);
+}
+
+// static
+Expr* Expr::CreateRethrow(Var var) {
+  Expr* expr = new Expr(ExprType::Rethrow);
+  expr->rethrow_.var = var;
+  return expr;
+}
+
+// static
+Expr* Expr::CreateReturn() {
+  return new Expr(ExprType::Return);
+}
+
+// static
+Expr* Expr::CreateSelect() {
+  return new Expr(ExprType::Select);
+}
+
+// static
+Expr* Expr::CreateSetGlobal(Var var) {
+  Expr* expr = new Expr(ExprType::SetGlobal);
+  expr->set_global.var = var;
+  return expr;
+}
+
+// static
+Expr* Expr::CreateSetLocal(Var var) {
+  Expr* expr = new Expr(ExprType::SetLocal);
+  expr->set_local.var = var;
+  return expr;
+}
+
+// static
+Expr* Expr::CreateStore(Opcode opcode, Address align, uint32_t offset) {
+  Expr* expr = new Expr(ExprType::Store);
+  expr->store.opcode = opcode;
+  expr->store.align = align;
+  expr->store.offset = offset;
+  return expr;
+}
+
+// static
+Expr* Expr::CreateTeeLocal(Var var) {
+  Expr* expr = new Expr(ExprType::TeeLocal);
+  expr->tee_local.var = var;
+  return expr;
+}
+
+// static
+Expr* Expr::CreateThrow(Var var) {
+  Expr* expr = new Expr(ExprType::Throw);
+  expr->throw_.var = var;
+  return expr;
+}
+
+// static
+Expr* Expr::CreateTry(Block* block, Expr* first_catch) {
+  Expr* expr = new Expr(ExprType::TryBlock);
+  expr->try_block.block = block;
+  expr->try_block.first_catch = first_catch;
+  return expr;
+}
+
+// static
+Expr* Expr::CreateUnary(Opcode opcode) {
+  Expr* expr = new Expr(ExprType::Unary);
+  expr->unary.opcode = opcode;
+  return expr;
+}
+
+// static
+Expr* Expr::CreateUnreachable() {
+  return new Expr(ExprType::Unreachable);
+}
+
+FuncType::FuncType() {
+  WABT_ZERO_MEMORY(name);
+}
+
+FuncType::~FuncType() {
+  destroy_string_slice(&name);
+}
+
+FuncDeclaration::FuncDeclaration()
+    : has_func_type(false), type_var(kInvalidIndex) {}
+
+FuncDeclaration::~FuncDeclaration() {}
+
+Func::Func() : first_expr(nullptr) {
+  WABT_ZERO_MEMORY(name);
+}
+
+Func::~Func() {
+  destroy_string_slice(&name);
+  DestroyExprList(first_expr);
+}
+
+Global::Global() : type(Type::Void), mutable_(false), init_expr(nullptr) {
+  WABT_ZERO_MEMORY(name);
+}
+
+Global::~Global() {
+  destroy_string_slice(&name);
+  DestroyExprList(init_expr);
+}
+
+Table::Table() {
+  WABT_ZERO_MEMORY(name);
+  WABT_ZERO_MEMORY(elem_limits);
+}
+
+Table::~Table() {
+  destroy_string_slice(&name);
+}
+
+ElemSegment::ElemSegment() : table_var(kInvalidIndex), offset(nullptr) {}
+
+ElemSegment::~ElemSegment() {
+  DestroyExprList(offset);
+}
+
+DataSegment::DataSegment() : offset(nullptr), data(nullptr), size(0) {}
+
+DataSegment::~DataSegment() {
+  DestroyExprList(offset);
+  delete[] data;
+}
+
+Memory::Memory() {
+  WABT_ZERO_MEMORY(name);
+  WABT_ZERO_MEMORY(page_limits);
+}
+
+Memory::~Memory() {
+  destroy_string_slice(&name);
+}
+
+Import::Import() : kind(ExternalKind::Func), func(nullptr) {
+  WABT_ZERO_MEMORY(module_name);
+  WABT_ZERO_MEMORY(field_name);
+}
+
+Import::~Import() {
+  destroy_string_slice(&module_name);
+  destroy_string_slice(&field_name);
+  switch (kind) {
+    case ExternalKind::Func:
+      delete func;
+      break;
+    case ExternalKind::Table:
+      delete table;
+      break;
+    case ExternalKind::Memory:
+      delete memory;
+      break;
+    case ExternalKind::Global:
+      delete global;
+      break;
+    case ExternalKind::Except:
+      delete except;
+      break;
+  }
+}
+
+Export::Export() {
+  WABT_ZERO_MEMORY(name);
+}
+
+Export::~Export() {
+  destroy_string_slice(&name);
+}
+
+void destroy_memory(Memory* memory) {
+  destroy_string_slice(&memory->name);
+}
+
+void destroy_table(Table* table) {
+  destroy_string_slice(&table->name);
+}
+
+ModuleField::ModuleField() : ModuleField(ModuleFieldType::Start) {}
+
+ModuleField::ModuleField(ModuleFieldType type)
+    : type(type), next(nullptr), start(kInvalidIndex) {
+  WABT_ZERO_MEMORY(loc);
+}
+
+ModuleField::~ModuleField() {
+  switch (type) {
+    case ModuleFieldType::Except:
+      delete except;
+      break;
+    case ModuleFieldType::Func:
+      delete func;
+      break;
+    case ModuleFieldType::Global:
+      delete global;
+      break;
+    case ModuleFieldType::Import:
+      delete import;
+      break;
+    case ModuleFieldType::Export:
+      delete export_;
+      break;
+    case ModuleFieldType::FuncType:
+      delete func_type;
+      break;
+    case ModuleFieldType::Table:
+      delete table;
+      break;
+    case ModuleFieldType::ElemSegment:
+      delete elem_segment;
+      break;
+    case ModuleFieldType::Memory:
+      delete memory;
+      break;
+    case ModuleFieldType::DataSegment:
+      delete data_segment;
+      break;
+    case ModuleFieldType::Start:
+      start.~Var();
+      break;
+  }
+}
+
+Module::Module()
+    : first_field(nullptr),
+      last_field(nullptr),
+      num_except_imports(0),
+      num_func_imports(0),
+      num_table_imports(0),
+      num_memory_imports(0),
+      num_global_imports(0),
+      start(0) {
+  WABT_ZERO_MEMORY(loc);
+  WABT_ZERO_MEMORY(name);
+}
+
+Module::~Module() {
+  destroy_string_slice(&name);
+
+  ModuleField* field = first_field;
+  while (field) {
+    ModuleField* next_field = field->next;
+    delete field;
+    field = next_field;
+  }
+}
+
+ScriptModule::ScriptModule() : type(ScriptModule::Type::Text), text(nullptr) {}
+
+ScriptModule::~ScriptModule() {
+  switch (type) {
+    case ScriptModule::Type::Text:
+      delete text;
+      break;
+    case ScriptModule::Type::Binary:
+      destroy_string_slice(&binary.name);
+      delete [] binary.data;
+      break;
+    case ScriptModule::Type::Quoted:
+      destroy_string_slice(&quoted.name);
+      delete [] binary.data;
+      break;
+  }
+}
+
+ActionInvoke::ActionInvoke() {}
+
+Action::Action() : type(ActionType::Get), module_var(kInvalidIndex) {
+  WABT_ZERO_MEMORY(loc);
+  WABT_ZERO_MEMORY(name);
+}
+
+Action::~Action() {
+  destroy_string_slice(&name);
+  switch (type) {
+    case ActionType::Invoke:
+      delete invoke;
+      break;
+    case ActionType::Get:
+      break;
+  }
+}
+
+Command::Command() : type(CommandType::Module), module(nullptr) {}
+
+Command::~Command() {
+  switch (type) {
+    case CommandType::Module:
+      delete module;
+      break;
+    case CommandType::Action:
+      delete action;
+      break;
+    case CommandType::Register:
+      destroy_string_slice(&register_.module_name);
+      register_.var.~Var();
+      break;
+    case CommandType::AssertMalformed:
+      delete assert_malformed.module;
+      destroy_string_slice(&assert_malformed.text);
+      break;
+    case CommandType::AssertInvalid:
+    case CommandType::AssertInvalidNonBinary:
+      delete assert_invalid.module;
+      destroy_string_slice(&assert_invalid.text);
+      break;
+    case CommandType::AssertUnlinkable:
+      delete assert_unlinkable.module;
+      destroy_string_slice(&assert_unlinkable.text);
+      break;
+    case CommandType::AssertUninstantiable:
+      delete assert_uninstantiable.module;
+      destroy_string_slice(&assert_uninstantiable.text);
+      break;
+    case CommandType::AssertReturn:
+      delete assert_return.action;
+      delete assert_return.expected;
+      break;
+    case CommandType::AssertReturnCanonicalNan:
+      delete assert_return_arithmetic_nan.action;
+      break;
+    case CommandType::AssertReturnArithmeticNan:
+      delete assert_return_canonical_nan.action;
+      break;
+    case CommandType::AssertTrap:
+    case CommandType::AssertExhaustion:
+      delete assert_trap.action;
+      destroy_string_slice(&assert_trap.text);
+      break;
+  }
+}
+
+Script::Script() {}
+
+}  // namespace wabt
diff --git a/lib/wabt/src/ir.h b/lib/wabt/src/ir.h
new file mode 100644
index 0000000..3d51c51
--- /dev/null
+++ b/lib/wabt/src/ir.h
@@ -0,0 +1,568 @@
+/*
+ * Copyright 2016 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef WABT_IR_H_
+#define WABT_IR_H_
+
+#include <cassert>
+#include <cstddef>
+#include <cstdint>
+#include <memory>
+#include <string>
+#include <vector>
+
+#include "binding-hash.h"
+#include "common.h"
+#include "opcode.h"
+
+namespace wabt {
+
+enum class VarType {
+  Index,
+  Name,
+};
+
+struct Var {
+  explicit Var(Index index = kInvalidIndex);
+  explicit Var(const StringSlice& name);
+  Var(Var&&);
+  Var(const Var&);
+  Var& operator =(const Var&);
+  Var& operator =(Var&&);
+  ~Var();
+
+  Location loc;
+  VarType type;
+  union {
+    Index index;
+    StringSlice name;
+  };
+};
+typedef std::vector<Var> VarVector;
+
+typedef StringSlice Label;
+
+struct Const {
+  // Struct tags to differentiate constructors.
+  struct I32 {};
+  struct I64 {};
+  struct F32 {};
+  struct F64 {};
+
+  // Keep the default constructor trivial so it can be used as a union member.
+  Const() = default;
+  Const(I32, uint32_t);
+  Const(I64, uint64_t);
+  Const(F32, uint32_t);
+  Const(F64, uint64_t);
+
+  Location loc;
+  Type type;
+  union {
+    uint32_t u32;
+    uint64_t u64;
+    uint32_t f32_bits;
+    uint64_t f64_bits;
+  };
+};
+typedef std::vector<Const> ConstVector;
+
+enum class ExprType {
+  Binary,
+  Block,
+  Br,
+  BrIf,
+  BrTable,
+  Call,
+  CallIndirect,
+  Catch,
+  CatchAll,
+  Compare,
+  Const,
+  Convert,
+  CurrentMemory,
+  Drop,
+  GetGlobal,
+  GetLocal,
+  GrowMemory,
+  If,
+  Load,
+  Loop,
+  Nop,
+  Rethrow,
+  Return,
+  Select,
+  SetGlobal,
+  SetLocal,
+  Store,
+  TeeLocal,
+  Throw,
+  TryBlock,
+  Unary,
+  Unreachable,
+};
+
+typedef TypeVector BlockSignature;
+
+struct Expr;
+
+struct Block {
+  WABT_DISALLOW_COPY_AND_ASSIGN(Block);
+  Block();
+  explicit Block(Expr* first);
+  ~Block();
+
+  Label label;
+  BlockSignature sig;
+  Expr* first;
+};
+
+struct Expr {
+  WABT_DISALLOW_COPY_AND_ASSIGN(Expr);
+  Expr();
+  explicit Expr(ExprType);
+  ~Expr();
+
+  static Expr* CreateBinary(Opcode);
+  static Expr* CreateBlock(Block*);
+  static Expr* CreateBr(Var);
+  static Expr* CreateBrIf(Var);
+  static Expr* CreateBrTable(VarVector* targets, Var default_target);
+  static Expr* CreateCall(Var);
+  static Expr* CreateCallIndirect(Var);
+  static Expr* CreateCatch(Var v, Expr* first);
+  static Expr* CreateCatchAll(Expr* first);
+  static Expr* CreateCompare(Opcode);
+  static Expr* CreateConst(const Const&);
+  static Expr* CreateConvert(Opcode);
+  static Expr* CreateCurrentMemory();
+  static Expr* CreateDrop();
+  static Expr* CreateGetGlobal(Var);
+  static Expr* CreateGetLocal(Var);
+  static Expr* CreateGrowMemory();
+  static Expr* CreateIf(Block* true_, Expr* false_ = nullptr);
+  static Expr* CreateLoad(Opcode, Address align, uint32_t offset);
+  static Expr* CreateLoop(Block*);
+  static Expr* CreateNop();
+  static Expr* CreateRethrow(Var);
+  static Expr* CreateReturn();
+  static Expr* CreateSelect();
+  static Expr* CreateSetGlobal(Var);
+  static Expr* CreateSetLocal(Var);
+  static Expr* CreateStore(Opcode, Address align, uint32_t offset);
+  static Expr* CreateTeeLocal(Var);
+  static Expr* CreateThrow(Var);
+  static Expr* CreateTry(Block* block, Expr* first_catch);
+  static Expr* CreateUnary(Opcode);
+  static Expr* CreateUnreachable();
+
+  Location loc;
+  ExprType type;
+  Expr* next;
+  union {
+    struct { Opcode opcode; } binary, compare, convert, unary;
+    struct Block *block, *loop;
+    struct { Block* block; Expr* first_catch; } try_block;
+    struct { Var var; Expr* first; } catch_;
+    struct { Expr* first; } catch_all;
+    struct { Var var; } throw_, rethrow_;
+    struct { Var var; } br, br_if;
+    struct { VarVector* targets; Var default_target; } br_table;
+    struct { Var var; } call, call_indirect;
+    struct Const const_;
+    struct { Var var; } get_global, set_global;
+    struct { Var var; } get_local, set_local, tee_local;
+    struct { Block* true_; Expr* false_; } if_;
+    struct { Opcode opcode; Address align; uint32_t offset; } load, store;
+  };
+};
+
+struct Exception {
+  StringSlice name;
+  TypeVector sig;
+};
+
+struct FuncSignature {
+  TypeVector param_types;
+  TypeVector result_types;
+
+  Index GetNumParams() const { return param_types.size(); }
+  Index GetNumResults() const { return result_types.size(); }
+  Type GetParamType(Index index) const { return param_types[index]; }
+  Type GetResultType(Index index) const { return result_types[index]; }
+
+  bool operator==(const FuncSignature&) const;
+};
+
+struct FuncType {
+  WABT_DISALLOW_COPY_AND_ASSIGN(FuncType);
+  FuncType();
+  ~FuncType();
+
+  Index GetNumParams() const { return sig.GetNumParams(); }
+  Index GetNumResults() const { return sig.GetNumResults(); }
+  Type GetParamType(Index index) const { return sig.GetParamType(index); }
+  Type GetResultType(Index index) const { return sig.GetResultType(index); }
+
+  StringSlice name;
+  FuncSignature sig;
+};
+
+struct FuncDeclaration {
+  WABT_DISALLOW_COPY_AND_ASSIGN(FuncDeclaration);
+  FuncDeclaration();
+  ~FuncDeclaration();
+
+  Index GetNumParams() const { return sig.GetNumParams(); }
+  Index GetNumResults() const { return sig.GetNumResults(); }
+  Type GetParamType(Index index) const { return sig.GetParamType(index); }
+  Type GetResultType(Index index) const { return sig.GetResultType(index); }
+
+  bool has_func_type;
+  Var type_var;
+  FuncSignature sig;
+};
+
+struct Func {
+  WABT_DISALLOW_COPY_AND_ASSIGN(Func);
+  Func();
+  ~Func();
+
+  Type GetParamType(Index index) const { return decl.GetParamType(index); }
+  Type GetResultType(Index index) const { return decl.GetResultType(index); }
+  Index GetNumParams() const { return decl.GetNumParams(); }
+  Index GetNumLocals() const { return local_types.size(); }
+  Index GetNumParamsAndLocals() const {
+    return GetNumParams() + GetNumLocals();
+  }
+  Index GetNumResults() const { return decl.GetNumResults(); }
+  Index GetLocalIndex(const Var&) const;
+
+  StringSlice name;
+  FuncDeclaration decl;
+  TypeVector local_types;
+  BindingHash param_bindings;
+  BindingHash local_bindings;
+  Expr* first_expr;
+};
+
+struct Global {
+  WABT_DISALLOW_COPY_AND_ASSIGN(Global);
+  Global();
+  ~Global();
+
+  StringSlice name;
+  Type type;
+  bool mutable_;
+  Expr* init_expr;
+};
+
+struct Table {
+  WABT_DISALLOW_COPY_AND_ASSIGN(Table);
+  Table();
+  ~Table();
+
+  StringSlice name;
+  Limits elem_limits;
+};
+
+struct ElemSegment {
+  WABT_DISALLOW_COPY_AND_ASSIGN(ElemSegment);
+  ElemSegment();
+  ~ElemSegment();
+
+  Var table_var;
+  Expr* offset;
+  VarVector vars;
+};
+
+struct Memory {
+  WABT_DISALLOW_COPY_AND_ASSIGN(Memory);
+  Memory();
+  ~Memory();
+
+  StringSlice name;
+  Limits page_limits;
+};
+
+struct DataSegment {
+  WABT_DISALLOW_COPY_AND_ASSIGN(DataSegment);
+  DataSegment();
+  ~DataSegment();
+
+  Var memory_var;
+  Expr* offset;
+  char* data;
+  size_t size;
+};
+
+struct Import {
+  WABT_DISALLOW_COPY_AND_ASSIGN(Import);
+  Import();
+  ~Import();
+
+  StringSlice module_name;
+  StringSlice field_name;
+  ExternalKind kind;
+  union {
+    // An imported func has the type Func so it can be more easily included in
+    // the Module's vector of funcs, but only the FuncDeclaration will have any
+    // useful information.
+    Func* func;
+    Table* table;
+    Memory* memory;
+    Global* global;
+    Exception* except;
+  };
+};
+
+struct Export {
+  WABT_DISALLOW_COPY_AND_ASSIGN(Export);
+  Export();
+  ~Export();
+
+  StringSlice name;
+  ExternalKind kind;
+  Var var;
+};
+
+enum class ModuleFieldType {
+  Func,
+  Global,
+  Import,
+  Export,
+  FuncType,
+  Table,
+  ElemSegment,
+  Memory,
+  DataSegment,
+  Start,
+  Except
+};
+
+struct ModuleField {
+  WABT_DISALLOW_COPY_AND_ASSIGN(ModuleField);
+  ModuleField();
+  explicit ModuleField(ModuleFieldType);
+  ~ModuleField();
+
+  Location loc;
+  ModuleFieldType type;
+  ModuleField* next;
+  union {
+    Func* func;
+    Global* global;
+    Import* import;
+    Export* export_;
+    FuncType* func_type;
+    Table* table;
+    ElemSegment* elem_segment;
+    Memory* memory;
+    DataSegment* data_segment;
+    Exception* except;
+    Var start;
+  };
+};
+
+struct Module {
+  WABT_DISALLOW_COPY_AND_ASSIGN(Module);
+  Module();
+  ~Module();
+
+  ModuleField* AppendField();
+  FuncType* AppendImplicitFuncType(const Location&, const FuncSignature&);
+
+  Index GetFuncTypeIndex(const Var&) const;
+  Index GetFuncTypeIndex(const FuncDeclaration&) const;
+  Index GetFuncTypeIndex(const FuncSignature&) const;
+  const FuncType* GetFuncType(const Var&) const;
+  FuncType* GetFuncType(const Var&);
+  Index GetFuncIndex(const Var&) const;
+  const Func* GetFunc(const Var&) const;
+  Func* GetFunc(const Var&);
+  Index GetTableIndex(const Var&) const;
+  Table* GetTable(const Var&);
+  Index GetMemoryIndex(const Var&) const;
+  Memory* GetMemory(const Var&);
+  Index GetGlobalIndex(const Var&) const;
+  const Global* GetGlobal(const Var&) const;
+  Global* GetGlobal(const Var&);
+  const Export* GetExport(const StringSlice&) const;
+
+  Location loc;
+  StringSlice name;
+  ModuleField* first_field;
+  ModuleField* last_field;
+
+  Index num_except_imports;
+  Index num_func_imports;
+  Index num_table_imports;
+  Index num_memory_imports;
+  Index num_global_imports;
+
+  // Cached for convenience; the pointers are shared with values that are
+  // stored in either ModuleField or Import.
+  std::vector<Exception*> excepts;
+  std::vector<Func*> funcs;
+  std::vector<Global*> globals;
+  std::vector<Import*> imports;
+  std::vector<Export*> exports;
+  std::vector<FuncType*> func_types;
+  std::vector<Table*> tables;
+  std::vector<ElemSegment*> elem_segments;
+  std::vector<Memory*> memories;
+  std::vector<DataSegment*> data_segments;
+  Var* start;
+
+  BindingHash except_bindings;
+  BindingHash func_bindings;
+  BindingHash global_bindings;
+  BindingHash export_bindings;
+  BindingHash func_type_bindings;
+  BindingHash table_bindings;
+  BindingHash memory_bindings;
+};
+
+// A ScriptModule is a module that may not yet be decoded. This allows for text
+// and binary parsing errors to be deferred until validation time.
+struct ScriptModule {
+  enum class Type {
+    Text,
+    Binary,
+    Quoted,
+  };
+
+  WABT_DISALLOW_COPY_AND_ASSIGN(ScriptModule);
+  ScriptModule();
+  ~ScriptModule();
+
+  const Location& GetLocation() const {
+    switch (type) {
+      case Type::Binary: return binary.loc;
+      case Type::Quoted: return quoted.loc;
+      default: assert(0); // Fallthrough.
+      case Type::Text: return text->loc;
+    }
+  }
+
+  Type type;
+
+  union {
+    Module* text;
+    struct {
+      Location loc;
+      StringSlice name;
+      char* data;
+      size_t size;
+    } binary, quoted;
+  };
+};
+
+enum class ActionType {
+  Invoke,
+  Get,
+};
+
+struct ActionInvoke {
+  WABT_DISALLOW_COPY_AND_ASSIGN(ActionInvoke);
+  ActionInvoke();
+
+  ConstVector args;
+};
+
+struct Action {
+  WABT_DISALLOW_COPY_AND_ASSIGN(Action);
+  Action();
+  ~Action();
+
+  Location loc;
+  ActionType type;
+  Var module_var;
+  StringSlice name;
+  union {
+    ActionInvoke* invoke;
+    struct {} get;
+  };
+};
+
+enum class CommandType {
+  Module,
+  Action,
+  Register,
+  AssertMalformed,
+  AssertInvalid,
+  /* This is a module that is invalid, but cannot be written as a binary module
+   * (e.g. it has unresolvable names.) */
+  AssertInvalidNonBinary,
+  AssertUnlinkable,
+  AssertUninstantiable,
+  AssertReturn,
+  AssertReturnCanonicalNan,
+  AssertReturnArithmeticNan,
+  AssertTrap,
+  AssertExhaustion,
+
+  First = Module,
+  Last = AssertExhaustion,
+};
+static const int kCommandTypeCount = WABT_ENUM_COUNT(CommandType);
+
+struct Command {
+  WABT_DISALLOW_COPY_AND_ASSIGN(Command);
+  Command();
+  ~Command();
+
+  CommandType type;
+  union {
+    Module* module;
+    Action* action;
+    struct { StringSlice module_name; Var var; } register_;
+    struct { Action* action; ConstVector* expected; } assert_return;
+    struct {
+      Action* action;
+    } assert_return_canonical_nan, assert_return_arithmetic_nan;
+    struct { Action* action; StringSlice text; } assert_trap;
+    struct {
+      ScriptModule* module;
+      StringSlice text;
+    } assert_malformed, assert_invalid, assert_unlinkable,
+        assert_uninstantiable;
+  };
+};
+typedef std::vector<std::unique_ptr<Command>> CommandPtrVector;
+
+struct Script {
+  WABT_DISALLOW_COPY_AND_ASSIGN(Script);
+  Script();
+
+  const Module* GetFirstModule() const;
+  Module* GetFirstModule();
+  const Module* GetModule(const Var&) const;
+
+  CommandPtrVector commands;
+  BindingHash module_bindings;
+};
+
+void DestroyExprList(Expr*);
+
+void MakeTypeBindingReverseMapping(
+    const TypeVector&,
+    const BindingHash&,
+    std::vector<std::string>* out_reverse_mapping);
+
+}  // namespace wabt
+
+#endif /* WABT_IR_H_ */
diff --git a/lib/wabt/src/lexer-source-line-finder.cc b/lib/wabt/src/lexer-source-line-finder.cc
new file mode 100644
index 0000000..a26a90c
--- /dev/null
+++ b/lib/wabt/src/lexer-source-line-finder.cc
@@ -0,0 +1,153 @@
+/*
+ * Copyright 2017 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "lexer-source-line-finder.h"
+
+#include <algorithm>
+
+#include "lexer-source.h"
+
+#define CHECK_RESULT(expr)  \
+  do {                      \
+    if (WABT_FAILED(expr))  \
+      return Result::Error; \
+  } while (0)
+
+namespace wabt {
+
+LexerSourceLineFinder::LexerSourceLineFinder(
+    std::unique_ptr<LexerSource> source)
+    : source_(std::move(source)),
+      next_line_start_(0),
+      last_cr_(false),
+      eof_(false) {
+  // Line 0 should not be used; but it makes indexing simpler.
+  line_ranges_.emplace_back(0, 0);
+}
+
+Result LexerSourceLineFinder::GetSourceLine(const Location& loc,
+                                            Offset max_line_length,
+                                            SourceLine* out_source_line) {
+  ColumnRange column_range(loc.first_column, loc.last_column);
+  OffsetRange original;
+  CHECK_RESULT(GetLineOffsets(loc.line, &original));
+
+  OffsetRange clamped =
+      ClampSourceLineOffsets(original, column_range, max_line_length);
+  bool has_start_ellipsis = original.start != clamped.start;
+  bool has_end_ellipsis = original.end != clamped.end;
+
+  out_source_line->column_offset = clamped.start - original.start;
+
+  if (has_start_ellipsis) {
+    out_source_line->line += "...";
+    clamped.start += 3;
+  }
+  if (has_end_ellipsis)
+    clamped.end -= 3;
+
+  std::vector<char> read_line;
+  CHECK_RESULT(source_->ReadRange(clamped, &read_line));
+  out_source_line->line.append(read_line.begin(), read_line.end());
+
+  if (has_end_ellipsis)
+    out_source_line->line += "...";
+
+  return Result::Ok;
+}
+
+bool LexerSourceLineFinder::IsLineCached(int line) const {
+  return static_cast<size_t>(line) < line_ranges_.size();
+}
+
+OffsetRange LexerSourceLineFinder::GetCachedLine(int line) const {
+  assert(IsLineCached(line));
+  return line_ranges_[line];
+}
+
+Result LexerSourceLineFinder::GetLineOffsets(int find_line,
+                                             OffsetRange* out_range) {
+  if (IsLineCached(find_line)) {
+    *out_range = GetCachedLine(find_line);
+    return Result::Ok;
+  }
+
+  const size_t kBufferSize = 1 << 16;
+  std::vector<char> buffer(kBufferSize);
+
+  assert(!line_ranges_.empty());
+  Offset buffer_file_offset = 0;
+  CHECK_RESULT(source_->Tell(&buffer_file_offset));
+  while (!IsLineCached(find_line) && !eof_) {
+    size_t read_size = source_->Fill(buffer.data(), buffer.size());
+    if (read_size < buffer.size())
+      eof_ = true;
+
+    for (auto iter = buffer.begin(), end = iter + read_size; iter < end;
+         ++iter) {
+      if (*iter == '\n') {
+        // Don't include \n or \r in the line range.
+        Offset line_offset =
+            buffer_file_offset + (iter - buffer.begin()) - last_cr_;
+        line_ranges_.emplace_back(next_line_start_, line_offset);
+        next_line_start_ = line_offset + last_cr_ + 1;
+      }
+      last_cr_ = *iter == '\r';
+    }
+
+    if (eof_) {
+      // Add the final line as an empty range.
+      Offset end = buffer_file_offset + read_size;
+      line_ranges_.emplace_back(next_line_start_, end);
+    }
+  }
+
+  if (IsLineCached(find_line)) {
+    *out_range = GetCachedLine(find_line);
+    return Result::Ok;
+  } else {
+    assert(eof_);
+    return Result::Error;
+  }
+}
+
+// static
+OffsetRange LexerSourceLineFinder::ClampSourceLineOffsets(
+    OffsetRange offset_range,
+    ColumnRange column_range,
+    Offset max_line_length) {
+  Offset line_length = offset_range.size();
+  if (line_length > max_line_length) {
+    size_t column_count = column_range.size();
+    size_t center_on;
+    if (column_count > max_line_length) {
+      // The column range doesn't fit, just center on first_column.
+      center_on = column_range.start - 1;
+    } else {
+      // the entire range fits, display it all in the center.
+      center_on = (column_range.start + column_range.end) / 2 - 1;
+    }
+    if (center_on > max_line_length / 2)
+      offset_range.start += center_on - max_line_length / 2;
+    offset_range.start =
+        std::min(offset_range.start, offset_range.end - max_line_length);
+    offset_range.end = offset_range.start + max_line_length;
+  }
+
+  return offset_range;
+}
+
+}  // namespace wabt
diff --git a/lib/wabt/src/lexer-source-line-finder.h b/lib/wabt/src/lexer-source-line-finder.h
new file mode 100644
index 0000000..8b939eb
--- /dev/null
+++ b/lib/wabt/src/lexer-source-line-finder.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2017 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef WABT_LEXER_SOURCE_LINE_FINDER_H_
+#define WABT_LEXER_SOURCE_LINE_FINDER_H_
+
+#include <memory>
+#include <string>
+#include <vector>
+
+#include "common.h"
+#include "range.h"
+
+namespace wabt {
+
+class LexerSource;
+
+class LexerSourceLineFinder {
+ public:
+  struct SourceLine {
+    std::string line;
+    int column_offset;
+  };
+
+  explicit LexerSourceLineFinder(std::unique_ptr<LexerSource>);
+
+  Result GetSourceLine(const Location& loc,
+                       Offset max_line_length,
+                       SourceLine* out_source_line);
+  Result GetLineOffsets(int line, OffsetRange* out_offsets);
+
+ private:
+  static OffsetRange ClampSourceLineOffsets(OffsetRange line_offset_range,
+                                            ColumnRange column_range,
+                                            Offset max_line_length);
+
+  bool IsLineCached(int line) const;
+  OffsetRange GetCachedLine(int line) const;
+
+  std::unique_ptr<LexerSource> source_;
+  std::vector<OffsetRange> line_ranges_;
+  Offset next_line_start_;
+  bool last_cr_;  // Last read character was a '\r' (carriage return).
+  bool eof_;
+};
+
+}  // namespace wabt
+
+#endif  // WABT_LEXER_SOURCE_LINE_FINDER_H_
diff --git a/lib/wabt/src/lexer-source.cc b/lib/wabt/src/lexer-source.cc
new file mode 100644
index 0000000..42b6e1a
--- /dev/null
+++ b/lib/wabt/src/lexer-source.cc
@@ -0,0 +1,131 @@
+/*
+ * Copyright 2017 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "lexer-source.h"
+
+#include <algorithm>
+
+#define CHECK_RESULT(expr)  \
+  do {                      \
+    if (WABT_FAILED(expr))  \
+      return Result::Error; \
+  } while (0)
+
+namespace wabt {
+
+LexerSourceFile::LexerSourceFile(const std::string& filename)
+  : filename_(filename) {
+  file_ = fopen(filename.c_str(), "rb");
+}
+
+LexerSourceFile::~LexerSourceFile() {
+  if (file_)
+    fclose(file_);
+}
+
+std::unique_ptr<LexerSource> LexerSourceFile::Clone() {
+  std::unique_ptr<LexerSourceFile> result(new LexerSourceFile(filename_));
+
+  Offset offset = 0;
+  if (WABT_FAILED(Tell(&offset)) || WABT_FAILED(result->Seek(offset)))
+    result.reset();
+
+  return std::move(result);
+}
+
+Result LexerSourceFile::Tell(Offset* out_offset) {
+  if (!file_)
+    return Result::Error;
+
+  long offset = ftell(file_);
+  if (offset < 0)
+    return Result::Error;
+
+  *out_offset = offset;
+  return Result::Ok;
+}
+
+size_t LexerSourceFile::Fill(void* dest, size_t size)  {
+  if (!file_)
+    return 0;
+  return fread(dest, 1, size, file_);
+}
+
+Result LexerSourceFile::ReadRange(OffsetRange range,
+                                  std::vector<char>* out_data) {
+  Offset old_offset = 0;
+  CHECK_RESULT(Tell(&old_offset));
+  CHECK_RESULT(Seek(range.start));
+
+  std::vector<char> result(range.size());
+  if (range.size() > 0) {
+    size_t read_size = Fill(result.data(), range.size());
+    if (read_size < range.size())
+      result.resize(read_size);
+  }
+
+  CHECK_RESULT(Seek(old_offset));
+
+  *out_data = std::move(result);
+  return Result::Ok;
+}
+
+Result LexerSourceFile::Seek(Offset offset) {
+  if (!file_)
+    return Result::Error;
+
+  int result = fseek(file_, offset, SEEK_SET);
+  return result < 0 ? Result::Error : Result::Ok;
+}
+
+LexerSourceBuffer::LexerSourceBuffer(const void* data, Offset size)
+    : data_(data), size_(size), read_offset_(0) {}
+
+std::unique_ptr<LexerSource> LexerSourceBuffer::Clone() {
+  LexerSourceBuffer* result = new LexerSourceBuffer(data_, size_);
+  result->read_offset_ = read_offset_;
+  return std::unique_ptr<LexerSource>(result);
+}
+
+Result LexerSourceBuffer::Tell(Offset* out_offset) {
+  *out_offset = read_offset_;
+  return Result::Ok;
+}
+
+size_t LexerSourceBuffer::Fill(void* dest, Offset size) {
+  Offset read_size = std::min(size, size_ - read_offset_);
+  if (read_size > 0) {
+    const void* src = static_cast<const char*>(data_) + read_offset_;
+    memcpy(dest, src, read_size);
+    read_offset_ += read_size;
+  }
+  return read_size;
+}
+
+Result LexerSourceBuffer::ReadRange(OffsetRange range,
+                                    std::vector<char>* out_data) {
+  OffsetRange clamped = range;
+  clamped.start = std::min(clamped.start, size_);
+  clamped.end = std::min(clamped.end, size_);
+  if (clamped.size()) {
+    out_data->resize(clamped.size());
+    const void* src = static_cast<const char*>(data_) + clamped.start;
+    memcpy(out_data->data(), src, clamped.size());
+  }
+  return Result::Ok;
+}
+
+}  // namespace wabt
diff --git a/lib/wabt/src/lexer-source.h b/lib/wabt/src/lexer-source.h
new file mode 100644
index 0000000..4f128d6
--- /dev/null
+++ b/lib/wabt/src/lexer-source.h
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2017 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef WABT_LEXER_SOURCE_H_
+#define WABT_LEXER_SOURCE_H_
+
+#include <cstddef>
+#include <memory>
+#include <string>
+#include <vector>
+
+#include "common.h"
+#include "range.h"
+
+namespace wabt {
+
+class LexerSource {
+ public:
+  LexerSource() = default;
+  virtual ~LexerSource() {}
+  virtual std::unique_ptr<LexerSource> Clone() = 0;
+  virtual Result Tell(Offset* out_offset) = 0;
+  virtual size_t Fill(void* dest, size_t size) = 0;
+  virtual Result ReadRange(OffsetRange, std::vector<char>* out_data) = 0;
+
+  WABT_DISALLOW_COPY_AND_ASSIGN(LexerSource);
+};
+
+class LexerSourceFile : public LexerSource {
+ public:
+  explicit LexerSourceFile(const std::string& filename);
+  ~LexerSourceFile();
+
+  bool IsOpen() const { return file_ != nullptr; }
+
+  std::unique_ptr<LexerSource> Clone() override;
+  Result Tell(Offset* out_offset) override;
+  size_t Fill(void* dest, size_t size) override;
+  Result ReadRange(OffsetRange, std::vector<char>* out_data) override;
+
+ private:
+  Result Seek(Offset offset);
+
+  std::string filename_;
+  FILE* file_;
+};
+
+class LexerSourceBuffer : public LexerSource {
+ public:
+  LexerSourceBuffer(const void* data, Offset size);
+
+  std::unique_ptr<LexerSource> Clone() override;
+  Result Tell(Offset* out_offset) override;
+  size_t Fill(void* dest, size_t size) override;
+  Result ReadRange(OffsetRange, std::vector<char>* out_data) override;
+
+ private:
+  const void* data_;
+  Offset size_;
+  Offset read_offset_;
+};
+
+}  // namespace wabt
+
+#endif  // WABT_LEXER_SOURCE_H_
diff --git a/lib/wabt/src/literal.cc b/lib/wabt/src/literal.cc
index 4cacf4b..1e1d1d9 100644
--- a/lib/wabt/src/literal.cc
+++ b/lib/wabt/src/literal.cc
@@ -16,11 +16,11 @@
 
 #include "literal.h"
 
-#include <assert.h>
-#include <errno.h>
-#include <math.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cassert>
+#include <cerrno>
+#include <cmath>
+#include <cstdlib>
+#include <cstring>
 
 #define HEX_DIGIT_BITS 4
 
@@ -376,7 +376,7 @@
   } else if (*s == '+') {
     s++;
   }
-  assert(string_starts_with(s, end, "infinity"));
+  assert(string_starts_with(s, end, "inf"));
   *out_bits = make_float(is_neg, F32_MAX_EXP, 0);
 }
 
@@ -428,7 +428,7 @@
   /* 1234567890123456 */
   /* -0x#.######p-### */
   /* -nan:0x###### */
-  /* -infinity */
+  /* -inf */
   char buffer[WABT_MAX_FLOAT_HEX];
   char* p = buffer;
   bool is_neg = (bits >> F32_SIGN_SHIFT);
@@ -440,8 +440,8 @@
   if (exp == F32_MAX_EXP) {
     /* infinity or nan */
     if (sig == 0) {
-      strcpy(p, "infinity");
-      p += 8;
+      strcpy(p, "inf");
+      p += 3;
     } else {
       strcpy(p, "nan");
       p += 3;
@@ -716,7 +716,7 @@
   } else if (*s == '+') {
     s++;
   }
-  assert(string_starts_with(s, end, "infinity"));
+  assert(string_starts_with(s, end, "inf"));
   *out_bits = make_double(is_neg, F64_MAX_EXP, 0);
 }
 
@@ -769,7 +769,7 @@
   /* 123456789012345678901234 */
   /* -0x#.#############p-#### */
   /* -nan:0x############# */
-  /* -infinity */
+  /* -inf */
   char buffer[WABT_MAX_DOUBLE_HEX];
   char* p = buffer;
   bool is_neg = (bits >> F64_SIGN_SHIFT);
@@ -781,8 +781,8 @@
   if (exp == F64_MAX_EXP) {
     /* infinity or nan */
     if (sig == 0) {
-      strcpy(p, "infinity");
-      p += 8;
+      strcpy(p, "inf");
+      p += 3;
     } else {
       strcpy(p, "nan");
       p += 3;
diff --git a/lib/wabt/src/literal.h b/lib/wabt/src/literal.h
index 6863f96..e1747c2 100644
--- a/lib/wabt/src/literal.h
+++ b/lib/wabt/src/literal.h
@@ -17,7 +17,7 @@
 #ifndef WABT_LITERAL_H_
 #define WABT_LITERAL_H_
 
-#include <stdint.h>
+#include <cstdint>
 
 #include "common.h"
 
diff --git a/lib/wabt/src/opcode.cc b/lib/wabt/src/opcode.cc
new file mode 100644
index 0000000..d74a058
--- /dev/null
+++ b/lib/wabt/src/opcode.cc
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2017 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "opcode.h"
+
+namespace wabt {
+
+OpcodeInfo g_opcode_info[kOpcodeCount] = {
+
+#define WABT_OPCODE(rtype, type1, type2, mem_size, code, Name, text) \
+  {text, Type::rtype, Type::type1, Type::type2, mem_size},
+#include "opcode.def"
+#undef WABT_OPCODE
+
+};
+
+bool is_naturally_aligned(Opcode opcode, Address alignment) {
+  Address opcode_align = get_opcode_memory_size(opcode);
+  return alignment == WABT_USE_NATURAL_ALIGNMENT || alignment == opcode_align;
+}
+
+Address get_opcode_alignment(Opcode opcode, Address alignment) {
+  if (alignment == WABT_USE_NATURAL_ALIGNMENT)
+    return get_opcode_memory_size(opcode);
+  return alignment;
+}
+
+}  // namespace
diff --git a/lib/wabt/src/opcode.def b/lib/wabt/src/opcode.def
new file mode 100644
index 0000000..457108c
--- /dev/null
+++ b/lib/wabt/src/opcode.def
@@ -0,0 +1,224 @@
+/*
+ * Copyright 2017 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef WABT_OPCODE
+#error "You must define WABT_OPCODE before including this file."
+#endif
+
+/*
+ *   tr: result type
+ *   t1: type of the 1st parameter
+ *   t2: type of the 2nd parameter
+ *    m: memory size of the operation, if any
+ * code: opcode
+ * Name: used to generate the opcode enum
+ * text: a string of the opcode name in the text format
+ *
+ *          tr  t1    t2   m  code  Name text
+ * ============================================================  */
+
+WABT_OPCODE(___, ___, ___, 0, 0x00, Unreachable, "unreachable")
+WABT_OPCODE(___, ___, ___, 0, 0x01, Nop, "nop")
+WABT_OPCODE(___, ___, ___, 0, 0x02, Block, "block")
+WABT_OPCODE(___, ___, ___, 0, 0x03, Loop, "loop")
+WABT_OPCODE(___, ___, ___, 0, 0x04, If, "if")
+WABT_OPCODE(___, ___, ___, 0, 0x05, Else, "else")
+WABT_OPCODE(___, ___, ___, 0, 0x06, Invalid_0x06, "<invalid:0x06>")
+WABT_OPCODE(___, ___, ___, 0, 0x07, Invalid_0x07, "<invalid:0x07>")
+WABT_OPCODE(___, ___, ___, 0, 0x08, Invalid_0x08, "<invalid:0x08>")
+WABT_OPCODE(___, ___, ___, 0, 0x09, Invalid_0x09, "<invalid:0x09>")
+WABT_OPCODE(___, ___, ___, 0, 0x0a, Invalid_0x0A, "<invalid:0x0a>")
+WABT_OPCODE(___, ___, ___, 0, 0x0b, End, "end")
+WABT_OPCODE(___, ___, ___, 0, 0x0c, Br, "br")
+WABT_OPCODE(___, ___, ___, 0, 0x0d, BrIf, "br_if")
+WABT_OPCODE(___, ___, ___, 0, 0x0e, BrTable, "br_table")
+WABT_OPCODE(___, ___, ___, 0, 0x0f, Return, "return")
+WABT_OPCODE(___, ___, ___, 0, 0x10, Call, "call")
+WABT_OPCODE(___, ___, ___, 0, 0x11, CallIndirect, "call_indirect")
+WABT_OPCODE(___, ___, ___, 0, 0x12, Invalid_0x12, "<invalid:0x12>")
+WABT_OPCODE(___, ___, ___, 0, 0x13, Invalid_0x13, "<invalid:0x13>")
+WABT_OPCODE(___, ___, ___, 0, 0x14, Invalid_0x14, "<invalid:0x14>")
+WABT_OPCODE(___, ___, ___, 0, 0x15, Invalid_0x15, "<invalid:0x15>")
+WABT_OPCODE(___, ___, ___, 0, 0x16, Invalid_0x16, "<invalid:0x16>")
+WABT_OPCODE(___, ___, ___, 0, 0x17, Invalid_0x17, "<invalid:0x17>")
+WABT_OPCODE(___, ___, ___, 0, 0x18, Invalid_0x18, "<invalid:0x18>")
+WABT_OPCODE(___, ___, ___, 0, 0x19, Invalid_0x19, "<invalid:0x19>")
+WABT_OPCODE(___, ___, ___, 0, 0x1a, Drop, "drop")
+WABT_OPCODE(___, ___, ___, 0, 0x1b, Select, "select")
+WABT_OPCODE(___, ___, ___, 0, 0x1c, Invalid_0x1c, "<invalid:0x1c>")
+WABT_OPCODE(___, ___, ___, 0, 0x1d, Invalid_0x1d, "<invalid:0x1d>")
+WABT_OPCODE(___, ___, ___, 0, 0x1e, Invalid_0x1e, "<invalid:0x1e>")
+WABT_OPCODE(___, ___, ___, 0, 0x1f, Invalid_0x1f, "<invalid:0x1f>")
+WABT_OPCODE(___, ___, ___, 0, 0x20, GetLocal, "get_local")
+WABT_OPCODE(___, ___, ___, 0, 0x21, SetLocal, "set_local")
+WABT_OPCODE(___, ___, ___, 0, 0x22, TeeLocal, "tee_local")
+WABT_OPCODE(___, ___, ___, 0, 0x23, GetGlobal, "get_global")
+WABT_OPCODE(___, ___, ___, 0, 0x24, SetGlobal, "set_global")
+WABT_OPCODE(___, ___, ___, 0, 0x25, Invalid_0x25, "<invalid:0x25>")
+WABT_OPCODE(___, ___, ___, 0, 0x26, Invalid_0x26, "<invalid:0x26>")
+WABT_OPCODE(___, ___, ___, 0, 0x27, Invalid_0x27, "<invalid:0x27>")
+WABT_OPCODE(I32, I32, ___, 4, 0x28, I32Load, "i32.load")
+WABT_OPCODE(I64, I32, ___, 8, 0x29, I64Load, "i64.load")
+WABT_OPCODE(F32, I32, ___, 4, 0x2a, F32Load, "f32.load")
+WABT_OPCODE(F64, I32, ___, 8, 0x2b, F64Load, "f64.load")
+WABT_OPCODE(I32, I32, ___, 1, 0x2c, I32Load8S, "i32.load8_s")
+WABT_OPCODE(I32, I32, ___, 1, 0x2d, I32Load8U, "i32.load8_u")
+WABT_OPCODE(I32, I32, ___, 2, 0x2e, I32Load16S, "i32.load16_s")
+WABT_OPCODE(I32, I32, ___, 2, 0x2f, I32Load16U, "i32.load16_u")
+WABT_OPCODE(I64, I32, ___, 1, 0x30, I64Load8S, "i64.load8_s")
+WABT_OPCODE(I64, I32, ___, 1, 0x31, I64Load8U, "i64.load8_u")
+WABT_OPCODE(I64, I32, ___, 2, 0x32, I64Load16S, "i64.load16_s")
+WABT_OPCODE(I64, I32, ___, 2, 0x33, I64Load16U, "i64.load16_u")
+WABT_OPCODE(I64, I32, ___, 4, 0x34, I64Load32S, "i64.load32_s")
+WABT_OPCODE(I64, I32, ___, 4, 0x35, I64Load32U, "i64.load32_u")
+WABT_OPCODE(___, I32, I32, 4, 0x36, I32Store, "i32.store")
+WABT_OPCODE(___, I32, I64, 8, 0x37, I64Store, "i64.store")
+WABT_OPCODE(___, I32, F32, 4, 0x38, F32Store, "f32.store")
+WABT_OPCODE(___, I32, F64, 8, 0x39, F64Store, "f64.store")
+WABT_OPCODE(___, I32, I32, 1, 0x3a, I32Store8, "i32.store8")
+WABT_OPCODE(___, I32, I32, 2, 0x3b, I32Store16, "i32.store16")
+WABT_OPCODE(___, I32, I64, 1, 0x3c, I64Store8, "i64.store8")
+WABT_OPCODE(___, I32, I64, 2, 0x3d, I64Store16, "i64.store16")
+WABT_OPCODE(___, I32, I64, 4, 0x3e, I64Store32, "i64.store32")
+WABT_OPCODE(I32, ___, ___, 0, 0x3f, CurrentMemory, "current_memory")
+WABT_OPCODE(I32, I32, ___, 0, 0x40, GrowMemory, "grow_memory")
+WABT_OPCODE(I32, ___, ___, 0, 0x41, I32Const, "i32.const")
+WABT_OPCODE(I64, ___, ___, 0, 0x42, I64Const, "i64.const")
+WABT_OPCODE(F32, ___, ___, 0, 0x43, F32Const, "f32.const")
+WABT_OPCODE(F64, ___, ___, 0, 0x44, F64Const, "f64.const")
+WABT_OPCODE(I32, I32, ___, 0, 0x45, I32Eqz, "i32.eqz")
+WABT_OPCODE(I32, I32, I32, 0, 0x46, I32Eq, "i32.eq")
+WABT_OPCODE(I32, I32, I32, 0, 0x47, I32Ne, "i32.ne")
+WABT_OPCODE(I32, I32, I32, 0, 0x48, I32LtS, "i32.lt_s")
+WABT_OPCODE(I32, I32, I32, 0, 0x49, I32LtU, "i32.lt_u")
+WABT_OPCODE(I32, I32, I32, 0, 0x4a, I32GtS, "i32.gt_s")
+WABT_OPCODE(I32, I32, I32, 0, 0x4b, I32GtU, "i32.gt_u")
+WABT_OPCODE(I32, I32, I32, 0, 0x4c, I32LeS, "i32.le_s")
+WABT_OPCODE(I32, I32, I32, 0, 0x4d, I32LeU, "i32.le_u")
+WABT_OPCODE(I32, I32, I32, 0, 0x4e, I32GeS, "i32.ge_s")
+WABT_OPCODE(I32, I32, I32, 0, 0x4f, I32GeU, "i32.ge_u")
+WABT_OPCODE(I32, I64, ___, 0, 0x50, I64Eqz, "i64.eqz")
+WABT_OPCODE(I32, I64, I64, 0, 0x51, I64Eq, "i64.eq")
+WABT_OPCODE(I32, I64, I64, 0, 0x52, I64Ne, "i64.ne")
+WABT_OPCODE(I32, I64, I64, 0, 0x53, I64LtS, "i64.lt_s")
+WABT_OPCODE(I32, I64, I64, 0, 0x54, I64LtU, "i64.lt_u")
+WABT_OPCODE(I32, I64, I64, 0, 0x55, I64GtS, "i64.gt_s")
+WABT_OPCODE(I32, I64, I64, 0, 0x56, I64GtU, "i64.gt_u")
+WABT_OPCODE(I32, I64, I64, 0, 0x57, I64LeS, "i64.le_s")
+WABT_OPCODE(I32, I64, I64, 0, 0x58, I64LeU, "i64.le_u")
+WABT_OPCODE(I32, I64, I64, 0, 0x59, I64GeS, "i64.ge_s")
+WABT_OPCODE(I32, I64, I64, 0, 0x5a, I64GeU, "i64.ge_u")
+WABT_OPCODE(I32, F32, F32, 0, 0x5b, F32Eq, "f32.eq")
+WABT_OPCODE(I32, F32, F32, 0, 0x5c, F32Ne, "f32.ne")
+WABT_OPCODE(I32, F32, F32, 0, 0x5d, F32Lt, "f32.lt")
+WABT_OPCODE(I32, F32, F32, 0, 0x5e, F32Gt, "f32.gt")
+WABT_OPCODE(I32, F32, F32, 0, 0x5f, F32Le, "f32.le")
+WABT_OPCODE(I32, F32, F32, 0, 0x60, F32Ge, "f32.ge")
+WABT_OPCODE(I32, F64, F64, 0, 0x61, F64Eq, "f64.eq")
+WABT_OPCODE(I32, F64, F64, 0, 0x62, F64Ne, "f64.ne")
+WABT_OPCODE(I32, F64, F64, 0, 0x63, F64Lt, "f64.lt")
+WABT_OPCODE(I32, F64, F64, 0, 0x64, F64Gt, "f64.gt")
+WABT_OPCODE(I32, F64, F64, 0, 0x65, F64Le, "f64.le")
+WABT_OPCODE(I32, F64, F64, 0, 0x66, F64Ge, "f64.ge")
+WABT_OPCODE(I32, I32, ___, 0, 0x67, I32Clz, "i32.clz")
+WABT_OPCODE(I32, I32, ___, 0, 0x68, I32Ctz, "i32.ctz")
+WABT_OPCODE(I32, I32, ___, 0, 0x69, I32Popcnt, "i32.popcnt")
+WABT_OPCODE(I32, I32, I32, 0, 0x6a, I32Add, "i32.add")
+WABT_OPCODE(I32, I32, I32, 0, 0x6b, I32Sub, "i32.sub")
+WABT_OPCODE(I32, I32, I32, 0, 0x6c, I32Mul, "i32.mul")
+WABT_OPCODE(I32, I32, I32, 0, 0x6d, I32DivS, "i32.div_s")
+WABT_OPCODE(I32, I32, I32, 0, 0x6e, I32DivU, "i32.div_u")
+WABT_OPCODE(I32, I32, I32, 0, 0x6f, I32RemS, "i32.rem_s")
+WABT_OPCODE(I32, I32, I32, 0, 0x70, I32RemU, "i32.rem_u")
+WABT_OPCODE(I32, I32, I32, 0, 0x71, I32And, "i32.and")
+WABT_OPCODE(I32, I32, I32, 0, 0x72, I32Or, "i32.or")
+WABT_OPCODE(I32, I32, I32, 0, 0x73, I32Xor, "i32.xor")
+WABT_OPCODE(I32, I32, I32, 0, 0x74, I32Shl, "i32.shl")
+WABT_OPCODE(I32, I32, I32, 0, 0x75, I32ShrS, "i32.shr_s")
+WABT_OPCODE(I32, I32, I32, 0, 0x76, I32ShrU, "i32.shr_u")
+WABT_OPCODE(I32, I32, I32, 0, 0x77, I32Rotl, "i32.rotl")
+WABT_OPCODE(I32, I32, I32, 0, 0x78, I32Rotr, "i32.rotr")
+WABT_OPCODE(I64, I64, ___, 0, 0x79, I64Clz, "i64.clz")
+WABT_OPCODE(I64, I64, ___, 0, 0x7a, I64Ctz, "i64.ctz")
+WABT_OPCODE(I64, I64, ___, 0, 0x7b, I64Popcnt, "i64.popcnt")
+WABT_OPCODE(I64, I64, I64, 0, 0x7c, I64Add, "i64.add")
+WABT_OPCODE(I64, I64, I64, 0, 0x7d, I64Sub, "i64.sub")
+WABT_OPCODE(I64, I64, I64, 0, 0x7e, I64Mul, "i64.mul")
+WABT_OPCODE(I64, I64, I64, 0, 0x7f, I64DivS, "i64.div_s")
+WABT_OPCODE(I64, I64, I64, 0, 0x80, I64DivU, "i64.div_u")
+WABT_OPCODE(I64, I64, I64, 0, 0x81, I64RemS, "i64.rem_s")
+WABT_OPCODE(I64, I64, I64, 0, 0x82, I64RemU, "i64.rem_u")
+WABT_OPCODE(I64, I64, I64, 0, 0x83, I64And, "i64.and")
+WABT_OPCODE(I64, I64, I64, 0, 0x84, I64Or, "i64.or")
+WABT_OPCODE(I64, I64, I64, 0, 0x85, I64Xor, "i64.xor")
+WABT_OPCODE(I64, I64, I64, 0, 0x86, I64Shl, "i64.shl")
+WABT_OPCODE(I64, I64, I64, 0, 0x87, I64ShrS, "i64.shr_s")
+WABT_OPCODE(I64, I64, I64, 0, 0x88, I64ShrU, "i64.shr_u")
+WABT_OPCODE(I64, I64, I64, 0, 0x89, I64Rotl, "i64.rotl")
+WABT_OPCODE(I64, I64, I64, 0, 0x8a, I64Rotr, "i64.rotr")
+WABT_OPCODE(F32, F32, F32, 0, 0x8b, F32Abs, "f32.abs")
+WABT_OPCODE(F32, F32, F32, 0, 0x8c, F32Neg, "f32.neg")
+WABT_OPCODE(F32, F32, F32, 0, 0x8d, F32Ceil, "f32.ceil")
+WABT_OPCODE(F32, F32, F32, 0, 0x8e, F32Floor, "f32.floor")
+WABT_OPCODE(F32, F32, F32, 0, 0x8f, F32Trunc, "f32.trunc")
+WABT_OPCODE(F32, F32, F32, 0, 0x90, F32Nearest, "f32.nearest")
+WABT_OPCODE(F32, F32, F32, 0, 0x91, F32Sqrt, "f32.sqrt")
+WABT_OPCODE(F32, F32, F32, 0, 0x92, F32Add, "f32.add")
+WABT_OPCODE(F32, F32, F32, 0, 0x93, F32Sub, "f32.sub")
+WABT_OPCODE(F32, F32, F32, 0, 0x94, F32Mul, "f32.mul")
+WABT_OPCODE(F32, F32, F32, 0, 0x95, F32Div, "f32.div")
+WABT_OPCODE(F32, F32, F32, 0, 0x96, F32Min, "f32.min")
+WABT_OPCODE(F32, F32, F32, 0, 0x97, F32Max, "f32.max")
+WABT_OPCODE(F32, F32, F32, 0, 0x98, F32Copysign, "f32.copysign")
+WABT_OPCODE(F64, F64, F64, 0, 0x99, F64Abs, "f64.abs")
+WABT_OPCODE(F64, F64, F64, 0, 0x9a, F64Neg, "f64.neg")
+WABT_OPCODE(F64, F64, F64, 0, 0x9b, F64Ceil, "f64.ceil")
+WABT_OPCODE(F64, F64, F64, 0, 0x9c, F64Floor, "f64.floor")
+WABT_OPCODE(F64, F64, F64, 0, 0x9d, F64Trunc, "f64.trunc")
+WABT_OPCODE(F64, F64, F64, 0, 0x9e, F64Nearest, "f64.nearest")
+WABT_OPCODE(F64, F64, F64, 0, 0x9f, F64Sqrt, "f64.sqrt")
+WABT_OPCODE(F64, F64, F64, 0, 0xa0, F64Add, "f64.add")
+WABT_OPCODE(F64, F64, F64, 0, 0xa1, F64Sub, "f64.sub")
+WABT_OPCODE(F64, F64, F64, 0, 0xa2, F64Mul, "f64.mul")
+WABT_OPCODE(F64, F64, F64, 0, 0xa3, F64Div, "f64.div")
+WABT_OPCODE(F64, F64, F64, 0, 0xa4, F64Min, "f64.min")
+WABT_OPCODE(F64, F64, F64, 0, 0xa5, F64Max, "f64.max")
+WABT_OPCODE(F64, F64, F64, 0, 0xa6, F64Copysign, "f64.copysign")
+WABT_OPCODE(I32, I64, ___, 0, 0xa7, I32WrapI64, "i32.wrap/i64")
+WABT_OPCODE(I32, F32, ___, 0, 0xa8, I32TruncSF32, "i32.trunc_s/f32")
+WABT_OPCODE(I32, F32, ___, 0, 0xa9, I32TruncUF32, "i32.trunc_u/f32")
+WABT_OPCODE(I32, F64, ___, 0, 0xaa, I32TruncSF64, "i32.trunc_s/f64")
+WABT_OPCODE(I32, F64, ___, 0, 0xab, I32TruncUF64, "i32.trunc_u/f64")
+WABT_OPCODE(I64, I32, ___, 0, 0xac, I64ExtendSI32, "i64.extend_s/i32")
+WABT_OPCODE(I64, I32, ___, 0, 0xad, I64ExtendUI32, "i64.extend_u/i32")
+WABT_OPCODE(I64, F32, ___, 0, 0xae, I64TruncSF32, "i64.trunc_s/f32")
+WABT_OPCODE(I64, F32, ___, 0, 0xaf, I64TruncUF32, "i64.trunc_u/f32")
+WABT_OPCODE(I64, F64, ___, 0, 0xb0, I64TruncSF64, "i64.trunc_s/f64")
+WABT_OPCODE(I64, F64, ___, 0, 0xb1, I64TruncUF64, "i64.trunc_u/f64")
+WABT_OPCODE(F32, I32, ___, 0, 0xb2, F32ConvertSI32, "f32.convert_s/i32")
+WABT_OPCODE(F32, I32, ___, 0, 0xb3, F32ConvertUI32, "f32.convert_u/i32")
+WABT_OPCODE(F32, I64, ___, 0, 0xb4, F32ConvertSI64, "f32.convert_s/i64")
+WABT_OPCODE(F32, I64, ___, 0, 0xb5, F32ConvertUI64, "f32.convert_u/i64")
+WABT_OPCODE(F32, F64, ___, 0, 0xb6, F32DemoteF64, "f32.demote/f64")
+WABT_OPCODE(F64, I32, ___, 0, 0xb7, F64ConvertSI32, "f64.convert_s/i32")
+WABT_OPCODE(F64, I32, ___, 0, 0xb8, F64ConvertUI32, "f64.convert_u/i32")
+WABT_OPCODE(F64, I64, ___, 0, 0xb9, F64ConvertSI64, "f64.convert_s/i64")
+WABT_OPCODE(F64, I64, ___, 0, 0xba, F64ConvertUI64, "f64.convert_u/i64")
+WABT_OPCODE(F64, F32, ___, 0, 0xbb, F64PromoteF32, "f64.promote/f32")
+WABT_OPCODE(I32, F32, ___, 0, 0xbc, I32ReinterpretF32, "i32.reinterpret/f32")
+WABT_OPCODE(I64, F64, ___, 0, 0xbd, I64ReinterpretF64, "i64.reinterpret/f64")
+WABT_OPCODE(F32, I32, ___, 0, 0xbe, F32ReinterpretI32, "f32.reinterpret/i32")
+WABT_OPCODE(F64, I64, ___, 0, 0xbf, F64ReinterpretI64, "f64.reinterpret/i64")
diff --git a/lib/wabt/src/opcode.h b/lib/wabt/src/opcode.h
new file mode 100644
index 0000000..2b0be32
--- /dev/null
+++ b/lib/wabt/src/opcode.h
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2017 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef WABT_OPCODE_H_
+#define WABT_OPCODE_H_
+
+#include "common.h"
+
+namespace wabt {
+
+enum class Opcode {
+
+#define WABT_OPCODE(rtype, type1, type2, mem_size, code, Name, text) \
+  Name = code,
+#include "opcode.def"
+#undef WABT_OPCODE
+
+  First = Unreachable,
+  Last = F64ReinterpretI64,
+};
+static const int kOpcodeCount = WABT_ENUM_COUNT(Opcode);
+
+struct OpcodeInfo {
+  const char* name;
+  Type result_type;
+  Type param1_type;
+  Type param2_type;
+  Address memory_size;
+};
+
+// Return 1 if |alignment| matches the alignment of |opcode|, or if |alignment|
+// is WABT_USE_NATURAL_ALIGNMENT.
+bool is_naturally_aligned(Opcode opcode, Address alignment);
+
+// If |alignment| is WABT_USE_NATURAL_ALIGNMENT, return the alignment of
+// |opcode|, else return |alignment|.
+Address get_opcode_alignment(Opcode opcode, Address alignment);
+
+extern OpcodeInfo g_opcode_info[];
+
+inline const char* get_opcode_name(Opcode opcode) {
+  assert(static_cast<int>(opcode) < kOpcodeCount);
+  return g_opcode_info[static_cast<size_t>(opcode)].name;
+}
+
+inline Type get_opcode_result_type(Opcode opcode) {
+  assert(static_cast<int>(opcode) < kOpcodeCount);
+  return g_opcode_info[static_cast<size_t>(opcode)].result_type;
+}
+
+inline Type get_opcode_param_type_1(Opcode opcode) {
+  assert(static_cast<int>(opcode) < kOpcodeCount);
+  return g_opcode_info[static_cast<size_t>(opcode)].param1_type;
+}
+
+inline Type get_opcode_param_type_2(Opcode opcode) {
+  assert(static_cast<int>(opcode) < kOpcodeCount);
+  return g_opcode_info[static_cast<size_t>(opcode)].param2_type;
+}
+
+inline int get_opcode_memory_size(Opcode opcode) {
+  assert(static_cast<int>(opcode) < kOpcodeCount);
+  return g_opcode_info[static_cast<size_t>(opcode)].memory_size;
+}
+
+}  // namespace
+
+#endif  // WABT_OPCODE_H_
diff --git a/lib/wabt/src/option-parser.cc b/lib/wabt/src/option-parser.cc
index 1ab0132..e3eefeb 100644
--- a/lib/wabt/src/option-parser.cc
+++ b/lib/wabt/src/option-parser.cc
@@ -16,9 +16,9 @@
 
 #include "option-parser.h"
 
-#include <stdarg.h>
-#include <stdio.h>
-#include <string.h>
+#include <cstdarg>
+#include <cstdio>
+#include <cstring>
 
 #include "config.h"
 
@@ -28,20 +28,89 @@
 
 namespace wabt {
 
-static int option_match(const char* s,
-                        const char* full,
-                        HasArgument has_argument) {
+OptionParser::Option::Option(char short_name,
+                             const std::string& long_name,
+                             const std::string& metavar,
+                             HasArgument has_argument,
+                             const std::string& help,
+                             const Callback& callback)
+    : short_name(short_name),
+      long_name(long_name),
+      metavar(metavar),
+      has_argument(has_argument == HasArgument::Yes),
+      help(help),
+      callback(callback) {}
+
+OptionParser::Argument::Argument(const std::string& name,
+                                 ArgumentCount count,
+                                 const Callback& callback)
+    : name(name), count(count), callback(callback) {}
+
+OptionParser::OptionParser(const char* program_name, const char* description)
+    : program_name_(program_name),
+      description_(description),
+      on_error_([this](const std::string& message) { DefaultError(message); }) {
+}
+
+void OptionParser::AddOption(const Option& option) {
+  options_.emplace_back(option);
+}
+
+void OptionParser::AddArgument(const std::string& name,
+                               ArgumentCount count,
+                               const Callback& callback) {
+  arguments_.emplace_back(name, count, callback);
+}
+
+void OptionParser::AddOption(char short_name,
+                             const char* long_name,
+                             const char* help,
+                             const NullCallback& callback) {
+  Option option(short_name, long_name, std::string(), HasArgument::No, help,
+                [callback](const char*) { callback(); });
+  AddOption(option);
+}
+
+void OptionParser::AddOption(const char* long_name,
+                             const char* help,
+                             const NullCallback& callback){
+  Option option('\0', long_name, std::string(), HasArgument::No, help,
+                [callback](const char*) { callback(); });
+  AddOption(option);
+}
+
+void OptionParser::AddOption(char short_name,
+                             const char* long_name,
+                             const char* metavar,
+                             const char* help,
+                             const Callback& callback) {
+  Option option(short_name, long_name, metavar, HasArgument::Yes, help,
+                callback);
+  AddOption(option);
+}
+
+void OptionParser::AddHelpOption() {
+  AddOption('h', "help", "Print this help message", [this]() {
+    PrintHelp();
+    exit(0);
+  });
+}
+
+// static
+int OptionParser::Match(const char* s,
+                        const std::string& full,
+                        bool has_argument) {
   int i;
   for (i = 0;; i++) {
     if (full[i] == '\0') {
-      /* perfect match. return +1, so it will be preferred over a longer option
-       * with the same prefix */
+      // Perfect match. Return +1, so it will be preferred over a longer option
+      // with the same prefix.
       if (s[i] == '\0')
         return i + 1;
 
-      /* we want to fail if s is longer than full, e.g. --foobar vs. --foo.
-       * However, if s ends with an '=', it's OK. */
-      if (!(has_argument == HasArgument::Yes && s[i] == '='))
+      // We want to fail if s is longer than full, e.g. --foobar vs. --foo.
+      // However, if s ends with an '=', it's OK.
+      if (!(has_argument && s[i] == '='))
         return -1;
       break;
     }
@@ -53,28 +122,45 @@
   return i;
 }
 
-static void WABT_PRINTF_FORMAT(2, 3)
-    error(OptionParser* parser, const char* format, ...) {
+void OptionParser::Errorf(const char* format, ...) {
   WABT_SNPRINTF_ALLOCA(buffer, length, format);
-  parser->on_error(parser, buffer);
+  on_error_(buffer);
 }
 
-void parse_options(OptionParser* parser, int argc, char** argv) {
-  parser->argv0 = argv[0];
+void OptionParser::DefaultError(const std::string& message) {
+  WABT_FATAL("%s\n", message.c_str());
+}
+
+void OptionParser::HandleArgument(size_t* arg_index, const char* arg_value) {
+  if (*arg_index >= arguments_.size()) {
+    Errorf("unexpected argument '%s'", arg_value);
+    return;
+  }
+  Argument& argument = arguments_[*arg_index];
+  argument.callback(arg_value);
+  argument.handled_count++;
+
+  if (argument.count == ArgumentCount::One) {
+    (*arg_index)++;
+  }
+}
+
+void OptionParser::Parse(int argc, char* argv[]) {
+  size_t arg_index = 0;
 
   for (int i = 1; i < argc; ++i) {
-    char* arg = argv[i];
+    const char* arg = argv[i];
     if (arg[0] == '-') {
       if (arg[1] == '-') {
-        /* long option */
+        // Long option.
         int best_index = -1;
         int best_length = 0;
         int best_count = 0;
-        for (int j = 0; j < parser->num_options; ++j) {
-          Option* option = &parser->options[j];
-          if (option->long_name) {
+        for (size_t j = 0; j < options_.size(); ++j) {
+          const Option& option = options_[j];
+          if (!option.long_name.empty()) {
             int match_length =
-                option_match(&arg[2], option->long_name, option->has_argument);
+                Match(&arg[2], option.long_name, option.has_argument);
             if (match_length > best_length) {
               best_index = j;
               best_length = match_length;
@@ -86,97 +172,115 @@
         }
 
         if (best_count > 1) {
-          error(parser, "ambiguous option \"%s\"", arg);
+          Errorf("ambiguous option '%s'", arg);
           continue;
         } else if (best_count == 0) {
-          error(parser, "unknown option \"%s\"", arg);
+          Errorf("unknown option '%s'", arg);
           continue;
         }
 
-        Option* best_option = &parser->options[best_index];
+        const Option& best_option = options_[best_index];
         const char* option_argument = nullptr;
-        if (best_option->has_argument == HasArgument::Yes) {
+        if (best_option.has_argument) {
           if (arg[best_length] == '=') {
             option_argument = &arg[best_length + 1];
           } else {
             if (i + 1 == argc || argv[i + 1][0] == '-') {
-              error(parser, "option \"--%s\" requires argument",
-                    best_option->long_name);
+              Errorf("option '--%s' requires argument",
+                     best_option.long_name.c_str());
               continue;
             }
             ++i;
             option_argument = argv[i];
           }
         }
-        parser->on_option(parser, best_option, option_argument);
+        best_option.callback(option_argument);
       } else {
-        /* short option */
+        // Short option.
         if (arg[1] == '\0') {
-          /* just "-" */
-          parser->on_argument(parser, arg);
+          // Just "-".
+          HandleArgument(&arg_index, arg);
           continue;
         }
 
-        /* allow short names to be combined, e.g. "-d -v" => "-dv" */
+        // Allow short names to be combined, e.g. "-d -v" => "-dv".
         for (int k = 1; arg[k]; ++k) {
           bool matched = false;
-          for (int j = 0; j < parser->num_options; ++j) {
-            Option* option = &parser->options[j];
-            if (option->short_name && arg[k] == option->short_name) {
+          for (const Option& option: options_) {
+            if (option.short_name && arg[k] == option.short_name) {
               const char* option_argument = nullptr;
-              if (option->has_argument == HasArgument::Yes) {
-                /* a short option with a required argument cannot be followed
-                 * by other short options */
+              if (option.has_argument) {
+                // A short option with a required argument cannot be followed
+                // by other short options_.
                 if (arg[k + 1] != '\0') {
-                  error(parser, "option \"-%c\" requires argument",
-                        option->short_name);
+                  Errorf("option '-%c' requires argument", option.short_name);
                   break;
                 }
 
                 if (i + 1 == argc || argv[i + 1][0] == '-') {
-                  error(parser, "option \"-%c\" requires argument",
-                        option->short_name);
+                  Errorf("option '-%c' requires argument", option.short_name);
                   break;
                 }
                 ++i;
                 option_argument = argv[i];
               }
-              parser->on_option(parser, option, option_argument);
+              option.callback(option_argument);
               matched = true;
               break;
             }
           }
 
           if (!matched) {
-            error(parser, "unknown option \"-%c\"", arg[k]);
+            Errorf("unknown option '-%c'", arg[k]);
             continue;
           }
         }
       }
     } else {
-      /* non-option argument */
-      parser->on_argument(parser, arg);
+      // Non-option argument.
+      HandleArgument(&arg_index, arg);
+    }
+  }
+
+  // For now, all arguments must be provided. Check that the last Argument was
+  // handled at least once.
+  if (!arguments_.empty() && arguments_.back().handled_count == 0) {
+    PrintHelp();
+    for (size_t i = arg_index; i < arguments_.size(); ++i) {
+      Errorf("expected %s argument.\n", arguments_[i].name.c_str());
     }
   }
 }
 
-void print_help(OptionParser* parser, const char* program_name) {
-  /* TODO(binji): do something more generic for filename here */
-  printf("usage: %s [options] filename\n\n", program_name);
-  printf("%s\n", parser->description);
+void OptionParser::PrintHelp() {
+  printf("usage: %s [options]", program_name_.c_str());
+
+  for (size_t i = 0; i < arguments_.size(); ++i) {
+    Argument& argument = arguments_[i];
+    switch (argument.count) {
+      case ArgumentCount::One:
+        printf(" %s", argument.name.c_str());
+        break;
+
+      case ArgumentCount::OneOrMore:
+        printf(" %s+", argument.name.c_str());
+        break;
+    }
+  }
+
+  printf("\n\n");
+  printf("%s\n", description_.c_str());
   printf("options:\n");
 
-  const int extra_space = 8;
-  int longest_name_length = 0;
-  for (int i = 0; i < parser->num_options; ++i) {
-    Option* option = &parser->options[i];
-    int length;
-    if (option->long_name) {
-      if (option->metavar) {
-        length =
-            snprintf(nullptr, 0, "%s=%s", option->long_name, option->metavar);
-      } else {
-        length = snprintf(nullptr, 0, "%s", option->long_name);
+  const size_t kExtraSpace = 8;
+  size_t longest_name_length = 0;
+  for (const Option& option: options_) {
+    size_t length;
+    if (!option.long_name.empty()) {
+      length = option.long_name.size();
+      if (!option.metavar.empty()) {
+        // +1 for '='.
+        length += option.metavar.size() + 1;
       }
     } else {
       continue;
@@ -186,41 +290,33 @@
       longest_name_length = length;
   }
 
-  size_t buffer_size = longest_name_length + 1;
-  char* buffer = static_cast<char*>(alloca(buffer_size));
-
-  for (int i = 0; i < parser->num_options; ++i) {
-    Option* option = &parser->options[i];
-    if (!option->short_name && !option->long_name)
+  for (const Option& option: options_) {
+    if (!option.short_name && option.long_name.empty())
       continue;
 
-    if (option->short_name)
-      printf("  -%c, ", option->short_name);
+    std::string line;
+    if (option.short_name)
+      line += std::string("  -") + option.short_name + ", ";
     else
-      printf("      ");
+      line += "      ";
 
-    char format[20];
-    if (option->long_name) {
-      snprintf(format, sizeof(format), "--%%-%ds",
-               longest_name_length + extra_space);
-
-      if (option->metavar) {
-        snprintf(buffer, buffer_size, "%s=%s", option->long_name,
-                 option->metavar);
-        printf(format, buffer);
+    std::string flag;
+    if (!option.long_name.empty()) {
+      flag = "--";
+      if (!option.metavar.empty()) {
+        flag += option.long_name + '=' + option.metavar;
       } else {
-        printf(format, option->long_name);
+        flag += option.long_name;
       }
-    } else {
-      /* +2 for the extra "--" above */
-      snprintf(format, sizeof(format), "%%-%ds",
-               longest_name_length + extra_space + 2);
-      printf(format, "");
     }
 
-    if (option->help)
-      printf("%s", option->help);
-    printf("\n");
+    // +2 for "--" of the long flag name.
+    size_t remaining = longest_name_length + kExtraSpace + 2 - flag.size();
+    line += flag + std::string(remaining, ' ');
+
+    if (!option.help.empty())
+      line += option.help;
+    printf("%s\n", line.c_str());
   }
 }
 
diff --git a/lib/wabt/src/option-parser.h b/lib/wabt/src/option-parser.h
index 9406748..883e5f3 100644
--- a/lib/wabt/src/option-parser.h
+++ b/lib/wabt/src/option-parser.h
@@ -17,48 +17,84 @@
 #ifndef WABT_OPTION_PARSER_H_
 #define WABT_OPTION_PARSER_H_
 
+#include <functional>
+#include <string>
+#include <vector>
+
 #include "common.h"
 
 namespace wabt {
 
-enum class HasArgument {
-  No = 0,
-  Yes = 1,
+class OptionParser {
+ public:
+  enum class HasArgument { No, Yes };
+  enum class ArgumentCount { One, OneOrMore };
+
+  struct Option;
+  typedef std::function<void(const char*)> Callback;
+  typedef std::function<void()> NullCallback;
+
+  struct Option {
+    Option(char short_name,
+           const std::string& long_name,
+           const std::string& metavar,
+           HasArgument has_argument,
+           const std::string& help,
+           const Callback&);
+
+    char short_name;
+    std::string long_name;
+    std::string metavar;
+    bool has_argument;
+    std::string help;
+    Callback callback;
+  };
+
+  struct Argument {
+    Argument(const std::string& name, ArgumentCount, const Callback&);
+
+    std::string name;
+    ArgumentCount count;
+    Callback callback;
+    int handled_count = 0;
+  };
+
+  explicit OptionParser(const char* program_name, const char* description);
+
+  void AddOption(const Option&);
+  void AddArgument(const std::string& name, ArgumentCount, const Callback&);
+  void SetErrorCallback(const Callback&);
+  void Parse(int argc, char* argv[]);
+  void PrintHelp();
+
+  // Helper functions.
+  void AddOption(char short_name,
+                 const char* long_name,
+                 const char* help,
+                 const NullCallback&);
+  void AddOption(const char* long_name, const char* help, const NullCallback&);
+  void AddOption(char short_name,
+                 const char* long_name,
+                 const char* metavar,
+                 const char* help,
+                 const Callback&);
+  void AddHelpOption();
+
+ private:
+  static int Match(const char* s, const std::string& full, bool has_argument);
+  void WABT_PRINTF_FORMAT(2, 3) Errorf(const char* format, ...);
+  void HandleArgument(size_t* arg_index, const char* arg_value);
+
+  // Print the error and exit(1).
+  void DefaultError(const std::string&);
+
+  std::string program_name_;
+  std::string description_;
+  std::vector<Option> options_;
+  std::vector<Argument> arguments_;
+  Callback on_error_;
 };
 
-struct Option;
-struct OptionParser;
-typedef void (*OptionCallback)(struct OptionParser*,
-                               struct Option*,
-                               const char* argument);
-typedef void (*ArgumentCallback)(struct OptionParser*, const char* argument);
-typedef void (*OptionErrorCallback)(struct OptionParser*, const char* message);
-
-struct Option {
-  int id;
-  char short_name;
-  const char* long_name;
-  const char* metavar;
-  HasArgument has_argument;
-  const char* help;
-};
-
-struct OptionParser {
-  const char* description;
-  Option* options;
-  int num_options;
-  OptionCallback on_option;
-  ArgumentCallback on_argument;
-  OptionErrorCallback on_error;
-  void* user_data;
-
-  /* cached after call to parse_options */
-  char* argv0;
-};
-
-void parse_options(OptionParser* parser, int argc, char** argv);
-void print_help(OptionParser* parser, const char* program_name);
-
 }  // namespace wabt
 
 #endif /* WABT_OPTION_PARSER_H_ */
diff --git a/lib/wabt/src/prebuilt/ast-lexer-gen.cc b/lib/wabt/src/prebuilt/ast-lexer-gen.cc
deleted file mode 100644
index ede11ab..0000000
--- a/lib/wabt/src/prebuilt/ast-lexer-gen.cc
+++ /dev/null
@@ -1,7074 +0,0 @@
-/* Generated by re2c 0.16 */
-#line 1 "src/ast-lexer.cc"
-/*
- * Copyright 2016 WebAssembly Community Group participants
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "ast-lexer.h"
-
-#include <assert.h>
-#include <stdio.h>
-
-#include "config.h"
-
-#include "ast-parser.h"
-#include "ast-parser-lexer-shared.h"
-
-/* must be included after so some typedefs will be defined */
-#include "ast-parser-gen.hh"
-
-#define YYMAXFILL 29
-
-#define INITIAL_LEXER_BUFFER_SIZE (64 * 1024)
-
-#define YY_USER_ACTION                        \
-  {                                           \
-    loc->filename = lexer->filename;          \
-    loc->line = lexer->line;                  \
-    loc->first_column = COLUMN(lexer->token); \
-    loc->last_column = COLUMN(lexer->cursor); \
-  }
-
-#define RETURN(name) \
-  YY_USER_ACTION;    \
-  return WABT_TOKEN_TYPE_##name
-
-#define ERROR(...) \
-  YY_USER_ACTION;  \
-  ast_parser_error(loc, lexer, parser, __VA_ARGS__)
-
-#define BEGIN(c) \
-  do {           \
-    cond = c;    \
-  } while (0)
-#define FILL(n)                                     \
-  do {                                              \
-    if (WABT_FAILED(fill(loc, lexer, parser, n))) { \
-      RETURN(EOF);                                  \
-      continue;                                     \
-    }                                               \
-  } while (0)
-
-#define yytext (lexer->token)
-#define yyleng (lexer->cursor - lexer->token)
-
-/* p must be a pointer somewhere in the lexer buffer */
-#define FILE_OFFSET(p) ((p) - (lexer->buffer) + lexer->buffer_file_offset)
-#define COLUMN(p) (FILE_OFFSET(p) - lexer->line_file_offset + 1)
-
-#define COMMENT_NESTING (lexer->comment_nesting)
-#define NEWLINE                                           \
-  do {                                                    \
-    lexer->line++;                                        \
-    lexer->line_file_offset = FILE_OFFSET(lexer->cursor); \
-  } while (0)
-
-#define TEXT                 \
-  lval->text.start = yytext; \
-  lval->text.length = yyleng
-
-#define TEXT_AT(offset)               \
-  lval->text.start = yytext + offset; \
-  lval->text.length = yyleng - offset
-
-#define TYPE(type_) lval->type = Type::type_
-
-#define OPCODE(name) lval->opcode = Opcode::name
-
-#define LITERAL(type_)                     \
-  lval->literal.type = LiteralType::type_; \
-  lval->literal.text.start = yytext;       \
-  lval->literal.text.length = yyleng
-
-namespace wabt {
-
-static Result fill(Location* loc,
-                   AstLexer* lexer,
-                   AstParser* parser,
-                   size_t need) {
-  if (lexer->eof)
-    return Result::Error;
-  size_t free = lexer->token - lexer->buffer;
-  assert(static_cast<size_t>(lexer->cursor - lexer->buffer) >= free);
-  /* our buffer is too small, need to realloc */
-  if (free < need) {
-    char* old_buffer = lexer->buffer;
-    size_t old_buffer_size = lexer->buffer_size;
-    size_t new_buffer_size =
-        old_buffer_size ? old_buffer_size * 2 : INITIAL_LEXER_BUFFER_SIZE;
-    /* make sure there is enough space for the bytes requested (need) and an
-     * additional YYMAXFILL bytes which is needed for the re2c lexer
-     * implementation when the eof is reached */
-    while ((new_buffer_size - old_buffer_size) + free < need + YYMAXFILL)
-      new_buffer_size *= 2;
-
-    char* new_buffer = new char[new_buffer_size];
-    if (!new_buffer) {
-      ast_parser_error(loc, lexer, parser,
-                            "unable to reallocate lexer buffer.");
-      return Result::Error;
-    }
-    memmove(new_buffer, lexer->token, lexer->limit - lexer->token);
-    lexer->buffer = new_buffer;
-    lexer->buffer_size = new_buffer_size;
-    lexer->token = new_buffer + (lexer->token - old_buffer) - free;
-    lexer->marker = new_buffer + (lexer->marker - old_buffer) - free;
-    lexer->cursor = new_buffer + (lexer->cursor - old_buffer) - free;
-    lexer->limit = new_buffer + (lexer->limit - old_buffer) - free;
-    lexer->buffer_file_offset += free;
-    free += new_buffer_size - old_buffer_size;
-    delete [] old_buffer;
-  } else {
-    /* shift everything down to make more room in the buffer */
-    memmove(lexer->buffer, lexer->token, lexer->limit - lexer->token);
-    lexer->token -= free;
-    lexer->marker -= free;
-    lexer->cursor -= free;
-    lexer->limit -= free;
-    lexer->buffer_file_offset += free;
-  }
-  /* read the new data into the buffer */
-  if (lexer->source.type == AstLexerSourceType::File) {
-    lexer->limit += fread(lexer->limit, 1, free, lexer->source.file);
-  } else {
-    /* TODO(binji): could lex directly from buffer */
-    assert(lexer->source.type == AstLexerSourceType::Buffer);
-    size_t read_size = free;
-    size_t offset = lexer->source.buffer.read_offset;
-    size_t bytes_left = lexer->source.buffer.size - offset;
-    if (read_size > bytes_left)
-      read_size = bytes_left;
-    memcpy(lexer->limit,
-           static_cast<const char*>(lexer->source.buffer.data) + offset,
-           read_size);
-    lexer->source.buffer.read_offset += read_size;
-    lexer->limit += read_size;
-  }
-  /* if at the end of file, need to fill YYMAXFILL more characters with "fake
-   * characters", that are not a lexeme nor a lexeme suffix. see
-   * http://re2c.org/examples/example_03.html */
-  if (lexer->limit < lexer->buffer + lexer->buffer_size - YYMAXFILL) {
-    lexer->eof = true;
-    memset(lexer->limit, 0, YYMAXFILL);
-    lexer->limit += YYMAXFILL;
-  }
-  return Result::Ok;
-}
-
-int ast_lexer_lex(WABT_AST_PARSER_STYPE* lval,
-                  WABT_AST_PARSER_LTYPE* loc,
-                  AstLexer* lexer,
-                  AstParser* parser) {
-  enum {
-    YYCOND_INIT,
-    YYCOND_BAD_TEXT,
-    YYCOND_LINE_COMMENT,
-    YYCOND_BLOCK_COMMENT,
-    YYCOND_i = YYCOND_INIT,
-  } cond = YYCOND_INIT;
-
-  for (;;) {
-    lexer->token = lexer->cursor;
-    
-#line 186 "src/prebuilt/ast-lexer-gen.cc"
-{
-	unsigned char yych;
-	if (cond < 2) {
-		if (cond < 1) {
-			goto YYCOND_i;
-		} else {
-			goto YYCOND_BAD_TEXT;
-		}
-	} else {
-		if (cond < 3) {
-			goto YYCOND_LINE_COMMENT;
-		} else {
-			goto YYCOND_BLOCK_COMMENT;
-		}
-	}
-/* *********************************** */
-YYCOND_BAD_TEXT:
-	if ((lexer->limit - lexer->cursor) < 3) FILL(3);
-	yych = *lexer->cursor;
-	if (yych <= '!') {
-		if (yych <= '\t') {
-			if (yych >= 0x01) goto yy5;
-		} else {
-			if (yych <= '\n') goto yy7;
-			if (yych <= 0x1F) goto yy5;
-			goto yy9;
-		}
-	} else {
-		if (yych <= '\\') {
-			if (yych <= '"') goto yy11;
-			if (yych <= '[') goto yy9;
-			goto yy13;
-		} else {
-			if (yych == 0x7F) goto yy5;
-			goto yy9;
-		}
-	}
-	++lexer->cursor;
-#line 237 "src/ast-lexer.cc"
-	{ ERROR("unexpected EOF"); RETURN(EOF); }
-#line 227 "src/prebuilt/ast-lexer-gen.cc"
-yy5:
-	++lexer->cursor;
-yy6:
-#line 238 "src/ast-lexer.cc"
-	{ ERROR("illegal character in string");
-                                  continue; }
-#line 234 "src/prebuilt/ast-lexer-gen.cc"
-yy7:
-	++lexer->cursor;
-	BEGIN(YYCOND_i);
-#line 230 "src/ast-lexer.cc"
-	{ ERROR("newline in string");
-                                  NEWLINE;
-                                  continue; }
-#line 242 "src/prebuilt/ast-lexer-gen.cc"
-yy9:
-	++lexer->cursor;
-#line 229 "src/ast-lexer.cc"
-	{ continue; }
-#line 247 "src/prebuilt/ast-lexer-gen.cc"
-yy11:
-	++lexer->cursor;
-	BEGIN(YYCOND_i);
-#line 236 "src/ast-lexer.cc"
-	{ TEXT; RETURN(TEXT); }
-#line 253 "src/prebuilt/ast-lexer-gen.cc"
-yy13:
-	yych = *++lexer->cursor;
-	if (yych <= '@') {
-		if (yych <= '"') {
-			if (yych == '\n') goto yy6;
-			if (yych >= '"') goto yy9;
-		} else {
-			if (yych <= '\'') {
-				if (yych >= '\'') goto yy9;
-			} else {
-				if (yych <= '/') goto yy14;
-				if (yych <= '9') goto yy16;
-			}
-		}
-	} else {
-		if (yych <= 'f') {
-			if (yych <= '[') {
-				if (yych <= 'F') goto yy16;
-			} else {
-				if (yych <= '\\') goto yy9;
-				if (yych >= 'a') goto yy16;
-			}
-		} else {
-			if (yych <= 'n') {
-				if (yych >= 'n') goto yy9;
-			} else {
-				if (yych == 't') goto yy9;
-			}
-		}
-	}
-yy14:
-	++lexer->cursor;
-yy15:
-#line 233 "src/ast-lexer.cc"
-	{ ERROR("bad escape \"%.*s\"",
-                                        static_cast<int>(yyleng), yytext);
-                                  continue; }
-#line 291 "src/prebuilt/ast-lexer-gen.cc"
-yy16:
-	++lexer->cursor;
-	if ((yych = *lexer->cursor) <= '@') {
-		if (yych <= '/') goto yy15;
-		if (yych <= '9') goto yy9;
-		goto yy15;
-	} else {
-		if (yych <= 'F') goto yy9;
-		if (yych <= '`') goto yy15;
-		if (yych <= 'f') goto yy9;
-		goto yy15;
-	}
-/* *********************************** */
-YYCOND_BLOCK_COMMENT:
-	if ((lexer->limit - lexer->cursor) < 2) FILL(2);
-	yych = *lexer->cursor;
-	if (yych <= '\'') {
-		if (yych <= 0x00) goto yy19;
-		if (yych == '\n') goto yy23;
-		goto yy21;
-	} else {
-		if (yych <= '(') goto yy25;
-		if (yych == ';') goto yy26;
-		goto yy21;
-	}
-yy19:
-	++lexer->cursor;
-#line 464 "src/ast-lexer.cc"
-	{ ERROR("unexpected EOF"); RETURN(EOF); }
-#line 321 "src/prebuilt/ast-lexer-gen.cc"
-yy21:
-	++lexer->cursor;
-yy22:
-#line 465 "src/ast-lexer.cc"
-	{ continue; }
-#line 327 "src/prebuilt/ast-lexer-gen.cc"
-yy23:
-	++lexer->cursor;
-#line 463 "src/ast-lexer.cc"
-	{ NEWLINE; continue; }
-#line 332 "src/prebuilt/ast-lexer-gen.cc"
-yy25:
-	yych = *++lexer->cursor;
-	if (yych == ';') goto yy27;
-	goto yy22;
-yy26:
-	yych = *++lexer->cursor;
-	if (yych == ')') goto yy29;
-	goto yy22;
-yy27:
-	++lexer->cursor;
-#line 459 "src/ast-lexer.cc"
-	{ COMMENT_NESTING++; continue; }
-#line 345 "src/prebuilt/ast-lexer-gen.cc"
-yy29:
-	++lexer->cursor;
-#line 460 "src/ast-lexer.cc"
-	{ if (--COMMENT_NESTING == 0)
-                                    BEGIN(YYCOND_INIT);
-                                  continue; }
-#line 352 "src/prebuilt/ast-lexer-gen.cc"
-/* *********************************** */
-YYCOND_LINE_COMMENT:
-	{
-		static const unsigned char yybm[] = {
-			128, 128, 128, 128, 128, 128, 128, 128, 
-			128, 128,   0, 128, 128, 128, 128, 128, 
-			128, 128, 128, 128, 128, 128, 128, 128, 
-			128, 128, 128, 128, 128, 128, 128, 128, 
-			128, 128, 128, 128, 128, 128, 128, 128, 
-			128, 128, 128, 128, 128, 128, 128, 128, 
-			128, 128, 128, 128, 128, 128, 128, 128, 
-			128, 128, 128, 128, 128, 128, 128, 128, 
-			128, 128, 128, 128, 128, 128, 128, 128, 
-			128, 128, 128, 128, 128, 128, 128, 128, 
-			128, 128, 128, 128, 128, 128, 128, 128, 
-			128, 128, 128, 128, 128, 128, 128, 128, 
-			128, 128, 128, 128, 128, 128, 128, 128, 
-			128, 128, 128, 128, 128, 128, 128, 128, 
-			128, 128, 128, 128, 128, 128, 128, 128, 
-			128, 128, 128, 128, 128, 128, 128, 128, 
-			128, 128, 128, 128, 128, 128, 128, 128, 
-			128, 128, 128, 128, 128, 128, 128, 128, 
-			128, 128, 128, 128, 128, 128, 128, 128, 
-			128, 128, 128, 128, 128, 128, 128, 128, 
-			128, 128, 128, 128, 128, 128, 128, 128, 
-			128, 128, 128, 128, 128, 128, 128, 128, 
-			128, 128, 128, 128, 128, 128, 128, 128, 
-			128, 128, 128, 128, 128, 128, 128, 128, 
-			128, 128, 128, 128, 128, 128, 128, 128, 
-			128, 128, 128, 128, 128, 128, 128, 128, 
-			128, 128, 128, 128, 128, 128, 128, 128, 
-			128, 128, 128, 128, 128, 128, 128, 128, 
-			128, 128, 128, 128, 128, 128, 128, 128, 
-			128, 128, 128, 128, 128, 128, 128, 128, 
-			128, 128, 128, 128, 128, 128, 128, 128, 
-			128, 128, 128, 128, 128, 128, 128, 128, 
-		};
-		if (lexer->limit <= lexer->cursor) FILL(1);
-		yych = *lexer->cursor;
-		if (yybm[0+yych] & 128) {
-			goto yy34;
-		}
-		goto yy36;
-yy33:
-#line 457 "src/ast-lexer.cc"
-		{ continue; }
-#line 399 "src/prebuilt/ast-lexer-gen.cc"
-yy34:
-		++lexer->cursor;
-		if (lexer->limit <= lexer->cursor) FILL(1);
-		yych = *lexer->cursor;
-		if (yybm[0+yych] & 128) {
-			goto yy34;
-		}
-		goto yy33;
-yy36:
-		++lexer->cursor;
-		BEGIN(YYCOND_i);
-#line 456 "src/ast-lexer.cc"
-		{ NEWLINE; continue; }
-#line 413 "src/prebuilt/ast-lexer-gen.cc"
-	}
-/* *********************************** */
-YYCOND_i:
-	{
-		static const unsigned char yybm[] = {
-			  0,   0,   0,   0,   0,   0,   0,   0, 
-			  0,   8,   0,   0,   0,   8,   0,   0, 
-			  0,   0,   0,   0,   0,   0,   0,   0, 
-			  0,   0,   0,   0,   0,   0,   0,   0, 
-			 72,  80,   0,  80,  80,  80,  80,  80, 
-			 64,  64,  80,  80,  64,  80,  80,  80, 
-			240, 240, 240, 240, 240, 240, 240, 240, 
-			240, 240,  80,  64,  80,  80,  80,  80, 
-			 80, 208, 208, 208, 208, 208, 208,  80, 
-			 80,  80,  80,  80,  80,  80,  80,  80, 
-			 80,  80,  80,  80,  80,  80,  80,  80, 
-			 80,  80,  80,  64,  16,  64,  80,  80, 
-			 80, 208, 208, 208, 208, 208, 208,  80, 
-			 80,  80,  80,  80,  80,  80,  80,  80, 
-			 80,  80,  80,  80,  80,  80,  80,  80, 
-			 80,  80,  80,  64,  80,  64,  80,   0, 
-			 64,  64,  64,  64,  64,  64,  64,  64, 
-			 64,  64,  64,  64,  64,  64,  64,  64, 
-			 64,  64,  64,  64,  64,  64,  64,  64, 
-			 64,  64,  64,  64,  64,  64,  64,  64, 
-			 64,  64,  64,  64,  64,  64,  64,  64, 
-			 64,  64,  64,  64,  64,  64,  64,  64, 
-			 64,  64,  64,  64,  64,  64,  64,  64, 
-			 64,  64,  64,  64,  64,  64,  64,  64, 
-			 64,  64,  64,  64,  64,  64,  64,  64, 
-			 64,  64,  64,  64,  64,  64,  64,  64, 
-			 64,  64,  64,  64,  64,  64,  64,  64, 
-			 64,  64,  64,  64,  64,  64,  64,  64, 
-			 64,  64,  64,  64,  64,  64,  64,  64, 
-			 64,  64,  64,  64,  64,  64,  64,  64, 
-			 64,  64,  64,  64,  64,  64,  64,  64, 
-			 64,  64,  64,  64,  64,  64,  64,  64, 
-		};
-		if ((lexer->limit - lexer->cursor) < 29) FILL(29);
-		yych = *lexer->cursor;
-		if (yybm[0+yych] & 8) {
-			goto yy44;
-		}
-		switch (yych) {
-		case 0x00:	goto yy40;
-		case '\t':
-		case '\n':	goto yy47;
-		case ' ':
-		case '!':
-		case '#':
-		case '%':
-		case '&':
-		case '\'':
-		case '*':
-		case '.':
-		case '/':
-		case ':':
-		case '<':
-		case '=':
-		case '>':
-		case '?':
-		case '@':
-		case 'A':
-		case 'B':
-		case 'C':
-		case 'D':
-		case 'E':
-		case 'F':
-		case 'G':
-		case 'H':
-		case 'I':
-		case 'J':
-		case 'K':
-		case 'L':
-		case 'M':
-		case 'N':
-		case 'O':
-		case 'P':
-		case 'Q':
-		case 'R':
-		case 'S':
-		case 'T':
-		case 'U':
-		case 'V':
-		case 'W':
-		case 'X':
-		case 'Y':
-		case 'Z':
-		case '\\':
-		case '^':
-		case '_':
-		case '`':
-		case 'h':
-		case 'j':
-		case 'k':
-		case 'q':
-		case 'v':
-		case 'w':
-		case 'x':
-		case 'y':
-		case 'z':
-		case '|':
-		case '~':	goto yy49;
-		case '"':	goto yy52;
-		case '$':	goto yy54;
-		case '(':	goto yy55;
-		case ')':	goto yy57;
-		case '+':
-		case '-':	goto yy59;
-		case '0':	goto yy60;
-		case '1':
-		case '2':
-		case '3':
-		case '4':
-		case '5':
-		case '6':
-		case '7':
-		case '8':
-		case '9':	goto yy62;
-		case ';':	goto yy64;
-		case 'a':	goto yy65;
-		case 'b':	goto yy66;
-		case 'c':	goto yy67;
-		case 'd':	goto yy68;
-		case 'e':	goto yy69;
-		case 'f':	goto yy70;
-		case 'g':	goto yy71;
-		case 'i':	goto yy72;
-		case 'l':	goto yy73;
-		case 'm':	goto yy74;
-		case 'n':	goto yy75;
-		case 'o':	goto yy76;
-		case 'p':	goto yy77;
-		case 'r':	goto yy78;
-		case 's':	goto yy79;
-		case 't':	goto yy80;
-		case 'u':	goto yy81;
-		default:	goto yy42;
-		}
-yy40:
-		++lexer->cursor;
-#line 471 "src/ast-lexer.cc"
-		{ RETURN(EOF); }
-#line 557 "src/prebuilt/ast-lexer-gen.cc"
-yy42:
-		++lexer->cursor;
-yy43:
-#line 472 "src/ast-lexer.cc"
-		{ ERROR("unexpected char"); continue; }
-#line 563 "src/prebuilt/ast-lexer-gen.cc"
-yy44:
-		++lexer->cursor;
-		if (lexer->limit <= lexer->cursor) FILL(1);
-		yych = *lexer->cursor;
-		if (yybm[0+yych] & 8) {
-			goto yy44;
-		}
-#line 467 "src/ast-lexer.cc"
-		{ continue; }
-#line 573 "src/prebuilt/ast-lexer-gen.cc"
-yy47:
-		++lexer->cursor;
-#line 466 "src/ast-lexer.cc"
-		{ NEWLINE; continue; }
-#line 578 "src/prebuilt/ast-lexer-gen.cc"
-yy49:
-		++lexer->cursor;
-		if (lexer->limit <= lexer->cursor) FILL(1);
-		yych = *lexer->cursor;
-yy50:
-		if (yybm[0+yych] & 16) {
-			goto yy49;
-		}
-yy51:
-#line 468 "src/ast-lexer.cc"
-		{ ERROR("unexpected token \"%.*s\"",
-                                        static_cast<int>(yyleng), yytext);
-                                  continue; }
-#line 592 "src/prebuilt/ast-lexer-gen.cc"
-yy52:
-		yych = *(lexer->marker = ++lexer->cursor);
-		if (yych <= 0x1F) goto yy53;
-		if (yych != 0x7F) goto yy83;
-yy53:
-		BEGIN(YYCOND_BAD_TEXT);
-#line 228 "src/ast-lexer.cc"
-		{ continue; }
-#line 601 "src/prebuilt/ast-lexer-gen.cc"
-yy54:
-		yych = *++lexer->cursor;
-		if (yych <= ';') {
-			if (yych <= '\'') {
-				if (yych == '!') goto yy88;
-				if (yych <= '"') goto yy51;
-				goto yy88;
-			} else {
-				if (yych <= '+') {
-					if (yych <= ')') goto yy51;
-					goto yy88;
-				} else {
-					if (yych <= ',') goto yy51;
-					if (yych <= ':') goto yy88;
-					goto yy51;
-				}
-			}
-		} else {
-			if (yych <= 'z') {
-				if (yych <= '[') {
-					if (yych <= 'Z') goto yy88;
-					goto yy51;
-				} else {
-					if (yych == ']') goto yy51;
-					goto yy88;
-				}
-			} else {
-				if (yych <= '|') {
-					if (yych <= '{') goto yy51;
-					goto yy88;
-				} else {
-					if (yych == '~') goto yy88;
-					goto yy51;
-				}
-			}
-		}
-yy55:
-		++lexer->cursor;
-		if ((yych = *lexer->cursor) == ';') goto yy91;
-#line 219 "src/ast-lexer.cc"
-		{ RETURN(LPAR); }
-#line 643 "src/prebuilt/ast-lexer-gen.cc"
-yy57:
-		++lexer->cursor;
-#line 220 "src/ast-lexer.cc"
-		{ RETURN(RPAR); }
-#line 648 "src/prebuilt/ast-lexer-gen.cc"
-yy59:
-		yych = *++lexer->cursor;
-		if (yych <= 'h') {
-			if (yych <= '/') goto yy50;
-			if (yych <= '0') goto yy93;
-			if (yych <= '9') goto yy95;
-			goto yy50;
-		} else {
-			if (yych <= 'i') goto yy97;
-			if (yych == 'n') goto yy98;
-			goto yy50;
-		}
-yy60:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 32) {
-			goto yy62;
-		}
-		if (yych <= 'E') {
-			if (yych <= '+') {
-				if (yych <= '"') {
-					if (yych == '!') goto yy49;
-				} else {
-					if (yych <= '\'') goto yy49;
-					if (yych >= '*') goto yy49;
-				}
-			} else {
-				if (yych <= '.') {
-					if (yych <= ',') goto yy61;
-					if (yych <= '-') goto yy49;
-					goto yy99;
-				} else {
-					if (yych == ';') goto yy61;
-					if (yych <= 'D') goto yy49;
-					goto yy102;
-				}
-			}
-		} else {
-			if (yych <= 'w') {
-				if (yych <= '\\') {
-					if (yych != '[') goto yy49;
-				} else {
-					if (yych <= ']') goto yy61;
-					if (yych == 'e') goto yy102;
-					goto yy49;
-				}
-			} else {
-				if (yych <= '{') {
-					if (yych <= 'x') goto yy103;
-					if (yych <= 'z') goto yy49;
-				} else {
-					if (yych == '}') goto yy61;
-					if (yych <= '~') goto yy49;
-				}
-			}
-		}
-yy61:
-#line 221 "src/ast-lexer.cc"
-		{ LITERAL(Int); RETURN(NAT); }
-#line 707 "src/prebuilt/ast-lexer-gen.cc"
-yy62:
-		++lexer->cursor;
-		if ((lexer->limit - lexer->cursor) < 3) FILL(3);
-		yych = *lexer->cursor;
-		if (yybm[0+yych] & 32) {
-			goto yy62;
-		}
-		if (yych <= 'D') {
-			if (yych <= '+') {
-				if (yych <= '"') {
-					if (yych == '!') goto yy49;
-					goto yy61;
-				} else {
-					if (yych <= '\'') goto yy49;
-					if (yych <= ')') goto yy61;
-					goto yy49;
-				}
-			} else {
-				if (yych <= '.') {
-					if (yych <= ',') goto yy61;
-					if (yych <= '-') goto yy49;
-					goto yy99;
-				} else {
-					if (yych == ';') goto yy61;
-					goto yy49;
-				}
-			}
-		} else {
-			if (yych <= 'd') {
-				if (yych <= '[') {
-					if (yych <= 'E') goto yy102;
-					if (yych <= 'Z') goto yy49;
-					goto yy61;
-				} else {
-					if (yych == ']') goto yy61;
-					goto yy49;
-				}
-			} else {
-				if (yych <= '{') {
-					if (yych <= 'e') goto yy102;
-					if (yych <= 'z') goto yy49;
-					goto yy61;
-				} else {
-					if (yych == '}') goto yy61;
-					if (yych <= '~') goto yy49;
-					goto yy61;
-				}
-			}
-		}
-yy64:
-		yych = *++lexer->cursor;
-		if (yych == ';') goto yy104;
-		goto yy43;
-yy65:
-		yych = *++lexer->cursor;
-		if (yych <= 'm') {
-			if (yych == 'l') goto yy106;
-			goto yy50;
-		} else {
-			if (yych <= 'n') goto yy107;
-			if (yych == 's') goto yy108;
-			goto yy50;
-		}
-yy66:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy109;
-		if (yych == 'r') goto yy110;
-		goto yy50;
-yy67:
-		yych = *++lexer->cursor;
-		if (yych == 'a') goto yy112;
-		if (yych == 'u') goto yy113;
-		goto yy50;
-yy68:
-		yych = *++lexer->cursor;
-		if (yych == 'a') goto yy114;
-		if (yych == 'r') goto yy115;
-		goto yy50;
-yy69:
-		yych = *++lexer->cursor;
-		if (yych <= 'm') {
-			if (yych == 'l') goto yy116;
-			goto yy50;
-		} else {
-			if (yych <= 'n') goto yy117;
-			if (yych == 'x') goto yy118;
-			goto yy50;
-		}
-yy70:
-		yych = *++lexer->cursor;
-		if (yych <= '5') {
-			if (yych == '3') goto yy119;
-			goto yy50;
-		} else {
-			if (yych <= '6') goto yy120;
-			if (yych == 'u') goto yy121;
-			goto yy50;
-		}
-yy71:
-		yych = *++lexer->cursor;
-		if (yych <= 'k') {
-			if (yych == 'e') goto yy122;
-			goto yy50;
-		} else {
-			if (yych <= 'l') goto yy123;
-			if (yych == 'r') goto yy124;
-			goto yy50;
-		}
-yy72:
-		yych = *++lexer->cursor;
-		if (yych <= 'e') {
-			if (yych <= '3') {
-				if (yych <= '2') goto yy50;
-				goto yy125;
-			} else {
-				if (yych == '6') goto yy126;
-				goto yy50;
-			}
-		} else {
-			if (yych <= 'l') {
-				if (yych <= 'f') goto yy127;
-				goto yy50;
-			} else {
-				if (yych <= 'm') goto yy129;
-				if (yych <= 'n') goto yy130;
-				goto yy50;
-			}
-		}
-yy73:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy131;
-		goto yy50;
-yy74:
-		yych = *++lexer->cursor;
-		if (yych <= 'n') {
-			if (yych == 'e') goto yy132;
-			goto yy50;
-		} else {
-			if (yych <= 'o') goto yy133;
-			if (yych == 'u') goto yy134;
-			goto yy50;
-		}
-yy75:
-		yych = *++lexer->cursor;
-		if (yych == 'a') goto yy135;
-		if (yych == 'o') goto yy136;
-		goto yy50;
-yy76:
-		yych = *++lexer->cursor;
-		if (yych == 'f') goto yy137;
-		if (yych == 'u') goto yy138;
-		goto yy50;
-yy77:
-		yych = *++lexer->cursor;
-		if (yych == 'a') goto yy139;
-		goto yy50;
-yy78:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy140;
-		goto yy50;
-yy79:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy141;
-		if (yych == 't') goto yy142;
-		goto yy50;
-yy80:
-		yych = *++lexer->cursor;
-		if (yych <= 'e') {
-			if (yych == 'a') goto yy143;
-			if (yych <= 'd') goto yy50;
-			goto yy144;
-		} else {
-			if (yych <= 'h') {
-				if (yych <= 'g') goto yy50;
-				goto yy145;
-			} else {
-				if (yych == 'y') goto yy146;
-				goto yy50;
-			}
-		}
-yy81:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy147;
-		goto yy50;
-yy82:
-		++lexer->cursor;
-		if (lexer->limit <= lexer->cursor) FILL(1);
-		yych = *lexer->cursor;
-yy83:
-		if (yybm[0+yych] & 64) {
-			goto yy82;
-		}
-		if (yych <= 0x1F) goto yy84;
-		if (yych <= '"') goto yy85;
-		if (yych <= '\\') goto yy87;
-yy84:
-		lexer->cursor = lexer->marker;
-		goto yy53;
-yy85:
-		++lexer->cursor;
-#line 227 "src/ast-lexer.cc"
-		{ TEXT; RETURN(TEXT); }
-#line 910 "src/prebuilt/ast-lexer-gen.cc"
-yy87:
-		++lexer->cursor;
-		if (lexer->limit <= lexer->cursor) FILL(1);
-		yych = *lexer->cursor;
-		if (yych <= 'F') {
-			if (yych <= '\'') {
-				if (yych == '"') goto yy82;
-				if (yych <= '&') goto yy84;
-				goto yy82;
-			} else {
-				if (yych <= '/') goto yy84;
-				if (yych <= '9') goto yy148;
-				if (yych <= '@') goto yy84;
-				goto yy148;
-			}
-		} else {
-			if (yych <= 'f') {
-				if (yych == '\\') goto yy82;
-				if (yych <= '`') goto yy84;
-				goto yy148;
-			} else {
-				if (yych <= 'n') {
-					if (yych <= 'm') goto yy84;
-					goto yy82;
-				} else {
-					if (yych == 't') goto yy82;
-					goto yy84;
-				}
-			}
-		}
-yy88:
-		++lexer->cursor;
-		if (lexer->limit <= lexer->cursor) FILL(1);
-		yych = *lexer->cursor;
-		if (yych <= ';') {
-			if (yych <= '\'') {
-				if (yych == '!') goto yy88;
-				if (yych >= '#') goto yy88;
-			} else {
-				if (yych <= '+') {
-					if (yych >= '*') goto yy88;
-				} else {
-					if (yych <= ',') goto yy90;
-					if (yych <= ':') goto yy88;
-				}
-			}
-		} else {
-			if (yych <= 'z') {
-				if (yych <= '[') {
-					if (yych <= 'Z') goto yy88;
-				} else {
-					if (yych != ']') goto yy88;
-				}
-			} else {
-				if (yych <= '|') {
-					if (yych >= '|') goto yy88;
-				} else {
-					if (yych == '~') goto yy88;
-				}
-			}
-		}
-yy90:
-#line 453 "src/ast-lexer.cc"
-		{ TEXT; RETURN(VAR); }
-#line 975 "src/prebuilt/ast-lexer-gen.cc"
-yy91:
-		++lexer->cursor;
-		BEGIN(YYCOND_BLOCK_COMMENT);
-#line 458 "src/ast-lexer.cc"
-		{ COMMENT_NESTING = 1; continue; }
-#line 981 "src/prebuilt/ast-lexer-gen.cc"
-yy93:
-		++lexer->cursor;
-		if ((yych = *lexer->cursor) <= 'D') {
-			if (yych <= ',') {
-				if (yych <= '"') {
-					if (yych == '!') goto yy49;
-				} else {
-					if (yych <= '\'') goto yy49;
-					if (yych <= ')') goto yy94;
-					if (yych <= '+') goto yy49;
-				}
-			} else {
-				if (yych <= '/') {
-					if (yych == '.') goto yy99;
-					goto yy49;
-				} else {
-					if (yych <= '9') goto yy95;
-					if (yych != ';') goto yy49;
-				}
-			}
-		} else {
-			if (yych <= 'e') {
-				if (yych <= '[') {
-					if (yych <= 'E') goto yy102;
-					if (yych <= 'Z') goto yy49;
-				} else {
-					if (yych == ']') goto yy94;
-					if (yych <= 'd') goto yy49;
-					goto yy102;
-				}
-			} else {
-				if (yych <= '{') {
-					if (yych == 'x') goto yy149;
-					if (yych <= 'z') goto yy49;
-				} else {
-					if (yych == '}') goto yy94;
-					if (yych <= '~') goto yy49;
-				}
-			}
-		}
-yy94:
-#line 222 "src/ast-lexer.cc"
-		{ LITERAL(Int); RETURN(INT); }
-#line 1025 "src/prebuilt/ast-lexer-gen.cc"
-yy95:
-		++lexer->cursor;
-		if ((lexer->limit - lexer->cursor) < 3) FILL(3);
-		yych = *lexer->cursor;
-		if (yych <= ';') {
-			if (yych <= '+') {
-				if (yych <= '"') {
-					if (yych == '!') goto yy49;
-					goto yy94;
-				} else {
-					if (yych <= '\'') goto yy49;
-					if (yych <= ')') goto yy94;
-					goto yy49;
-				}
-			} else {
-				if (yych <= '.') {
-					if (yych <= ',') goto yy94;
-					if (yych <= '-') goto yy49;
-					goto yy99;
-				} else {
-					if (yych <= '/') goto yy49;
-					if (yych <= '9') goto yy95;
-					if (yych <= ':') goto yy49;
-					goto yy94;
-				}
-			}
-		} else {
-			if (yych <= 'd') {
-				if (yych <= 'Z') {
-					if (yych == 'E') goto yy102;
-					goto yy49;
-				} else {
-					if (yych == '\\') goto yy49;
-					if (yych <= ']') goto yy94;
-					goto yy49;
-				}
-			} else {
-				if (yych <= '{') {
-					if (yych <= 'e') goto yy102;
-					if (yych <= 'z') goto yy49;
-					goto yy94;
-				} else {
-					if (yych == '}') goto yy94;
-					if (yych <= '~') goto yy49;
-					goto yy94;
-				}
-			}
-		}
-yy97:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy150;
-		goto yy50;
-yy98:
-		yych = *++lexer->cursor;
-		if (yych == 'a') goto yy135;
-		goto yy50;
-yy99:
-		++lexer->cursor;
-		if ((lexer->limit - lexer->cursor) < 3) FILL(3);
-		yych = *lexer->cursor;
-		if (yych <= 'D') {
-			if (yych <= '+') {
-				if (yych <= '"') {
-					if (yych == '!') goto yy49;
-				} else {
-					if (yych <= '\'') goto yy49;
-					if (yych >= '*') goto yy49;
-				}
-			} else {
-				if (yych <= '9') {
-					if (yych <= ',') goto yy101;
-					if (yych <= '/') goto yy49;
-					goto yy99;
-				} else {
-					if (yych != ';') goto yy49;
-				}
-			}
-		} else {
-			if (yych <= 'd') {
-				if (yych <= '[') {
-					if (yych <= 'E') goto yy102;
-					if (yych <= 'Z') goto yy49;
-				} else {
-					if (yych != ']') goto yy49;
-				}
-			} else {
-				if (yych <= '{') {
-					if (yych <= 'e') goto yy102;
-					if (yych <= 'z') goto yy49;
-				} else {
-					if (yych == '}') goto yy101;
-					if (yych <= '~') goto yy49;
-				}
-			}
-		}
-yy101:
-#line 223 "src/ast-lexer.cc"
-		{ LITERAL(Float); RETURN(FLOAT); }
-#line 1124 "src/prebuilt/ast-lexer-gen.cc"
-yy102:
-		yych = *++lexer->cursor;
-		if (yych <= ',') {
-			if (yych == '+') goto yy151;
-			goto yy50;
-		} else {
-			if (yych <= '-') goto yy151;
-			if (yych <= '/') goto yy50;
-			if (yych <= '9') goto yy152;
-			goto yy50;
-		}
-yy103:
-		yych = *++lexer->cursor;
-		if (yybm[0+yych] & 128) {
-			goto yy154;
-		}
-		goto yy50;
-yy104:
-		++lexer->cursor;
-		BEGIN(YYCOND_LINE_COMMENT);
-#line 455 "src/ast-lexer.cc"
-		{ continue; }
-#line 1147 "src/prebuilt/ast-lexer-gen.cc"
-yy106:
-		yych = *++lexer->cursor;
-		if (yych == 'i') goto yy156;
-		goto yy50;
-yy107:
-		yych = *++lexer->cursor;
-		if (yych == 'y') goto yy157;
-		goto yy50;
-yy108:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy158;
-		goto yy50;
-yy109:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy159;
-		goto yy50;
-yy110:
-		++lexer->cursor;
-		if ((yych = *lexer->cursor) <= 'Z') {
-			if (yych <= ')') {
-				if (yych <= '!') {
-					if (yych >= '!') goto yy49;
-				} else {
-					if (yych <= '"') goto yy111;
-					if (yych <= '\'') goto yy49;
-				}
-			} else {
-				if (yych <= ',') {
-					if (yych <= '+') goto yy49;
-				} else {
-					if (yych != ';') goto yy49;
-				}
-			}
-		} else {
-			if (yych <= '_') {
-				if (yych <= '\\') {
-					if (yych >= '\\') goto yy49;
-				} else {
-					if (yych <= ']') goto yy111;
-					if (yych <= '^') goto yy49;
-					goto yy160;
-				}
-			} else {
-				if (yych <= '|') {
-					if (yych != '{') goto yy49;
-				} else {
-					if (yych == '~') goto yy49;
-				}
-			}
-		}
-yy111:
-#line 253 "src/ast-lexer.cc"
-		{ RETURN(BR); }
-#line 1201 "src/prebuilt/ast-lexer-gen.cc"
-yy112:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy161;
-		goto yy50;
-yy113:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy162;
-		goto yy50;
-yy114:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy163;
-		goto yy50;
-yy115:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy164;
-		goto yy50;
-yy116:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy165;
-		if (yych == 's') goto yy166;
-		goto yy50;
-yy117:
-		yych = *++lexer->cursor;
-		if (yych == 'd') goto yy167;
-		goto yy50;
-yy118:
-		yych = *++lexer->cursor;
-		if (yych == 'p') goto yy169;
-		goto yy50;
-yy119:
-		yych = *++lexer->cursor;
-		if (yych == '2') goto yy170;
-		goto yy50;
-yy120:
-		yych = *++lexer->cursor;
-		if (yych == '4') goto yy172;
-		goto yy50;
-yy121:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy174;
-		goto yy50;
-yy122:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy175;
-		goto yy50;
-yy123:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy177;
-		goto yy50;
-yy124:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy178;
-		goto yy50;
-yy125:
-		yych = *++lexer->cursor;
-		if (yych == '2') goto yy179;
-		goto yy50;
-yy126:
-		yych = *++lexer->cursor;
-		if (yych == '4') goto yy181;
-		goto yy50;
-yy127:
-		++lexer->cursor;
-		if ((yych = *lexer->cursor) <= 'Z') {
-			if (yych <= ')') {
-				if (yych <= '!') {
-					if (yych >= '!') goto yy49;
-				} else {
-					if (yych <= '"') goto yy128;
-					if (yych <= '\'') goto yy49;
-				}
-			} else {
-				if (yych <= ',') {
-					if (yych <= '+') goto yy49;
-				} else {
-					if (yych != ';') goto yy49;
-				}
-			}
-		} else {
-			if (yych <= '_') {
-				if (yych <= '\\') {
-					if (yych >= '\\') goto yy49;
-				} else {
-					if (yych <= ']') goto yy128;
-					if (yych <= '^') goto yy49;
-					goto yy183;
-				}
-			} else {
-				if (yych <= '|') {
-					if (yych != '{') goto yy49;
-				} else {
-					if (yych == '~') goto yy49;
-				}
-			}
-		}
-yy128:
-#line 248 "src/ast-lexer.cc"
-		{ RETURN(IF); }
-#line 1300 "src/prebuilt/ast-lexer-gen.cc"
-yy129:
-		yych = *++lexer->cursor;
-		if (yych == 'p') goto yy184;
-		goto yy50;
-yy130:
-		yych = *++lexer->cursor;
-		if (yych <= 'o') {
-			if (yych == 'f') goto yy185;
-			goto yy50;
-		} else {
-			if (yych <= 'p') goto yy187;
-			if (yych == 'v') goto yy188;
-			goto yy50;
-		}
-yy131:
-		yych = *++lexer->cursor;
-		if (yych == 'c') goto yy189;
-		if (yych == 'o') goto yy190;
-		goto yy50;
-yy132:
-		yych = *++lexer->cursor;
-		if (yych == 'm') goto yy191;
-		goto yy50;
-yy133:
-		yych = *++lexer->cursor;
-		if (yych == 'd') goto yy192;
-		goto yy50;
-yy134:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy193;
-		goto yy50;
-yy135:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy195;
-		goto yy50;
-yy136:
-		yych = *++lexer->cursor;
-		if (yych == 'p') goto yy197;
-		goto yy50;
-yy137:
-		yych = *++lexer->cursor;
-		if (yych == 'f') goto yy199;
-		goto yy50;
-yy138:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy200;
-		goto yy50;
-yy139:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy201;
-		goto yy50;
-yy140:
-		yych = *++lexer->cursor;
-		if (yych <= 'r') {
-			if (yych == 'g') goto yy202;
-			goto yy50;
-		} else {
-			if (yych <= 's') goto yy203;
-			if (yych <= 't') goto yy204;
-			goto yy50;
-		}
-yy141:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy205;
-		if (yych == 't') goto yy206;
-		goto yy50;
-yy142:
-		yych = *++lexer->cursor;
-		if (yych == 'a') goto yy207;
-		goto yy50;
-yy143:
-		yych = *++lexer->cursor;
-		if (yych == 'b') goto yy208;
-		goto yy50;
-yy144:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy209;
-		goto yy50;
-yy145:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy210;
-		goto yy50;
-yy146:
-		yych = *++lexer->cursor;
-		if (yych == 'p') goto yy211;
-		goto yy50;
-yy147:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy212;
-		goto yy50;
-yy148:
-		++lexer->cursor;
-		if (lexer->limit <= lexer->cursor) FILL(1);
-		yych = *lexer->cursor;
-		if (yych <= '@') {
-			if (yych <= '/') goto yy84;
-			if (yych <= '9') goto yy82;
-			goto yy84;
-		} else {
-			if (yych <= 'F') goto yy82;
-			if (yych <= '`') goto yy84;
-			if (yych <= 'f') goto yy82;
-			goto yy84;
-		}
-yy149:
-		yych = *++lexer->cursor;
-		if (yych <= '@') {
-			if (yych <= '/') goto yy50;
-			if (yych <= '9') goto yy213;
-			goto yy50;
-		} else {
-			if (yych <= 'F') goto yy213;
-			if (yych <= '`') goto yy50;
-			if (yych <= 'f') goto yy213;
-			goto yy50;
-		}
-yy150:
-		yych = *++lexer->cursor;
-		if (yych == 'f') goto yy185;
-		goto yy50;
-yy151:
-		yych = *++lexer->cursor;
-		if (yych <= '/') goto yy50;
-		if (yych >= ':') goto yy50;
-yy152:
-		++lexer->cursor;
-		if (lexer->limit <= lexer->cursor) FILL(1);
-		yych = *lexer->cursor;
-		if (yych <= ':') {
-			if (yych <= ')') {
-				if (yych <= '!') {
-					if (yych <= ' ') goto yy101;
-					goto yy49;
-				} else {
-					if (yych <= '"') goto yy101;
-					if (yych <= '\'') goto yy49;
-					goto yy101;
-				}
-			} else {
-				if (yych <= ',') {
-					if (yych <= '+') goto yy49;
-					goto yy101;
-				} else {
-					if (yych <= '/') goto yy49;
-					if (yych <= '9') goto yy152;
-					goto yy49;
-				}
-			}
-		} else {
-			if (yych <= ']') {
-				if (yych <= 'Z') {
-					if (yych <= ';') goto yy101;
-					goto yy49;
-				} else {
-					if (yych == '\\') goto yy49;
-					goto yy101;
-				}
-			} else {
-				if (yych <= '|') {
-					if (yych == '{') goto yy101;
-					goto yy49;
-				} else {
-					if (yych == '~') goto yy49;
-					goto yy101;
-				}
-			}
-		}
-yy154:
-		++lexer->cursor;
-		if ((lexer->limit - lexer->cursor) < 3) FILL(3);
-		yych = *lexer->cursor;
-		if (yybm[0+yych] & 128) {
-			goto yy154;
-		}
-		if (yych <= ';') {
-			if (yych <= ')') {
-				if (yych <= '!') {
-					if (yych <= ' ') goto yy61;
-					goto yy49;
-				} else {
-					if (yych <= '"') goto yy61;
-					if (yych <= '\'') goto yy49;
-					goto yy61;
-				}
-			} else {
-				if (yych <= '-') {
-					if (yych == ',') goto yy61;
-					goto yy49;
-				} else {
-					if (yych <= '.') goto yy215;
-					if (yych <= ':') goto yy49;
-					goto yy61;
-				}
-			}
-		} else {
-			if (yych <= 'p') {
-				if (yych <= '\\') {
-					if (yych == '[') goto yy61;
-					goto yy49;
-				} else {
-					if (yych <= ']') goto yy61;
-					if (yych <= 'o') goto yy49;
-					goto yy217;
-				}
-			} else {
-				if (yych <= '|') {
-					if (yych == '{') goto yy61;
-					goto yy49;
-				} else {
-					if (yych == '~') goto yy49;
-					goto yy61;
-				}
-			}
-		}
-yy156:
-		yych = *++lexer->cursor;
-		if (yych == 'g') goto yy218;
-		goto yy50;
-yy157:
-		yych = *++lexer->cursor;
-		if (yych == 'f') goto yy219;
-		goto yy50;
-yy158:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy220;
-		goto yy50;
-yy159:
-		yych = *++lexer->cursor;
-		if (yych == 'c') goto yy221;
-		goto yy50;
-yy160:
-		yych = *++lexer->cursor;
-		if (yych == 'i') goto yy222;
-		if (yych == 't') goto yy223;
-		goto yy50;
-yy161:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy224;
-		goto yy50;
-yy162:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy226;
-		goto yy50;
-yy163:
-		yych = *++lexer->cursor;
-		if (yych == 'a') goto yy227;
-		goto yy50;
-yy164:
-		yych = *++lexer->cursor;
-		if (yych == 'p') goto yy229;
-		goto yy50;
-yy165:
-		yych = *++lexer->cursor;
-		if (yych == 'm') goto yy231;
-		goto yy50;
-yy166:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy233;
-		goto yy50;
-yy167:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 260 "src/ast-lexer.cc"
-		{ RETURN(END); }
-#line 1567 "src/prebuilt/ast-lexer-gen.cc"
-yy169:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy235;
-		goto yy50;
-yy170:
-		++lexer->cursor;
-		if ((yych = *lexer->cursor) <= ':') {
-			if (yych <= ')') {
-				if (yych <= '!') {
-					if (yych >= '!') goto yy49;
-				} else {
-					if (yych <= '"') goto yy171;
-					if (yych <= '\'') goto yy49;
-				}
-			} else {
-				if (yych <= ',') {
-					if (yych <= '+') goto yy49;
-				} else {
-					if (yych == '.') goto yy236;
-					goto yy49;
-				}
-			}
-		} else {
-			if (yych <= ']') {
-				if (yych <= 'Z') {
-					if (yych >= '<') goto yy49;
-				} else {
-					if (yych == '\\') goto yy49;
-				}
-			} else {
-				if (yych <= '|') {
-					if (yych != '{') goto yy49;
-				} else {
-					if (yych == '~') goto yy49;
-				}
-			}
-		}
-yy171:
-#line 242 "src/ast-lexer.cc"
-		{ TYPE(F32); RETURN(VALUE_TYPE); }
-#line 1608 "src/prebuilt/ast-lexer-gen.cc"
-yy172:
-		++lexer->cursor;
-		if ((yych = *lexer->cursor) <= ':') {
-			if (yych <= ')') {
-				if (yych <= '!') {
-					if (yych >= '!') goto yy49;
-				} else {
-					if (yych <= '"') goto yy173;
-					if (yych <= '\'') goto yy49;
-				}
-			} else {
-				if (yych <= ',') {
-					if (yych <= '+') goto yy49;
-				} else {
-					if (yych == '.') goto yy237;
-					goto yy49;
-				}
-			}
-		} else {
-			if (yych <= ']') {
-				if (yych <= 'Z') {
-					if (yych >= '<') goto yy49;
-				} else {
-					if (yych == '\\') goto yy49;
-				}
-			} else {
-				if (yych <= '|') {
-					if (yych != '{') goto yy49;
-				} else {
-					if (yych == '~') goto yy49;
-				}
-			}
-		}
-yy173:
-#line 243 "src/ast-lexer.cc"
-		{ TYPE(F64); RETURN(VALUE_TYPE); }
-#line 1645 "src/prebuilt/ast-lexer-gen.cc"
-yy174:
-		yych = *++lexer->cursor;
-		if (yych == 'c') goto yy238;
-		goto yy50;
-yy175:
-		++lexer->cursor;
-		if ((yych = *lexer->cursor) <= 'Z') {
-			if (yych <= ')') {
-				if (yych <= '!') {
-					if (yych >= '!') goto yy49;
-				} else {
-					if (yych <= '"') goto yy176;
-					if (yych <= '\'') goto yy49;
-				}
-			} else {
-				if (yych <= ',') {
-					if (yych <= '+') goto yy49;
-				} else {
-					if (yych != ';') goto yy49;
-				}
-			}
-		} else {
-			if (yych <= '_') {
-				if (yych <= '\\') {
-					if (yych >= '\\') goto yy49;
-				} else {
-					if (yych <= ']') goto yy176;
-					if (yych <= '^') goto yy49;
-					goto yy240;
-				}
-			} else {
-				if (yych <= '|') {
-					if (yych != '{') goto yy49;
-				} else {
-					if (yych == '~') goto yy49;
-				}
-			}
-		}
-yy176:
-#line 440 "src/ast-lexer.cc"
-		{ RETURN(GET); }
-#line 1687 "src/prebuilt/ast-lexer-gen.cc"
-yy177:
-		yych = *++lexer->cursor;
-		if (yych == 'b') goto yy241;
-		goto yy50;
-yy178:
-		yych = *++lexer->cursor;
-		if (yych == 'w') goto yy242;
-		goto yy50;
-yy179:
-		++lexer->cursor;
-		if ((yych = *lexer->cursor) <= ':') {
-			if (yych <= ')') {
-				if (yych <= '!') {
-					if (yych >= '!') goto yy49;
-				} else {
-					if (yych <= '"') goto yy180;
-					if (yych <= '\'') goto yy49;
-				}
-			} else {
-				if (yych <= ',') {
-					if (yych <= '+') goto yy49;
-				} else {
-					if (yych == '.') goto yy243;
-					goto yy49;
-				}
-			}
-		} else {
-			if (yych <= ']') {
-				if (yych <= 'Z') {
-					if (yych >= '<') goto yy49;
-				} else {
-					if (yych == '\\') goto yy49;
-				}
-			} else {
-				if (yych <= '|') {
-					if (yych != '{') goto yy49;
-				} else {
-					if (yych == '~') goto yy49;
-				}
-			}
-		}
-yy180:
-#line 240 "src/ast-lexer.cc"
-		{ TYPE(I32); RETURN(VALUE_TYPE); }
-#line 1732 "src/prebuilt/ast-lexer-gen.cc"
-yy181:
-		++lexer->cursor;
-		if ((yych = *lexer->cursor) <= ':') {
-			if (yych <= ')') {
-				if (yych <= '!') {
-					if (yych >= '!') goto yy49;
-				} else {
-					if (yych <= '"') goto yy182;
-					if (yych <= '\'') goto yy49;
-				}
-			} else {
-				if (yych <= ',') {
-					if (yych <= '+') goto yy49;
-				} else {
-					if (yych == '.') goto yy244;
-					goto yy49;
-				}
-			}
-		} else {
-			if (yych <= ']') {
-				if (yych <= 'Z') {
-					if (yych >= '<') goto yy49;
-				} else {
-					if (yych == '\\') goto yy49;
-				}
-			} else {
-				if (yych <= '|') {
-					if (yych != '{') goto yy49;
-				} else {
-					if (yych == '~') goto yy49;
-				}
-			}
-		}
-yy182:
-#line 241 "src/ast-lexer.cc"
-		{ TYPE(I64); RETURN(VALUE_TYPE); }
-#line 1769 "src/prebuilt/ast-lexer-gen.cc"
-yy183:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy245;
-		goto yy50;
-yy184:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy246;
-		goto yy50;
-yy185:
-		++lexer->cursor;
-		if ((yych = *lexer->cursor) <= 'Z') {
-			if (yych <= ')') {
-				if (yych <= '!') {
-					if (yych >= '!') goto yy49;
-				} else {
-					if (yych <= '"') goto yy186;
-					if (yych <= '\'') goto yy49;
-				}
-			} else {
-				if (yych <= ',') {
-					if (yych <= '+') goto yy49;
-				} else {
-					if (yych != ';') goto yy49;
-				}
-			}
-		} else {
-			if (yych <= 'i') {
-				if (yych <= '\\') {
-					if (yych >= '\\') goto yy49;
-				} else {
-					if (yych <= ']') goto yy186;
-					if (yych <= 'h') goto yy49;
-					goto yy247;
-				}
-			} else {
-				if (yych <= '|') {
-					if (yych != '{') goto yy49;
-				} else {
-					if (yych == '~') goto yy49;
-				}
-			}
-		}
-yy186:
-#line 225 "src/ast-lexer.cc"
-		{ LITERAL(Infinity); RETURN(FLOAT); }
-#line 1815 "src/prebuilt/ast-lexer-gen.cc"
-yy187:
-		yych = *++lexer->cursor;
-		if (yych == 'u') goto yy248;
-		goto yy50;
-yy188:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy249;
-		goto yy50;
-yy189:
-		yych = *++lexer->cursor;
-		if (yych == 'a') goto yy250;
-		goto yy50;
-yy190:
-		yych = *++lexer->cursor;
-		if (yych == 'p') goto yy251;
-		goto yy50;
-yy191:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy253;
-		goto yy50;
-yy192:
-		yych = *++lexer->cursor;
-		if (yych == 'u') goto yy254;
-		goto yy50;
-yy193:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 245 "src/ast-lexer.cc"
-		{ RETURN(MUT); }
-#line 1847 "src/prebuilt/ast-lexer-gen.cc"
-yy195:
-		++lexer->cursor;
-		if ((yych = *lexer->cursor) <= ';') {
-			if (yych <= ')') {
-				if (yych <= '!') {
-					if (yych >= '!') goto yy49;
-				} else {
-					if (yych <= '"') goto yy196;
-					if (yych <= '\'') goto yy49;
-				}
-			} else {
-				if (yych <= ',') {
-					if (yych <= '+') goto yy49;
-				} else {
-					if (yych <= '9') goto yy49;
-					if (yych <= ':') goto yy255;
-				}
-			}
-		} else {
-			if (yych <= 'z') {
-				if (yych <= '[') {
-					if (yych <= 'Z') goto yy49;
-				} else {
-					if (yych != ']') goto yy49;
-				}
-			} else {
-				if (yych <= '|') {
-					if (yych >= '|') goto yy49;
-				} else {
-					if (yych == '~') goto yy49;
-				}
-			}
-		}
-yy196:
-#line 226 "src/ast-lexer.cc"
-		{ LITERAL(Nan); RETURN(FLOAT); }
-#line 1884 "src/prebuilt/ast-lexer-gen.cc"
-yy197:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 246 "src/ast-lexer.cc"
-		{ RETURN(NOP); }
-#line 1892 "src/prebuilt/ast-lexer-gen.cc"
-yy199:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy256;
-		goto yy50;
-yy200:
-		yych = *++lexer->cursor;
-		if (yych == 'p') goto yy257;
-		goto yy50;
-yy201:
-		yych = *++lexer->cursor;
-		if (yych == 'a') goto yy258;
-		goto yy50;
-yy202:
-		yych = *++lexer->cursor;
-		if (yych == 'i') goto yy259;
-		goto yy50;
-yy203:
-		yych = *++lexer->cursor;
-		if (yych == 'u') goto yy260;
-		goto yy50;
-yy204:
-		yych = *++lexer->cursor;
-		if (yych == 'u') goto yy261;
-		goto yy50;
-yy205:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy262;
-		goto yy50;
-yy206:
-		yych = *++lexer->cursor;
-		if (yych == '_') goto yy263;
-		goto yy50;
-yy207:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy264;
-		goto yy50;
-yy208:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy265;
-		goto yy50;
-yy209:
-		yych = *++lexer->cursor;
-		if (yych == '_') goto yy266;
-		goto yy50;
-yy210:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy267;
-		goto yy50;
-yy211:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy269;
-		goto yy50;
-yy212:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy271;
-		goto yy50;
-yy213:
-		++lexer->cursor;
-		if ((lexer->limit - lexer->cursor) < 3) FILL(3);
-		yych = *lexer->cursor;
-		if (yych <= '@') {
-			if (yych <= ',') {
-				if (yych <= '"') {
-					if (yych == '!') goto yy49;
-					goto yy94;
-				} else {
-					if (yych <= '\'') goto yy49;
-					if (yych <= ')') goto yy94;
-					if (yych <= '+') goto yy49;
-					goto yy94;
-				}
-			} else {
-				if (yych <= '/') {
-					if (yych != '.') goto yy49;
-				} else {
-					if (yych <= '9') goto yy213;
-					if (yych == ';') goto yy94;
-					goto yy49;
-				}
-			}
-		} else {
-			if (yych <= 'f') {
-				if (yych <= '[') {
-					if (yych <= 'F') goto yy213;
-					if (yych <= 'Z') goto yy49;
-					goto yy94;
-				} else {
-					if (yych == ']') goto yy94;
-					if (yych <= '`') goto yy49;
-					goto yy213;
-				}
-			} else {
-				if (yych <= '{') {
-					if (yych == 'p') goto yy217;
-					if (yych <= 'z') goto yy49;
-					goto yy94;
-				} else {
-					if (yych == '}') goto yy94;
-					if (yych <= '~') goto yy49;
-					goto yy94;
-				}
-			}
-		}
-yy215:
-		++lexer->cursor;
-		if ((lexer->limit - lexer->cursor) < 3) FILL(3);
-		yych = *lexer->cursor;
-		if (yych <= 'F') {
-			if (yych <= '+') {
-				if (yych <= '"') {
-					if (yych == '!') goto yy49;
-					goto yy51;
-				} else {
-					if (yych <= '\'') goto yy49;
-					if (yych <= ')') goto yy51;
-					goto yy49;
-				}
-			} else {
-				if (yych <= '9') {
-					if (yych <= ',') goto yy51;
-					if (yych <= '/') goto yy49;
-					goto yy215;
-				} else {
-					if (yych == ';') goto yy51;
-					if (yych <= '@') goto yy49;
-					goto yy215;
-				}
-			}
-		} else {
-			if (yych <= 'o') {
-				if (yych <= '\\') {
-					if (yych == '[') goto yy51;
-					goto yy49;
-				} else {
-					if (yych <= ']') goto yy51;
-					if (yych <= '`') goto yy49;
-					if (yych <= 'f') goto yy215;
-					goto yy49;
-				}
-			} else {
-				if (yych <= '{') {
-					if (yych <= 'p') goto yy217;
-					if (yych <= 'z') goto yy49;
-					goto yy51;
-				} else {
-					if (yych == '}') goto yy51;
-					if (yych <= '~') goto yy49;
-					goto yy51;
-				}
-			}
-		}
-yy217:
-		yych = *++lexer->cursor;
-		if (yych <= ',') {
-			if (yych == '+') goto yy272;
-			goto yy50;
-		} else {
-			if (yych <= '-') goto yy272;
-			if (yych <= '/') goto yy50;
-			if (yych <= '9') goto yy273;
-			goto yy50;
-		}
-yy218:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy276;
-		goto yy50;
-yy219:
-		yych = *++lexer->cursor;
-		if (yych == 'u') goto yy277;
-		goto yy50;
-yy220:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy278;
-		goto yy50;
-yy221:
-		yych = *++lexer->cursor;
-		if (yych == 'k') goto yy279;
-		goto yy50;
-yy222:
-		yych = *++lexer->cursor;
-		if (yych == 'f') goto yy281;
-		goto yy50;
-yy223:
-		yych = *++lexer->cursor;
-		if (yych == 'a') goto yy283;
-		goto yy50;
-yy224:
-		++lexer->cursor;
-		if ((yych = *lexer->cursor) <= 'Z') {
-			if (yych <= ')') {
-				if (yych <= '!') {
-					if (yych >= '!') goto yy49;
-				} else {
-					if (yych <= '"') goto yy225;
-					if (yych <= '\'') goto yy49;
-				}
-			} else {
-				if (yych <= ',') {
-					if (yych <= '+') goto yy49;
-				} else {
-					if (yych != ';') goto yy49;
-				}
-			}
-		} else {
-			if (yych <= '_') {
-				if (yych <= '\\') {
-					if (yych >= '\\') goto yy49;
-				} else {
-					if (yych <= ']') goto yy225;
-					if (yych <= '^') goto yy49;
-					goto yy284;
-				}
-			} else {
-				if (yych <= '|') {
-					if (yych != '{') goto yy49;
-				} else {
-					if (yych == '~') goto yy49;
-				}
-			}
-		}
-yy225:
-#line 256 "src/ast-lexer.cc"
-		{ RETURN(CALL); }
-#line 2116 "src/prebuilt/ast-lexer-gen.cc"
-yy226:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy285;
-		goto yy50;
-yy227:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 434 "src/ast-lexer.cc"
-		{ RETURN(DATA); }
-#line 2128 "src/prebuilt/ast-lexer-gen.cc"
-yy229:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 259 "src/ast-lexer.cc"
-		{ RETURN(DROP); }
-#line 2136 "src/prebuilt/ast-lexer-gen.cc"
-yy231:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 433 "src/ast-lexer.cc"
-		{ RETURN(ELEM); }
-#line 2144 "src/prebuilt/ast-lexer-gen.cc"
-yy233:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 251 "src/ast-lexer.cc"
-		{ RETURN(ELSE); }
-#line 2152 "src/prebuilt/ast-lexer-gen.cc"
-yy235:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy286;
-		goto yy50;
-yy236:
-		yych = *++lexer->cursor;
-		switch (yych) {
-		case 'a':	goto yy287;
-		case 'c':	goto yy288;
-		case 'd':	goto yy289;
-		case 'e':	goto yy290;
-		case 'f':	goto yy291;
-		case 'g':	goto yy292;
-		case 'l':	goto yy293;
-		case 'm':	goto yy294;
-		case 'n':	goto yy295;
-		case 'r':	goto yy296;
-		case 's':	goto yy297;
-		case 't':	goto yy298;
-		default:	goto yy50;
-		}
-yy237:
-		yych = *++lexer->cursor;
-		switch (yych) {
-		case 'a':	goto yy299;
-		case 'c':	goto yy300;
-		case 'd':	goto yy301;
-		case 'e':	goto yy302;
-		case 'f':	goto yy303;
-		case 'g':	goto yy304;
-		case 'l':	goto yy305;
-		case 'm':	goto yy306;
-		case 'n':	goto yy307;
-		case 'p':	goto yy308;
-		case 'r':	goto yy309;
-		case 's':	goto yy310;
-		case 't':	goto yy311;
-		default:	goto yy50;
-		}
-yy238:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 424 "src/ast-lexer.cc"
-		{ RETURN(FUNC); }
-#line 2199 "src/prebuilt/ast-lexer-gen.cc"
-yy240:
-		yych = *++lexer->cursor;
-		if (yych == 'g') goto yy312;
-		if (yych == 'l') goto yy313;
-		goto yy50;
-yy241:
-		yych = *++lexer->cursor;
-		if (yych == 'a') goto yy314;
-		goto yy50;
-yy242:
-		yych = *++lexer->cursor;
-		if (yych == '_') goto yy315;
-		goto yy50;
-yy243:
-		yych = *++lexer->cursor;
-		switch (yych) {
-		case 'a':	goto yy316;
-		case 'c':	goto yy317;
-		case 'd':	goto yy318;
-		case 'e':	goto yy319;
-		case 'g':	goto yy320;
-		case 'l':	goto yy321;
-		case 'm':	goto yy322;
-		case 'n':	goto yy323;
-		case 'o':	goto yy324;
-		case 'p':	goto yy325;
-		case 'r':	goto yy326;
-		case 's':	goto yy327;
-		case 't':	goto yy328;
-		case 'w':	goto yy329;
-		case 'x':	goto yy330;
-		default:	goto yy50;
-		}
-yy244:
-		yych = *++lexer->cursor;
-		switch (yych) {
-		case 'a':	goto yy331;
-		case 'c':	goto yy332;
-		case 'd':	goto yy333;
-		case 'e':	goto yy334;
-		case 'g':	goto yy335;
-		case 'l':	goto yy336;
-		case 'm':	goto yy337;
-		case 'n':	goto yy338;
-		case 'o':	goto yy339;
-		case 'p':	goto yy340;
-		case 'r':	goto yy341;
-		case 's':	goto yy342;
-		case 't':	goto yy343;
-		case 'x':	goto yy344;
-		default:	goto yy50;
-		}
-yy245:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy345;
-		goto yy50;
-yy246:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy346;
-		goto yy50;
-yy247:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy347;
-		goto yy50;
-yy248:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy348;
-		goto yy50;
-yy249:
-		yych = *++lexer->cursor;
-		if (yych == 'k') goto yy350;
-		goto yy50;
-yy250:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy351;
-		goto yy50;
-yy251:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 252 "src/ast-lexer.cc"
-		{ RETURN(LOOP); }
-#line 2283 "src/prebuilt/ast-lexer-gen.cc"
-yy253:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy353;
-		goto yy50;
-yy254:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy354;
-		goto yy50;
-yy255:
-		yych = *++lexer->cursor;
-		if (yych == '0') goto yy355;
-		goto yy50;
-yy256:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy356;
-		goto yy50;
-yy257:
-		yych = *++lexer->cursor;
-		if (yych == 'u') goto yy357;
-		goto yy50;
-yy258:
-		yych = *++lexer->cursor;
-		if (yych == 'm') goto yy358;
-		goto yy50;
-yy259:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy360;
-		goto yy50;
-yy260:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy361;
-		goto yy50;
-yy261:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy362;
-		goto yy50;
-yy262:
-		yych = *++lexer->cursor;
-		if (yych == 'c') goto yy363;
-		goto yy50;
-yy263:
-		yych = *++lexer->cursor;
-		if (yych == 'g') goto yy364;
-		if (yych == 'l') goto yy365;
-		goto yy50;
-yy264:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy366;
-		goto yy50;
-yy265:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy368;
-		goto yy50;
-yy266:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy370;
-		goto yy50;
-yy267:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 250 "src/ast-lexer.cc"
-		{ RETURN(THEN); }
-#line 2348 "src/prebuilt/ast-lexer-gen.cc"
-yy269:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 423 "src/ast-lexer.cc"
-		{ RETURN(TYPE); }
-#line 2356 "src/prebuilt/ast-lexer-gen.cc"
-yy271:
-		yych = *++lexer->cursor;
-		if (yych == 'a') goto yy371;
-		goto yy50;
-yy272:
-		yych = *++lexer->cursor;
-		if (yych <= '/') goto yy50;
-		if (yych >= ':') goto yy50;
-yy273:
-		++lexer->cursor;
-		if (lexer->limit <= lexer->cursor) FILL(1);
-		yych = *lexer->cursor;
-		if (yych <= ':') {
-			if (yych <= ')') {
-				if (yych <= '!') {
-					if (yych >= '!') goto yy49;
-				} else {
-					if (yych <= '"') goto yy275;
-					if (yych <= '\'') goto yy49;
-				}
-			} else {
-				if (yych <= ',') {
-					if (yych <= '+') goto yy49;
-				} else {
-					if (yych <= '/') goto yy49;
-					if (yych <= '9') goto yy273;
-					goto yy49;
-				}
-			}
-		} else {
-			if (yych <= ']') {
-				if (yych <= 'Z') {
-					if (yych >= '<') goto yy49;
-				} else {
-					if (yych == '\\') goto yy49;
-				}
-			} else {
-				if (yych <= '|') {
-					if (yych != '{') goto yy49;
-				} else {
-					if (yych == '~') goto yy49;
-				}
-			}
-		}
-yy275:
-#line 224 "src/ast-lexer.cc"
-		{ LITERAL(Hexfloat); RETURN(FLOAT); }
-#line 2404 "src/prebuilt/ast-lexer-gen.cc"
-yy276:
-		yych = *++lexer->cursor;
-		if (yych == '=') goto yy372;
-		goto yy50;
-yy277:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy373;
-		goto yy50;
-yy278:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy374;
-		goto yy50;
-yy279:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 247 "src/ast-lexer.cc"
-		{ RETURN(BLOCK); }
-#line 2424 "src/prebuilt/ast-lexer-gen.cc"
-yy281:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 254 "src/ast-lexer.cc"
-		{ RETURN(BR_IF); }
-#line 2432 "src/prebuilt/ast-lexer-gen.cc"
-yy283:
-		yych = *++lexer->cursor;
-		if (yych == 'b') goto yy375;
-		goto yy50;
-yy284:
-		yych = *++lexer->cursor;
-		if (yych == 'i') goto yy376;
-		goto yy50;
-yy285:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy377;
-		goto yy50;
-yy286:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy378;
-		goto yy50;
-yy287:
-		yych = *++lexer->cursor;
-		if (yych == 'b') goto yy380;
-		if (yych == 'd') goto yy381;
-		goto yy50;
-yy288:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy382;
-		if (yych == 'o') goto yy383;
-		goto yy50;
-yy289:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy384;
-		if (yych == 'i') goto yy385;
-		goto yy50;
-yy290:
-		yych = *++lexer->cursor;
-		if (yych == 'q') goto yy386;
-		goto yy50;
-yy291:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy388;
-		goto yy50;
-yy292:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy389;
-		if (yych == 't') goto yy391;
-		goto yy50;
-yy293:
-		yych = *++lexer->cursor;
-		if (yych <= 'n') {
-			if (yych == 'e') goto yy393;
-			goto yy50;
-		} else {
-			if (yych <= 'o') goto yy395;
-			if (yych == 't') goto yy396;
-			goto yy50;
-		}
-yy294:
-		yych = *++lexer->cursor;
-		if (yych <= 'h') {
-			if (yych == 'a') goto yy398;
-			goto yy50;
-		} else {
-			if (yych <= 'i') goto yy399;
-			if (yych == 'u') goto yy400;
-			goto yy50;
-		}
-yy295:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy401;
-		goto yy50;
-yy296:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy403;
-		goto yy50;
-yy297:
-		yych = *++lexer->cursor;
-		if (yych <= 's') {
-			if (yych == 'q') goto yy404;
-			goto yy50;
-		} else {
-			if (yych <= 't') goto yy405;
-			if (yych <= 'u') goto yy406;
-			goto yy50;
-		}
-yy298:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy407;
-		goto yy50;
-yy299:
-		yych = *++lexer->cursor;
-		if (yych == 'b') goto yy408;
-		if (yych == 'd') goto yy409;
-		goto yy50;
-yy300:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy410;
-		if (yych == 'o') goto yy411;
-		goto yy50;
-yy301:
-		yych = *++lexer->cursor;
-		if (yych == 'i') goto yy412;
-		goto yy50;
-yy302:
-		yych = *++lexer->cursor;
-		if (yych == 'q') goto yy413;
-		goto yy50;
-yy303:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy415;
-		goto yy50;
-yy304:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy416;
-		if (yych == 't') goto yy418;
-		goto yy50;
-yy305:
-		yych = *++lexer->cursor;
-		if (yych <= 'n') {
-			if (yych == 'e') goto yy420;
-			goto yy50;
-		} else {
-			if (yych <= 'o') goto yy422;
-			if (yych == 't') goto yy423;
-			goto yy50;
-		}
-yy306:
-		yych = *++lexer->cursor;
-		if (yych <= 'h') {
-			if (yych == 'a') goto yy425;
-			goto yy50;
-		} else {
-			if (yych <= 'i') goto yy426;
-			if (yych == 'u') goto yy427;
-			goto yy50;
-		}
-yy307:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy428;
-		goto yy50;
-yy308:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy430;
-		goto yy50;
-yy309:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy431;
-		goto yy50;
-yy310:
-		yych = *++lexer->cursor;
-		if (yych <= 's') {
-			if (yych == 'q') goto yy432;
-			goto yy50;
-		} else {
-			if (yych <= 't') goto yy433;
-			if (yych <= 'u') goto yy434;
-			goto yy50;
-		}
-yy311:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy435;
-		goto yy50;
-yy312:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy436;
-		goto yy50;
-yy313:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy437;
-		goto yy50;
-yy314:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy438;
-		goto yy50;
-yy315:
-		yych = *++lexer->cursor;
-		if (yych == 'm') goto yy440;
-		goto yy50;
-yy316:
-		yych = *++lexer->cursor;
-		if (yych == 'd') goto yy441;
-		if (yych == 'n') goto yy442;
-		goto yy50;
-yy317:
-		yych = *++lexer->cursor;
-		if (yych <= 'n') {
-			if (yych == 'l') goto yy443;
-			goto yy50;
-		} else {
-			if (yych <= 'o') goto yy444;
-			if (yych == 't') goto yy445;
-			goto yy50;
-		}
-yy318:
-		yych = *++lexer->cursor;
-		if (yych == 'i') goto yy446;
-		goto yy50;
-yy319:
-		yych = *++lexer->cursor;
-		if (yych == 'q') goto yy447;
-		goto yy50;
-yy320:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy449;
-		if (yych == 't') goto yy450;
-		goto yy50;
-yy321:
-		yych = *++lexer->cursor;
-		if (yych <= 'n') {
-			if (yych == 'e') goto yy451;
-			goto yy50;
-		} else {
-			if (yych <= 'o') goto yy452;
-			if (yych == 't') goto yy453;
-			goto yy50;
-		}
-yy322:
-		yych = *++lexer->cursor;
-		if (yych == 'u') goto yy454;
-		goto yy50;
-yy323:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy455;
-		goto yy50;
-yy324:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy457;
-		goto yy50;
-yy325:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy459;
-		goto yy50;
-yy326:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy460;
-		if (yych == 'o') goto yy461;
-		goto yy50;
-yy327:
-		yych = *++lexer->cursor;
-		if (yych <= 's') {
-			if (yych == 'h') goto yy462;
-			goto yy50;
-		} else {
-			if (yych <= 't') goto yy463;
-			if (yych <= 'u') goto yy464;
-			goto yy50;
-		}
-yy328:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy465;
-		goto yy50;
-yy329:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy466;
-		goto yy50;
-yy330:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy467;
-		goto yy50;
-yy331:
-		yych = *++lexer->cursor;
-		if (yych == 'd') goto yy468;
-		if (yych == 'n') goto yy469;
-		goto yy50;
-yy332:
-		yych = *++lexer->cursor;
-		if (yych <= 'n') {
-			if (yych == 'l') goto yy470;
-			goto yy50;
-		} else {
-			if (yych <= 'o') goto yy471;
-			if (yych == 't') goto yy472;
-			goto yy50;
-		}
-yy333:
-		yych = *++lexer->cursor;
-		if (yych == 'i') goto yy473;
-		goto yy50;
-yy334:
-		yych = *++lexer->cursor;
-		if (yych == 'q') goto yy474;
-		if (yych == 'x') goto yy476;
-		goto yy50;
-yy335:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy477;
-		if (yych == 't') goto yy478;
-		goto yy50;
-yy336:
-		yych = *++lexer->cursor;
-		if (yych <= 'n') {
-			if (yych == 'e') goto yy479;
-			goto yy50;
-		} else {
-			if (yych <= 'o') goto yy480;
-			if (yych == 't') goto yy481;
-			goto yy50;
-		}
-yy337:
-		yych = *++lexer->cursor;
-		if (yych == 'u') goto yy482;
-		goto yy50;
-yy338:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy483;
-		goto yy50;
-yy339:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy485;
-		goto yy50;
-yy340:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy487;
-		goto yy50;
-yy341:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy488;
-		if (yych == 'o') goto yy489;
-		goto yy50;
-yy342:
-		yych = *++lexer->cursor;
-		if (yych <= 's') {
-			if (yych == 'h') goto yy490;
-			goto yy50;
-		} else {
-			if (yych <= 't') goto yy491;
-			if (yych <= 'u') goto yy492;
-			goto yy50;
-		}
-yy343:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy493;
-		goto yy50;
-yy344:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy494;
-		goto yy50;
-yy345:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy495;
-		goto yy50;
-yy346:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy496;
-		goto yy50;
-yy347:
-		yych = *++lexer->cursor;
-		if (yych == 'i') goto yy498;
-		goto yy50;
-yy348:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 451 "src/ast-lexer.cc"
-		{ RETURN(INPUT); }
-#line 2786 "src/prebuilt/ast-lexer-gen.cc"
-yy350:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy499;
-		goto yy50;
-yy351:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 427 "src/ast-lexer.cc"
-		{ RETURN(LOCAL); }
-#line 2798 "src/prebuilt/ast-lexer-gen.cc"
-yy353:
-		yych = *++lexer->cursor;
-		if (yych == 'y') goto yy501;
-		goto yy50;
-yy354:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy503;
-		goto yy50;
-yy355:
-		yych = *++lexer->cursor;
-		if (yych == 'x') goto yy505;
-		goto yy50;
-yy356:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy506;
-		goto yy50;
-yy357:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy508;
-		goto yy50;
-yy358:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 425 "src/ast-lexer.cc"
-		{ RETURN(PARAM); }
-#line 2826 "src/prebuilt/ast-lexer-gen.cc"
-yy360:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy510;
-		goto yy50;
-yy361:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy511;
-		goto yy50;
-yy362:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy513;
-		goto yy50;
-yy363:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy515;
-		goto yy50;
-yy364:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy517;
-		goto yy50;
-yy365:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy518;
-		goto yy50;
-yy366:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 432 "src/ast-lexer.cc"
-		{ RETURN(START); }
-#line 2858 "src/prebuilt/ast-lexer-gen.cc"
-yy368:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 430 "src/ast-lexer.cc"
-		{ RETURN(TABLE); }
-#line 2866 "src/prebuilt/ast-lexer-gen.cc"
-yy370:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy519;
-		goto yy50;
-yy371:
-		yych = *++lexer->cursor;
-		if (yych == 'c') goto yy520;
-		goto yy50;
-yy372:
-		yych = *++lexer->cursor;
-		if (yych <= '/') goto yy50;
-		if (yych <= '0') goto yy521;
-		if (yych <= '9') goto yy523;
-		goto yy50;
-yy373:
-		yych = *++lexer->cursor;
-		if (yych == 'c') goto yy525;
-		goto yy50;
-yy374:
-		yych = *++lexer->cursor;
-		if (yych == '_') goto yy527;
-		goto yy50;
-yy375:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy528;
-		goto yy50;
-yy376:
-		yych = *++lexer->cursor;
-		if (yych <= 'l') goto yy50;
-		if (yych <= 'm') goto yy529;
-		if (yych <= 'n') goto yy530;
-		goto yy50;
-yy377:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy531;
-		goto yy50;
-yy378:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 437 "src/ast-lexer.cc"
-		{ RETURN(EXPORT); }
-#line 2910 "src/prebuilt/ast-lexer-gen.cc"
-yy380:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy532;
-		goto yy50;
-yy381:
-		yych = *++lexer->cursor;
-		if (yych == 'd') goto yy534;
-		goto yy50;
-yy382:
-		yych = *++lexer->cursor;
-		if (yych == 'i') goto yy536;
-		goto yy50;
-yy383:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy537;
-		if (yych == 'p') goto yy538;
-		goto yy50;
-yy384:
-		yych = *++lexer->cursor;
-		if (yych == 'm') goto yy539;
-		goto yy50;
-yy385:
-		yych = *++lexer->cursor;
-		if (yych == 'v') goto yy540;
-		goto yy50;
-yy386:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 382 "src/ast-lexer.cc"
-		{ OPCODE(F32Eq); RETURN(COMPARE); }
-#line 2943 "src/prebuilt/ast-lexer-gen.cc"
-yy388:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy542;
-		goto yy50;
-yy389:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 392 "src/ast-lexer.cc"
-		{ OPCODE(F32Ge); RETURN(COMPARE); }
-#line 2955 "src/prebuilt/ast-lexer-gen.cc"
-yy391:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 390 "src/ast-lexer.cc"
-		{ OPCODE(F32Gt); RETURN(COMPARE); }
-#line 2963 "src/prebuilt/ast-lexer-gen.cc"
-yy393:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 388 "src/ast-lexer.cc"
-		{ OPCODE(F32Le); RETURN(COMPARE); }
-#line 2971 "src/prebuilt/ast-lexer-gen.cc"
-yy395:
-		yych = *++lexer->cursor;
-		if (yych == 'a') goto yy543;
-		goto yy50;
-yy396:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 386 "src/ast-lexer.cc"
-		{ OPCODE(F32Lt); RETURN(COMPARE); }
-#line 2983 "src/prebuilt/ast-lexer-gen.cc"
-yy398:
-		yych = *++lexer->cursor;
-		if (yych == 'x') goto yy544;
-		goto yy50;
-yy399:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy546;
-		goto yy50;
-yy400:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy548;
-		goto yy50;
-yy401:
-		++lexer->cursor;
-		if ((yych = *lexer->cursor) <= '[') {
-			if (yych <= ')') {
-				if (yych <= '!') {
-					if (yych >= '!') goto yy49;
-				} else {
-					if (yych <= '"') goto yy402;
-					if (yych <= '\'') goto yy49;
-				}
-			} else {
-				if (yych <= ':') {
-					if (yych != ',') goto yy49;
-				} else {
-					if (yych <= ';') goto yy402;
-					if (yych <= 'Z') goto yy49;
-				}
-			}
-		} else {
-			if (yych <= 'g') {
-				if (yych <= '`') {
-					if (yych != ']') goto yy49;
-				} else {
-					if (yych <= 'a') goto yy550;
-					if (yych <= 'f') goto yy49;
-					goto yy551;
-				}
-			} else {
-				if (yych <= '|') {
-					if (yych != '{') goto yy49;
-				} else {
-					if (yych == '~') goto yy49;
-				}
-			}
-		}
-yy402:
-#line 384 "src/ast-lexer.cc"
-		{ OPCODE(F32Ne); RETURN(COMPARE); }
-#line 3034 "src/prebuilt/ast-lexer-gen.cc"
-yy403:
-		yych = *++lexer->cursor;
-		if (yych == 'i') goto yy553;
-		goto yy50;
-yy404:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy554;
-		goto yy50;
-yy405:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy555;
-		goto yy50;
-yy406:
-		yych = *++lexer->cursor;
-		if (yych == 'b') goto yy556;
-		goto yy50;
-yy407:
-		yych = *++lexer->cursor;
-		if (yych == 'u') goto yy558;
-		goto yy50;
-yy408:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy559;
-		goto yy50;
-yy409:
-		yych = *++lexer->cursor;
-		if (yych == 'd') goto yy561;
-		goto yy50;
-yy410:
-		yych = *++lexer->cursor;
-		if (yych == 'i') goto yy563;
-		goto yy50;
-yy411:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy564;
-		if (yych == 'p') goto yy565;
-		goto yy50;
-yy412:
-		yych = *++lexer->cursor;
-		if (yych == 'v') goto yy566;
-		goto yy50;
-yy413:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 383 "src/ast-lexer.cc"
-		{ OPCODE(F64Eq); RETURN(COMPARE); }
-#line 3083 "src/prebuilt/ast-lexer-gen.cc"
-yy415:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy568;
-		goto yy50;
-yy416:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 393 "src/ast-lexer.cc"
-		{ OPCODE(F64Ge); RETURN(COMPARE); }
-#line 3095 "src/prebuilt/ast-lexer-gen.cc"
-yy418:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 391 "src/ast-lexer.cc"
-		{ OPCODE(F64Gt); RETURN(COMPARE); }
-#line 3103 "src/prebuilt/ast-lexer-gen.cc"
-yy420:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 389 "src/ast-lexer.cc"
-		{ OPCODE(F64Le); RETURN(COMPARE); }
-#line 3111 "src/prebuilt/ast-lexer-gen.cc"
-yy422:
-		yych = *++lexer->cursor;
-		if (yych == 'a') goto yy569;
-		goto yy50;
-yy423:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 387 "src/ast-lexer.cc"
-		{ OPCODE(F64Lt); RETURN(COMPARE); }
-#line 3123 "src/prebuilt/ast-lexer-gen.cc"
-yy425:
-		yych = *++lexer->cursor;
-		if (yych == 'x') goto yy570;
-		goto yy50;
-yy426:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy572;
-		goto yy50;
-yy427:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy574;
-		goto yy50;
-yy428:
-		++lexer->cursor;
-		if ((yych = *lexer->cursor) <= '[') {
-			if (yych <= ')') {
-				if (yych <= '!') {
-					if (yych >= '!') goto yy49;
-				} else {
-					if (yych <= '"') goto yy429;
-					if (yych <= '\'') goto yy49;
-				}
-			} else {
-				if (yych <= ':') {
-					if (yych != ',') goto yy49;
-				} else {
-					if (yych <= ';') goto yy429;
-					if (yych <= 'Z') goto yy49;
-				}
-			}
-		} else {
-			if (yych <= 'g') {
-				if (yych <= '`') {
-					if (yych != ']') goto yy49;
-				} else {
-					if (yych <= 'a') goto yy576;
-					if (yych <= 'f') goto yy49;
-					goto yy577;
-				}
-			} else {
-				if (yych <= '|') {
-					if (yych != '{') goto yy49;
-				} else {
-					if (yych == '~') goto yy49;
-				}
-			}
-		}
-yy429:
-#line 385 "src/ast-lexer.cc"
-		{ OPCODE(F64Ne); RETURN(COMPARE); }
-#line 3174 "src/prebuilt/ast-lexer-gen.cc"
-yy430:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy579;
-		goto yy50;
-yy431:
-		yych = *++lexer->cursor;
-		if (yych == 'i') goto yy580;
-		goto yy50;
-yy432:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy581;
-		goto yy50;
-yy433:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy582;
-		goto yy50;
-yy434:
-		yych = *++lexer->cursor;
-		if (yych == 'b') goto yy583;
-		goto yy50;
-yy435:
-		yych = *++lexer->cursor;
-		if (yych == 'u') goto yy585;
-		goto yy50;
-yy436:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy586;
-		goto yy50;
-yy437:
-		yych = *++lexer->cursor;
-		if (yych == 'c') goto yy587;
-		goto yy50;
-yy438:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 428 "src/ast-lexer.cc"
-		{ RETURN(GLOBAL); }
-#line 3214 "src/prebuilt/ast-lexer-gen.cc"
-yy440:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy588;
-		goto yy50;
-yy441:
-		yych = *++lexer->cursor;
-		if (yych == 'd') goto yy589;
-		goto yy50;
-yy442:
-		yych = *++lexer->cursor;
-		if (yych == 'd') goto yy591;
-		goto yy50;
-yy443:
-		yych = *++lexer->cursor;
-		if (yych == 'z') goto yy593;
-		goto yy50;
-yy444:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy595;
-		goto yy50;
-yy445:
-		yych = *++lexer->cursor;
-		if (yych == 'z') goto yy596;
-		goto yy50;
-yy446:
-		yych = *++lexer->cursor;
-		if (yych == 'v') goto yy598;
-		goto yy50;
-yy447:
-		++lexer->cursor;
-		if ((yych = *lexer->cursor) <= 'Z') {
-			if (yych <= ')') {
-				if (yych <= '!') {
-					if (yych >= '!') goto yy49;
-				} else {
-					if (yych <= '"') goto yy448;
-					if (yych <= '\'') goto yy49;
-				}
-			} else {
-				if (yych <= ',') {
-					if (yych <= '+') goto yy49;
-				} else {
-					if (yych != ';') goto yy49;
-				}
-			}
-		} else {
-			if (yych <= 'z') {
-				if (yych <= '\\') {
-					if (yych >= '\\') goto yy49;
-				} else {
-					if (yych <= ']') goto yy448;
-					if (yych <= 'y') goto yy49;
-					goto yy599;
-				}
-			} else {
-				if (yych <= '|') {
-					if (yych >= '|') goto yy49;
-				} else {
-					if (yych == '~') goto yy49;
-				}
-			}
-		}
-yy448:
-#line 362 "src/ast-lexer.cc"
-		{ OPCODE(I32Eq); RETURN(COMPARE); }
-#line 3280 "src/prebuilt/ast-lexer-gen.cc"
-yy449:
-		yych = *++lexer->cursor;
-		if (yych == '_') goto yy601;
-		goto yy50;
-yy450:
-		yych = *++lexer->cursor;
-		if (yych == '_') goto yy602;
-		goto yy50;
-yy451:
-		yych = *++lexer->cursor;
-		if (yych == '_') goto yy603;
-		goto yy50;
-yy452:
-		yych = *++lexer->cursor;
-		if (yych == 'a') goto yy604;
-		goto yy50;
-yy453:
-		yych = *++lexer->cursor;
-		if (yych == '_') goto yy605;
-		goto yy50;
-yy454:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy606;
-		goto yy50;
-yy455:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 364 "src/ast-lexer.cc"
-		{ OPCODE(I32Ne); RETURN(COMPARE); }
-#line 3312 "src/prebuilt/ast-lexer-gen.cc"
-yy457:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 334 "src/ast-lexer.cc"
-		{ OPCODE(I32Or); RETURN(BINARY); }
-#line 3320 "src/prebuilt/ast-lexer-gen.cc"
-yy459:
-		yych = *++lexer->cursor;
-		if (yych == 'p') goto yy608;
-		goto yy50;
-yy460:
-		yych = *++lexer->cursor;
-		if (yych == 'i') goto yy609;
-		if (yych == 'm') goto yy610;
-		goto yy50;
-yy461:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy611;
-		goto yy50;
-yy462:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy612;
-		if (yych == 'r') goto yy614;
-		goto yy50;
-yy463:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy615;
-		goto yy50;
-yy464:
-		yych = *++lexer->cursor;
-		if (yych == 'b') goto yy616;
-		goto yy50;
-yy465:
-		yych = *++lexer->cursor;
-		if (yych == 'u') goto yy618;
-		goto yy50;
-yy466:
-		yych = *++lexer->cursor;
-		if (yych == 'a') goto yy619;
-		goto yy50;
-yy467:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy620;
-		goto yy50;
-yy468:
-		yych = *++lexer->cursor;
-		if (yych == 'd') goto yy622;
-		goto yy50;
-yy469:
-		yych = *++lexer->cursor;
-		if (yych == 'd') goto yy624;
-		goto yy50;
-yy470:
-		yych = *++lexer->cursor;
-		if (yych == 'z') goto yy626;
-		goto yy50;
-yy471:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy628;
-		goto yy50;
-yy472:
-		yych = *++lexer->cursor;
-		if (yych == 'z') goto yy629;
-		goto yy50;
-yy473:
-		yych = *++lexer->cursor;
-		if (yych == 'v') goto yy631;
-		goto yy50;
-yy474:
-		++lexer->cursor;
-		if ((yych = *lexer->cursor) <= 'Z') {
-			if (yych <= ')') {
-				if (yych <= '!') {
-					if (yych >= '!') goto yy49;
-				} else {
-					if (yych <= '"') goto yy475;
-					if (yych <= '\'') goto yy49;
-				}
-			} else {
-				if (yych <= ',') {
-					if (yych <= '+') goto yy49;
-				} else {
-					if (yych != ';') goto yy49;
-				}
-			}
-		} else {
-			if (yych <= 'z') {
-				if (yych <= '\\') {
-					if (yych >= '\\') goto yy49;
-				} else {
-					if (yych <= ']') goto yy475;
-					if (yych <= 'y') goto yy49;
-					goto yy632;
-				}
-			} else {
-				if (yych <= '|') {
-					if (yych >= '|') goto yy49;
-				} else {
-					if (yych == '~') goto yy49;
-				}
-			}
-		}
-yy475:
-#line 363 "src/ast-lexer.cc"
-		{ OPCODE(I64Eq); RETURN(COMPARE); }
-#line 3420 "src/prebuilt/ast-lexer-gen.cc"
-yy476:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy634;
-		goto yy50;
-yy477:
-		yych = *++lexer->cursor;
-		if (yych == '_') goto yy635;
-		goto yy50;
-yy478:
-		yych = *++lexer->cursor;
-		if (yych == '_') goto yy636;
-		goto yy50;
-yy479:
-		yych = *++lexer->cursor;
-		if (yych == '_') goto yy637;
-		goto yy50;
-yy480:
-		yych = *++lexer->cursor;
-		if (yych == 'a') goto yy638;
-		goto yy50;
-yy481:
-		yych = *++lexer->cursor;
-		if (yych == '_') goto yy639;
-		goto yy50;
-yy482:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy640;
-		goto yy50;
-yy483:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 365 "src/ast-lexer.cc"
-		{ OPCODE(I64Ne); RETURN(COMPARE); }
-#line 3456 "src/prebuilt/ast-lexer-gen.cc"
-yy485:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 335 "src/ast-lexer.cc"
-		{ OPCODE(I64Or); RETURN(BINARY); }
-#line 3464 "src/prebuilt/ast-lexer-gen.cc"
-yy487:
-		yych = *++lexer->cursor;
-		if (yych == 'p') goto yy642;
-		goto yy50;
-yy488:
-		yych = *++lexer->cursor;
-		if (yych == 'i') goto yy643;
-		if (yych == 'm') goto yy644;
-		goto yy50;
-yy489:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy645;
-		goto yy50;
-yy490:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy646;
-		if (yych == 'r') goto yy648;
-		goto yy50;
-yy491:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy649;
-		goto yy50;
-yy492:
-		yych = *++lexer->cursor;
-		if (yych == 'b') goto yy650;
-		goto yy50;
-yy493:
-		yych = *++lexer->cursor;
-		if (yych == 'u') goto yy652;
-		goto yy50;
-yy494:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy653;
-		goto yy50;
-yy495:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy655;
-		goto yy50;
-yy496:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 436 "src/ast-lexer.cc"
-		{ RETURN(IMPORT); }
-#line 3510 "src/prebuilt/ast-lexer-gen.cc"
-yy498:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy657;
-		goto yy50;
-yy499:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 439 "src/ast-lexer.cc"
-		{ RETURN(INVOKE); }
-#line 3522 "src/prebuilt/ast-lexer-gen.cc"
-yy501:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 431 "src/ast-lexer.cc"
-		{ RETURN(MEMORY); }
-#line 3530 "src/prebuilt/ast-lexer-gen.cc"
-yy503:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 429 "src/ast-lexer.cc"
-		{ RETURN(MODULE); }
-#line 3538 "src/prebuilt/ast-lexer-gen.cc"
-yy505:
-		yych = *++lexer->cursor;
-		if (yych <= '@') {
-			if (yych <= '/') goto yy50;
-			if (yych <= '9') goto yy658;
-			goto yy50;
-		} else {
-			if (yych <= 'F') goto yy658;
-			if (yych <= '`') goto yy50;
-			if (yych <= 'f') goto yy658;
-			goto yy50;
-		}
-yy506:
-		++lexer->cursor;
-		if ((yych = *lexer->cursor) <= '<') {
-			if (yych <= ')') {
-				if (yych <= '!') {
-					if (yych >= '!') goto yy49;
-				} else {
-					if (yych <= '"') goto yy507;
-					if (yych <= '\'') goto yy49;
-				}
-			} else {
-				if (yych <= ',') {
-					if (yych <= '+') goto yy49;
-				} else {
-					if (yych != ';') goto yy49;
-				}
-			}
-		} else {
-			if (yych <= ']') {
-				if (yych <= 'Z') {
-					if (yych <= '=') goto yy660;
-					goto yy49;
-				} else {
-					if (yych == '\\') goto yy49;
-				}
-			} else {
-				if (yych <= '|') {
-					if (yych != '{') goto yy49;
-				} else {
-					if (yych == '~') goto yy49;
-				}
-			}
-		}
-yy507:
-#line 435 "src/ast-lexer.cc"
-		{ RETURN(OFFSET); }
-#line 3587 "src/prebuilt/ast-lexer-gen.cc"
-yy508:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 452 "src/ast-lexer.cc"
-		{ RETURN(OUTPUT); }
-#line 3595 "src/prebuilt/ast-lexer-gen.cc"
-yy510:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy661;
-		goto yy50;
-yy511:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 426 "src/ast-lexer.cc"
-		{ RETURN(RESULT); }
-#line 3607 "src/prebuilt/ast-lexer-gen.cc"
-yy513:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 261 "src/ast-lexer.cc"
-		{ RETURN(RETURN); }
-#line 3615 "src/prebuilt/ast-lexer-gen.cc"
-yy515:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 419 "src/ast-lexer.cc"
-		{ RETURN(SELECT); }
-#line 3623 "src/prebuilt/ast-lexer-gen.cc"
-yy517:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy662;
-		goto yy50;
-yy518:
-		yych = *++lexer->cursor;
-		if (yych == 'c') goto yy663;
-		goto yy50;
-yy519:
-		yych = *++lexer->cursor;
-		if (yych == 'c') goto yy664;
-		goto yy50;
-yy520:
-		yych = *++lexer->cursor;
-		if (yych == 'h') goto yy665;
-		goto yy50;
-yy521:
-		++lexer->cursor;
-		if ((yych = *lexer->cursor) <= ';') {
-			if (yych <= ')') {
-				if (yych <= '!') {
-					if (yych >= '!') goto yy49;
-				} else {
-					if (yych <= '"') goto yy522;
-					if (yych <= '\'') goto yy49;
-				}
-			} else {
-				if (yych <= '/') {
-					if (yych != ',') goto yy49;
-				} else {
-					if (yych <= '9') goto yy523;
-					if (yych <= ':') goto yy49;
-				}
-			}
-		} else {
-			if (yych <= 'x') {
-				if (yych <= '\\') {
-					if (yych != '[') goto yy49;
-				} else {
-					if (yych <= ']') goto yy522;
-					if (yych <= 'w') goto yy49;
-					goto yy666;
-				}
-			} else {
-				if (yych <= '|') {
-					if (yych != '{') goto yy49;
-				} else {
-					if (yych == '~') goto yy49;
-				}
-			}
-		}
-yy522:
-#line 291 "src/ast-lexer.cc"
-		{ TEXT_AT(6); RETURN(ALIGN_EQ_NAT); }
-#line 3678 "src/prebuilt/ast-lexer-gen.cc"
-yy523:
-		++lexer->cursor;
-		if (lexer->limit <= lexer->cursor) FILL(1);
-		yych = *lexer->cursor;
-		if (yych <= ':') {
-			if (yych <= ')') {
-				if (yych <= '!') {
-					if (yych <= ' ') goto yy522;
-					goto yy49;
-				} else {
-					if (yych <= '"') goto yy522;
-					if (yych <= '\'') goto yy49;
-					goto yy522;
-				}
-			} else {
-				if (yych <= ',') {
-					if (yych <= '+') goto yy49;
-					goto yy522;
-				} else {
-					if (yych <= '/') goto yy49;
-					if (yych <= '9') goto yy523;
-					goto yy49;
-				}
-			}
-		} else {
-			if (yych <= ']') {
-				if (yych <= 'Z') {
-					if (yych <= ';') goto yy522;
-					goto yy49;
-				} else {
-					if (yych == '\\') goto yy49;
-					goto yy522;
-				}
-			} else {
-				if (yych <= '|') {
-					if (yych == '{') goto yy522;
-					goto yy49;
-				} else {
-					if (yych == '~') goto yy49;
-					goto yy522;
-				}
-			}
-		}
-yy525:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 244 "src/ast-lexer.cc"
-		{ RETURN(ANYFUNC); }
-#line 3729 "src/prebuilt/ast-lexer-gen.cc"
-yy527:
-		yych = *++lexer->cursor;
-		switch (yych) {
-		case 'e':	goto yy667;
-		case 'i':	goto yy668;
-		case 'm':	goto yy669;
-		case 'r':	goto yy670;
-		case 't':	goto yy671;
-		case 'u':	goto yy672;
-		default:	goto yy50;
-		}
-yy528:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy673;
-		goto yy50;
-yy529:
-		yych = *++lexer->cursor;
-		if (yych == 'p') goto yy675;
-		goto yy50;
-yy530:
-		yych = *++lexer->cursor;
-		if (yych == 'd') goto yy676;
-		goto yy50;
-yy531:
-		yych = *++lexer->cursor;
-		if (yych == '_') goto yy677;
-		goto yy50;
-yy532:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 306 "src/ast-lexer.cc"
-		{ OPCODE(F32Abs); RETURN(UNARY); }
-#line 3764 "src/prebuilt/ast-lexer-gen.cc"
-yy534:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 348 "src/ast-lexer.cc"
-		{ OPCODE(F32Add); RETURN(BINARY); }
-#line 3772 "src/prebuilt/ast-lexer-gen.cc"
-yy536:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy678;
-		goto yy50;
-yy537:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy680;
-		if (yych == 'v') goto yy681;
-		goto yy50;
-yy538:
-		yych = *++lexer->cursor;
-		if (yych == 'y') goto yy682;
-		goto yy50;
-yy539:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy683;
-		goto yy50;
-yy540:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 354 "src/ast-lexer.cc"
-		{ OPCODE(F32Div); RETURN(BINARY); }
-#line 3797 "src/prebuilt/ast-lexer-gen.cc"
-yy542:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy684;
-		goto yy50;
-yy543:
-		yych = *++lexer->cursor;
-		if (yych == 'd') goto yy685;
-		goto yy50;
-yy544:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 358 "src/ast-lexer.cc"
-		{ OPCODE(F32Max); RETURN(BINARY); }
-#line 3813 "src/prebuilt/ast-lexer-gen.cc"
-yy546:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 356 "src/ast-lexer.cc"
-		{ OPCODE(F32Min); RETURN(BINARY); }
-#line 3821 "src/prebuilt/ast-lexer-gen.cc"
-yy548:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 352 "src/ast-lexer.cc"
-		{ OPCODE(F32Mul); RETURN(BINARY); }
-#line 3829 "src/prebuilt/ast-lexer-gen.cc"
-yy550:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy687;
-		goto yy50;
-yy551:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 304 "src/ast-lexer.cc"
-		{ OPCODE(F32Neg); RETURN(UNARY); }
-#line 3841 "src/prebuilt/ast-lexer-gen.cc"
-yy553:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy688;
-		goto yy50;
-yy554:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy689;
-		goto yy50;
-yy555:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy691;
-		goto yy50;
-yy556:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 350 "src/ast-lexer.cc"
-		{ OPCODE(F32Sub); RETURN(BINARY); }
-#line 3861 "src/prebuilt/ast-lexer-gen.cc"
-yy558:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy692;
-		goto yy50;
-yy559:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 307 "src/ast-lexer.cc"
-		{ OPCODE(F64Abs); RETURN(UNARY); }
-#line 3873 "src/prebuilt/ast-lexer-gen.cc"
-yy561:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 349 "src/ast-lexer.cc"
-		{ OPCODE(F64Add); RETURN(BINARY); }
-#line 3881 "src/prebuilt/ast-lexer-gen.cc"
-yy563:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy693;
-		goto yy50;
-yy564:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy695;
-		if (yych == 'v') goto yy696;
-		goto yy50;
-yy565:
-		yych = *++lexer->cursor;
-		if (yych == 'y') goto yy697;
-		goto yy50;
-yy566:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 355 "src/ast-lexer.cc"
-		{ OPCODE(F64Div); RETURN(BINARY); }
-#line 3902 "src/prebuilt/ast-lexer-gen.cc"
-yy568:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy698;
-		goto yy50;
-yy569:
-		yych = *++lexer->cursor;
-		if (yych == 'd') goto yy699;
-		goto yy50;
-yy570:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 359 "src/ast-lexer.cc"
-		{ OPCODE(F64Max); RETURN(BINARY); }
-#line 3918 "src/prebuilt/ast-lexer-gen.cc"
-yy572:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 357 "src/ast-lexer.cc"
-		{ OPCODE(F64Min); RETURN(BINARY); }
-#line 3926 "src/prebuilt/ast-lexer-gen.cc"
-yy574:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 353 "src/ast-lexer.cc"
-		{ OPCODE(F64Mul); RETURN(BINARY); }
-#line 3934 "src/prebuilt/ast-lexer-gen.cc"
-yy576:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy701;
-		goto yy50;
-yy577:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 305 "src/ast-lexer.cc"
-		{ OPCODE(F64Neg); RETURN(UNARY); }
-#line 3946 "src/prebuilt/ast-lexer-gen.cc"
-yy579:
-		yych = *++lexer->cursor;
-		if (yych == 'm') goto yy702;
-		goto yy50;
-yy580:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy703;
-		goto yy50;
-yy581:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy704;
-		goto yy50;
-yy582:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy706;
-		goto yy50;
-yy583:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 351 "src/ast-lexer.cc"
-		{ OPCODE(F64Sub); RETURN(BINARY); }
-#line 3970 "src/prebuilt/ast-lexer-gen.cc"
-yy585:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy707;
-		goto yy50;
-yy586:
-		yych = *++lexer->cursor;
-		if (yych == 'b') goto yy708;
-		goto yy50;
-yy587:
-		yych = *++lexer->cursor;
-		if (yych == 'a') goto yy709;
-		goto yy50;
-yy588:
-		yych = *++lexer->cursor;
-		if (yych == 'm') goto yy710;
-		goto yy50;
-yy589:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 318 "src/ast-lexer.cc"
-		{ OPCODE(I32Add); RETURN(BINARY); }
-#line 3994 "src/prebuilt/ast-lexer-gen.cc"
-yy591:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 332 "src/ast-lexer.cc"
-		{ OPCODE(I32And); RETURN(BINARY); }
-#line 4002 "src/prebuilt/ast-lexer-gen.cc"
-yy593:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 298 "src/ast-lexer.cc"
-		{ OPCODE(I32Clz); RETURN(UNARY); }
-#line 4010 "src/prebuilt/ast-lexer-gen.cc"
-yy595:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy711;
-		goto yy50;
-yy596:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 300 "src/ast-lexer.cc"
-		{ OPCODE(I32Ctz); RETURN(UNARY); }
-#line 4022 "src/prebuilt/ast-lexer-gen.cc"
-yy598:
-		yych = *++lexer->cursor;
-		if (yych == '_') goto yy712;
-		goto yy50;
-yy599:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 296 "src/ast-lexer.cc"
-		{ OPCODE(I32Eqz); RETURN(CONVERT); }
-#line 4034 "src/prebuilt/ast-lexer-gen.cc"
-yy601:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy713;
-		if (yych == 'u') goto yy715;
-		goto yy50;
-yy602:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy717;
-		if (yych == 'u') goto yy719;
-		goto yy50;
-yy603:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy721;
-		if (yych == 'u') goto yy723;
-		goto yy50;
-yy604:
-		yych = *++lexer->cursor;
-		if (yych == 'd') goto yy725;
-		goto yy50;
-yy605:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy727;
-		if (yych == 'u') goto yy729;
-		goto yy50;
-yy606:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 322 "src/ast-lexer.cc"
-		{ OPCODE(I32Mul); RETURN(BINARY); }
-#line 4066 "src/prebuilt/ast-lexer-gen.cc"
-yy608:
-		yych = *++lexer->cursor;
-		if (yych == 'c') goto yy731;
-		goto yy50;
-yy609:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy732;
-		goto yy50;
-yy610:
-		yych = *++lexer->cursor;
-		if (yych == '_') goto yy733;
-		goto yy50;
-yy611:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy734;
-		if (yych == 'r') goto yy736;
-		goto yy50;
-yy612:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 338 "src/ast-lexer.cc"
-		{ OPCODE(I32Shl); RETURN(BINARY); }
-#line 4091 "src/prebuilt/ast-lexer-gen.cc"
-yy614:
-		yych = *++lexer->cursor;
-		if (yych == '_') goto yy738;
-		goto yy50;
-yy615:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy739;
-		goto yy50;
-yy616:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 320 "src/ast-lexer.cc"
-		{ OPCODE(I32Sub); RETURN(BINARY); }
-#line 4107 "src/prebuilt/ast-lexer-gen.cc"
-yy618:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy740;
-		goto yy50;
-yy619:
-		yych = *++lexer->cursor;
-		if (yych == 'p') goto yy741;
-		goto yy50;
-yy620:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 336 "src/ast-lexer.cc"
-		{ OPCODE(I32Xor); RETURN(BINARY); }
-#line 4123 "src/prebuilt/ast-lexer-gen.cc"
-yy622:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 319 "src/ast-lexer.cc"
-		{ OPCODE(I64Add); RETURN(BINARY); }
-#line 4131 "src/prebuilt/ast-lexer-gen.cc"
-yy624:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 333 "src/ast-lexer.cc"
-		{ OPCODE(I64And); RETURN(BINARY); }
-#line 4139 "src/prebuilt/ast-lexer-gen.cc"
-yy626:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 299 "src/ast-lexer.cc"
-		{ OPCODE(I64Clz); RETURN(UNARY); }
-#line 4147 "src/prebuilt/ast-lexer-gen.cc"
-yy628:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy742;
-		goto yy50;
-yy629:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 301 "src/ast-lexer.cc"
-		{ OPCODE(I64Ctz); RETURN(UNARY); }
-#line 4159 "src/prebuilt/ast-lexer-gen.cc"
-yy631:
-		yych = *++lexer->cursor;
-		if (yych == '_') goto yy743;
-		goto yy50;
-yy632:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 297 "src/ast-lexer.cc"
-		{ OPCODE(I64Eqz); RETURN(CONVERT); }
-#line 4171 "src/prebuilt/ast-lexer-gen.cc"
-yy634:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy744;
-		goto yy50;
-yy635:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy745;
-		if (yych == 'u') goto yy747;
-		goto yy50;
-yy636:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy749;
-		if (yych == 'u') goto yy751;
-		goto yy50;
-yy637:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy753;
-		if (yych == 'u') goto yy755;
-		goto yy50;
-yy638:
-		yych = *++lexer->cursor;
-		if (yych == 'd') goto yy757;
-		goto yy50;
-yy639:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy759;
-		if (yych == 'u') goto yy761;
-		goto yy50;
-yy640:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 323 "src/ast-lexer.cc"
-		{ OPCODE(I64Mul); RETURN(BINARY); }
-#line 4207 "src/prebuilt/ast-lexer-gen.cc"
-yy642:
-		yych = *++lexer->cursor;
-		if (yych == 'c') goto yy763;
-		goto yy50;
-yy643:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy764;
-		goto yy50;
-yy644:
-		yych = *++lexer->cursor;
-		if (yych == '_') goto yy765;
-		goto yy50;
-yy645:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy766;
-		if (yych == 'r') goto yy768;
-		goto yy50;
-yy646:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 339 "src/ast-lexer.cc"
-		{ OPCODE(I64Shl); RETURN(BINARY); }
-#line 4232 "src/prebuilt/ast-lexer-gen.cc"
-yy648:
-		yych = *++lexer->cursor;
-		if (yych == '_') goto yy770;
-		goto yy50;
-yy649:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy771;
-		goto yy50;
-yy650:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 321 "src/ast-lexer.cc"
-		{ OPCODE(I64Sub); RETURN(BINARY); }
-#line 4248 "src/prebuilt/ast-lexer-gen.cc"
-yy652:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy772;
-		goto yy50;
-yy653:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 337 "src/ast-lexer.cc"
-		{ OPCODE(I64Xor); RETURN(BINARY); }
-#line 4260 "src/prebuilt/ast-lexer-gen.cc"
-yy655:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 249 "src/ast-lexer.cc"
-		{ RETURN(IF); }
-#line 4268 "src/prebuilt/ast-lexer-gen.cc"
-yy657:
-		yych = *++lexer->cursor;
-		if (yych == 'y') goto yy773;
-		goto yy50;
-yy658:
-		++lexer->cursor;
-		if (lexer->limit <= lexer->cursor) FILL(1);
-		yych = *lexer->cursor;
-		if (yych <= '@') {
-			if (yych <= '+') {
-				if (yych <= '"') {
-					if (yych == '!') goto yy49;
-					goto yy196;
-				} else {
-					if (yych <= '\'') goto yy49;
-					if (yych <= ')') goto yy196;
-					goto yy49;
-				}
-			} else {
-				if (yych <= '9') {
-					if (yych <= ',') goto yy196;
-					if (yych <= '/') goto yy49;
-					goto yy658;
-				} else {
-					if (yych == ';') goto yy196;
-					goto yy49;
-				}
-			}
-		} else {
-			if (yych <= '`') {
-				if (yych <= '[') {
-					if (yych <= 'F') goto yy658;
-					if (yych <= 'Z') goto yy49;
-					goto yy196;
-				} else {
-					if (yych == ']') goto yy196;
-					goto yy49;
-				}
-			} else {
-				if (yych <= '{') {
-					if (yych <= 'f') goto yy658;
-					if (yych <= 'z') goto yy49;
-					goto yy196;
-				} else {
-					if (yych == '}') goto yy196;
-					if (yych <= '~') goto yy49;
-					goto yy196;
-				}
-			}
-		}
-yy660:
-		yych = *++lexer->cursor;
-		if (yych <= '/') goto yy50;
-		if (yych <= '0') goto yy774;
-		if (yych <= '9') goto yy776;
-		goto yy50;
-yy661:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy778;
-		goto yy50;
-yy662:
-		yych = *++lexer->cursor;
-		if (yych == 'b') goto yy780;
-		goto yy50;
-yy663:
-		yych = *++lexer->cursor;
-		if (yych == 'a') goto yy781;
-		goto yy50;
-yy664:
-		yych = *++lexer->cursor;
-		if (yych == 'a') goto yy782;
-		goto yy50;
-yy665:
-		yych = *++lexer->cursor;
-		if (yych == 'a') goto yy783;
-		goto yy50;
-yy666:
-		yych = *++lexer->cursor;
-		if (yych <= '@') {
-			if (yych <= '/') goto yy50;
-			if (yych <= '9') goto yy784;
-			goto yy50;
-		} else {
-			if (yych <= 'F') goto yy784;
-			if (yych <= '`') goto yy50;
-			if (yych <= 'f') goto yy784;
-			goto yy50;
-		}
-yy667:
-		yych = *++lexer->cursor;
-		if (yych == 'x') goto yy786;
-		goto yy50;
-yy668:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy787;
-		goto yy50;
-yy669:
-		yych = *++lexer->cursor;
-		if (yych == 'a') goto yy788;
-		goto yy50;
-yy670:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy789;
-		goto yy50;
-yy671:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy790;
-		goto yy50;
-yy672:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy791;
-		goto yy50;
-yy673:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 255 "src/ast-lexer.cc"
-		{ RETURN(BR_TABLE); }
-#line 4388 "src/prebuilt/ast-lexer-gen.cc"
-yy675:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy792;
-		goto yy50;
-yy676:
-		yych = *++lexer->cursor;
-		if (yych == 'i') goto yy793;
-		goto yy50;
-yy677:
-		yych = *++lexer->cursor;
-		if (yych == 'm') goto yy794;
-		goto yy50;
-yy678:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 310 "src/ast-lexer.cc"
-		{ OPCODE(F32Ceil); RETURN(UNARY); }
-#line 4408 "src/prebuilt/ast-lexer-gen.cc"
-yy680:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy795;
-		goto yy50;
-yy681:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy797;
-		goto yy50;
-yy682:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy798;
-		goto yy50;
-yy683:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy799;
-		goto yy50;
-yy684:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy800;
-		goto yy50;
-yy685:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 269 "src/ast-lexer.cc"
-		{ OPCODE(F32Load); RETURN(LOAD); }
-#line 4436 "src/prebuilt/ast-lexer-gen.cc"
-yy687:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy802;
-		goto yy50;
-yy688:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy803;
-		goto yy50;
-yy689:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 308 "src/ast-lexer.cc"
-		{ OPCODE(F32Sqrt); RETURN(UNARY); }
-#line 4452 "src/prebuilt/ast-lexer-gen.cc"
-yy691:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy804;
-		goto yy50;
-yy692:
-		yych = *++lexer->cursor;
-		if (yych == 'c') goto yy806;
-		goto yy50;
-yy693:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 311 "src/ast-lexer.cc"
-		{ OPCODE(F64Ceil); RETURN(UNARY); }
-#line 4468 "src/prebuilt/ast-lexer-gen.cc"
-yy695:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy808;
-		goto yy50;
-yy696:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy810;
-		goto yy50;
-yy697:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy811;
-		goto yy50;
-yy698:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy812;
-		goto yy50;
-yy699:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 270 "src/ast-lexer.cc"
-		{ OPCODE(F64Load); RETURN(LOAD); }
-#line 4492 "src/prebuilt/ast-lexer-gen.cc"
-yy701:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy814;
-		goto yy50;
-yy702:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy815;
-		goto yy50;
-yy703:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy816;
-		goto yy50;
-yy704:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 309 "src/ast-lexer.cc"
-		{ OPCODE(F64Sqrt); RETURN(UNARY); }
-#line 4512 "src/prebuilt/ast-lexer-gen.cc"
-yy706:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy817;
-		goto yy50;
-yy707:
-		yych = *++lexer->cursor;
-		if (yych == 'c') goto yy819;
-		goto yy50;
-yy708:
-		yych = *++lexer->cursor;
-		if (yych == 'a') goto yy821;
-		goto yy50;
-yy709:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy822;
-		goto yy50;
-yy710:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy824;
-		goto yy50;
-yy711:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy825;
-		goto yy50;
-yy712:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy827;
-		if (yych == 'u') goto yy829;
-		goto yy50;
-yy713:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 378 "src/ast-lexer.cc"
-		{ OPCODE(I32GeS); RETURN(COMPARE); }
-#line 4549 "src/prebuilt/ast-lexer-gen.cc"
-yy715:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 380 "src/ast-lexer.cc"
-		{ OPCODE(I32GeU); RETURN(COMPARE); }
-#line 4557 "src/prebuilt/ast-lexer-gen.cc"
-yy717:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 374 "src/ast-lexer.cc"
-		{ OPCODE(I32GtS); RETURN(COMPARE); }
-#line 4565 "src/prebuilt/ast-lexer-gen.cc"
-yy719:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 376 "src/ast-lexer.cc"
-		{ OPCODE(I32GtU); RETURN(COMPARE); }
-#line 4573 "src/prebuilt/ast-lexer-gen.cc"
-yy721:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 370 "src/ast-lexer.cc"
-		{ OPCODE(I32LeS); RETURN(COMPARE); }
-#line 4581 "src/prebuilt/ast-lexer-gen.cc"
-yy723:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 372 "src/ast-lexer.cc"
-		{ OPCODE(I32LeU); RETURN(COMPARE); }
-#line 4589 "src/prebuilt/ast-lexer-gen.cc"
-yy725:
-		++lexer->cursor;
-		if ((yych = *lexer->cursor) <= '8') {
-			if (yych <= ')') {
-				if (yych <= '!') {
-					if (yych >= '!') goto yy49;
-				} else {
-					if (yych <= '"') goto yy726;
-					if (yych <= '\'') goto yy49;
-				}
-			} else {
-				if (yych <= '0') {
-					if (yych != ',') goto yy49;
-				} else {
-					if (yych <= '1') goto yy831;
-					if (yych <= '7') goto yy49;
-					goto yy832;
-				}
-			}
-		} else {
-			if (yych <= ']') {
-				if (yych <= 'Z') {
-					if (yych != ';') goto yy49;
-				} else {
-					if (yych == '\\') goto yy49;
-				}
-			} else {
-				if (yych <= '|') {
-					if (yych != '{') goto yy49;
-				} else {
-					if (yych == '~') goto yy49;
-				}
-			}
-		}
-yy726:
-#line 267 "src/ast-lexer.cc"
-		{ OPCODE(I32Load); RETURN(LOAD); }
-#line 4627 "src/prebuilt/ast-lexer-gen.cc"
-yy727:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 366 "src/ast-lexer.cc"
-		{ OPCODE(I32LtS); RETURN(COMPARE); }
-#line 4635 "src/prebuilt/ast-lexer-gen.cc"
-yy729:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 368 "src/ast-lexer.cc"
-		{ OPCODE(I32LtU); RETURN(COMPARE); }
-#line 4643 "src/prebuilt/ast-lexer-gen.cc"
-yy731:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy833;
-		goto yy50;
-yy732:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy834;
-		goto yy50;
-yy733:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy835;
-		if (yych == 'u') goto yy837;
-		goto yy50;
-yy734:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 344 "src/ast-lexer.cc"
-		{ OPCODE(I32Rotl); RETURN(BINARY); }
-#line 4664 "src/prebuilt/ast-lexer-gen.cc"
-yy736:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 346 "src/ast-lexer.cc"
-		{ OPCODE(I32Rotr); RETURN(BINARY); }
-#line 4672 "src/prebuilt/ast-lexer-gen.cc"
-yy738:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy839;
-		if (yych == 'u') goto yy841;
-		goto yy50;
-yy739:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy843;
-		goto yy50;
-yy740:
-		yych = *++lexer->cursor;
-		if (yych == 'c') goto yy845;
-		goto yy50;
-yy741:
-		yych = *++lexer->cursor;
-		if (yych == '/') goto yy846;
-		goto yy50;
-yy742:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy847;
-		goto yy50;
-yy743:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy849;
-		if (yych == 'u') goto yy851;
-		goto yy50;
-yy744:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy853;
-		goto yy50;
-yy745:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 379 "src/ast-lexer.cc"
-		{ OPCODE(I64GeS); RETURN(COMPARE); }
-#line 4710 "src/prebuilt/ast-lexer-gen.cc"
-yy747:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 381 "src/ast-lexer.cc"
-		{ OPCODE(I64GeU); RETURN(COMPARE); }
-#line 4718 "src/prebuilt/ast-lexer-gen.cc"
-yy749:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 375 "src/ast-lexer.cc"
-		{ OPCODE(I64GtS); RETURN(COMPARE); }
-#line 4726 "src/prebuilt/ast-lexer-gen.cc"
-yy751:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 377 "src/ast-lexer.cc"
-		{ OPCODE(I64GtU); RETURN(COMPARE); }
-#line 4734 "src/prebuilt/ast-lexer-gen.cc"
-yy753:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 371 "src/ast-lexer.cc"
-		{ OPCODE(I64LeS); RETURN(COMPARE); }
-#line 4742 "src/prebuilt/ast-lexer-gen.cc"
-yy755:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 373 "src/ast-lexer.cc"
-		{ OPCODE(I64LeU); RETURN(COMPARE); }
-#line 4750 "src/prebuilt/ast-lexer-gen.cc"
-yy757:
-		++lexer->cursor;
-		if ((yych = *lexer->cursor) <= '7') {
-			if (yych <= '+') {
-				if (yych <= '"') {
-					if (yych == '!') goto yy49;
-				} else {
-					if (yych <= '\'') goto yy49;
-					if (yych >= '*') goto yy49;
-				}
-			} else {
-				if (yych <= '1') {
-					if (yych <= ',') goto yy758;
-					if (yych <= '0') goto yy49;
-					goto yy854;
-				} else {
-					if (yych == '3') goto yy855;
-					goto yy49;
-				}
-			}
-		} else {
-			if (yych <= '\\') {
-				if (yych <= ';') {
-					if (yych <= '8') goto yy856;
-					if (yych <= ':') goto yy49;
-				} else {
-					if (yych != '[') goto yy49;
-				}
-			} else {
-				if (yych <= '{') {
-					if (yych <= ']') goto yy758;
-					if (yych <= 'z') goto yy49;
-				} else {
-					if (yych == '}') goto yy758;
-					if (yych <= '~') goto yy49;
-				}
-			}
-		}
-yy758:
-#line 268 "src/ast-lexer.cc"
-		{ OPCODE(I64Load); RETURN(LOAD); }
-#line 4792 "src/prebuilt/ast-lexer-gen.cc"
-yy759:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 367 "src/ast-lexer.cc"
-		{ OPCODE(I64LtS); RETURN(COMPARE); }
-#line 4800 "src/prebuilt/ast-lexer-gen.cc"
-yy761:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 369 "src/ast-lexer.cc"
-		{ OPCODE(I64LtU); RETURN(COMPARE); }
-#line 4808 "src/prebuilt/ast-lexer-gen.cc"
-yy763:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy857;
-		goto yy50;
-yy764:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy858;
-		goto yy50;
-yy765:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy859;
-		if (yych == 'u') goto yy861;
-		goto yy50;
-yy766:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 345 "src/ast-lexer.cc"
-		{ OPCODE(I64Rotl); RETURN(BINARY); }
-#line 4829 "src/prebuilt/ast-lexer-gen.cc"
-yy768:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 347 "src/ast-lexer.cc"
-		{ OPCODE(I64Rotr); RETURN(BINARY); }
-#line 4837 "src/prebuilt/ast-lexer-gen.cc"
-yy770:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy863;
-		if (yych == 'u') goto yy865;
-		goto yy50;
-yy771:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy867;
-		goto yy50;
-yy772:
-		yych = *++lexer->cursor;
-		if (yych == 'c') goto yy869;
-		goto yy50;
-yy773:
-		yych = *++lexer->cursor;
-		if (yybm[0+yych] & 16) {
-			goto yy49;
-		}
-		goto yy186;
-yy774:
-		++lexer->cursor;
-		if ((yych = *lexer->cursor) <= ';') {
-			if (yych <= ')') {
-				if (yych <= '!') {
-					if (yych >= '!') goto yy49;
-				} else {
-					if (yych <= '"') goto yy775;
-					if (yych <= '\'') goto yy49;
-				}
-			} else {
-				if (yych <= '/') {
-					if (yych != ',') goto yy49;
-				} else {
-					if (yych <= '9') goto yy776;
-					if (yych <= ':') goto yy49;
-				}
-			}
-		} else {
-			if (yych <= 'x') {
-				if (yych <= '\\') {
-					if (yych != '[') goto yy49;
-				} else {
-					if (yych <= ']') goto yy775;
-					if (yych <= 'w') goto yy49;
-					goto yy870;
-				}
-			} else {
-				if (yych <= '|') {
-					if (yych != '{') goto yy49;
-				} else {
-					if (yych == '~') goto yy49;
-				}
-			}
-		}
-yy775:
-#line 290 "src/ast-lexer.cc"
-		{ TEXT_AT(7); RETURN(OFFSET_EQ_NAT); }
-#line 4895 "src/prebuilt/ast-lexer-gen.cc"
-yy776:
-		++lexer->cursor;
-		if (lexer->limit <= lexer->cursor) FILL(1);
-		yych = *lexer->cursor;
-		if (yych <= ':') {
-			if (yych <= ')') {
-				if (yych <= '!') {
-					if (yych <= ' ') goto yy775;
-					goto yy49;
-				} else {
-					if (yych <= '"') goto yy775;
-					if (yych <= '\'') goto yy49;
-					goto yy775;
-				}
-			} else {
-				if (yych <= ',') {
-					if (yych <= '+') goto yy49;
-					goto yy775;
-				} else {
-					if (yych <= '/') goto yy49;
-					if (yych <= '9') goto yy776;
-					goto yy49;
-				}
-			}
-		} else {
-			if (yych <= ']') {
-				if (yych <= 'Z') {
-					if (yych <= ';') goto yy775;
-					goto yy49;
-				} else {
-					if (yych == '\\') goto yy49;
-					goto yy775;
-				}
-			} else {
-				if (yych <= '|') {
-					if (yych == '{') goto yy775;
-					goto yy49;
-				} else {
-					if (yych == '~') goto yy49;
-					goto yy775;
-				}
-			}
-		}
-yy778:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 438 "src/ast-lexer.cc"
-		{ RETURN(REGISTER); }
-#line 4946 "src/prebuilt/ast-lexer-gen.cc"
-yy780:
-		yych = *++lexer->cursor;
-		if (yych == 'a') goto yy871;
-		goto yy50;
-yy781:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy872;
-		goto yy50;
-yy782:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy874;
-		goto yy50;
-yy783:
-		yych = *++lexer->cursor;
-		if (yych == 'b') goto yy876;
-		goto yy50;
-yy784:
-		++lexer->cursor;
-		if (lexer->limit <= lexer->cursor) FILL(1);
-		yych = *lexer->cursor;
-		if (yych <= '@') {
-			if (yych <= '+') {
-				if (yych <= '"') {
-					if (yych == '!') goto yy49;
-					goto yy522;
-				} else {
-					if (yych <= '\'') goto yy49;
-					if (yych <= ')') goto yy522;
-					goto yy49;
-				}
-			} else {
-				if (yych <= '9') {
-					if (yych <= ',') goto yy522;
-					if (yych <= '/') goto yy49;
-					goto yy784;
-				} else {
-					if (yych == ';') goto yy522;
-					goto yy49;
-				}
-			}
-		} else {
-			if (yych <= '`') {
-				if (yych <= '[') {
-					if (yych <= 'F') goto yy784;
-					if (yych <= 'Z') goto yy49;
-					goto yy522;
-				} else {
-					if (yych == ']') goto yy522;
-					goto yy49;
-				}
-			} else {
-				if (yych <= '{') {
-					if (yych <= 'f') goto yy784;
-					if (yych <= 'z') goto yy49;
-					goto yy522;
-				} else {
-					if (yych == '}') goto yy522;
-					if (yych <= '~') goto yy49;
-					goto yy522;
-				}
-			}
-		}
-yy786:
-		yych = *++lexer->cursor;
-		if (yych == 'h') goto yy877;
-		goto yy50;
-yy787:
-		yych = *++lexer->cursor;
-		if (yych == 'v') goto yy878;
-		goto yy50;
-yy788:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy879;
-		goto yy50;
-yy789:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy880;
-		goto yy50;
-yy790:
-		yych = *++lexer->cursor;
-		if (yych == 'a') goto yy881;
-		goto yy50;
-yy791:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy882;
-		goto yy50;
-yy792:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy883;
-		goto yy50;
-yy793:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy884;
-		goto yy50;
-yy794:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy885;
-		goto yy50;
-yy795:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 294 "src/ast-lexer.cc"
-		{ TYPE(F32); RETURN(CONST); }
-#line 5052 "src/prebuilt/ast-lexer-gen.cc"
-yy797:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy886;
-		goto yy50;
-yy798:
-		yych = *++lexer->cursor;
-		if (yych == 'i') goto yy887;
-		goto yy50;
-yy799:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy888;
-		goto yy50;
-yy800:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 312 "src/ast-lexer.cc"
-		{ OPCODE(F32Floor); RETURN(UNARY); }
-#line 5072 "src/prebuilt/ast-lexer-gen.cc"
-yy802:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy889;
-		goto yy50;
-yy803:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy890;
-		goto yy50;
-yy804:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 273 "src/ast-lexer.cc"
-		{ OPCODE(F32Store); RETURN(STORE); }
-#line 5088 "src/prebuilt/ast-lexer-gen.cc"
-yy806:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 314 "src/ast-lexer.cc"
-		{ OPCODE(F32Trunc); RETURN(UNARY); }
-#line 5096 "src/prebuilt/ast-lexer-gen.cc"
-yy808:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 295 "src/ast-lexer.cc"
-		{ TYPE(F64); RETURN(CONST); }
-#line 5104 "src/prebuilt/ast-lexer-gen.cc"
-yy810:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy891;
-		goto yy50;
-yy811:
-		yych = *++lexer->cursor;
-		if (yych == 'i') goto yy892;
-		goto yy50;
-yy812:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 313 "src/ast-lexer.cc"
-		{ OPCODE(F64Floor); RETURN(UNARY); }
-#line 5120 "src/prebuilt/ast-lexer-gen.cc"
-yy814:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy893;
-		goto yy50;
-yy815:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy894;
-		goto yy50;
-yy816:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy895;
-		goto yy50;
-yy817:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 274 "src/ast-lexer.cc"
-		{ OPCODE(F64Store); RETURN(STORE); }
-#line 5140 "src/prebuilt/ast-lexer-gen.cc"
-yy819:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 315 "src/ast-lexer.cc"
-		{ OPCODE(F64Trunc); RETURN(UNARY); }
-#line 5148 "src/prebuilt/ast-lexer-gen.cc"
-yy821:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy896;
-		goto yy50;
-yy822:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 262 "src/ast-lexer.cc"
-		{ RETURN(GET_LOCAL); }
-#line 5160 "src/prebuilt/ast-lexer-gen.cc"
-yy824:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy898;
-		goto yy50;
-yy825:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 292 "src/ast-lexer.cc"
-		{ TYPE(I32); RETURN(CONST); }
-#line 5172 "src/prebuilt/ast-lexer-gen.cc"
-yy827:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 324 "src/ast-lexer.cc"
-		{ OPCODE(I32DivS); RETURN(BINARY); }
-#line 5180 "src/prebuilt/ast-lexer-gen.cc"
-yy829:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 326 "src/ast-lexer.cc"
-		{ OPCODE(I32DivU); RETURN(BINARY); }
-#line 5188 "src/prebuilt/ast-lexer-gen.cc"
-yy831:
-		yych = *++lexer->cursor;
-		if (yych == '6') goto yy899;
-		goto yy50;
-yy832:
-		yych = *++lexer->cursor;
-		if (yych == '_') goto yy900;
-		goto yy50;
-yy833:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy901;
-		goto yy50;
-yy834:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy903;
-		goto yy50;
-yy835:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 328 "src/ast-lexer.cc"
-		{ OPCODE(I32RemS); RETURN(BINARY); }
-#line 5212 "src/prebuilt/ast-lexer-gen.cc"
-yy837:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 330 "src/ast-lexer.cc"
-		{ OPCODE(I32RemU); RETURN(BINARY); }
-#line 5220 "src/prebuilt/ast-lexer-gen.cc"
-yy839:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 340 "src/ast-lexer.cc"
-		{ OPCODE(I32ShrS); RETURN(BINARY); }
-#line 5228 "src/prebuilt/ast-lexer-gen.cc"
-yy841:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 342 "src/ast-lexer.cc"
-		{ OPCODE(I32ShrU); RETURN(BINARY); }
-#line 5236 "src/prebuilt/ast-lexer-gen.cc"
-yy843:
-		++lexer->cursor;
-		if ((yych = *lexer->cursor) <= '8') {
-			if (yych <= ')') {
-				if (yych <= '!') {
-					if (yych >= '!') goto yy49;
-				} else {
-					if (yych <= '"') goto yy844;
-					if (yych <= '\'') goto yy49;
-				}
-			} else {
-				if (yych <= '0') {
-					if (yych != ',') goto yy49;
-				} else {
-					if (yych <= '1') goto yy904;
-					if (yych <= '7') goto yy49;
-					goto yy905;
-				}
-			}
-		} else {
-			if (yych <= ']') {
-				if (yych <= 'Z') {
-					if (yych != ';') goto yy49;
-				} else {
-					if (yych == '\\') goto yy49;
-				}
-			} else {
-				if (yych <= '|') {
-					if (yych != '{') goto yy49;
-				} else {
-					if (yych == '~') goto yy49;
-				}
-			}
-		}
-yy844:
-#line 271 "src/ast-lexer.cc"
-		{ OPCODE(I32Store); RETURN(STORE); }
-#line 5274 "src/prebuilt/ast-lexer-gen.cc"
-yy845:
-		yych = *++lexer->cursor;
-		if (yych == '_') goto yy907;
-		goto yy50;
-yy846:
-		yych = *++lexer->cursor;
-		if (yych == 'i') goto yy908;
-		goto yy50;
-yy847:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 293 "src/ast-lexer.cc"
-		{ TYPE(I64); RETURN(CONST); }
-#line 5290 "src/prebuilt/ast-lexer-gen.cc"
-yy849:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 325 "src/ast-lexer.cc"
-		{ OPCODE(I64DivS); RETURN(BINARY); }
-#line 5298 "src/prebuilt/ast-lexer-gen.cc"
-yy851:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 327 "src/ast-lexer.cc"
-		{ OPCODE(I64DivU); RETURN(BINARY); }
-#line 5306 "src/prebuilt/ast-lexer-gen.cc"
-yy853:
-		yych = *++lexer->cursor;
-		if (yych == 'd') goto yy909;
-		goto yy50;
-yy854:
-		yych = *++lexer->cursor;
-		if (yych == '6') goto yy910;
-		goto yy50;
-yy855:
-		yych = *++lexer->cursor;
-		if (yych == '2') goto yy911;
-		goto yy50;
-yy856:
-		yych = *++lexer->cursor;
-		if (yych == '_') goto yy912;
-		goto yy50;
-yy857:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy913;
-		goto yy50;
-yy858:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy915;
-		goto yy50;
-yy859:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 329 "src/ast-lexer.cc"
-		{ OPCODE(I64RemS); RETURN(BINARY); }
-#line 5338 "src/prebuilt/ast-lexer-gen.cc"
-yy861:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 331 "src/ast-lexer.cc"
-		{ OPCODE(I64RemU); RETURN(BINARY); }
-#line 5346 "src/prebuilt/ast-lexer-gen.cc"
-yy863:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 341 "src/ast-lexer.cc"
-		{ OPCODE(I64ShrS); RETURN(BINARY); }
-#line 5354 "src/prebuilt/ast-lexer-gen.cc"
-yy865:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 343 "src/ast-lexer.cc"
-		{ OPCODE(I64ShrU); RETURN(BINARY); }
-#line 5362 "src/prebuilt/ast-lexer-gen.cc"
-yy867:
-		++lexer->cursor;
-		if ((yych = *lexer->cursor) <= '7') {
-			if (yych <= '+') {
-				if (yych <= '"') {
-					if (yych == '!') goto yy49;
-				} else {
-					if (yych <= '\'') goto yy49;
-					if (yych >= '*') goto yy49;
-				}
-			} else {
-				if (yych <= '1') {
-					if (yych <= ',') goto yy868;
-					if (yych <= '0') goto yy49;
-					goto yy916;
-				} else {
-					if (yych == '3') goto yy917;
-					goto yy49;
-				}
-			}
-		} else {
-			if (yych <= '\\') {
-				if (yych <= ';') {
-					if (yych <= '8') goto yy918;
-					if (yych <= ':') goto yy49;
-				} else {
-					if (yych != '[') goto yy49;
-				}
-			} else {
-				if (yych <= '{') {
-					if (yych <= ']') goto yy868;
-					if (yych <= 'z') goto yy49;
-				} else {
-					if (yych == '}') goto yy868;
-					if (yych <= '~') goto yy49;
-				}
-			}
-		}
-yy868:
-#line 272 "src/ast-lexer.cc"
-		{ OPCODE(I64Store); RETURN(STORE); }
-#line 5404 "src/prebuilt/ast-lexer-gen.cc"
-yy869:
-		yych = *++lexer->cursor;
-		if (yych == '_') goto yy920;
-		goto yy50;
-yy870:
-		yych = *++lexer->cursor;
-		if (yych <= '@') {
-			if (yych <= '/') goto yy50;
-			if (yych <= '9') goto yy921;
-			goto yy50;
-		} else {
-			if (yych <= 'F') goto yy921;
-			if (yych <= '`') goto yy50;
-			if (yych <= 'f') goto yy921;
-			goto yy50;
-		}
-yy871:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy923;
-		goto yy50;
-yy872:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 263 "src/ast-lexer.cc"
-		{ RETURN(SET_LOCAL); }
-#line 5432 "src/prebuilt/ast-lexer-gen.cc"
-yy874:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 264 "src/ast-lexer.cc"
-		{ RETURN(TEE_LOCAL); }
-#line 5440 "src/prebuilt/ast-lexer-gen.cc"
-yy876:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy925;
-		goto yy50;
-yy877:
-		yych = *++lexer->cursor;
-		if (yych == 'a') goto yy926;
-		goto yy50;
-yy878:
-		yych = *++lexer->cursor;
-		if (yych == 'a') goto yy927;
-		goto yy50;
-yy879:
-		yych = *++lexer->cursor;
-		if (yych == 'f') goto yy928;
-		goto yy50;
-yy880:
-		yych = *++lexer->cursor;
-		if (yych == 'u') goto yy929;
-		goto yy50;
-yy881:
-		yych = *++lexer->cursor;
-		if (yych == 'p') goto yy930;
-		goto yy50;
-yy882:
-		yych = *++lexer->cursor;
-		if (yych == 'i') goto yy932;
-		goto yy50;
-yy883:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy933;
-		goto yy50;
-yy884:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy935;
-		goto yy50;
-yy885:
-		yych = *++lexer->cursor;
-		if (yych == 'm') goto yy936;
-		goto yy50;
-yy886:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy937;
-		goto yy50;
-yy887:
-		yych = *++lexer->cursor;
-		if (yych == 'g') goto yy938;
-		goto yy50;
-yy888:
-		yych = *++lexer->cursor;
-		if (yych == '/') goto yy939;
-		goto yy50;
-yy889:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy940;
-		goto yy50;
-yy890:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy942;
-		goto yy50;
-yy891:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy943;
-		goto yy50;
-yy892:
-		yych = *++lexer->cursor;
-		if (yych == 'g') goto yy944;
-		goto yy50;
-yy893:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy945;
-		goto yy50;
-yy894:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy947;
-		goto yy50;
-yy895:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy948;
-		goto yy50;
-yy896:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 265 "src/ast-lexer.cc"
-		{ RETURN(GET_GLOBAL); }
-#line 5528 "src/prebuilt/ast-lexer-gen.cc"
-yy898:
-		yych = *++lexer->cursor;
-		if (yych == 'y') goto yy949;
-		goto yy50;
-yy899:
-		yych = *++lexer->cursor;
-		if (yych == '_') goto yy951;
-		goto yy50;
-yy900:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy952;
-		if (yych == 'u') goto yy954;
-		goto yy50;
-yy901:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 302 "src/ast-lexer.cc"
-		{ OPCODE(I32Popcnt); RETURN(UNARY); }
-#line 5549 "src/prebuilt/ast-lexer-gen.cc"
-yy903:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy956;
-		goto yy50;
-yy904:
-		yych = *++lexer->cursor;
-		if (yych == '6') goto yy957;
-		goto yy50;
-yy905:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 285 "src/ast-lexer.cc"
-		{ OPCODE(I32Store8); RETURN(STORE); }
-#line 5565 "src/prebuilt/ast-lexer-gen.cc"
-yy907:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy959;
-		if (yych == 'u') goto yy960;
-		goto yy50;
-yy908:
-		yych = *++lexer->cursor;
-		if (yych == '6') goto yy961;
-		goto yy50;
-yy909:
-		yych = *++lexer->cursor;
-		if (yych == '_') goto yy962;
-		goto yy50;
-yy910:
-		yych = *++lexer->cursor;
-		if (yych == '_') goto yy963;
-		goto yy50;
-yy911:
-		yych = *++lexer->cursor;
-		if (yych == '_') goto yy964;
-		goto yy50;
-yy912:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy965;
-		if (yych == 'u') goto yy967;
-		goto yy50;
-yy913:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 303 "src/ast-lexer.cc"
-		{ OPCODE(I64Popcnt); RETURN(UNARY); }
-#line 5599 "src/prebuilt/ast-lexer-gen.cc"
-yy915:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy969;
-		goto yy50;
-yy916:
-		yych = *++lexer->cursor;
-		if (yych == '6') goto yy970;
-		goto yy50;
-yy917:
-		yych = *++lexer->cursor;
-		if (yych == '2') goto yy972;
-		goto yy50;
-yy918:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 286 "src/ast-lexer.cc"
-		{ OPCODE(I64Store8); RETURN(STORE); }
-#line 5619 "src/prebuilt/ast-lexer-gen.cc"
-yy920:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy974;
-		if (yych == 'u') goto yy975;
-		goto yy50;
-yy921:
-		++lexer->cursor;
-		if (lexer->limit <= lexer->cursor) FILL(1);
-		yych = *lexer->cursor;
-		if (yych <= '@') {
-			if (yych <= '+') {
-				if (yych <= '"') {
-					if (yych == '!') goto yy49;
-					goto yy775;
-				} else {
-					if (yych <= '\'') goto yy49;
-					if (yych <= ')') goto yy775;
-					goto yy49;
-				}
-			} else {
-				if (yych <= '9') {
-					if (yych <= ',') goto yy775;
-					if (yych <= '/') goto yy49;
-					goto yy921;
-				} else {
-					if (yych == ';') goto yy775;
-					goto yy49;
-				}
-			}
-		} else {
-			if (yych <= '`') {
-				if (yych <= '[') {
-					if (yych <= 'F') goto yy921;
-					if (yych <= 'Z') goto yy49;
-					goto yy775;
-				} else {
-					if (yych == ']') goto yy775;
-					goto yy49;
-				}
-			} else {
-				if (yych <= '{') {
-					if (yych <= 'f') goto yy921;
-					if (yych <= 'z') goto yy49;
-					goto yy775;
-				} else {
-					if (yych == '}') goto yy775;
-					if (yych <= '~') goto yy49;
-					goto yy775;
-				}
-			}
-		}
-yy923:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 266 "src/ast-lexer.cc"
-		{ RETURN(SET_GLOBAL); }
-#line 5678 "src/prebuilt/ast-lexer-gen.cc"
-yy925:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy976;
-		goto yy50;
-yy926:
-		yych = *++lexer->cursor;
-		if (yych == 'u') goto yy978;
-		goto yy50;
-yy927:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy979;
-		goto yy50;
-yy928:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy980;
-		goto yy50;
-yy929:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy981;
-		goto yy50;
-yy930:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 449 "src/ast-lexer.cc"
-		{ RETURN(ASSERT_TRAP); }
-#line 5706 "src/prebuilt/ast-lexer-gen.cc"
-yy932:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy982;
-		goto yy50;
-yy933:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 257 "src/ast-lexer.cc"
-		{ RETURN(CALL_IMPORT); }
-#line 5718 "src/prebuilt/ast-lexer-gen.cc"
-yy935:
-		yych = *++lexer->cursor;
-		if (yych == 'c') goto yy983;
-		goto yy50;
-yy936:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy984;
-		goto yy50;
-yy937:
-		yych = *++lexer->cursor;
-		if (yych == '_') goto yy985;
-		goto yy50;
-yy938:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy986;
-		goto yy50;
-yy939:
-		yych = *++lexer->cursor;
-		if (yych == 'f') goto yy988;
-		goto yy50;
-yy940:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 316 "src/ast-lexer.cc"
-		{ OPCODE(F32Nearest); RETURN(UNARY); }
-#line 5746 "src/prebuilt/ast-lexer-gen.cc"
-yy942:
-		yych = *++lexer->cursor;
-		if (yych == 'p') goto yy989;
-		goto yy50;
-yy943:
-		yych = *++lexer->cursor;
-		if (yych == '_') goto yy990;
-		goto yy50;
-yy944:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy991;
-		goto yy50;
-yy945:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 317 "src/ast-lexer.cc"
-		{ OPCODE(F64Nearest); RETURN(UNARY); }
-#line 5766 "src/prebuilt/ast-lexer-gen.cc"
-yy947:
-		yych = *++lexer->cursor;
-		if (yych == '/') goto yy993;
-		goto yy50;
-yy948:
-		yych = *++lexer->cursor;
-		if (yych == 'p') goto yy994;
-		goto yy50;
-yy949:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 422 "src/ast-lexer.cc"
-		{ RETURN(GROW_MEMORY); }
-#line 5782 "src/prebuilt/ast-lexer-gen.cc"
-yy951:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy995;
-		if (yych == 'u') goto yy997;
-		goto yy50;
-yy952:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 275 "src/ast-lexer.cc"
-		{ OPCODE(I32Load8S); RETURN(LOAD); }
-#line 5795 "src/prebuilt/ast-lexer-gen.cc"
-yy954:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 277 "src/ast-lexer.cc"
-		{ OPCODE(I32Load8U); RETURN(LOAD); }
-#line 5803 "src/prebuilt/ast-lexer-gen.cc"
-yy956:
-		yych = *++lexer->cursor;
-		if (yych == 'p') goto yy999;
-		goto yy50;
-yy957:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 287 "src/ast-lexer.cc"
-		{ OPCODE(I32Store16); RETURN(STORE); }
-#line 5815 "src/prebuilt/ast-lexer-gen.cc"
-yy959:
-		yych = *++lexer->cursor;
-		if (yych == '/') goto yy1000;
-		goto yy50;
-yy960:
-		yych = *++lexer->cursor;
-		if (yych == '/') goto yy1001;
-		goto yy50;
-yy961:
-		yych = *++lexer->cursor;
-		if (yych == '4') goto yy1002;
-		goto yy50;
-yy962:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy1004;
-		if (yych == 'u') goto yy1005;
-		goto yy50;
-yy963:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy1006;
-		if (yych == 'u') goto yy1008;
-		goto yy50;
-yy964:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy1010;
-		if (yych == 'u') goto yy1012;
-		goto yy50;
-yy965:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 276 "src/ast-lexer.cc"
-		{ OPCODE(I64Load8S); RETURN(LOAD); }
-#line 5850 "src/prebuilt/ast-lexer-gen.cc"
-yy967:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 278 "src/ast-lexer.cc"
-		{ OPCODE(I64Load8U); RETURN(LOAD); }
-#line 5858 "src/prebuilt/ast-lexer-gen.cc"
-yy969:
-		yych = *++lexer->cursor;
-		if (yych == 'p') goto yy1014;
-		goto yy50;
-yy970:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 288 "src/ast-lexer.cc"
-		{ OPCODE(I64Store16); RETURN(STORE); }
-#line 5870 "src/prebuilt/ast-lexer-gen.cc"
-yy972:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 289 "src/ast-lexer.cc"
-		{ OPCODE(I64Store32); RETURN(STORE); }
-#line 5878 "src/prebuilt/ast-lexer-gen.cc"
-yy974:
-		yych = *++lexer->cursor;
-		if (yych == '/') goto yy1015;
-		goto yy50;
-yy975:
-		yych = *++lexer->cursor;
-		if (yych == '/') goto yy1016;
-		goto yy50;
-yy976:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 420 "src/ast-lexer.cc"
-		{ RETURN(UNREACHABLE); }
-#line 5894 "src/prebuilt/ast-lexer-gen.cc"
-yy978:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy1017;
-		goto yy50;
-yy979:
-		yych = *++lexer->cursor;
-		if (yych == 'i') goto yy1018;
-		goto yy50;
-yy980:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy1019;
-		goto yy50;
-yy981:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy1020;
-		goto yy50;
-yy982:
-		yych = *++lexer->cursor;
-		if (yych == 'k') goto yy1022;
-		goto yy50;
-yy983:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy1023;
-		goto yy50;
-yy984:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy1025;
-		goto yy50;
-yy985:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy1026;
-		if (yych == 'u') goto yy1027;
-		goto yy50;
-yy986:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 360 "src/ast-lexer.cc"
-		{ OPCODE(F32Copysign); RETURN(BINARY); }
-#line 5935 "src/prebuilt/ast-lexer-gen.cc"
-yy988:
-		yych = *++lexer->cursor;
-		if (yych == '6') goto yy1028;
-		goto yy50;
-yy989:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy1029;
-		goto yy50;
-yy990:
-		yych = *++lexer->cursor;
-		if (yych == 's') goto yy1030;
-		if (yych == 'u') goto yy1031;
-		goto yy50;
-yy991:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 361 "src/ast-lexer.cc"
-		{ OPCODE(F64Copysign); RETURN(BINARY); }
-#line 5956 "src/prebuilt/ast-lexer-gen.cc"
-yy993:
-		yych = *++lexer->cursor;
-		if (yych == 'f') goto yy1032;
-		goto yy50;
-yy994:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy1033;
-		goto yy50;
-yy995:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 279 "src/ast-lexer.cc"
-		{ OPCODE(I32Load16S); RETURN(LOAD); }
-#line 5972 "src/prebuilt/ast-lexer-gen.cc"
-yy997:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 281 "src/ast-lexer.cc"
-		{ OPCODE(I32Load16U); RETURN(LOAD); }
-#line 5980 "src/prebuilt/ast-lexer-gen.cc"
-yy999:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy1034;
-		goto yy50;
-yy1000:
-		yych = *++lexer->cursor;
-		if (yych == 'f') goto yy1035;
-		goto yy50;
-yy1001:
-		yych = *++lexer->cursor;
-		if (yych == 'f') goto yy1036;
-		goto yy50;
-yy1002:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 396 "src/ast-lexer.cc"
-		{ OPCODE(I32WrapI64); RETURN(CONVERT); }
-#line 6000 "src/prebuilt/ast-lexer-gen.cc"
-yy1004:
-		yych = *++lexer->cursor;
-		if (yych == '/') goto yy1037;
-		goto yy50;
-yy1005:
-		yych = *++lexer->cursor;
-		if (yych == '/') goto yy1038;
-		goto yy50;
-yy1006:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 280 "src/ast-lexer.cc"
-		{ OPCODE(I64Load16S); RETURN(LOAD); }
-#line 6016 "src/prebuilt/ast-lexer-gen.cc"
-yy1008:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 282 "src/ast-lexer.cc"
-		{ OPCODE(I64Load16U); RETURN(LOAD); }
-#line 6024 "src/prebuilt/ast-lexer-gen.cc"
-yy1010:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 283 "src/ast-lexer.cc"
-		{ OPCODE(I64Load32S); RETURN(LOAD); }
-#line 6032 "src/prebuilt/ast-lexer-gen.cc"
-yy1012:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 284 "src/ast-lexer.cc"
-		{ OPCODE(I64Load32U); RETURN(LOAD); }
-#line 6040 "src/prebuilt/ast-lexer-gen.cc"
-yy1014:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy1039;
-		goto yy50;
-yy1015:
-		yych = *++lexer->cursor;
-		if (yych == 'f') goto yy1040;
-		goto yy50;
-yy1016:
-		yych = *++lexer->cursor;
-		if (yych == 'f') goto yy1041;
-		goto yy50;
-yy1017:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy1042;
-		goto yy50;
-yy1018:
-		yych = *++lexer->cursor;
-		if (yych == 'd') goto yy1043;
-		goto yy50;
-yy1019:
-		yych = *++lexer->cursor;
-		if (yych == 'm') goto yy1045;
-		goto yy50;
-yy1020:
-		++lexer->cursor;
-		if ((yych = *lexer->cursor) <= 'Z') {
-			if (yych <= ')') {
-				if (yych <= '!') {
-					if (yych >= '!') goto yy49;
-				} else {
-					if (yych <= '"') goto yy1021;
-					if (yych <= '\'') goto yy49;
-				}
-			} else {
-				if (yych <= ',') {
-					if (yych <= '+') goto yy49;
-				} else {
-					if (yych != ';') goto yy49;
-				}
-			}
-		} else {
-			if (yych <= '_') {
-				if (yych <= '\\') {
-					if (yych >= '\\') goto yy49;
-				} else {
-					if (yych <= ']') goto yy1021;
-					if (yych <= '^') goto yy49;
-					goto yy1046;
-				}
-			} else {
-				if (yych <= '|') {
-					if (yych != '{') goto yy49;
-				} else {
-					if (yych == '~') goto yy49;
-				}
-			}
-		}
-yy1021:
-#line 444 "src/ast-lexer.cc"
-		{ RETURN(ASSERT_RETURN); }
-#line 6102 "src/prebuilt/ast-lexer-gen.cc"
-yy1022:
-		yych = *++lexer->cursor;
-		if (yych == 'a') goto yy1047;
-		goto yy50;
-yy1023:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 258 "src/ast-lexer.cc"
-		{ RETURN(CALL_INDIRECT); }
-#line 6114 "src/prebuilt/ast-lexer-gen.cc"
-yy1025:
-		yych = *++lexer->cursor;
-		if (yych == 'y') goto yy1048;
-		goto yy50;
-yy1026:
-		yych = *++lexer->cursor;
-		if (yych == '/') goto yy1050;
-		goto yy50;
-yy1027:
-		yych = *++lexer->cursor;
-		if (yych == '/') goto yy1051;
-		goto yy50;
-yy1028:
-		yych = *++lexer->cursor;
-		if (yych == '4') goto yy1052;
-		goto yy50;
-yy1029:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy1054;
-		goto yy50;
-yy1030:
-		yych = *++lexer->cursor;
-		if (yych == '/') goto yy1055;
-		goto yy50;
-yy1031:
-		yych = *++lexer->cursor;
-		if (yych == '/') goto yy1056;
-		goto yy50;
-yy1032:
-		yych = *++lexer->cursor;
-		if (yych == '3') goto yy1057;
-		goto yy50;
-yy1033:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy1058;
-		goto yy50;
-yy1034:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy1059;
-		goto yy50;
-yy1035:
-		yych = *++lexer->cursor;
-		if (yych == '3') goto yy1060;
-		if (yych == '6') goto yy1061;
-		goto yy50;
-yy1036:
-		yych = *++lexer->cursor;
-		if (yych == '3') goto yy1062;
-		if (yych == '6') goto yy1063;
-		goto yy50;
-yy1037:
-		yych = *++lexer->cursor;
-		if (yych == 'i') goto yy1064;
-		goto yy50;
-yy1038:
-		yych = *++lexer->cursor;
-		if (yych == 'i') goto yy1065;
-		goto yy50;
-yy1039:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy1066;
-		goto yy50;
-yy1040:
-		yych = *++lexer->cursor;
-		if (yych == '3') goto yy1067;
-		if (yych == '6') goto yy1068;
-		goto yy50;
-yy1041:
-		yych = *++lexer->cursor;
-		if (yych == '3') goto yy1069;
-		if (yych == '6') goto yy1070;
-		goto yy50;
-yy1042:
-		yych = *++lexer->cursor;
-		if (yych == 'i') goto yy1071;
-		goto yy50;
-yy1043:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 442 "src/ast-lexer.cc"
-		{ RETURN(ASSERT_INVALID); }
-#line 6198 "src/prebuilt/ast-lexer-gen.cc"
-yy1045:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy1072;
-		goto yy50;
-yy1046:
-		yych = *++lexer->cursor;
-		if (yych == 'a') goto yy1073;
-		if (yych == 'c') goto yy1074;
-		goto yy50;
-yy1047:
-		yych = *++lexer->cursor;
-		if (yych == 'b') goto yy1075;
-		goto yy50;
-yy1048:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 421 "src/ast-lexer.cc"
-		{ RETURN(CURRENT_MEMORY); }
-#line 6219 "src/prebuilt/ast-lexer-gen.cc"
-yy1050:
-		yych = *++lexer->cursor;
-		if (yych == 'i') goto yy1076;
-		goto yy50;
-yy1051:
-		yych = *++lexer->cursor;
-		if (yych == 'i') goto yy1077;
-		goto yy50;
-yy1052:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 414 "src/ast-lexer.cc"
-		{ OPCODE(F32DemoteF64); RETURN(CONVERT); }
-#line 6235 "src/prebuilt/ast-lexer-gen.cc"
-yy1054:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy1078;
-		goto yy50;
-yy1055:
-		yych = *++lexer->cursor;
-		if (yych == 'i') goto yy1079;
-		goto yy50;
-yy1056:
-		yych = *++lexer->cursor;
-		if (yych == 'i') goto yy1080;
-		goto yy50;
-yy1057:
-		yych = *++lexer->cursor;
-		if (yych == '2') goto yy1081;
-		goto yy50;
-yy1058:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy1083;
-		goto yy50;
-yy1059:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy1084;
-		goto yy50;
-yy1060:
-		yych = *++lexer->cursor;
-		if (yych == '2') goto yy1085;
-		goto yy50;
-yy1061:
-		yych = *++lexer->cursor;
-		if (yych == '4') goto yy1087;
-		goto yy50;
-yy1062:
-		yych = *++lexer->cursor;
-		if (yych == '2') goto yy1089;
-		goto yy50;
-yy1063:
-		yych = *++lexer->cursor;
-		if (yych == '4') goto yy1091;
-		goto yy50;
-yy1064:
-		yych = *++lexer->cursor;
-		if (yych == '3') goto yy1093;
-		goto yy50;
-yy1065:
-		yych = *++lexer->cursor;
-		if (yych == '3') goto yy1094;
-		goto yy50;
-yy1066:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy1095;
-		goto yy50;
-yy1067:
-		yych = *++lexer->cursor;
-		if (yych == '2') goto yy1096;
-		goto yy50;
-yy1068:
-		yych = *++lexer->cursor;
-		if (yych == '4') goto yy1098;
-		goto yy50;
-yy1069:
-		yych = *++lexer->cursor;
-		if (yych == '2') goto yy1100;
-		goto yy50;
-yy1070:
-		yych = *++lexer->cursor;
-		if (yych == '4') goto yy1102;
-		goto yy50;
-yy1071:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy1104;
-		goto yy50;
-yy1072:
-		yych = *++lexer->cursor;
-		if (yych == 'd') goto yy1105;
-		goto yy50;
-yy1073:
-		yych = *++lexer->cursor;
-		if (yych == 'r') goto yy1107;
-		goto yy50;
-yy1074:
-		yych = *++lexer->cursor;
-		if (yych == 'a') goto yy1108;
-		goto yy50;
-yy1075:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy1109;
-		goto yy50;
-yy1076:
-		yych = *++lexer->cursor;
-		if (yych == '3') goto yy1110;
-		if (yych == '6') goto yy1111;
-		goto yy50;
-yy1077:
-		yych = *++lexer->cursor;
-		if (yych == '3') goto yy1112;
-		if (yych == '6') goto yy1113;
-		goto yy50;
-yy1078:
-		yych = *++lexer->cursor;
-		if (yych == '/') goto yy1114;
-		goto yy50;
-yy1079:
-		yych = *++lexer->cursor;
-		if (yych == '3') goto yy1115;
-		if (yych == '6') goto yy1116;
-		goto yy50;
-yy1080:
-		yych = *++lexer->cursor;
-		if (yych == '3') goto yy1117;
-		if (yych == '6') goto yy1118;
-		goto yy50;
-yy1081:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 413 "src/ast-lexer.cc"
-		{ OPCODE(F64PromoteF32); RETURN(CONVERT); }
-#line 6355 "src/prebuilt/ast-lexer-gen.cc"
-yy1083:
-		yych = *++lexer->cursor;
-		if (yych == '/') goto yy1119;
-		goto yy50;
-yy1084:
-		yych = *++lexer->cursor;
-		if (yych == '/') goto yy1120;
-		goto yy50;
-yy1085:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 397 "src/ast-lexer.cc"
-		{ OPCODE(I32TruncSF32); RETURN(CONVERT); }
-#line 6371 "src/prebuilt/ast-lexer-gen.cc"
-yy1087:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 399 "src/ast-lexer.cc"
-		{ OPCODE(I32TruncSF64); RETURN(CONVERT); }
-#line 6379 "src/prebuilt/ast-lexer-gen.cc"
-yy1089:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 401 "src/ast-lexer.cc"
-		{ OPCODE(I32TruncUF32); RETURN(CONVERT); }
-#line 6387 "src/prebuilt/ast-lexer-gen.cc"
-yy1091:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 403 "src/ast-lexer.cc"
-		{ OPCODE(I32TruncUF64); RETURN(CONVERT); }
-#line 6395 "src/prebuilt/ast-lexer-gen.cc"
-yy1093:
-		yych = *++lexer->cursor;
-		if (yych == '2') goto yy1121;
-		goto yy50;
-yy1094:
-		yych = *++lexer->cursor;
-		if (yych == '2') goto yy1123;
-		goto yy50;
-yy1095:
-		yych = *++lexer->cursor;
-		if (yych == '/') goto yy1125;
-		goto yy50;
-yy1096:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 398 "src/ast-lexer.cc"
-		{ OPCODE(I64TruncSF32); RETURN(CONVERT); }
-#line 6415 "src/prebuilt/ast-lexer-gen.cc"
-yy1098:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 400 "src/ast-lexer.cc"
-		{ OPCODE(I64TruncSF64); RETURN(CONVERT); }
-#line 6423 "src/prebuilt/ast-lexer-gen.cc"
-yy1100:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 402 "src/ast-lexer.cc"
-		{ OPCODE(I64TruncUF32); RETURN(CONVERT); }
-#line 6431 "src/prebuilt/ast-lexer-gen.cc"
-yy1102:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 404 "src/ast-lexer.cc"
-		{ OPCODE(I64TruncUF64); RETURN(CONVERT); }
-#line 6439 "src/prebuilt/ast-lexer-gen.cc"
-yy1104:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy1126;
-		goto yy50;
-yy1105:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 441 "src/ast-lexer.cc"
-		{ RETURN(ASSERT_MALFORMED); }
-#line 6451 "src/prebuilt/ast-lexer-gen.cc"
-yy1107:
-		yych = *++lexer->cursor;
-		if (yych == 'i') goto yy1128;
-		goto yy50;
-yy1108:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy1129;
-		goto yy50;
-yy1109:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy1130;
-		goto yy50;
-yy1110:
-		yych = *++lexer->cursor;
-		if (yych == '2') goto yy1132;
-		goto yy50;
-yy1111:
-		yych = *++lexer->cursor;
-		if (yych == '4') goto yy1134;
-		goto yy50;
-yy1112:
-		yych = *++lexer->cursor;
-		if (yych == '2') goto yy1136;
-		goto yy50;
-yy1113:
-		yych = *++lexer->cursor;
-		if (yych == '4') goto yy1138;
-		goto yy50;
-yy1114:
-		yych = *++lexer->cursor;
-		if (yych == 'i') goto yy1140;
-		goto yy50;
-yy1115:
-		yych = *++lexer->cursor;
-		if (yych == '2') goto yy1141;
-		goto yy50;
-yy1116:
-		yych = *++lexer->cursor;
-		if (yych == '4') goto yy1143;
-		goto yy50;
-yy1117:
-		yych = *++lexer->cursor;
-		if (yych == '2') goto yy1145;
-		goto yy50;
-yy1118:
-		yych = *++lexer->cursor;
-		if (yych == '4') goto yy1147;
-		goto yy50;
-yy1119:
-		yych = *++lexer->cursor;
-		if (yych == 'i') goto yy1149;
-		goto yy50;
-yy1120:
-		yych = *++lexer->cursor;
-		if (yych == 'f') goto yy1150;
-		goto yy50;
-yy1121:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 394 "src/ast-lexer.cc"
-		{ OPCODE(I64ExtendSI32); RETURN(CONVERT); }
-#line 6515 "src/prebuilt/ast-lexer-gen.cc"
-yy1123:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 395 "src/ast-lexer.cc"
-		{ OPCODE(I64ExtendUI32); RETURN(CONVERT); }
-#line 6523 "src/prebuilt/ast-lexer-gen.cc"
-yy1125:
-		yych = *++lexer->cursor;
-		if (yych == 'f') goto yy1151;
-		goto yy50;
-yy1126:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 450 "src/ast-lexer.cc"
-		{ RETURN(ASSERT_EXHAUSTION); }
-#line 6535 "src/prebuilt/ast-lexer-gen.cc"
-yy1128:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy1152;
-		goto yy50;
-yy1129:
-		yych = *++lexer->cursor;
-		if (yych == 'o') goto yy1153;
-		goto yy50;
-yy1130:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 443 "src/ast-lexer.cc"
-		{ RETURN(ASSERT_UNLINKABLE); }
-#line 6551 "src/prebuilt/ast-lexer-gen.cc"
-yy1132:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 405 "src/ast-lexer.cc"
-		{ OPCODE(F32ConvertSI32); RETURN(CONVERT); }
-#line 6559 "src/prebuilt/ast-lexer-gen.cc"
-yy1134:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 407 "src/ast-lexer.cc"
-		{ OPCODE(F32ConvertSI64); RETURN(CONVERT); }
-#line 6567 "src/prebuilt/ast-lexer-gen.cc"
-yy1136:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 409 "src/ast-lexer.cc"
-		{ OPCODE(F32ConvertUI32); RETURN(CONVERT); }
-#line 6575 "src/prebuilt/ast-lexer-gen.cc"
-yy1138:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 411 "src/ast-lexer.cc"
-		{ OPCODE(F32ConvertUI64); RETURN(CONVERT); }
-#line 6583 "src/prebuilt/ast-lexer-gen.cc"
-yy1140:
-		yych = *++lexer->cursor;
-		if (yych == '3') goto yy1154;
-		goto yy50;
-yy1141:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 406 "src/ast-lexer.cc"
-		{ OPCODE(F64ConvertSI32); RETURN(CONVERT); }
-#line 6595 "src/prebuilt/ast-lexer-gen.cc"
-yy1143:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 408 "src/ast-lexer.cc"
-		{ OPCODE(F64ConvertSI64); RETURN(CONVERT); }
-#line 6603 "src/prebuilt/ast-lexer-gen.cc"
-yy1145:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 410 "src/ast-lexer.cc"
-		{ OPCODE(F64ConvertUI32); RETURN(CONVERT); }
-#line 6611 "src/prebuilt/ast-lexer-gen.cc"
-yy1147:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 412 "src/ast-lexer.cc"
-		{ OPCODE(F64ConvertUI64); RETURN(CONVERT); }
-#line 6619 "src/prebuilt/ast-lexer-gen.cc"
-yy1149:
-		yych = *++lexer->cursor;
-		if (yych == '6') goto yy1155;
-		goto yy50;
-yy1150:
-		yych = *++lexer->cursor;
-		if (yych == '3') goto yy1156;
-		goto yy50;
-yy1151:
-		yych = *++lexer->cursor;
-		if (yych == '6') goto yy1157;
-		goto yy50;
-yy1152:
-		yych = *++lexer->cursor;
-		if (yych == 'h') goto yy1158;
-		goto yy50;
-yy1153:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy1159;
-		goto yy50;
-yy1154:
-		yych = *++lexer->cursor;
-		if (yych == '2') goto yy1160;
-		goto yy50;
-yy1155:
-		yych = *++lexer->cursor;
-		if (yych == '4') goto yy1162;
-		goto yy50;
-yy1156:
-		yych = *++lexer->cursor;
-		if (yych == '2') goto yy1164;
-		goto yy50;
-yy1157:
-		yych = *++lexer->cursor;
-		if (yych == '4') goto yy1166;
-		goto yy50;
-yy1158:
-		yych = *++lexer->cursor;
-		if (yych == 'm') goto yy1168;
-		goto yy50;
-yy1159:
-		yych = *++lexer->cursor;
-		if (yych == 'i') goto yy1169;
-		goto yy50;
-yy1160:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 415 "src/ast-lexer.cc"
-		{ OPCODE(F32ReinterpretI32); RETURN(CONVERT); }
-#line 6671 "src/prebuilt/ast-lexer-gen.cc"
-yy1162:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 417 "src/ast-lexer.cc"
-		{ OPCODE(F64ReinterpretI64); RETURN(CONVERT); }
-#line 6679 "src/prebuilt/ast-lexer-gen.cc"
-yy1164:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 416 "src/ast-lexer.cc"
-		{ OPCODE(I32ReinterpretF32); RETURN(CONVERT); }
-#line 6687 "src/prebuilt/ast-lexer-gen.cc"
-yy1166:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 418 "src/ast-lexer.cc"
-		{ OPCODE(I64ReinterpretF64); RETURN(CONVERT); }
-#line 6695 "src/prebuilt/ast-lexer-gen.cc"
-yy1168:
-		yych = *++lexer->cursor;
-		if (yych == 'e') goto yy1170;
-		goto yy50;
-yy1169:
-		yych = *++lexer->cursor;
-		if (yych == 'c') goto yy1171;
-		goto yy50;
-yy1170:
-		yych = *++lexer->cursor;
-		if (yych == 't') goto yy1172;
-		goto yy50;
-yy1171:
-		yych = *++lexer->cursor;
-		if (yych == 'a') goto yy1173;
-		goto yy50;
-yy1172:
-		yych = *++lexer->cursor;
-		if (yych == 'i') goto yy1174;
-		goto yy50;
-yy1173:
-		yych = *++lexer->cursor;
-		if (yych == 'l') goto yy1175;
-		goto yy50;
-yy1174:
-		yych = *++lexer->cursor;
-		if (yych == 'c') goto yy1176;
-		goto yy50;
-yy1175:
-		yych = *++lexer->cursor;
-		if (yych == '_') goto yy1177;
-		goto yy50;
-yy1176:
-		yych = *++lexer->cursor;
-		if (yych == '_') goto yy1178;
-		goto yy50;
-yy1177:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy1179;
-		goto yy50;
-yy1178:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy1180;
-		goto yy50;
-yy1179:
-		yych = *++lexer->cursor;
-		if (yych == 'a') goto yy1181;
-		goto yy50;
-yy1180:
-		yych = *++lexer->cursor;
-		if (yych == 'a') goto yy1182;
-		goto yy50;
-yy1181:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy1183;
-		goto yy50;
-yy1182:
-		yych = *++lexer->cursor;
-		if (yych == 'n') goto yy1185;
-		goto yy50;
-yy1183:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 445 "src/ast-lexer.cc"
-		{
-                                  RETURN(ASSERT_RETURN_CANONICAL_NAN); }
-#line 6764 "src/prebuilt/ast-lexer-gen.cc"
-yy1185:
-		++lexer->cursor;
-		if (yybm[0+(yych = *lexer->cursor)] & 16) {
-			goto yy49;
-		}
-#line 447 "src/ast-lexer.cc"
-		{
-                                  RETURN(ASSERT_RETURN_ARITHMETIC_NAN); }
-#line 6773 "src/prebuilt/ast-lexer-gen.cc"
-	}
-}
-#line 473 "src/ast-lexer.cc"
-
-  }
-}
-
-static AstLexer* new_lexer(AstLexerSourceType type,
-                                    const char* filename) {
-  AstLexer* lexer = new AstLexer();
-  lexer->line = 1;
-  lexer->filename = filename;
-  lexer->source.type = type;
-  return lexer;
-}
-
-AstLexer* new_ast_file_lexer(const char* filename) {
-  AstLexer* lexer = new_lexer(AstLexerSourceType::File, filename);
-  lexer->source.file = fopen(filename, "rb");
-  if (!lexer->source.file) {
-    destroy_ast_lexer(lexer);
-    return nullptr;
-  }
-  return lexer;
-}
-
-AstLexer* new_ast_buffer_lexer(const char* filename,
-                                        const void* data,
-                                        size_t size) {
-  AstLexer* lexer =
-      new_lexer(AstLexerSourceType::Buffer, filename);
-  lexer->source.buffer.data = data;
-  lexer->source.buffer.size = size;
-  lexer->source.buffer.read_offset = 0;
-  return lexer;
-}
-
-void destroy_ast_lexer(AstLexer* lexer) {
-  if (lexer->source.type == AstLexerSourceType::File && lexer->source.file)
-    fclose(lexer->source.file);
-  delete [] lexer->buffer;
-  delete lexer;
-}
-
-enum class LineOffsetPosition {
-  Start,
-  End,
-};
-
-static Result scan_forward_for_line_offset_in_buffer(
-    const char* buffer_start,
-    const char* buffer_end,
-    int buffer_line,
-    size_t buffer_file_offset,
-    LineOffsetPosition find_position,
-    int find_line,
-    int* out_line,
-    size_t* out_line_offset) {
-  int line = buffer_line;
-  int line_offset = 0;
-  const char* p;
-  bool is_previous_carriage = 0;
-  for (p = buffer_start; p < buffer_end; ++p) {
-    if (*p == '\n') {
-      if (find_position == LineOffsetPosition::Start) {
-        if (++line == find_line) {
-          line_offset = buffer_file_offset + (p - buffer_start) + 1;
-          break;
-        }
-      } else {
-        if (line++ == find_line) {
-          line_offset =
-              buffer_file_offset + (p - buffer_start) - is_previous_carriage;
-          break;
-        }
-      }
-    }
-    is_previous_carriage = *p == '\r';
-  }
-
-  Result result = Result::Ok;
-  if (p == buffer_end) {
-    /* end of buffer */
-    if (find_position == LineOffsetPosition::Start) {
-      result = Result::Error;
-    } else {
-      line_offset = buffer_file_offset + (buffer_end - buffer_start);
-    }
-  }
-
-  *out_line = line;
-  *out_line_offset = line_offset;
-  return result;
-}
-
-static Result scan_forward_for_line_offset_in_file(
-    AstLexer* lexer,
-    int line,
-    size_t line_start_offset,
-    LineOffsetPosition find_position,
-    int find_line,
-    size_t* out_line_offset) {
-  FILE* lexer_file = lexer->source.file;
-  Result result = Result::Error;
-  long old_offset = ftell(lexer_file);
-  if (old_offset == -1)
-    return Result::Error;
-  size_t buffer_file_offset = line_start_offset;
-  if (fseek(lexer_file, buffer_file_offset, SEEK_SET) == -1)
-    goto cleanup;
-
-  while (1) {
-    char buffer[8 * 1024];
-    const size_t buffer_size = WABT_ARRAY_SIZE(buffer);
-    size_t read_bytes = fread(buffer, 1, buffer_size, lexer_file);
-    if (read_bytes == 0) {
-      /* end of buffer */
-      if (find_position == LineOffsetPosition::Start) {
-        result = Result::Error;
-      } else {
-        *out_line_offset = buffer_file_offset + read_bytes;
-        result = Result::Ok;
-      }
-      goto cleanup;
-    }
-
-    const char* buffer_end = buffer + read_bytes;
-    result = scan_forward_for_line_offset_in_buffer(
-        buffer, buffer_end, line, buffer_file_offset, find_position, find_line,
-        &line, out_line_offset);
-    if (result == Result::Ok)
-      goto cleanup;
-
-    buffer_file_offset += read_bytes;
-  }
-
-cleanup:
-  /* if this fails, we're screwed */
-  if (fseek(lexer_file, old_offset, SEEK_SET) == -1)
-    return Result::Error;
-  return result;
-}
-
-static Result scan_forward_for_line_offset(
-    AstLexer* lexer,
-    int line,
-    size_t line_start_offset,
-    LineOffsetPosition find_position,
-    int find_line,
-    size_t* out_line_offset) {
-  assert(line <= find_line);
-  if (lexer->source.type == AstLexerSourceType::Buffer) {
-    const char* source_buffer =
-        static_cast<const char*>(lexer->source.buffer.data);
-    const char* buffer_start = source_buffer + line_start_offset;
-    const char* buffer_end = source_buffer + lexer->source.buffer.size;
-    return scan_forward_for_line_offset_in_buffer(
-        buffer_start, buffer_end, line, line_start_offset, find_position,
-        find_line, &line, out_line_offset);
-  } else {
-    assert(lexer->source.type == AstLexerSourceType::File);
-    return scan_forward_for_line_offset_in_file(lexer, line, line_start_offset,
-                                                find_position, find_line,
-                                                out_line_offset);
-  }
-}
-
-static Result get_line_start_offset(AstLexer* lexer,
-                                        int line,
-                                        size_t* out_offset) {
-  int first_line = 1;
-  size_t first_offset = 0;
-  int current_line = lexer->line;
-  size_t current_offset = lexer->line_file_offset;
-
-  if (line == current_line) {
-    *out_offset = current_offset;
-    return Result::Ok;
-  } else if (line == first_line) {
-    *out_offset = first_offset;
-    return Result::Ok;
-  } else if (line > current_line) {
-    return scan_forward_for_line_offset(lexer, current_line, current_offset,
-                                        LineOffsetPosition::Start, line,
-                                        out_offset);
-  } else {
-    /* TODO(binji): optimize by storing more known line/offset pairs */
-    return scan_forward_for_line_offset(lexer, first_line, first_offset,
-                                        LineOffsetPosition::Start, line,
-                                        out_offset);
-  }
-}
-
-static Result get_offsets_from_line(AstLexer* lexer,
-                                        int line,
-                                        size_t* out_line_start,
-                                        size_t* out_line_end) {
-  size_t line_start;
-  if (WABT_FAILED(get_line_start_offset(lexer, line, &line_start)))
-    return Result::Error;
-
-  size_t line_end;
-  if (WABT_FAILED(scan_forward_for_line_offset(lexer, line, line_start,
-                                               LineOffsetPosition::End,
-                                               line, &line_end)))
-    return Result::Error;
-  *out_line_start = line_start;
-  *out_line_end = line_end;
-  return Result::Ok;
-}
-
-static void clamp_source_line_offsets_to_location(size_t line_start,
-                                                  size_t line_end,
-                                                  int first_column,
-                                                  int last_column,
-                                                  size_t max_line_length,
-                                                  size_t* out_new_line_start,
-                                                  size_t* out_new_line_end) {
-  size_t line_length = line_end - line_start;
-  if (line_length > max_line_length) {
-    size_t column_range = last_column - first_column;
-    size_t center_on;
-    if (column_range > max_line_length) {
-      /* the column range doesn't fit, just center on first_column */
-      center_on = first_column - 1;
-    } else {
-      /* the entire range fits, display it all in the center */
-      center_on = (first_column + last_column) / 2 - 1;
-    }
-    if (center_on > max_line_length / 2)
-      line_start += center_on - max_line_length / 2;
-    if (line_start > line_end - max_line_length)
-      line_start = line_end - max_line_length;
-    line_end = line_start + max_line_length;
-  }
-
-  *out_new_line_start = line_start;
-  *out_new_line_end = line_end;
-}
-
-Result ast_lexer_get_source_line(AstLexer* lexer,
-                                          const Location* loc,
-                                          size_t line_max_length,
-                                          char* line,
-                                          size_t* out_line_length,
-                                          int* out_column_offset) {
-  Result result;
-  size_t line_start; /* inclusive */
-  size_t line_end;   /* exclusive */
-  result = get_offsets_from_line(lexer, loc->line, &line_start, &line_end);
-  if (WABT_FAILED(result))
-    return result;
-
-  size_t new_line_start;
-  size_t new_line_end;
-  clamp_source_line_offsets_to_location(line_start, line_end, loc->first_column,
-                                        loc->last_column, line_max_length,
-                                        &new_line_start, &new_line_end);
-  bool has_start_ellipsis = line_start != new_line_start;
-  bool has_end_ellipsis = line_end != new_line_end;
-
-  char* write_start = line;
-  size_t line_length = new_line_end - new_line_start;
-  size_t read_start = new_line_start;
-  size_t read_length = line_length;
-  if (has_start_ellipsis) {
-    memcpy(line, "...", 3);
-    read_start += 3;
-    write_start += 3;
-    read_length -= 3;
-  }
-  if (has_end_ellipsis) {
-    memcpy(line + line_length - 3, "...", 3);
-    read_length -= 3;
-  }
-
-  if (lexer->source.type == AstLexerSourceType::Buffer) {
-    const char* buffer_read_start =
-        static_cast<const char*>(lexer->source.buffer.data) + read_start;
-    memcpy(write_start, buffer_read_start, read_length);
-  } else {
-    assert(lexer->source.type == AstLexerSourceType::File);
-    FILE* lexer_file = lexer->source.file;
-    long old_offset = ftell(lexer_file);
-    if (old_offset == -1)
-      return Result::Error;
-    if (fseek(lexer_file, read_start, SEEK_SET) == -1)
-      return Result::Error;
-    if (fread(write_start, 1, read_length, lexer_file) < read_length)
-      return Result::Error;
-    if (fseek(lexer_file, old_offset, SEEK_SET) == -1)
-      return Result::Error;
-  }
-
-  line[line_length] = '\0';
-
-  *out_line_length = line_length;
-  *out_column_offset = new_line_start - line_start;
-  return Result::Ok;
-}
-
-}  // namespace wabt
diff --git a/lib/wabt/src/prebuilt/ast-parser-gen.cc b/lib/wabt/src/prebuilt/ast-parser-gen.cc
deleted file mode 100644
index 32c4c75..0000000
--- a/lib/wabt/src/prebuilt/ast-parser-gen.cc
+++ /dev/null
@@ -1,4538 +0,0 @@
-/* A Bison parser, made by GNU Bison 3.0.2.  */
-
-/* Bison implementation for Yacc-like parsers in C
-
-   Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-/* As a special exception, you may create a larger work that contains
-   part or all of the Bison parser skeleton and distribute that work
-   under terms of your choice, so long as that work isn't itself a
-   parser generator using the skeleton or a modified version thereof
-   as a parser skeleton.  Alternatively, if you modify or redistribute
-   the parser skeleton itself, you may (at your option) remove this
-   special exception, which will cause the skeleton and the resulting
-   Bison output files to be licensed under the GNU General Public
-   License without this special exception.
-
-   This special exception was added by the Free Software Foundation in
-   version 2.2 of Bison.  */
-
-/* C LALR(1) parser skeleton written by Richard Stallman, by
-   simplifying the original so-called "semantic" parser.  */
-
-/* All symbols defined below should begin with yy or YY, to avoid
-   infringing on user name space.  This should be done even for local
-   variables, as they might otherwise be expanded by user macros.
-   There are some unavoidable exceptions within include files to
-   define necessary library symbols; they are noted "INFRINGES ON
-   USER NAME SPACE" below.  */
-
-/* Identify Bison output.  */
-#define YYBISON 1
-
-/* Bison version.  */
-#define YYBISON_VERSION "3.0.2"
-
-/* Skeleton name.  */
-#define YYSKELETON_NAME "yacc.c"
-
-/* Pure parsers.  */
-#define YYPURE 1
-
-/* Push parsers.  */
-#define YYPUSH 0
-
-/* Pull parsers.  */
-#define YYPULL 1
-
-/* Substitute the type names.  */
-#define YYSTYPE         WABT_AST_PARSER_STYPE
-#define YYLTYPE         WABT_AST_PARSER_LTYPE
-/* Substitute the variable and function names.  */
-#define yyparse         wabt_ast_parser_parse
-#define yylex           wabt_ast_parser_lex
-#define yyerror         wabt_ast_parser_error
-#define yydebug         wabt_ast_parser_debug
-#define yynerrs         wabt_ast_parser_nerrs
-
-
-/* Copy the first part of user declarations.  */
-#line 17 "src/ast-parser.y" /* yacc.c:339  */
-
-#include <assert.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <algorithm>
-#include <utility>
-
-#include "ast-parser.h"
-#include "ast-parser-lexer-shared.h"
-#include "binary-reader-ast.h"
-#include "binary-reader.h"
-#include "literal.h"
-
-#define INVALID_VAR_INDEX (-1)
-
-#define RELOCATE_STACK(type, array, stack_base, old_size, new_size)   \
-  do {                                                                \
-    type* new_stack = new type[new_size]();                           \
-    std::move((stack_base), (stack_base) + (old_size), (new_stack));  \
-    if ((stack_base) != (array)) {                                    \
-      delete[](stack_base);                                           \
-    } else {                                                          \
-      for (size_t i = 0; i < (old_size); ++i) {                       \
-        (stack_base)[i].~type();                                      \
-      }                                                               \
-    }                                                                 \
-    /* Cache the pointer in the parser struct to be deleted later. */ \
-    parser->array = (stack_base) = new_stack;                         \
-  } while (0)
-
-#define yyoverflow(message, ss, ss_size, vs, vs_size, ls, ls_size, new_size) \
-  do {                                                                       \
-    size_t old_size = *(new_size);                                           \
-    *(new_size) *= 2;                                                        \
-    RELOCATE_STACK(yytype_int16, yyssa, *(ss), old_size, *(new_size));       \
-    RELOCATE_STACK(YYSTYPE, yyvsa, *(vs), old_size, *(new_size));            \
-    RELOCATE_STACK(YYLTYPE, yylsa, *(ls), old_size, *(new_size));            \
-  } while (0)
-
-#define DUPTEXT(dst, src)                                \
-  (dst).start = wabt_strndup((src).start, (src).length); \
-  (dst).length = (src).length
-
-#define YYLLOC_DEFAULT(Current, Rhs, N)                       \
-  do                                                          \
-    if (N) {                                                  \
-      (Current).filename = YYRHSLOC(Rhs, 1).filename;         \
-      (Current).line = YYRHSLOC(Rhs, 1).line;                 \
-      (Current).first_column = YYRHSLOC(Rhs, 1).first_column; \
-      (Current).last_column = YYRHSLOC(Rhs, N).last_column;   \
-    } else {                                                  \
-      (Current).filename = nullptr;                           \
-      (Current).line = YYRHSLOC(Rhs, 0).line;                 \
-      (Current).first_column = (Current).last_column =        \
-          YYRHSLOC(Rhs, 0).last_column;                       \
-    }                                                         \
-  while (0)
-
-#define APPEND_FIELD_TO_LIST(module, field, Kind, kind, loc_, item) \
-  do {                                                              \
-    field = append_module_field(module);                            \
-    field->loc = loc_;                                              \
-    field->type = ModuleFieldType::Kind;                            \
-    field->kind = item;                                             \
-  } while (0)
-
-#define APPEND_ITEM_TO_VECTOR(module, kinds, item_ptr) \
-  (module)->kinds.push_back(item_ptr)
-
-#define INSERT_BINDING(module, kind, kinds, loc_, name) \
-  do                                                    \
-    if ((name).start) {                                 \
-      (module)->kind##_bindings.emplace(                \
-          string_slice_to_string(name),                 \
-          Binding(loc_, (module)->kinds.size() - 1));   \
-    }                                                   \
-  while (0)
-
-#define APPEND_INLINE_EXPORT(module, Kind, loc_, value, index_)         \
-  do                                                                    \
-    if ((value)->export_.has_export) {                                  \
-      ModuleField* export_field;                                        \
-      APPEND_FIELD_TO_LIST(module, export_field, Export, export_, loc_, \
-                           (value)->export_.export_.release());         \
-      export_field->export_->kind = ExternalKind::Kind;                 \
-      export_field->export_->var.loc = loc_;                            \
-      export_field->export_->var.index = index_;                        \
-      APPEND_ITEM_TO_VECTOR(module, exports, export_field->export_);    \
-      INSERT_BINDING(module, export, exports, export_field->loc,        \
-                     export_field->export_->name);                      \
-    }                                                                   \
-  while (0)
-
-#define CHECK_IMPORT_ORDERING(module, kind, kinds, loc_)            \
-  do {                                                              \
-    if ((module)->kinds.size() != (module)->num_##kind##_imports) { \
-      ast_parser_error(                                             \
-          &loc_, lexer, parser,                                     \
-          "imports must occur before all non-import definitions");  \
-    }                                                               \
-  } while (0)
-
-#define CHECK_END_LABEL(loc, begin_label, end_label)                       \
-  do {                                                                     \
-    if (!string_slice_is_empty(&(end_label))) {                            \
-      if (string_slice_is_empty(&(begin_label))) {                         \
-        ast_parser_error(&loc, lexer, parser,                              \
-                         "unexpected label \"" PRIstringslice "\"",        \
-                         WABT_PRINTF_STRING_SLICE_ARG(end_label));         \
-      } else if (!string_slices_are_equal(&(begin_label), &(end_label))) { \
-        ast_parser_error(&loc, lexer, parser,                              \
-                         "mismatching label \"" PRIstringslice             \
-                         "\" != \"" PRIstringslice "\"",                   \
-                         WABT_PRINTF_STRING_SLICE_ARG(begin_label),        \
-                         WABT_PRINTF_STRING_SLICE_ARG(end_label));         \
-      }                                                                    \
-      destroy_string_slice(&(end_label));                                  \
-    }                                                                      \
-  } while (0)
-
-#define YYMALLOC(size) new char [size]
-#define YYFREE(p) delete [] (p)
-
-#define USE_NATURAL_ALIGNMENT (~0)
-
-namespace wabt {
-
-ExprList join_exprs1(Location* loc, Expr* expr1);
-ExprList join_exprs2(Location* loc,
-                         ExprList* expr1,
-                         Expr* expr2);
-
-Result parse_const(Type type,
-                       LiteralType literal_type,
-                       const char* s,
-                       const char* end,
-                       Const* out);
-void dup_text_list(TextList* text_list, char** out_data, size_t* out_size);
-
-bool is_empty_signature(const FuncSignature* sig);
-
-void append_implicit_func_declaration(Location*,
-                                      Module*,
-                                      FuncDeclaration*);
-
-struct BinaryErrorCallbackData {
-  Location* loc;
-  AstLexer* lexer;
-  AstParser* parser;
-};
-
-static bool on_read_binary_error(uint32_t offset, const char* error,
-                                 void* user_data);
-
-#define wabt_ast_parser_lex ast_lexer_lex
-#define wabt_ast_parser_error ast_parser_error
-
-
-#line 235 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:339  */
-
-# ifndef YY_NULLPTR
-#  if defined __cplusplus && 201103L <= __cplusplus
-#   define YY_NULLPTR nullptr
-#  else
-#   define YY_NULLPTR 0
-#  endif
-# endif
-
-/* Enabling verbose error messages.  */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 1
-#endif
-
-/* In a future release of Bison, this section will be replaced
-   by #include "ast-parser-gen.hh".  */
-#ifndef YY_WABT_AST_PARSER_SRC_PREBUILT_AST_PARSER_GEN_HH_INCLUDED
-# define YY_WABT_AST_PARSER_SRC_PREBUILT_AST_PARSER_GEN_HH_INCLUDED
-/* Debug traces.  */
-#ifndef WABT_AST_PARSER_DEBUG
-# if defined YYDEBUG
-#if YYDEBUG
-#   define WABT_AST_PARSER_DEBUG 1
-#  else
-#   define WABT_AST_PARSER_DEBUG 0
-#  endif
-# else /* ! defined YYDEBUG */
-#  define WABT_AST_PARSER_DEBUG 0
-# endif /* ! defined YYDEBUG */
-#endif  /* ! defined WABT_AST_PARSER_DEBUG */
-#if WABT_AST_PARSER_DEBUG
-extern int wabt_ast_parser_debug;
-#endif
-
-/* Token type.  */
-#ifndef WABT_AST_PARSER_TOKENTYPE
-# define WABT_AST_PARSER_TOKENTYPE
-  enum wabt_ast_parser_tokentype
-  {
-    WABT_TOKEN_TYPE_EOF = 0,
-    WABT_TOKEN_TYPE_LPAR = 258,
-    WABT_TOKEN_TYPE_RPAR = 259,
-    WABT_TOKEN_TYPE_NAT = 260,
-    WABT_TOKEN_TYPE_INT = 261,
-    WABT_TOKEN_TYPE_FLOAT = 262,
-    WABT_TOKEN_TYPE_TEXT = 263,
-    WABT_TOKEN_TYPE_VAR = 264,
-    WABT_TOKEN_TYPE_VALUE_TYPE = 265,
-    WABT_TOKEN_TYPE_ANYFUNC = 266,
-    WABT_TOKEN_TYPE_MUT = 267,
-    WABT_TOKEN_TYPE_NOP = 268,
-    WABT_TOKEN_TYPE_DROP = 269,
-    WABT_TOKEN_TYPE_BLOCK = 270,
-    WABT_TOKEN_TYPE_END = 271,
-    WABT_TOKEN_TYPE_IF = 272,
-    WABT_TOKEN_TYPE_THEN = 273,
-    WABT_TOKEN_TYPE_ELSE = 274,
-    WABT_TOKEN_TYPE_LOOP = 275,
-    WABT_TOKEN_TYPE_BR = 276,
-    WABT_TOKEN_TYPE_BR_IF = 277,
-    WABT_TOKEN_TYPE_BR_TABLE = 278,
-    WABT_TOKEN_TYPE_CALL = 279,
-    WABT_TOKEN_TYPE_CALL_IMPORT = 280,
-    WABT_TOKEN_TYPE_CALL_INDIRECT = 281,
-    WABT_TOKEN_TYPE_RETURN = 282,
-    WABT_TOKEN_TYPE_GET_LOCAL = 283,
-    WABT_TOKEN_TYPE_SET_LOCAL = 284,
-    WABT_TOKEN_TYPE_TEE_LOCAL = 285,
-    WABT_TOKEN_TYPE_GET_GLOBAL = 286,
-    WABT_TOKEN_TYPE_SET_GLOBAL = 287,
-    WABT_TOKEN_TYPE_LOAD = 288,
-    WABT_TOKEN_TYPE_STORE = 289,
-    WABT_TOKEN_TYPE_OFFSET_EQ_NAT = 290,
-    WABT_TOKEN_TYPE_ALIGN_EQ_NAT = 291,
-    WABT_TOKEN_TYPE_CONST = 292,
-    WABT_TOKEN_TYPE_UNARY = 293,
-    WABT_TOKEN_TYPE_BINARY = 294,
-    WABT_TOKEN_TYPE_COMPARE = 295,
-    WABT_TOKEN_TYPE_CONVERT = 296,
-    WABT_TOKEN_TYPE_SELECT = 297,
-    WABT_TOKEN_TYPE_UNREACHABLE = 298,
-    WABT_TOKEN_TYPE_CURRENT_MEMORY = 299,
-    WABT_TOKEN_TYPE_GROW_MEMORY = 300,
-    WABT_TOKEN_TYPE_FUNC = 301,
-    WABT_TOKEN_TYPE_START = 302,
-    WABT_TOKEN_TYPE_TYPE = 303,
-    WABT_TOKEN_TYPE_PARAM = 304,
-    WABT_TOKEN_TYPE_RESULT = 305,
-    WABT_TOKEN_TYPE_LOCAL = 306,
-    WABT_TOKEN_TYPE_GLOBAL = 307,
-    WABT_TOKEN_TYPE_MODULE = 308,
-    WABT_TOKEN_TYPE_TABLE = 309,
-    WABT_TOKEN_TYPE_ELEM = 310,
-    WABT_TOKEN_TYPE_MEMORY = 311,
-    WABT_TOKEN_TYPE_DATA = 312,
-    WABT_TOKEN_TYPE_OFFSET = 313,
-    WABT_TOKEN_TYPE_IMPORT = 314,
-    WABT_TOKEN_TYPE_EXPORT = 315,
-    WABT_TOKEN_TYPE_REGISTER = 316,
-    WABT_TOKEN_TYPE_INVOKE = 317,
-    WABT_TOKEN_TYPE_GET = 318,
-    WABT_TOKEN_TYPE_ASSERT_MALFORMED = 319,
-    WABT_TOKEN_TYPE_ASSERT_INVALID = 320,
-    WABT_TOKEN_TYPE_ASSERT_UNLINKABLE = 321,
-    WABT_TOKEN_TYPE_ASSERT_RETURN = 322,
-    WABT_TOKEN_TYPE_ASSERT_RETURN_CANONICAL_NAN = 323,
-    WABT_TOKEN_TYPE_ASSERT_RETURN_ARITHMETIC_NAN = 324,
-    WABT_TOKEN_TYPE_ASSERT_TRAP = 325,
-    WABT_TOKEN_TYPE_ASSERT_EXHAUSTION = 326,
-    WABT_TOKEN_TYPE_INPUT = 327,
-    WABT_TOKEN_TYPE_OUTPUT = 328,
-    WABT_TOKEN_TYPE_LOW = 329
-  };
-#endif
-
-/* Value type.  */
-#if ! defined WABT_AST_PARSER_STYPE && ! defined WABT_AST_PARSER_STYPE_IS_DECLARED
-typedef ::wabt::Token WABT_AST_PARSER_STYPE;
-# define WABT_AST_PARSER_STYPE_IS_TRIVIAL 1
-# define WABT_AST_PARSER_STYPE_IS_DECLARED 1
-#endif
-
-/* Location type.  */
-#if ! defined WABT_AST_PARSER_LTYPE && ! defined WABT_AST_PARSER_LTYPE_IS_DECLARED
-typedef struct WABT_AST_PARSER_LTYPE WABT_AST_PARSER_LTYPE;
-struct WABT_AST_PARSER_LTYPE
-{
-  int first_line;
-  int first_column;
-  int last_line;
-  int last_column;
-};
-# define WABT_AST_PARSER_LTYPE_IS_DECLARED 1
-# define WABT_AST_PARSER_LTYPE_IS_TRIVIAL 1
-#endif
-
-
-
-int wabt_ast_parser_parse (::wabt::AstLexer* lexer, ::wabt::AstParser* parser);
-
-#endif /* !YY_WABT_AST_PARSER_SRC_PREBUILT_AST_PARSER_GEN_HH_INCLUDED  */
-
-/* Copy the second part of user declarations.  */
-
-#line 383 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:358  */
-
-#ifdef short
-# undef short
-#endif
-
-#ifdef YYTYPE_UINT8
-typedef YYTYPE_UINT8 yytype_uint8;
-#else
-typedef unsigned char yytype_uint8;
-#endif
-
-#ifdef YYTYPE_INT8
-typedef YYTYPE_INT8 yytype_int8;
-#else
-typedef signed char yytype_int8;
-#endif
-
-#ifdef YYTYPE_UINT16
-typedef YYTYPE_UINT16 yytype_uint16;
-#else
-typedef unsigned short int yytype_uint16;
-#endif
-
-#ifdef YYTYPE_INT16
-typedef YYTYPE_INT16 yytype_int16;
-#else
-typedef short int yytype_int16;
-#endif
-
-#ifndef YYSIZE_T
-# ifdef __SIZE_TYPE__
-#  define YYSIZE_T __SIZE_TYPE__
-# elif defined size_t
-#  define YYSIZE_T size_t
-# elif ! defined YYSIZE_T
-#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-#  define YYSIZE_T size_t
-# else
-#  define YYSIZE_T unsigned int
-# endif
-#endif
-
-#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
-
-#ifndef YY_
-# if defined YYENABLE_NLS && YYENABLE_NLS
-#  if ENABLE_NLS
-#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
-#   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
-#  endif
-# endif
-# ifndef YY_
-#  define YY_(Msgid) Msgid
-# endif
-#endif
-
-#ifndef YY_ATTRIBUTE
-# if (defined __GNUC__                                               \
-      && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__)))  \
-     || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
-#  define YY_ATTRIBUTE(Spec) __attribute__(Spec)
-# else
-#  define YY_ATTRIBUTE(Spec) /* empty */
-# endif
-#endif
-
-#ifndef YY_ATTRIBUTE_PURE
-# define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))
-#endif
-
-#ifndef YY_ATTRIBUTE_UNUSED
-# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
-#endif
-
-#if !defined _Noreturn \
-     && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
-# if defined _MSC_VER && 1200 <= _MSC_VER
-#  define _Noreturn __declspec (noreturn)
-# else
-#  define _Noreturn YY_ATTRIBUTE ((__noreturn__))
-# endif
-#endif
-
-/* Suppress unused-variable warnings by "using" E.  */
-#if ! defined lint || defined __GNUC__
-# define YYUSE(E) ((void) (E))
-#else
-# define YYUSE(E) /* empty */
-#endif
-
-#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
-/* Suppress an incorrect diagnostic about yylval being uninitialized.  */
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
-    _Pragma ("GCC diagnostic push") \
-    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
-    _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
-    _Pragma ("GCC diagnostic pop")
-#else
-# define YY_INITIAL_VALUE(Value) Value
-#endif
-#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END
-#endif
-#ifndef YY_INITIAL_VALUE
-# define YY_INITIAL_VALUE(Value) /* Nothing. */
-#endif
-
-
-#if ! defined yyoverflow || YYERROR_VERBOSE
-
-/* The parser invokes alloca or malloc; define the necessary symbols.  */
-
-# ifdef YYSTACK_USE_ALLOCA
-#  if YYSTACK_USE_ALLOCA
-#   ifdef __GNUC__
-#    define YYSTACK_ALLOC __builtin_alloca
-#   elif defined __BUILTIN_VA_ARG_INCR
-#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
-#   elif defined _AIX
-#    define YYSTACK_ALLOC __alloca
-#   elif defined _MSC_VER
-#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
-#    define alloca _alloca
-#   else
-#    define YYSTACK_ALLOC alloca
-#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
-#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-      /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
-#     ifndef EXIT_SUCCESS
-#      define EXIT_SUCCESS 0
-#     endif
-#    endif
-#   endif
-#  endif
-# endif
-
-# ifdef YYSTACK_ALLOC
-   /* Pacify GCC's 'empty if-body' warning.  */
-#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
-#  ifndef YYSTACK_ALLOC_MAXIMUM
-    /* The OS might guarantee only one guard page at the bottom of the stack,
-       and a page size can be as small as 4096 bytes.  So we cannot safely
-       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
-       to allow for a few compiler-allocated temporary stack slots.  */
-#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
-#  endif
-# else
-#  define YYSTACK_ALLOC YYMALLOC
-#  define YYSTACK_FREE YYFREE
-#  ifndef YYSTACK_ALLOC_MAXIMUM
-#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
-#  endif
-#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
-       && ! ((defined YYMALLOC || defined malloc) \
-             && (defined YYFREE || defined free)))
-#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#   ifndef EXIT_SUCCESS
-#    define EXIT_SUCCESS 0
-#   endif
-#  endif
-#  ifndef YYMALLOC
-#   define YYMALLOC malloc
-#   if ! defined malloc && ! defined EXIT_SUCCESS
-void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
-#   endif
-#  endif
-#  ifndef YYFREE
-#   define YYFREE free
-#   if ! defined free && ! defined EXIT_SUCCESS
-void free (void *); /* INFRINGES ON USER NAME SPACE */
-#   endif
-#  endif
-# endif
-#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
-
-
-#if (! defined yyoverflow \
-     && (! defined __cplusplus \
-         || (defined WABT_AST_PARSER_LTYPE_IS_TRIVIAL && WABT_AST_PARSER_LTYPE_IS_TRIVIAL \
-             && defined WABT_AST_PARSER_STYPE_IS_TRIVIAL && WABT_AST_PARSER_STYPE_IS_TRIVIAL)))
-
-/* A type that is properly aligned for any stack member.  */
-union yyalloc
-{
-  yytype_int16 yyss_alloc;
-  YYSTYPE yyvs_alloc;
-  YYLTYPE yyls_alloc;
-};
-
-/* The size of the maximum gap between one aligned stack and the next.  */
-# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
-
-/* The size of an array large to enough to hold all stacks, each with
-   N elements.  */
-# define YYSTACK_BYTES(N) \
-     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
-      + 2 * YYSTACK_GAP_MAXIMUM)
-
-# define YYCOPY_NEEDED 1
-
-/* Relocate STACK from its old location to the new one.  The
-   local variables YYSIZE and YYSTACKSIZE give the old and new number of
-   elements in the stack, and YYPTR gives the new location of the
-   stack.  Advance YYPTR to a properly aligned location for the next
-   stack.  */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
-    do                                                                  \
-      {                                                                 \
-        YYSIZE_T yynewbytes;                                            \
-        YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
-        Stack = &yyptr->Stack_alloc;                                    \
-        yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
-        yyptr += yynewbytes / sizeof (*yyptr);                          \
-      }                                                                 \
-    while (0)
-
-#endif
-
-#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
-/* Copy COUNT objects from SRC to DST.  The source and destination do
-   not overlap.  */
-# ifndef YYCOPY
-#  if defined __GNUC__ && 1 < __GNUC__
-#   define YYCOPY(Dst, Src, Count) \
-      __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
-#  else
-#   define YYCOPY(Dst, Src, Count)              \
-      do                                        \
-        {                                       \
-          YYSIZE_T yyi;                         \
-          for (yyi = 0; yyi < (Count); yyi++)   \
-            (Dst)[yyi] = (Src)[yyi];            \
-        }                                       \
-      while (0)
-#  endif
-# endif
-#endif /* !YYCOPY_NEEDED */
-
-/* YYFINAL -- State number of the termination state.  */
-#define YYFINAL  10
-/* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   797
-
-/* YYNTOKENS -- Number of terminals.  */
-#define YYNTOKENS  75
-/* YYNNTS -- Number of nonterminals.  */
-#define YYNNTS  63
-/* YYNRULES -- Number of rules.  */
-#define YYNRULES  172
-/* YYNSTATES -- Number of states.  */
-#define YYNSTATES  405
-
-/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
-   by yylex, with out-of-bounds checking.  */
-#define YYUNDEFTOK  2
-#define YYMAXUTOK   329
-
-#define YYTRANSLATE(YYX)                                                \
-  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-
-/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
-   as returned by yylex, without out-of-bounds checking.  */
-static const yytype_uint8 yytranslate[] =
-{
-       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
-       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
-      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
-      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
-      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
-      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
-      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
-      65,    66,    67,    68,    69,    70,    71,    72,    73,    74
-};
-
-#if WABT_AST_PARSER_DEBUG
-  /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
-static const yytype_uint16 yyrline[] =
-{
-       0,   293,   293,   299,   309,   310,   314,   332,   333,   339,
-     342,   347,   354,   357,   358,   363,   370,   378,   384,   390,
-     395,   402,   408,   419,   423,   427,   434,   439,   446,   447,
-     453,   454,   457,   461,   462,   466,   467,   477,   478,   489,
-     490,   491,   494,   497,   500,   503,   506,   509,   512,   515,
-     518,   521,   524,   527,   530,   533,   536,   539,   542,   545,
-     558,   561,   564,   567,   570,   573,   578,   583,   588,   593,
-     601,   610,   614,   617,   622,   627,   637,   641,   645,   649,
-     653,   657,   664,   665,   673,   674,   682,   687,   688,   694,
-     700,   710,   716,   722,   732,   784,   794,   801,   809,   819,
-     822,   826,   833,   845,   853,   875,   882,   894,   902,   923,
-     945,   953,   966,   974,   982,   988,   994,  1002,  1007,  1015,
-    1023,  1029,  1035,  1044,  1052,  1057,  1062,  1067,  1074,  1081,
-    1085,  1088,  1100,  1105,  1114,  1118,  1121,  1128,  1137,  1154,
-    1171,  1181,  1187,  1193,  1199,  1232,  1242,  1262,  1273,  1301,
-    1306,  1314,  1324,  1334,  1340,  1346,  1352,  1358,  1364,  1369,
-    1374,  1380,  1389,  1394,  1395,  1400,  1409,  1410,  1417,  1429,
-    1430,  1437,  1503
-};
-#endif
-
-#if WABT_AST_PARSER_DEBUG || YYERROR_VERBOSE || 1
-/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
-   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
-static const char *const yytname[] =
-{
-  "\"EOF\"", "error", "$undefined", "\"(\"", "\")\"", "NAT", "INT",
-  "FLOAT", "TEXT", "VAR", "VALUE_TYPE", "ANYFUNC", "MUT", "NOP", "DROP",
-  "BLOCK", "END", "IF", "THEN", "ELSE", "LOOP", "BR", "BR_IF", "BR_TABLE",
-  "CALL", "CALL_IMPORT", "CALL_INDIRECT", "RETURN", "GET_LOCAL",
-  "SET_LOCAL", "TEE_LOCAL", "GET_GLOBAL", "SET_GLOBAL", "LOAD", "STORE",
-  "OFFSET_EQ_NAT", "ALIGN_EQ_NAT", "CONST", "UNARY", "BINARY", "COMPARE",
-  "CONVERT", "SELECT", "UNREACHABLE", "CURRENT_MEMORY", "GROW_MEMORY",
-  "FUNC", "START", "TYPE", "PARAM", "RESULT", "LOCAL", "GLOBAL", "MODULE",
-  "TABLE", "ELEM", "MEMORY", "DATA", "OFFSET", "IMPORT", "EXPORT",
-  "REGISTER", "INVOKE", "GET", "ASSERT_MALFORMED", "ASSERT_INVALID",
-  "ASSERT_UNLINKABLE", "ASSERT_RETURN", "ASSERT_RETURN_CANONICAL_NAN",
-  "ASSERT_RETURN_ARITHMETIC_NAN", "ASSERT_TRAP", "ASSERT_EXHAUSTION",
-  "INPUT", "OUTPUT", "LOW", "$accept", "non_empty_text_list", "text_list",
-  "quoted_text", "value_type_list", "elem_type", "global_type",
-  "func_type", "func_sig", "table_sig", "memory_sig", "limits", "type_use",
-  "nat", "literal", "var", "var_list", "bind_var_opt", "bind_var",
-  "labeling_opt", "offset_opt", "align_opt", "instr", "plain_instr",
-  "block_instr", "block", "expr", "expr1", "if_", "instr_list",
-  "expr_list", "const_expr", "func_fields", "func_body", "func_info",
-  "func", "offset", "elem", "table", "data", "memory", "global",
-  "import_kind", "import", "inline_import", "export_kind", "export",
-  "inline_export_opt", "inline_export", "type_def", "start",
-  "module_fields", "raw_module", "module", "script_var_opt", "action",
-  "assertion", "cmd", "cmd_list", "const", "const_list", "script",
-  "script_start", YY_NULLPTR
-};
-#endif
-
-# ifdef YYPRINT
-/* YYTOKNUM[NUM] -- (External) token number corresponding to the
-   (internal) symbol number NUM (which must be that of a token).  */
-static const yytype_uint16 yytoknum[] =
-{
-       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
-     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
-     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
-     285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
-     295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
-     305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
-     315,   316,   317,   318,   319,   320,   321,   322,   323,   324,
-     325,   326,   327,   328,   329
-};
-# endif
-
-#define YYPACT_NINF -274
-
-#define yypact_value_is_default(Yystate) \
-  (!!((Yystate) == (-274)))
-
-#define YYTABLE_NINF -30
-
-#define yytable_value_is_error(Yytable_value) \
-  0
-
-  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
-     STATE-NUM.  */
-static const yytype_int16 yypact[] =
-{
-    -274,    41,  -274,    46,    68,  -274,  -274,  -274,  -274,  -274,
-    -274,    60,    73,    82,    82,   121,   121,   121,   123,   123,
-     123,   142,   123,  -274,   166,  -274,  -274,    82,  -274,    73,
-      73,   128,    73,    73,    73,   104,  -274,   184,   205,     0,
-      73,    73,    73,  -274,   161,   221,   213,  -274,   243,   245,
-     254,   255,   228,  -274,  -274,   256,   263,   264,  -274,  -274,
-     116,  -274,  -274,  -274,  -274,  -274,  -274,  -274,  -274,  -274,
-    -274,  -274,  -274,   231,  -274,  -274,  -274,  -274,   153,  -274,
-    -274,  -274,  -274,  -274,    60,    98,    69,    60,    60,   111,
-      60,   111,    73,    73,  -274,   237,   408,  -274,  -274,  -274,
-     265,   224,   267,   204,    58,   270,   329,   271,  -274,  -274,
-     272,   271,   166,    73,   273,  -274,  -274,  -274,   275,   288,
-    -274,  -274,    60,    60,    60,    98,    98,  -274,    98,    98,
-    -274,    98,    98,    98,    98,    98,   242,   242,   237,  -274,
-    -274,  -274,  -274,  -274,  -274,  -274,  -274,   441,   474,  -274,
-    -274,  -274,  -274,  -274,  -274,   276,   278,   507,  -274,   279,
-    -274,   280,     6,  -274,   474,    89,    89,   186,   284,   114,
-    -274,    60,    60,    60,   474,   287,   289,  -274,   118,   170,
-     284,   284,   291,   166,   283,   292,   301,    34,   302,  -274,
-      98,    60,  -274,    60,    73,    73,  -274,  -274,  -274,  -274,
-    -274,  -274,    98,  -274,  -274,  -274,  -274,  -274,  -274,  -274,
-    -274,   247,   247,  -274,   612,   303,   752,  -274,  -274,   203,
-     309,   319,   573,   441,   320,   206,   330,  -274,   282,  -274,
-     331,   328,   337,   474,   341,   343,   284,  -274,   361,   371,
-    -274,  -274,  -274,   372,   287,  -274,  -274,   197,  -274,  -274,
-     166,   373,  -274,   376,   238,   377,  -274,    52,   378,    98,
-      98,    98,    98,  -274,   379,   173,   355,   174,   175,   369,
-      73,   380,   375,   370,    48,   384,   214,  -274,  -274,  -274,
-    -274,  -274,  -274,  -274,  -274,   387,  -274,  -274,   389,  -274,
-    -274,   390,  -274,  -274,  -274,   388,  -274,  -274,    99,  -274,
-    -274,  -274,  -274,   406,  -274,  -274,   166,  -274,    60,    60,
-      60,    60,  -274,   420,   422,   423,   429,  -274,   441,  -274,
-     453,   540,   540,   455,   456,  -274,  -274,    60,    60,    60,
-      60,   188,   189,  -274,  -274,  -274,  -274,   686,   463,  -274,
-     472,   486,   278,    89,   284,   284,  -274,  -274,  -274,  -274,
-    -274,   441,   651,  -274,  -274,   540,  -274,  -274,  -274,   474,
-    -274,   489,  -274,   217,   474,   719,   287,  -274,   495,   505,
-     519,   521,   522,   528,  -274,  -274,   477,   492,   552,   554,
-     474,  -274,  -274,  -274,  -274,  -274,  -274,  -274,    60,  -274,
-    -274,   556,   561,  -274,   193,   557,   572,  -274,   474,   570,
-     587,   474,  -274,   588,  -274
-};
-
-  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
-     Performed when YYTABLE does not specify something else to do.  Zero
-     means the default is an error.  */
-static const yytype_uint8 yydefact[] =
-{
-     166,   171,   172,     0,     0,   148,   164,   162,   163,   167,
-       1,    30,     0,   149,   149,     0,     0,     0,     0,     0,
-       0,     0,     0,    32,   135,    31,     6,   149,   150,     0,
-       0,     0,     0,     0,     0,     0,   169,     0,     0,     0,
-       0,     0,     0,     2,     0,     0,     0,   169,     0,     0,
-       0,     0,     0,   158,   159,     0,     0,     0,   147,     3,
-       0,   146,   140,   141,   138,   142,   139,   137,   144,   145,
-     136,   143,   165,     0,   152,   153,   154,   155,     0,   157,
-     170,   156,   160,   161,    30,     0,     0,    30,    30,     0,
-      30,     0,     0,     0,   151,     0,    82,    22,    27,    26,
-       0,     0,     0,     0,     0,   129,     0,     0,   100,    28,
-     129,     0,     4,     0,     0,    23,    24,    25,     0,     0,
-      43,    44,    33,    33,    33,     0,     0,    28,     0,     0,
-      49,     0,     0,     0,     0,     0,    35,    35,     0,    60,
-      61,    62,    63,    45,    42,    64,    65,    82,    82,    39,
-      40,    41,    91,    94,    87,     0,    13,    82,   134,    13,
-     132,     0,     0,    10,    82,     0,     0,     0,     0,     0,
-     130,    33,    33,    33,    82,    84,     0,    28,     0,     0,
-       0,     0,   130,     4,     5,     0,     0,     0,     0,   168,
-       0,     7,     7,     7,     0,     0,    34,     7,     7,     7,
-      46,    47,     0,    50,    51,    52,    53,    54,    55,    56,
-      36,    37,    37,    59,     0,     0,     0,    83,    98,     0,
-       0,     0,     0,    82,     0,     0,     0,   133,     0,    86,
-       0,     0,     0,    82,     0,     0,    19,     9,     0,     0,
-       7,     7,     7,     0,    84,    72,    71,     0,   102,    29,
-       4,     0,    18,     0,     0,     0,   106,     0,     0,     0,
-       0,     0,     0,   128,     0,     0,     0,     0,     0,     0,
-       0,     0,    82,     0,     0,     0,    48,    38,    57,    58,
-      96,     7,     7,   119,   118,     0,    97,    12,     0,   111,
-     122,     0,   120,    17,    20,     0,   103,    73,     0,    74,
-      99,    85,   101,     0,   121,   107,     4,   105,    30,    30,
-      30,    30,   117,     0,     0,     0,     0,    21,    82,     8,
-       0,    82,    82,     0,     0,   131,    70,    33,    33,    33,
-      33,     0,     0,    95,    11,   110,    28,     0,     0,    75,
-       0,     0,    13,     0,     0,     0,   124,   127,   125,   126,
-      89,    82,     0,    88,    92,    82,   123,    66,    68,    82,
-      67,    14,    16,     0,    82,     0,    81,   109,     0,     0,
-       0,     0,     0,     0,    90,    93,     0,     0,     0,     0,
-      82,    80,   108,   113,   112,   116,   114,   115,    33,     7,
-     104,    77,     0,    69,     0,     0,    79,    15,    82,     0,
-       0,    82,    76,     0,    78
-};
-
-  /* YYPGOTO[NTERM-NUM].  */
-static const yytype_int16 yypgoto[] =
-{
-    -274,   574,  -156,    -8,  -181,   374,  -149,   516,  -146,  -155,
-    -150,  -145,  -151,  -140,   470,    26,  -118,   -45,   -11,  -116,
-     483,   416,  -274,  -104,  -274,  -147,   -88,  -274,  -274,  -144,
-     386,  -136,  -268,  -273,  -110,  -274,   -37,  -274,  -274,  -274,
-    -274,  -274,  -274,  -274,    39,  -274,  -274,   527,    43,  -274,
-    -274,  -274,   125,  -274,    44,   219,  -274,  -274,  -274,  -274,
-     584,  -274,  -274
-};
-
-  /* YYDEFGOTO[NTERM-NUM].  */
-static const yytype_int16 yydefgoto[] =
-{
-      -1,   184,   185,    27,   272,   238,   164,   102,   220,   234,
-     251,   235,   147,    99,   118,   249,   178,    24,   196,   197,
-     211,   278,   148,   149,   150,   273,   151,   176,   339,   152,
-     245,   230,   153,   154,   155,    62,   109,    63,    64,    65,
-      66,    67,   258,    68,   156,   188,    69,   169,   157,    70,
-      71,    45,     5,     6,    29,     7,     8,     9,     1,    80,
-      52,     2,     3
-};
-
-  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
-     positive, shift that token.  If negative, reduce the rule whose
-     number is the opposite.  If YYTABLE_NINF, syntax error.  */
-static const yytype_int16 yytable[] =
-{
-      25,   108,   175,   108,   217,   221,   223,   198,   199,   202,
-     265,   267,   268,   226,   239,   175,   232,   233,   228,   108,
-     229,    47,    48,   108,    49,    50,    51,   255,   236,   236,
-     229,   253,    55,    56,    57,   252,   252,   215,   243,    96,
-     236,   236,   104,   105,     4,   110,    10,   224,   353,   354,
-     350,   274,   275,    11,   112,   240,   241,   242,    30,   247,
-     298,   162,    13,    14,   328,   194,   195,   329,   163,    23,
-     177,    46,   101,    25,   183,   103,    25,    25,    23,    25,
-     259,    26,   375,   374,   113,   114,   260,   244,   261,   229,
-     262,    28,   231,   297,   303,   299,   294,   291,   308,   163,
-     331,   332,   337,    97,   309,   186,   310,    98,   311,   319,
-     175,   100,   175,   285,   106,   107,    97,   111,   175,    97,
-      98,    11,   248,    97,    31,   237,    35,    98,   326,    12,
-      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-      32,    33,    34,   165,   168,    39,    40,   166,   170,   180,
-     341,   200,   201,   182,   203,   204,   244,   205,   206,   207,
-     208,   209,    84,    85,    86,    58,    13,    14,    87,    59,
-      88,    89,    90,    91,    43,    92,    93,   318,   321,   322,
-     266,    11,   269,   319,   319,   319,   270,   271,    53,   372,
-      95,   370,   361,   362,   371,   373,   369,   397,   319,   319,
-     252,   302,    97,   319,   236,   236,    98,   101,   394,    54,
-     338,   357,   358,   359,   360,   376,   264,    72,   363,   -29,
-     379,   378,    97,   -29,    60,    61,    98,   250,   276,   194,
-     195,    78,    79,   175,    78,    94,   392,    36,    37,    38,
-      41,    42,   115,   116,   117,   194,   195,    74,   175,    75,
-     366,   190,   281,   282,   400,   281,   282,   403,    76,    77,
-      81,   175,   324,   342,   343,   344,   345,    82,    83,   158,
-     159,   160,   393,   167,   106,   179,   187,   210,   381,   189,
-     218,   219,   225,   277,   227,   313,   314,   315,   316,    97,
-     216,    59,   288,   246,   254,   306,   256,    25,    25,    25,
-      25,   120,   121,   171,   257,   172,   263,   280,   173,   125,
-     126,   127,   128,   283,   129,   130,   131,   132,   133,   134,
-     135,   136,   137,   284,   286,   138,   139,   140,   141,   142,
-     143,   144,   145,   146,   287,   289,   190,   191,   192,   193,
-     228,   290,   120,   121,   171,   292,   172,   194,   195,   173,
-     125,   126,   127,   128,   237,   129,   130,   131,   132,   133,
-     134,   135,   136,   137,   295,   320,   138,   139,   140,   141,
-     142,   143,   144,   145,   146,   296,   300,   304,   216,   323,
-     305,   307,   312,   317,   325,   319,   327,   174,   120,   121,
-     122,   333,   123,   334,   335,   124,   125,   126,   127,   128,
-     330,   129,   130,   131,   132,   133,   134,   135,   136,   137,
-     340,   119,   138,   139,   140,   141,   142,   143,   144,   145,
-     146,   120,   121,   122,   346,   123,   347,   348,   124,   125,
-     126,   127,   128,   349,   129,   130,   131,   132,   133,   134,
-     135,   136,   137,   336,   214,   138,   139,   140,   141,   142,
-     143,   144,   145,   146,   120,   121,   122,   351,   123,   355,
-     356,   124,   125,   126,   127,   128,   365,   129,   130,   131,
-     132,   133,   134,   135,   136,   137,   367,   216,   138,   139,
-     140,   141,   142,   143,   144,   145,   146,   120,   121,   122,
-     368,   123,   377,   388,   124,   125,   126,   127,   128,   382,
-     129,   130,   131,   132,   133,   134,   135,   136,   137,   383,
-     222,   138,   139,   140,   141,   142,   143,   144,   145,   146,
-     120,   121,   122,   384,   123,   385,   386,   124,   125,   126,
-     127,   128,   387,   129,   130,   131,   132,   133,   134,   135,
-     136,   137,   389,   352,   138,   139,   140,   141,   142,   143,
-     144,   145,   146,   120,   121,   122,   390,   123,   391,   395,
-     124,   125,   126,   127,   128,   396,   129,   130,   131,   132,
-     133,   134,   135,   136,   137,   399,   398,   138,   139,   140,
-     141,   142,   143,   144,   145,   146,   120,   121,   171,   401,
-     172,   402,   404,   173,   125,   126,   127,   128,    44,   129,
-     130,   131,   132,   133,   134,   135,   136,   137,   213,   293,
-     138,   139,   140,   141,   142,   143,   144,   145,   146,   161,
-     212,   190,   191,   192,   193,   120,   121,   171,   279,   172,
-     301,    73,   173,   125,   126,   127,   128,   181,   129,   130,
-     131,   132,   133,   134,   135,   136,   137,     0,     0,   138,
-     139,   140,   141,   142,   143,   144,   145,   146,     0,     0,
-       0,   191,   192,   193,   120,   121,   171,     0,   172,     0,
-       0,   173,   125,   126,   127,   128,     0,   129,   130,   131,
-     132,   133,   134,   135,   136,   137,     0,     0,   138,   139,
-     140,   141,   142,   143,   144,   145,   146,     0,     0,   120,
-     121,   171,   193,   172,   364,     0,   173,   125,   126,   127,
-     128,     0,   129,   130,   131,   132,   133,   134,   135,   136,
-     137,     0,     0,   138,   139,   140,   141,   142,   143,   144,
-     145,   146,   120,   121,   171,     0,   172,   380,     0,   173,
-     125,   126,   127,   128,     0,   129,   130,   131,   132,   133,
-     134,   135,   136,   137,     0,     0,   138,   139,   140,   141,
-     142,   143,   144,   145,   146,   120,   121,   171,     0,   172,
-       0,     0,   173,   125,   126,   127,   128,     0,   129,   130,
-     131,   132,   133,   134,   135,   136,   137,     0,     0,   138,
-     139,   140,   141,   142,   143,   144,   145,   146
-};
-
-static const yytype_int16 yycheck[] =
-{
-      11,    89,   106,    91,   148,   156,   157,   123,   124,   127,
-     191,   192,   193,   159,   169,   119,   165,   166,    12,   107,
-     164,    29,    30,   111,    32,    33,    34,   183,   168,   169,
-     174,   181,    40,    41,    42,   180,   181,   147,   174,    84,
-     180,   181,    87,    88,     3,    90,     0,   157,   321,   322,
-     318,   198,   199,    53,    91,   171,   172,   173,    14,   177,
-     241,     3,    62,    63,    16,    59,    60,    19,    10,     9,
-     107,    27,     3,    84,   111,    86,    87,    88,     9,    90,
-      46,     8,   355,   351,    92,    93,    52,   175,    54,   233,
-      56,     9,     3,   240,   250,   242,   236,   233,    46,    10,
-     281,   282,     3,     5,    52,   113,    54,     9,    56,    10,
-     214,    85,   216,   223,     3,    89,     5,    91,   222,     5,
-       9,    53,     4,     5,     3,    11,     3,     9,   272,    61,
-      62,    63,    64,    65,    66,    67,    68,    69,    70,    71,
-      15,    16,    17,   104,   105,     3,    21,   104,   105,   110,
-     306,   125,   126,   110,   128,   129,   244,   131,   132,   133,
-     134,   135,    46,    47,    48,     4,    62,    63,    52,     8,
-      54,    55,    56,    57,     8,    59,    60,     4,     4,     4,
-     191,    53,   193,    10,    10,    10,   194,   195,     4,   344,
-      37,   342,     4,     4,   343,   345,   342,     4,    10,    10,
-     345,     4,     5,    10,   344,   345,     9,     3,   389,     4,
-     298,   327,   328,   329,   330,   359,   190,     4,   336,     5,
-     364,     4,     5,     9,     3,     4,     9,    57,   202,    59,
-      60,     3,     4,   337,     3,     4,   380,    18,    19,    20,
-      21,    22,     5,     6,     7,    59,    60,     4,   352,     4,
-     338,    48,    49,    50,   398,    49,    50,   401,     4,     4,
-       4,   365,   270,   308,   309,   310,   311,     4,     4,     4,
-      46,     4,   388,     3,     3,     3,     3,    35,   366,     4,
-       4,     3,     3,    36,     4,   259,   260,   261,   262,     5,
-       3,     8,    10,     4,     3,    57,     4,   308,   309,   310,
-     311,    13,    14,    15,     3,    17,     4,     4,    20,    21,
-      22,    23,    24,     4,    26,    27,    28,    29,    30,    31,
-      32,    33,    34,     4,     4,    37,    38,    39,    40,    41,
-      42,    43,    44,    45,     4,     4,    48,    49,    50,    51,
-      12,     4,    13,    14,    15,     4,    17,    59,    60,    20,
-      21,    22,    23,    24,    11,    26,    27,    28,    29,    30,
-      31,    32,    33,    34,     3,    10,    37,    38,    39,    40,
-      41,    42,    43,    44,    45,     4,     4,     4,     3,    10,
-       4,     4,     4,     4,     4,    10,    16,    58,    13,    14,
-      15,     4,    17,     4,     4,    20,    21,    22,    23,    24,
-      16,    26,    27,    28,    29,    30,    31,    32,    33,    34,
-       4,     3,    37,    38,    39,    40,    41,    42,    43,    44,
-      45,    13,    14,    15,     4,    17,     4,     4,    20,    21,
-      22,    23,    24,     4,    26,    27,    28,    29,    30,    31,
-      32,    33,    34,    55,     3,    37,    38,    39,    40,    41,
-      42,    43,    44,    45,    13,    14,    15,     4,    17,     4,
-       4,    20,    21,    22,    23,    24,     3,    26,    27,    28,
-      29,    30,    31,    32,    33,    34,     4,     3,    37,    38,
-      39,    40,    41,    42,    43,    44,    45,    13,    14,    15,
-       4,    17,     3,    16,    20,    21,    22,    23,    24,     4,
-      26,    27,    28,    29,    30,    31,    32,    33,    34,     4,
-       3,    37,    38,    39,    40,    41,    42,    43,    44,    45,
-      13,    14,    15,     4,    17,     4,     4,    20,    21,    22,
-      23,    24,     4,    26,    27,    28,    29,    30,    31,    32,
-      33,    34,    50,     3,    37,    38,    39,    40,    41,    42,
-      43,    44,    45,    13,    14,    15,     4,    17,     4,     3,
-      20,    21,    22,    23,    24,     4,    26,    27,    28,    29,
-      30,    31,    32,    33,    34,     3,    19,    37,    38,    39,
-      40,    41,    42,    43,    44,    45,    13,    14,    15,    19,
-      17,     4,     4,    20,    21,    22,    23,    24,    24,    26,
-      27,    28,    29,    30,    31,    32,    33,    34,   138,   235,
-      37,    38,    39,    40,    41,    42,    43,    44,    45,   103,
-     137,    48,    49,    50,    51,    13,    14,    15,   212,    17,
-     244,    47,    20,    21,    22,    23,    24,   110,    26,    27,
-      28,    29,    30,    31,    32,    33,    34,    -1,    -1,    37,
-      38,    39,    40,    41,    42,    43,    44,    45,    -1,    -1,
-      -1,    49,    50,    51,    13,    14,    15,    -1,    17,    -1,
-      -1,    20,    21,    22,    23,    24,    -1,    26,    27,    28,
-      29,    30,    31,    32,    33,    34,    -1,    -1,    37,    38,
-      39,    40,    41,    42,    43,    44,    45,    -1,    -1,    13,
-      14,    15,    51,    17,    18,    -1,    20,    21,    22,    23,
-      24,    -1,    26,    27,    28,    29,    30,    31,    32,    33,
-      34,    -1,    -1,    37,    38,    39,    40,    41,    42,    43,
-      44,    45,    13,    14,    15,    -1,    17,    18,    -1,    20,
-      21,    22,    23,    24,    -1,    26,    27,    28,    29,    30,
-      31,    32,    33,    34,    -1,    -1,    37,    38,    39,    40,
-      41,    42,    43,    44,    45,    13,    14,    15,    -1,    17,
-      -1,    -1,    20,    21,    22,    23,    24,    -1,    26,    27,
-      28,    29,    30,    31,    32,    33,    34,    -1,    -1,    37,
-      38,    39,    40,    41,    42,    43,    44,    45
-};
-
-  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
-     symbol of state STATE-NUM.  */
-static const yytype_uint8 yystos[] =
-{
-       0,   133,   136,   137,     3,   127,   128,   130,   131,   132,
-       0,    53,    61,    62,    63,    64,    65,    66,    67,    68,
-      69,    70,    71,     9,    92,    93,     8,    78,     9,   129,
-     129,     3,   127,   127,   127,     3,   130,   130,   130,     3,
-     127,   130,   130,     8,    76,   126,   129,    78,    78,    78,
-      78,    78,   135,     4,     4,    78,    78,    78,     4,     8,
-       3,     4,   110,   112,   113,   114,   115,   116,   118,   121,
-     124,   125,     4,   135,     4,     4,     4,     4,     3,     4,
-     134,     4,     4,     4,    46,    47,    48,    52,    54,    55,
-      56,    57,    59,    60,     4,    37,    92,     5,     9,    88,
-      90,     3,    82,    93,    92,    92,     3,    90,   101,   111,
-      92,    90,   111,    78,    78,     5,     6,     7,    89,     3,
-      13,    14,    15,    17,    20,    21,    22,    23,    24,    26,
-      27,    28,    29,    30,    31,    32,    33,    34,    37,    38,
-      39,    40,    41,    42,    43,    44,    45,    87,    97,    98,
-      99,   101,   104,   107,   108,   109,   119,   123,     4,    46,
-       4,    82,     3,    10,    81,   119,   123,     3,   119,   122,
-     123,    15,    17,    20,    58,    98,   102,   111,    91,     3,
-     119,   122,   123,   111,    76,    77,    78,     3,   120,     4,
-      48,    49,    50,    51,    59,    60,    93,    94,    94,    94,
-      90,    90,    91,    90,    90,    90,    90,    90,    90,    90,
-      35,    95,    95,    89,     3,   109,     3,   104,     4,     3,
-      83,    87,     3,    87,   109,     3,    83,     4,    12,   104,
-     106,     3,    81,    81,    84,    86,    88,    11,    80,    84,
-      94,    94,    94,   106,   101,   105,     4,    91,     4,    90,
-      57,    85,    86,    85,     3,    77,     4,     3,   117,    46,
-      52,    54,    56,     4,    90,    79,    93,    79,    79,    93,
-      78,    78,    79,   100,   100,   100,    90,    36,    96,    96,
-       4,    49,    50,     4,     4,   109,     4,     4,    10,     4,
-       4,   106,     4,    80,    88,     3,     4,   100,    79,   100,
-       4,   105,     4,    77,     4,     4,    57,     4,    46,    52,
-      54,    56,     4,    90,    90,    90,    90,     4,     4,    10,
-      10,     4,     4,    10,    78,     4,   104,    16,    16,    19,
-      16,    79,    79,     4,     4,     4,    55,     3,   101,   103,
-       4,    77,    92,    92,    92,    92,     4,     4,     4,     4,
-     107,     4,     3,   108,   108,     4,     4,    94,    94,    94,
-      94,     4,     4,    91,    18,     3,   101,     4,     4,    83,
-      87,    81,    84,    85,   107,   108,   104,     3,     4,   104,
-      18,   101,     4,     4,     4,     4,     4,     4,    16,    50,
-       4,     4,   104,    94,    79,     3,     4,     4,    19,     3,
-     104,    19,     4,   104,     4
-};
-
-  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
-static const yytype_uint8 yyr1[] =
-{
-       0,    75,    76,    76,    77,    77,    78,    79,    79,    80,
-      81,    81,    82,    83,    83,    83,    83,    84,    85,    86,
-      86,    87,    88,    89,    89,    89,    90,    90,    91,    91,
-      92,    92,    93,    94,    94,    95,    95,    96,    96,    97,
-      97,    97,    98,    98,    98,    98,    98,    98,    98,    98,
-      98,    98,    98,    98,    98,    98,    98,    98,    98,    98,
-      98,    98,    98,    98,    98,    98,    99,    99,    99,    99,
-     100,   101,   102,   102,   102,   102,   103,   103,   103,   103,
-     103,   103,   104,   104,   105,   105,   106,   107,   107,   107,
-     107,   108,   108,   108,   109,   110,   110,   110,   110,   111,
-     111,   112,   112,   113,   113,   114,   114,   115,   115,   115,
-     116,   116,   117,   117,   117,   117,   117,   118,   118,   118,
-     118,   118,   118,   119,   120,   120,   120,   120,   121,   122,
-     122,   123,   124,   124,   125,   126,   126,   126,   126,   126,
-     126,   126,   126,   126,   126,   126,   127,   127,   128,   129,
-     129,   130,   130,   131,   131,   131,   131,   131,   131,   131,
-     131,   131,   132,   132,   132,   132,   133,   133,   134,   135,
-     135,   136,   137
-};
-
-  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
-static const yytype_uint8 yyr2[] =
-{
-       0,     2,     1,     2,     0,     1,     1,     0,     2,     1,
-       1,     4,     4,     0,     4,     8,     4,     2,     1,     1,
-       2,     4,     1,     1,     1,     1,     1,     1,     0,     2,
-       0,     1,     1,     0,     1,     0,     1,     0,     1,     1,
-       1,     1,     1,     1,     1,     1,     2,     2,     3,     1,
-       2,     2,     2,     2,     2,     2,     2,     3,     3,     2,
-       1,     1,     1,     1,     1,     1,     5,     5,     5,     8,
-       2,     3,     2,     3,     3,     4,     8,     4,     9,     5,
-       3,     2,     0,     2,     0,     2,     1,     1,     5,     5,
-       6,     1,     5,     6,     1,     7,     6,     6,     5,     4,
-       1,     6,     5,     6,    10,     6,     5,     6,     9,     8,
-       7,     6,     5,     5,     5,     5,     5,     6,     6,     6,
-       6,     6,     6,     5,     4,     4,     4,     4,     5,     0,
-       1,     4,     4,     5,     4,     0,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     5,     5,     1,     0,
-       1,     6,     5,     5,     5,     5,     5,     5,     4,     4,
-       5,     5,     1,     1,     1,     5,     0,     2,     4,     0,
-       2,     1,     1
-};
-
-
-#define yyerrok         (yyerrstatus = 0)
-#define yyclearin       (yychar = YYEMPTY)
-#define YYEMPTY         (-2)
-#define YYEOF           0
-
-#define YYACCEPT        goto yyacceptlab
-#define YYABORT         goto yyabortlab
-#define YYERROR         goto yyerrorlab
-
-
-#define YYRECOVERING()  (!!yyerrstatus)
-
-#define YYBACKUP(Token, Value)                                  \
-do                                                              \
-  if (yychar == YYEMPTY)                                        \
-    {                                                           \
-      yychar = (Token);                                         \
-      yylval = (Value);                                         \
-      YYPOPSTACK (yylen);                                       \
-      yystate = *yyssp;                                         \
-      goto yybackup;                                            \
-    }                                                           \
-  else                                                          \
-    {                                                           \
-      yyerror (&yylloc, lexer, parser, YY_("syntax error: cannot back up")); \
-      YYERROR;                                                  \
-    }                                                           \
-while (0)
-
-/* Error token number */
-#define YYTERROR        1
-#define YYERRCODE       256
-
-
-/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
-   If N is 0, then set CURRENT to the empty location which ends
-   the previous symbol: RHS[0] (always defined).  */
-
-#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N)                                \
-    do                                                                  \
-      if (N)                                                            \
-        {                                                               \
-          (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
-          (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
-          (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
-          (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
-        }                                                               \
-      else                                                              \
-        {                                                               \
-          (Current).first_line   = (Current).last_line   =              \
-            YYRHSLOC (Rhs, 0).last_line;                                \
-          (Current).first_column = (Current).last_column =              \
-            YYRHSLOC (Rhs, 0).last_column;                              \
-        }                                                               \
-    while (0)
-#endif
-
-#define YYRHSLOC(Rhs, K) ((Rhs)[K])
-
-
-/* Enable debugging if requested.  */
-#if WABT_AST_PARSER_DEBUG
-
-# ifndef YYFPRINTF
-#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
-#  define YYFPRINTF fprintf
-# endif
-
-# define YYDPRINTF(Args)                        \
-do {                                            \
-  if (yydebug)                                  \
-    YYFPRINTF Args;                             \
-} while (0)
-
-
-/* YY_LOCATION_PRINT -- Print the location on the stream.
-   This macro was not mandated originally: define only if we know
-   we won't break user code: when these are the locations we know.  */
-
-#ifndef YY_LOCATION_PRINT
-# if defined WABT_AST_PARSER_LTYPE_IS_TRIVIAL && WABT_AST_PARSER_LTYPE_IS_TRIVIAL
-
-/* Print *YYLOCP on YYO.  Private, do not rely on its existence. */
-
-YY_ATTRIBUTE_UNUSED
-static unsigned
-yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
-{
-  unsigned res = 0;
-  int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
-  if (0 <= yylocp->first_line)
-    {
-      res += YYFPRINTF (yyo, "%d", yylocp->first_line);
-      if (0 <= yylocp->first_column)
-        res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
-    }
-  if (0 <= yylocp->last_line)
-    {
-      if (yylocp->first_line < yylocp->last_line)
-        {
-          res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
-          if (0 <= end_col)
-            res += YYFPRINTF (yyo, ".%d", end_col);
-        }
-      else if (0 <= end_col && yylocp->first_column < end_col)
-        res += YYFPRINTF (yyo, "-%d", end_col);
-    }
-  return res;
- }
-
-#  define YY_LOCATION_PRINT(File, Loc)          \
-  yy_location_print_ (File, &(Loc))
-
-# else
-#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-# endif
-#endif
-
-
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
-do {                                                                      \
-  if (yydebug)                                                            \
-    {                                                                     \
-      YYFPRINTF (stderr, "%s ", Title);                                   \
-      yy_symbol_print (stderr,                                            \
-                  Type, Value, Location, lexer, parser); \
-      YYFPRINTF (stderr, "\n");                                           \
-    }                                                                     \
-} while (0)
-
-
-/*----------------------------------------.
-| Print this symbol's value on YYOUTPUT.  |
-`----------------------------------------*/
-
-static void
-yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, ::wabt::AstLexer* lexer, ::wabt::AstParser* parser)
-{
-  FILE *yyo = yyoutput;
-  YYUSE (yyo);
-  YYUSE (yylocationp);
-  YYUSE (lexer);
-  YYUSE (parser);
-  if (!yyvaluep)
-    return;
-# ifdef YYPRINT
-  if (yytype < YYNTOKENS)
-    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# endif
-  YYUSE (yytype);
-}
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT.  |
-`--------------------------------*/
-
-static void
-yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, ::wabt::AstLexer* lexer, ::wabt::AstParser* parser)
-{
-  YYFPRINTF (yyoutput, "%s %s (",
-             yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
-
-  YY_LOCATION_PRINT (yyoutput, *yylocationp);
-  YYFPRINTF (yyoutput, ": ");
-  yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, lexer, parser);
-  YYFPRINTF (yyoutput, ")");
-}
-
-/*------------------------------------------------------------------.
-| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (included).                                                   |
-`------------------------------------------------------------------*/
-
-static void
-yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
-{
-  YYFPRINTF (stderr, "Stack now");
-  for (; yybottom <= yytop; yybottom++)
-    {
-      int yybot = *yybottom;
-      YYFPRINTF (stderr, " %d", yybot);
-    }
-  YYFPRINTF (stderr, "\n");
-}
-
-# define YY_STACK_PRINT(Bottom, Top)                            \
-do {                                                            \
-  if (yydebug)                                                  \
-    yy_stack_print ((Bottom), (Top));                           \
-} while (0)
-
-
-/*------------------------------------------------.
-| Report that the YYRULE is going to be reduced.  |
-`------------------------------------------------*/
-
-static void
-yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, ::wabt::AstLexer* lexer, ::wabt::AstParser* parser)
-{
-  unsigned long int yylno = yyrline[yyrule];
-  int yynrhs = yyr2[yyrule];
-  int yyi;
-  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
-             yyrule - 1, yylno);
-  /* The symbols being reduced.  */
-  for (yyi = 0; yyi < yynrhs; yyi++)
-    {
-      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
-      yy_symbol_print (stderr,
-                       yystos[yyssp[yyi + 1 - yynrhs]],
-                       &(yyvsp[(yyi + 1) - (yynrhs)])
-                       , &(yylsp[(yyi + 1) - (yynrhs)])                       , lexer, parser);
-      YYFPRINTF (stderr, "\n");
-    }
-}
-
-# define YY_REDUCE_PRINT(Rule)          \
-do {                                    \
-  if (yydebug)                          \
-    yy_reduce_print (yyssp, yyvsp, yylsp, Rule, lexer, parser); \
-} while (0)
-
-/* Nonzero means print parse trace.  It is left uninitialized so that
-   multiple parsers can coexist.  */
-int yydebug;
-#else /* !WABT_AST_PARSER_DEBUG */
-# define YYDPRINTF(Args)
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
-# define YY_STACK_PRINT(Bottom, Top)
-# define YY_REDUCE_PRINT(Rule)
-#endif /* !WABT_AST_PARSER_DEBUG */
-
-
-/* YYINITDEPTH -- initial size of the parser's stacks.  */
-#ifndef YYINITDEPTH
-# define YYINITDEPTH 200
-#endif
-
-/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
-   if the built-in stack extension method is used).
-
-   Do not make this value too large; the results are undefined if
-   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
-   evaluated with infinite-precision integer arithmetic.  */
-
-#ifndef YYMAXDEPTH
-# define YYMAXDEPTH 10000
-#endif
-
-
-#if YYERROR_VERBOSE
-
-# ifndef yystrlen
-#  if defined __GLIBC__ && defined _STRING_H
-#   define yystrlen strlen
-#  else
-/* Return the length of YYSTR.  */
-static YYSIZE_T
-yystrlen (const char *yystr)
-{
-  YYSIZE_T yylen;
-  for (yylen = 0; yystr[yylen]; yylen++)
-    continue;
-  return yylen;
-}
-#  endif
-# endif
-
-# ifndef yystpcpy
-#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
-#   define yystpcpy stpcpy
-#  else
-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
-   YYDEST.  */
-static char *
-yystpcpy (char *yydest, const char *yysrc)
-{
-  char *yyd = yydest;
-  const char *yys = yysrc;
-
-  while ((*yyd++ = *yys++) != '\0')
-    continue;
-
-  return yyd - 1;
-}
-#  endif
-# endif
-
-# ifndef yytnamerr
-/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
-   quotes and backslashes, so that it's suitable for yyerror.  The
-   heuristic is that double-quoting is unnecessary unless the string
-   contains an apostrophe, a comma, or backslash (other than
-   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
-   null, do not copy; instead, return the length of what the result
-   would have been.  */
-static YYSIZE_T
-yytnamerr (char *yyres, const char *yystr)
-{
-  if (*yystr == '"')
-    {
-      YYSIZE_T yyn = 0;
-      char const *yyp = yystr;
-
-      for (;;)
-        switch (*++yyp)
-          {
-          case '\'':
-          case ',':
-            goto do_not_strip_quotes;
-
-          case '\\':
-            if (*++yyp != '\\')
-              goto do_not_strip_quotes;
-            /* Fall through.  */
-          default:
-            if (yyres)
-              yyres[yyn] = *yyp;
-            yyn++;
-            break;
-
-          case '"':
-            if (yyres)
-              yyres[yyn] = '\0';
-            return yyn;
-          }
-    do_not_strip_quotes: ;
-    }
-
-  if (! yyres)
-    return yystrlen (yystr);
-
-  return yystpcpy (yyres, yystr) - yyres;
-}
-# endif
-
-/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
-   about the unexpected token YYTOKEN for the state stack whose top is
-   YYSSP.
-
-   Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
-   not large enough to hold the message.  In that case, also set
-   *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
-   required number of bytes is too large to store.  */
-static int
-yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
-                yytype_int16 *yyssp, int yytoken)
-{
-  YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
-  YYSIZE_T yysize = yysize0;
-  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
-  /* Internationalized format string. */
-  const char *yyformat = YY_NULLPTR;
-  /* Arguments of yyformat. */
-  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
-  /* Number of reported tokens (one for the "unexpected", one per
-     "expected"). */
-  int yycount = 0;
-
-  /* There are many possibilities here to consider:
-     - If this state is a consistent state with a default action, then
-       the only way this function was invoked is if the default action
-       is an error action.  In that case, don't check for expected
-       tokens because there are none.
-     - The only way there can be no lookahead present (in yychar) is if
-       this state is a consistent state with a default action.  Thus,
-       detecting the absence of a lookahead is sufficient to determine
-       that there is no unexpected or expected token to report.  In that
-       case, just report a simple "syntax error".
-     - Don't assume there isn't a lookahead just because this state is a
-       consistent state with a default action.  There might have been a
-       previous inconsistent state, consistent state with a non-default
-       action, or user semantic action that manipulated yychar.
-     - Of course, the expected token list depends on states to have
-       correct lookahead information, and it depends on the parser not
-       to perform extra reductions after fetching a lookahead from the
-       scanner and before detecting a syntax error.  Thus, state merging
-       (from LALR or IELR) and default reductions corrupt the expected
-       token list.  However, the list is correct for canonical LR with
-       one exception: it will still contain any token that will not be
-       accepted due to an error action in a later state.
-  */
-  if (yytoken != YYEMPTY)
-    {
-      int yyn = yypact[*yyssp];
-      yyarg[yycount++] = yytname[yytoken];
-      if (!yypact_value_is_default (yyn))
-        {
-          /* Start YYX at -YYN if negative to avoid negative indexes in
-             YYCHECK.  In other words, skip the first -YYN actions for
-             this state because they are default actions.  */
-          int yyxbegin = yyn < 0 ? -yyn : 0;
-          /* Stay within bounds of both yycheck and yytname.  */
-          int yychecklim = YYLAST - yyn + 1;
-          int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
-          int yyx;
-
-          for (yyx = yyxbegin; yyx < yyxend; ++yyx)
-            if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
-                && !yytable_value_is_error (yytable[yyx + yyn]))
-              {
-                if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
-                  {
-                    yycount = 1;
-                    yysize = yysize0;
-                    break;
-                  }
-                yyarg[yycount++] = yytname[yyx];
-                {
-                  YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
-                  if (! (yysize <= yysize1
-                         && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
-                    return 2;
-                  yysize = yysize1;
-                }
-              }
-        }
-    }
-
-  switch (yycount)
-    {
-# define YYCASE_(N, S)                      \
-      case N:                               \
-        yyformat = S;                       \
-      break
-      YYCASE_(0, YY_("syntax error"));
-      YYCASE_(1, YY_("syntax error, unexpected %s"));
-      YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
-      YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
-      YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
-      YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
-# undef YYCASE_
-    }
-
-  {
-    YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
-    if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
-      return 2;
-    yysize = yysize1;
-  }
-
-  if (*yymsg_alloc < yysize)
-    {
-      *yymsg_alloc = 2 * yysize;
-      if (! (yysize <= *yymsg_alloc
-             && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
-        *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
-      return 1;
-    }
-
-  /* Avoid sprintf, as that infringes on the user's name space.
-     Don't have undefined behavior even if the translation
-     produced a string with the wrong number of "%s"s.  */
-  {
-    char *yyp = *yymsg;
-    int yyi = 0;
-    while ((*yyp = *yyformat) != '\0')
-      if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
-        {
-          yyp += yytnamerr (yyp, yyarg[yyi++]);
-          yyformat += 2;
-        }
-      else
-        {
-          yyp++;
-          yyformat++;
-        }
-  }
-  return 0;
-}
-#endif /* YYERROR_VERBOSE */
-
-/*-----------------------------------------------.
-| Release the memory associated to this symbol.  |
-`-----------------------------------------------*/
-
-static void
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, ::wabt::AstLexer* lexer, ::wabt::AstParser* parser)
-{
-  YYUSE (yyvaluep);
-  YYUSE (yylocationp);
-  YYUSE (lexer);
-  YYUSE (parser);
-  if (!yymsg)
-    yymsg = "Deleting";
-  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
-
-  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-  switch (yytype)
-    {
-          case 5: /* NAT  */
-#line 250 "src/ast-parser.y" /* yacc.c:1257  */
-      {}
-#line 1648 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 6: /* INT  */
-#line 250 "src/ast-parser.y" /* yacc.c:1257  */
-      {}
-#line 1654 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 7: /* FLOAT  */
-#line 250 "src/ast-parser.y" /* yacc.c:1257  */
-      {}
-#line 1660 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 8: /* TEXT  */
-#line 250 "src/ast-parser.y" /* yacc.c:1257  */
-      {}
-#line 1666 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 9: /* VAR  */
-#line 250 "src/ast-parser.y" /* yacc.c:1257  */
-      {}
-#line 1672 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 35: /* OFFSET_EQ_NAT  */
-#line 250 "src/ast-parser.y" /* yacc.c:1257  */
-      {}
-#line 1678 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 36: /* ALIGN_EQ_NAT  */
-#line 250 "src/ast-parser.y" /* yacc.c:1257  */
-      {}
-#line 1684 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 76: /* non_empty_text_list  */
-#line 277 "src/ast-parser.y" /* yacc.c:1257  */
-      { destroy_text_list(&((*yyvaluep).text_list)); }
-#line 1690 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 77: /* text_list  */
-#line 277 "src/ast-parser.y" /* yacc.c:1257  */
-      { destroy_text_list(&((*yyvaluep).text_list)); }
-#line 1696 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 78: /* quoted_text  */
-#line 251 "src/ast-parser.y" /* yacc.c:1257  */
-      { destroy_string_slice(&((*yyvaluep).text)); }
-#line 1702 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 79: /* value_type_list  */
-#line 278 "src/ast-parser.y" /* yacc.c:1257  */
-      { delete ((*yyvaluep).types); }
-#line 1708 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 81: /* global_type  */
-#line 270 "src/ast-parser.y" /* yacc.c:1257  */
-      { delete ((*yyvaluep).global); }
-#line 1714 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 82: /* func_type  */
-#line 268 "src/ast-parser.y" /* yacc.c:1257  */
-      { delete ((*yyvaluep).func_sig); }
-#line 1720 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 83: /* func_sig  */
-#line 268 "src/ast-parser.y" /* yacc.c:1257  */
-      { delete ((*yyvaluep).func_sig); }
-#line 1726 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 85: /* memory_sig  */
-#line 273 "src/ast-parser.y" /* yacc.c:1257  */
-      { delete ((*yyvaluep).memory); }
-#line 1732 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 87: /* type_use  */
-#line 279 "src/ast-parser.y" /* yacc.c:1257  */
-      { destroy_var(&((*yyvaluep).var)); }
-#line 1738 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 89: /* literal  */
-#line 252 "src/ast-parser.y" /* yacc.c:1257  */
-      { destroy_string_slice(&((*yyvaluep).literal).text); }
-#line 1744 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 90: /* var  */
-#line 279 "src/ast-parser.y" /* yacc.c:1257  */
-      { destroy_var(&((*yyvaluep).var)); }
-#line 1750 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 91: /* var_list  */
-#line 280 "src/ast-parser.y" /* yacc.c:1257  */
-      { delete ((*yyvaluep).vars); }
-#line 1756 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 92: /* bind_var_opt  */
-#line 251 "src/ast-parser.y" /* yacc.c:1257  */
-      { destroy_string_slice(&((*yyvaluep).text)); }
-#line 1762 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 93: /* bind_var  */
-#line 251 "src/ast-parser.y" /* yacc.c:1257  */
-      { destroy_string_slice(&((*yyvaluep).text)); }
-#line 1768 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 94: /* labeling_opt  */
-#line 251 "src/ast-parser.y" /* yacc.c:1257  */
-      { destroy_string_slice(&((*yyvaluep).text)); }
-#line 1774 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 97: /* instr  */
-#line 265 "src/ast-parser.y" /* yacc.c:1257  */
-      { destroy_expr_list(((*yyvaluep).expr_list).first); }
-#line 1780 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 98: /* plain_instr  */
-#line 264 "src/ast-parser.y" /* yacc.c:1257  */
-      { delete ((*yyvaluep).expr); }
-#line 1786 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 99: /* block_instr  */
-#line 264 "src/ast-parser.y" /* yacc.c:1257  */
-      { delete ((*yyvaluep).expr); }
-#line 1792 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 100: /* block  */
-#line 254 "src/ast-parser.y" /* yacc.c:1257  */
-      { delete ((*yyvaluep).block); }
-#line 1798 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 101: /* expr  */
-#line 265 "src/ast-parser.y" /* yacc.c:1257  */
-      { destroy_expr_list(((*yyvaluep).expr_list).first); }
-#line 1804 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 102: /* expr1  */
-#line 265 "src/ast-parser.y" /* yacc.c:1257  */
-      { destroy_expr_list(((*yyvaluep).expr_list).first); }
-#line 1810 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 103: /* if_  */
-#line 265 "src/ast-parser.y" /* yacc.c:1257  */
-      { destroy_expr_list(((*yyvaluep).expr_list).first); }
-#line 1816 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 104: /* instr_list  */
-#line 265 "src/ast-parser.y" /* yacc.c:1257  */
-      { destroy_expr_list(((*yyvaluep).expr_list).first); }
-#line 1822 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 105: /* expr_list  */
-#line 265 "src/ast-parser.y" /* yacc.c:1257  */
-      { destroy_expr_list(((*yyvaluep).expr_list).first); }
-#line 1828 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 106: /* const_expr  */
-#line 265 "src/ast-parser.y" /* yacc.c:1257  */
-      { destroy_expr_list(((*yyvaluep).expr_list).first); }
-#line 1834 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 107: /* func_fields  */
-#line 266 "src/ast-parser.y" /* yacc.c:1257  */
-      { destroy_func_fields(((*yyvaluep).func_fields)); }
-#line 1840 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 108: /* func_body  */
-#line 266 "src/ast-parser.y" /* yacc.c:1257  */
-      { destroy_func_fields(((*yyvaluep).func_fields)); }
-#line 1846 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 109: /* func_info  */
-#line 267 "src/ast-parser.y" /* yacc.c:1257  */
-      { delete ((*yyvaluep).func); }
-#line 1852 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 110: /* func  */
-#line 261 "src/ast-parser.y" /* yacc.c:1257  */
-      { delete ((*yyvaluep).exported_func); }
-#line 1858 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 111: /* offset  */
-#line 265 "src/ast-parser.y" /* yacc.c:1257  */
-      { destroy_expr_list(((*yyvaluep).expr_list).first); }
-#line 1864 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 112: /* elem  */
-#line 259 "src/ast-parser.y" /* yacc.c:1257  */
-      { delete ((*yyvaluep).elem_segment); }
-#line 1870 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 113: /* table  */
-#line 263 "src/ast-parser.y" /* yacc.c:1257  */
-      { delete ((*yyvaluep).exported_table); }
-#line 1876 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 114: /* data  */
-#line 258 "src/ast-parser.y" /* yacc.c:1257  */
-      { delete ((*yyvaluep).data_segment); }
-#line 1882 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 115: /* memory  */
-#line 262 "src/ast-parser.y" /* yacc.c:1257  */
-      { delete ((*yyvaluep).exported_memory); }
-#line 1888 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 117: /* import_kind  */
-#line 271 "src/ast-parser.y" /* yacc.c:1257  */
-      { delete ((*yyvaluep).import); }
-#line 1894 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 118: /* import  */
-#line 271 "src/ast-parser.y" /* yacc.c:1257  */
-      { delete ((*yyvaluep).import); }
-#line 1900 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 119: /* inline_import  */
-#line 271 "src/ast-parser.y" /* yacc.c:1257  */
-      { delete ((*yyvaluep).import); }
-#line 1906 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 120: /* export_kind  */
-#line 260 "src/ast-parser.y" /* yacc.c:1257  */
-      { delete ((*yyvaluep).export_); }
-#line 1912 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 121: /* export  */
-#line 260 "src/ast-parser.y" /* yacc.c:1257  */
-      { delete ((*yyvaluep).export_); }
-#line 1918 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 122: /* inline_export_opt  */
-#line 272 "src/ast-parser.y" /* yacc.c:1257  */
-      { delete ((*yyvaluep).optional_export); }
-#line 1924 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 123: /* inline_export  */
-#line 272 "src/ast-parser.y" /* yacc.c:1257  */
-      { delete ((*yyvaluep).optional_export); }
-#line 1930 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 124: /* type_def  */
-#line 269 "src/ast-parser.y" /* yacc.c:1257  */
-      { delete ((*yyvaluep).func_type); }
-#line 1936 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 125: /* start  */
-#line 279 "src/ast-parser.y" /* yacc.c:1257  */
-      { destroy_var(&((*yyvaluep).var)); }
-#line 1942 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 126: /* module_fields  */
-#line 274 "src/ast-parser.y" /* yacc.c:1257  */
-      { delete ((*yyvaluep).module); }
-#line 1948 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 127: /* raw_module  */
-#line 275 "src/ast-parser.y" /* yacc.c:1257  */
-      { delete ((*yyvaluep).raw_module); }
-#line 1954 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 128: /* module  */
-#line 274 "src/ast-parser.y" /* yacc.c:1257  */
-      { delete ((*yyvaluep).module); }
-#line 1960 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 129: /* script_var_opt  */
-#line 279 "src/ast-parser.y" /* yacc.c:1257  */
-      { destroy_var(&((*yyvaluep).var)); }
-#line 1966 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 130: /* action  */
-#line 253 "src/ast-parser.y" /* yacc.c:1257  */
-      { delete ((*yyvaluep).action); }
-#line 1972 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 131: /* assertion  */
-#line 255 "src/ast-parser.y" /* yacc.c:1257  */
-      { delete ((*yyvaluep).command); }
-#line 1978 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 132: /* cmd  */
-#line 255 "src/ast-parser.y" /* yacc.c:1257  */
-      { delete ((*yyvaluep).command); }
-#line 1984 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 133: /* cmd_list  */
-#line 256 "src/ast-parser.y" /* yacc.c:1257  */
-      { delete ((*yyvaluep).commands); }
-#line 1990 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 135: /* const_list  */
-#line 257 "src/ast-parser.y" /* yacc.c:1257  */
-      { delete ((*yyvaluep).consts); }
-#line 1996 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-    case 136: /* script  */
-#line 276 "src/ast-parser.y" /* yacc.c:1257  */
-      { delete ((*yyvaluep).script); }
-#line 2002 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1257  */
-        break;
-
-
-      default:
-        break;
-    }
-  YY_IGNORE_MAYBE_UNINITIALIZED_END
-}
-
-
-
-
-/*----------.
-| yyparse.  |
-`----------*/
-
-int
-yyparse (::wabt::AstLexer* lexer, ::wabt::AstParser* parser)
-{
-/* The lookahead symbol.  */
-int yychar;
-
-
-/* The semantic value of the lookahead symbol.  */
-/* Default value used for initialization, for pacifying older GCCs
-   or non-GCC compilers.  */
-YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
-YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
-
-/* Location data for the lookahead symbol.  */
-static YYLTYPE yyloc_default
-# if defined WABT_AST_PARSER_LTYPE_IS_TRIVIAL && WABT_AST_PARSER_LTYPE_IS_TRIVIAL
-  = { 1, 1, 1, 1 }
-# endif
-;
-YYLTYPE yylloc = yyloc_default;
-
-    /* Number of syntax errors so far.  */
-    int yynerrs;
-
-    int yystate;
-    /* Number of tokens to shift before error messages enabled.  */
-    int yyerrstatus;
-
-    /* The stacks and their tools:
-       'yyss': related to states.
-       'yyvs': related to semantic values.
-       'yyls': related to locations.
-
-       Refer to the stacks through separate pointers, to allow yyoverflow
-       to reallocate them elsewhere.  */
-
-    /* The state stack.  */
-    yytype_int16 yyssa[YYINITDEPTH];
-    yytype_int16 *yyss;
-    yytype_int16 *yyssp;
-
-    /* The semantic value stack.  */
-    YYSTYPE yyvsa[YYINITDEPTH];
-    YYSTYPE *yyvs;
-    YYSTYPE *yyvsp;
-
-    /* The location stack.  */
-    YYLTYPE yylsa[YYINITDEPTH];
-    YYLTYPE *yyls;
-    YYLTYPE *yylsp;
-
-    /* The locations where the error started and ended.  */
-    YYLTYPE yyerror_range[3];
-
-    YYSIZE_T yystacksize;
-
-  int yyn;
-  int yyresult;
-  /* Lookahead token as an internal (translated) token number.  */
-  int yytoken = 0;
-  /* The variables used to return semantic value and location from the
-     action routines.  */
-  YYSTYPE yyval;
-  YYLTYPE yyloc;
-
-#if YYERROR_VERBOSE
-  /* Buffer for error messages, and its allocated size.  */
-  char yymsgbuf[128];
-  char *yymsg = yymsgbuf;
-  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
-
-#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
-
-  /* The number of symbols on the RHS of the reduced rule.
-     Keep to zero when no symbol should be popped.  */
-  int yylen = 0;
-
-  yyssp = yyss = yyssa;
-  yyvsp = yyvs = yyvsa;
-  yylsp = yyls = yylsa;
-  yystacksize = YYINITDEPTH;
-
-  YYDPRINTF ((stderr, "Starting parse\n"));
-
-  yystate = 0;
-  yyerrstatus = 0;
-  yynerrs = 0;
-  yychar = YYEMPTY; /* Cause a token to be read.  */
-  yylsp[0] = yylloc;
-  goto yysetstate;
-
-/*------------------------------------------------------------.
-| yynewstate -- Push a new state, which is found in yystate.  |
-`------------------------------------------------------------*/
- yynewstate:
-  /* In all cases, when you get here, the value and location stacks
-     have just been pushed.  So pushing a state here evens the stacks.  */
-  yyssp++;
-
- yysetstate:
-  *yyssp = yystate;
-
-  if (yyss + yystacksize - 1 <= yyssp)
-    {
-      /* Get the current used size of the three stacks, in elements.  */
-      YYSIZE_T yysize = yyssp - yyss + 1;
-
-#ifdef yyoverflow
-      {
-        /* Give user a chance to reallocate the stack.  Use copies of
-           these so that the &'s don't force the real ones into
-           memory.  */
-        YYSTYPE *yyvs1 = yyvs;
-        yytype_int16 *yyss1 = yyss;
-        YYLTYPE *yyls1 = yyls;
-
-        /* Each stack pointer address is followed by the size of the
-           data in use in that stack, in bytes.  This used to be a
-           conditional around just the two extra args, but that might
-           be undefined if yyoverflow is a macro.  */
-        yyoverflow (YY_("memory exhausted"),
-                    &yyss1, yysize * sizeof (*yyssp),
-                    &yyvs1, yysize * sizeof (*yyvsp),
-                    &yyls1, yysize * sizeof (*yylsp),
-                    &yystacksize);
-
-        yyls = yyls1;
-        yyss = yyss1;
-        yyvs = yyvs1;
-      }
-#else /* no yyoverflow */
-# ifndef YYSTACK_RELOCATE
-      goto yyexhaustedlab;
-# else
-      /* Extend the stack our own way.  */
-      if (YYMAXDEPTH <= yystacksize)
-        goto yyexhaustedlab;
-      yystacksize *= 2;
-      if (YYMAXDEPTH < yystacksize)
-        yystacksize = YYMAXDEPTH;
-
-      {
-        yytype_int16 *yyss1 = yyss;
-        union yyalloc *yyptr =
-          (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
-        if (! yyptr)
-          goto yyexhaustedlab;
-        YYSTACK_RELOCATE (yyss_alloc, yyss);
-        YYSTACK_RELOCATE (yyvs_alloc, yyvs);
-        YYSTACK_RELOCATE (yyls_alloc, yyls);
-#  undef YYSTACK_RELOCATE
-        if (yyss1 != yyssa)
-          YYSTACK_FREE (yyss1);
-      }
-# endif
-#endif /* no yyoverflow */
-
-      yyssp = yyss + yysize - 1;
-      yyvsp = yyvs + yysize - 1;
-      yylsp = yyls + yysize - 1;
-
-      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
-                  (unsigned long int) yystacksize));
-
-      if (yyss + yystacksize - 1 <= yyssp)
-        YYABORT;
-    }
-
-  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
-
-  if (yystate == YYFINAL)
-    YYACCEPT;
-
-  goto yybackup;
-
-/*-----------.
-| yybackup.  |
-`-----------*/
-yybackup:
-
-  /* Do appropriate processing given the current state.  Read a
-     lookahead token if we need one and don't already have one.  */
-
-  /* First try to decide what to do without reference to lookahead token.  */
-  yyn = yypact[yystate];
-  if (yypact_value_is_default (yyn))
-    goto yydefault;
-
-  /* Not known => get a lookahead token if don't already have one.  */
-
-  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
-  if (yychar == YYEMPTY)
-    {
-      YYDPRINTF ((stderr, "Reading a token: "));
-      yychar = yylex (&yylval, &yylloc, lexer, parser);
-    }
-
-  if (yychar <= YYEOF)
-    {
-      yychar = yytoken = YYEOF;
-      YYDPRINTF ((stderr, "Now at end of input.\n"));
-    }
-  else
-    {
-      yytoken = YYTRANSLATE (yychar);
-      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
-    }
-
-  /* If the proper action on seeing token YYTOKEN is to reduce or to
-     detect an error, take that action.  */
-  yyn += yytoken;
-  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
-    goto yydefault;
-  yyn = yytable[yyn];
-  if (yyn <= 0)
-    {
-      if (yytable_value_is_error (yyn))
-        goto yyerrlab;
-      yyn = -yyn;
-      goto yyreduce;
-    }
-
-  /* Count tokens shifted since error; after three, turn off error
-     status.  */
-  if (yyerrstatus)
-    yyerrstatus--;
-
-  /* Shift the lookahead token.  */
-  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
-
-  /* Discard the shifted token.  */
-  yychar = YYEMPTY;
-
-  yystate = yyn;
-  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-  *++yyvsp = yylval;
-  YY_IGNORE_MAYBE_UNINITIALIZED_END
-  *++yylsp = yylloc;
-  goto yynewstate;
-
-
-/*-----------------------------------------------------------.
-| yydefault -- do the default action for the current state.  |
-`-----------------------------------------------------------*/
-yydefault:
-  yyn = yydefact[yystate];
-  if (yyn == 0)
-    goto yyerrlab;
-  goto yyreduce;
-
-
-/*-----------------------------.
-| yyreduce -- Do a reduction.  |
-`-----------------------------*/
-yyreduce:
-  /* yyn is the number of a rule to reduce with.  */
-  yylen = yyr2[yyn];
-
-  /* If YYLEN is nonzero, implement the default value of the action:
-     '$$ = $1'.
-
-     Otherwise, the following line sets YYVAL to garbage.
-     This behavior is undocumented and Bison
-     users should not rely upon it.  Assigning to YYVAL
-     unconditionally makes the parser a bit smaller, and it avoids a
-     GCC warning that YYVAL may be used uninitialized.  */
-  yyval = yyvsp[1-yylen];
-
-  /* Default location.  */
-  YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
-  YY_REDUCE_PRINT (yyn);
-  switch (yyn)
-    {
-        case 2:
-#line 293 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      TextListNode* node = new TextListNode();
-      DUPTEXT(node->text, (yyvsp[0].text));
-      node->next = nullptr;
-      (yyval.text_list).first = (yyval.text_list).last = node;
-    }
-#line 2301 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 3:
-#line 299 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.text_list) = (yyvsp[-1].text_list);
-      TextListNode* node = new TextListNode();
-      DUPTEXT(node->text, (yyvsp[0].text));
-      node->next = nullptr;
-      (yyval.text_list).last->next = node;
-      (yyval.text_list).last = node;
-    }
-#line 2314 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 4:
-#line 309 "src/ast-parser.y" /* yacc.c:1646  */
-    { (yyval.text_list).first = (yyval.text_list).last = nullptr; }
-#line 2320 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 6:
-#line 314 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      TextListNode node;
-      node.text = (yyvsp[0].text);
-      node.next = nullptr;
-      TextList text_list;
-      text_list.first = &node;
-      text_list.last = &node;
-      char* data;
-      size_t size;
-      dup_text_list(&text_list, &data, &size);
-      (yyval.text).start = data;
-      (yyval.text).length = size;
-    }
-#line 2338 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 7:
-#line 332 "src/ast-parser.y" /* yacc.c:1646  */
-    { (yyval.types) = new TypeVector(); }
-#line 2344 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 8:
-#line 333 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.types) = (yyvsp[-1].types);
-      (yyval.types)->push_back((yyvsp[0].type));
-    }
-#line 2353 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 9:
-#line 339 "src/ast-parser.y" /* yacc.c:1646  */
-    {}
-#line 2359 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 10:
-#line 342 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.global) = new Global();
-      (yyval.global)->type = (yyvsp[0].type);
-      (yyval.global)->mutable_ = false;
-    }
-#line 2369 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 11:
-#line 347 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.global) = new Global();
-      (yyval.global)->type = (yyvsp[-1].type);
-      (yyval.global)->mutable_ = true;
-    }
-#line 2379 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 12:
-#line 354 "src/ast-parser.y" /* yacc.c:1646  */
-    { (yyval.func_sig) = (yyvsp[-1].func_sig); }
-#line 2385 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 13:
-#line 357 "src/ast-parser.y" /* yacc.c:1646  */
-    { (yyval.func_sig) = new FuncSignature(); }
-#line 2391 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 14:
-#line 358 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.func_sig) = new FuncSignature();
-      (yyval.func_sig)->param_types = std::move(*(yyvsp[-1].types));
-      delete (yyvsp[-1].types);
-    }
-#line 2401 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 15:
-#line 363 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.func_sig) = new FuncSignature();
-      (yyval.func_sig)->param_types = std::move(*(yyvsp[-5].types));
-      delete (yyvsp[-5].types);
-      (yyval.func_sig)->result_types = std::move(*(yyvsp[-1].types));
-      delete (yyvsp[-1].types);
-    }
-#line 2413 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 16:
-#line 370 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.func_sig) = new FuncSignature();
-      (yyval.func_sig)->result_types = std::move(*(yyvsp[-1].types));
-      delete (yyvsp[-1].types);
-    }
-#line 2423 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 17:
-#line 378 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.table) = new Table();
-      (yyval.table)->elem_limits = (yyvsp[-1].limits);
-    }
-#line 2432 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 18:
-#line 384 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.memory) = new Memory();
-      (yyval.memory)->page_limits = (yyvsp[0].limits);
-    }
-#line 2441 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 19:
-#line 390 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.limits).has_max = false;
-      (yyval.limits).initial = (yyvsp[0].u64);
-      (yyval.limits).max = 0;
-    }
-#line 2451 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 20:
-#line 395 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.limits).has_max = true;
-      (yyval.limits).initial = (yyvsp[-1].u64);
-      (yyval.limits).max = (yyvsp[0].u64);
-    }
-#line 2461 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 21:
-#line 402 "src/ast-parser.y" /* yacc.c:1646  */
-    { (yyval.var) = (yyvsp[-1].var); }
-#line 2467 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 22:
-#line 408 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      if (WABT_FAILED(parse_uint64((yyvsp[0].literal).text.start,
-                                        (yyvsp[0].literal).text.start + (yyvsp[0].literal).text.length, &(yyval.u64)))) {
-        ast_parser_error(&(yylsp[0]), lexer, parser,
-                              "invalid int " PRIstringslice "\"",
-                              WABT_PRINTF_STRING_SLICE_ARG((yyvsp[0].literal).text));
-      }
-    }
-#line 2480 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 23:
-#line 419 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.literal).type = (yyvsp[0].literal).type;
-      DUPTEXT((yyval.literal).text, (yyvsp[0].literal).text);
-    }
-#line 2489 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 24:
-#line 423 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.literal).type = (yyvsp[0].literal).type;
-      DUPTEXT((yyval.literal).text, (yyvsp[0].literal).text);
-    }
-#line 2498 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 25:
-#line 427 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.literal).type = (yyvsp[0].literal).type;
-      DUPTEXT((yyval.literal).text, (yyvsp[0].literal).text);
-    }
-#line 2507 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 26:
-#line 434 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.var).loc = (yylsp[0]);
-      (yyval.var).type = VarType::Index;
-      (yyval.var).index = (yyvsp[0].u64);
-    }
-#line 2517 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 27:
-#line 439 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.var).loc = (yylsp[0]);
-      (yyval.var).type = VarType::Name;
-      DUPTEXT((yyval.var).name, (yyvsp[0].text));
-    }
-#line 2527 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 28:
-#line 446 "src/ast-parser.y" /* yacc.c:1646  */
-    { (yyval.vars) = new VarVector(); }
-#line 2533 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 29:
-#line 447 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.vars) = (yyvsp[-1].vars);
-      (yyval.vars)->push_back((yyvsp[0].var));
-    }
-#line 2542 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 30:
-#line 453 "src/ast-parser.y" /* yacc.c:1646  */
-    { WABT_ZERO_MEMORY((yyval.text)); }
-#line 2548 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 32:
-#line 457 "src/ast-parser.y" /* yacc.c:1646  */
-    { DUPTEXT((yyval.text), (yyvsp[0].text)); }
-#line 2554 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 33:
-#line 461 "src/ast-parser.y" /* yacc.c:1646  */
-    { WABT_ZERO_MEMORY((yyval.text)); }
-#line 2560 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 35:
-#line 466 "src/ast-parser.y" /* yacc.c:1646  */
-    { (yyval.u64) = 0; }
-#line 2566 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 36:
-#line 467 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-    if (WABT_FAILED(parse_int64((yyvsp[0].text).start, (yyvsp[0].text).start + (yyvsp[0].text).length, &(yyval.u64),
-                                ParseIntType::SignedAndUnsigned))) {
-      ast_parser_error(&(yylsp[0]), lexer, parser,
-                            "invalid offset \"" PRIstringslice "\"",
-                            WABT_PRINTF_STRING_SLICE_ARG((yyvsp[0].text)));
-      }
-    }
-#line 2579 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 37:
-#line 477 "src/ast-parser.y" /* yacc.c:1646  */
-    { (yyval.u32) = USE_NATURAL_ALIGNMENT; }
-#line 2585 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 38:
-#line 478 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-    if (WABT_FAILED(parse_int32((yyvsp[0].text).start, (yyvsp[0].text).start + (yyvsp[0].text).length, &(yyval.u32),
-                                ParseIntType::UnsignedOnly))) {
-      ast_parser_error(&(yylsp[0]), lexer, parser,
-                       "invalid alignment \"" PRIstringslice "\"",
-                       WABT_PRINTF_STRING_SLICE_ARG((yyvsp[0].text)));
-      }
-    }
-#line 2598 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 39:
-#line 489 "src/ast-parser.y" /* yacc.c:1646  */
-    { (yyval.expr_list) = join_exprs1(&(yylsp[0]), (yyvsp[0].expr)); }
-#line 2604 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 40:
-#line 490 "src/ast-parser.y" /* yacc.c:1646  */
-    { (yyval.expr_list) = join_exprs1(&(yylsp[0]), (yyvsp[0].expr)); }
-#line 2610 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 41:
-#line 491 "src/ast-parser.y" /* yacc.c:1646  */
-    { (yyval.expr_list) = (yyvsp[0].expr_list); }
-#line 2616 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 42:
-#line 494 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.expr) = Expr::CreateUnreachable();
-    }
-#line 2624 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 43:
-#line 497 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.expr) = Expr::CreateNop();
-    }
-#line 2632 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 44:
-#line 500 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.expr) = Expr::CreateDrop();
-    }
-#line 2640 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 45:
-#line 503 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.expr) = Expr::CreateSelect();
-    }
-#line 2648 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 46:
-#line 506 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.expr) = Expr::CreateBr((yyvsp[0].var));
-    }
-#line 2656 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 47:
-#line 509 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.expr) = Expr::CreateBrIf((yyvsp[0].var));
-    }
-#line 2664 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 48:
-#line 512 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.expr) = Expr::CreateBrTable((yyvsp[-1].vars), (yyvsp[0].var));
-    }
-#line 2672 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 49:
-#line 515 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.expr) = Expr::CreateReturn();
-    }
-#line 2680 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 50:
-#line 518 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.expr) = Expr::CreateCall((yyvsp[0].var));
-    }
-#line 2688 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 51:
-#line 521 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.expr) = Expr::CreateCallIndirect((yyvsp[0].var));
-    }
-#line 2696 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 52:
-#line 524 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.expr) = Expr::CreateGetLocal((yyvsp[0].var));
-    }
-#line 2704 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 53:
-#line 527 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.expr) = Expr::CreateSetLocal((yyvsp[0].var));
-    }
-#line 2712 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 54:
-#line 530 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.expr) = Expr::CreateTeeLocal((yyvsp[0].var));
-    }
-#line 2720 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 55:
-#line 533 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.expr) = Expr::CreateGetGlobal((yyvsp[0].var));
-    }
-#line 2728 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 56:
-#line 536 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.expr) = Expr::CreateSetGlobal((yyvsp[0].var));
-    }
-#line 2736 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 57:
-#line 539 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.expr) = Expr::CreateLoad((yyvsp[-2].opcode), (yyvsp[0].u32), (yyvsp[-1].u64));
-    }
-#line 2744 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 58:
-#line 542 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.expr) = Expr::CreateStore((yyvsp[-2].opcode), (yyvsp[0].u32), (yyvsp[-1].u64));
-    }
-#line 2752 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 59:
-#line 545 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      Const const_;
-      WABT_ZERO_MEMORY(const_);
-      const_.loc = (yylsp[-1]);
-      if (WABT_FAILED(parse_const((yyvsp[-1].type), (yyvsp[0].literal).type, (yyvsp[0].literal).text.start,
-                                  (yyvsp[0].literal).text.start + (yyvsp[0].literal).text.length, &const_))) {
-        ast_parser_error(&(yylsp[0]), lexer, parser,
-                              "invalid literal \"" PRIstringslice "\"",
-                              WABT_PRINTF_STRING_SLICE_ARG((yyvsp[0].literal).text));
-      }
-      delete [] (yyvsp[0].literal).text.start;
-      (yyval.expr) = Expr::CreateConst(const_);
-    }
-#line 2770 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 60:
-#line 558 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.expr) = Expr::CreateUnary((yyvsp[0].opcode));
-    }
-#line 2778 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 61:
-#line 561 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.expr) = Expr::CreateBinary((yyvsp[0].opcode));
-    }
-#line 2786 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 62:
-#line 564 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.expr) = Expr::CreateCompare((yyvsp[0].opcode));
-    }
-#line 2794 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 63:
-#line 567 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.expr) = Expr::CreateConvert((yyvsp[0].opcode));
-    }
-#line 2802 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 64:
-#line 570 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.expr) = Expr::CreateCurrentMemory();
-    }
-#line 2810 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 65:
-#line 573 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.expr) = Expr::CreateGrowMemory();
-    }
-#line 2818 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 66:
-#line 578 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.expr) = Expr::CreateBlock((yyvsp[-2].block));
-      (yyval.expr)->block->label = (yyvsp[-3].text);
-      CHECK_END_LABEL((yylsp[0]), (yyval.expr)->block->label, (yyvsp[0].text));
-    }
-#line 2828 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 67:
-#line 583 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.expr) = Expr::CreateLoop((yyvsp[-2].block));
-      (yyval.expr)->loop->label = (yyvsp[-3].text);
-      CHECK_END_LABEL((yylsp[0]), (yyval.expr)->loop->label, (yyvsp[0].text));
-    }
-#line 2838 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 68:
-#line 588 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.expr) = Expr::CreateIf((yyvsp[-2].block), nullptr);
-      (yyval.expr)->if_.true_->label = (yyvsp[-3].text);
-      CHECK_END_LABEL((yylsp[0]), (yyval.expr)->if_.true_->label, (yyvsp[0].text));
-    }
-#line 2848 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 69:
-#line 593 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.expr) = Expr::CreateIf((yyvsp[-5].block), (yyvsp[-2].expr_list).first);
-      (yyval.expr)->if_.true_->label = (yyvsp[-6].text);
-      CHECK_END_LABEL((yylsp[-3]), (yyval.expr)->if_.true_->label, (yyvsp[-3].text));
-      CHECK_END_LABEL((yylsp[0]), (yyval.expr)->if_.true_->label, (yyvsp[0].text));
-    }
-#line 2859 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 70:
-#line 601 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.block) = new Block();
-      (yyval.block)->sig = std::move(*(yyvsp[-1].types));
-      delete (yyvsp[-1].types);
-      (yyval.block)->first = (yyvsp[0].expr_list).first;
-    }
-#line 2870 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 71:
-#line 610 "src/ast-parser.y" /* yacc.c:1646  */
-    { (yyval.expr_list) = (yyvsp[-1].expr_list); }
-#line 2876 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 72:
-#line 614 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.expr_list) = join_exprs2(&(yylsp[-1]), &(yyvsp[0].expr_list), (yyvsp[-1].expr));
-    }
-#line 2884 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 73:
-#line 617 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      Expr* expr = Expr::CreateBlock((yyvsp[0].block));
-      expr->block->label = (yyvsp[-1].text);
-      (yyval.expr_list) = join_exprs1(&(yylsp[-2]), expr);
-    }
-#line 2894 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 74:
-#line 622 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      Expr* expr = Expr::CreateLoop((yyvsp[0].block));
-      expr->loop->label = (yyvsp[-1].text);
-      (yyval.expr_list) = join_exprs1(&(yylsp[-2]), expr);
-    }
-#line 2904 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 75:
-#line 627 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.expr_list) = (yyvsp[0].expr_list);
-      Expr* if_ = (yyvsp[0].expr_list).last;
-      assert(if_->type == ExprType::If);
-      if_->if_.true_->label = (yyvsp[-2].text);
-      if_->if_.true_->sig = std::move(*(yyvsp[-1].types));
-      delete (yyvsp[-1].types);
-    }
-#line 2917 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 76:
-#line 637 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      Expr* expr = Expr::CreateIf(new Block((yyvsp[-5].expr_list).first), (yyvsp[-1].expr_list).first);
-      (yyval.expr_list) = join_exprs1(&(yylsp[-7]), expr);
-    }
-#line 2926 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 77:
-#line 641 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      Expr* expr = Expr::CreateIf(new Block((yyvsp[-1].expr_list).first), nullptr);
-      (yyval.expr_list) = join_exprs1(&(yylsp[-3]), expr);
-    }
-#line 2935 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 78:
-#line 645 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      Expr* expr = Expr::CreateIf(new Block((yyvsp[-5].expr_list).first), (yyvsp[-1].expr_list).first);
-      (yyval.expr_list) = join_exprs2(&(yylsp[-8]), &(yyvsp[-8].expr_list), expr);
-    }
-#line 2944 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 79:
-#line 649 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      Expr* expr = Expr::CreateIf(new Block((yyvsp[-1].expr_list).first), nullptr);
-      (yyval.expr_list) = join_exprs2(&(yylsp[-4]), &(yyvsp[-4].expr_list), expr);
-    }
-#line 2953 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 80:
-#line 653 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      Expr* expr = Expr::CreateIf(new Block((yyvsp[-1].expr_list).first), (yyvsp[0].expr_list).first);
-      (yyval.expr_list) = join_exprs2(&(yylsp[-2]), &(yyvsp[-2].expr_list), expr);
-    }
-#line 2962 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 81:
-#line 657 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      Expr* expr = Expr::CreateIf(new Block((yyvsp[0].expr_list).first), nullptr);
-      (yyval.expr_list) = join_exprs2(&(yylsp[-1]), &(yyvsp[-1].expr_list), expr);
-    }
-#line 2971 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 82:
-#line 664 "src/ast-parser.y" /* yacc.c:1646  */
-    { WABT_ZERO_MEMORY((yyval.expr_list)); }
-#line 2977 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 83:
-#line 665 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.expr_list).first = (yyvsp[-1].expr_list).first;
-      (yyvsp[-1].expr_list).last->next = (yyvsp[0].expr_list).first;
-      (yyval.expr_list).last = (yyvsp[0].expr_list).last ? (yyvsp[0].expr_list).last : (yyvsp[-1].expr_list).last;
-      (yyval.expr_list).size = (yyvsp[-1].expr_list).size + (yyvsp[0].expr_list).size;
-    }
-#line 2988 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 84:
-#line 673 "src/ast-parser.y" /* yacc.c:1646  */
-    { WABT_ZERO_MEMORY((yyval.expr_list)); }
-#line 2994 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 85:
-#line 674 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.expr_list).first = (yyvsp[-1].expr_list).first;
-      (yyvsp[-1].expr_list).last->next = (yyvsp[0].expr_list).first;
-      (yyval.expr_list).last = (yyvsp[0].expr_list).last ? (yyvsp[0].expr_list).last : (yyvsp[-1].expr_list).last;
-      (yyval.expr_list).size = (yyvsp[-1].expr_list).size + (yyvsp[0].expr_list).size;
-    }
-#line 3005 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 88:
-#line 688 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.func_fields) = new FuncField();
-      (yyval.func_fields)->type = FuncFieldType::ResultTypes;
-      (yyval.func_fields)->types = (yyvsp[-2].types);
-      (yyval.func_fields)->next = (yyvsp[0].func_fields);
-    }
-#line 3016 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 89:
-#line 694 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.func_fields) = new FuncField();
-      (yyval.func_fields)->type = FuncFieldType::ParamTypes;
-      (yyval.func_fields)->types = (yyvsp[-2].types);
-      (yyval.func_fields)->next = (yyvsp[0].func_fields);
-    }
-#line 3027 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 90:
-#line 700 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.func_fields) = new FuncField();
-      (yyval.func_fields)->type = FuncFieldType::BoundParam;
-      (yyval.func_fields)->bound_type.loc = (yylsp[-4]);
-      (yyval.func_fields)->bound_type.name = (yyvsp[-3].text);
-      (yyval.func_fields)->bound_type.type = (yyvsp[-2].type);
-      (yyval.func_fields)->next = (yyvsp[0].func_fields);
-    }
-#line 3040 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 91:
-#line 710 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.func_fields) = new FuncField();
-      (yyval.func_fields)->type = FuncFieldType::Exprs;
-      (yyval.func_fields)->first_expr = (yyvsp[0].expr_list).first;
-      (yyval.func_fields)->next = nullptr;
-    }
-#line 3051 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 92:
-#line 716 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.func_fields) = new FuncField();
-      (yyval.func_fields)->type = FuncFieldType::LocalTypes;
-      (yyval.func_fields)->types = (yyvsp[-2].types);
-      (yyval.func_fields)->next = (yyvsp[0].func_fields);
-    }
-#line 3062 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 93:
-#line 722 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.func_fields) = new FuncField();
-      (yyval.func_fields)->type = FuncFieldType::BoundLocal;
-      (yyval.func_fields)->bound_type.loc = (yylsp[-4]);
-      (yyval.func_fields)->bound_type.name = (yyvsp[-3].text);
-      (yyval.func_fields)->bound_type.type = (yyvsp[-2].type);
-      (yyval.func_fields)->next = (yyvsp[0].func_fields);
-    }
-#line 3075 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 94:
-#line 732 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.func) = new Func();
-      FuncField* field = (yyvsp[0].func_fields);
-
-      while (field) {
-        FuncField* next = field->next;
-        switch (field->type) {
-          case FuncFieldType::Exprs:
-            (yyval.func)->first_expr = field->first_expr;
-            field->first_expr = nullptr;
-            break;
-
-          case FuncFieldType::ParamTypes:
-          case FuncFieldType::LocalTypes: {
-            TypeVector& types = field->type == FuncFieldType::ParamTypes
-                                    ? (yyval.func)->decl.sig.param_types
-                                    : (yyval.func)->local_types;
-            types.insert(types.end(), field->types->begin(),
-                         field->types->end());
-            break;
-          }
-
-          case FuncFieldType::BoundParam:
-          case FuncFieldType::BoundLocal: {
-            TypeVector* types;
-            BindingHash* bindings;
-            if (field->type == FuncFieldType::BoundParam) {
-              types = &(yyval.func)->decl.sig.param_types;
-              bindings = &(yyval.func)->param_bindings;
-            } else {
-              types = &(yyval.func)->local_types;
-              bindings = &(yyval.func)->local_bindings;
-            }
-
-            types->push_back(field->bound_type.type);
-            bindings->emplace(
-                string_slice_to_string(field->bound_type.name),
-                Binding(field->bound_type.loc, types->size() - 1));
-            break;
-          }
-
-          case FuncFieldType::ResultTypes:
-            (yyval.func)->decl.sig.result_types = std::move(*field->types);
-            break;
-        }
-
-        delete field;
-        field = next;
-      }
-    }
-#line 3130 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 95:
-#line 784 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.exported_func) = new ExportedFunc();
-      (yyval.exported_func)->func.reset((yyvsp[-1].func));
-      (yyval.exported_func)->func->decl.has_func_type = true;
-      (yyval.exported_func)->func->decl.type_var = (yyvsp[-2].var);
-      (yyval.exported_func)->func->name = (yyvsp[-4].text);
-      (yyval.exported_func)->export_ = std::move(*(yyvsp[-3].optional_export));
-      delete (yyvsp[-3].optional_export);
-    }
-#line 3144 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 96:
-#line 794 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.exported_func) = new ExportedFunc();
-      (yyval.exported_func)->func.reset((yyvsp[-1].func));
-      (yyval.exported_func)->func->decl.has_func_type = true;
-      (yyval.exported_func)->func->decl.type_var = (yyvsp[-2].var);
-      (yyval.exported_func)->func->name = (yyvsp[-3].text);
-    }
-#line 3156 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 97:
-#line 801 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.exported_func) = new ExportedFunc();
-      (yyval.exported_func)->func.reset((yyvsp[-1].func));
-      (yyval.exported_func)->func->name = (yyvsp[-3].text);
-      (yyval.exported_func)->export_ = std::move(*(yyvsp[-2].optional_export));
-      delete (yyvsp[-2].optional_export);
-    }
-#line 3168 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 98:
-#line 809 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.exported_func) = new ExportedFunc();
-      (yyval.exported_func)->func.reset((yyvsp[-1].func));
-      (yyval.exported_func)->func->name = (yyvsp[-2].text);
-    }
-#line 3178 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 99:
-#line 819 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.expr_list) = (yyvsp[-1].expr_list);
-    }
-#line 3186 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 101:
-#line 826 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.elem_segment) = new ElemSegment();
-      (yyval.elem_segment)->table_var = (yyvsp[-3].var);
-      (yyval.elem_segment)->offset = (yyvsp[-2].expr_list).first;
-      (yyval.elem_segment)->vars = std::move(*(yyvsp[-1].vars));
-      delete (yyvsp[-1].vars);
-    }
-#line 3198 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 102:
-#line 833 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.elem_segment) = new ElemSegment();
-      (yyval.elem_segment)->table_var.loc = (yylsp[-3]);
-      (yyval.elem_segment)->table_var.type = VarType::Index;
-      (yyval.elem_segment)->table_var.index = 0;
-      (yyval.elem_segment)->offset = (yyvsp[-2].expr_list).first;
-      (yyval.elem_segment)->vars = std::move(*(yyvsp[-1].vars));
-      delete (yyvsp[-1].vars);
-    }
-#line 3212 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 103:
-#line 845 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.exported_table) = new ExportedTable();
-      (yyval.exported_table)->table.reset((yyvsp[-1].table));
-      (yyval.exported_table)->table->name = (yyvsp[-3].text);
-      (yyval.exported_table)->has_elem_segment = false;
-      (yyval.exported_table)->export_ = std::move(*(yyvsp[-2].optional_export));
-      delete (yyvsp[-2].optional_export);
-    }
-#line 3225 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 104:
-#line 854 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      Expr* expr = Expr::CreateConst(Const(Const::I32(), 0));
-      expr->loc = (yylsp[-8]);
-
-      (yyval.exported_table) = new ExportedTable();
-      (yyval.exported_table)->table.reset(new Table());
-      (yyval.exported_table)->table->name = (yyvsp[-7].text);
-      (yyval.exported_table)->table->elem_limits.initial = (yyvsp[-2].vars)->size();
-      (yyval.exported_table)->table->elem_limits.max = (yyvsp[-2].vars)->size();
-      (yyval.exported_table)->table->elem_limits.has_max = true;
-      (yyval.exported_table)->has_elem_segment = true;
-      (yyval.exported_table)->elem_segment.reset(new ElemSegment());
-      (yyval.exported_table)->elem_segment->offset = expr;
-      (yyval.exported_table)->elem_segment->vars = std::move(*(yyvsp[-2].vars));
-      delete (yyvsp[-2].vars);
-      (yyval.exported_table)->export_ = std::move(*(yyvsp[-6].optional_export));
-      delete (yyvsp[-6].optional_export);
-    }
-#line 3248 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 105:
-#line 875 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.data_segment) = new DataSegment();
-      (yyval.data_segment)->memory_var = (yyvsp[-3].var);
-      (yyval.data_segment)->offset = (yyvsp[-2].expr_list).first;
-      dup_text_list(&(yyvsp[-1].text_list), &(yyval.data_segment)->data, &(yyval.data_segment)->size);
-      destroy_text_list(&(yyvsp[-1].text_list));
-    }
-#line 3260 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 106:
-#line 882 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.data_segment) = new DataSegment();
-      (yyval.data_segment)->memory_var.loc = (yylsp[-3]);
-      (yyval.data_segment)->memory_var.type = VarType::Index;
-      (yyval.data_segment)->memory_var.index = 0;
-      (yyval.data_segment)->offset = (yyvsp[-2].expr_list).first;
-      dup_text_list(&(yyvsp[-1].text_list), &(yyval.data_segment)->data, &(yyval.data_segment)->size);
-      destroy_text_list(&(yyvsp[-1].text_list));
-    }
-#line 3274 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 107:
-#line 894 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.exported_memory) = new ExportedMemory();
-      (yyval.exported_memory)->memory.reset((yyvsp[-1].memory));
-      (yyval.exported_memory)->memory->name = (yyvsp[-3].text);
-      (yyval.exported_memory)->has_data_segment = false;
-      (yyval.exported_memory)->export_ = std::move(*(yyvsp[-2].optional_export));
-      delete (yyvsp[-2].optional_export);
-    }
-#line 3287 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 108:
-#line 902 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      Expr* expr = Expr::CreateConst(Const(Const::I32(), 0));
-      expr->loc = (yylsp[-7]);
-
-      (yyval.exported_memory) = new ExportedMemory();
-      (yyval.exported_memory)->has_data_segment = true;
-      (yyval.exported_memory)->data_segment.reset(new DataSegment());
-      (yyval.exported_memory)->data_segment->offset = expr;
-      dup_text_list(&(yyvsp[-2].text_list), &(yyval.exported_memory)->data_segment->data, &(yyval.exported_memory)->data_segment->size);
-      destroy_text_list(&(yyvsp[-2].text_list));
-      uint32_t byte_size = WABT_ALIGN_UP_TO_PAGE((yyval.exported_memory)->data_segment->size);
-      uint32_t page_size = WABT_BYTES_TO_PAGES(byte_size);
-      (yyval.exported_memory)->memory.reset(new Memory());
-      (yyval.exported_memory)->memory->name = (yyvsp[-6].text);
-      (yyval.exported_memory)->memory->page_limits.initial = page_size;
-      (yyval.exported_memory)->memory->page_limits.max = page_size;
-      (yyval.exported_memory)->memory->page_limits.has_max = true;
-      (yyval.exported_memory)->export_ = std::move(*(yyvsp[-5].optional_export));
-      delete (yyvsp[-5].optional_export);
-    }
-#line 3312 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 109:
-#line 923 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      Expr* expr = Expr::CreateConst(Const(Const::I32(), 0));
-      expr->loc = (yylsp[-6]);
-
-      (yyval.exported_memory) = new ExportedMemory();
-      (yyval.exported_memory)->has_data_segment = true;
-      (yyval.exported_memory)->data_segment.reset(new DataSegment());
-      (yyval.exported_memory)->data_segment->offset = expr;
-      dup_text_list(&(yyvsp[-2].text_list), &(yyval.exported_memory)->data_segment->data, &(yyval.exported_memory)->data_segment->size);
-      destroy_text_list(&(yyvsp[-2].text_list));
-      uint32_t byte_size = WABT_ALIGN_UP_TO_PAGE((yyval.exported_memory)->data_segment->size);
-      uint32_t page_size = WABT_BYTES_TO_PAGES(byte_size);
-      (yyval.exported_memory)->memory.reset(new Memory());
-      (yyval.exported_memory)->memory->name = (yyvsp[-5].text);
-      (yyval.exported_memory)->memory->page_limits.initial = page_size;
-      (yyval.exported_memory)->memory->page_limits.max = page_size;
-      (yyval.exported_memory)->memory->page_limits.has_max = true;
-      (yyval.exported_memory)->export_.has_export = false;
-    }
-#line 3336 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 110:
-#line 945 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.exported_global) = new ExportedGlobal();
-      (yyval.exported_global)->global.reset((yyvsp[-2].global));
-      (yyval.exported_global)->global->name = (yyvsp[-4].text);
-      (yyval.exported_global)->global->init_expr = (yyvsp[-1].expr_list).first;
-      (yyval.exported_global)->export_ = std::move(*(yyvsp[-3].optional_export));
-      delete (yyvsp[-3].optional_export);
-    }
-#line 3349 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 111:
-#line 953 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.exported_global) = new ExportedGlobal();
-      (yyval.exported_global)->global.reset((yyvsp[-2].global));
-      (yyval.exported_global)->global->name = (yyvsp[-3].text);
-      (yyval.exported_global)->global->init_expr = (yyvsp[-1].expr_list).first;
-      (yyval.exported_global)->export_.has_export = false;
-    }
-#line 3361 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 112:
-#line 966 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.import) = new Import();
-      (yyval.import)->kind = ExternalKind::Func;
-      (yyval.import)->func = new Func();
-      (yyval.import)->func->name = (yyvsp[-2].text);
-      (yyval.import)->func->decl.has_func_type = true;
-      (yyval.import)->func->decl.type_var = (yyvsp[-1].var);
-    }
-#line 3374 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 113:
-#line 974 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.import) = new Import();
-      (yyval.import)->kind = ExternalKind::Func;
-      (yyval.import)->func = new Func();
-      (yyval.import)->func->name = (yyvsp[-2].text);
-      (yyval.import)->func->decl.sig = std::move(*(yyvsp[-1].func_sig));
-      delete (yyvsp[-1].func_sig);
-    }
-#line 3387 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 114:
-#line 982 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.import) = new Import();
-      (yyval.import)->kind = ExternalKind::Table;
-      (yyval.import)->table = (yyvsp[-1].table);
-      (yyval.import)->table->name = (yyvsp[-2].text);
-    }
-#line 3398 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 115:
-#line 988 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.import) = new Import();
-      (yyval.import)->kind = ExternalKind::Memory;
-      (yyval.import)->memory = (yyvsp[-1].memory);
-      (yyval.import)->memory->name = (yyvsp[-2].text);
-    }
-#line 3409 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 116:
-#line 994 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.import) = new Import();
-      (yyval.import)->kind = ExternalKind::Global;
-      (yyval.import)->global = (yyvsp[-1].global);
-      (yyval.import)->global->name = (yyvsp[-2].text);
-    }
-#line 3420 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 117:
-#line 1002 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.import) = (yyvsp[-1].import);
-      (yyval.import)->module_name = (yyvsp[-3].text);
-      (yyval.import)->field_name = (yyvsp[-2].text);
-    }
-#line 3430 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 118:
-#line 1007 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.import) = (yyvsp[-2].import);
-      (yyval.import)->kind = ExternalKind::Func;
-      (yyval.import)->func = new Func();
-      (yyval.import)->func->name = (yyvsp[-3].text);
-      (yyval.import)->func->decl.has_func_type = true;
-      (yyval.import)->func->decl.type_var = (yyvsp[-1].var);
-    }
-#line 3443 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 119:
-#line 1015 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.import) = (yyvsp[-2].import);
-      (yyval.import)->kind = ExternalKind::Func;
-      (yyval.import)->func = new Func();
-      (yyval.import)->func->name = (yyvsp[-3].text);
-      (yyval.import)->func->decl.sig = std::move(*(yyvsp[-1].func_sig));
-      delete (yyvsp[-1].func_sig);
-    }
-#line 3456 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 120:
-#line 1023 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.import) = (yyvsp[-2].import);
-      (yyval.import)->kind = ExternalKind::Table;
-      (yyval.import)->table = (yyvsp[-1].table);
-      (yyval.import)->table->name = (yyvsp[-3].text);
-    }
-#line 3467 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 121:
-#line 1029 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.import) = (yyvsp[-2].import);
-      (yyval.import)->kind = ExternalKind::Memory;
-      (yyval.import)->memory = (yyvsp[-1].memory);
-      (yyval.import)->memory->name = (yyvsp[-3].text);
-    }
-#line 3478 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 122:
-#line 1035 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.import) = (yyvsp[-2].import);
-      (yyval.import)->kind = ExternalKind::Global;
-      (yyval.import)->global = (yyvsp[-1].global);
-      (yyval.import)->global->name = (yyvsp[-3].text);
-    }
-#line 3489 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 123:
-#line 1044 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.import) = new Import();
-      (yyval.import)->module_name = (yyvsp[-2].text);
-      (yyval.import)->field_name = (yyvsp[-1].text);
-    }
-#line 3499 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 124:
-#line 1052 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.export_) = new Export();
-      (yyval.export_)->kind = ExternalKind::Func;
-      (yyval.export_)->var = (yyvsp[-1].var);
-    }
-#line 3509 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 125:
-#line 1057 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.export_) = new Export();
-      (yyval.export_)->kind = ExternalKind::Table;
-      (yyval.export_)->var = (yyvsp[-1].var);
-    }
-#line 3519 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 126:
-#line 1062 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.export_) = new Export();
-      (yyval.export_)->kind = ExternalKind::Memory;
-      (yyval.export_)->var = (yyvsp[-1].var);
-    }
-#line 3529 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 127:
-#line 1067 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.export_) = new Export();
-      (yyval.export_)->kind = ExternalKind::Global;
-      (yyval.export_)->var = (yyvsp[-1].var);
-    }
-#line 3539 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 128:
-#line 1074 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.export_) = (yyvsp[-1].export_);
-      (yyval.export_)->name = (yyvsp[-2].text);
-    }
-#line 3548 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 129:
-#line 1081 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.optional_export) = new OptionalExport();
-      (yyval.optional_export)->has_export = false;
-    }
-#line 3557 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 131:
-#line 1088 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.optional_export) = new OptionalExport();
-      (yyval.optional_export)->has_export = true;
-      (yyval.optional_export)->export_.reset(new Export());
-      (yyval.optional_export)->export_->name = (yyvsp[-1].text);
-    }
-#line 3568 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 132:
-#line 1100 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.func_type) = new FuncType();
-      (yyval.func_type)->sig = std::move(*(yyvsp[-1].func_sig));
-      delete (yyvsp[-1].func_sig);
-    }
-#line 3578 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 133:
-#line 1105 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.func_type) = new FuncType();
-      (yyval.func_type)->name = (yyvsp[-2].text);
-      (yyval.func_type)->sig = std::move(*(yyvsp[-1].func_sig));
-      delete (yyvsp[-1].func_sig);
-    }
-#line 3589 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 134:
-#line 1114 "src/ast-parser.y" /* yacc.c:1646  */
-    { (yyval.var) = (yyvsp[-1].var); }
-#line 3595 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 135:
-#line 1118 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.module) = new Module();
-    }
-#line 3603 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 136:
-#line 1121 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.module) = (yyvsp[-1].module);
-      ModuleField* field;
-      APPEND_FIELD_TO_LIST((yyval.module), field, FuncType, func_type, (yylsp[0]), (yyvsp[0].func_type));
-      APPEND_ITEM_TO_VECTOR((yyval.module), func_types, field->func_type);
-      INSERT_BINDING((yyval.module), func_type, func_types, (yylsp[0]), (yyvsp[0].func_type)->name);
-    }
-#line 3615 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 137:
-#line 1128 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.module) = (yyvsp[-1].module);
-      ModuleField* field;
-      APPEND_FIELD_TO_LIST((yyval.module), field, Global, global, (yylsp[0]), (yyvsp[0].exported_global)->global.release());
-      APPEND_ITEM_TO_VECTOR((yyval.module), globals, field->global);
-      INSERT_BINDING((yyval.module), global, globals, (yylsp[0]), field->global->name);
-      APPEND_INLINE_EXPORT((yyval.module), Global, (yylsp[0]), (yyvsp[0].exported_global), (yyval.module)->globals.size() - 1);
-      delete (yyvsp[0].exported_global);
-    }
-#line 3629 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 138:
-#line 1137 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.module) = (yyvsp[-1].module);
-      ModuleField* field;
-      APPEND_FIELD_TO_LIST((yyval.module), field, Table, table, (yylsp[0]), (yyvsp[0].exported_table)->table.release());
-      APPEND_ITEM_TO_VECTOR((yyval.module), tables, field->table);
-      INSERT_BINDING((yyval.module), table, tables, (yylsp[0]), field->table->name);
-      APPEND_INLINE_EXPORT((yyval.module), Table, (yylsp[0]), (yyvsp[0].exported_table), (yyval.module)->tables.size() - 1);
-
-      if ((yyvsp[0].exported_table)->has_elem_segment) {
-        ModuleField* elem_segment_field;
-        APPEND_FIELD_TO_LIST((yyval.module), elem_segment_field, ElemSegment, elem_segment,
-                             (yylsp[0]), (yyvsp[0].exported_table)->elem_segment.release());
-        APPEND_ITEM_TO_VECTOR((yyval.module), elem_segments,
-                              elem_segment_field->elem_segment);
-      }
-      delete (yyvsp[0].exported_table);
-    }
-#line 3651 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 139:
-#line 1154 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.module) = (yyvsp[-1].module);
-      ModuleField* field;
-      APPEND_FIELD_TO_LIST((yyval.module), field, Memory, memory, (yylsp[0]), (yyvsp[0].exported_memory)->memory.release());
-      APPEND_ITEM_TO_VECTOR((yyval.module), memories, field->memory);
-      INSERT_BINDING((yyval.module), memory, memories, (yylsp[0]), field->memory->name);
-      APPEND_INLINE_EXPORT((yyval.module), Memory, (yylsp[0]), (yyvsp[0].exported_memory), (yyval.module)->memories.size() - 1);
-
-      if ((yyvsp[0].exported_memory)->has_data_segment) {
-        ModuleField* data_segment_field;
-        APPEND_FIELD_TO_LIST((yyval.module), data_segment_field, DataSegment, data_segment,
-                             (yylsp[0]), (yyvsp[0].exported_memory)->data_segment.release());
-        APPEND_ITEM_TO_VECTOR((yyval.module), data_segments,
-                              data_segment_field->data_segment);
-      }
-      delete (yyvsp[0].exported_memory);
-    }
-#line 3673 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 140:
-#line 1171 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.module) = (yyvsp[-1].module);
-      ModuleField* field;
-      APPEND_FIELD_TO_LIST((yyval.module), field, Func, func, (yylsp[0]), (yyvsp[0].exported_func)->func.release());
-      append_implicit_func_declaration(&(yylsp[0]), (yyval.module), &field->func->decl);
-      APPEND_ITEM_TO_VECTOR((yyval.module), funcs, field->func);
-      INSERT_BINDING((yyval.module), func, funcs, (yylsp[0]), field->func->name);
-      APPEND_INLINE_EXPORT((yyval.module), Func, (yylsp[0]), (yyvsp[0].exported_func), (yyval.module)->funcs.size() - 1);
-      delete (yyvsp[0].exported_func);
-    }
-#line 3688 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 141:
-#line 1181 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.module) = (yyvsp[-1].module);
-      ModuleField* field;
-      APPEND_FIELD_TO_LIST((yyval.module), field, ElemSegment, elem_segment, (yylsp[0]), (yyvsp[0].elem_segment));
-      APPEND_ITEM_TO_VECTOR((yyval.module), elem_segments, field->elem_segment);
-    }
-#line 3699 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 142:
-#line 1187 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.module) = (yyvsp[-1].module);
-      ModuleField* field;
-      APPEND_FIELD_TO_LIST((yyval.module), field, DataSegment, data_segment, (yylsp[0]), (yyvsp[0].data_segment));
-      APPEND_ITEM_TO_VECTOR((yyval.module), data_segments, field->data_segment);
-    }
-#line 3710 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 143:
-#line 1193 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.module) = (yyvsp[-1].module);
-      ModuleField* field;
-      APPEND_FIELD_TO_LIST((yyval.module), field, Start, start, (yylsp[0]), (yyvsp[0].var));
-      (yyval.module)->start = &field->start;
-    }
-#line 3721 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 144:
-#line 1199 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.module) = (yyvsp[-1].module);
-      ModuleField* field;
-      APPEND_FIELD_TO_LIST((yyval.module), field, Import, import, (yylsp[0]), (yyvsp[0].import));
-      CHECK_IMPORT_ORDERING((yyval.module), func, funcs, (yylsp[0]));
-      CHECK_IMPORT_ORDERING((yyval.module), table, tables, (yylsp[0]));
-      CHECK_IMPORT_ORDERING((yyval.module), memory, memories, (yylsp[0]));
-      CHECK_IMPORT_ORDERING((yyval.module), global, globals, (yylsp[0]));
-      switch ((yyvsp[0].import)->kind) {
-        case ExternalKind::Func:
-          append_implicit_func_declaration(&(yylsp[0]), (yyval.module), &field->import->func->decl);
-          APPEND_ITEM_TO_VECTOR((yyval.module), funcs, field->import->func);
-          INSERT_BINDING((yyval.module), func, funcs, (yylsp[0]), field->import->func->name);
-          (yyval.module)->num_func_imports++;
-          break;
-        case ExternalKind::Table:
-          APPEND_ITEM_TO_VECTOR((yyval.module), tables, field->import->table);
-          INSERT_BINDING((yyval.module), table, tables, (yylsp[0]), field->import->table->name);
-          (yyval.module)->num_table_imports++;
-          break;
-        case ExternalKind::Memory:
-          APPEND_ITEM_TO_VECTOR((yyval.module), memories, field->import->memory);
-          INSERT_BINDING((yyval.module), memory, memories, (yylsp[0]), field->import->memory->name);
-          (yyval.module)->num_memory_imports++;
-          break;
-        case ExternalKind::Global:
-          APPEND_ITEM_TO_VECTOR((yyval.module), globals, field->import->global);
-          INSERT_BINDING((yyval.module), global, globals, (yylsp[0]), field->import->global->name);
-          (yyval.module)->num_global_imports++;
-          break;
-      }
-      APPEND_ITEM_TO_VECTOR((yyval.module), imports, field->import);
-    }
-#line 3759 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 145:
-#line 1232 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.module) = (yyvsp[-1].module);
-      ModuleField* field;
-      APPEND_FIELD_TO_LIST((yyval.module), field, Export, export_, (yylsp[0]), (yyvsp[0].export_));
-      APPEND_ITEM_TO_VECTOR((yyval.module), exports, field->export_);
-      INSERT_BINDING((yyval.module), export, exports, (yylsp[0]), field->export_->name);
-    }
-#line 3771 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 146:
-#line 1242 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.raw_module) = new RawModule();
-      (yyval.raw_module)->type = RawModuleType::Text;
-      (yyval.raw_module)->text = (yyvsp[-1].module);
-      (yyval.raw_module)->text->name = (yyvsp[-2].text);
-      (yyval.raw_module)->text->loc = (yylsp[-3]);
-
-      /* resolve func type variables where the signature was not specified
-       * explicitly */
-      for (Func* func: (yyvsp[-1].module)->funcs) {
-        if (decl_has_func_type(&func->decl) &&
-            is_empty_signature(&func->decl.sig)) {
-          FuncType* func_type =
-              get_func_type_by_var((yyvsp[-1].module), &func->decl.type_var);
-          if (func_type) {
-            func->decl.sig = func_type->sig;
-          }
-        }
-      }
-    }
-#line 3796 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 147:
-#line 1262 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.raw_module) = new RawModule();
-      (yyval.raw_module)->type = RawModuleType::Binary;
-      (yyval.raw_module)->binary.name = (yyvsp[-2].text);
-      (yyval.raw_module)->binary.loc = (yylsp[-3]);
-      dup_text_list(&(yyvsp[-1].text_list), &(yyval.raw_module)->binary.data, &(yyval.raw_module)->binary.size);
-      destroy_text_list(&(yyvsp[-1].text_list));
-    }
-#line 3809 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 148:
-#line 1273 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      if ((yyvsp[0].raw_module)->type == RawModuleType::Text) {
-        (yyval.module) = (yyvsp[0].raw_module)->text;
-        (yyvsp[0].raw_module)->text = nullptr;
-      } else {
-        assert((yyvsp[0].raw_module)->type == RawModuleType::Binary);
-        (yyval.module) = new Module();
-        ReadBinaryOptions options = WABT_READ_BINARY_OPTIONS_DEFAULT;
-        BinaryErrorCallbackData user_data;
-        user_data.loc = &(yyvsp[0].raw_module)->binary.loc;
-        user_data.lexer = lexer;
-        user_data.parser = parser;
-        BinaryErrorHandler error_handler;
-        error_handler.on_error = on_read_binary_error;
-        error_handler.user_data = &user_data;
-        read_binary_ast((yyvsp[0].raw_module)->binary.data, (yyvsp[0].raw_module)->binary.size, &options,
-                        &error_handler, (yyval.module));
-        (yyval.module)->name = (yyvsp[0].raw_module)->binary.name;
-        (yyval.module)->loc = (yyvsp[0].raw_module)->binary.loc;
-        WABT_ZERO_MEMORY((yyvsp[0].raw_module)->binary.name);
-      }
-      delete (yyvsp[0].raw_module);
-    }
-#line 3837 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 149:
-#line 1301 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      WABT_ZERO_MEMORY((yyval.var));
-      (yyval.var).type = VarType::Index;
-      (yyval.var).index = INVALID_VAR_INDEX;
-    }
-#line 3847 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 150:
-#line 1306 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      WABT_ZERO_MEMORY((yyval.var));
-      (yyval.var).type = VarType::Name;
-      DUPTEXT((yyval.var).name, (yyvsp[0].text));
-    }
-#line 3857 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 151:
-#line 1314 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.action) = new Action();
-      (yyval.action)->loc = (yylsp[-4]);
-      (yyval.action)->module_var = (yyvsp[-3].var);
-      (yyval.action)->type = ActionType::Invoke;
-      (yyval.action)->name = (yyvsp[-2].text);
-      (yyval.action)->invoke = new ActionInvoke();
-      (yyval.action)->invoke->args = std::move(*(yyvsp[-1].consts));
-      delete (yyvsp[-1].consts);
-    }
-#line 3872 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 152:
-#line 1324 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.action) = new Action();
-      (yyval.action)->loc = (yylsp[-3]);
-      (yyval.action)->module_var = (yyvsp[-2].var);
-      (yyval.action)->type = ActionType::Get;
-      (yyval.action)->name = (yyvsp[-1].text);
-    }
-#line 3884 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 153:
-#line 1334 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.command) = new Command();
-      (yyval.command)->type = CommandType::AssertMalformed;
-      (yyval.command)->assert_malformed.module = (yyvsp[-2].raw_module);
-      (yyval.command)->assert_malformed.text = (yyvsp[-1].text);
-    }
-#line 3895 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 154:
-#line 1340 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.command) = new Command();
-      (yyval.command)->type = CommandType::AssertInvalid;
-      (yyval.command)->assert_invalid.module = (yyvsp[-2].raw_module);
-      (yyval.command)->assert_invalid.text = (yyvsp[-1].text);
-    }
-#line 3906 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 155:
-#line 1346 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.command) = new Command();
-      (yyval.command)->type = CommandType::AssertUnlinkable;
-      (yyval.command)->assert_unlinkable.module = (yyvsp[-2].raw_module);
-      (yyval.command)->assert_unlinkable.text = (yyvsp[-1].text);
-    }
-#line 3917 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 156:
-#line 1352 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.command) = new Command();
-      (yyval.command)->type = CommandType::AssertUninstantiable;
-      (yyval.command)->assert_uninstantiable.module = (yyvsp[-2].raw_module);
-      (yyval.command)->assert_uninstantiable.text = (yyvsp[-1].text);
-    }
-#line 3928 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 157:
-#line 1358 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.command) = new Command();
-      (yyval.command)->type = CommandType::AssertReturn;
-      (yyval.command)->assert_return.action = (yyvsp[-2].action);
-      (yyval.command)->assert_return.expected = (yyvsp[-1].consts);
-    }
-#line 3939 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 158:
-#line 1364 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.command) = new Command();
-      (yyval.command)->type = CommandType::AssertReturnCanonicalNan;
-      (yyval.command)->assert_return_canonical_nan.action = (yyvsp[-1].action);
-    }
-#line 3949 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 159:
-#line 1369 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.command) = new Command();
-      (yyval.command)->type = CommandType::AssertReturnArithmeticNan;
-      (yyval.command)->assert_return_arithmetic_nan.action = (yyvsp[-1].action);
-    }
-#line 3959 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 160:
-#line 1374 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.command) = new Command();
-      (yyval.command)->type = CommandType::AssertTrap;
-      (yyval.command)->assert_trap.action = (yyvsp[-2].action);
-      (yyval.command)->assert_trap.text = (yyvsp[-1].text);
-    }
-#line 3970 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 161:
-#line 1380 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.command) = new Command();
-      (yyval.command)->type = CommandType::AssertExhaustion;
-      (yyval.command)->assert_trap.action = (yyvsp[-2].action);
-      (yyval.command)->assert_trap.text = (yyvsp[-1].text);
-    }
-#line 3981 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 162:
-#line 1389 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.command) = new Command();
-      (yyval.command)->type = CommandType::Action;
-      (yyval.command)->action = (yyvsp[0].action);
-    }
-#line 3991 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 164:
-#line 1395 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.command) = new Command();
-      (yyval.command)->type = CommandType::Module;
-      (yyval.command)->module = (yyvsp[0].module);
-    }
-#line 4001 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 165:
-#line 1400 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.command) = new Command();
-      (yyval.command)->type = CommandType::Register;
-      (yyval.command)->register_.module_name = (yyvsp[-2].text);
-      (yyval.command)->register_.var = (yyvsp[-1].var);
-      (yyval.command)->register_.var.loc = (yylsp[-1]);
-    }
-#line 4013 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 166:
-#line 1409 "src/ast-parser.y" /* yacc.c:1646  */
-    { (yyval.commands) = new CommandPtrVector(); }
-#line 4019 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 167:
-#line 1410 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.commands) = (yyvsp[-1].commands);
-      (yyval.commands)->emplace_back((yyvsp[0].command));
-    }
-#line 4028 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 168:
-#line 1417 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.const_).loc = (yylsp[-2]);
-      if (WABT_FAILED(parse_const((yyvsp[-2].type), (yyvsp[-1].literal).type, (yyvsp[-1].literal).text.start,
-                                  (yyvsp[-1].literal).text.start + (yyvsp[-1].literal).text.length, &(yyval.const_)))) {
-        ast_parser_error(&(yylsp[-1]), lexer, parser,
-                              "invalid literal \"" PRIstringslice "\"",
-                              WABT_PRINTF_STRING_SLICE_ARG((yyvsp[-1].literal).text));
-      }
-      delete [] (yyvsp[-1].literal).text.start;
-    }
-#line 4043 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 169:
-#line 1429 "src/ast-parser.y" /* yacc.c:1646  */
-    { (yyval.consts) = new ConstVector(); }
-#line 4049 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 170:
-#line 1430 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.consts) = (yyvsp[-1].consts);
-      (yyval.consts)->push_back((yyvsp[0].const_));
-    }
-#line 4058 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-  case 171:
-#line 1437 "src/ast-parser.y" /* yacc.c:1646  */
-    {
-      (yyval.script) = new Script();
-      (yyval.script)->commands = std::move(*(yyvsp[0].commands));
-      delete (yyvsp[0].commands);
-
-      int last_module_index = -1;
-      for (size_t i = 0; i < (yyval.script)->commands.size(); ++i) {
-        Command& command = *(yyval.script)->commands[i].get();
-        Var* module_var = nullptr;
-        switch (command.type) {
-          case CommandType::Module: {
-            last_module_index = i;
-
-            /* Wire up module name bindings. */
-            Module* module = command.module;
-            if (module->name.length == 0)
-              continue;
-
-            (yyval.script)->module_bindings.emplace(string_slice_to_string(module->name),
-                                        Binding(module->loc, i));
-            break;
-          }
-
-          case CommandType::AssertReturn:
-            module_var = &command.assert_return.action->module_var;
-            goto has_module_var;
-          case CommandType::AssertReturnCanonicalNan:
-            module_var =
-                &command.assert_return_canonical_nan.action->module_var;
-            goto has_module_var;
-          case CommandType::AssertReturnArithmeticNan:
-            module_var =
-                &command.assert_return_arithmetic_nan.action->module_var;
-            goto has_module_var;
-          case CommandType::AssertTrap:
-          case CommandType::AssertExhaustion:
-            module_var = &command.assert_trap.action->module_var;
-            goto has_module_var;
-          case CommandType::Action:
-            module_var = &command.action->module_var;
-            goto has_module_var;
-          case CommandType::Register:
-            module_var = &command.register_.var;
-            goto has_module_var;
-
-          has_module_var: {
-            /* Resolve actions with an invalid index to use the preceding
-             * module. */
-            if (module_var->type == VarType::Index &&
-                module_var->index == INVALID_VAR_INDEX) {
-              module_var->index = last_module_index;
-            }
-            break;
-          }
-
-          default:
-            break;
-        }
-      }
-      parser->script = (yyval.script);
-    }
-#line 4124 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-    break;
-
-
-#line 4128 "src/prebuilt/ast-parser-gen.cc" /* yacc.c:1646  */
-      default: break;
-    }
-  /* User semantic actions sometimes alter yychar, and that requires
-     that yytoken be updated with the new translation.  We take the
-     approach of translating immediately before every use of yytoken.
-     One alternative is translating here after every semantic action,
-     but that translation would be missed if the semantic action invokes
-     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
-     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
-     incorrect destructor might then be invoked immediately.  In the
-     case of YYERROR or YYBACKUP, subsequent parser actions might lead
-     to an incorrect destructor call or verbose syntax error message
-     before the lookahead is translated.  */
-  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
-
-  YYPOPSTACK (yylen);
-  yylen = 0;
-  YY_STACK_PRINT (yyss, yyssp);
-
-  *++yyvsp = yyval;
-  *++yylsp = yyloc;
-
-  /* Now 'shift' the result of the reduction.  Determine what state
-     that goes to, based on the state we popped back to and the rule
-     number reduced by.  */
-
-  yyn = yyr1[yyn];
-
-  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
-  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
-    yystate = yytable[yystate];
-  else
-    yystate = yydefgoto[yyn - YYNTOKENS];
-
-  goto yynewstate;
-
-
-/*--------------------------------------.
-| yyerrlab -- here on detecting error.  |
-`--------------------------------------*/
-yyerrlab:
-  /* Make sure we have latest lookahead translation.  See comments at
-     user semantic actions for why this is necessary.  */
-  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
-
-  /* If not already recovering from an error, report this error.  */
-  if (!yyerrstatus)
-    {
-      ++yynerrs;
-#if ! YYERROR_VERBOSE
-      yyerror (&yylloc, lexer, parser, YY_("syntax error"));
-#else
-# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
-                                        yyssp, yytoken)
-      {
-        char const *yymsgp = YY_("syntax error");
-        int yysyntax_error_status;
-        yysyntax_error_status = YYSYNTAX_ERROR;
-        if (yysyntax_error_status == 0)
-          yymsgp = yymsg;
-        else if (yysyntax_error_status == 1)
-          {
-            if (yymsg != yymsgbuf)
-              YYSTACK_FREE (yymsg);
-            yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
-            if (!yymsg)
-              {
-                yymsg = yymsgbuf;
-                yymsg_alloc = sizeof yymsgbuf;
-                yysyntax_error_status = 2;
-              }
-            else
-              {
-                yysyntax_error_status = YYSYNTAX_ERROR;
-                yymsgp = yymsg;
-              }
-          }
-        yyerror (&yylloc, lexer, parser, yymsgp);
-        if (yysyntax_error_status == 2)
-          goto yyexhaustedlab;
-      }
-# undef YYSYNTAX_ERROR
-#endif
-    }
-
-  yyerror_range[1] = yylloc;
-
-  if (yyerrstatus == 3)
-    {
-      /* If just tried and failed to reuse lookahead token after an
-         error, discard it.  */
-
-      if (yychar <= YYEOF)
-        {
-          /* Return failure if at end of input.  */
-          if (yychar == YYEOF)
-            YYABORT;
-        }
-      else
-        {
-          yydestruct ("Error: discarding",
-                      yytoken, &yylval, &yylloc, lexer, parser);
-          yychar = YYEMPTY;
-        }
-    }
-
-  /* Else will try to reuse lookahead token after shifting the error
-     token.  */
-  goto yyerrlab1;
-
-
-/*---------------------------------------------------.
-| yyerrorlab -- error raised explicitly by YYERROR.  |
-`---------------------------------------------------*/
-yyerrorlab:
-
-  /* Pacify compilers like GCC when the user code never invokes
-     YYERROR and the label yyerrorlab therefore never appears in user
-     code.  */
-  if (/*CONSTCOND*/ 0)
-     goto yyerrorlab;
-
-  yyerror_range[1] = yylsp[1-yylen];
-  /* Do not reclaim the symbols of the rule whose action triggered
-     this YYERROR.  */
-  YYPOPSTACK (yylen);
-  yylen = 0;
-  YY_STACK_PRINT (yyss, yyssp);
-  yystate = *yyssp;
-  goto yyerrlab1;
-
-
-/*-------------------------------------------------------------.
-| yyerrlab1 -- common code for both syntax error and YYERROR.  |
-`-------------------------------------------------------------*/
-yyerrlab1:
-  yyerrstatus = 3;      /* Each real token shifted decrements this.  */
-
-  for (;;)
-    {
-      yyn = yypact[yystate];
-      if (!yypact_value_is_default (yyn))
-        {
-          yyn += YYTERROR;
-          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
-            {
-              yyn = yytable[yyn];
-              if (0 < yyn)
-                break;
-            }
-        }
-
-      /* Pop the current state because it cannot handle the error token.  */
-      if (yyssp == yyss)
-        YYABORT;
-
-      yyerror_range[1] = *yylsp;
-      yydestruct ("Error: popping",
-                  yystos[yystate], yyvsp, yylsp, lexer, parser);
-      YYPOPSTACK (1);
-      yystate = *yyssp;
-      YY_STACK_PRINT (yyss, yyssp);
-    }
-
-  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-  *++yyvsp = yylval;
-  YY_IGNORE_MAYBE_UNINITIALIZED_END
-
-  yyerror_range[2] = yylloc;
-  /* Using YYLLOC is tempting, but would change the location of
-     the lookahead.  YYLOC is available though.  */
-  YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
-  *++yylsp = yyloc;
-
-  /* Shift the error token.  */
-  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
-
-  yystate = yyn;
-  goto yynewstate;
-
-
-/*-------------------------------------.
-| yyacceptlab -- YYACCEPT comes here.  |
-`-------------------------------------*/
-yyacceptlab:
-  yyresult = 0;
-  goto yyreturn;
-
-/*-----------------------------------.
-| yyabortlab -- YYABORT comes here.  |
-`-----------------------------------*/
-yyabortlab:
-  yyresult = 1;
-  goto yyreturn;
-
-#if !defined yyoverflow || YYERROR_VERBOSE
-/*-------------------------------------------------.
-| yyexhaustedlab -- memory exhaustion comes here.  |
-`-------------------------------------------------*/
-yyexhaustedlab:
-  yyerror (&yylloc, lexer, parser, YY_("memory exhausted"));
-  yyresult = 2;
-  /* Fall through.  */
-#endif
-
-yyreturn:
-  if (yychar != YYEMPTY)
-    {
-      /* Make sure we have latest lookahead translation.  See comments at
-         user semantic actions for why this is necessary.  */
-      yytoken = YYTRANSLATE (yychar);
-      yydestruct ("Cleanup: discarding lookahead",
-                  yytoken, &yylval, &yylloc, lexer, parser);
-    }
-  /* Do not reclaim the symbols of the rule whose action triggered
-     this YYABORT or YYACCEPT.  */
-  YYPOPSTACK (yylen);
-  YY_STACK_PRINT (yyss, yyssp);
-  while (yyssp != yyss)
-    {
-      yydestruct ("Cleanup: popping",
-                  yystos[*yyssp], yyvsp, yylsp, lexer, parser);
-      YYPOPSTACK (1);
-    }
-#ifndef yyoverflow
-  if (yyss != yyssa)
-    YYSTACK_FREE (yyss);
-#endif
-#if YYERROR_VERBOSE
-  if (yymsg != yymsgbuf)
-    YYSTACK_FREE (yymsg);
-#endif
-  return yyresult;
-}
-#line 1506 "src/ast-parser.y" /* yacc.c:1906  */
-
-
-void append_expr_list(ExprList* expr_list, ExprList* expr) {
-  if (!expr->first)
-    return;
-  if (expr_list->last)
-    expr_list->last->next = expr->first;
-  else
-    expr_list->first = expr->first;
-  expr_list->last = expr->last;
-  expr_list->size += expr->size;
-}
-
-void append_expr(ExprList* expr_list, Expr* expr) {
-  if (expr_list->last)
-    expr_list->last->next = expr;
-  else
-    expr_list->first = expr;
-  expr_list->last = expr;
-  expr_list->size++;
-}
-
-ExprList join_exprs1(Location* loc, Expr* expr1) {
-  ExprList result;
-  WABT_ZERO_MEMORY(result);
-  append_expr(&result, expr1);
-  expr1->loc = *loc;
-  return result;
-}
-
-ExprList join_exprs2(Location* loc, ExprList* expr1, Expr* expr2) {
-  ExprList result;
-  WABT_ZERO_MEMORY(result);
-  append_expr_list(&result, expr1);
-  append_expr(&result, expr2);
-  expr2->loc = *loc;
-  return result;
-}
-
-Result parse_const(Type type,
-                   LiteralType literal_type,
-                   const char* s,
-                   const char* end,
-                   Const* out) {
-  out->type = type;
-  switch (type) {
-    case Type::I32:
-      return parse_int32(s, end, &out->u32, ParseIntType::SignedAndUnsigned);
-    case Type::I64:
-      return parse_int64(s, end, &out->u64, ParseIntType::SignedAndUnsigned);
-    case Type::F32:
-      return parse_float(literal_type, s, end, &out->f32_bits);
-    case Type::F64:
-      return parse_double(literal_type, s, end, &out->f64_bits);
-    default:
-      assert(0);
-      break;
-  }
-  return Result::Error;
-}
-
-size_t copy_string_contents(StringSlice* text, char* dest) {
-  const char* src = text->start + 1;
-  const char* end = text->start + text->length - 1;
-
-  char* dest_start = dest;
-
-  while (src < end) {
-    if (*src == '\\') {
-      src++;
-      switch (*src) {
-        case 'n':
-          *dest++ = '\n';
-          break;
-        case 't':
-          *dest++ = '\t';
-          break;
-        case '\\':
-          *dest++ = '\\';
-          break;
-        case '\'':
-          *dest++ = '\'';
-          break;
-        case '\"':
-          *dest++ = '\"';
-          break;
-        default: {
-          /* The string should be validated already, so we know this is a hex
-           * sequence */
-          uint32_t hi;
-          uint32_t lo;
-          if (WABT_SUCCEEDED(parse_hexdigit(src[0], &hi)) &&
-              WABT_SUCCEEDED(parse_hexdigit(src[1], &lo))) {
-            *dest++ = (hi << 4) | lo;
-          } else {
-            assert(0);
-          }
-          src++;
-          break;
-        }
-      }
-      src++;
-    } else {
-      *dest++ = *src++;
-    }
-  }
-  /* return the data length */
-  return dest - dest_start;
-}
-
-void dup_text_list(TextList* text_list, char** out_data, size_t* out_size) {
-  /* walk the linked list to see how much total space is needed */
-  size_t total_size = 0;
-  for (TextListNode* node = text_list->first; node; node = node->next) {
-    /* Always allocate enough space for the entire string including the escape
-     * characters. It will only get shorter, and this way we only have to
-     * iterate through the string once. */
-    const char* src = node->text.start + 1;
-    const char* end = node->text.start + node->text.length - 1;
-    size_t size = (end > src) ? (end - src) : 0;
-    total_size += size;
-  }
-  char* result = new char [total_size];
-  char* dest = result;
-  for (TextListNode* node = text_list->first; node; node = node->next) {
-    size_t actual_size = copy_string_contents(&node->text, dest);
-    dest += actual_size;
-  }
-  *out_data = result;
-  *out_size = dest - result;
-}
-
-bool is_empty_signature(const FuncSignature* sig) {
-  return sig->result_types.empty() && sig->param_types.empty();
-}
-
-void append_implicit_func_declaration(Location* loc,
-                                      Module* module,
-                                      FuncDeclaration* decl) {
-  if (decl_has_func_type(decl))
-    return;
-
-  int sig_index = get_func_type_index_by_decl(module, decl);
-  if (sig_index == -1) {
-    append_implicit_func_type(loc, module, &decl->sig);
-  } else {
-    decl->sig = module->func_types[sig_index]->sig;
-  }
-}
-
-Result parse_ast(AstLexer* lexer, Script** out_script,
-                 SourceErrorHandler* error_handler) {
-  AstParser parser;
-  WABT_ZERO_MEMORY(parser);
-  parser.error_handler = error_handler;
-  int result = wabt_ast_parser_parse(lexer, &parser);
-  delete [] parser.yyssa;
-  delete [] parser.yyvsa;
-  delete [] parser.yylsa;
-  *out_script = parser.script;
-  return result == 0 && parser.errors == 0 ? Result::Ok : Result::Error;
-}
-
-bool on_read_binary_error(uint32_t offset, const char* error, void* user_data) {
-  BinaryErrorCallbackData* data = (BinaryErrorCallbackData*)user_data;
-  if (offset == WABT_UNKNOWN_OFFSET) {
-    ast_parser_error(data->loc, data->lexer, data->parser,
-                     "error in binary module: %s", error);
-  } else {
-    ast_parser_error(data->loc, data->lexer, data->parser,
-                     "error in binary module: @0x%08x: %s", offset, error);
-  }
-  return true;
-}
-
-}  // namespace wabt
diff --git a/lib/wabt/src/prebuilt/ast-parser-gen.hh b/lib/wabt/src/prebuilt/ast-parser-gen.hh
deleted file mode 100644
index 53b5e4e..0000000
--- a/lib/wabt/src/prebuilt/ast-parser-gen.hh
+++ /dev/null
@@ -1,157 +0,0 @@
-/* A Bison parser, made by GNU Bison 3.0.2.  */
-
-/* Bison interface for Yacc-like parsers in C
-
-   Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-/* As a special exception, you may create a larger work that contains
-   part or all of the Bison parser skeleton and distribute that work
-   under terms of your choice, so long as that work isn't itself a
-   parser generator using the skeleton or a modified version thereof
-   as a parser skeleton.  Alternatively, if you modify or redistribute
-   the parser skeleton itself, you may (at your option) remove this
-   special exception, which will cause the skeleton and the resulting
-   Bison output files to be licensed under the GNU General Public
-   License without this special exception.
-
-   This special exception was added by the Free Software Foundation in
-   version 2.2 of Bison.  */
-
-#ifndef YY_WABT_AST_PARSER_SRC_PREBUILT_AST_PARSER_GEN_HH_INCLUDED
-# define YY_WABT_AST_PARSER_SRC_PREBUILT_AST_PARSER_GEN_HH_INCLUDED
-/* Debug traces.  */
-#ifndef WABT_AST_PARSER_DEBUG
-# if defined YYDEBUG
-#if YYDEBUG
-#   define WABT_AST_PARSER_DEBUG 1
-#  else
-#   define WABT_AST_PARSER_DEBUG 0
-#  endif
-# else /* ! defined YYDEBUG */
-#  define WABT_AST_PARSER_DEBUG 0
-# endif /* ! defined YYDEBUG */
-#endif  /* ! defined WABT_AST_PARSER_DEBUG */
-#if WABT_AST_PARSER_DEBUG
-extern int wabt_ast_parser_debug;
-#endif
-
-/* Token type.  */
-#ifndef WABT_AST_PARSER_TOKENTYPE
-# define WABT_AST_PARSER_TOKENTYPE
-  enum wabt_ast_parser_tokentype
-  {
-    WABT_TOKEN_TYPE_EOF = 0,
-    WABT_TOKEN_TYPE_LPAR = 258,
-    WABT_TOKEN_TYPE_RPAR = 259,
-    WABT_TOKEN_TYPE_NAT = 260,
-    WABT_TOKEN_TYPE_INT = 261,
-    WABT_TOKEN_TYPE_FLOAT = 262,
-    WABT_TOKEN_TYPE_TEXT = 263,
-    WABT_TOKEN_TYPE_VAR = 264,
-    WABT_TOKEN_TYPE_VALUE_TYPE = 265,
-    WABT_TOKEN_TYPE_ANYFUNC = 266,
-    WABT_TOKEN_TYPE_MUT = 267,
-    WABT_TOKEN_TYPE_NOP = 268,
-    WABT_TOKEN_TYPE_DROP = 269,
-    WABT_TOKEN_TYPE_BLOCK = 270,
-    WABT_TOKEN_TYPE_END = 271,
-    WABT_TOKEN_TYPE_IF = 272,
-    WABT_TOKEN_TYPE_THEN = 273,
-    WABT_TOKEN_TYPE_ELSE = 274,
-    WABT_TOKEN_TYPE_LOOP = 275,
-    WABT_TOKEN_TYPE_BR = 276,
-    WABT_TOKEN_TYPE_BR_IF = 277,
-    WABT_TOKEN_TYPE_BR_TABLE = 278,
-    WABT_TOKEN_TYPE_CALL = 279,
-    WABT_TOKEN_TYPE_CALL_IMPORT = 280,
-    WABT_TOKEN_TYPE_CALL_INDIRECT = 281,
-    WABT_TOKEN_TYPE_RETURN = 282,
-    WABT_TOKEN_TYPE_GET_LOCAL = 283,
-    WABT_TOKEN_TYPE_SET_LOCAL = 284,
-    WABT_TOKEN_TYPE_TEE_LOCAL = 285,
-    WABT_TOKEN_TYPE_GET_GLOBAL = 286,
-    WABT_TOKEN_TYPE_SET_GLOBAL = 287,
-    WABT_TOKEN_TYPE_LOAD = 288,
-    WABT_TOKEN_TYPE_STORE = 289,
-    WABT_TOKEN_TYPE_OFFSET_EQ_NAT = 290,
-    WABT_TOKEN_TYPE_ALIGN_EQ_NAT = 291,
-    WABT_TOKEN_TYPE_CONST = 292,
-    WABT_TOKEN_TYPE_UNARY = 293,
-    WABT_TOKEN_TYPE_BINARY = 294,
-    WABT_TOKEN_TYPE_COMPARE = 295,
-    WABT_TOKEN_TYPE_CONVERT = 296,
-    WABT_TOKEN_TYPE_SELECT = 297,
-    WABT_TOKEN_TYPE_UNREACHABLE = 298,
-    WABT_TOKEN_TYPE_CURRENT_MEMORY = 299,
-    WABT_TOKEN_TYPE_GROW_MEMORY = 300,
-    WABT_TOKEN_TYPE_FUNC = 301,
-    WABT_TOKEN_TYPE_START = 302,
-    WABT_TOKEN_TYPE_TYPE = 303,
-    WABT_TOKEN_TYPE_PARAM = 304,
-    WABT_TOKEN_TYPE_RESULT = 305,
-    WABT_TOKEN_TYPE_LOCAL = 306,
-    WABT_TOKEN_TYPE_GLOBAL = 307,
-    WABT_TOKEN_TYPE_MODULE = 308,
-    WABT_TOKEN_TYPE_TABLE = 309,
-    WABT_TOKEN_TYPE_ELEM = 310,
-    WABT_TOKEN_TYPE_MEMORY = 311,
-    WABT_TOKEN_TYPE_DATA = 312,
-    WABT_TOKEN_TYPE_OFFSET = 313,
-    WABT_TOKEN_TYPE_IMPORT = 314,
-    WABT_TOKEN_TYPE_EXPORT = 315,
-    WABT_TOKEN_TYPE_REGISTER = 316,
-    WABT_TOKEN_TYPE_INVOKE = 317,
-    WABT_TOKEN_TYPE_GET = 318,
-    WABT_TOKEN_TYPE_ASSERT_MALFORMED = 319,
-    WABT_TOKEN_TYPE_ASSERT_INVALID = 320,
-    WABT_TOKEN_TYPE_ASSERT_UNLINKABLE = 321,
-    WABT_TOKEN_TYPE_ASSERT_RETURN = 322,
-    WABT_TOKEN_TYPE_ASSERT_RETURN_CANONICAL_NAN = 323,
-    WABT_TOKEN_TYPE_ASSERT_RETURN_ARITHMETIC_NAN = 324,
-    WABT_TOKEN_TYPE_ASSERT_TRAP = 325,
-    WABT_TOKEN_TYPE_ASSERT_EXHAUSTION = 326,
-    WABT_TOKEN_TYPE_INPUT = 327,
-    WABT_TOKEN_TYPE_OUTPUT = 328,
-    WABT_TOKEN_TYPE_LOW = 329
-  };
-#endif
-
-/* Value type.  */
-#if ! defined WABT_AST_PARSER_STYPE && ! defined WABT_AST_PARSER_STYPE_IS_DECLARED
-typedef ::wabt::Token WABT_AST_PARSER_STYPE;
-# define WABT_AST_PARSER_STYPE_IS_TRIVIAL 1
-# define WABT_AST_PARSER_STYPE_IS_DECLARED 1
-#endif
-
-/* Location type.  */
-#if ! defined WABT_AST_PARSER_LTYPE && ! defined WABT_AST_PARSER_LTYPE_IS_DECLARED
-typedef struct WABT_AST_PARSER_LTYPE WABT_AST_PARSER_LTYPE;
-struct WABT_AST_PARSER_LTYPE
-{
-  int first_line;
-  int first_column;
-  int last_line;
-  int last_column;
-};
-# define WABT_AST_PARSER_LTYPE_IS_DECLARED 1
-# define WABT_AST_PARSER_LTYPE_IS_TRIVIAL 1
-#endif
-
-
-
-int wabt_ast_parser_parse (::wabt::AstLexer* lexer, ::wabt::AstParser* parser);
-
-#endif /* !YY_WABT_AST_PARSER_SRC_PREBUILT_AST_PARSER_GEN_HH_INCLUDED  */
diff --git a/lib/wabt/src/prebuilt/ast-parser-gen.output b/lib/wabt/src/prebuilt/ast-parser-gen.output
deleted file mode 100644
index 371633b..0000000
--- a/lib/wabt/src/prebuilt/ast-parser-gen.output
+++ /dev/null
@@ -1,4949 +0,0 @@
-Terminals unused in grammar
-
-   CALL_IMPORT
-   INPUT
-   OUTPUT
-
-
-Grammar
-
-    0 $accept: script_start "EOF"
-
-    1 non_empty_text_list: TEXT
-    2                    | non_empty_text_list TEXT
-
-    3 text_list: %empty
-    4          | non_empty_text_list
-
-    5 quoted_text: TEXT
-
-    6 value_type_list: %empty
-    7                | value_type_list VALUE_TYPE
-
-    8 elem_type: ANYFUNC
-
-    9 global_type: VALUE_TYPE
-   10            | "(" MUT VALUE_TYPE ")"
-
-   11 func_type: "(" FUNC func_sig ")"
-
-   12 func_sig: %empty
-   13         | "(" PARAM value_type_list ")"
-   14         | "(" PARAM value_type_list ")" "(" RESULT value_type_list ")"
-   15         | "(" RESULT value_type_list ")"
-
-   16 table_sig: limits elem_type
-
-   17 memory_sig: limits
-
-   18 limits: nat
-   19       | nat nat
-
-   20 type_use: "(" TYPE var ")"
-
-   21 nat: NAT
-
-   22 literal: NAT
-   23        | INT
-   24        | FLOAT
-
-   25 var: nat
-   26    | VAR
-
-   27 var_list: %empty
-   28         | var_list var
-
-   29 bind_var_opt: %empty
-   30             | bind_var
-
-   31 bind_var: VAR
-
-   32 labeling_opt: %empty
-   33             | bind_var
-
-   34 offset_opt: %empty
-   35           | OFFSET_EQ_NAT
-
-   36 align_opt: %empty
-   37          | ALIGN_EQ_NAT
-
-   38 instr: plain_instr
-   39      | block_instr
-   40      | expr
-
-   41 plain_instr: UNREACHABLE
-   42            | NOP
-   43            | DROP
-   44            | SELECT
-   45            | BR var
-   46            | BR_IF var
-   47            | BR_TABLE var_list var
-   48            | RETURN
-   49            | CALL var
-   50            | CALL_INDIRECT var
-   51            | GET_LOCAL var
-   52            | SET_LOCAL var
-   53            | TEE_LOCAL var
-   54            | GET_GLOBAL var
-   55            | SET_GLOBAL var
-   56            | LOAD offset_opt align_opt
-   57            | STORE offset_opt align_opt
-   58            | CONST literal
-   59            | UNARY
-   60            | BINARY
-   61            | COMPARE
-   62            | CONVERT
-   63            | CURRENT_MEMORY
-   64            | GROW_MEMORY
-
-   65 block_instr: BLOCK labeling_opt block END labeling_opt
-   66            | LOOP labeling_opt block END labeling_opt
-   67            | IF labeling_opt block END labeling_opt
-   68            | IF labeling_opt block ELSE labeling_opt instr_list END labeling_opt
-
-   69 block: value_type_list instr_list
-
-   70 expr: "(" expr1 ")"
-
-   71 expr1: plain_instr expr_list
-   72      | BLOCK labeling_opt block
-   73      | LOOP labeling_opt block
-   74      | IF labeling_opt value_type_list if_
-
-   75 if_: "(" THEN instr_list ")" "(" ELSE instr_list ")"
-   76    | "(" THEN instr_list ")"
-   77    | expr "(" THEN instr_list ")" "(" ELSE instr_list ")"
-   78    | expr "(" THEN instr_list ")"
-   79    | expr expr expr
-   80    | expr expr
-
-   81 instr_list: %empty
-   82           | instr instr_list
-
-   83 expr_list: %empty
-   84          | expr expr_list
-
-   85 const_expr: instr_list
-
-   86 func_fields: func_body
-   87            | "(" RESULT value_type_list ")" func_body
-   88            | "(" PARAM value_type_list ")" func_fields
-   89            | "(" PARAM bind_var VALUE_TYPE ")" func_fields
-
-   90 func_body: instr_list
-   91          | "(" LOCAL value_type_list ")" func_body
-   92          | "(" LOCAL bind_var VALUE_TYPE ")" func_body
-
-   93 func_info: func_fields
-
-   94 func: "(" FUNC bind_var_opt inline_export type_use func_info ")"
-   95     | "(" FUNC bind_var_opt type_use func_info ")"
-   96     | "(" FUNC bind_var_opt inline_export func_info ")"
-   97     | "(" FUNC bind_var_opt func_info ")"
-
-   98 offset: "(" OFFSET const_expr ")"
-   99       | expr
-
-  100 elem: "(" ELEM var offset var_list ")"
-  101     | "(" ELEM offset var_list ")"
-
-  102 table: "(" TABLE bind_var_opt inline_export_opt table_sig ")"
-  103      | "(" TABLE bind_var_opt inline_export_opt elem_type "(" ELEM var_list ")" ")"
-
-  104 data: "(" DATA var offset text_list ")"
-  105     | "(" DATA offset text_list ")"
-
-  106 memory: "(" MEMORY bind_var_opt inline_export_opt memory_sig ")"
-  107       | "(" MEMORY bind_var_opt inline_export "(" DATA text_list ")" ")"
-  108       | "(" MEMORY bind_var_opt "(" DATA text_list ")" ")"
-
-  109 global: "(" GLOBAL bind_var_opt inline_export global_type const_expr ")"
-  110       | "(" GLOBAL bind_var_opt global_type const_expr ")"
-
-  111 import_kind: "(" FUNC bind_var_opt type_use ")"
-  112            | "(" FUNC bind_var_opt func_sig ")"
-  113            | "(" TABLE bind_var_opt table_sig ")"
-  114            | "(" MEMORY bind_var_opt memory_sig ")"
-  115            | "(" GLOBAL bind_var_opt global_type ")"
-
-  116 import: "(" IMPORT quoted_text quoted_text import_kind ")"
-  117       | "(" FUNC bind_var_opt inline_import type_use ")"
-  118       | "(" FUNC bind_var_opt inline_import func_sig ")"
-  119       | "(" TABLE bind_var_opt inline_import table_sig ")"
-  120       | "(" MEMORY bind_var_opt inline_import memory_sig ")"
-  121       | "(" GLOBAL bind_var_opt inline_import global_type ")"
-
-  122 inline_import: "(" IMPORT quoted_text quoted_text ")"
-
-  123 export_kind: "(" FUNC var ")"
-  124            | "(" TABLE var ")"
-  125            | "(" MEMORY var ")"
-  126            | "(" GLOBAL var ")"
-
-  127 export: "(" EXPORT quoted_text export_kind ")"
-
-  128 inline_export_opt: %empty
-  129                  | inline_export
-
-  130 inline_export: "(" EXPORT quoted_text ")"
-
-  131 type_def: "(" TYPE func_type ")"
-  132         | "(" TYPE bind_var func_type ")"
-
-  133 start: "(" START var ")"
-
-  134 module_fields: %empty
-  135              | module_fields type_def
-  136              | module_fields global
-  137              | module_fields table
-  138              | module_fields memory
-  139              | module_fields func
-  140              | module_fields elem
-  141              | module_fields data
-  142              | module_fields start
-  143              | module_fields import
-  144              | module_fields export
-
-  145 raw_module: "(" MODULE bind_var_opt module_fields ")"
-  146           | "(" MODULE bind_var_opt non_empty_text_list ")"
-
-  147 module: raw_module
-
-  148 script_var_opt: %empty
-  149               | VAR
-
-  150 action: "(" INVOKE script_var_opt quoted_text const_list ")"
-  151       | "(" GET script_var_opt quoted_text ")"
-
-  152 assertion: "(" ASSERT_MALFORMED raw_module quoted_text ")"
-  153          | "(" ASSERT_INVALID raw_module quoted_text ")"
-  154          | "(" ASSERT_UNLINKABLE raw_module quoted_text ")"
-  155          | "(" ASSERT_TRAP raw_module quoted_text ")"
-  156          | "(" ASSERT_RETURN action const_list ")"
-  157          | "(" ASSERT_RETURN_CANONICAL_NAN action ")"
-  158          | "(" ASSERT_RETURN_ARITHMETIC_NAN action ")"
-  159          | "(" ASSERT_TRAP action quoted_text ")"
-  160          | "(" ASSERT_EXHAUSTION action quoted_text ")"
-
-  161 cmd: action
-  162    | assertion
-  163    | module
-  164    | "(" REGISTER quoted_text script_var_opt ")"
-
-  165 cmd_list: %empty
-  166         | cmd_list cmd
-
-  167 const: "(" CONST literal ")"
-
-  168 const_list: %empty
-  169           | const_list const
-
-  170 script: cmd_list
-
-  171 script_start: script
-
-
-Terminals, with rules where they appear
-
-"EOF" (0) 0
-error (256)
-"(" (258) 10 11 13 14 15 20 70 75 76 77 78 87 88 89 91 92 94 95 96
-    97 98 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
-    115 116 117 118 119 120 121 122 123 124 125 126 127 130 131 132
-    133 145 146 150 151 152 153 154 155 156 157 158 159 160 164 167
-")" (259) 10 11 13 14 15 20 70 75 76 77 78 87 88 89 91 92 94 95 96
-    97 98 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
-    115 116 117 118 119 120 121 122 123 124 125 126 127 130 131 132
-    133 145 146 150 151 152 153 154 155 156 157 158 159 160 164 167
-NAT (260) 21 22
-INT (261) 23
-FLOAT (262) 24
-TEXT (263) 1 2 5
-VAR (264) 26 31 149
-VALUE_TYPE (265) 7 9 10 89 92
-ANYFUNC (266) 8
-MUT (267) 10
-NOP (268) 42
-DROP (269) 43
-BLOCK (270) 65 72
-END (271) 65 66 67 68
-IF (272) 67 68 74
-THEN (273) 75 76 77 78
-ELSE (274) 68 75 77
-LOOP (275) 66 73
-BR (276) 45
-BR_IF (277) 46
-BR_TABLE (278) 47
-CALL (279) 49
-CALL_IMPORT (280)
-CALL_INDIRECT (281) 50
-RETURN (282) 48
-GET_LOCAL (283) 51
-SET_LOCAL (284) 52
-TEE_LOCAL (285) 53
-GET_GLOBAL (286) 54
-SET_GLOBAL (287) 55
-LOAD (288) 56
-STORE (289) 57
-OFFSET_EQ_NAT (290) 35
-ALIGN_EQ_NAT (291) 37
-CONST (292) 58 167
-UNARY (293) 59
-BINARY (294) 60
-COMPARE (295) 61
-CONVERT (296) 62
-SELECT (297) 44
-UNREACHABLE (298) 41
-CURRENT_MEMORY (299) 63
-GROW_MEMORY (300) 64
-FUNC (301) 11 94 95 96 97 111 112 117 118 123
-START (302) 133
-TYPE (303) 20 131 132
-PARAM (304) 13 14 88 89
-RESULT (305) 14 15 87
-LOCAL (306) 91 92
-GLOBAL (307) 109 110 115 121 126
-MODULE (308) 145 146
-TABLE (309) 102 103 113 119 124
-ELEM (310) 100 101 103
-MEMORY (311) 106 107 108 114 120 125
-DATA (312) 104 105 107 108
-OFFSET (313) 98
-IMPORT (314) 116 122
-EXPORT (315) 127 130
-REGISTER (316) 164
-INVOKE (317) 150
-GET (318) 151
-ASSERT_MALFORMED (319) 152
-ASSERT_INVALID (320) 153
-ASSERT_UNLINKABLE (321) 154
-ASSERT_RETURN (322) 156
-ASSERT_RETURN_CANONICAL_NAN (323) 157
-ASSERT_RETURN_ARITHMETIC_NAN (324) 158
-ASSERT_TRAP (325) 155 159
-ASSERT_EXHAUSTION (326) 160
-INPUT (327)
-OUTPUT (328)
-LOW (329)
-
-
-Nonterminals, with rules where they appear
-
-$accept (75)
-    on left: 0
-non_empty_text_list (76)
-    on left: 1 2, on right: 2 4 146
-text_list (77)
-    on left: 3 4, on right: 104 105 107 108
-quoted_text (78)
-    on left: 5, on right: 116 122 127 130 150 151 152 153 154 155 159
-    160 164
-value_type_list (79)
-    on left: 6 7, on right: 7 13 14 15 69 74 87 88 91
-elem_type (80)
-    on left: 8, on right: 16 103
-global_type (81)
-    on left: 9 10, on right: 109 110 115 121
-func_type (82)
-    on left: 11, on right: 131 132
-func_sig (83)
-    on left: 12 13 14 15, on right: 11 112 118
-table_sig (84)
-    on left: 16, on right: 102 113 119
-memory_sig (85)
-    on left: 17, on right: 106 114 120
-limits (86)
-    on left: 18 19, on right: 16 17
-type_use (87)
-    on left: 20, on right: 94 95 111 117
-nat (88)
-    on left: 21, on right: 18 19 25
-literal (89)
-    on left: 22 23 24, on right: 58 167
-var (90)
-    on left: 25 26, on right: 20 28 45 46 47 49 50 51 52 53 54 55 100
-    104 123 124 125 126 133
-var_list (91)
-    on left: 27 28, on right: 28 47 100 101 103
-bind_var_opt (92)
-    on left: 29 30, on right: 94 95 96 97 102 103 106 107 108 109 110
-    111 112 113 114 115 117 118 119 120 121 145 146
-bind_var (93)
-    on left: 31, on right: 30 33 89 92 132
-labeling_opt (94)
-    on left: 32 33, on right: 65 66 67 68 72 73 74
-offset_opt (95)
-    on left: 34 35, on right: 56 57
-align_opt (96)
-    on left: 36 37, on right: 56 57
-instr (97)
-    on left: 38 39 40, on right: 82
-plain_instr (98)
-    on left: 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
-    59 60 61 62 63 64, on right: 38 71
-block_instr (99)
-    on left: 65 66 67 68, on right: 39
-block (100)
-    on left: 69, on right: 65 66 67 68 72 73
-expr (101)
-    on left: 70, on right: 40 77 78 79 80 84 99
-expr1 (102)
-    on left: 71 72 73 74, on right: 70
-if_ (103)
-    on left: 75 76 77 78 79 80, on right: 74
-instr_list (104)
-    on left: 81 82, on right: 68 69 75 76 77 78 82 85 90
-expr_list (105)
-    on left: 83 84, on right: 71 84
-const_expr (106)
-    on left: 85, on right: 98 109 110
-func_fields (107)
-    on left: 86 87 88 89, on right: 88 89 93
-func_body (108)
-    on left: 90 91 92, on right: 86 87 91 92
-func_info (109)
-    on left: 93, on right: 94 95 96 97
-func (110)
-    on left: 94 95 96 97, on right: 139
-offset (111)
-    on left: 98 99, on right: 100 101 104 105
-elem (112)
-    on left: 100 101, on right: 140
-table (113)
-    on left: 102 103, on right: 137
-data (114)
-    on left: 104 105, on right: 141
-memory (115)
-    on left: 106 107 108, on right: 138
-global (116)
-    on left: 109 110, on right: 136
-import_kind (117)
-    on left: 111 112 113 114 115, on right: 116
-import (118)
-    on left: 116 117 118 119 120 121, on right: 143
-inline_import (119)
-    on left: 122, on right: 117 118 119 120 121
-export_kind (120)
-    on left: 123 124 125 126, on right: 127
-export (121)
-    on left: 127, on right: 144
-inline_export_opt (122)
-    on left: 128 129, on right: 102 103 106
-inline_export (123)
-    on left: 130, on right: 94 96 107 109 129
-type_def (124)
-    on left: 131 132, on right: 135
-start (125)
-    on left: 133, on right: 142
-module_fields (126)
-    on left: 134 135 136 137 138 139 140 141 142 143 144, on right:
-    135 136 137 138 139 140 141 142 143 144 145
-raw_module (127)
-    on left: 145 146, on right: 147 152 153 154 155
-module (128)
-    on left: 147, on right: 163
-script_var_opt (129)
-    on left: 148 149, on right: 150 151 164
-action (130)
-    on left: 150 151, on right: 156 157 158 159 160 161
-assertion (131)
-    on left: 152 153 154 155 156 157 158 159 160, on right: 162
-cmd (132)
-    on left: 161 162 163 164, on right: 166
-cmd_list (133)
-    on left: 165 166, on right: 166 170
-const (134)
-    on left: 167, on right: 169
-const_list (135)
-    on left: 168 169, on right: 150 156 169
-script (136)
-    on left: 170, on right: 171
-script_start (137)
-    on left: 171, on right: 0
-
-
-State 0
-
-    0 $accept: . script_start "EOF"
-
-    $default  reduce using rule 165 (cmd_list)
-
-    cmd_list      go to state 1
-    script        go to state 2
-    script_start  go to state 3
-
-
-State 1
-
-  166 cmd_list: cmd_list . cmd
-  170 script: cmd_list .
-
-    "("  shift, and go to state 4
-
-    $default  reduce using rule 170 (script)
-
-    raw_module  go to state 5
-    module      go to state 6
-    action      go to state 7
-    assertion   go to state 8
-    cmd         go to state 9
-
-
-State 2
-
-  171 script_start: script .
-
-    $default  reduce using rule 171 (script_start)
-
-
-State 3
-
-    0 $accept: script_start . "EOF"
-
-    "EOF"  shift, and go to state 10
-
-
-State 4
-
-  145 raw_module: "(" . MODULE bind_var_opt module_fields ")"
-  146           | "(" . MODULE bind_var_opt non_empty_text_list ")"
-  150 action: "(" . INVOKE script_var_opt quoted_text const_list ")"
-  151       | "(" . GET script_var_opt quoted_text ")"
-  152 assertion: "(" . ASSERT_MALFORMED raw_module quoted_text ")"
-  153          | "(" . ASSERT_INVALID raw_module quoted_text ")"
-  154          | "(" . ASSERT_UNLINKABLE raw_module quoted_text ")"
-  155          | "(" . ASSERT_TRAP raw_module quoted_text ")"
-  156          | "(" . ASSERT_RETURN action const_list ")"
-  157          | "(" . ASSERT_RETURN_CANONICAL_NAN action ")"
-  158          | "(" . ASSERT_RETURN_ARITHMETIC_NAN action ")"
-  159          | "(" . ASSERT_TRAP action quoted_text ")"
-  160          | "(" . ASSERT_EXHAUSTION action quoted_text ")"
-  164 cmd: "(" . REGISTER quoted_text script_var_opt ")"
-
-    MODULE                        shift, and go to state 11
-    REGISTER                      shift, and go to state 12
-    INVOKE                        shift, and go to state 13
-    GET                           shift, and go to state 14
-    ASSERT_MALFORMED              shift, and go to state 15
-    ASSERT_INVALID                shift, and go to state 16
-    ASSERT_UNLINKABLE             shift, and go to state 17
-    ASSERT_RETURN                 shift, and go to state 18
-    ASSERT_RETURN_CANONICAL_NAN   shift, and go to state 19
-    ASSERT_RETURN_ARITHMETIC_NAN  shift, and go to state 20
-    ASSERT_TRAP                   shift, and go to state 21
-    ASSERT_EXHAUSTION             shift, and go to state 22
-
-
-State 5
-
-  147 module: raw_module .
-
-    $default  reduce using rule 147 (module)
-
-
-State 6
-
-  163 cmd: module .
-
-    $default  reduce using rule 163 (cmd)
-
-
-State 7
-
-  161 cmd: action .
-
-    $default  reduce using rule 161 (cmd)
-
-
-State 8
-
-  162 cmd: assertion .
-
-    $default  reduce using rule 162 (cmd)
-
-
-State 9
-
-  166 cmd_list: cmd_list cmd .
-
-    $default  reduce using rule 166 (cmd_list)
-
-
-State 10
-
-    0 $accept: script_start "EOF" .
-
-    $default  accept
-
-
-State 11
-
-  145 raw_module: "(" MODULE . bind_var_opt module_fields ")"
-  146           | "(" MODULE . bind_var_opt non_empty_text_list ")"
-
-    VAR  shift, and go to state 23
-
-    $default  reduce using rule 29 (bind_var_opt)
-
-    bind_var_opt  go to state 24
-    bind_var      go to state 25
-
-
-State 12
-
-  164 cmd: "(" REGISTER . quoted_text script_var_opt ")"
-
-    TEXT  shift, and go to state 26
-
-    quoted_text  go to state 27
-
-
-State 13
-
-  150 action: "(" INVOKE . script_var_opt quoted_text const_list ")"
-
-    VAR  shift, and go to state 28
-
-    $default  reduce using rule 148 (script_var_opt)
-
-    script_var_opt  go to state 29
-
-
-State 14
-
-  151 action: "(" GET . script_var_opt quoted_text ")"
-
-    VAR  shift, and go to state 28
-
-    $default  reduce using rule 148 (script_var_opt)
-
-    script_var_opt  go to state 30
-
-
-State 15
-
-  152 assertion: "(" ASSERT_MALFORMED . raw_module quoted_text ")"
-
-    "("  shift, and go to state 31
-
-    raw_module  go to state 32
-
-
-State 16
-
-  153 assertion: "(" ASSERT_INVALID . raw_module quoted_text ")"
-
-    "("  shift, and go to state 31
-
-    raw_module  go to state 33
-
-
-State 17
-
-  154 assertion: "(" ASSERT_UNLINKABLE . raw_module quoted_text ")"
-
-    "("  shift, and go to state 31
-
-    raw_module  go to state 34
-
-
-State 18
-
-  156 assertion: "(" ASSERT_RETURN . action const_list ")"
-
-    "("  shift, and go to state 35
-
-    action  go to state 36
-
-
-State 19
-
-  157 assertion: "(" ASSERT_RETURN_CANONICAL_NAN . action ")"
-
-    "("  shift, and go to state 35
-
-    action  go to state 37
-
-
-State 20
-
-  158 assertion: "(" ASSERT_RETURN_ARITHMETIC_NAN . action ")"
-
-    "("  shift, and go to state 35
-
-    action  go to state 38
-
-
-State 21
-
-  155 assertion: "(" ASSERT_TRAP . raw_module quoted_text ")"
-  159          | "(" ASSERT_TRAP . action quoted_text ")"
-
-    "("  shift, and go to state 39
-
-    raw_module  go to state 40
-    action      go to state 41
-
-
-State 22
-
-  160 assertion: "(" ASSERT_EXHAUSTION . action quoted_text ")"
-
-    "("  shift, and go to state 35
-
-    action  go to state 42
-
-
-State 23
-
-   31 bind_var: VAR .
-
-    $default  reduce using rule 31 (bind_var)
-
-
-State 24
-
-  145 raw_module: "(" MODULE bind_var_opt . module_fields ")"
-  146           | "(" MODULE bind_var_opt . non_empty_text_list ")"
-
-    TEXT  shift, and go to state 43
-
-    $default  reduce using rule 134 (module_fields)
-
-    non_empty_text_list  go to state 44
-    module_fields        go to state 45
-
-
-State 25
-
-   30 bind_var_opt: bind_var .
-
-    $default  reduce using rule 30 (bind_var_opt)
-
-
-State 26
-
-    5 quoted_text: TEXT .
-
-    $default  reduce using rule 5 (quoted_text)
-
-
-State 27
-
-  164 cmd: "(" REGISTER quoted_text . script_var_opt ")"
-
-    VAR  shift, and go to state 28
-
-    $default  reduce using rule 148 (script_var_opt)
-
-    script_var_opt  go to state 46
-
-
-State 28
-
-  149 script_var_opt: VAR .
-
-    $default  reduce using rule 149 (script_var_opt)
-
-
-State 29
-
-  150 action: "(" INVOKE script_var_opt . quoted_text const_list ")"
-
-    TEXT  shift, and go to state 26
-
-    quoted_text  go to state 47
-
-
-State 30
-
-  151 action: "(" GET script_var_opt . quoted_text ")"
-
-    TEXT  shift, and go to state 26
-
-    quoted_text  go to state 48
-
-
-State 31
-
-  145 raw_module: "(" . MODULE bind_var_opt module_fields ")"
-  146           | "(" . MODULE bind_var_opt non_empty_text_list ")"
-
-    MODULE  shift, and go to state 11
-
-
-State 32
-
-  152 assertion: "(" ASSERT_MALFORMED raw_module . quoted_text ")"
-
-    TEXT  shift, and go to state 26
-
-    quoted_text  go to state 49
-
-
-State 33
-
-  153 assertion: "(" ASSERT_INVALID raw_module . quoted_text ")"
-
-    TEXT  shift, and go to state 26
-
-    quoted_text  go to state 50
-
-
-State 34
-
-  154 assertion: "(" ASSERT_UNLINKABLE raw_module . quoted_text ")"
-
-    TEXT  shift, and go to state 26
-
-    quoted_text  go to state 51
-
-
-State 35
-
-  150 action: "(" . INVOKE script_var_opt quoted_text const_list ")"
-  151       | "(" . GET script_var_opt quoted_text ")"
-
-    INVOKE  shift, and go to state 13
-    GET     shift, and go to state 14
-
-
-State 36
-
-  156 assertion: "(" ASSERT_RETURN action . const_list ")"
-
-    $default  reduce using rule 168 (const_list)
-
-    const_list  go to state 52
-
-
-State 37
-
-  157 assertion: "(" ASSERT_RETURN_CANONICAL_NAN action . ")"
-
-    ")"  shift, and go to state 53
-
-
-State 38
-
-  158 assertion: "(" ASSERT_RETURN_ARITHMETIC_NAN action . ")"
-
-    ")"  shift, and go to state 54
-
-
-State 39
-
-  145 raw_module: "(" . MODULE bind_var_opt module_fields ")"
-  146           | "(" . MODULE bind_var_opt non_empty_text_list ")"
-  150 action: "(" . INVOKE script_var_opt quoted_text const_list ")"
-  151       | "(" . GET script_var_opt quoted_text ")"
-
-    MODULE  shift, and go to state 11
-    INVOKE  shift, and go to state 13
-    GET     shift, and go to state 14
-
-
-State 40
-
-  155 assertion: "(" ASSERT_TRAP raw_module . quoted_text ")"
-
-    TEXT  shift, and go to state 26
-
-    quoted_text  go to state 55
-
-
-State 41
-
-  159 assertion: "(" ASSERT_TRAP action . quoted_text ")"
-
-    TEXT  shift, and go to state 26
-
-    quoted_text  go to state 56
-
-
-State 42
-
-  160 assertion: "(" ASSERT_EXHAUSTION action . quoted_text ")"
-
-    TEXT  shift, and go to state 26
-
-    quoted_text  go to state 57
-
-
-State 43
-
-    1 non_empty_text_list: TEXT .
-
-    $default  reduce using rule 1 (non_empty_text_list)
-
-
-State 44
-
-    2 non_empty_text_list: non_empty_text_list . TEXT
-  146 raw_module: "(" MODULE bind_var_opt non_empty_text_list . ")"
-
-    ")"   shift, and go to state 58
-    TEXT  shift, and go to state 59
-
-
-State 45
-
-  135 module_fields: module_fields . type_def
-  136              | module_fields . global
-  137              | module_fields . table
-  138              | module_fields . memory
-  139              | module_fields . func
-  140              | module_fields . elem
-  141              | module_fields . data
-  142              | module_fields . start
-  143              | module_fields . import
-  144              | module_fields . export
-  145 raw_module: "(" MODULE bind_var_opt module_fields . ")"
-
-    "("  shift, and go to state 60
-    ")"  shift, and go to state 61
-
-    func      go to state 62
-    elem      go to state 63
-    table     go to state 64
-    data      go to state 65
-    memory    go to state 66
-    global    go to state 67
-    import    go to state 68
-    export    go to state 69
-    type_def  go to state 70
-    start     go to state 71
-
-
-State 46
-
-  164 cmd: "(" REGISTER quoted_text script_var_opt . ")"
-
-    ")"  shift, and go to state 72
-
-
-State 47
-
-  150 action: "(" INVOKE script_var_opt quoted_text . const_list ")"
-
-    $default  reduce using rule 168 (const_list)
-
-    const_list  go to state 73
-
-
-State 48
-
-  151 action: "(" GET script_var_opt quoted_text . ")"
-
-    ")"  shift, and go to state 74
-
-
-State 49
-
-  152 assertion: "(" ASSERT_MALFORMED raw_module quoted_text . ")"
-
-    ")"  shift, and go to state 75
-
-
-State 50
-
-  153 assertion: "(" ASSERT_INVALID raw_module quoted_text . ")"
-
-    ")"  shift, and go to state 76
-
-
-State 51
-
-  154 assertion: "(" ASSERT_UNLINKABLE raw_module quoted_text . ")"
-
-    ")"  shift, and go to state 77
-
-
-State 52
-
-  156 assertion: "(" ASSERT_RETURN action const_list . ")"
-  169 const_list: const_list . const
-
-    "("  shift, and go to state 78
-    ")"  shift, and go to state 79
-
-    const  go to state 80
-
-
-State 53
-
-  157 assertion: "(" ASSERT_RETURN_CANONICAL_NAN action ")" .
-
-    $default  reduce using rule 157 (assertion)
-
-
-State 54
-
-  158 assertion: "(" ASSERT_RETURN_ARITHMETIC_NAN action ")" .
-
-    $default  reduce using rule 158 (assertion)
-
-
-State 55
-
-  155 assertion: "(" ASSERT_TRAP raw_module quoted_text . ")"
-
-    ")"  shift, and go to state 81
-
-
-State 56
-
-  159 assertion: "(" ASSERT_TRAP action quoted_text . ")"
-
-    ")"  shift, and go to state 82
-
-
-State 57
-
-  160 assertion: "(" ASSERT_EXHAUSTION action quoted_text . ")"
-
-    ")"  shift, and go to state 83
-
-
-State 58
-
-  146 raw_module: "(" MODULE bind_var_opt non_empty_text_list ")" .
-
-    $default  reduce using rule 146 (raw_module)
-
-
-State 59
-
-    2 non_empty_text_list: non_empty_text_list TEXT .
-
-    $default  reduce using rule 2 (non_empty_text_list)
-
-
-State 60
-
-   94 func: "(" . FUNC bind_var_opt inline_export type_use func_info ")"
-   95     | "(" . FUNC bind_var_opt type_use func_info ")"
-   96     | "(" . FUNC bind_var_opt inline_export func_info ")"
-   97     | "(" . FUNC bind_var_opt func_info ")"
-  100 elem: "(" . ELEM var offset var_list ")"
-  101     | "(" . ELEM offset var_list ")"
-  102 table: "(" . TABLE bind_var_opt inline_export_opt table_sig ")"
-  103      | "(" . TABLE bind_var_opt inline_export_opt elem_type "(" ELEM var_list ")" ")"
-  104 data: "(" . DATA var offset text_list ")"
-  105     | "(" . DATA offset text_list ")"
-  106 memory: "(" . MEMORY bind_var_opt inline_export_opt memory_sig ")"
-  107       | "(" . MEMORY bind_var_opt inline_export "(" DATA text_list ")" ")"
-  108       | "(" . MEMORY bind_var_opt "(" DATA text_list ")" ")"
-  109 global: "(" . GLOBAL bind_var_opt inline_export global_type const_expr ")"
-  110       | "(" . GLOBAL bind_var_opt global_type const_expr ")"
-  116 import: "(" . IMPORT quoted_text quoted_text import_kind ")"
-  117       | "(" . FUNC bind_var_opt inline_import type_use ")"
-  118       | "(" . FUNC bind_var_opt inline_import func_sig ")"
-  119       | "(" . TABLE bind_var_opt inline_import table_sig ")"
-  120       | "(" . MEMORY bind_var_opt inline_import memory_sig ")"
-  121       | "(" . GLOBAL bind_var_opt inline_import global_type ")"
-  127 export: "(" . EXPORT quoted_text export_kind ")"
-  131 type_def: "(" . TYPE func_type ")"
-  132         | "(" . TYPE bind_var func_type ")"
-  133 start: "(" . START var ")"
-
-    FUNC    shift, and go to state 84
-    START   shift, and go to state 85
-    TYPE    shift, and go to state 86
-    GLOBAL  shift, and go to state 87
-    TABLE   shift, and go to state 88
-    ELEM    shift, and go to state 89
-    MEMORY  shift, and go to state 90
-    DATA    shift, and go to state 91
-    IMPORT  shift, and go to state 92
-    EXPORT  shift, and go to state 93
-
-
-State 61
-
-  145 raw_module: "(" MODULE bind_var_opt module_fields ")" .
-
-    $default  reduce using rule 145 (raw_module)
-
-
-State 62
-
-  139 module_fields: module_fields func .
-
-    $default  reduce using rule 139 (module_fields)
-
-
-State 63
-
-  140 module_fields: module_fields elem .
-
-    $default  reduce using rule 140 (module_fields)
-
-
-State 64
-
-  137 module_fields: module_fields table .
-
-    $default  reduce using rule 137 (module_fields)
-
-
-State 65
-
-  141 module_fields: module_fields data .
-
-    $default  reduce using rule 141 (module_fields)
-
-
-State 66
-
-  138 module_fields: module_fields memory .
-
-    $default  reduce using rule 138 (module_fields)
-
-
-State 67
-
-  136 module_fields: module_fields global .
-
-    $default  reduce using rule 136 (module_fields)
-
-
-State 68
-
-  143 module_fields: module_fields import .
-
-    $default  reduce using rule 143 (module_fields)
-
-
-State 69
-
-  144 module_fields: module_fields export .
-
-    $default  reduce using rule 144 (module_fields)
-
-
-State 70
-
-  135 module_fields: module_fields type_def .
-
-    $default  reduce using rule 135 (module_fields)
-
-
-State 71
-
-  142 module_fields: module_fields start .
-
-    $default  reduce using rule 142 (module_fields)
-
-
-State 72
-
-  164 cmd: "(" REGISTER quoted_text script_var_opt ")" .
-
-    $default  reduce using rule 164 (cmd)
-
-
-State 73
-
-  150 action: "(" INVOKE script_var_opt quoted_text const_list . ")"
-  169 const_list: const_list . const
-
-    "("  shift, and go to state 78
-    ")"  shift, and go to state 94
-
-    const  go to state 80
-
-
-State 74
-
-  151 action: "(" GET script_var_opt quoted_text ")" .
-
-    $default  reduce using rule 151 (action)
-
-
-State 75
-
-  152 assertion: "(" ASSERT_MALFORMED raw_module quoted_text ")" .
-
-    $default  reduce using rule 152 (assertion)
-
-
-State 76
-
-  153 assertion: "(" ASSERT_INVALID raw_module quoted_text ")" .
-
-    $default  reduce using rule 153 (assertion)
-
-
-State 77
-
-  154 assertion: "(" ASSERT_UNLINKABLE raw_module quoted_text ")" .
-
-    $default  reduce using rule 154 (assertion)
-
-
-State 78
-
-  167 const: "(" . CONST literal ")"
-
-    CONST  shift, and go to state 95
-
-
-State 79
-
-  156 assertion: "(" ASSERT_RETURN action const_list ")" .
-
-    $default  reduce using rule 156 (assertion)
-
-
-State 80
-
-  169 const_list: const_list const .
-
-    $default  reduce using rule 169 (const_list)
-
-
-State 81
-
-  155 assertion: "(" ASSERT_TRAP raw_module quoted_text ")" .
-
-    $default  reduce using rule 155 (assertion)
-
-
-State 82
-
-  159 assertion: "(" ASSERT_TRAP action quoted_text ")" .
-
-    $default  reduce using rule 159 (assertion)
-
-
-State 83
-
-  160 assertion: "(" ASSERT_EXHAUSTION action quoted_text ")" .
-
-    $default  reduce using rule 160 (assertion)
-
-
-State 84
-
-   94 func: "(" FUNC . bind_var_opt inline_export type_use func_info ")"
-   95     | "(" FUNC . bind_var_opt type_use func_info ")"
-   96     | "(" FUNC . bind_var_opt inline_export func_info ")"
-   97     | "(" FUNC . bind_var_opt func_info ")"
-  117 import: "(" FUNC . bind_var_opt inline_import type_use ")"
-  118       | "(" FUNC . bind_var_opt inline_import func_sig ")"
-
-    VAR  shift, and go to state 23
-
-    $default  reduce using rule 29 (bind_var_opt)
-
-    bind_var_opt  go to state 96
-    bind_var      go to state 25
-
-
-State 85
-
-  133 start: "(" START . var ")"
-
-    NAT  shift, and go to state 97
-    VAR  shift, and go to state 98
-
-    nat  go to state 99
-    var  go to state 100
-
-
-State 86
-
-  131 type_def: "(" TYPE . func_type ")"
-  132         | "(" TYPE . bind_var func_type ")"
-
-    "("  shift, and go to state 101
-    VAR  shift, and go to state 23
-
-    func_type  go to state 102
-    bind_var   go to state 103
-
-
-State 87
-
-  109 global: "(" GLOBAL . bind_var_opt inline_export global_type const_expr ")"
-  110       | "(" GLOBAL . bind_var_opt global_type const_expr ")"
-  121 import: "(" GLOBAL . bind_var_opt inline_import global_type ")"
-
-    VAR  shift, and go to state 23
-
-    $default  reduce using rule 29 (bind_var_opt)
-
-    bind_var_opt  go to state 104
-    bind_var      go to state 25
-
-
-State 88
-
-  102 table: "(" TABLE . bind_var_opt inline_export_opt table_sig ")"
-  103      | "(" TABLE . bind_var_opt inline_export_opt elem_type "(" ELEM var_list ")" ")"
-  119 import: "(" TABLE . bind_var_opt inline_import table_sig ")"
-
-    VAR  shift, and go to state 23
-
-    $default  reduce using rule 29 (bind_var_opt)
-
-    bind_var_opt  go to state 105
-    bind_var      go to state 25
-
-
-State 89
-
-  100 elem: "(" ELEM . var offset var_list ")"
-  101     | "(" ELEM . offset var_list ")"
-
-    "("  shift, and go to state 106
-    NAT  shift, and go to state 97
-    VAR  shift, and go to state 98
-
-    nat     go to state 99
-    var     go to state 107
-    expr    go to state 108
-    offset  go to state 109
-
-
-State 90
-
-  106 memory: "(" MEMORY . bind_var_opt inline_export_opt memory_sig ")"
-  107       | "(" MEMORY . bind_var_opt inline_export "(" DATA text_list ")" ")"
-  108       | "(" MEMORY . bind_var_opt "(" DATA text_list ")" ")"
-  120 import: "(" MEMORY . bind_var_opt inline_import memory_sig ")"
-
-    VAR  shift, and go to state 23
-
-    $default  reduce using rule 29 (bind_var_opt)
-
-    bind_var_opt  go to state 110
-    bind_var      go to state 25
-
-
-State 91
-
-  104 data: "(" DATA . var offset text_list ")"
-  105     | "(" DATA . offset text_list ")"
-
-    "("  shift, and go to state 106
-    NAT  shift, and go to state 97
-    VAR  shift, and go to state 98
-
-    nat     go to state 99
-    var     go to state 111
-    expr    go to state 108
-    offset  go to state 112
-
-
-State 92
-
-  116 import: "(" IMPORT . quoted_text quoted_text import_kind ")"
-
-    TEXT  shift, and go to state 26
-
-    quoted_text  go to state 113
-
-
-State 93
-
-  127 export: "(" EXPORT . quoted_text export_kind ")"
-
-    TEXT  shift, and go to state 26
-
-    quoted_text  go to state 114
-
-
-State 94
-
-  150 action: "(" INVOKE script_var_opt quoted_text const_list ")" .
-
-    $default  reduce using rule 150 (action)
-
-
-State 95
-
-  167 const: "(" CONST . literal ")"
-
-    NAT    shift, and go to state 115
-    INT    shift, and go to state 116
-    FLOAT  shift, and go to state 117
-
-    literal  go to state 118
-
-
-State 96
-
-   94 func: "(" FUNC bind_var_opt . inline_export type_use func_info ")"
-   95     | "(" FUNC bind_var_opt . type_use func_info ")"
-   96     | "(" FUNC bind_var_opt . inline_export func_info ")"
-   97     | "(" FUNC bind_var_opt . func_info ")"
-  117 import: "(" FUNC bind_var_opt . inline_import type_use ")"
-  118       | "(" FUNC bind_var_opt . inline_import func_sig ")"
-
-    "("             shift, and go to state 119
-    NOP             shift, and go to state 120
-    DROP            shift, and go to state 121
-    BLOCK           shift, and go to state 122
-    IF              shift, and go to state 123
-    LOOP            shift, and go to state 124
-    BR              shift, and go to state 125
-    BR_IF           shift, and go to state 126
-    BR_TABLE        shift, and go to state 127
-    CALL            shift, and go to state 128
-    CALL_INDIRECT   shift, and go to state 129
-    RETURN          shift, and go to state 130
-    GET_LOCAL       shift, and go to state 131
-    SET_LOCAL       shift, and go to state 132
-    TEE_LOCAL       shift, and go to state 133
-    GET_GLOBAL      shift, and go to state 134
-    SET_GLOBAL      shift, and go to state 135
-    LOAD            shift, and go to state 136
-    STORE           shift, and go to state 137
-    CONST           shift, and go to state 138
-    UNARY           shift, and go to state 139
-    BINARY          shift, and go to state 140
-    COMPARE         shift, and go to state 141
-    CONVERT         shift, and go to state 142
-    SELECT          shift, and go to state 143
-    UNREACHABLE     shift, and go to state 144
-    CURRENT_MEMORY  shift, and go to state 145
-    GROW_MEMORY     shift, and go to state 146
-
-    $default  reduce using rule 81 (instr_list)
-
-    type_use       go to state 147
-    instr          go to state 148
-    plain_instr    go to state 149
-    block_instr    go to state 150
-    expr           go to state 151
-    instr_list     go to state 152
-    func_fields    go to state 153
-    func_body      go to state 154
-    func_info      go to state 155
-    inline_import  go to state 156
-    inline_export  go to state 157
-
-
-State 97
-
-   21 nat: NAT .
-
-    $default  reduce using rule 21 (nat)
-
-
-State 98
-
-   26 var: VAR .
-
-    $default  reduce using rule 26 (var)
-
-
-State 99
-
-   25 var: nat .
-
-    $default  reduce using rule 25 (var)
-
-
-State 100
-
-  133 start: "(" START var . ")"
-
-    ")"  shift, and go to state 158
-
-
-State 101
-
-   11 func_type: "(" . FUNC func_sig ")"
-
-    FUNC  shift, and go to state 159
-
-
-State 102
-
-  131 type_def: "(" TYPE func_type . ")"
-
-    ")"  shift, and go to state 160
-
-
-State 103
-
-  132 type_def: "(" TYPE bind_var . func_type ")"
-
-    "("  shift, and go to state 101
-
-    func_type  go to state 161
-
-
-State 104
-
-  109 global: "(" GLOBAL bind_var_opt . inline_export global_type const_expr ")"
-  110       | "(" GLOBAL bind_var_opt . global_type const_expr ")"
-  121 import: "(" GLOBAL bind_var_opt . inline_import global_type ")"
-
-    "("         shift, and go to state 162
-    VALUE_TYPE  shift, and go to state 163
-
-    global_type    go to state 164
-    inline_import  go to state 165
-    inline_export  go to state 166
-
-
-State 105
-
-  102 table: "(" TABLE bind_var_opt . inline_export_opt table_sig ")"
-  103      | "(" TABLE bind_var_opt . inline_export_opt elem_type "(" ELEM var_list ")" ")"
-  119 import: "(" TABLE bind_var_opt . inline_import table_sig ")"
-
-    "("  shift, and go to state 167
-
-    $default  reduce using rule 128 (inline_export_opt)
-
-    inline_import      go to state 168
-    inline_export_opt  go to state 169
-    inline_export      go to state 170
-
-
-State 106
-
-   70 expr: "(" . expr1 ")"
-   98 offset: "(" . OFFSET const_expr ")"
-
-    NOP             shift, and go to state 120
-    DROP            shift, and go to state 121
-    BLOCK           shift, and go to state 171
-    IF              shift, and go to state 172
-    LOOP            shift, and go to state 173
-    BR              shift, and go to state 125
-    BR_IF           shift, and go to state 126
-    BR_TABLE        shift, and go to state 127
-    CALL            shift, and go to state 128
-    CALL_INDIRECT   shift, and go to state 129
-    RETURN          shift, and go to state 130
-    GET_LOCAL       shift, and go to state 131
-    SET_LOCAL       shift, and go to state 132
-    TEE_LOCAL       shift, and go to state 133
-    GET_GLOBAL      shift, and go to state 134
-    SET_GLOBAL      shift, and go to state 135
-    LOAD            shift, and go to state 136
-    STORE           shift, and go to state 137
-    CONST           shift, and go to state 138
-    UNARY           shift, and go to state 139
-    BINARY          shift, and go to state 140
-    COMPARE         shift, and go to state 141
-    CONVERT         shift, and go to state 142
-    SELECT          shift, and go to state 143
-    UNREACHABLE     shift, and go to state 144
-    CURRENT_MEMORY  shift, and go to state 145
-    GROW_MEMORY     shift, and go to state 146
-    OFFSET          shift, and go to state 174
-
-    plain_instr  go to state 175
-    expr1        go to state 176
-
-
-State 107
-
-  100 elem: "(" ELEM var . offset var_list ")"
-
-    "("  shift, and go to state 106
-
-    expr    go to state 108
-    offset  go to state 177
-
-
-State 108
-
-   99 offset: expr .
-
-    $default  reduce using rule 99 (offset)
-
-
-State 109
-
-  101 elem: "(" ELEM offset . var_list ")"
-
-    $default  reduce using rule 27 (var_list)
-
-    var_list  go to state 178
-
-
-State 110
-
-  106 memory: "(" MEMORY bind_var_opt . inline_export_opt memory_sig ")"
-  107       | "(" MEMORY bind_var_opt . inline_export "(" DATA text_list ")" ")"
-  108       | "(" MEMORY bind_var_opt . "(" DATA text_list ")" ")"
-  120 import: "(" MEMORY bind_var_opt . inline_import memory_sig ")"
-
-    "("  shift, and go to state 179
-
-    $default  reduce using rule 128 (inline_export_opt)
-
-    inline_import      go to state 180
-    inline_export_opt  go to state 181
-    inline_export      go to state 182
-
-
-State 111
-
-  104 data: "(" DATA var . offset text_list ")"
-
-    "("  shift, and go to state 106
-
-    expr    go to state 108
-    offset  go to state 183
-
-
-State 112
-
-  105 data: "(" DATA offset . text_list ")"
-
-    TEXT  shift, and go to state 43
-
-    $default  reduce using rule 3 (text_list)
-
-    non_empty_text_list  go to state 184
-    text_list            go to state 185
-
-
-State 113
-
-  116 import: "(" IMPORT quoted_text . quoted_text import_kind ")"
-
-    TEXT  shift, and go to state 26
-
-    quoted_text  go to state 186
-
-
-State 114
-
-  127 export: "(" EXPORT quoted_text . export_kind ")"
-
-    "("  shift, and go to state 187
-
-    export_kind  go to state 188
-
-
-State 115
-
-   22 literal: NAT .
-
-    $default  reduce using rule 22 (literal)
-
-
-State 116
-
-   23 literal: INT .
-
-    $default  reduce using rule 23 (literal)
-
-
-State 117
-
-   24 literal: FLOAT .
-
-    $default  reduce using rule 24 (literal)
-
-
-State 118
-
-  167 const: "(" CONST literal . ")"
-
-    ")"  shift, and go to state 189
-
-
-State 119
-
-   20 type_use: "(" . TYPE var ")"
-   70 expr: "(" . expr1 ")"
-   87 func_fields: "(" . RESULT value_type_list ")" func_body
-   88            | "(" . PARAM value_type_list ")" func_fields
-   89            | "(" . PARAM bind_var VALUE_TYPE ")" func_fields
-   91 func_body: "(" . LOCAL value_type_list ")" func_body
-   92          | "(" . LOCAL bind_var VALUE_TYPE ")" func_body
-  122 inline_import: "(" . IMPORT quoted_text quoted_text ")"
-  130 inline_export: "(" . EXPORT quoted_text ")"
-
-    NOP             shift, and go to state 120
-    DROP            shift, and go to state 121
-    BLOCK           shift, and go to state 171
-    IF              shift, and go to state 172
-    LOOP            shift, and go to state 173
-    BR              shift, and go to state 125
-    BR_IF           shift, and go to state 126
-    BR_TABLE        shift, and go to state 127
-    CALL            shift, and go to state 128
-    CALL_INDIRECT   shift, and go to state 129
-    RETURN          shift, and go to state 130
-    GET_LOCAL       shift, and go to state 131
-    SET_LOCAL       shift, and go to state 132
-    TEE_LOCAL       shift, and go to state 133
-    GET_GLOBAL      shift, and go to state 134
-    SET_GLOBAL      shift, and go to state 135
-    LOAD            shift, and go to state 136
-    STORE           shift, and go to state 137
-    CONST           shift, and go to state 138
-    UNARY           shift, and go to state 139
-    BINARY          shift, and go to state 140
-    COMPARE         shift, and go to state 141
-    CONVERT         shift, and go to state 142
-    SELECT          shift, and go to state 143
-    UNREACHABLE     shift, and go to state 144
-    CURRENT_MEMORY  shift, and go to state 145
-    GROW_MEMORY     shift, and go to state 146
-    TYPE            shift, and go to state 190
-    PARAM           shift, and go to state 191
-    RESULT          shift, and go to state 192
-    LOCAL           shift, and go to state 193
-    IMPORT          shift, and go to state 194
-    EXPORT          shift, and go to state 195
-
-    plain_instr  go to state 175
-    expr1        go to state 176
-
-
-State 120
-
-   42 plain_instr: NOP .
-
-    $default  reduce using rule 42 (plain_instr)
-
-
-State 121
-
-   43 plain_instr: DROP .
-
-    $default  reduce using rule 43 (plain_instr)
-
-
-State 122
-
-   65 block_instr: BLOCK . labeling_opt block END labeling_opt
-
-    VAR  shift, and go to state 23
-
-    $default  reduce using rule 32 (labeling_opt)
-
-    bind_var      go to state 196
-    labeling_opt  go to state 197
-
-
-State 123
-
-   67 block_instr: IF . labeling_opt block END labeling_opt
-   68            | IF . labeling_opt block ELSE labeling_opt instr_list END labeling_opt
-
-    VAR  shift, and go to state 23
-
-    $default  reduce using rule 32 (labeling_opt)
-
-    bind_var      go to state 196
-    labeling_opt  go to state 198
-
-
-State 124
-
-   66 block_instr: LOOP . labeling_opt block END labeling_opt
-
-    VAR  shift, and go to state 23
-
-    $default  reduce using rule 32 (labeling_opt)
-
-    bind_var      go to state 196
-    labeling_opt  go to state 199
-
-
-State 125
-
-   45 plain_instr: BR . var
-
-    NAT  shift, and go to state 97
-    VAR  shift, and go to state 98
-
-    nat  go to state 99
-    var  go to state 200
-
-
-State 126
-
-   46 plain_instr: BR_IF . var
-
-    NAT  shift, and go to state 97
-    VAR  shift, and go to state 98
-
-    nat  go to state 99
-    var  go to state 201
-
-
-State 127
-
-   47 plain_instr: BR_TABLE . var_list var
-
-    $default  reduce using rule 27 (var_list)
-
-    var_list  go to state 202
-
-
-State 128
-
-   49 plain_instr: CALL . var
-
-    NAT  shift, and go to state 97
-    VAR  shift, and go to state 98
-
-    nat  go to state 99
-    var  go to state 203
-
-
-State 129
-
-   50 plain_instr: CALL_INDIRECT . var
-
-    NAT  shift, and go to state 97
-    VAR  shift, and go to state 98
-
-    nat  go to state 99
-    var  go to state 204
-
-
-State 130
-
-   48 plain_instr: RETURN .
-
-    $default  reduce using rule 48 (plain_instr)
-
-
-State 131
-
-   51 plain_instr: GET_LOCAL . var
-
-    NAT  shift, and go to state 97
-    VAR  shift, and go to state 98
-
-    nat  go to state 99
-    var  go to state 205
-
-
-State 132
-
-   52 plain_instr: SET_LOCAL . var
-
-    NAT  shift, and go to state 97
-    VAR  shift, and go to state 98
-
-    nat  go to state 99
-    var  go to state 206
-
-
-State 133
-
-   53 plain_instr: TEE_LOCAL . var
-
-    NAT  shift, and go to state 97
-    VAR  shift, and go to state 98
-
-    nat  go to state 99
-    var  go to state 207
-
-
-State 134
-
-   54 plain_instr: GET_GLOBAL . var
-
-    NAT  shift, and go to state 97
-    VAR  shift, and go to state 98
-
-    nat  go to state 99
-    var  go to state 208
-
-
-State 135
-
-   55 plain_instr: SET_GLOBAL . var
-
-    NAT  shift, and go to state 97
-    VAR  shift, and go to state 98
-
-    nat  go to state 99
-    var  go to state 209
-
-
-State 136
-
-   56 plain_instr: LOAD . offset_opt align_opt
-
-    OFFSET_EQ_NAT  shift, and go to state 210
-
-    $default  reduce using rule 34 (offset_opt)
-
-    offset_opt  go to state 211
-
-
-State 137
-
-   57 plain_instr: STORE . offset_opt align_opt
-
-    OFFSET_EQ_NAT  shift, and go to state 210
-
-    $default  reduce using rule 34 (offset_opt)
-
-    offset_opt  go to state 212
-
-
-State 138
-
-   58 plain_instr: CONST . literal
-
-    NAT    shift, and go to state 115
-    INT    shift, and go to state 116
-    FLOAT  shift, and go to state 117
-
-    literal  go to state 213
-
-
-State 139
-
-   59 plain_instr: UNARY .
-
-    $default  reduce using rule 59 (plain_instr)
-
-
-State 140
-
-   60 plain_instr: BINARY .
-
-    $default  reduce using rule 60 (plain_instr)
-
-
-State 141
-
-   61 plain_instr: COMPARE .
-
-    $default  reduce using rule 61 (plain_instr)
-
-
-State 142
-
-   62 plain_instr: CONVERT .
-
-    $default  reduce using rule 62 (plain_instr)
-
-
-State 143
-
-   44 plain_instr: SELECT .
-
-    $default  reduce using rule 44 (plain_instr)
-
-
-State 144
-
-   41 plain_instr: UNREACHABLE .
-
-    $default  reduce using rule 41 (plain_instr)
-
-
-State 145
-
-   63 plain_instr: CURRENT_MEMORY .
-
-    $default  reduce using rule 63 (plain_instr)
-
-
-State 146
-
-   64 plain_instr: GROW_MEMORY .
-
-    $default  reduce using rule 64 (plain_instr)
-
-
-State 147
-
-   95 func: "(" FUNC bind_var_opt type_use . func_info ")"
-
-    "("             shift, and go to state 214
-    NOP             shift, and go to state 120
-    DROP            shift, and go to state 121
-    BLOCK           shift, and go to state 122
-    IF              shift, and go to state 123
-    LOOP            shift, and go to state 124
-    BR              shift, and go to state 125
-    BR_IF           shift, and go to state 126
-    BR_TABLE        shift, and go to state 127
-    CALL            shift, and go to state 128
-    CALL_INDIRECT   shift, and go to state 129
-    RETURN          shift, and go to state 130
-    GET_LOCAL       shift, and go to state 131
-    SET_LOCAL       shift, and go to state 132
-    TEE_LOCAL       shift, and go to state 133
-    GET_GLOBAL      shift, and go to state 134
-    SET_GLOBAL      shift, and go to state 135
-    LOAD            shift, and go to state 136
-    STORE           shift, and go to state 137
-    CONST           shift, and go to state 138
-    UNARY           shift, and go to state 139
-    BINARY          shift, and go to state 140
-    COMPARE         shift, and go to state 141
-    CONVERT         shift, and go to state 142
-    SELECT          shift, and go to state 143
-    UNREACHABLE     shift, and go to state 144
-    CURRENT_MEMORY  shift, and go to state 145
-    GROW_MEMORY     shift, and go to state 146
-
-    $default  reduce using rule 81 (instr_list)
-
-    instr        go to state 148
-    plain_instr  go to state 149
-    block_instr  go to state 150
-    expr         go to state 151
-    instr_list   go to state 152
-    func_fields  go to state 153
-    func_body    go to state 154
-    func_info    go to state 215
-
-
-State 148
-
-   82 instr_list: instr . instr_list
-
-    "("             shift, and go to state 216
-    NOP             shift, and go to state 120
-    DROP            shift, and go to state 121
-    BLOCK           shift, and go to state 122
-    IF              shift, and go to state 123
-    LOOP            shift, and go to state 124
-    BR              shift, and go to state 125
-    BR_IF           shift, and go to state 126
-    BR_TABLE        shift, and go to state 127
-    CALL            shift, and go to state 128
-    CALL_INDIRECT   shift, and go to state 129
-    RETURN          shift, and go to state 130
-    GET_LOCAL       shift, and go to state 131
-    SET_LOCAL       shift, and go to state 132
-    TEE_LOCAL       shift, and go to state 133
-    GET_GLOBAL      shift, and go to state 134
-    SET_GLOBAL      shift, and go to state 135
-    LOAD            shift, and go to state 136
-    STORE           shift, and go to state 137
-    CONST           shift, and go to state 138
-    UNARY           shift, and go to state 139
-    BINARY          shift, and go to state 140
-    COMPARE         shift, and go to state 141
-    CONVERT         shift, and go to state 142
-    SELECT          shift, and go to state 143
-    UNREACHABLE     shift, and go to state 144
-    CURRENT_MEMORY  shift, and go to state 145
-    GROW_MEMORY     shift, and go to state 146
-
-    $default  reduce using rule 81 (instr_list)
-
-    instr        go to state 148
-    plain_instr  go to state 149
-    block_instr  go to state 150
-    expr         go to state 151
-    instr_list   go to state 217
-
-
-State 149
-
-   38 instr: plain_instr .
-
-    $default  reduce using rule 38 (instr)
-
-
-State 150
-
-   39 instr: block_instr .
-
-    $default  reduce using rule 39 (instr)
-
-
-State 151
-
-   40 instr: expr .
-
-    $default  reduce using rule 40 (instr)
-
-
-State 152
-
-   90 func_body: instr_list .
-
-    $default  reduce using rule 90 (func_body)
-
-
-State 153
-
-   93 func_info: func_fields .
-
-    $default  reduce using rule 93 (func_info)
-
-
-State 154
-
-   86 func_fields: func_body .
-
-    $default  reduce using rule 86 (func_fields)
-
-
-State 155
-
-   97 func: "(" FUNC bind_var_opt func_info . ")"
-
-    ")"  shift, and go to state 218
-
-
-State 156
-
-  117 import: "(" FUNC bind_var_opt inline_import . type_use ")"
-  118       | "(" FUNC bind_var_opt inline_import . func_sig ")"
-
-    "("  shift, and go to state 219
-
-    $default  reduce using rule 12 (func_sig)
-
-    func_sig  go to state 220
-    type_use  go to state 221
-
-
-State 157
-
-   94 func: "(" FUNC bind_var_opt inline_export . type_use func_info ")"
-   96     | "(" FUNC bind_var_opt inline_export . func_info ")"
-
-    "("             shift, and go to state 222
-    NOP             shift, and go to state 120
-    DROP            shift, and go to state 121
-    BLOCK           shift, and go to state 122
-    IF              shift, and go to state 123
-    LOOP            shift, and go to state 124
-    BR              shift, and go to state 125
-    BR_IF           shift, and go to state 126
-    BR_TABLE        shift, and go to state 127
-    CALL            shift, and go to state 128
-    CALL_INDIRECT   shift, and go to state 129
-    RETURN          shift, and go to state 130
-    GET_LOCAL       shift, and go to state 131
-    SET_LOCAL       shift, and go to state 132
-    TEE_LOCAL       shift, and go to state 133
-    GET_GLOBAL      shift, and go to state 134
-    SET_GLOBAL      shift, and go to state 135
-    LOAD            shift, and go to state 136
-    STORE           shift, and go to state 137
-    CONST           shift, and go to state 138
-    UNARY           shift, and go to state 139
-    BINARY          shift, and go to state 140
-    COMPARE         shift, and go to state 141
-    CONVERT         shift, and go to state 142
-    SELECT          shift, and go to state 143
-    UNREACHABLE     shift, and go to state 144
-    CURRENT_MEMORY  shift, and go to state 145
-    GROW_MEMORY     shift, and go to state 146
-
-    $default  reduce using rule 81 (instr_list)
-
-    type_use     go to state 223
-    instr        go to state 148
-    plain_instr  go to state 149
-    block_instr  go to state 150
-    expr         go to state 151
-    instr_list   go to state 152
-    func_fields  go to state 153
-    func_body    go to state 154
-    func_info    go to state 224
-
-
-State 158
-
-  133 start: "(" START var ")" .
-
-    $default  reduce using rule 133 (start)
-
-
-State 159
-
-   11 func_type: "(" FUNC . func_sig ")"
-
-    "("  shift, and go to state 225
-
-    $default  reduce using rule 12 (func_sig)
-
-    func_sig  go to state 226
-
-
-State 160
-
-  131 type_def: "(" TYPE func_type ")" .
-
-    $default  reduce using rule 131 (type_def)
-
-
-State 161
-
-  132 type_def: "(" TYPE bind_var func_type . ")"
-
-    ")"  shift, and go to state 227
-
-
-State 162
-
-   10 global_type: "(" . MUT VALUE_TYPE ")"
-  122 inline_import: "(" . IMPORT quoted_text quoted_text ")"
-  130 inline_export: "(" . EXPORT quoted_text ")"
-
-    MUT     shift, and go to state 228
-    IMPORT  shift, and go to state 194
-    EXPORT  shift, and go to state 195
-
-
-State 163
-
-    9 global_type: VALUE_TYPE .
-
-    $default  reduce using rule 9 (global_type)
-
-
-State 164
-
-  110 global: "(" GLOBAL bind_var_opt global_type . const_expr ")"
-
-    "("             shift, and go to state 216
-    NOP             shift, and go to state 120
-    DROP            shift, and go to state 121
-    BLOCK           shift, and go to state 122
-    IF              shift, and go to state 123
-    LOOP            shift, and go to state 124
-    BR              shift, and go to state 125
-    BR_IF           shift, and go to state 126
-    BR_TABLE        shift, and go to state 127
-    CALL            shift, and go to state 128
-    CALL_INDIRECT   shift, and go to state 129
-    RETURN          shift, and go to state 130
-    GET_LOCAL       shift, and go to state 131
-    SET_LOCAL       shift, and go to state 132
-    TEE_LOCAL       shift, and go to state 133
-    GET_GLOBAL      shift, and go to state 134
-    SET_GLOBAL      shift, and go to state 135
-    LOAD            shift, and go to state 136
-    STORE           shift, and go to state 137
-    CONST           shift, and go to state 138
-    UNARY           shift, and go to state 139
-    BINARY          shift, and go to state 140
-    COMPARE         shift, and go to state 141
-    CONVERT         shift, and go to state 142
-    SELECT          shift, and go to state 143
-    UNREACHABLE     shift, and go to state 144
-    CURRENT_MEMORY  shift, and go to state 145
-    GROW_MEMORY     shift, and go to state 146
-
-    $default  reduce using rule 81 (instr_list)
-
-    instr        go to state 148
-    plain_instr  go to state 149
-    block_instr  go to state 150
-    expr         go to state 151
-    instr_list   go to state 229
-    const_expr   go to state 230
-
-
-State 165
-
-  121 import: "(" GLOBAL bind_var_opt inline_import . global_type ")"
-
-    "("         shift, and go to state 231
-    VALUE_TYPE  shift, and go to state 163
-
-    global_type  go to state 232
-
-
-State 166
-
-  109 global: "(" GLOBAL bind_var_opt inline_export . global_type const_expr ")"
-
-    "("         shift, and go to state 231
-    VALUE_TYPE  shift, and go to state 163
-
-    global_type  go to state 233
-
-
-State 167
-
-  122 inline_import: "(" . IMPORT quoted_text quoted_text ")"
-  130 inline_export: "(" . EXPORT quoted_text ")"
-
-    IMPORT  shift, and go to state 194
-    EXPORT  shift, and go to state 195
-
-
-State 168
-
-  119 import: "(" TABLE bind_var_opt inline_import . table_sig ")"
-
-    NAT  shift, and go to state 97
-
-    table_sig  go to state 234
-    limits     go to state 235
-    nat        go to state 236
-
-
-State 169
-
-  102 table: "(" TABLE bind_var_opt inline_export_opt . table_sig ")"
-  103      | "(" TABLE bind_var_opt inline_export_opt . elem_type "(" ELEM var_list ")" ")"
-
-    NAT      shift, and go to state 97
-    ANYFUNC  shift, and go to state 237
-
-    elem_type  go to state 238
-    table_sig  go to state 239
-    limits     go to state 235
-    nat        go to state 236
-
-
-State 170
-
-  129 inline_export_opt: inline_export .
-
-    $default  reduce using rule 129 (inline_export_opt)
-
-
-State 171
-
-   72 expr1: BLOCK . labeling_opt block
-
-    VAR  shift, and go to state 23
-
-    $default  reduce using rule 32 (labeling_opt)
-
-    bind_var      go to state 196
-    labeling_opt  go to state 240
-
-
-State 172
-
-   74 expr1: IF . labeling_opt value_type_list if_
-
-    VAR  shift, and go to state 23
-
-    $default  reduce using rule 32 (labeling_opt)
-
-    bind_var      go to state 196
-    labeling_opt  go to state 241
-
-
-State 173
-
-   73 expr1: LOOP . labeling_opt block
-
-    VAR  shift, and go to state 23
-
-    $default  reduce using rule 32 (labeling_opt)
-
-    bind_var      go to state 196
-    labeling_opt  go to state 242
-
-
-State 174
-
-   98 offset: "(" OFFSET . const_expr ")"
-
-    "("             shift, and go to state 216
-    NOP             shift, and go to state 120
-    DROP            shift, and go to state 121
-    BLOCK           shift, and go to state 122
-    IF              shift, and go to state 123
-    LOOP            shift, and go to state 124
-    BR              shift, and go to state 125
-    BR_IF           shift, and go to state 126
-    BR_TABLE        shift, and go to state 127
-    CALL            shift, and go to state 128
-    CALL_INDIRECT   shift, and go to state 129
-    RETURN          shift, and go to state 130
-    GET_LOCAL       shift, and go to state 131
-    SET_LOCAL       shift, and go to state 132
-    TEE_LOCAL       shift, and go to state 133
-    GET_GLOBAL      shift, and go to state 134
-    SET_GLOBAL      shift, and go to state 135
-    LOAD            shift, and go to state 136
-    STORE           shift, and go to state 137
-    CONST           shift, and go to state 138
-    UNARY           shift, and go to state 139
-    BINARY          shift, and go to state 140
-    COMPARE         shift, and go to state 141
-    CONVERT         shift, and go to state 142
-    SELECT          shift, and go to state 143
-    UNREACHABLE     shift, and go to state 144
-    CURRENT_MEMORY  shift, and go to state 145
-    GROW_MEMORY     shift, and go to state 146
-
-    $default  reduce using rule 81 (instr_list)
-
-    instr        go to state 148
-    plain_instr  go to state 149
-    block_instr  go to state 150
-    expr         go to state 151
-    instr_list   go to state 229
-    const_expr   go to state 243
-
-
-State 175
-
-   71 expr1: plain_instr . expr_list
-
-    "("  shift, and go to state 216
-
-    $default  reduce using rule 83 (expr_list)
-
-    expr       go to state 244
-    expr_list  go to state 245
-
-
-State 176
-
-   70 expr: "(" expr1 . ")"
-
-    ")"  shift, and go to state 246
-
-
-State 177
-
-  100 elem: "(" ELEM var offset . var_list ")"
-
-    $default  reduce using rule 27 (var_list)
-
-    var_list  go to state 247
-
-
-State 178
-
-   28 var_list: var_list . var
-  101 elem: "(" ELEM offset var_list . ")"
-
-    ")"  shift, and go to state 248
-    NAT  shift, and go to state 97
-    VAR  shift, and go to state 98
-
-    nat  go to state 99
-    var  go to state 249
-
-
-State 179
-
-  108 memory: "(" MEMORY bind_var_opt "(" . DATA text_list ")" ")"
-  122 inline_import: "(" . IMPORT quoted_text quoted_text ")"
-  130 inline_export: "(" . EXPORT quoted_text ")"
-
-    DATA    shift, and go to state 250
-    IMPORT  shift, and go to state 194
-    EXPORT  shift, and go to state 195
-
-
-State 180
-
-  120 import: "(" MEMORY bind_var_opt inline_import . memory_sig ")"
-
-    NAT  shift, and go to state 97
-
-    memory_sig  go to state 251
-    limits      go to state 252
-    nat         go to state 236
-
-
-State 181
-
-  106 memory: "(" MEMORY bind_var_opt inline_export_opt . memory_sig ")"
-
-    NAT  shift, and go to state 97
-
-    memory_sig  go to state 253
-    limits      go to state 252
-    nat         go to state 236
-
-
-State 182
-
-  107 memory: "(" MEMORY bind_var_opt inline_export . "(" DATA text_list ")" ")"
-  129 inline_export_opt: inline_export .
-
-    "("  shift, and go to state 254
-
-    $default  reduce using rule 129 (inline_export_opt)
-
-
-State 183
-
-  104 data: "(" DATA var offset . text_list ")"
-
-    TEXT  shift, and go to state 43
-
-    $default  reduce using rule 3 (text_list)
-
-    non_empty_text_list  go to state 184
-    text_list            go to state 255
-
-
-State 184
-
-    2 non_empty_text_list: non_empty_text_list . TEXT
-    4 text_list: non_empty_text_list .
-
-    TEXT  shift, and go to state 59
-
-    $default  reduce using rule 4 (text_list)
-
-
-State 185
-
-  105 data: "(" DATA offset text_list . ")"
-
-    ")"  shift, and go to state 256
-
-
-State 186
-
-  116 import: "(" IMPORT quoted_text quoted_text . import_kind ")"
-
-    "("  shift, and go to state 257
-
-    import_kind  go to state 258
-
-
-State 187
-
-  123 export_kind: "(" . FUNC var ")"
-  124            | "(" . TABLE var ")"
-  125            | "(" . MEMORY var ")"
-  126            | "(" . GLOBAL var ")"
-
-    FUNC    shift, and go to state 259
-    GLOBAL  shift, and go to state 260
-    TABLE   shift, and go to state 261
-    MEMORY  shift, and go to state 262
-
-
-State 188
-
-  127 export: "(" EXPORT quoted_text export_kind . ")"
-
-    ")"  shift, and go to state 263
-
-
-State 189
-
-  167 const: "(" CONST literal ")" .
-
-    $default  reduce using rule 167 (const)
-
-
-State 190
-
-   20 type_use: "(" TYPE . var ")"
-
-    NAT  shift, and go to state 97
-    VAR  shift, and go to state 98
-
-    nat  go to state 99
-    var  go to state 264
-
-
-State 191
-
-   88 func_fields: "(" PARAM . value_type_list ")" func_fields
-   89            | "(" PARAM . bind_var VALUE_TYPE ")" func_fields
-
-    VAR  shift, and go to state 23
-
-    $default  reduce using rule 6 (value_type_list)
-
-    value_type_list  go to state 265
-    bind_var         go to state 266
-
-
-State 192
-
-   87 func_fields: "(" RESULT . value_type_list ")" func_body
-
-    $default  reduce using rule 6 (value_type_list)
-
-    value_type_list  go to state 267
-
-
-State 193
-
-   91 func_body: "(" LOCAL . value_type_list ")" func_body
-   92          | "(" LOCAL . bind_var VALUE_TYPE ")" func_body
-
-    VAR  shift, and go to state 23
-
-    $default  reduce using rule 6 (value_type_list)
-
-    value_type_list  go to state 268
-    bind_var         go to state 269
-
-
-State 194
-
-  122 inline_import: "(" IMPORT . quoted_text quoted_text ")"
-
-    TEXT  shift, and go to state 26
-
-    quoted_text  go to state 270
-
-
-State 195
-
-  130 inline_export: "(" EXPORT . quoted_text ")"
-
-    TEXT  shift, and go to state 26
-
-    quoted_text  go to state 271
-
-
-State 196
-
-   33 labeling_opt: bind_var .
-
-    $default  reduce using rule 33 (labeling_opt)
-
-
-State 197
-
-   65 block_instr: BLOCK labeling_opt . block END labeling_opt
-
-    $default  reduce using rule 6 (value_type_list)
-
-    value_type_list  go to state 272
-    block            go to state 273
-
-
-State 198
-
-   67 block_instr: IF labeling_opt . block END labeling_opt
-   68            | IF labeling_opt . block ELSE labeling_opt instr_list END labeling_opt
-
-    $default  reduce using rule 6 (value_type_list)
-
-    value_type_list  go to state 272
-    block            go to state 274
-
-
-State 199
-
-   66 block_instr: LOOP labeling_opt . block END labeling_opt
-
-    $default  reduce using rule 6 (value_type_list)
-
-    value_type_list  go to state 272
-    block            go to state 275
-
-
-State 200
-
-   45 plain_instr: BR var .
-
-    $default  reduce using rule 45 (plain_instr)
-
-
-State 201
-
-   46 plain_instr: BR_IF var .
-
-    $default  reduce using rule 46 (plain_instr)
-
-
-State 202
-
-   28 var_list: var_list . var
-   47 plain_instr: BR_TABLE var_list . var
-
-    NAT  shift, and go to state 97
-    VAR  shift, and go to state 98
-
-    nat  go to state 99
-    var  go to state 276
-
-
-State 203
-
-   49 plain_instr: CALL var .
-
-    $default  reduce using rule 49 (plain_instr)
-
-
-State 204
-
-   50 plain_instr: CALL_INDIRECT var .
-
-    $default  reduce using rule 50 (plain_instr)
-
-
-State 205
-
-   51 plain_instr: GET_LOCAL var .
-
-    $default  reduce using rule 51 (plain_instr)
-
-
-State 206
-
-   52 plain_instr: SET_LOCAL var .
-
-    $default  reduce using rule 52 (plain_instr)
-
-
-State 207
-
-   53 plain_instr: TEE_LOCAL var .
-
-    $default  reduce using rule 53 (plain_instr)
-
-
-State 208
-
-   54 plain_instr: GET_GLOBAL var .
-
-    $default  reduce using rule 54 (plain_instr)
-
-
-State 209
-
-   55 plain_instr: SET_GLOBAL var .
-
-    $default  reduce using rule 55 (plain_instr)
-
-
-State 210
-
-   35 offset_opt: OFFSET_EQ_NAT .
-
-    $default  reduce using rule 35 (offset_opt)
-
-
-State 211
-
-   56 plain_instr: LOAD offset_opt . align_opt
-
-    ALIGN_EQ_NAT  shift, and go to state 277
-
-    $default  reduce using rule 36 (align_opt)
-
-    align_opt  go to state 278
-
-
-State 212
-
-   57 plain_instr: STORE offset_opt . align_opt
-
-    ALIGN_EQ_NAT  shift, and go to state 277
-
-    $default  reduce using rule 36 (align_opt)
-
-    align_opt  go to state 279
-
-
-State 213
-
-   58 plain_instr: CONST literal .
-
-    $default  reduce using rule 58 (plain_instr)
-
-
-State 214
-
-   70 expr: "(" . expr1 ")"
-   87 func_fields: "(" . RESULT value_type_list ")" func_body
-   88            | "(" . PARAM value_type_list ")" func_fields
-   89            | "(" . PARAM bind_var VALUE_TYPE ")" func_fields
-   91 func_body: "(" . LOCAL value_type_list ")" func_body
-   92          | "(" . LOCAL bind_var VALUE_TYPE ")" func_body
-
-    NOP             shift, and go to state 120
-    DROP            shift, and go to state 121
-    BLOCK           shift, and go to state 171
-    IF              shift, and go to state 172
-    LOOP            shift, and go to state 173
-    BR              shift, and go to state 125
-    BR_IF           shift, and go to state 126
-    BR_TABLE        shift, and go to state 127
-    CALL            shift, and go to state 128
-    CALL_INDIRECT   shift, and go to state 129
-    RETURN          shift, and go to state 130
-    GET_LOCAL       shift, and go to state 131
-    SET_LOCAL       shift, and go to state 132
-    TEE_LOCAL       shift, and go to state 133
-    GET_GLOBAL      shift, and go to state 134
-    SET_GLOBAL      shift, and go to state 135
-    LOAD            shift, and go to state 136
-    STORE           shift, and go to state 137
-    CONST           shift, and go to state 138
-    UNARY           shift, and go to state 139
-    BINARY          shift, and go to state 140
-    COMPARE         shift, and go to state 141
-    CONVERT         shift, and go to state 142
-    SELECT          shift, and go to state 143
-    UNREACHABLE     shift, and go to state 144
-    CURRENT_MEMORY  shift, and go to state 145
-    GROW_MEMORY     shift, and go to state 146
-    PARAM           shift, and go to state 191
-    RESULT          shift, and go to state 192
-    LOCAL           shift, and go to state 193
-
-    plain_instr  go to state 175
-    expr1        go to state 176
-
-
-State 215
-
-   95 func: "(" FUNC bind_var_opt type_use func_info . ")"
-
-    ")"  shift, and go to state 280
-
-
-State 216
-
-   70 expr: "(" . expr1 ")"
-
-    NOP             shift, and go to state 120
-    DROP            shift, and go to state 121
-    BLOCK           shift, and go to state 171
-    IF              shift, and go to state 172
-    LOOP            shift, and go to state 173
-    BR              shift, and go to state 125
-    BR_IF           shift, and go to state 126
-    BR_TABLE        shift, and go to state 127
-    CALL            shift, and go to state 128
-    CALL_INDIRECT   shift, and go to state 129
-    RETURN          shift, and go to state 130
-    GET_LOCAL       shift, and go to state 131
-    SET_LOCAL       shift, and go to state 132
-    TEE_LOCAL       shift, and go to state 133
-    GET_GLOBAL      shift, and go to state 134
-    SET_GLOBAL      shift, and go to state 135
-    LOAD            shift, and go to state 136
-    STORE           shift, and go to state 137
-    CONST           shift, and go to state 138
-    UNARY           shift, and go to state 139
-    BINARY          shift, and go to state 140
-    COMPARE         shift, and go to state 141
-    CONVERT         shift, and go to state 142
-    SELECT          shift, and go to state 143
-    UNREACHABLE     shift, and go to state 144
-    CURRENT_MEMORY  shift, and go to state 145
-    GROW_MEMORY     shift, and go to state 146
-
-    plain_instr  go to state 175
-    expr1        go to state 176
-
-
-State 217
-
-   82 instr_list: instr instr_list .
-
-    $default  reduce using rule 82 (instr_list)
-
-
-State 218
-
-   97 func: "(" FUNC bind_var_opt func_info ")" .
-
-    $default  reduce using rule 97 (func)
-
-
-State 219
-
-   13 func_sig: "(" . PARAM value_type_list ")"
-   14         | "(" . PARAM value_type_list ")" "(" RESULT value_type_list ")"
-   15         | "(" . RESULT value_type_list ")"
-   20 type_use: "(" . TYPE var ")"
-
-    TYPE    shift, and go to state 190
-    PARAM   shift, and go to state 281
-    RESULT  shift, and go to state 282
-
-
-State 220
-
-  118 import: "(" FUNC bind_var_opt inline_import func_sig . ")"
-
-    ")"  shift, and go to state 283
-
-
-State 221
-
-  117 import: "(" FUNC bind_var_opt inline_import type_use . ")"
-
-    ")"  shift, and go to state 284
-
-
-State 222
-
-   20 type_use: "(" . TYPE var ")"
-   70 expr: "(" . expr1 ")"
-   87 func_fields: "(" . RESULT value_type_list ")" func_body
-   88            | "(" . PARAM value_type_list ")" func_fields
-   89            | "(" . PARAM bind_var VALUE_TYPE ")" func_fields
-   91 func_body: "(" . LOCAL value_type_list ")" func_body
-   92          | "(" . LOCAL bind_var VALUE_TYPE ")" func_body
-
-    NOP             shift, and go to state 120
-    DROP            shift, and go to state 121
-    BLOCK           shift, and go to state 171
-    IF              shift, and go to state 172
-    LOOP            shift, and go to state 173
-    BR              shift, and go to state 125
-    BR_IF           shift, and go to state 126
-    BR_TABLE        shift, and go to state 127
-    CALL            shift, and go to state 128
-    CALL_INDIRECT   shift, and go to state 129
-    RETURN          shift, and go to state 130
-    GET_LOCAL       shift, and go to state 131
-    SET_LOCAL       shift, and go to state 132
-    TEE_LOCAL       shift, and go to state 133
-    GET_GLOBAL      shift, and go to state 134
-    SET_GLOBAL      shift, and go to state 135
-    LOAD            shift, and go to state 136
-    STORE           shift, and go to state 137
-    CONST           shift, and go to state 138
-    UNARY           shift, and go to state 139
-    BINARY          shift, and go to state 140
-    COMPARE         shift, and go to state 141
-    CONVERT         shift, and go to state 142
-    SELECT          shift, and go to state 143
-    UNREACHABLE     shift, and go to state 144
-    CURRENT_MEMORY  shift, and go to state 145
-    GROW_MEMORY     shift, and go to state 146
-    TYPE            shift, and go to state 190
-    PARAM           shift, and go to state 191
-    RESULT          shift, and go to state 192
-    LOCAL           shift, and go to state 193
-
-    plain_instr  go to state 175
-    expr1        go to state 176
-
-
-State 223
-
-   94 func: "(" FUNC bind_var_opt inline_export type_use . func_info ")"
-
-    "("             shift, and go to state 214
-    NOP             shift, and go to state 120
-    DROP            shift, and go to state 121
-    BLOCK           shift, and go to state 122
-    IF              shift, and go to state 123
-    LOOP            shift, and go to state 124
-    BR              shift, and go to state 125
-    BR_IF           shift, and go to state 126
-    BR_TABLE        shift, and go to state 127
-    CALL            shift, and go to state 128
-    CALL_INDIRECT   shift, and go to state 129
-    RETURN          shift, and go to state 130
-    GET_LOCAL       shift, and go to state 131
-    SET_LOCAL       shift, and go to state 132
-    TEE_LOCAL       shift, and go to state 133
-    GET_GLOBAL      shift, and go to state 134
-    SET_GLOBAL      shift, and go to state 135
-    LOAD            shift, and go to state 136
-    STORE           shift, and go to state 137
-    CONST           shift, and go to state 138
-    UNARY           shift, and go to state 139
-    BINARY          shift, and go to state 140
-    COMPARE         shift, and go to state 141
-    CONVERT         shift, and go to state 142
-    SELECT          shift, and go to state 143
-    UNREACHABLE     shift, and go to state 144
-    CURRENT_MEMORY  shift, and go to state 145
-    GROW_MEMORY     shift, and go to state 146
-
-    $default  reduce using rule 81 (instr_list)
-
-    instr        go to state 148
-    plain_instr  go to state 149
-    block_instr  go to state 150
-    expr         go to state 151
-    instr_list   go to state 152
-    func_fields  go to state 153
-    func_body    go to state 154
-    func_info    go to state 285
-
-
-State 224
-
-   96 func: "(" FUNC bind_var_opt inline_export func_info . ")"
-
-    ")"  shift, and go to state 286
-
-
-State 225
-
-   13 func_sig: "(" . PARAM value_type_list ")"
-   14         | "(" . PARAM value_type_list ")" "(" RESULT value_type_list ")"
-   15         | "(" . RESULT value_type_list ")"
-
-    PARAM   shift, and go to state 281
-    RESULT  shift, and go to state 282
-
-
-State 226
-
-   11 func_type: "(" FUNC func_sig . ")"
-
-    ")"  shift, and go to state 287
-
-
-State 227
-
-  132 type_def: "(" TYPE bind_var func_type ")" .
-
-    $default  reduce using rule 132 (type_def)
-
-
-State 228
-
-   10 global_type: "(" MUT . VALUE_TYPE ")"
-
-    VALUE_TYPE  shift, and go to state 288
-
-
-State 229
-
-   85 const_expr: instr_list .
-
-    $default  reduce using rule 85 (const_expr)
-
-
-State 230
-
-  110 global: "(" GLOBAL bind_var_opt global_type const_expr . ")"
-
-    ")"  shift, and go to state 289
-
-
-State 231
-
-   10 global_type: "(" . MUT VALUE_TYPE ")"
-
-    MUT  shift, and go to state 228
-
-
-State 232
-
-  121 import: "(" GLOBAL bind_var_opt inline_import global_type . ")"
-
-    ")"  shift, and go to state 290
-
-
-State 233
-
-  109 global: "(" GLOBAL bind_var_opt inline_export global_type . const_expr ")"
-
-    "("             shift, and go to state 216
-    NOP             shift, and go to state 120
-    DROP            shift, and go to state 121
-    BLOCK           shift, and go to state 122
-    IF              shift, and go to state 123
-    LOOP            shift, and go to state 124
-    BR              shift, and go to state 125
-    BR_IF           shift, and go to state 126
-    BR_TABLE        shift, and go to state 127
-    CALL            shift, and go to state 128
-    CALL_INDIRECT   shift, and go to state 129
-    RETURN          shift, and go to state 130
-    GET_LOCAL       shift, and go to state 131
-    SET_LOCAL       shift, and go to state 132
-    TEE_LOCAL       shift, and go to state 133
-    GET_GLOBAL      shift, and go to state 134
-    SET_GLOBAL      shift, and go to state 135
-    LOAD            shift, and go to state 136
-    STORE           shift, and go to state 137
-    CONST           shift, and go to state 138
-    UNARY           shift, and go to state 139
-    BINARY          shift, and go to state 140
-    COMPARE         shift, and go to state 141
-    CONVERT         shift, and go to state 142
-    SELECT          shift, and go to state 143
-    UNREACHABLE     shift, and go to state 144
-    CURRENT_MEMORY  shift, and go to state 145
-    GROW_MEMORY     shift, and go to state 146
-
-    $default  reduce using rule 81 (instr_list)
-
-    instr        go to state 148
-    plain_instr  go to state 149
-    block_instr  go to state 150
-    expr         go to state 151
-    instr_list   go to state 229
-    const_expr   go to state 291
-
-
-State 234
-
-  119 import: "(" TABLE bind_var_opt inline_import table_sig . ")"
-
-    ")"  shift, and go to state 292
-
-
-State 235
-
-   16 table_sig: limits . elem_type
-
-    ANYFUNC  shift, and go to state 237
-
-    elem_type  go to state 293
-
-
-State 236
-
-   18 limits: nat .
-   19       | nat . nat
-
-    NAT  shift, and go to state 97
-
-    $default  reduce using rule 18 (limits)
-
-    nat  go to state 294
-
-
-State 237
-
-    8 elem_type: ANYFUNC .
-
-    $default  reduce using rule 8 (elem_type)
-
-
-State 238
-
-  103 table: "(" TABLE bind_var_opt inline_export_opt elem_type . "(" ELEM var_list ")" ")"
-
-    "("  shift, and go to state 295
-
-
-State 239
-
-  102 table: "(" TABLE bind_var_opt inline_export_opt table_sig . ")"
-
-    ")"  shift, and go to state 296
-
-
-State 240
-
-   72 expr1: BLOCK labeling_opt . block
-
-    $default  reduce using rule 6 (value_type_list)
-
-    value_type_list  go to state 272
-    block            go to state 297
-
-
-State 241
-
-   74 expr1: IF labeling_opt . value_type_list if_
-
-    $default  reduce using rule 6 (value_type_list)
-
-    value_type_list  go to state 298
-
-
-State 242
-
-   73 expr1: LOOP labeling_opt . block
-
-    $default  reduce using rule 6 (value_type_list)
-
-    value_type_list  go to state 272
-    block            go to state 299
-
-
-State 243
-
-   98 offset: "(" OFFSET const_expr . ")"
-
-    ")"  shift, and go to state 300
-
-
-State 244
-
-   84 expr_list: expr . expr_list
-
-    "("  shift, and go to state 216
-
-    $default  reduce using rule 83 (expr_list)
-
-    expr       go to state 244
-    expr_list  go to state 301
-
-
-State 245
-
-   71 expr1: plain_instr expr_list .
-
-    $default  reduce using rule 71 (expr1)
-
-
-State 246
-
-   70 expr: "(" expr1 ")" .
-
-    $default  reduce using rule 70 (expr)
-
-
-State 247
-
-   28 var_list: var_list . var
-  100 elem: "(" ELEM var offset var_list . ")"
-
-    ")"  shift, and go to state 302
-    NAT  shift, and go to state 97
-    VAR  shift, and go to state 98
-
-    nat  go to state 99
-    var  go to state 249
-
-
-State 248
-
-  101 elem: "(" ELEM offset var_list ")" .
-
-    $default  reduce using rule 101 (elem)
-
-
-State 249
-
-   28 var_list: var_list var .
-
-    $default  reduce using rule 28 (var_list)
-
-
-State 250
-
-  108 memory: "(" MEMORY bind_var_opt "(" DATA . text_list ")" ")"
-
-    TEXT  shift, and go to state 43
-
-    $default  reduce using rule 3 (text_list)
-
-    non_empty_text_list  go to state 184
-    text_list            go to state 303
-
-
-State 251
-
-  120 import: "(" MEMORY bind_var_opt inline_import memory_sig . ")"
-
-    ")"  shift, and go to state 304
-
-
-State 252
-
-   17 memory_sig: limits .
-
-    $default  reduce using rule 17 (memory_sig)
-
-
-State 253
-
-  106 memory: "(" MEMORY bind_var_opt inline_export_opt memory_sig . ")"
-
-    ")"  shift, and go to state 305
-
-
-State 254
-
-  107 memory: "(" MEMORY bind_var_opt inline_export "(" . DATA text_list ")" ")"
-
-    DATA  shift, and go to state 306
-
-
-State 255
-
-  104 data: "(" DATA var offset text_list . ")"
-
-    ")"  shift, and go to state 307
-
-
-State 256
-
-  105 data: "(" DATA offset text_list ")" .
-
-    $default  reduce using rule 105 (data)
-
-
-State 257
-
-  111 import_kind: "(" . FUNC bind_var_opt type_use ")"
-  112            | "(" . FUNC bind_var_opt func_sig ")"
-  113            | "(" . TABLE bind_var_opt table_sig ")"
-  114            | "(" . MEMORY bind_var_opt memory_sig ")"
-  115            | "(" . GLOBAL bind_var_opt global_type ")"
-
-    FUNC    shift, and go to state 308
-    GLOBAL  shift, and go to state 309
-    TABLE   shift, and go to state 310
-    MEMORY  shift, and go to state 311
-
-
-State 258
-
-  116 import: "(" IMPORT quoted_text quoted_text import_kind . ")"
-
-    ")"  shift, and go to state 312
-
-
-State 259
-
-  123 export_kind: "(" FUNC . var ")"
-
-    NAT  shift, and go to state 97
-    VAR  shift, and go to state 98
-
-    nat  go to state 99
-    var  go to state 313
-
-
-State 260
-
-  126 export_kind: "(" GLOBAL . var ")"
-
-    NAT  shift, and go to state 97
-    VAR  shift, and go to state 98
-
-    nat  go to state 99
-    var  go to state 314
-
-
-State 261
-
-  124 export_kind: "(" TABLE . var ")"
-
-    NAT  shift, and go to state 97
-    VAR  shift, and go to state 98
-
-    nat  go to state 99
-    var  go to state 315
-
-
-State 262
-
-  125 export_kind: "(" MEMORY . var ")"
-
-    NAT  shift, and go to state 97
-    VAR  shift, and go to state 98
-
-    nat  go to state 99
-    var  go to state 316
-
-
-State 263
-
-  127 export: "(" EXPORT quoted_text export_kind ")" .
-
-    $default  reduce using rule 127 (export)
-
-
-State 264
-
-   20 type_use: "(" TYPE var . ")"
-
-    ")"  shift, and go to state 317
-
-
-State 265
-
-    7 value_type_list: value_type_list . VALUE_TYPE
-   88 func_fields: "(" PARAM value_type_list . ")" func_fields
-
-    ")"         shift, and go to state 318
-    VALUE_TYPE  shift, and go to state 319
-
-
-State 266
-
-   89 func_fields: "(" PARAM bind_var . VALUE_TYPE ")" func_fields
-
-    VALUE_TYPE  shift, and go to state 320
-
-
-State 267
-
-    7 value_type_list: value_type_list . VALUE_TYPE
-   87 func_fields: "(" RESULT value_type_list . ")" func_body
-
-    ")"         shift, and go to state 321
-    VALUE_TYPE  shift, and go to state 319
-
-
-State 268
-
-    7 value_type_list: value_type_list . VALUE_TYPE
-   91 func_body: "(" LOCAL value_type_list . ")" func_body
-
-    ")"         shift, and go to state 322
-    VALUE_TYPE  shift, and go to state 319
-
-
-State 269
-
-   92 func_body: "(" LOCAL bind_var . VALUE_TYPE ")" func_body
-
-    VALUE_TYPE  shift, and go to state 323
-
-
-State 270
-
-  122 inline_import: "(" IMPORT quoted_text . quoted_text ")"
-
-    TEXT  shift, and go to state 26
-
-    quoted_text  go to state 324
-
-
-State 271
-
-  130 inline_export: "(" EXPORT quoted_text . ")"
-
-    ")"  shift, and go to state 325
-
-
-State 272
-
-    7 value_type_list: value_type_list . VALUE_TYPE
-   69 block: value_type_list . instr_list
-
-    "("             shift, and go to state 216
-    VALUE_TYPE      shift, and go to state 319
-    NOP             shift, and go to state 120
-    DROP            shift, and go to state 121
-    BLOCK           shift, and go to state 122
-    IF              shift, and go to state 123
-    LOOP            shift, and go to state 124
-    BR              shift, and go to state 125
-    BR_IF           shift, and go to state 126
-    BR_TABLE        shift, and go to state 127
-    CALL            shift, and go to state 128
-    CALL_INDIRECT   shift, and go to state 129
-    RETURN          shift, and go to state 130
-    GET_LOCAL       shift, and go to state 131
-    SET_LOCAL       shift, and go to state 132
-    TEE_LOCAL       shift, and go to state 133
-    GET_GLOBAL      shift, and go to state 134
-    SET_GLOBAL      shift, and go to state 135
-    LOAD            shift, and go to state 136
-    STORE           shift, and go to state 137
-    CONST           shift, and go to state 138
-    UNARY           shift, and go to state 139
-    BINARY          shift, and go to state 140
-    COMPARE         shift, and go to state 141
-    CONVERT         shift, and go to state 142
-    SELECT          shift, and go to state 143
-    UNREACHABLE     shift, and go to state 144
-    CURRENT_MEMORY  shift, and go to state 145
-    GROW_MEMORY     shift, and go to state 146
-
-    $default  reduce using rule 81 (instr_list)
-
-    instr        go to state 148
-    plain_instr  go to state 149
-    block_instr  go to state 150
-    expr         go to state 151
-    instr_list   go to state 326
-
-
-State 273
-
-   65 block_instr: BLOCK labeling_opt block . END labeling_opt
-
-    END  shift, and go to state 327
-
-
-State 274
-
-   67 block_instr: IF labeling_opt block . END labeling_opt
-   68            | IF labeling_opt block . ELSE labeling_opt instr_list END labeling_opt
-
-    END   shift, and go to state 328
-    ELSE  shift, and go to state 329
-
-
-State 275
-
-   66 block_instr: LOOP labeling_opt block . END labeling_opt
-
-    END  shift, and go to state 330
-
-
-State 276
-
-   28 var_list: var_list var .
-   47 plain_instr: BR_TABLE var_list var .
-
-    NAT       reduce using rule 28 (var_list)
-    VAR       reduce using rule 28 (var_list)
-    $default  reduce using rule 47 (plain_instr)
-
-
-State 277
-
-   37 align_opt: ALIGN_EQ_NAT .
-
-    $default  reduce using rule 37 (align_opt)
-
-
-State 278
-
-   56 plain_instr: LOAD offset_opt align_opt .
-
-    $default  reduce using rule 56 (plain_instr)
-
-
-State 279
-
-   57 plain_instr: STORE offset_opt align_opt .
-
-    $default  reduce using rule 57 (plain_instr)
-
-
-State 280
-
-   95 func: "(" FUNC bind_var_opt type_use func_info ")" .
-
-    $default  reduce using rule 95 (func)
-
-
-State 281
-
-   13 func_sig: "(" PARAM . value_type_list ")"
-   14         | "(" PARAM . value_type_list ")" "(" RESULT value_type_list ")"
-
-    $default  reduce using rule 6 (value_type_list)
-
-    value_type_list  go to state 331
-
-
-State 282
-
-   15 func_sig: "(" RESULT . value_type_list ")"
-
-    $default  reduce using rule 6 (value_type_list)
-
-    value_type_list  go to state 332
-
-
-State 283
-
-  118 import: "(" FUNC bind_var_opt inline_import func_sig ")" .
-
-    $default  reduce using rule 118 (import)
-
-
-State 284
-
-  117 import: "(" FUNC bind_var_opt inline_import type_use ")" .
-
-    $default  reduce using rule 117 (import)
-
-
-State 285
-
-   94 func: "(" FUNC bind_var_opt inline_export type_use func_info . ")"
-
-    ")"  shift, and go to state 333
-
-
-State 286
-
-   96 func: "(" FUNC bind_var_opt inline_export func_info ")" .
-
-    $default  reduce using rule 96 (func)
-
-
-State 287
-
-   11 func_type: "(" FUNC func_sig ")" .
-
-    $default  reduce using rule 11 (func_type)
-
-
-State 288
-
-   10 global_type: "(" MUT VALUE_TYPE . ")"
-
-    ")"  shift, and go to state 334
-
-
-State 289
-
-  110 global: "(" GLOBAL bind_var_opt global_type const_expr ")" .
-
-    $default  reduce using rule 110 (global)
-
-
-State 290
-
-  121 import: "(" GLOBAL bind_var_opt inline_import global_type ")" .
-
-    $default  reduce using rule 121 (import)
-
-
-State 291
-
-  109 global: "(" GLOBAL bind_var_opt inline_export global_type const_expr . ")"
-
-    ")"  shift, and go to state 335
-
-
-State 292
-
-  119 import: "(" TABLE bind_var_opt inline_import table_sig ")" .
-
-    $default  reduce using rule 119 (import)
-
-
-State 293
-
-   16 table_sig: limits elem_type .
-
-    $default  reduce using rule 16 (table_sig)
-
-
-State 294
-
-   19 limits: nat nat .
-
-    $default  reduce using rule 19 (limits)
-
-
-State 295
-
-  103 table: "(" TABLE bind_var_opt inline_export_opt elem_type "(" . ELEM var_list ")" ")"
-
-    ELEM  shift, and go to state 336
-
-
-State 296
-
-  102 table: "(" TABLE bind_var_opt inline_export_opt table_sig ")" .
-
-    $default  reduce using rule 102 (table)
-
-
-State 297
-
-   72 expr1: BLOCK labeling_opt block .
-
-    $default  reduce using rule 72 (expr1)
-
-
-State 298
-
-    7 value_type_list: value_type_list . VALUE_TYPE
-   74 expr1: IF labeling_opt value_type_list . if_
-
-    "("         shift, and go to state 337
-    VALUE_TYPE  shift, and go to state 319
-
-    expr  go to state 338
-    if_   go to state 339
-
-
-State 299
-
-   73 expr1: LOOP labeling_opt block .
-
-    $default  reduce using rule 73 (expr1)
-
-
-State 300
-
-   98 offset: "(" OFFSET const_expr ")" .
-
-    $default  reduce using rule 98 (offset)
-
-
-State 301
-
-   84 expr_list: expr expr_list .
-
-    $default  reduce using rule 84 (expr_list)
-
-
-State 302
-
-  100 elem: "(" ELEM var offset var_list ")" .
-
-    $default  reduce using rule 100 (elem)
-
-
-State 303
-
-  108 memory: "(" MEMORY bind_var_opt "(" DATA text_list . ")" ")"
-
-    ")"  shift, and go to state 340
-
-
-State 304
-
-  120 import: "(" MEMORY bind_var_opt inline_import memory_sig ")" .
-
-    $default  reduce using rule 120 (import)
-
-
-State 305
-
-  106 memory: "(" MEMORY bind_var_opt inline_export_opt memory_sig ")" .
-
-    $default  reduce using rule 106 (memory)
-
-
-State 306
-
-  107 memory: "(" MEMORY bind_var_opt inline_export "(" DATA . text_list ")" ")"
-
-    TEXT  shift, and go to state 43
-
-    $default  reduce using rule 3 (text_list)
-
-    non_empty_text_list  go to state 184
-    text_list            go to state 341
-
-
-State 307
-
-  104 data: "(" DATA var offset text_list ")" .
-
-    $default  reduce using rule 104 (data)
-
-
-State 308
-
-  111 import_kind: "(" FUNC . bind_var_opt type_use ")"
-  112            | "(" FUNC . bind_var_opt func_sig ")"
-
-    VAR  shift, and go to state 23
-
-    $default  reduce using rule 29 (bind_var_opt)
-
-    bind_var_opt  go to state 342
-    bind_var      go to state 25
-
-
-State 309
-
-  115 import_kind: "(" GLOBAL . bind_var_opt global_type ")"
-
-    VAR  shift, and go to state 23
-
-    $default  reduce using rule 29 (bind_var_opt)
-
-    bind_var_opt  go to state 343
-    bind_var      go to state 25
-
-
-State 310
-
-  113 import_kind: "(" TABLE . bind_var_opt table_sig ")"
-
-    VAR  shift, and go to state 23
-
-    $default  reduce using rule 29 (bind_var_opt)
-
-    bind_var_opt  go to state 344
-    bind_var      go to state 25
-
-
-State 311
-
-  114 import_kind: "(" MEMORY . bind_var_opt memory_sig ")"
-
-    VAR  shift, and go to state 23
-
-    $default  reduce using rule 29 (bind_var_opt)
-
-    bind_var_opt  go to state 345
-    bind_var      go to state 25
-
-
-State 312
-
-  116 import: "(" IMPORT quoted_text quoted_text import_kind ")" .
-
-    $default  reduce using rule 116 (import)
-
-
-State 313
-
-  123 export_kind: "(" FUNC var . ")"
-
-    ")"  shift, and go to state 346
-
-
-State 314
-
-  126 export_kind: "(" GLOBAL var . ")"
-
-    ")"  shift, and go to state 347
-
-
-State 315
-
-  124 export_kind: "(" TABLE var . ")"
-
-    ")"  shift, and go to state 348
-
-
-State 316
-
-  125 export_kind: "(" MEMORY var . ")"
-
-    ")"  shift, and go to state 349
-
-
-State 317
-
-   20 type_use: "(" TYPE var ")" .
-
-    $default  reduce using rule 20 (type_use)
-
-
-State 318
-
-   88 func_fields: "(" PARAM value_type_list ")" . func_fields
-
-    "("             shift, and go to state 214
-    NOP             shift, and go to state 120
-    DROP            shift, and go to state 121
-    BLOCK           shift, and go to state 122
-    IF              shift, and go to state 123
-    LOOP            shift, and go to state 124
-    BR              shift, and go to state 125
-    BR_IF           shift, and go to state 126
-    BR_TABLE        shift, and go to state 127
-    CALL            shift, and go to state 128
-    CALL_INDIRECT   shift, and go to state 129
-    RETURN          shift, and go to state 130
-    GET_LOCAL       shift, and go to state 131
-    SET_LOCAL       shift, and go to state 132
-    TEE_LOCAL       shift, and go to state 133
-    GET_GLOBAL      shift, and go to state 134
-    SET_GLOBAL      shift, and go to state 135
-    LOAD            shift, and go to state 136
-    STORE           shift, and go to state 137
-    CONST           shift, and go to state 138
-    UNARY           shift, and go to state 139
-    BINARY          shift, and go to state 140
-    COMPARE         shift, and go to state 141
-    CONVERT         shift, and go to state 142
-    SELECT          shift, and go to state 143
-    UNREACHABLE     shift, and go to state 144
-    CURRENT_MEMORY  shift, and go to state 145
-    GROW_MEMORY     shift, and go to state 146
-
-    $default  reduce using rule 81 (instr_list)
-
-    instr        go to state 148
-    plain_instr  go to state 149
-    block_instr  go to state 150
-    expr         go to state 151
-    instr_list   go to state 152
-    func_fields  go to state 350
-    func_body    go to state 154
-
-
-State 319
-
-    7 value_type_list: value_type_list VALUE_TYPE .
-
-    $default  reduce using rule 7 (value_type_list)
-
-
-State 320
-
-   89 func_fields: "(" PARAM bind_var VALUE_TYPE . ")" func_fields
-
-    ")"  shift, and go to state 351
-
-
-State 321
-
-   87 func_fields: "(" RESULT value_type_list ")" . func_body
-
-    "("             shift, and go to state 352
-    NOP             shift, and go to state 120
-    DROP            shift, and go to state 121
-    BLOCK           shift, and go to state 122
-    IF              shift, and go to state 123
-    LOOP            shift, and go to state 124
-    BR              shift, and go to state 125
-    BR_IF           shift, and go to state 126
-    BR_TABLE        shift, and go to state 127
-    CALL            shift, and go to state 128
-    CALL_INDIRECT   shift, and go to state 129
-    RETURN          shift, and go to state 130
-    GET_LOCAL       shift, and go to state 131
-    SET_LOCAL       shift, and go to state 132
-    TEE_LOCAL       shift, and go to state 133
-    GET_GLOBAL      shift, and go to state 134
-    SET_GLOBAL      shift, and go to state 135
-    LOAD            shift, and go to state 136
-    STORE           shift, and go to state 137
-    CONST           shift, and go to state 138
-    UNARY           shift, and go to state 139
-    BINARY          shift, and go to state 140
-    COMPARE         shift, and go to state 141
-    CONVERT         shift, and go to state 142
-    SELECT          shift, and go to state 143
-    UNREACHABLE     shift, and go to state 144
-    CURRENT_MEMORY  shift, and go to state 145
-    GROW_MEMORY     shift, and go to state 146
-
-    $default  reduce using rule 81 (instr_list)
-
-    instr        go to state 148
-    plain_instr  go to state 149
-    block_instr  go to state 150
-    expr         go to state 151
-    instr_list   go to state 152
-    func_body    go to state 353
-
-
-State 322
-
-   91 func_body: "(" LOCAL value_type_list ")" . func_body
-
-    "("             shift, and go to state 352
-    NOP             shift, and go to state 120
-    DROP            shift, and go to state 121
-    BLOCK           shift, and go to state 122
-    IF              shift, and go to state 123
-    LOOP            shift, and go to state 124
-    BR              shift, and go to state 125
-    BR_IF           shift, and go to state 126
-    BR_TABLE        shift, and go to state 127
-    CALL            shift, and go to state 128
-    CALL_INDIRECT   shift, and go to state 129
-    RETURN          shift, and go to state 130
-    GET_LOCAL       shift, and go to state 131
-    SET_LOCAL       shift, and go to state 132
-    TEE_LOCAL       shift, and go to state 133
-    GET_GLOBAL      shift, and go to state 134
-    SET_GLOBAL      shift, and go to state 135
-    LOAD            shift, and go to state 136
-    STORE           shift, and go to state 137
-    CONST           shift, and go to state 138
-    UNARY           shift, and go to state 139
-    BINARY          shift, and go to state 140
-    COMPARE         shift, and go to state 141
-    CONVERT         shift, and go to state 142
-    SELECT          shift, and go to state 143
-    UNREACHABLE     shift, and go to state 144
-    CURRENT_MEMORY  shift, and go to state 145
-    GROW_MEMORY     shift, and go to state 146
-
-    $default  reduce using rule 81 (instr_list)
-
-    instr        go to state 148
-    plain_instr  go to state 149
-    block_instr  go to state 150
-    expr         go to state 151
-    instr_list   go to state 152
-    func_body    go to state 354
-
-
-State 323
-
-   92 func_body: "(" LOCAL bind_var VALUE_TYPE . ")" func_body
-
-    ")"  shift, and go to state 355
-
-
-State 324
-
-  122 inline_import: "(" IMPORT quoted_text quoted_text . ")"
-
-    ")"  shift, and go to state 356
-
-
-State 325
-
-  130 inline_export: "(" EXPORT quoted_text ")" .
-
-    $default  reduce using rule 130 (inline_export)
-
-
-State 326
-
-   69 block: value_type_list instr_list .
-
-    $default  reduce using rule 69 (block)
-
-
-State 327
-
-   65 block_instr: BLOCK labeling_opt block END . labeling_opt
-
-    VAR  shift, and go to state 23
-
-    $default  reduce using rule 32 (labeling_opt)
-
-    bind_var      go to state 196
-    labeling_opt  go to state 357
-
-
-State 328
-
-   67 block_instr: IF labeling_opt block END . labeling_opt
-
-    VAR  shift, and go to state 23
-
-    $default  reduce using rule 32 (labeling_opt)
-
-    bind_var      go to state 196
-    labeling_opt  go to state 358
-
-
-State 329
-
-   68 block_instr: IF labeling_opt block ELSE . labeling_opt instr_list END labeling_opt
-
-    VAR  shift, and go to state 23
-
-    $default  reduce using rule 32 (labeling_opt)
-
-    bind_var      go to state 196
-    labeling_opt  go to state 359
-
-
-State 330
-
-   66 block_instr: LOOP labeling_opt block END . labeling_opt
-
-    VAR  shift, and go to state 23
-
-    $default  reduce using rule 32 (labeling_opt)
-
-    bind_var      go to state 196
-    labeling_opt  go to state 360
-
-
-State 331
-
-    7 value_type_list: value_type_list . VALUE_TYPE
-   13 func_sig: "(" PARAM value_type_list . ")"
-   14         | "(" PARAM value_type_list . ")" "(" RESULT value_type_list ")"
-
-    ")"         shift, and go to state 361
-    VALUE_TYPE  shift, and go to state 319
-
-
-State 332
-
-    7 value_type_list: value_type_list . VALUE_TYPE
-   15 func_sig: "(" RESULT value_type_list . ")"
-
-    ")"         shift, and go to state 362
-    VALUE_TYPE  shift, and go to state 319
-
-
-State 333
-
-   94 func: "(" FUNC bind_var_opt inline_export type_use func_info ")" .
-
-    $default  reduce using rule 94 (func)
-
-
-State 334
-
-   10 global_type: "(" MUT VALUE_TYPE ")" .
-
-    $default  reduce using rule 10 (global_type)
-
-
-State 335
-
-  109 global: "(" GLOBAL bind_var_opt inline_export global_type const_expr ")" .
-
-    $default  reduce using rule 109 (global)
-
-
-State 336
-
-  103 table: "(" TABLE bind_var_opt inline_export_opt elem_type "(" ELEM . var_list ")" ")"
-
-    $default  reduce using rule 27 (var_list)
-
-    var_list  go to state 363
-
-
-State 337
-
-   70 expr: "(" . expr1 ")"
-   75 if_: "(" . THEN instr_list ")" "(" ELSE instr_list ")"
-   76    | "(" . THEN instr_list ")"
-
-    NOP             shift, and go to state 120
-    DROP            shift, and go to state 121
-    BLOCK           shift, and go to state 171
-    IF              shift, and go to state 172
-    THEN            shift, and go to state 364
-    LOOP            shift, and go to state 173
-    BR              shift, and go to state 125
-    BR_IF           shift, and go to state 126
-    BR_TABLE        shift, and go to state 127
-    CALL            shift, and go to state 128
-    CALL_INDIRECT   shift, and go to state 129
-    RETURN          shift, and go to state 130
-    GET_LOCAL       shift, and go to state 131
-    SET_LOCAL       shift, and go to state 132
-    TEE_LOCAL       shift, and go to state 133
-    GET_GLOBAL      shift, and go to state 134
-    SET_GLOBAL      shift, and go to state 135
-    LOAD            shift, and go to state 136
-    STORE           shift, and go to state 137
-    CONST           shift, and go to state 138
-    UNARY           shift, and go to state 139
-    BINARY          shift, and go to state 140
-    COMPARE         shift, and go to state 141
-    CONVERT         shift, and go to state 142
-    SELECT          shift, and go to state 143
-    UNREACHABLE     shift, and go to state 144
-    CURRENT_MEMORY  shift, and go to state 145
-    GROW_MEMORY     shift, and go to state 146
-
-    plain_instr  go to state 175
-    expr1        go to state 176
-
-
-State 338
-
-   77 if_: expr . "(" THEN instr_list ")" "(" ELSE instr_list ")"
-   78    | expr . "(" THEN instr_list ")"
-   79    | expr . expr expr
-   80    | expr . expr
-
-    "("  shift, and go to state 365
-
-    expr  go to state 366
-
-
-State 339
-
-   74 expr1: IF labeling_opt value_type_list if_ .
-
-    $default  reduce using rule 74 (expr1)
-
-
-State 340
-
-  108 memory: "(" MEMORY bind_var_opt "(" DATA text_list ")" . ")"
-
-    ")"  shift, and go to state 367
-
-
-State 341
-
-  107 memory: "(" MEMORY bind_var_opt inline_export "(" DATA text_list . ")" ")"
-
-    ")"  shift, and go to state 368
-
-
-State 342
-
-  111 import_kind: "(" FUNC bind_var_opt . type_use ")"
-  112            | "(" FUNC bind_var_opt . func_sig ")"
-
-    "("  shift, and go to state 219
-
-    $default  reduce using rule 12 (func_sig)
-
-    func_sig  go to state 369
-    type_use  go to state 370
-
-
-State 343
-
-  115 import_kind: "(" GLOBAL bind_var_opt . global_type ")"
-
-    "("         shift, and go to state 231
-    VALUE_TYPE  shift, and go to state 163
-
-    global_type  go to state 371
-
-
-State 344
-
-  113 import_kind: "(" TABLE bind_var_opt . table_sig ")"
-
-    NAT  shift, and go to state 97
-
-    table_sig  go to state 372
-    limits     go to state 235
-    nat        go to state 236
-
-
-State 345
-
-  114 import_kind: "(" MEMORY bind_var_opt . memory_sig ")"
-
-    NAT  shift, and go to state 97
-
-    memory_sig  go to state 373
-    limits      go to state 252
-    nat         go to state 236
-
-
-State 346
-
-  123 export_kind: "(" FUNC var ")" .
-
-    $default  reduce using rule 123 (export_kind)
-
-
-State 347
-
-  126 export_kind: "(" GLOBAL var ")" .
-
-    $default  reduce using rule 126 (export_kind)
-
-
-State 348
-
-  124 export_kind: "(" TABLE var ")" .
-
-    $default  reduce using rule 124 (export_kind)
-
-
-State 349
-
-  125 export_kind: "(" MEMORY var ")" .
-
-    $default  reduce using rule 125 (export_kind)
-
-
-State 350
-
-   88 func_fields: "(" PARAM value_type_list ")" func_fields .
-
-    $default  reduce using rule 88 (func_fields)
-
-
-State 351
-
-   89 func_fields: "(" PARAM bind_var VALUE_TYPE ")" . func_fields
-
-    "("             shift, and go to state 214
-    NOP             shift, and go to state 120
-    DROP            shift, and go to state 121
-    BLOCK           shift, and go to state 122
-    IF              shift, and go to state 123
-    LOOP            shift, and go to state 124
-    BR              shift, and go to state 125
-    BR_IF           shift, and go to state 126
-    BR_TABLE        shift, and go to state 127
-    CALL            shift, and go to state 128
-    CALL_INDIRECT   shift, and go to state 129
-    RETURN          shift, and go to state 130
-    GET_LOCAL       shift, and go to state 131
-    SET_LOCAL       shift, and go to state 132
-    TEE_LOCAL       shift, and go to state 133
-    GET_GLOBAL      shift, and go to state 134
-    SET_GLOBAL      shift, and go to state 135
-    LOAD            shift, and go to state 136
-    STORE           shift, and go to state 137
-    CONST           shift, and go to state 138
-    UNARY           shift, and go to state 139
-    BINARY          shift, and go to state 140
-    COMPARE         shift, and go to state 141
-    CONVERT         shift, and go to state 142
-    SELECT          shift, and go to state 143
-    UNREACHABLE     shift, and go to state 144
-    CURRENT_MEMORY  shift, and go to state 145
-    GROW_MEMORY     shift, and go to state 146
-
-    $default  reduce using rule 81 (instr_list)
-
-    instr        go to state 148
-    plain_instr  go to state 149
-    block_instr  go to state 150
-    expr         go to state 151
-    instr_list   go to state 152
-    func_fields  go to state 374
-    func_body    go to state 154
-
-
-State 352
-
-   70 expr: "(" . expr1 ")"
-   91 func_body: "(" . LOCAL value_type_list ")" func_body
-   92          | "(" . LOCAL bind_var VALUE_TYPE ")" func_body
-
-    NOP             shift, and go to state 120
-    DROP            shift, and go to state 121
-    BLOCK           shift, and go to state 171
-    IF              shift, and go to state 172
-    LOOP            shift, and go to state 173
-    BR              shift, and go to state 125
-    BR_IF           shift, and go to state 126
-    BR_TABLE        shift, and go to state 127
-    CALL            shift, and go to state 128
-    CALL_INDIRECT   shift, and go to state 129
-    RETURN          shift, and go to state 130
-    GET_LOCAL       shift, and go to state 131
-    SET_LOCAL       shift, and go to state 132
-    TEE_LOCAL       shift, and go to state 133
-    GET_GLOBAL      shift, and go to state 134
-    SET_GLOBAL      shift, and go to state 135
-    LOAD            shift, and go to state 136
-    STORE           shift, and go to state 137
-    CONST           shift, and go to state 138
-    UNARY           shift, and go to state 139
-    BINARY          shift, and go to state 140
-    COMPARE         shift, and go to state 141
-    CONVERT         shift, and go to state 142
-    SELECT          shift, and go to state 143
-    UNREACHABLE     shift, and go to state 144
-    CURRENT_MEMORY  shift, and go to state 145
-    GROW_MEMORY     shift, and go to state 146
-    LOCAL           shift, and go to state 193
-
-    plain_instr  go to state 175
-    expr1        go to state 176
-
-
-State 353
-
-   87 func_fields: "(" RESULT value_type_list ")" func_body .
-
-    $default  reduce using rule 87 (func_fields)
-
-
-State 354
-
-   91 func_body: "(" LOCAL value_type_list ")" func_body .
-
-    $default  reduce using rule 91 (func_body)
-
-
-State 355
-
-   92 func_body: "(" LOCAL bind_var VALUE_TYPE ")" . func_body
-
-    "("             shift, and go to state 352
-    NOP             shift, and go to state 120
-    DROP            shift, and go to state 121
-    BLOCK           shift, and go to state 122
-    IF              shift, and go to state 123
-    LOOP            shift, and go to state 124
-    BR              shift, and go to state 125
-    BR_IF           shift, and go to state 126
-    BR_TABLE        shift, and go to state 127
-    CALL            shift, and go to state 128
-    CALL_INDIRECT   shift, and go to state 129
-    RETURN          shift, and go to state 130
-    GET_LOCAL       shift, and go to state 131
-    SET_LOCAL       shift, and go to state 132
-    TEE_LOCAL       shift, and go to state 133
-    GET_GLOBAL      shift, and go to state 134
-    SET_GLOBAL      shift, and go to state 135
-    LOAD            shift, and go to state 136
-    STORE           shift, and go to state 137
-    CONST           shift, and go to state 138
-    UNARY           shift, and go to state 139
-    BINARY          shift, and go to state 140
-    COMPARE         shift, and go to state 141
-    CONVERT         shift, and go to state 142
-    SELECT          shift, and go to state 143
-    UNREACHABLE     shift, and go to state 144
-    CURRENT_MEMORY  shift, and go to state 145
-    GROW_MEMORY     shift, and go to state 146
-
-    $default  reduce using rule 81 (instr_list)
-
-    instr        go to state 148
-    plain_instr  go to state 149
-    block_instr  go to state 150
-    expr         go to state 151
-    instr_list   go to state 152
-    func_body    go to state 375
-
-
-State 356
-
-  122 inline_import: "(" IMPORT quoted_text quoted_text ")" .
-
-    $default  reduce using rule 122 (inline_import)
-
-
-State 357
-
-   65 block_instr: BLOCK labeling_opt block END labeling_opt .
-
-    $default  reduce using rule 65 (block_instr)
-
-
-State 358
-
-   67 block_instr: IF labeling_opt block END labeling_opt .
-
-    $default  reduce using rule 67 (block_instr)
-
-
-State 359
-
-   68 block_instr: IF labeling_opt block ELSE labeling_opt . instr_list END labeling_opt
-
-    "("             shift, and go to state 216
-    NOP             shift, and go to state 120
-    DROP            shift, and go to state 121
-    BLOCK           shift, and go to state 122
-    IF              shift, and go to state 123
-    LOOP            shift, and go to state 124
-    BR              shift, and go to state 125
-    BR_IF           shift, and go to state 126
-    BR_TABLE        shift, and go to state 127
-    CALL            shift, and go to state 128
-    CALL_INDIRECT   shift, and go to state 129
-    RETURN          shift, and go to state 130
-    GET_LOCAL       shift, and go to state 131
-    SET_LOCAL       shift, and go to state 132
-    TEE_LOCAL       shift, and go to state 133
-    GET_GLOBAL      shift, and go to state 134
-    SET_GLOBAL      shift, and go to state 135
-    LOAD            shift, and go to state 136
-    STORE           shift, and go to state 137
-    CONST           shift, and go to state 138
-    UNARY           shift, and go to state 139
-    BINARY          shift, and go to state 140
-    COMPARE         shift, and go to state 141
-    CONVERT         shift, and go to state 142
-    SELECT          shift, and go to state 143
-    UNREACHABLE     shift, and go to state 144
-    CURRENT_MEMORY  shift, and go to state 145
-    GROW_MEMORY     shift, and go to state 146
-
-    $default  reduce using rule 81 (instr_list)
-
-    instr        go to state 148
-    plain_instr  go to state 149
-    block_instr  go to state 150
-    expr         go to state 151
-    instr_list   go to state 376
-
-
-State 360
-
-   66 block_instr: LOOP labeling_opt block END labeling_opt .
-
-    $default  reduce using rule 66 (block_instr)
-
-
-State 361
-
-   13 func_sig: "(" PARAM value_type_list ")" .
-   14         | "(" PARAM value_type_list ")" . "(" RESULT value_type_list ")"
-
-    "("  shift, and go to state 377
-
-    $default  reduce using rule 13 (func_sig)
-
-
-State 362
-
-   15 func_sig: "(" RESULT value_type_list ")" .
-
-    $default  reduce using rule 15 (func_sig)
-
-
-State 363
-
-   28 var_list: var_list . var
-  103 table: "(" TABLE bind_var_opt inline_export_opt elem_type "(" ELEM var_list . ")" ")"
-
-    ")"  shift, and go to state 378
-    NAT  shift, and go to state 97
-    VAR  shift, and go to state 98
-
-    nat  go to state 99
-    var  go to state 249
-
-
-State 364
-
-   75 if_: "(" THEN . instr_list ")" "(" ELSE instr_list ")"
-   76    | "(" THEN . instr_list ")"
-
-    "("             shift, and go to state 216
-    NOP             shift, and go to state 120
-    DROP            shift, and go to state 121
-    BLOCK           shift, and go to state 122
-    IF              shift, and go to state 123
-    LOOP            shift, and go to state 124
-    BR              shift, and go to state 125
-    BR_IF           shift, and go to state 126
-    BR_TABLE        shift, and go to state 127
-    CALL            shift, and go to state 128
-    CALL_INDIRECT   shift, and go to state 129
-    RETURN          shift, and go to state 130
-    GET_LOCAL       shift, and go to state 131
-    SET_LOCAL       shift, and go to state 132
-    TEE_LOCAL       shift, and go to state 133
-    GET_GLOBAL      shift, and go to state 134
-    SET_GLOBAL      shift, and go to state 135
-    LOAD            shift, and go to state 136
-    STORE           shift, and go to state 137
-    CONST           shift, and go to state 138
-    UNARY           shift, and go to state 139
-    BINARY          shift, and go to state 140
-    COMPARE         shift, and go to state 141
-    CONVERT         shift, and go to state 142
-    SELECT          shift, and go to state 143
-    UNREACHABLE     shift, and go to state 144
-    CURRENT_MEMORY  shift, and go to state 145
-    GROW_MEMORY     shift, and go to state 146
-
-    $default  reduce using rule 81 (instr_list)
-
-    instr        go to state 148
-    plain_instr  go to state 149
-    block_instr  go to state 150
-    expr         go to state 151
-    instr_list   go to state 379
-
-
-State 365
-
-   70 expr: "(" . expr1 ")"
-   77 if_: expr "(" . THEN instr_list ")" "(" ELSE instr_list ")"
-   78    | expr "(" . THEN instr_list ")"
-
-    NOP             shift, and go to state 120
-    DROP            shift, and go to state 121
-    BLOCK           shift, and go to state 171
-    IF              shift, and go to state 172
-    THEN            shift, and go to state 380
-    LOOP            shift, and go to state 173
-    BR              shift, and go to state 125
-    BR_IF           shift, and go to state 126
-    BR_TABLE        shift, and go to state 127
-    CALL            shift, and go to state 128
-    CALL_INDIRECT   shift, and go to state 129
-    RETURN          shift, and go to state 130
-    GET_LOCAL       shift, and go to state 131
-    SET_LOCAL       shift, and go to state 132
-    TEE_LOCAL       shift, and go to state 133
-    GET_GLOBAL      shift, and go to state 134
-    SET_GLOBAL      shift, and go to state 135
-    LOAD            shift, and go to state 136
-    STORE           shift, and go to state 137
-    CONST           shift, and go to state 138
-    UNARY           shift, and go to state 139
-    BINARY          shift, and go to state 140
-    COMPARE         shift, and go to state 141
-    CONVERT         shift, and go to state 142
-    SELECT          shift, and go to state 143
-    UNREACHABLE     shift, and go to state 144
-    CURRENT_MEMORY  shift, and go to state 145
-    GROW_MEMORY     shift, and go to state 146
-
-    plain_instr  go to state 175
-    expr1        go to state 176
-
-
-State 366
-
-   79 if_: expr expr . expr
-   80    | expr expr .
-
-    "("  shift, and go to state 216
-
-    $default  reduce using rule 80 (if_)
-
-    expr  go to state 381
-
-
-State 367
-
-  108 memory: "(" MEMORY bind_var_opt "(" DATA text_list ")" ")" .
-
-    $default  reduce using rule 108 (memory)
-
-
-State 368
-
-  107 memory: "(" MEMORY bind_var_opt inline_export "(" DATA text_list ")" . ")"
-
-    ")"  shift, and go to state 382
-
-
-State 369
-
-  112 import_kind: "(" FUNC bind_var_opt func_sig . ")"
-
-    ")"  shift, and go to state 383
-
-
-State 370
-
-  111 import_kind: "(" FUNC bind_var_opt type_use . ")"
-
-    ")"  shift, and go to state 384
-
-
-State 371
-
-  115 import_kind: "(" GLOBAL bind_var_opt global_type . ")"
-
-    ")"  shift, and go to state 385
-
-
-State 372
-
-  113 import_kind: "(" TABLE bind_var_opt table_sig . ")"
-
-    ")"  shift, and go to state 386
-
-
-State 373
-
-  114 import_kind: "(" MEMORY bind_var_opt memory_sig . ")"
-
-    ")"  shift, and go to state 387
-
-
-State 374
-
-   89 func_fields: "(" PARAM bind_var VALUE_TYPE ")" func_fields .
-
-    $default  reduce using rule 89 (func_fields)
-
-
-State 375
-
-   92 func_body: "(" LOCAL bind_var VALUE_TYPE ")" func_body .
-
-    $default  reduce using rule 92 (func_body)
-
-
-State 376
-
-   68 block_instr: IF labeling_opt block ELSE labeling_opt instr_list . END labeling_opt
-
-    END  shift, and go to state 388
-
-
-State 377
-
-   14 func_sig: "(" PARAM value_type_list ")" "(" . RESULT value_type_list ")"
-
-    RESULT  shift, and go to state 389
-
-
-State 378
-
-  103 table: "(" TABLE bind_var_opt inline_export_opt elem_type "(" ELEM var_list ")" . ")"
-
-    ")"  shift, and go to state 390
-
-
-State 379
-
-   75 if_: "(" THEN instr_list . ")" "(" ELSE instr_list ")"
-   76    | "(" THEN instr_list . ")"
-
-    ")"  shift, and go to state 391
-
-
-State 380
-
-   77 if_: expr "(" THEN . instr_list ")" "(" ELSE instr_list ")"
-   78    | expr "(" THEN . instr_list ")"
-
-    "("             shift, and go to state 216
-    NOP             shift, and go to state 120
-    DROP            shift, and go to state 121
-    BLOCK           shift, and go to state 122
-    IF              shift, and go to state 123
-    LOOP            shift, and go to state 124
-    BR              shift, and go to state 125
-    BR_IF           shift, and go to state 126
-    BR_TABLE        shift, and go to state 127
-    CALL            shift, and go to state 128
-    CALL_INDIRECT   shift, and go to state 129
-    RETURN          shift, and go to state 130
-    GET_LOCAL       shift, and go to state 131
-    SET_LOCAL       shift, and go to state 132
-    TEE_LOCAL       shift, and go to state 133
-    GET_GLOBAL      shift, and go to state 134
-    SET_GLOBAL      shift, and go to state 135
-    LOAD            shift, and go to state 136
-    STORE           shift, and go to state 137
-    CONST           shift, and go to state 138
-    UNARY           shift, and go to state 139
-    BINARY          shift, and go to state 140
-    COMPARE         shift, and go to state 141
-    CONVERT         shift, and go to state 142
-    SELECT          shift, and go to state 143
-    UNREACHABLE     shift, and go to state 144
-    CURRENT_MEMORY  shift, and go to state 145
-    GROW_MEMORY     shift, and go to state 146
-
-    $default  reduce using rule 81 (instr_list)
-
-    instr        go to state 148
-    plain_instr  go to state 149
-    block_instr  go to state 150
-    expr         go to state 151
-    instr_list   go to state 392
-
-
-State 381
-
-   79 if_: expr expr expr .
-
-    $default  reduce using rule 79 (if_)
-
-
-State 382
-
-  107 memory: "(" MEMORY bind_var_opt inline_export "(" DATA text_list ")" ")" .
-
-    $default  reduce using rule 107 (memory)
-
-
-State 383
-
-  112 import_kind: "(" FUNC bind_var_opt func_sig ")" .
-
-    $default  reduce using rule 112 (import_kind)
-
-
-State 384
-
-  111 import_kind: "(" FUNC bind_var_opt type_use ")" .
-
-    $default  reduce using rule 111 (import_kind)
-
-
-State 385
-
-  115 import_kind: "(" GLOBAL bind_var_opt global_type ")" .
-
-    $default  reduce using rule 115 (import_kind)
-
-
-State 386
-
-  113 import_kind: "(" TABLE bind_var_opt table_sig ")" .
-
-    $default  reduce using rule 113 (import_kind)
-
-
-State 387
-
-  114 import_kind: "(" MEMORY bind_var_opt memory_sig ")" .
-
-    $default  reduce using rule 114 (import_kind)
-
-
-State 388
-
-   68 block_instr: IF labeling_opt block ELSE labeling_opt instr_list END . labeling_opt
-
-    VAR  shift, and go to state 23
-
-    $default  reduce using rule 32 (labeling_opt)
-
-    bind_var      go to state 196
-    labeling_opt  go to state 393
-
-
-State 389
-
-   14 func_sig: "(" PARAM value_type_list ")" "(" RESULT . value_type_list ")"
-
-    $default  reduce using rule 6 (value_type_list)
-
-    value_type_list  go to state 394
-
-
-State 390
-
-  103 table: "(" TABLE bind_var_opt inline_export_opt elem_type "(" ELEM var_list ")" ")" .
-
-    $default  reduce using rule 103 (table)
-
-
-State 391
-
-   75 if_: "(" THEN instr_list ")" . "(" ELSE instr_list ")"
-   76    | "(" THEN instr_list ")" .
-
-    "("  shift, and go to state 395
-
-    $default  reduce using rule 76 (if_)
-
-
-State 392
-
-   77 if_: expr "(" THEN instr_list . ")" "(" ELSE instr_list ")"
-   78    | expr "(" THEN instr_list . ")"
-
-    ")"  shift, and go to state 396
-
-
-State 393
-
-   68 block_instr: IF labeling_opt block ELSE labeling_opt instr_list END labeling_opt .
-
-    $default  reduce using rule 68 (block_instr)
-
-
-State 394
-
-    7 value_type_list: value_type_list . VALUE_TYPE
-   14 func_sig: "(" PARAM value_type_list ")" "(" RESULT value_type_list . ")"
-
-    ")"         shift, and go to state 397
-    VALUE_TYPE  shift, and go to state 319
-
-
-State 395
-
-   75 if_: "(" THEN instr_list ")" "(" . ELSE instr_list ")"
-
-    ELSE  shift, and go to state 398
-
-
-State 396
-
-   77 if_: expr "(" THEN instr_list ")" . "(" ELSE instr_list ")"
-   78    | expr "(" THEN instr_list ")" .
-
-    "("  shift, and go to state 399
-
-    $default  reduce using rule 78 (if_)
-
-
-State 397
-
-   14 func_sig: "(" PARAM value_type_list ")" "(" RESULT value_type_list ")" .
-
-    $default  reduce using rule 14 (func_sig)
-
-
-State 398
-
-   75 if_: "(" THEN instr_list ")" "(" ELSE . instr_list ")"
-
-    "("             shift, and go to state 216
-    NOP             shift, and go to state 120
-    DROP            shift, and go to state 121
-    BLOCK           shift, and go to state 122
-    IF              shift, and go to state 123
-    LOOP            shift, and go to state 124
-    BR              shift, and go to state 125
-    BR_IF           shift, and go to state 126
-    BR_TABLE        shift, and go to state 127
-    CALL            shift, and go to state 128
-    CALL_INDIRECT   shift, and go to state 129
-    RETURN          shift, and go to state 130
-    GET_LOCAL       shift, and go to state 131
-    SET_LOCAL       shift, and go to state 132
-    TEE_LOCAL       shift, and go to state 133
-    GET_GLOBAL      shift, and go to state 134
-    SET_GLOBAL      shift, and go to state 135
-    LOAD            shift, and go to state 136
-    STORE           shift, and go to state 137
-    CONST           shift, and go to state 138
-    UNARY           shift, and go to state 139
-    BINARY          shift, and go to state 140
-    COMPARE         shift, and go to state 141
-    CONVERT         shift, and go to state 142
-    SELECT          shift, and go to state 143
-    UNREACHABLE     shift, and go to state 144
-    CURRENT_MEMORY  shift, and go to state 145
-    GROW_MEMORY     shift, and go to state 146
-
-    $default  reduce using rule 81 (instr_list)
-
-    instr        go to state 148
-    plain_instr  go to state 149
-    block_instr  go to state 150
-    expr         go to state 151
-    instr_list   go to state 400
-
-
-State 399
-
-   77 if_: expr "(" THEN instr_list ")" "(" . ELSE instr_list ")"
-
-    ELSE  shift, and go to state 401
-
-
-State 400
-
-   75 if_: "(" THEN instr_list ")" "(" ELSE instr_list . ")"
-
-    ")"  shift, and go to state 402
-
-
-State 401
-
-   77 if_: expr "(" THEN instr_list ")" "(" ELSE . instr_list ")"
-
-    "("             shift, and go to state 216
-    NOP             shift, and go to state 120
-    DROP            shift, and go to state 121
-    BLOCK           shift, and go to state 122
-    IF              shift, and go to state 123
-    LOOP            shift, and go to state 124
-    BR              shift, and go to state 125
-    BR_IF           shift, and go to state 126
-    BR_TABLE        shift, and go to state 127
-    CALL            shift, and go to state 128
-    CALL_INDIRECT   shift, and go to state 129
-    RETURN          shift, and go to state 130
-    GET_LOCAL       shift, and go to state 131
-    SET_LOCAL       shift, and go to state 132
-    TEE_LOCAL       shift, and go to state 133
-    GET_GLOBAL      shift, and go to state 134
-    SET_GLOBAL      shift, and go to state 135
-    LOAD            shift, and go to state 136
-    STORE           shift, and go to state 137
-    CONST           shift, and go to state 138
-    UNARY           shift, and go to state 139
-    BINARY          shift, and go to state 140
-    COMPARE         shift, and go to state 141
-    CONVERT         shift, and go to state 142
-    SELECT          shift, and go to state 143
-    UNREACHABLE     shift, and go to state 144
-    CURRENT_MEMORY  shift, and go to state 145
-    GROW_MEMORY     shift, and go to state 146
-
-    $default  reduce using rule 81 (instr_list)
-
-    instr        go to state 148
-    plain_instr  go to state 149
-    block_instr  go to state 150
-    expr         go to state 151
-    instr_list   go to state 403
-
-
-State 402
-
-   75 if_: "(" THEN instr_list ")" "(" ELSE instr_list ")" .
-
-    $default  reduce using rule 75 (if_)
-
-
-State 403
-
-   77 if_: expr "(" THEN instr_list ")" "(" ELSE instr_list . ")"
-
-    ")"  shift, and go to state 404
-
-
-State 404
-
-   77 if_: expr "(" THEN instr_list ")" "(" ELSE instr_list ")" .
-
-    $default  reduce using rule 77 (if_)
diff --git a/lib/wabt/src/prebuilt/wast-lexer-gen.cc b/lib/wabt/src/prebuilt/wast-lexer-gen.cc
new file mode 100644
index 0000000..042011e
--- /dev/null
+++ b/lib/wabt/src/prebuilt/wast-lexer-gen.cc
@@ -0,0 +1,6559 @@
+/* Generated by re2c 0.16 */
+#line 1 "src/wast-lexer.cc"
+/*
+ * Copyright 2016 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "wast-lexer.h"
+
+#include <cassert>
+#include <cstdio>
+
+#include "config.h"
+
+#include "lexer-source.h"
+#include "wast-parser.h"
+#include "wast-parser-lexer-shared.h"
+
+/* must be included after so some typedefs will be defined */
+#include "wast-parser-gen.hh"
+
+#define YYMAXFILL 29
+
+#define INITIAL_LEXER_BUFFER_SIZE (64 * 1024)
+
+#define YY_USER_ACTION                  \
+  {                                     \
+    loc->filename = filename_;          \
+    loc->line = line_;                  \
+    loc->first_column = COLUMN(token_); \
+    loc->last_column = COLUMN(cursor_); \
+  }
+
+#define RETURN(name) \
+  YY_USER_ACTION;    \
+  return WABT_TOKEN_TYPE_##name
+
+#define ERROR(...) \
+  YY_USER_ACTION;  \
+  wast_parser_error(loc, this, parser, __VA_ARGS__)
+
+#define BEGIN(c) cond = (c)
+#define FILL(n)                                \
+  do {                                         \
+    if (WABT_FAILED(Fill(loc, parser, (n)))) { \
+      RETURN(EOF);                             \
+    }                                          \
+  } while (0)
+
+#define MAYBE_MALFORMED_UTF8(desc)                \
+  if (!(eof_ && limit_ - cursor_ <= YYMAXFILL)) { \
+    ERROR("malformed utf-8%s", desc);             \
+  }                                               \
+  continue
+
+#define yytext (token_)
+#define yyleng (cursor_ - token_)
+
+/* p must be a pointer somewhere in the lexer buffer */
+#define FILE_OFFSET(p) ((p) - (buffer_) + buffer_file_offset_)
+#define COLUMN(p) (FILE_OFFSET(p) - line_file_offset_ + 1)
+
+#define COMMENT_NESTING (comment_nesting_)
+#define NEWLINE                               \
+  do {                                        \
+    line_++;                                  \
+    line_file_offset_ = FILE_OFFSET(cursor_); \
+  } while (0)
+
+#define TEXT                 \
+  lval->text.start = yytext; \
+  lval->text.length = yyleng
+
+#define TEXT_AT(offset)               \
+  lval->text.start = yytext + offset; \
+  lval->text.length = yyleng - offset
+
+#define TYPE(type_) lval->type = Type::type_
+
+#define OPCODE(name) lval->opcode = Opcode::name
+
+#define LITERAL(type_)                     \
+  lval->literal.type = LiteralType::type_; \
+  lval->literal.text.start = yytext;       \
+  lval->literal.text.length = yyleng
+
+namespace wabt {
+
+WastLexer::WastLexer(std::unique_ptr<LexerSource> source, const char* filename)
+    : source_(std::move(source)),
+      line_finder_(source_->Clone()),
+      filename_(filename),
+      line_(1),
+      comment_nesting_(0),
+      buffer_file_offset_(0),
+      line_file_offset_(0),
+      eof_(false),
+      buffer_(nullptr),
+      buffer_size_(0),
+      marker_(nullptr),
+      token_(nullptr),
+      cursor_(nullptr),
+      limit_(nullptr) {}
+
+WastLexer::~WastLexer() {
+  delete[] buffer_;
+}
+
+// static
+std::unique_ptr<WastLexer> WastLexer::CreateFileLexer(const char* filename) {
+  std::unique_ptr<LexerSource> source(new LexerSourceFile(filename));
+  return std::unique_ptr<WastLexer>(new WastLexer(std::move(source), filename));
+}
+
+// static
+std::unique_ptr<WastLexer> WastLexer::CreateBufferLexer(const char* filename,
+                                                        const void* data,
+                                                        size_t size) {
+  std::unique_ptr<LexerSource> source(new LexerSourceBuffer(data, size));
+  return std::unique_ptr<WastLexer>(new WastLexer(std::move(source), filename));
+}
+
+Result WastLexer::Fill(Location* loc, WastParser* parser, size_t need) {
+  if (eof_)
+    return Result::Error;
+  size_t free = token_ - buffer_;
+  assert(static_cast<size_t>(cursor_ - buffer_) >= free);
+  // Our buffer is too small, need to realloc.
+  if (free < need) {
+    char* old_buffer = buffer_;
+    size_t old_buffer_size = buffer_size_;
+    size_t new_buffer_size =
+        old_buffer_size ? old_buffer_size * 2 : INITIAL_LEXER_BUFFER_SIZE;
+    // Make sure there is enough space for the bytes requested (need) and an
+    // additional YYMAXFILL bytes which is needed for the re2c lexer
+    // implementation when the eof is reached.
+    while ((new_buffer_size - old_buffer_size) + free < need + YYMAXFILL)
+      new_buffer_size *= 2;
+
+    char* new_buffer = new char[new_buffer_size];
+    if (limit_ > token_)
+      memmove(new_buffer, token_, limit_ - token_);
+    buffer_ = new_buffer;
+    buffer_size_ = new_buffer_size;
+    token_ = new_buffer + (token_ - old_buffer) - free;
+    marker_ = new_buffer + (marker_ - old_buffer) - free;
+    cursor_ = new_buffer + (cursor_ - old_buffer) - free;
+    limit_ = new_buffer + (limit_ - old_buffer) - free;
+    buffer_file_offset_ += free;
+    free += new_buffer_size - old_buffer_size;
+    delete[] old_buffer;
+  } else {
+    // Shift everything down to make more room in the buffer.
+    if (limit_ > token_)
+      memmove(buffer_, token_, limit_ - token_);
+    token_ -= free;
+    marker_ -= free;
+    cursor_ -= free;
+    limit_ -= free;
+    buffer_file_offset_ += free;
+  }
+  // Read the new data into the buffer.
+  limit_ += source_->Fill(limit_, free);
+
+  // If at the end of file, need to fill YYMAXFILL more characters with "fake
+  // characters", that are not a lexeme nor a lexeme suffix. see
+  // http://re2c.org/examples/example_03.html.
+  if (limit_ < buffer_ + buffer_size_ - YYMAXFILL) {
+    eof_ = true;
+    // Fill with 0xff, since that is an invalid utf-8 byte.
+    memset(limit_, 0xff, YYMAXFILL);
+    limit_ += YYMAXFILL;
+  }
+  return Result::Ok;
+}
+
+int WastLexer::GetToken(Token* lval, Location* loc, WastParser* parser) {
+  enum {
+    YYCOND_INIT,
+    YYCOND_BAD_TEXT,
+    YYCOND_LINE_COMMENT,
+    YYCOND_BLOCK_COMMENT,
+    YYCOND_i = YYCOND_INIT,
+  } cond = YYCOND_INIT;
+
+  for (;;) {
+    token_ = cursor_;
+    
+#line 201 "src/prebuilt/wast-lexer-gen.cc"
+{
+	unsigned char yych;
+	unsigned int yyaccept = 0;
+	if (cond < 2) {
+		if (cond < 1) {
+			goto YYCOND_i;
+		} else {
+			goto YYCOND_BAD_TEXT;
+		}
+	} else {
+		if (cond < 3) {
+			goto YYCOND_LINE_COMMENT;
+		} else {
+			goto YYCOND_BLOCK_COMMENT;
+		}
+	}
+/* *********************************** */
+YYCOND_BAD_TEXT:
+	if ((limit_ - cursor_) < 5) FILL(5);
+	yych = *cursor_;
+	if (yych <= 0x7F) {
+		if (yych <= '!') {
+			if (yych == '\n') goto yy5;
+			if (yych >= ' ') goto yy7;
+		} else {
+			if (yych <= '"') goto yy9;
+			if (yych == '\\') goto yy11;
+			goto yy7;
+		}
+	} else {
+		if (yych <= 0xEF) {
+			if (yych <= 0xC1) goto yy12;
+			if (yych <= 0xDF) goto yy14;
+			if (yych <= 0xE0) goto yy15;
+			goto yy16;
+		} else {
+			if (yych <= 0xF0) goto yy17;
+			if (yych <= 0xF3) goto yy18;
+			if (yych <= 0xF4) goto yy19;
+			goto yy12;
+		}
+	}
+	++cursor_;
+yy4:
+#line 251 "src/wast-lexer.cc"
+	{ ERROR("illegal character in string");
+                                  continue; }
+#line 249 "src/prebuilt/wast-lexer-gen.cc"
+yy5:
+	++cursor_;
+	BEGIN(YYCOND_i);
+#line 244 "src/wast-lexer.cc"
+	{ ERROR("newline in string");
+                                  NEWLINE;
+                                  continue; }
+#line 257 "src/prebuilt/wast-lexer-gen.cc"
+yy7:
+	++cursor_;
+#line 243 "src/wast-lexer.cc"
+	{ continue; }
+#line 262 "src/prebuilt/wast-lexer-gen.cc"
+yy9:
+	++cursor_;
+	BEGIN(YYCOND_i);
+#line 250 "src/wast-lexer.cc"
+	{ TEXT; RETURN(TEXT); }
+#line 268 "src/prebuilt/wast-lexer-gen.cc"
+yy11:
+	yyaccept = 0;
+	yych = *(marker_ = ++cursor_);
+	if (yych <= 'f') {
+		if (yych <= '/') {
+			if (yych <= '!') {
+				if (yych == '\n') goto yy4;
+				goto yy20;
+			} else {
+				if (yych <= '"') goto yy7;
+				if (yych == '\'') goto yy7;
+				goto yy20;
+			}
+		} else {
+			if (yych <= 'F') {
+				if (yych <= '9') goto yy22;
+				if (yych <= '@') goto yy20;
+				goto yy22;
+			} else {
+				if (yych == '\\') goto yy7;
+				if (yych <= '`') goto yy20;
+				goto yy22;
+			}
+		}
+	} else {
+		if (yych <= 0x7F) {
+			if (yych <= 'q') {
+				if (yych == 'n') goto yy7;
+				goto yy20;
+			} else {
+				if (yych == 's') goto yy20;
+				if (yych <= 't') goto yy7;
+				goto yy20;
+			}
+		} else {
+			if (yych <= 0xEF) {
+				if (yych <= 0xC1) goto yy4;
+				if (yych <= 0xDF) goto yy23;
+				if (yych <= 0xE0) goto yy25;
+				goto yy26;
+			} else {
+				if (yych <= 0xF0) goto yy27;
+				if (yych <= 0xF3) goto yy28;
+				if (yych <= 0xF4) goto yy29;
+				goto yy4;
+			}
+		}
+	}
+yy12:
+	++cursor_;
+yy13:
+#line 253 "src/wast-lexer.cc"
+	{ MAYBE_MALFORMED_UTF8(" in string"); }
+#line 322 "src/prebuilt/wast-lexer-gen.cc"
+yy14:
+	yych = *++cursor_;
+	if (yych <= 0x7F) goto yy13;
+	if (yych <= 0xBF) goto yy7;
+	goto yy13;
+yy15:
+	yyaccept = 1;
+	yych = *(marker_ = ++cursor_);
+	if (yych <= 0x9F) goto yy13;
+	if (yych <= 0xBF) goto yy30;
+	goto yy13;
+yy16:
+	yyaccept = 1;
+	yych = *(marker_ = ++cursor_);
+	if (yych <= 0x7F) goto yy13;
+	if (yych <= 0xBF) goto yy30;
+	goto yy13;
+yy17:
+	yyaccept = 1;
+	yych = *(marker_ = ++cursor_);
+	if (yych <= 0x8F) goto yy13;
+	if (yych <= 0xBF) goto yy31;
+	goto yy13;
+yy18:
+	yyaccept = 1;
+	yych = *(marker_ = ++cursor_);
+	if (yych <= 0x7F) goto yy13;
+	if (yych <= 0xBF) goto yy31;
+	goto yy13;
+yy19:
+	yyaccept = 1;
+	yych = *(marker_ = ++cursor_);
+	if (yych <= 0x7F) goto yy13;
+	if (yych <= 0x8F) goto yy31;
+	goto yy13;
+yy20:
+	++cursor_;
+yy21:
+#line 247 "src/wast-lexer.cc"
+	{ ERROR("bad escape \"%.*s\"",
+                                        static_cast<int>(yyleng), yytext);
+                                  continue; }
+#line 365 "src/prebuilt/wast-lexer-gen.cc"
+yy22:
+	yych = *++cursor_;
+	if (yych <= '@') {
+		if (yych <= '/') goto yy21;
+		if (yych <= '9') goto yy7;
+		goto yy21;
+	} else {
+		if (yych <= 'F') goto yy7;
+		if (yych <= '`') goto yy21;
+		if (yych <= 'f') goto yy7;
+		goto yy21;
+	}
+yy23:
+	yych = *++cursor_;
+	if (yych <= 0x7F) goto yy24;
+	if (yych <= 0xBF) goto yy20;
+yy24:
+	cursor_ = marker_;
+	if (yyaccept == 0) {
+		goto yy4;
+	} else {
+		goto yy13;
+	}
+yy25:
+	yych = *++cursor_;
+	if (yych <= 0x9F) goto yy24;
+	if (yych <= 0xBF) goto yy23;
+	goto yy24;
+yy26:
+	yych = *++cursor_;
+	if (yych <= 0x7F) goto yy24;
+	if (yych <= 0xBF) goto yy23;
+	goto yy24;
+yy27:
+	yych = *++cursor_;
+	if (yych <= 0x8F) goto yy24;
+	if (yych <= 0xBF) goto yy26;
+	goto yy24;
+yy28:
+	yych = *++cursor_;
+	if (yych <= 0x7F) goto yy24;
+	if (yych <= 0xBF) goto yy26;
+	goto yy24;
+yy29:
+	yych = *++cursor_;
+	if (yych <= 0x7F) goto yy24;
+	if (yych <= 0x8F) goto yy26;
+	goto yy24;
+yy30:
+	yych = *++cursor_;
+	if (yych <= 0x7F) goto yy24;
+	if (yych <= 0xBF) goto yy7;
+	goto yy24;
+yy31:
+	++cursor_;
+	if ((yych = *cursor_) <= 0x7F) goto yy24;
+	if (yych <= 0xBF) goto yy30;
+	goto yy24;
+/* *********************************** */
+YYCOND_BLOCK_COMMENT:
+	if ((limit_ - cursor_) < 4) FILL(4);
+	yych = *cursor_;
+	if (yych <= 0x7F) {
+		if (yych <= '\'') {
+			if (yych == '\n') goto yy36;
+		} else {
+			if (yych <= '(') goto yy38;
+			if (yych == ';') goto yy39;
+		}
+	} else {
+		if (yych <= 0xEF) {
+			if (yych <= 0xC1) goto yy40;
+			if (yych <= 0xDF) goto yy42;
+			if (yych <= 0xE0) goto yy43;
+			goto yy44;
+		} else {
+			if (yych <= 0xF0) goto yy45;
+			if (yych <= 0xF3) goto yy46;
+			if (yych <= 0xF4) goto yy47;
+			goto yy40;
+		}
+	}
+yy34:
+	++cursor_;
+yy35:
+#line 482 "src/wast-lexer.cc"
+	{ continue; }
+#line 453 "src/prebuilt/wast-lexer-gen.cc"
+yy36:
+	++cursor_;
+#line 481 "src/wast-lexer.cc"
+	{ NEWLINE; continue; }
+#line 458 "src/prebuilt/wast-lexer-gen.cc"
+yy38:
+	yych = *++cursor_;
+	if (yych == ';') goto yy48;
+	goto yy35;
+yy39:
+	yych = *++cursor_;
+	if (yych == ')') goto yy50;
+	goto yy35;
+yy40:
+	++cursor_;
+yy41:
+#line 483 "src/wast-lexer.cc"
+	{ MAYBE_MALFORMED_UTF8(" in block comment"); }
+#line 472 "src/prebuilt/wast-lexer-gen.cc"
+yy42:
+	yych = *++cursor_;
+	if (yych <= 0x7F) goto yy41;
+	if (yych <= 0xBF) goto yy34;
+	goto yy41;
+yy43:
+	yych = *(marker_ = ++cursor_);
+	if (yych <= 0x9F) goto yy41;
+	if (yych <= 0xBF) goto yy52;
+	goto yy41;
+yy44:
+	yych = *(marker_ = ++cursor_);
+	if (yych <= 0x7F) goto yy41;
+	if (yych <= 0xBF) goto yy52;
+	goto yy41;
+yy45:
+	yych = *(marker_ = ++cursor_);
+	if (yych <= 0x8F) goto yy41;
+	if (yych <= 0xBF) goto yy54;
+	goto yy41;
+yy46:
+	yych = *(marker_ = ++cursor_);
+	if (yych <= 0x7F) goto yy41;
+	if (yych <= 0xBF) goto yy54;
+	goto yy41;
+yy47:
+	yych = *(marker_ = ++cursor_);
+	if (yych <= 0x7F) goto yy41;
+	if (yych <= 0x8F) goto yy54;
+	goto yy41;
+yy48:
+	++cursor_;
+#line 477 "src/wast-lexer.cc"
+	{ COMMENT_NESTING++; continue; }
+#line 507 "src/prebuilt/wast-lexer-gen.cc"
+yy50:
+	++cursor_;
+#line 478 "src/wast-lexer.cc"
+	{ if (--COMMENT_NESTING == 0)
+                                    BEGIN(YYCOND_INIT);
+                                  continue; }
+#line 514 "src/prebuilt/wast-lexer-gen.cc"
+yy52:
+	yych = *++cursor_;
+	if (yych <= 0x7F) goto yy53;
+	if (yych <= 0xBF) goto yy34;
+yy53:
+	cursor_ = marker_;
+	goto yy41;
+yy54:
+	++cursor_;
+	if ((yych = *cursor_) <= 0x7F) goto yy53;
+	if (yych <= 0xBF) goto yy52;
+	goto yy53;
+/* *********************************** */
+YYCOND_LINE_COMMENT:
+	{
+		static const unsigned char yybm[] = {
+			128, 128, 128, 128, 128, 128, 128, 128, 
+			128, 128,   0, 128, 128, 128, 128, 128, 
+			128, 128, 128, 128, 128, 128, 128, 128, 
+			128, 128, 128, 128, 128, 128, 128, 128, 
+			128, 128, 128, 128, 128, 128, 128, 128, 
+			128, 128, 128, 128, 128, 128, 128, 128, 
+			128, 128, 128, 128, 128, 128, 128, 128, 
+			128, 128, 128, 128, 128, 128, 128, 128, 
+			128, 128, 128, 128, 128, 128, 128, 128, 
+			128, 128, 128, 128, 128, 128, 128, 128, 
+			128, 128, 128, 128, 128, 128, 128, 128, 
+			128, 128, 128, 128, 128, 128, 128, 128, 
+			128, 128, 128, 128, 128, 128, 128, 128, 
+			128, 128, 128, 128, 128, 128, 128, 128, 
+			128, 128, 128, 128, 128, 128, 128, 128, 
+			128, 128, 128, 128, 128, 128, 128, 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,   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, 
+			  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,   0,   0,   0,   0, 
+			  0,   0,   0,   0,   0,   0,   0,   0, 
+			  0,   0,   0,   0,   0,   0,   0,   0, 
+		};
+		if ((limit_ - cursor_) < 2) FILL(2);
+		yych = *cursor_;
+		if (yybm[0+yych] & 128) {
+			goto yy58;
+		}
+		if (yych <= 0xE0) {
+			if (yych <= '\n') goto yy60;
+			if (yych <= 0xC1) goto yy62;
+			if (yych <= 0xDF) goto yy64;
+			goto yy65;
+		} else {
+			if (yych <= 0xF0) {
+				if (yych <= 0xEF) goto yy66;
+				goto yy67;
+			} else {
+				if (yych <= 0xF3) goto yy68;
+				if (yych <= 0xF4) goto yy69;
+				goto yy62;
+			}
+		}
+yy57:
+#line 475 "src/wast-lexer.cc"
+		{ continue; }
+#line 587 "src/prebuilt/wast-lexer-gen.cc"
+yy58:
+		yyaccept = 0;
+		marker_ = ++cursor_;
+		if (limit_ <= cursor_) FILL(1);
+		yych = *cursor_;
+		if (yybm[0+yych] & 128) {
+			goto yy58;
+		}
+		if (yych <= 0xEF) {
+			if (yych <= 0xC1) goto yy57;
+			if (yych <= 0xDF) goto yy70;
+			if (yych <= 0xE0) goto yy72;
+			goto yy73;
+		} else {
+			if (yych <= 0xF0) goto yy74;
+			if (yych <= 0xF3) goto yy75;
+			if (yych <= 0xF4) goto yy76;
+			goto yy57;
+		}
+yy60:
+		++cursor_;
+		BEGIN(YYCOND_i);
+#line 474 "src/wast-lexer.cc"
+		{ NEWLINE; continue; }
+#line 612 "src/prebuilt/wast-lexer-gen.cc"
+yy62:
+		++cursor_;
+yy63:
+#line 490 "src/wast-lexer.cc"
+		{ MAYBE_MALFORMED_UTF8(""); }
+#line 618 "src/prebuilt/wast-lexer-gen.cc"
+yy64:
+		yych = *++cursor_;
+		if (yych <= 0x7F) goto yy63;
+		if (yych <= 0xBF) goto yy58;
+		goto yy63;
+yy65:
+		yyaccept = 1;
+		yych = *(marker_ = ++cursor_);
+		if (yych <= 0x9F) goto yy63;
+		if (yych <= 0xBF) goto yy70;
+		goto yy63;
+yy66:
+		yyaccept = 1;
+		yych = *(marker_ = ++cursor_);
+		if (yych <= 0x7F) goto yy63;
+		if (yych <= 0xBF) goto yy70;
+		goto yy63;
+yy67:
+		yyaccept = 1;
+		yych = *(marker_ = ++cursor_);
+		if (yych <= 0x8F) goto yy63;
+		if (yych <= 0xBF) goto yy73;
+		goto yy63;
+yy68:
+		yyaccept = 1;
+		yych = *(marker_ = ++cursor_);
+		if (yych <= 0x7F) goto yy63;
+		if (yych <= 0xBF) goto yy73;
+		goto yy63;
+yy69:
+		yyaccept = 1;
+		yych = *(marker_ = ++cursor_);
+		if (yych <= 0x7F) goto yy63;
+		if (yych <= 0x8F) goto yy73;
+		goto yy63;
+yy70:
+		++cursor_;
+		if (limit_ <= cursor_) FILL(1);
+		yych = *cursor_;
+		if (yych <= 0x7F) goto yy71;
+		if (yych <= 0xBF) goto yy58;
+yy71:
+		cursor_ = marker_;
+		if (yyaccept == 0) {
+			goto yy57;
+		} else {
+			goto yy63;
+		}
+yy72:
+		++cursor_;
+		if (limit_ <= cursor_) FILL(1);
+		yych = *cursor_;
+		if (yych <= 0x9F) goto yy71;
+		if (yych <= 0xBF) goto yy70;
+		goto yy71;
+yy73:
+		++cursor_;
+		if (limit_ <= cursor_) FILL(1);
+		yych = *cursor_;
+		if (yych <= 0x7F) goto yy71;
+		if (yych <= 0xBF) goto yy70;
+		goto yy71;
+yy74:
+		++cursor_;
+		if (limit_ <= cursor_) FILL(1);
+		yych = *cursor_;
+		if (yych <= 0x8F) goto yy71;
+		if (yych <= 0xBF) goto yy73;
+		goto yy71;
+yy75:
+		++cursor_;
+		if (limit_ <= cursor_) FILL(1);
+		yych = *cursor_;
+		if (yych <= 0x7F) goto yy71;
+		if (yych <= 0xBF) goto yy73;
+		goto yy71;
+yy76:
+		++cursor_;
+		if (limit_ <= cursor_) FILL(1);
+		yych = *cursor_;
+		if (yych <= 0x7F) goto yy71;
+		if (yych <= 0x8F) goto yy73;
+		goto yy71;
+	}
+/* *********************************** */
+YYCOND_i:
+	{
+		static const unsigned char yybm[] = {
+			  0,   0,   0,   0,   0,   0,   0,   0, 
+			  0,   4,   0,   0,   0,   4,   0,   0, 
+			  0,   0,   0,   0,   0,   0,   0,   0, 
+			  0,   0,   0,   0,   0,   0,   0,   0, 
+			 36, 104,   0, 104, 104, 104, 104, 104, 
+			 32,  32, 104, 104,  40, 104, 104, 104, 
+			248, 248, 248, 248, 248, 248, 248, 248, 
+			248, 248, 104,  32, 104, 104, 104, 104, 
+			104, 232, 232, 232, 232, 232, 232, 104, 
+			104, 104, 104, 104, 104, 104, 104, 104, 
+			104, 104, 104, 104, 104, 104, 104, 104, 
+			104, 104, 104,  40,  72,  40, 104, 104, 
+			104, 232, 232, 232, 232, 232, 232, 104, 
+			104, 104, 104, 104, 104, 104, 104, 104, 
+			104, 104, 104, 104, 104, 104, 104, 104, 
+			104, 104, 104,  40, 104,  40, 104,  32, 
+			  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,   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, 
+			  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,   0,   0,   0,   0, 
+			  0,   0,   0,   0,   0,   0,   0,   0, 
+			  0,   0,   0,   0,   0,   0,   0,   0, 
+		};
+		if ((limit_ - cursor_) < 29) FILL(29);
+		yych = *cursor_;
+		if (yybm[0+yych] & 4) {
+			goto yy81;
+		}
+		if (yych <= 'e') {
+			if (yych <= '+') {
+				if (yych <= '#') {
+					if (yych <= 0x1F) {
+						if (yych <= 0x08) goto yy79;
+						if (yych <= '\n') goto yy84;
+					} else {
+						if (yych == '"') goto yy89;
+						goto yy86;
+					}
+				} else {
+					if (yych <= '(') {
+						if (yych <= '$') goto yy91;
+						if (yych <= '\'') goto yy86;
+						goto yy92;
+					} else {
+						if (yych <= ')') goto yy94;
+						if (yych <= '*') goto yy86;
+						goto yy96;
+					}
+				}
+			} else {
+				if (yych <= ':') {
+					if (yych <= '/') {
+						if (yych == '-') goto yy96;
+						goto yy86;
+					} else {
+						if (yych <= '0') goto yy97;
+						if (yych <= '9') goto yy99;
+						goto yy86;
+					}
+				} else {
+					if (yych <= 'a') {
+						if (yych <= ';') goto yy101;
+						if (yych <= '`') goto yy86;
+						goto yy102;
+					} else {
+						if (yych <= 'b') goto yy103;
+						if (yych <= 'c') goto yy104;
+						if (yych <= 'd') goto yy105;
+						goto yy106;
+					}
+				}
+			}
+		} else {
+			if (yych <= 'r') {
+				if (yych <= 'l') {
+					if (yych <= 'h') {
+						if (yych <= 'f') goto yy107;
+						if (yych <= 'g') goto yy108;
+						goto yy86;
+					} else {
+						if (yych <= 'i') goto yy109;
+						if (yych <= 'k') goto yy86;
+						goto yy110;
+					}
+				} else {
+					if (yych <= 'o') {
+						if (yych <= 'm') goto yy111;
+						if (yych <= 'n') goto yy112;
+						goto yy113;
+					} else {
+						if (yych <= 'p') goto yy114;
+						if (yych <= 'q') goto yy115;
+						goto yy116;
+					}
+				}
+			} else {
+				if (yych <= 0xC1) {
+					if (yych <= 'u') {
+						if (yych <= 's') goto yy117;
+						if (yych <= 't') goto yy118;
+						goto yy119;
+					} else {
+						if (yych <= '~') goto yy86;
+						if (yych >= 0x80) goto yy120;
+					}
+				} else {
+					if (yych <= 0xEF) {
+						if (yych <= 0xDF) goto yy122;
+						if (yych <= 0xE0) goto yy123;
+						goto yy124;
+					} else {
+						if (yych <= 0xF0) goto yy125;
+						if (yych <= 0xF3) goto yy126;
+						if (yych <= 0xF4) goto yy127;
+						goto yy120;
+					}
+				}
+			}
+		}
+yy79:
+		++cursor_;
+yy80:
+#line 489 "src/wast-lexer.cc"
+		{ ERROR("unexpected char"); continue; }
+#line 841 "src/prebuilt/wast-lexer-gen.cc"
+yy81:
+		++cursor_;
+		if (limit_ <= cursor_) FILL(1);
+		yych = *cursor_;
+		if (yybm[0+yych] & 4) {
+			goto yy81;
+		}
+#line 485 "src/wast-lexer.cc"
+		{ continue; }
+#line 851 "src/prebuilt/wast-lexer-gen.cc"
+yy84:
+		++cursor_;
+#line 484 "src/wast-lexer.cc"
+		{ NEWLINE; continue; }
+#line 856 "src/prebuilt/wast-lexer-gen.cc"
+yy86:
+		++cursor_;
+		if (limit_ <= cursor_) FILL(1);
+		yych = *cursor_;
+yy87:
+		if (yybm[0+yych] & 8) {
+			goto yy86;
+		}
+yy88:
+#line 486 "src/wast-lexer.cc"
+		{ ERROR("unexpected token \"%.*s\"",
+                                        static_cast<int>(yyleng), yytext);
+                                  continue; }
+#line 870 "src/prebuilt/wast-lexer-gen.cc"
+yy89:
+		yyaccept = 0;
+		yych = *(marker_ = ++cursor_);
+		if (yych <= 0x1F) goto yy90;
+		if (yych <= 0x7F) goto yy129;
+		if (yych <= 0xC1) goto yy90;
+		if (yych <= 0xF4) goto yy129;
+yy90:
+		BEGIN(YYCOND_BAD_TEXT);
+#line 242 "src/wast-lexer.cc"
+		{ continue; }
+#line 882 "src/prebuilt/wast-lexer-gen.cc"
+yy91:
+		yych = *++cursor_;
+		if (yych <= '\'') {
+			if (yych == '!') goto yy141;
+			if (yych <= '"') goto yy88;
+			goto yy141;
+		} else {
+			if (yych <= ':') {
+				if (yych <= ')') goto yy88;
+				goto yy141;
+			} else {
+				if (yych <= ';') goto yy88;
+				if (yych <= '~') goto yy141;
+				goto yy88;
+			}
+		}
+yy92:
+		++cursor_;
+		if ((yych = *cursor_) == ';') goto yy143;
+#line 233 "src/wast-lexer.cc"
+		{ RETURN(LPAR); }
+#line 904 "src/prebuilt/wast-lexer-gen.cc"
+yy94:
+		++cursor_;
+#line 234 "src/wast-lexer.cc"
+		{ RETURN(RPAR); }
+#line 909 "src/prebuilt/wast-lexer-gen.cc"
+yy96:
+		yych = *++cursor_;
+		if (yych <= 'h') {
+			if (yych <= '/') goto yy87;
+			if (yych <= '0') goto yy145;
+			if (yych <= '9') goto yy147;
+			goto yy87;
+		} else {
+			if (yych <= 'i') goto yy149;
+			if (yych == 'n') goto yy150;
+			goto yy87;
+		}
+yy97:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 16) {
+			goto yy99;
+		}
+		if (yych <= ':') {
+			if (yych <= '\'') {
+				if (yych == '!') goto yy86;
+				if (yych >= '#') goto yy86;
+			} else {
+				if (yych <= ')') goto yy98;
+				if (yych == '.') goto yy151;
+				goto yy86;
+			}
+		} else {
+			if (yych <= 'd') {
+				if (yych <= ';') goto yy98;
+				if (yych == 'E') goto yy154;
+				goto yy86;
+			} else {
+				if (yych <= 'w') {
+					if (yych <= 'e') goto yy154;
+					goto yy86;
+				} else {
+					if (yych <= 'x') goto yy155;
+					if (yych <= '~') goto yy86;
+				}
+			}
+		}
+yy98:
+#line 235 "src/wast-lexer.cc"
+		{ LITERAL(Int); RETURN(NAT); }
+#line 954 "src/prebuilt/wast-lexer-gen.cc"
+yy99:
+		++cursor_;
+		if ((limit_ - cursor_) < 3) FILL(3);
+		yych = *cursor_;
+		if (yybm[0+yych] & 16) {
+			goto yy99;
+		}
+		if (yych <= '.') {
+			if (yych <= '"') {
+				if (yych == '!') goto yy86;
+				goto yy98;
+			} else {
+				if (yych <= '\'') goto yy86;
+				if (yych <= ')') goto yy98;
+				if (yych <= '-') goto yy86;
+				goto yy151;
+			}
+		} else {
+			if (yych <= 'E') {
+				if (yych == ';') goto yy98;
+				if (yych <= 'D') goto yy86;
+				goto yy154;
+			} else {
+				if (yych == 'e') goto yy154;
+				if (yych <= '~') goto yy86;
+				goto yy98;
+			}
+		}
+yy101:
+		yych = *++cursor_;
+		if (yych == ';') goto yy156;
+		goto yy80;
+yy102:
+		yych = *++cursor_;
+		if (yych <= 'm') {
+			if (yych == 'l') goto yy158;
+			goto yy87;
+		} else {
+			if (yych <= 'n') goto yy159;
+			if (yych == 's') goto yy160;
+			goto yy87;
+		}
+yy103:
+		yych = *++cursor_;
+		if (yych <= 'k') {
+			if (yych == 'i') goto yy161;
+			goto yy87;
+		} else {
+			if (yych <= 'l') goto yy162;
+			if (yych == 'r') goto yy163;
+			goto yy87;
+		}
+yy104:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy165;
+		if (yych == 'u') goto yy166;
+		goto yy87;
+yy105:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy167;
+		if (yych == 'r') goto yy168;
+		goto yy87;
+yy106:
+		yych = *++cursor_;
+		if (yych <= 'm') {
+			if (yych == 'l') goto yy169;
+			goto yy87;
+		} else {
+			if (yych <= 'n') goto yy170;
+			if (yych == 'x') goto yy171;
+			goto yy87;
+		}
+yy107:
+		yych = *++cursor_;
+		if (yych <= '5') {
+			if (yych == '3') goto yy172;
+			goto yy87;
+		} else {
+			if (yych <= '6') goto yy173;
+			if (yych == 'u') goto yy174;
+			goto yy87;
+		}
+yy108:
+		yych = *++cursor_;
+		if (yych <= 'k') {
+			if (yych == 'e') goto yy175;
+			goto yy87;
+		} else {
+			if (yych <= 'l') goto yy176;
+			if (yych == 'r') goto yy177;
+			goto yy87;
+		}
+yy109:
+		yych = *++cursor_;
+		if (yych <= 'e') {
+			if (yych <= '3') {
+				if (yych <= '2') goto yy87;
+				goto yy178;
+			} else {
+				if (yych == '6') goto yy179;
+				goto yy87;
+			}
+		} else {
+			if (yych <= 'l') {
+				if (yych <= 'f') goto yy180;
+				goto yy87;
+			} else {
+				if (yych <= 'm') goto yy182;
+				if (yych <= 'n') goto yy183;
+				goto yy87;
+			}
+		}
+yy110:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy184;
+		goto yy87;
+yy111:
+		yych = *++cursor_;
+		if (yych <= 'n') {
+			if (yych == 'e') goto yy185;
+			goto yy87;
+		} else {
+			if (yych <= 'o') goto yy186;
+			if (yych == 'u') goto yy187;
+			goto yy87;
+		}
+yy112:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy188;
+		if (yych == 'o') goto yy189;
+		goto yy87;
+yy113:
+		yych = *++cursor_;
+		if (yych == 'f') goto yy190;
+		goto yy87;
+yy114:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy191;
+		goto yy87;
+yy115:
+		yych = *++cursor_;
+		if (yych == 'u') goto yy192;
+		goto yy87;
+yy116:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy193;
+		goto yy87;
+yy117:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy194;
+		if (yych == 't') goto yy195;
+		goto yy87;
+yy118:
+		yych = *++cursor_;
+		switch (yych) {
+		case 'a':	goto yy196;
+		case 'e':	goto yy197;
+		case 'h':	goto yy198;
+		case 'r':	goto yy199;
+		case 'y':	goto yy200;
+		default:	goto yy87;
+		}
+yy119:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy201;
+		goto yy87;
+yy120:
+		++cursor_;
+yy121:
+#line 490 "src/wast-lexer.cc"
+		{ MAYBE_MALFORMED_UTF8(""); }
+#line 1126 "src/prebuilt/wast-lexer-gen.cc"
+yy122:
+		yych = *++cursor_;
+		if (yych <= 0x7F) goto yy121;
+		if (yych <= 0xBF) goto yy79;
+		goto yy121;
+yy123:
+		yyaccept = 1;
+		yych = *(marker_ = ++cursor_);
+		if (yych <= 0x9F) goto yy121;
+		if (yych <= 0xBF) goto yy202;
+		goto yy121;
+yy124:
+		yyaccept = 1;
+		yych = *(marker_ = ++cursor_);
+		if (yych <= 0x7F) goto yy121;
+		if (yych <= 0xBF) goto yy202;
+		goto yy121;
+yy125:
+		yyaccept = 1;
+		yych = *(marker_ = ++cursor_);
+		if (yych <= 0x8F) goto yy121;
+		if (yych <= 0xBF) goto yy203;
+		goto yy121;
+yy126:
+		yyaccept = 1;
+		yych = *(marker_ = ++cursor_);
+		if (yych <= 0x7F) goto yy121;
+		if (yych <= 0xBF) goto yy203;
+		goto yy121;
+yy127:
+		yyaccept = 1;
+		yych = *(marker_ = ++cursor_);
+		if (yych <= 0x7F) goto yy121;
+		if (yych <= 0x8F) goto yy203;
+		goto yy121;
+yy128:
+		++cursor_;
+		if (limit_ <= cursor_) FILL(1);
+		yych = *cursor_;
+yy129:
+		if (yybm[0+yych] & 32) {
+			goto yy128;
+		}
+		if (yych <= 0xDF) {
+			if (yych <= '"') {
+				if (yych >= ' ') goto yy131;
+			} else {
+				if (yych <= '\\') goto yy133;
+				if (yych >= 0xC2) goto yy134;
+			}
+		} else {
+			if (yych <= 0xF0) {
+				if (yych <= 0xE0) goto yy135;
+				if (yych <= 0xEF) goto yy136;
+				goto yy137;
+			} else {
+				if (yych <= 0xF3) goto yy138;
+				if (yych <= 0xF4) goto yy139;
+			}
+		}
+yy130:
+		cursor_ = marker_;
+		if (yyaccept == 0) {
+			goto yy90;
+		} else {
+			goto yy121;
+		}
+yy131:
+		++cursor_;
+#line 241 "src/wast-lexer.cc"
+		{ TEXT; RETURN(TEXT); }
+#line 1198 "src/prebuilt/wast-lexer-gen.cc"
+yy133:
+		++cursor_;
+		if (limit_ <= cursor_) FILL(1);
+		yych = *cursor_;
+		if (yych <= '[') {
+			if (yych <= '\'') {
+				if (yych == '"') goto yy128;
+				if (yych <= '&') goto yy130;
+				goto yy128;
+			} else {
+				if (yych <= '9') {
+					if (yych <= '/') goto yy130;
+					goto yy204;
+				} else {
+					if (yych <= '@') goto yy130;
+					if (yych <= 'F') goto yy204;
+					goto yy130;
+				}
+			}
+		} else {
+			if (yych <= 'n') {
+				if (yych <= '`') {
+					if (yych <= '\\') goto yy128;
+					goto yy130;
+				} else {
+					if (yych <= 'f') goto yy204;
+					if (yych <= 'm') goto yy130;
+					goto yy128;
+				}
+			} else {
+				if (yych <= 'r') {
+					if (yych <= 'q') goto yy130;
+					goto yy128;
+				} else {
+					if (yych == 't') goto yy128;
+					goto yy130;
+				}
+			}
+		}
+yy134:
+		++cursor_;
+		if (limit_ <= cursor_) FILL(1);
+		yych = *cursor_;
+		if (yych <= 0x7F) goto yy130;
+		if (yych <= 0xBF) goto yy128;
+		goto yy130;
+yy135:
+		++cursor_;
+		if (limit_ <= cursor_) FILL(1);
+		yych = *cursor_;
+		if (yych <= 0x9F) goto yy130;
+		if (yych <= 0xBF) goto yy134;
+		goto yy130;
+yy136:
+		++cursor_;
+		if (limit_ <= cursor_) FILL(1);
+		yych = *cursor_;
+		if (yych <= 0x7F) goto yy130;
+		if (yych <= 0xBF) goto yy134;
+		goto yy130;
+yy137:
+		++cursor_;
+		if (limit_ <= cursor_) FILL(1);
+		yych = *cursor_;
+		if (yych <= 0x8F) goto yy130;
+		if (yych <= 0xBF) goto yy136;
+		goto yy130;
+yy138:
+		++cursor_;
+		if (limit_ <= cursor_) FILL(1);
+		yych = *cursor_;
+		if (yych <= 0x7F) goto yy130;
+		if (yych <= 0xBF) goto yy136;
+		goto yy130;
+yy139:
+		++cursor_;
+		if (limit_ <= cursor_) FILL(1);
+		yych = *cursor_;
+		if (yych <= 0x7F) goto yy130;
+		if (yych <= 0x8F) goto yy136;
+		goto yy130;
+yy140:
+		++cursor_;
+		if (limit_ <= cursor_) FILL(1);
+		yych = *cursor_;
+yy141:
+		if (yybm[0+yych] & 64) {
+			goto yy140;
+		}
+		if (yych <= ')') goto yy142;
+		if (yych <= ',') goto yy86;
+		if (yych <= ';') goto yy142;
+		if (yych <= '}') goto yy86;
+yy142:
+#line 471 "src/wast-lexer.cc"
+		{ TEXT; RETURN(VAR); }
+#line 1295 "src/prebuilt/wast-lexer-gen.cc"
+yy143:
+		++cursor_;
+		BEGIN(YYCOND_BLOCK_COMMENT);
+#line 476 "src/wast-lexer.cc"
+		{ COMMENT_NESTING = 1; continue; }
+#line 1301 "src/prebuilt/wast-lexer-gen.cc"
+yy145:
+		++cursor_;
+		if ((yych = *cursor_) <= '9') {
+			if (yych <= '\'') {
+				if (yych == '!') goto yy86;
+				if (yych >= '#') goto yy86;
+			} else {
+				if (yych <= '-') {
+					if (yych >= '*') goto yy86;
+				} else {
+					if (yych <= '.') goto yy151;
+					if (yych <= '/') goto yy86;
+					goto yy147;
+				}
+			}
+		} else {
+			if (yych <= 'd') {
+				if (yych <= ';') {
+					if (yych <= ':') goto yy86;
+				} else {
+					if (yych == 'E') goto yy154;
+					goto yy86;
+				}
+			} else {
+				if (yych <= 'w') {
+					if (yych <= 'e') goto yy154;
+					goto yy86;
+				} else {
+					if (yych <= 'x') goto yy205;
+					if (yych <= '~') goto yy86;
+				}
+			}
+		}
+yy146:
+#line 236 "src/wast-lexer.cc"
+		{ LITERAL(Int); RETURN(INT); }
+#line 1338 "src/prebuilt/wast-lexer-gen.cc"
+yy147:
+		++cursor_;
+		if ((limit_ - cursor_) < 3) FILL(3);
+		yych = *cursor_;
+		if (yych <= '/') {
+			if (yych <= '\'') {
+				if (yych == '!') goto yy86;
+				if (yych <= '"') goto yy146;
+				goto yy86;
+			} else {
+				if (yych <= ')') goto yy146;
+				if (yych == '.') goto yy151;
+				goto yy86;
+			}
+		} else {
+			if (yych <= 'D') {
+				if (yych <= '9') goto yy147;
+				if (yych == ';') goto yy146;
+				goto yy86;
+			} else {
+				if (yych <= 'd') {
+					if (yych <= 'E') goto yy154;
+					goto yy86;
+				} else {
+					if (yych <= 'e') goto yy154;
+					if (yych <= '~') goto yy86;
+					goto yy146;
+				}
+			}
+		}
+yy149:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy206;
+		goto yy87;
+yy150:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy188;
+		goto yy87;
+yy151:
+		++cursor_;
+		if ((limit_ - cursor_) < 3) FILL(3);
+		yych = *cursor_;
+		if (yych <= '9') {
+			if (yych <= '"') {
+				if (yych == '!') goto yy86;
+			} else {
+				if (yych <= '\'') goto yy86;
+				if (yych <= ')') goto yy153;
+				if (yych <= '/') goto yy86;
+				goto yy151;
+			}
+		} else {
+			if (yych <= 'E') {
+				if (yych == ';') goto yy153;
+				if (yych <= 'D') goto yy86;
+				goto yy154;
+			} else {
+				if (yych == 'e') goto yy154;
+				if (yych <= '~') goto yy86;
+			}
+		}
+yy153:
+#line 237 "src/wast-lexer.cc"
+		{ LITERAL(Float); RETURN(FLOAT); }
+#line 1403 "src/prebuilt/wast-lexer-gen.cc"
+yy154:
+		yych = *++cursor_;
+		if (yych <= ',') {
+			if (yych == '+') goto yy207;
+			goto yy87;
+		} else {
+			if (yych <= '-') goto yy207;
+			if (yych <= '/') goto yy87;
+			if (yych <= '9') goto yy208;
+			goto yy87;
+		}
+yy155:
+		yych = *++cursor_;
+		if (yybm[0+yych] & 128) {
+			goto yy210;
+		}
+		goto yy87;
+yy156:
+		++cursor_;
+		BEGIN(YYCOND_LINE_COMMENT);
+#line 473 "src/wast-lexer.cc"
+		{ continue; }
+#line 1426 "src/prebuilt/wast-lexer-gen.cc"
+yy158:
+		yych = *++cursor_;
+		if (yych == 'i') goto yy212;
+		goto yy87;
+yy159:
+		yych = *++cursor_;
+		if (yych == 'y') goto yy213;
+		goto yy87;
+yy160:
+		yych = *++cursor_;
+		if (yych == 's') goto yy214;
+		goto yy87;
+yy161:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy215;
+		goto yy87;
+yy162:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy216;
+		goto yy87;
+yy163:
+		++cursor_;
+		if ((yych = *cursor_) <= ')') {
+			if (yych <= '!') {
+				if (yych >= '!') goto yy86;
+			} else {
+				if (yych <= '"') goto yy164;
+				if (yych <= '\'') goto yy86;
+			}
+		} else {
+			if (yych <= '^') {
+				if (yych != ';') goto yy86;
+			} else {
+				if (yych <= '_') goto yy217;
+				if (yych <= '~') goto yy86;
+			}
+		}
+yy164:
+#line 266 "src/wast-lexer.cc"
+		{ RETURN(BR); }
+#line 1467 "src/prebuilt/wast-lexer-gen.cc"
+yy165:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy218;
+		if (yych == 't') goto yy219;
+		goto yy87;
+yy166:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy220;
+		goto yy87;
+yy167:
+		yych = *++cursor_;
+		if (yych == 't') goto yy221;
+		goto yy87;
+yy168:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy222;
+		goto yy87;
+yy169:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy223;
+		if (yych == 's') goto yy224;
+		goto yy87;
+yy170:
+		yych = *++cursor_;
+		if (yych == 'd') goto yy225;
+		goto yy87;
+yy171:
+		yych = *++cursor_;
+		if (yych == 'c') goto yy227;
+		if (yych == 'p') goto yy228;
+		goto yy87;
+yy172:
+		yych = *++cursor_;
+		if (yych == '2') goto yy229;
+		goto yy87;
+yy173:
+		yych = *++cursor_;
+		if (yych == '4') goto yy231;
+		goto yy87;
+yy174:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy233;
+		goto yy87;
+yy175:
+		yych = *++cursor_;
+		if (yych == 't') goto yy234;
+		goto yy87;
+yy176:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy236;
+		goto yy87;
+yy177:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy237;
+		goto yy87;
+yy178:
+		yych = *++cursor_;
+		if (yych == '2') goto yy238;
+		goto yy87;
+yy179:
+		yych = *++cursor_;
+		if (yych == '4') goto yy240;
+		goto yy87;
+yy180:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 262 "src/wast-lexer.cc"
+		{ RETURN(IF); }
+#line 1538 "src/prebuilt/wast-lexer-gen.cc"
+yy182:
+		yych = *++cursor_;
+		if (yych == 'p') goto yy242;
+		goto yy87;
+yy183:
+		yych = *++cursor_;
+		if (yych == 'f') goto yy243;
+		if (yych == 'v') goto yy245;
+		goto yy87;
+yy184:
+		yych = *++cursor_;
+		if (yych == 'c') goto yy246;
+		if (yych == 'o') goto yy247;
+		goto yy87;
+yy185:
+		yych = *++cursor_;
+		if (yych == 'm') goto yy248;
+		goto yy87;
+yy186:
+		yych = *++cursor_;
+		if (yych == 'd') goto yy249;
+		goto yy87;
+yy187:
+		yych = *++cursor_;
+		if (yych == 't') goto yy250;
+		goto yy87;
+yy188:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy252;
+		goto yy87;
+yy189:
+		yych = *++cursor_;
+		if (yych == 'p') goto yy254;
+		goto yy87;
+yy190:
+		yych = *++cursor_;
+		if (yych == 'f') goto yy256;
+		goto yy87;
+yy191:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy257;
+		goto yy87;
+yy192:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy258;
+		goto yy87;
+yy193:
+		yych = *++cursor_;
+		if (yych <= 'r') {
+			if (yych == 'g') goto yy259;
+			goto yy87;
+		} else {
+			if (yych <= 's') goto yy260;
+			if (yych <= 't') goto yy261;
+			goto yy87;
+		}
+yy194:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy262;
+		if (yych == 't') goto yy263;
+		goto yy87;
+yy195:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy264;
+		goto yy87;
+yy196:
+		yych = *++cursor_;
+		if (yych == 'b') goto yy265;
+		goto yy87;
+yy197:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy266;
+		goto yy87;
+yy198:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy267;
+		if (yych == 'r') goto yy268;
+		goto yy87;
+yy199:
+		yych = *++cursor_;
+		if (yych == 'y') goto yy269;
+		goto yy87;
+yy200:
+		yych = *++cursor_;
+		if (yych == 'p') goto yy271;
+		goto yy87;
+yy201:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy272;
+		goto yy87;
+yy202:
+		yych = *++cursor_;
+		if (yych <= 0x7F) goto yy130;
+		if (yych <= 0xBF) goto yy79;
+		goto yy130;
+yy203:
+		yych = *++cursor_;
+		if (yych <= 0x7F) goto yy130;
+		if (yych <= 0xBF) goto yy202;
+		goto yy130;
+yy204:
+		++cursor_;
+		if (limit_ <= cursor_) FILL(1);
+		yych = *cursor_;
+		if (yych <= '@') {
+			if (yych <= '/') goto yy130;
+			if (yych <= '9') goto yy128;
+			goto yy130;
+		} else {
+			if (yych <= 'F') goto yy128;
+			if (yych <= '`') goto yy130;
+			if (yych <= 'f') goto yy128;
+			goto yy130;
+		}
+yy205:
+		yych = *++cursor_;
+		if (yych <= '@') {
+			if (yych <= '/') goto yy87;
+			if (yych <= '9') goto yy273;
+			goto yy87;
+		} else {
+			if (yych <= 'F') goto yy273;
+			if (yych <= '`') goto yy87;
+			if (yych <= 'f') goto yy273;
+			goto yy87;
+		}
+yy206:
+		yych = *++cursor_;
+		if (yych == 'f') goto yy243;
+		goto yy87;
+yy207:
+		yych = *++cursor_;
+		if (yych <= '/') goto yy87;
+		if (yych >= ':') goto yy87;
+yy208:
+		++cursor_;
+		if (limit_ <= cursor_) FILL(1);
+		yych = *cursor_;
+		if (yych <= ')') {
+			if (yych <= '!') {
+				if (yych <= ' ') goto yy153;
+				goto yy86;
+			} else {
+				if (yych <= '"') goto yy153;
+				if (yych <= '\'') goto yy86;
+				goto yy153;
+			}
+		} else {
+			if (yych <= ':') {
+				if (yych <= '/') goto yy86;
+				if (yych <= '9') goto yy208;
+				goto yy86;
+			} else {
+				if (yych <= ';') goto yy153;
+				if (yych <= '~') goto yy86;
+				goto yy153;
+			}
+		}
+yy210:
+		++cursor_;
+		if ((limit_ - cursor_) < 3) FILL(3);
+		yych = *cursor_;
+		if (yybm[0+yych] & 128) {
+			goto yy210;
+		}
+		if (yych <= '-') {
+			if (yych <= '"') {
+				if (yych == '!') goto yy86;
+				goto yy98;
+			} else {
+				if (yych <= '\'') goto yy86;
+				if (yych <= ')') goto yy98;
+				goto yy86;
+			}
+		} else {
+			if (yych <= ';') {
+				if (yych <= '.') goto yy275;
+				if (yych <= ':') goto yy86;
+				goto yy98;
+			} else {
+				if (yych == 'p') goto yy277;
+				if (yych <= '~') goto yy86;
+				goto yy98;
+			}
+		}
+yy212:
+		yych = *++cursor_;
+		if (yych == 'g') goto yy278;
+		goto yy87;
+yy213:
+		yych = *++cursor_;
+		if (yych == 'f') goto yy279;
+		goto yy87;
+yy214:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy280;
+		goto yy87;
+yy215:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy281;
+		goto yy87;
+yy216:
+		yych = *++cursor_;
+		if (yych == 'c') goto yy282;
+		goto yy87;
+yy217:
+		yych = *++cursor_;
+		if (yych == 'i') goto yy283;
+		if (yych == 't') goto yy284;
+		goto yy87;
+yy218:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy285;
+		goto yy87;
+yy219:
+		yych = *++cursor_;
+		if (yych == 'c') goto yy287;
+		goto yy87;
+yy220:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy288;
+		goto yy87;
+yy221:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy289;
+		goto yy87;
+yy222:
+		yych = *++cursor_;
+		if (yych == 'p') goto yy291;
+		goto yy87;
+yy223:
+		yych = *++cursor_;
+		if (yych == 'm') goto yy293;
+		goto yy87;
+yy224:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy295;
+		goto yy87;
+yy225:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 272 "src/wast-lexer.cc"
+		{ RETURN(END); }
+#line 1784 "src/prebuilt/wast-lexer-gen.cc"
+yy227:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy297;
+		goto yy87;
+yy228:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy298;
+		goto yy87;
+yy229:
+		++cursor_;
+		if ((yych = *cursor_) <= ')') {
+			if (yych <= '!') {
+				if (yych >= '!') goto yy86;
+			} else {
+				if (yych <= '"') goto yy230;
+				if (yych <= '\'') goto yy86;
+			}
+		} else {
+			if (yych <= ':') {
+				if (yych == '.') goto yy299;
+				goto yy86;
+			} else {
+				if (yych <= ';') goto yy230;
+				if (yych <= '~') goto yy86;
+			}
+		}
+yy230:
+#line 256 "src/wast-lexer.cc"
+		{ TYPE(F32); RETURN(VALUE_TYPE); }
+#line 1814 "src/prebuilt/wast-lexer-gen.cc"
+yy231:
+		++cursor_;
+		if ((yych = *cursor_) <= ')') {
+			if (yych <= '!') {
+				if (yych >= '!') goto yy86;
+			} else {
+				if (yych <= '"') goto yy232;
+				if (yych <= '\'') goto yy86;
+			}
+		} else {
+			if (yych <= ':') {
+				if (yych == '.') goto yy300;
+				goto yy86;
+			} else {
+				if (yych <= ';') goto yy232;
+				if (yych <= '~') goto yy86;
+			}
+		}
+yy232:
+#line 257 "src/wast-lexer.cc"
+		{ TYPE(F64); RETURN(VALUE_TYPE); }
+#line 1836 "src/prebuilt/wast-lexer-gen.cc"
+yy233:
+		yych = *++cursor_;
+		if (yych == 'c') goto yy301;
+		goto yy87;
+yy234:
+		++cursor_;
+		if ((yych = *cursor_) <= ')') {
+			if (yych <= '!') {
+				if (yych >= '!') goto yy86;
+			} else {
+				if (yych <= '"') goto yy235;
+				if (yych <= '\'') goto yy86;
+			}
+		} else {
+			if (yych <= '^') {
+				if (yych != ';') goto yy86;
+			} else {
+				if (yych <= '_') goto yy303;
+				if (yych <= '~') goto yy86;
+			}
+		}
+yy235:
+#line 455 "src/wast-lexer.cc"
+		{ RETURN(GET); }
+#line 1861 "src/prebuilt/wast-lexer-gen.cc"
+yy236:
+		yych = *++cursor_;
+		if (yych == 'b') goto yy304;
+		goto yy87;
+yy237:
+		yych = *++cursor_;
+		if (yych == 'w') goto yy305;
+		goto yy87;
+yy238:
+		++cursor_;
+		if ((yych = *cursor_) <= ')') {
+			if (yych <= '!') {
+				if (yych >= '!') goto yy86;
+			} else {
+				if (yych <= '"') goto yy239;
+				if (yych <= '\'') goto yy86;
+			}
+		} else {
+			if (yych <= ':') {
+				if (yych == '.') goto yy306;
+				goto yy86;
+			} else {
+				if (yych <= ';') goto yy239;
+				if (yych <= '~') goto yy86;
+			}
+		}
+yy239:
+#line 254 "src/wast-lexer.cc"
+		{ TYPE(I32); RETURN(VALUE_TYPE); }
+#line 1891 "src/prebuilt/wast-lexer-gen.cc"
+yy240:
+		++cursor_;
+		if ((yych = *cursor_) <= ')') {
+			if (yych <= '!') {
+				if (yych >= '!') goto yy86;
+			} else {
+				if (yych <= '"') goto yy241;
+				if (yych <= '\'') goto yy86;
+			}
+		} else {
+			if (yych <= ':') {
+				if (yych == '.') goto yy307;
+				goto yy86;
+			} else {
+				if (yych <= ';') goto yy241;
+				if (yych <= '~') goto yy86;
+			}
+		}
+yy241:
+#line 255 "src/wast-lexer.cc"
+		{ TYPE(I64); RETURN(VALUE_TYPE); }
+#line 1913 "src/prebuilt/wast-lexer-gen.cc"
+yy242:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy308;
+		goto yy87;
+yy243:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 239 "src/wast-lexer.cc"
+		{ LITERAL(Infinity); RETURN(FLOAT); }
+#line 1925 "src/prebuilt/wast-lexer-gen.cc"
+yy245:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy309;
+		goto yy87;
+yy246:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy310;
+		goto yy87;
+yy247:
+		yych = *++cursor_;
+		if (yych == 'p') goto yy311;
+		goto yy87;
+yy248:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy313;
+		goto yy87;
+yy249:
+		yych = *++cursor_;
+		if (yych == 'u') goto yy314;
+		goto yy87;
+yy250:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 259 "src/wast-lexer.cc"
+		{ RETURN(MUT); }
+#line 1953 "src/prebuilt/wast-lexer-gen.cc"
+yy252:
+		++cursor_;
+		if ((yych = *cursor_) <= ')') {
+			if (yych <= '!') {
+				if (yych >= '!') goto yy86;
+			} else {
+				if (yych <= '"') goto yy253;
+				if (yych <= '\'') goto yy86;
+			}
+		} else {
+			if (yych <= ':') {
+				if (yych <= '9') goto yy86;
+				goto yy315;
+			} else {
+				if (yych <= ';') goto yy253;
+				if (yych <= '~') goto yy86;
+			}
+		}
+yy253:
+#line 240 "src/wast-lexer.cc"
+		{ LITERAL(Nan); RETURN(FLOAT); }
+#line 1975 "src/prebuilt/wast-lexer-gen.cc"
+yy254:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 260 "src/wast-lexer.cc"
+		{ RETURN(NOP); }
+#line 1983 "src/prebuilt/wast-lexer-gen.cc"
+yy256:
+		yych = *++cursor_;
+		if (yych == 's') goto yy316;
+		goto yy87;
+yy257:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy317;
+		goto yy87;
+yy258:
+		yych = *++cursor_;
+		if (yych == 't') goto yy318;
+		goto yy87;
+yy259:
+		yych = *++cursor_;
+		if (yych == 'i') goto yy319;
+		goto yy87;
+yy260:
+		yych = *++cursor_;
+		if (yych == 'u') goto yy320;
+		goto yy87;
+yy261:
+		yych = *++cursor_;
+		if (yych == 'h') goto yy321;
+		if (yych == 'u') goto yy322;
+		goto yy87;
+yy262:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy323;
+		goto yy87;
+yy263:
+		yych = *++cursor_;
+		if (yych == '_') goto yy324;
+		goto yy87;
+yy264:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy325;
+		goto yy87;
+yy265:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy326;
+		goto yy87;
+yy266:
+		yych = *++cursor_;
+		if (yych == '_') goto yy327;
+		goto yy87;
+yy267:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy328;
+		goto yy87;
+yy268:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy330;
+		goto yy87;
+yy269:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 466 "src/wast-lexer.cc"
+		{ RETURN(TRY); }
+#line 2044 "src/prebuilt/wast-lexer-gen.cc"
+yy271:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy331;
+		goto yy87;
+yy272:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy333;
+		goto yy87;
+yy273:
+		++cursor_;
+		if ((limit_ - cursor_) < 3) FILL(3);
+		yych = *cursor_;
+		if (yych <= '9') {
+			if (yych <= '\'') {
+				if (yych == '!') goto yy86;
+				if (yych <= '"') goto yy146;
+				goto yy86;
+			} else {
+				if (yych <= '-') {
+					if (yych <= ')') goto yy146;
+					goto yy86;
+				} else {
+					if (yych <= '.') goto yy275;
+					if (yych <= '/') goto yy86;
+					goto yy273;
+				}
+			}
+		} else {
+			if (yych <= '`') {
+				if (yych <= ';') {
+					if (yych <= ':') goto yy86;
+					goto yy146;
+				} else {
+					if (yych <= '@') goto yy86;
+					if (yych <= 'F') goto yy273;
+					goto yy86;
+				}
+			} else {
+				if (yych <= 'o') {
+					if (yych <= 'f') goto yy273;
+					goto yy86;
+				} else {
+					if (yych <= 'p') goto yy277;
+					if (yych <= '~') goto yy86;
+					goto yy146;
+				}
+			}
+		}
+yy275:
+		++cursor_;
+		if ((limit_ - cursor_) < 3) FILL(3);
+		yych = *cursor_;
+		if (yych <= ':') {
+			if (yych <= '\'') {
+				if (yych == '!') goto yy86;
+				if (yych <= '"') goto yy88;
+				goto yy86;
+			} else {
+				if (yych <= ')') goto yy88;
+				if (yych <= '/') goto yy86;
+				if (yych <= '9') goto yy275;
+				goto yy86;
+			}
+		} else {
+			if (yych <= '`') {
+				if (yych <= ';') goto yy88;
+				if (yych <= '@') goto yy86;
+				if (yych <= 'F') goto yy275;
+				goto yy86;
+			} else {
+				if (yych <= 'o') {
+					if (yych <= 'f') goto yy275;
+					goto yy86;
+				} else {
+					if (yych <= 'p') goto yy277;
+					if (yych <= '~') goto yy86;
+					goto yy88;
+				}
+			}
+		}
+yy277:
+		yych = *++cursor_;
+		if (yych <= ',') {
+			if (yych == '+') goto yy334;
+			goto yy87;
+		} else {
+			if (yych <= '-') goto yy334;
+			if (yych <= '/') goto yy87;
+			if (yych <= '9') goto yy335;
+			goto yy87;
+		}
+yy278:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy338;
+		goto yy87;
+yy279:
+		yych = *++cursor_;
+		if (yych == 'u') goto yy339;
+		goto yy87;
+yy280:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy340;
+		goto yy87;
+yy281:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy341;
+		goto yy87;
+yy282:
+		yych = *++cursor_;
+		if (yych == 'k') goto yy342;
+		goto yy87;
+yy283:
+		yych = *++cursor_;
+		if (yych == 'f') goto yy344;
+		goto yy87;
+yy284:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy346;
+		goto yy87;
+yy285:
+		++cursor_;
+		if ((yych = *cursor_) <= ')') {
+			if (yych <= '!') {
+				if (yych >= '!') goto yy86;
+			} else {
+				if (yych <= '"') goto yy286;
+				if (yych <= '\'') goto yy86;
+			}
+		} else {
+			if (yych <= '^') {
+				if (yych != ';') goto yy86;
+			} else {
+				if (yych <= '_') goto yy347;
+				if (yych <= '~') goto yy86;
+			}
+		}
+yy286:
+#line 269 "src/wast-lexer.cc"
+		{ RETURN(CALL); }
+#line 2184 "src/prebuilt/wast-lexer-gen.cc"
+yy287:
+		yych = *++cursor_;
+		if (yych == 'h') goto yy348;
+		goto yy87;
+yy288:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy350;
+		goto yy87;
+yy289:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 448 "src/wast-lexer.cc"
+		{ RETURN(DATA); }
+#line 2200 "src/prebuilt/wast-lexer-gen.cc"
+yy291:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 271 "src/wast-lexer.cc"
+		{ RETURN(DROP); }
+#line 2208 "src/prebuilt/wast-lexer-gen.cc"
+yy293:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 447 "src/wast-lexer.cc"
+		{ RETURN(ELEM); }
+#line 2216 "src/prebuilt/wast-lexer-gen.cc"
+yy295:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 264 "src/wast-lexer.cc"
+		{ RETURN(ELSE); }
+#line 2224 "src/prebuilt/wast-lexer-gen.cc"
+yy297:
+		yych = *++cursor_;
+		if (yych == 'p') goto yy351;
+		goto yy87;
+yy298:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy352;
+		goto yy87;
+yy299:
+		yych = *++cursor_;
+		switch (yych) {
+		case 'a':	goto yy353;
+		case 'c':	goto yy354;
+		case 'd':	goto yy355;
+		case 'e':	goto yy356;
+		case 'f':	goto yy357;
+		case 'g':	goto yy358;
+		case 'l':	goto yy359;
+		case 'm':	goto yy360;
+		case 'n':	goto yy361;
+		case 'r':	goto yy362;
+		case 's':	goto yy363;
+		case 't':	goto yy364;
+		default:	goto yy87;
+		}
+yy300:
+		yych = *++cursor_;
+		switch (yych) {
+		case 'a':	goto yy365;
+		case 'c':	goto yy366;
+		case 'd':	goto yy367;
+		case 'e':	goto yy368;
+		case 'f':	goto yy369;
+		case 'g':	goto yy370;
+		case 'l':	goto yy371;
+		case 'm':	goto yy372;
+		case 'n':	goto yy373;
+		case 'p':	goto yy374;
+		case 'r':	goto yy375;
+		case 's':	goto yy376;
+		case 't':	goto yy377;
+		default:	goto yy87;
+		}
+yy301:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 436 "src/wast-lexer.cc"
+		{ RETURN(FUNC); }
+#line 2275 "src/prebuilt/wast-lexer-gen.cc"
+yy303:
+		yych = *++cursor_;
+		if (yych == 'g') goto yy378;
+		if (yych == 'l') goto yy379;
+		goto yy87;
+yy304:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy380;
+		goto yy87;
+yy305:
+		yych = *++cursor_;
+		if (yych == '_') goto yy381;
+		goto yy87;
+yy306:
+		yych = *++cursor_;
+		switch (yych) {
+		case 'a':	goto yy382;
+		case 'c':	goto yy383;
+		case 'd':	goto yy384;
+		case 'e':	goto yy385;
+		case 'g':	goto yy386;
+		case 'l':	goto yy387;
+		case 'm':	goto yy388;
+		case 'n':	goto yy389;
+		case 'o':	goto yy390;
+		case 'p':	goto yy391;
+		case 'r':	goto yy392;
+		case 's':	goto yy393;
+		case 't':	goto yy394;
+		case 'w':	goto yy395;
+		case 'x':	goto yy396;
+		default:	goto yy87;
+		}
+yy307:
+		yych = *++cursor_;
+		switch (yych) {
+		case 'a':	goto yy397;
+		case 'c':	goto yy398;
+		case 'd':	goto yy399;
+		case 'e':	goto yy400;
+		case 'g':	goto yy401;
+		case 'l':	goto yy402;
+		case 'm':	goto yy403;
+		case 'n':	goto yy404;
+		case 'o':	goto yy405;
+		case 'p':	goto yy406;
+		case 'r':	goto yy407;
+		case 's':	goto yy408;
+		case 't':	goto yy409;
+		case 'x':	goto yy410;
+		default:	goto yy87;
+		}
+yy308:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy411;
+		goto yy87;
+yy309:
+		yych = *++cursor_;
+		if (yych == 'k') goto yy412;
+		goto yy87;
+yy310:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy413;
+		goto yy87;
+yy311:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 265 "src/wast-lexer.cc"
+		{ RETURN(LOOP); }
+#line 2347 "src/prebuilt/wast-lexer-gen.cc"
+yy313:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy415;
+		goto yy87;
+yy314:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy416;
+		goto yy87;
+yy315:
+		yych = *++cursor_;
+		if (yych == '0') goto yy417;
+		goto yy87;
+yy316:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy418;
+		goto yy87;
+yy317:
+		yych = *++cursor_;
+		if (yych == 'm') goto yy419;
+		goto yy87;
+yy318:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy421;
+		goto yy87;
+yy319:
+		yych = *++cursor_;
+		if (yych == 's') goto yy423;
+		goto yy87;
+yy320:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy424;
+		goto yy87;
+yy321:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy425;
+		goto yy87;
+yy322:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy426;
+		goto yy87;
+yy323:
+		yych = *++cursor_;
+		if (yych == 'c') goto yy427;
+		goto yy87;
+yy324:
+		yych = *++cursor_;
+		if (yych == 'g') goto yy428;
+		if (yych == 'l') goto yy429;
+		goto yy87;
+yy325:
+		yych = *++cursor_;
+		if (yych == 't') goto yy430;
+		goto yy87;
+yy326:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy432;
+		goto yy87;
+yy327:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy434;
+		goto yy87;
+yy328:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 263 "src/wast-lexer.cc"
+		{ RETURN(THEN); }
+#line 2416 "src/prebuilt/wast-lexer-gen.cc"
+yy330:
+		yych = *++cursor_;
+		if (yych == 'w') goto yy435;
+		goto yy87;
+yy331:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 435 "src/wast-lexer.cc"
+		{ RETURN(TYPE); }
+#line 2428 "src/prebuilt/wast-lexer-gen.cc"
+yy333:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy437;
+		goto yy87;
+yy334:
+		yych = *++cursor_;
+		if (yych <= '/') goto yy87;
+		if (yych >= ':') goto yy87;
+yy335:
+		++cursor_;
+		if (limit_ <= cursor_) FILL(1);
+		yych = *cursor_;
+		if (yych <= ')') {
+			if (yych <= '!') {
+				if (yych >= '!') goto yy86;
+			} else {
+				if (yych <= '"') goto yy337;
+				if (yych <= '\'') goto yy86;
+			}
+		} else {
+			if (yych <= ':') {
+				if (yych <= '/') goto yy86;
+				if (yych <= '9') goto yy335;
+				goto yy86;
+			} else {
+				if (yych <= ';') goto yy337;
+				if (yych <= '~') goto yy86;
+			}
+		}
+yy337:
+#line 238 "src/wast-lexer.cc"
+		{ LITERAL(Hexfloat); RETURN(FLOAT); }
+#line 2461 "src/prebuilt/wast-lexer-gen.cc"
+yy338:
+		yych = *++cursor_;
+		if (yych == '=') goto yy438;
+		goto yy87;
+yy339:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy439;
+		goto yy87;
+yy340:
+		yych = *++cursor_;
+		if (yych == 't') goto yy440;
+		goto yy87;
+yy341:
+		yych = *++cursor_;
+		if (yych == 'y') goto yy441;
+		goto yy87;
+yy342:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 261 "src/wast-lexer.cc"
+		{ RETURN(BLOCK); }
+#line 2485 "src/prebuilt/wast-lexer-gen.cc"
+yy344:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 267 "src/wast-lexer.cc"
+		{ RETURN(BR_IF); }
+#line 2493 "src/prebuilt/wast-lexer-gen.cc"
+yy346:
+		yych = *++cursor_;
+		if (yych == 'b') goto yy443;
+		goto yy87;
+yy347:
+		yych = *++cursor_;
+		if (yych == 'i') goto yy444;
+		goto yy87;
+yy348:
+		++cursor_;
+		if ((yych = *cursor_) <= ')') {
+			if (yych <= '!') {
+				if (yych >= '!') goto yy86;
+			} else {
+				if (yych <= '"') goto yy349;
+				if (yych <= '\'') goto yy86;
+			}
+		} else {
+			if (yych <= '^') {
+				if (yych != ';') goto yy86;
+			} else {
+				if (yych <= '_') goto yy445;
+				if (yych <= '~') goto yy86;
+			}
+		}
+yy349:
+#line 467 "src/wast-lexer.cc"
+		{ RETURN(CATCH); }
+#line 2522 "src/prebuilt/wast-lexer-gen.cc"
+yy350:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy446;
+		goto yy87;
+yy351:
+		yych = *++cursor_;
+		if (yych == 't') goto yy447;
+		goto yy87;
+yy352:
+		yych = *++cursor_;
+		if (yych == 't') goto yy449;
+		goto yy87;
+yy353:
+		yych = *++cursor_;
+		if (yych == 'b') goto yy451;
+		if (yych == 'd') goto yy452;
+		goto yy87;
+yy354:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy453;
+		if (yych == 'o') goto yy454;
+		goto yy87;
+yy355:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy455;
+		if (yych == 'i') goto yy456;
+		goto yy87;
+yy356:
+		yych = *++cursor_;
+		if (yych == 'q') goto yy457;
+		goto yy87;
+yy357:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy459;
+		goto yy87;
+yy358:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy460;
+		if (yych == 't') goto yy462;
+		goto yy87;
+yy359:
+		yych = *++cursor_;
+		if (yych <= 'n') {
+			if (yych == 'e') goto yy464;
+			goto yy87;
+		} else {
+			if (yych <= 'o') goto yy466;
+			if (yych == 't') goto yy467;
+			goto yy87;
+		}
+yy360:
+		yych = *++cursor_;
+		if (yych <= 'h') {
+			if (yych == 'a') goto yy469;
+			goto yy87;
+		} else {
+			if (yych <= 'i') goto yy470;
+			if (yych == 'u') goto yy471;
+			goto yy87;
+		}
+yy361:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy472;
+		goto yy87;
+yy362:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy474;
+		goto yy87;
+yy363:
+		yych = *++cursor_;
+		if (yych <= 's') {
+			if (yych == 'q') goto yy475;
+			goto yy87;
+		} else {
+			if (yych <= 't') goto yy476;
+			if (yych <= 'u') goto yy477;
+			goto yy87;
+		}
+yy364:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy478;
+		goto yy87;
+yy365:
+		yych = *++cursor_;
+		if (yych == 'b') goto yy479;
+		if (yych == 'd') goto yy480;
+		goto yy87;
+yy366:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy481;
+		if (yych == 'o') goto yy482;
+		goto yy87;
+yy367:
+		yych = *++cursor_;
+		if (yych == 'i') goto yy483;
+		goto yy87;
+yy368:
+		yych = *++cursor_;
+		if (yych == 'q') goto yy484;
+		goto yy87;
+yy369:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy486;
+		goto yy87;
+yy370:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy487;
+		if (yych == 't') goto yy489;
+		goto yy87;
+yy371:
+		yych = *++cursor_;
+		if (yych <= 'n') {
+			if (yych == 'e') goto yy491;
+			goto yy87;
+		} else {
+			if (yych <= 'o') goto yy493;
+			if (yych == 't') goto yy494;
+			goto yy87;
+		}
+yy372:
+		yych = *++cursor_;
+		if (yych <= 'h') {
+			if (yych == 'a') goto yy496;
+			goto yy87;
+		} else {
+			if (yych <= 'i') goto yy497;
+			if (yych == 'u') goto yy498;
+			goto yy87;
+		}
+yy373:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy499;
+		goto yy87;
+yy374:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy501;
+		goto yy87;
+yy375:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy502;
+		goto yy87;
+yy376:
+		yych = *++cursor_;
+		if (yych <= 's') {
+			if (yych == 'q') goto yy503;
+			goto yy87;
+		} else {
+			if (yych <= 't') goto yy504;
+			if (yych <= 'u') goto yy505;
+			goto yy87;
+		}
+yy377:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy506;
+		goto yy87;
+yy378:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy507;
+		goto yy87;
+yy379:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy508;
+		goto yy87;
+yy380:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy509;
+		goto yy87;
+yy381:
+		yych = *++cursor_;
+		if (yych == 'm') goto yy511;
+		goto yy87;
+yy382:
+		yych = *++cursor_;
+		if (yych == 'd') goto yy512;
+		if (yych == 'n') goto yy513;
+		goto yy87;
+yy383:
+		yych = *++cursor_;
+		if (yych <= 'n') {
+			if (yych == 'l') goto yy514;
+			goto yy87;
+		} else {
+			if (yych <= 'o') goto yy515;
+			if (yych == 't') goto yy516;
+			goto yy87;
+		}
+yy384:
+		yych = *++cursor_;
+		if (yych == 'i') goto yy517;
+		goto yy87;
+yy385:
+		yych = *++cursor_;
+		if (yych == 'q') goto yy518;
+		goto yy87;
+yy386:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy520;
+		if (yych == 't') goto yy521;
+		goto yy87;
+yy387:
+		yych = *++cursor_;
+		if (yych <= 'n') {
+			if (yych == 'e') goto yy522;
+			goto yy87;
+		} else {
+			if (yych <= 'o') goto yy523;
+			if (yych == 't') goto yy524;
+			goto yy87;
+		}
+yy388:
+		yych = *++cursor_;
+		if (yych == 'u') goto yy525;
+		goto yy87;
+yy389:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy526;
+		goto yy87;
+yy390:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy528;
+		goto yy87;
+yy391:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy530;
+		goto yy87;
+yy392:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy531;
+		if (yych == 'o') goto yy532;
+		goto yy87;
+yy393:
+		yych = *++cursor_;
+		if (yych <= 's') {
+			if (yych == 'h') goto yy533;
+			goto yy87;
+		} else {
+			if (yych <= 't') goto yy534;
+			if (yych <= 'u') goto yy535;
+			goto yy87;
+		}
+yy394:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy536;
+		goto yy87;
+yy395:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy537;
+		goto yy87;
+yy396:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy538;
+		goto yy87;
+yy397:
+		yych = *++cursor_;
+		if (yych == 'd') goto yy539;
+		if (yych == 'n') goto yy540;
+		goto yy87;
+yy398:
+		yych = *++cursor_;
+		if (yych <= 'n') {
+			if (yych == 'l') goto yy541;
+			goto yy87;
+		} else {
+			if (yych <= 'o') goto yy542;
+			if (yych == 't') goto yy543;
+			goto yy87;
+		}
+yy399:
+		yych = *++cursor_;
+		if (yych == 'i') goto yy544;
+		goto yy87;
+yy400:
+		yych = *++cursor_;
+		if (yych == 'q') goto yy545;
+		if (yych == 'x') goto yy547;
+		goto yy87;
+yy401:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy548;
+		if (yych == 't') goto yy549;
+		goto yy87;
+yy402:
+		yych = *++cursor_;
+		if (yych <= 'n') {
+			if (yych == 'e') goto yy550;
+			goto yy87;
+		} else {
+			if (yych <= 'o') goto yy551;
+			if (yych == 't') goto yy552;
+			goto yy87;
+		}
+yy403:
+		yych = *++cursor_;
+		if (yych == 'u') goto yy553;
+		goto yy87;
+yy404:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy554;
+		goto yy87;
+yy405:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy556;
+		goto yy87;
+yy406:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy558;
+		goto yy87;
+yy407:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy559;
+		if (yych == 'o') goto yy560;
+		goto yy87;
+yy408:
+		yych = *++cursor_;
+		if (yych <= 's') {
+			if (yych == 'h') goto yy561;
+			goto yy87;
+		} else {
+			if (yych <= 't') goto yy562;
+			if (yych <= 'u') goto yy563;
+			goto yy87;
+		}
+yy409:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy564;
+		goto yy87;
+yy410:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy565;
+		goto yy87;
+yy411:
+		yych = *++cursor_;
+		if (yych == 't') goto yy566;
+		goto yy87;
+yy412:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy568;
+		goto yy87;
+yy413:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 439 "src/wast-lexer.cc"
+		{ RETURN(LOCAL); }
+#line 2868 "src/prebuilt/wast-lexer-gen.cc"
+yy415:
+		yych = *++cursor_;
+		if (yych == 'y') goto yy570;
+		goto yy87;
+yy416:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy572;
+		goto yy87;
+yy417:
+		yych = *++cursor_;
+		if (yych == 'x') goto yy574;
+		goto yy87;
+yy418:
+		yych = *++cursor_;
+		if (yych == 't') goto yy575;
+		goto yy87;
+yy419:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 437 "src/wast-lexer.cc"
+		{ RETURN(PARAM); }
+#line 2892 "src/prebuilt/wast-lexer-gen.cc"
+yy421:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 443 "src/wast-lexer.cc"
+		{ RETURN(QUOTE); }
+#line 2900 "src/prebuilt/wast-lexer-gen.cc"
+yy423:
+		yych = *++cursor_;
+		if (yych == 't') goto yy577;
+		goto yy87;
+yy424:
+		yych = *++cursor_;
+		if (yych == 't') goto yy578;
+		goto yy87;
+yy425:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy580;
+		goto yy87;
+yy426:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy581;
+		goto yy87;
+yy427:
+		yych = *++cursor_;
+		if (yych == 't') goto yy583;
+		goto yy87;
+yy428:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy585;
+		goto yy87;
+yy429:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy586;
+		goto yy87;
+yy430:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 446 "src/wast-lexer.cc"
+		{ RETURN(START); }
+#line 2936 "src/prebuilt/wast-lexer-gen.cc"
+yy432:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 444 "src/wast-lexer.cc"
+		{ RETURN(TABLE); }
+#line 2944 "src/prebuilt/wast-lexer-gen.cc"
+yy434:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy587;
+		goto yy87;
+yy435:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 469 "src/wast-lexer.cc"
+		{ RETURN(THROW); }
+#line 2956 "src/prebuilt/wast-lexer-gen.cc"
+yy437:
+		yych = *++cursor_;
+		if (yych == 'c') goto yy588;
+		goto yy87;
+yy438:
+		yych = *++cursor_;
+		if (yych <= '/') goto yy87;
+		if (yych <= '0') goto yy589;
+		if (yych <= '9') goto yy591;
+		goto yy87;
+yy439:
+		yych = *++cursor_;
+		if (yych == 'c') goto yy593;
+		goto yy87;
+yy440:
+		yych = *++cursor_;
+		if (yych == '_') goto yy595;
+		goto yy87;
+yy441:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 442 "src/wast-lexer.cc"
+		{ RETURN(BIN); }
+#line 2982 "src/prebuilt/wast-lexer-gen.cc"
+yy443:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy596;
+		goto yy87;
+yy444:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy597;
+		goto yy87;
+yy445:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy598;
+		goto yy87;
+yy446:
+		yych = *++cursor_;
+		if (yych == 't') goto yy599;
+		goto yy87;
+yy447:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 452 "src/wast-lexer.cc"
+		{ RETURN(EXCEPT); }
+#line 3006 "src/prebuilt/wast-lexer-gen.cc"
+yy449:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 451 "src/wast-lexer.cc"
+		{ RETURN(EXPORT); }
+#line 3014 "src/prebuilt/wast-lexer-gen.cc"
+yy451:
+		yych = *++cursor_;
+		if (yych == 's') goto yy600;
+		goto yy87;
+yy452:
+		yych = *++cursor_;
+		if (yych == 'd') goto yy602;
+		goto yy87;
+yy453:
+		yych = *++cursor_;
+		if (yych == 'i') goto yy604;
+		goto yy87;
+yy454:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy605;
+		if (yych == 'p') goto yy606;
+		goto yy87;
+yy455:
+		yych = *++cursor_;
+		if (yych == 'm') goto yy607;
+		goto yy87;
+yy456:
+		yych = *++cursor_;
+		if (yych == 'v') goto yy608;
+		goto yy87;
+yy457:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 394 "src/wast-lexer.cc"
+		{ OPCODE(F32Eq); RETURN(COMPARE); }
+#line 3047 "src/prebuilt/wast-lexer-gen.cc"
+yy459:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy610;
+		goto yy87;
+yy460:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 404 "src/wast-lexer.cc"
+		{ OPCODE(F32Ge); RETURN(COMPARE); }
+#line 3059 "src/prebuilt/wast-lexer-gen.cc"
+yy462:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 402 "src/wast-lexer.cc"
+		{ OPCODE(F32Gt); RETURN(COMPARE); }
+#line 3067 "src/prebuilt/wast-lexer-gen.cc"
+yy464:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 400 "src/wast-lexer.cc"
+		{ OPCODE(F32Le); RETURN(COMPARE); }
+#line 3075 "src/prebuilt/wast-lexer-gen.cc"
+yy466:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy611;
+		goto yy87;
+yy467:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 398 "src/wast-lexer.cc"
+		{ OPCODE(F32Lt); RETURN(COMPARE); }
+#line 3087 "src/prebuilt/wast-lexer-gen.cc"
+yy469:
+		yych = *++cursor_;
+		if (yych == 'x') goto yy612;
+		goto yy87;
+yy470:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy614;
+		goto yy87;
+yy471:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy616;
+		goto yy87;
+yy472:
+		++cursor_;
+		if ((yych = *cursor_) <= ':') {
+			if (yych <= '"') {
+				if (yych == '!') goto yy86;
+			} else {
+				if (yych <= '\'') goto yy86;
+				if (yych >= '*') goto yy86;
+			}
+		} else {
+			if (yych <= 'a') {
+				if (yych <= ';') goto yy473;
+				if (yych <= '`') goto yy86;
+				goto yy618;
+			} else {
+				if (yych == 'g') goto yy619;
+				if (yych <= '~') goto yy86;
+			}
+		}
+yy473:
+#line 396 "src/wast-lexer.cc"
+		{ OPCODE(F32Ne); RETURN(COMPARE); }
+#line 3122 "src/prebuilt/wast-lexer-gen.cc"
+yy474:
+		yych = *++cursor_;
+		if (yych == 'i') goto yy621;
+		goto yy87;
+yy475:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy622;
+		goto yy87;
+yy476:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy623;
+		goto yy87;
+yy477:
+		yych = *++cursor_;
+		if (yych == 'b') goto yy624;
+		goto yy87;
+yy478:
+		yych = *++cursor_;
+		if (yych == 'u') goto yy626;
+		goto yy87;
+yy479:
+		yych = *++cursor_;
+		if (yych == 's') goto yy627;
+		goto yy87;
+yy480:
+		yych = *++cursor_;
+		if (yych == 'd') goto yy629;
+		goto yy87;
+yy481:
+		yych = *++cursor_;
+		if (yych == 'i') goto yy631;
+		goto yy87;
+yy482:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy632;
+		if (yych == 'p') goto yy633;
+		goto yy87;
+yy483:
+		yych = *++cursor_;
+		if (yych == 'v') goto yy634;
+		goto yy87;
+yy484:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 395 "src/wast-lexer.cc"
+		{ OPCODE(F64Eq); RETURN(COMPARE); }
+#line 3171 "src/prebuilt/wast-lexer-gen.cc"
+yy486:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy636;
+		goto yy87;
+yy487:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 405 "src/wast-lexer.cc"
+		{ OPCODE(F64Ge); RETURN(COMPARE); }
+#line 3183 "src/prebuilt/wast-lexer-gen.cc"
+yy489:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 403 "src/wast-lexer.cc"
+		{ OPCODE(F64Gt); RETURN(COMPARE); }
+#line 3191 "src/prebuilt/wast-lexer-gen.cc"
+yy491:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 401 "src/wast-lexer.cc"
+		{ OPCODE(F64Le); RETURN(COMPARE); }
+#line 3199 "src/prebuilt/wast-lexer-gen.cc"
+yy493:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy637;
+		goto yy87;
+yy494:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 399 "src/wast-lexer.cc"
+		{ OPCODE(F64Lt); RETURN(COMPARE); }
+#line 3211 "src/prebuilt/wast-lexer-gen.cc"
+yy496:
+		yych = *++cursor_;
+		if (yych == 'x') goto yy638;
+		goto yy87;
+yy497:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy640;
+		goto yy87;
+yy498:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy642;
+		goto yy87;
+yy499:
+		++cursor_;
+		if ((yych = *cursor_) <= ':') {
+			if (yych <= '"') {
+				if (yych == '!') goto yy86;
+			} else {
+				if (yych <= '\'') goto yy86;
+				if (yych >= '*') goto yy86;
+			}
+		} else {
+			if (yych <= 'a') {
+				if (yych <= ';') goto yy500;
+				if (yych <= '`') goto yy86;
+				goto yy644;
+			} else {
+				if (yych == 'g') goto yy645;
+				if (yych <= '~') goto yy86;
+			}
+		}
+yy500:
+#line 397 "src/wast-lexer.cc"
+		{ OPCODE(F64Ne); RETURN(COMPARE); }
+#line 3246 "src/prebuilt/wast-lexer-gen.cc"
+yy501:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy647;
+		goto yy87;
+yy502:
+		yych = *++cursor_;
+		if (yych == 'i') goto yy648;
+		goto yy87;
+yy503:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy649;
+		goto yy87;
+yy504:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy650;
+		goto yy87;
+yy505:
+		yych = *++cursor_;
+		if (yych == 'b') goto yy651;
+		goto yy87;
+yy506:
+		yych = *++cursor_;
+		if (yych == 'u') goto yy653;
+		goto yy87;
+yy507:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy654;
+		goto yy87;
+yy508:
+		yych = *++cursor_;
+		if (yych == 'c') goto yy655;
+		goto yy87;
+yy509:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 440 "src/wast-lexer.cc"
+		{ RETURN(GLOBAL); }
+#line 3286 "src/prebuilt/wast-lexer-gen.cc"
+yy511:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy656;
+		goto yy87;
+yy512:
+		yych = *++cursor_;
+		if (yych == 'd') goto yy657;
+		goto yy87;
+yy513:
+		yych = *++cursor_;
+		if (yych == 'd') goto yy659;
+		goto yy87;
+yy514:
+		yych = *++cursor_;
+		if (yych == 'z') goto yy661;
+		goto yy87;
+yy515:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy663;
+		goto yy87;
+yy516:
+		yych = *++cursor_;
+		if (yych == 'z') goto yy664;
+		goto yy87;
+yy517:
+		yych = *++cursor_;
+		if (yych == 'v') goto yy666;
+		goto yy87;
+yy518:
+		++cursor_;
+		if ((yych = *cursor_) <= ')') {
+			if (yych <= '!') {
+				if (yych >= '!') goto yy86;
+			} else {
+				if (yych <= '"') goto yy519;
+				if (yych <= '\'') goto yy86;
+			}
+		} else {
+			if (yych <= 'y') {
+				if (yych != ';') goto yy86;
+			} else {
+				if (yych <= 'z') goto yy667;
+				if (yych <= '~') goto yy86;
+			}
+		}
+yy519:
+#line 374 "src/wast-lexer.cc"
+		{ OPCODE(I32Eq); RETURN(COMPARE); }
+#line 3335 "src/prebuilt/wast-lexer-gen.cc"
+yy520:
+		yych = *++cursor_;
+		if (yych == '_') goto yy669;
+		goto yy87;
+yy521:
+		yych = *++cursor_;
+		if (yych == '_') goto yy670;
+		goto yy87;
+yy522:
+		yych = *++cursor_;
+		if (yych == '_') goto yy671;
+		goto yy87;
+yy523:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy672;
+		goto yy87;
+yy524:
+		yych = *++cursor_;
+		if (yych == '_') goto yy673;
+		goto yy87;
+yy525:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy674;
+		goto yy87;
+yy526:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 376 "src/wast-lexer.cc"
+		{ OPCODE(I32Ne); RETURN(COMPARE); }
+#line 3367 "src/prebuilt/wast-lexer-gen.cc"
+yy528:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 346 "src/wast-lexer.cc"
+		{ OPCODE(I32Or); RETURN(BINARY); }
+#line 3375 "src/prebuilt/wast-lexer-gen.cc"
+yy530:
+		yych = *++cursor_;
+		if (yych == 'p') goto yy676;
+		goto yy87;
+yy531:
+		yych = *++cursor_;
+		if (yych == 'i') goto yy677;
+		if (yych == 'm') goto yy678;
+		goto yy87;
+yy532:
+		yych = *++cursor_;
+		if (yych == 't') goto yy679;
+		goto yy87;
+yy533:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy680;
+		if (yych == 'r') goto yy682;
+		goto yy87;
+yy534:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy683;
+		goto yy87;
+yy535:
+		yych = *++cursor_;
+		if (yych == 'b') goto yy684;
+		goto yy87;
+yy536:
+		yych = *++cursor_;
+		if (yych == 'u') goto yy686;
+		goto yy87;
+yy537:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy687;
+		goto yy87;
+yy538:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy688;
+		goto yy87;
+yy539:
+		yych = *++cursor_;
+		if (yych == 'd') goto yy690;
+		goto yy87;
+yy540:
+		yych = *++cursor_;
+		if (yych == 'd') goto yy692;
+		goto yy87;
+yy541:
+		yych = *++cursor_;
+		if (yych == 'z') goto yy694;
+		goto yy87;
+yy542:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy696;
+		goto yy87;
+yy543:
+		yych = *++cursor_;
+		if (yych == 'z') goto yy697;
+		goto yy87;
+yy544:
+		yych = *++cursor_;
+		if (yych == 'v') goto yy699;
+		goto yy87;
+yy545:
+		++cursor_;
+		if ((yych = *cursor_) <= ')') {
+			if (yych <= '!') {
+				if (yych >= '!') goto yy86;
+			} else {
+				if (yych <= '"') goto yy546;
+				if (yych <= '\'') goto yy86;
+			}
+		} else {
+			if (yych <= 'y') {
+				if (yych != ';') goto yy86;
+			} else {
+				if (yych <= 'z') goto yy700;
+				if (yych <= '~') goto yy86;
+			}
+		}
+yy546:
+#line 375 "src/wast-lexer.cc"
+		{ OPCODE(I64Eq); RETURN(COMPARE); }
+#line 3458 "src/prebuilt/wast-lexer-gen.cc"
+yy547:
+		yych = *++cursor_;
+		if (yych == 't') goto yy702;
+		goto yy87;
+yy548:
+		yych = *++cursor_;
+		if (yych == '_') goto yy703;
+		goto yy87;
+yy549:
+		yych = *++cursor_;
+		if (yych == '_') goto yy704;
+		goto yy87;
+yy550:
+		yych = *++cursor_;
+		if (yych == '_') goto yy705;
+		goto yy87;
+yy551:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy706;
+		goto yy87;
+yy552:
+		yych = *++cursor_;
+		if (yych == '_') goto yy707;
+		goto yy87;
+yy553:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy708;
+		goto yy87;
+yy554:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 377 "src/wast-lexer.cc"
+		{ OPCODE(I64Ne); RETURN(COMPARE); }
+#line 3494 "src/prebuilt/wast-lexer-gen.cc"
+yy556:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 347 "src/wast-lexer.cc"
+		{ OPCODE(I64Or); RETURN(BINARY); }
+#line 3502 "src/prebuilt/wast-lexer-gen.cc"
+yy558:
+		yych = *++cursor_;
+		if (yych == 'p') goto yy710;
+		goto yy87;
+yy559:
+		yych = *++cursor_;
+		if (yych == 'i') goto yy711;
+		if (yych == 'm') goto yy712;
+		goto yy87;
+yy560:
+		yych = *++cursor_;
+		if (yych == 't') goto yy713;
+		goto yy87;
+yy561:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy714;
+		if (yych == 'r') goto yy716;
+		goto yy87;
+yy562:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy717;
+		goto yy87;
+yy563:
+		yych = *++cursor_;
+		if (yych == 'b') goto yy718;
+		goto yy87;
+yy564:
+		yych = *++cursor_;
+		if (yych == 'u') goto yy720;
+		goto yy87;
+yy565:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy721;
+		goto yy87;
+yy566:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 450 "src/wast-lexer.cc"
+		{ RETURN(IMPORT); }
+#line 3544 "src/prebuilt/wast-lexer-gen.cc"
+yy568:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 454 "src/wast-lexer.cc"
+		{ RETURN(INVOKE); }
+#line 3552 "src/prebuilt/wast-lexer-gen.cc"
+yy570:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 445 "src/wast-lexer.cc"
+		{ RETURN(MEMORY); }
+#line 3560 "src/prebuilt/wast-lexer-gen.cc"
+yy572:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 441 "src/wast-lexer.cc"
+		{ RETURN(MODULE); }
+#line 3568 "src/prebuilt/wast-lexer-gen.cc"
+yy574:
+		yych = *++cursor_;
+		if (yych <= '@') {
+			if (yych <= '/') goto yy87;
+			if (yych <= '9') goto yy723;
+			goto yy87;
+		} else {
+			if (yych <= 'F') goto yy723;
+			if (yych <= '`') goto yy87;
+			if (yych <= 'f') goto yy723;
+			goto yy87;
+		}
+yy575:
+		++cursor_;
+		if ((yych = *cursor_) <= ')') {
+			if (yych <= '!') {
+				if (yych >= '!') goto yy86;
+			} else {
+				if (yych <= '"') goto yy576;
+				if (yych <= '\'') goto yy86;
+			}
+		} else {
+			if (yych <= '<') {
+				if (yych != ';') goto yy86;
+			} else {
+				if (yych <= '=') goto yy725;
+				if (yych <= '~') goto yy86;
+			}
+		}
+yy576:
+#line 449 "src/wast-lexer.cc"
+		{ RETURN(OFFSET); }
+#line 3601 "src/prebuilt/wast-lexer-gen.cc"
+yy577:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy726;
+		goto yy87;
+yy578:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 438 "src/wast-lexer.cc"
+		{ RETURN(RESULT); }
+#line 3613 "src/prebuilt/wast-lexer-gen.cc"
+yy580:
+		yych = *++cursor_;
+		if (yych == 'w') goto yy727;
+		goto yy87;
+yy581:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 273 "src/wast-lexer.cc"
+		{ RETURN(RETURN); }
+#line 3625 "src/prebuilt/wast-lexer-gen.cc"
+yy583:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 431 "src/wast-lexer.cc"
+		{ RETURN(SELECT); }
+#line 3633 "src/prebuilt/wast-lexer-gen.cc"
+yy585:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy729;
+		goto yy87;
+yy586:
+		yych = *++cursor_;
+		if (yych == 'c') goto yy730;
+		goto yy87;
+yy587:
+		yych = *++cursor_;
+		if (yych == 'c') goto yy731;
+		goto yy87;
+yy588:
+		yych = *++cursor_;
+		if (yych == 'h') goto yy732;
+		goto yy87;
+yy589:
+		++cursor_;
+		if ((yych = *cursor_) <= '/') {
+			if (yych <= '"') {
+				if (yych == '!') goto yy86;
+			} else {
+				if (yych <= '\'') goto yy86;
+				if (yych >= '*') goto yy86;
+			}
+		} else {
+			if (yych <= ';') {
+				if (yych <= '9') goto yy591;
+				if (yych <= ':') goto yy86;
+			} else {
+				if (yych == 'x') goto yy733;
+				if (yych <= '~') goto yy86;
+			}
+		}
+yy590:
+#line 303 "src/wast-lexer.cc"
+		{ TEXT_AT(6); RETURN(ALIGN_EQ_NAT); }
+#line 3671 "src/prebuilt/wast-lexer-gen.cc"
+yy591:
+		++cursor_;
+		if (limit_ <= cursor_) FILL(1);
+		yych = *cursor_;
+		if (yych <= ')') {
+			if (yych <= '!') {
+				if (yych <= ' ') goto yy590;
+				goto yy86;
+			} else {
+				if (yych <= '"') goto yy590;
+				if (yych <= '\'') goto yy86;
+				goto yy590;
+			}
+		} else {
+			if (yych <= ':') {
+				if (yych <= '/') goto yy86;
+				if (yych <= '9') goto yy591;
+				goto yy86;
+			} else {
+				if (yych <= ';') goto yy590;
+				if (yych <= '~') goto yy86;
+				goto yy590;
+			}
+		}
+yy593:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 258 "src/wast-lexer.cc"
+		{ RETURN(ANYFUNC); }
+#line 3703 "src/prebuilt/wast-lexer-gen.cc"
+yy595:
+		yych = *++cursor_;
+		switch (yych) {
+		case 'e':	goto yy734;
+		case 'i':	goto yy735;
+		case 'm':	goto yy736;
+		case 'r':	goto yy737;
+		case 't':	goto yy738;
+		case 'u':	goto yy739;
+		default:	goto yy87;
+		}
+yy596:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy740;
+		goto yy87;
+yy597:
+		yych = *++cursor_;
+		if (yych == 'd') goto yy742;
+		goto yy87;
+yy598:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy743;
+		goto yy87;
+yy599:
+		yych = *++cursor_;
+		if (yych == '_') goto yy744;
+		goto yy87;
+yy600:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 318 "src/wast-lexer.cc"
+		{ OPCODE(F32Abs); RETURN(UNARY); }
+#line 3738 "src/prebuilt/wast-lexer-gen.cc"
+yy602:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 360 "src/wast-lexer.cc"
+		{ OPCODE(F32Add); RETURN(BINARY); }
+#line 3746 "src/prebuilt/wast-lexer-gen.cc"
+yy604:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy745;
+		goto yy87;
+yy605:
+		yych = *++cursor_;
+		if (yych == 's') goto yy747;
+		if (yych == 'v') goto yy748;
+		goto yy87;
+yy606:
+		yych = *++cursor_;
+		if (yych == 'y') goto yy749;
+		goto yy87;
+yy607:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy750;
+		goto yy87;
+yy608:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 366 "src/wast-lexer.cc"
+		{ OPCODE(F32Div); RETURN(BINARY); }
+#line 3771 "src/prebuilt/wast-lexer-gen.cc"
+yy610:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy751;
+		goto yy87;
+yy611:
+		yych = *++cursor_;
+		if (yych == 'd') goto yy752;
+		goto yy87;
+yy612:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 370 "src/wast-lexer.cc"
+		{ OPCODE(F32Max); RETURN(BINARY); }
+#line 3787 "src/prebuilt/wast-lexer-gen.cc"
+yy614:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 368 "src/wast-lexer.cc"
+		{ OPCODE(F32Min); RETURN(BINARY); }
+#line 3795 "src/prebuilt/wast-lexer-gen.cc"
+yy616:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 364 "src/wast-lexer.cc"
+		{ OPCODE(F32Mul); RETURN(BINARY); }
+#line 3803 "src/prebuilt/wast-lexer-gen.cc"
+yy618:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy754;
+		goto yy87;
+yy619:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 316 "src/wast-lexer.cc"
+		{ OPCODE(F32Neg); RETURN(UNARY); }
+#line 3815 "src/prebuilt/wast-lexer-gen.cc"
+yy621:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy755;
+		goto yy87;
+yy622:
+		yych = *++cursor_;
+		if (yych == 't') goto yy756;
+		goto yy87;
+yy623:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy758;
+		goto yy87;
+yy624:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 362 "src/wast-lexer.cc"
+		{ OPCODE(F32Sub); RETURN(BINARY); }
+#line 3835 "src/prebuilt/wast-lexer-gen.cc"
+yy626:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy759;
+		goto yy87;
+yy627:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 319 "src/wast-lexer.cc"
+		{ OPCODE(F64Abs); RETURN(UNARY); }
+#line 3847 "src/prebuilt/wast-lexer-gen.cc"
+yy629:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 361 "src/wast-lexer.cc"
+		{ OPCODE(F64Add); RETURN(BINARY); }
+#line 3855 "src/prebuilt/wast-lexer-gen.cc"
+yy631:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy760;
+		goto yy87;
+yy632:
+		yych = *++cursor_;
+		if (yych == 's') goto yy762;
+		if (yych == 'v') goto yy763;
+		goto yy87;
+yy633:
+		yych = *++cursor_;
+		if (yych == 'y') goto yy764;
+		goto yy87;
+yy634:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 367 "src/wast-lexer.cc"
+		{ OPCODE(F64Div); RETURN(BINARY); }
+#line 3876 "src/prebuilt/wast-lexer-gen.cc"
+yy636:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy765;
+		goto yy87;
+yy637:
+		yych = *++cursor_;
+		if (yych == 'd') goto yy766;
+		goto yy87;
+yy638:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 371 "src/wast-lexer.cc"
+		{ OPCODE(F64Max); RETURN(BINARY); }
+#line 3892 "src/prebuilt/wast-lexer-gen.cc"
+yy640:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 369 "src/wast-lexer.cc"
+		{ OPCODE(F64Min); RETURN(BINARY); }
+#line 3900 "src/prebuilt/wast-lexer-gen.cc"
+yy642:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 365 "src/wast-lexer.cc"
+		{ OPCODE(F64Mul); RETURN(BINARY); }
+#line 3908 "src/prebuilt/wast-lexer-gen.cc"
+yy644:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy768;
+		goto yy87;
+yy645:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 317 "src/wast-lexer.cc"
+		{ OPCODE(F64Neg); RETURN(UNARY); }
+#line 3920 "src/prebuilt/wast-lexer-gen.cc"
+yy647:
+		yych = *++cursor_;
+		if (yych == 'm') goto yy769;
+		goto yy87;
+yy648:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy770;
+		goto yy87;
+yy649:
+		yych = *++cursor_;
+		if (yych == 't') goto yy771;
+		goto yy87;
+yy650:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy773;
+		goto yy87;
+yy651:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 363 "src/wast-lexer.cc"
+		{ OPCODE(F64Sub); RETURN(BINARY); }
+#line 3944 "src/prebuilt/wast-lexer-gen.cc"
+yy653:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy774;
+		goto yy87;
+yy654:
+		yych = *++cursor_;
+		if (yych == 'b') goto yy775;
+		goto yy87;
+yy655:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy776;
+		goto yy87;
+yy656:
+		yych = *++cursor_;
+		if (yych == 'm') goto yy777;
+		goto yy87;
+yy657:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 330 "src/wast-lexer.cc"
+		{ OPCODE(I32Add); RETURN(BINARY); }
+#line 3968 "src/prebuilt/wast-lexer-gen.cc"
+yy659:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 344 "src/wast-lexer.cc"
+		{ OPCODE(I32And); RETURN(BINARY); }
+#line 3976 "src/prebuilt/wast-lexer-gen.cc"
+yy661:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 310 "src/wast-lexer.cc"
+		{ OPCODE(I32Clz); RETURN(UNARY); }
+#line 3984 "src/prebuilt/wast-lexer-gen.cc"
+yy663:
+		yych = *++cursor_;
+		if (yych == 's') goto yy778;
+		goto yy87;
+yy664:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 312 "src/wast-lexer.cc"
+		{ OPCODE(I32Ctz); RETURN(UNARY); }
+#line 3996 "src/prebuilt/wast-lexer-gen.cc"
+yy666:
+		yych = *++cursor_;
+		if (yych == '_') goto yy779;
+		goto yy87;
+yy667:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 308 "src/wast-lexer.cc"
+		{ OPCODE(I32Eqz); RETURN(CONVERT); }
+#line 4008 "src/prebuilt/wast-lexer-gen.cc"
+yy669:
+		yych = *++cursor_;
+		if (yych == 's') goto yy780;
+		if (yych == 'u') goto yy782;
+		goto yy87;
+yy670:
+		yych = *++cursor_;
+		if (yych == 's') goto yy784;
+		if (yych == 'u') goto yy786;
+		goto yy87;
+yy671:
+		yych = *++cursor_;
+		if (yych == 's') goto yy788;
+		if (yych == 'u') goto yy790;
+		goto yy87;
+yy672:
+		yych = *++cursor_;
+		if (yych == 'd') goto yy792;
+		goto yy87;
+yy673:
+		yych = *++cursor_;
+		if (yych == 's') goto yy794;
+		if (yych == 'u') goto yy796;
+		goto yy87;
+yy674:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 334 "src/wast-lexer.cc"
+		{ OPCODE(I32Mul); RETURN(BINARY); }
+#line 4040 "src/prebuilt/wast-lexer-gen.cc"
+yy676:
+		yych = *++cursor_;
+		if (yych == 'c') goto yy798;
+		goto yy87;
+yy677:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy799;
+		goto yy87;
+yy678:
+		yych = *++cursor_;
+		if (yych == '_') goto yy800;
+		goto yy87;
+yy679:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy801;
+		if (yych == 'r') goto yy803;
+		goto yy87;
+yy680:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 350 "src/wast-lexer.cc"
+		{ OPCODE(I32Shl); RETURN(BINARY); }
+#line 4065 "src/prebuilt/wast-lexer-gen.cc"
+yy682:
+		yych = *++cursor_;
+		if (yych == '_') goto yy805;
+		goto yy87;
+yy683:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy806;
+		goto yy87;
+yy684:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 332 "src/wast-lexer.cc"
+		{ OPCODE(I32Sub); RETURN(BINARY); }
+#line 4081 "src/prebuilt/wast-lexer-gen.cc"
+yy686:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy807;
+		goto yy87;
+yy687:
+		yych = *++cursor_;
+		if (yych == 'p') goto yy808;
+		goto yy87;
+yy688:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 348 "src/wast-lexer.cc"
+		{ OPCODE(I32Xor); RETURN(BINARY); }
+#line 4097 "src/prebuilt/wast-lexer-gen.cc"
+yy690:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 331 "src/wast-lexer.cc"
+		{ OPCODE(I64Add); RETURN(BINARY); }
+#line 4105 "src/prebuilt/wast-lexer-gen.cc"
+yy692:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 345 "src/wast-lexer.cc"
+		{ OPCODE(I64And); RETURN(BINARY); }
+#line 4113 "src/prebuilt/wast-lexer-gen.cc"
+yy694:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 311 "src/wast-lexer.cc"
+		{ OPCODE(I64Clz); RETURN(UNARY); }
+#line 4121 "src/prebuilt/wast-lexer-gen.cc"
+yy696:
+		yych = *++cursor_;
+		if (yych == 's') goto yy809;
+		goto yy87;
+yy697:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 313 "src/wast-lexer.cc"
+		{ OPCODE(I64Ctz); RETURN(UNARY); }
+#line 4133 "src/prebuilt/wast-lexer-gen.cc"
+yy699:
+		yych = *++cursor_;
+		if (yych == '_') goto yy810;
+		goto yy87;
+yy700:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 309 "src/wast-lexer.cc"
+		{ OPCODE(I64Eqz); RETURN(CONVERT); }
+#line 4145 "src/prebuilt/wast-lexer-gen.cc"
+yy702:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy811;
+		goto yy87;
+yy703:
+		yych = *++cursor_;
+		if (yych == 's') goto yy812;
+		if (yych == 'u') goto yy814;
+		goto yy87;
+yy704:
+		yych = *++cursor_;
+		if (yych == 's') goto yy816;
+		if (yych == 'u') goto yy818;
+		goto yy87;
+yy705:
+		yych = *++cursor_;
+		if (yych == 's') goto yy820;
+		if (yych == 'u') goto yy822;
+		goto yy87;
+yy706:
+		yych = *++cursor_;
+		if (yych == 'd') goto yy824;
+		goto yy87;
+yy707:
+		yych = *++cursor_;
+		if (yych == 's') goto yy826;
+		if (yych == 'u') goto yy828;
+		goto yy87;
+yy708:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 335 "src/wast-lexer.cc"
+		{ OPCODE(I64Mul); RETURN(BINARY); }
+#line 4181 "src/prebuilt/wast-lexer-gen.cc"
+yy710:
+		yych = *++cursor_;
+		if (yych == 'c') goto yy830;
+		goto yy87;
+yy711:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy831;
+		goto yy87;
+yy712:
+		yych = *++cursor_;
+		if (yych == '_') goto yy832;
+		goto yy87;
+yy713:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy833;
+		if (yych == 'r') goto yy835;
+		goto yy87;
+yy714:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 351 "src/wast-lexer.cc"
+		{ OPCODE(I64Shl); RETURN(BINARY); }
+#line 4206 "src/prebuilt/wast-lexer-gen.cc"
+yy716:
+		yych = *++cursor_;
+		if (yych == '_') goto yy837;
+		goto yy87;
+yy717:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy838;
+		goto yy87;
+yy718:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 333 "src/wast-lexer.cc"
+		{ OPCODE(I64Sub); RETURN(BINARY); }
+#line 4222 "src/prebuilt/wast-lexer-gen.cc"
+yy720:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy839;
+		goto yy87;
+yy721:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 349 "src/wast-lexer.cc"
+		{ OPCODE(I64Xor); RETURN(BINARY); }
+#line 4234 "src/prebuilt/wast-lexer-gen.cc"
+yy723:
+		++cursor_;
+		if (limit_ <= cursor_) FILL(1);
+		yych = *cursor_;
+		if (yych <= '9') {
+			if (yych <= '"') {
+				if (yych == '!') goto yy86;
+				goto yy253;
+			} else {
+				if (yych <= '\'') goto yy86;
+				if (yych <= ')') goto yy253;
+				if (yych <= '/') goto yy86;
+				goto yy723;
+			}
+		} else {
+			if (yych <= 'F') {
+				if (yych == ';') goto yy253;
+				if (yych <= '@') goto yy86;
+				goto yy723;
+			} else {
+				if (yych <= '`') goto yy86;
+				if (yych <= 'f') goto yy723;
+				if (yych <= '~') goto yy86;
+				goto yy253;
+			}
+		}
+yy725:
+		yych = *++cursor_;
+		if (yych <= '/') goto yy87;
+		if (yych <= '0') goto yy840;
+		if (yych <= '9') goto yy842;
+		goto yy87;
+yy726:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy844;
+		goto yy87;
+yy727:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 470 "src/wast-lexer.cc"
+		{ RETURN(RETHROW); }
+#line 4278 "src/prebuilt/wast-lexer-gen.cc"
+yy729:
+		yych = *++cursor_;
+		if (yych == 'b') goto yy846;
+		goto yy87;
+yy730:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy847;
+		goto yy87;
+yy731:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy848;
+		goto yy87;
+yy732:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy849;
+		goto yy87;
+yy733:
+		yych = *++cursor_;
+		if (yych <= '@') {
+			if (yych <= '/') goto yy87;
+			if (yych <= '9') goto yy850;
+			goto yy87;
+		} else {
+			if (yych <= 'F') goto yy850;
+			if (yych <= '`') goto yy87;
+			if (yych <= 'f') goto yy850;
+			goto yy87;
+		}
+yy734:
+		yych = *++cursor_;
+		if (yych == 'x') goto yy852;
+		goto yy87;
+yy735:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy853;
+		goto yy87;
+yy736:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy854;
+		goto yy87;
+yy737:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy855;
+		goto yy87;
+yy738:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy856;
+		goto yy87;
+yy739:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy857;
+		goto yy87;
+yy740:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 268 "src/wast-lexer.cc"
+		{ RETURN(BR_TABLE); }
+#line 4338 "src/prebuilt/wast-lexer-gen.cc"
+yy742:
+		yych = *++cursor_;
+		if (yych == 'i') goto yy858;
+		goto yy87;
+yy743:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy859;
+		goto yy87;
+yy744:
+		yych = *++cursor_;
+		if (yych == 'm') goto yy861;
+		goto yy87;
+yy745:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 322 "src/wast-lexer.cc"
+		{ OPCODE(F32Ceil); RETURN(UNARY); }
+#line 4358 "src/prebuilt/wast-lexer-gen.cc"
+yy747:
+		yych = *++cursor_;
+		if (yych == 't') goto yy862;
+		goto yy87;
+yy748:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy864;
+		goto yy87;
+yy749:
+		yych = *++cursor_;
+		if (yych == 's') goto yy865;
+		goto yy87;
+yy750:
+		yych = *++cursor_;
+		if (yych == 't') goto yy866;
+		goto yy87;
+yy751:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy867;
+		goto yy87;
+yy752:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 281 "src/wast-lexer.cc"
+		{ OPCODE(F32Load); RETURN(LOAD); }
+#line 4386 "src/prebuilt/wast-lexer-gen.cc"
+yy754:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy869;
+		goto yy87;
+yy755:
+		yych = *++cursor_;
+		if (yych == 't') goto yy870;
+		goto yy87;
+yy756:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 320 "src/wast-lexer.cc"
+		{ OPCODE(F32Sqrt); RETURN(UNARY); }
+#line 4402 "src/prebuilt/wast-lexer-gen.cc"
+yy758:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy871;
+		goto yy87;
+yy759:
+		yych = *++cursor_;
+		if (yych == 'c') goto yy873;
+		goto yy87;
+yy760:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 323 "src/wast-lexer.cc"
+		{ OPCODE(F64Ceil); RETURN(UNARY); }
+#line 4418 "src/prebuilt/wast-lexer-gen.cc"
+yy762:
+		yych = *++cursor_;
+		if (yych == 't') goto yy875;
+		goto yy87;
+yy763:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy877;
+		goto yy87;
+yy764:
+		yych = *++cursor_;
+		if (yych == 's') goto yy878;
+		goto yy87;
+yy765:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy879;
+		goto yy87;
+yy766:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 282 "src/wast-lexer.cc"
+		{ OPCODE(F64Load); RETURN(LOAD); }
+#line 4442 "src/prebuilt/wast-lexer-gen.cc"
+yy768:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy881;
+		goto yy87;
+yy769:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy882;
+		goto yy87;
+yy770:
+		yych = *++cursor_;
+		if (yych == 't') goto yy883;
+		goto yy87;
+yy771:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 321 "src/wast-lexer.cc"
+		{ OPCODE(F64Sqrt); RETURN(UNARY); }
+#line 4462 "src/prebuilt/wast-lexer-gen.cc"
+yy773:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy884;
+		goto yy87;
+yy774:
+		yych = *++cursor_;
+		if (yych == 'c') goto yy886;
+		goto yy87;
+yy775:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy888;
+		goto yy87;
+yy776:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy889;
+		goto yy87;
+yy777:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy891;
+		goto yy87;
+yy778:
+		yych = *++cursor_;
+		if (yych == 't') goto yy892;
+		goto yy87;
+yy779:
+		yych = *++cursor_;
+		if (yych == 's') goto yy894;
+		if (yych == 'u') goto yy896;
+		goto yy87;
+yy780:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 390 "src/wast-lexer.cc"
+		{ OPCODE(I32GeS); RETURN(COMPARE); }
+#line 4499 "src/prebuilt/wast-lexer-gen.cc"
+yy782:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 392 "src/wast-lexer.cc"
+		{ OPCODE(I32GeU); RETURN(COMPARE); }
+#line 4507 "src/prebuilt/wast-lexer-gen.cc"
+yy784:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 386 "src/wast-lexer.cc"
+		{ OPCODE(I32GtS); RETURN(COMPARE); }
+#line 4515 "src/prebuilt/wast-lexer-gen.cc"
+yy786:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 388 "src/wast-lexer.cc"
+		{ OPCODE(I32GtU); RETURN(COMPARE); }
+#line 4523 "src/prebuilt/wast-lexer-gen.cc"
+yy788:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 382 "src/wast-lexer.cc"
+		{ OPCODE(I32LeS); RETURN(COMPARE); }
+#line 4531 "src/prebuilt/wast-lexer-gen.cc"
+yy790:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 384 "src/wast-lexer.cc"
+		{ OPCODE(I32LeU); RETURN(COMPARE); }
+#line 4539 "src/prebuilt/wast-lexer-gen.cc"
+yy792:
+		++cursor_;
+		if ((yych = *cursor_) <= '0') {
+			if (yych <= '"') {
+				if (yych == '!') goto yy86;
+			} else {
+				if (yych <= '\'') goto yy86;
+				if (yych >= '*') goto yy86;
+			}
+		} else {
+			if (yych <= '8') {
+				if (yych <= '1') goto yy898;
+				if (yych <= '7') goto yy86;
+				goto yy899;
+			} else {
+				if (yych == ';') goto yy793;
+				if (yych <= '~') goto yy86;
+			}
+		}
+yy793:
+#line 279 "src/wast-lexer.cc"
+		{ OPCODE(I32Load); RETURN(LOAD); }
+#line 4562 "src/prebuilt/wast-lexer-gen.cc"
+yy794:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 378 "src/wast-lexer.cc"
+		{ OPCODE(I32LtS); RETURN(COMPARE); }
+#line 4570 "src/prebuilt/wast-lexer-gen.cc"
+yy796:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 380 "src/wast-lexer.cc"
+		{ OPCODE(I32LtU); RETURN(COMPARE); }
+#line 4578 "src/prebuilt/wast-lexer-gen.cc"
+yy798:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy900;
+		goto yy87;
+yy799:
+		yych = *++cursor_;
+		if (yych == 't') goto yy901;
+		goto yy87;
+yy800:
+		yych = *++cursor_;
+		if (yych == 's') goto yy902;
+		if (yych == 'u') goto yy904;
+		goto yy87;
+yy801:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 356 "src/wast-lexer.cc"
+		{ OPCODE(I32Rotl); RETURN(BINARY); }
+#line 4599 "src/prebuilt/wast-lexer-gen.cc"
+yy803:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 358 "src/wast-lexer.cc"
+		{ OPCODE(I32Rotr); RETURN(BINARY); }
+#line 4607 "src/prebuilt/wast-lexer-gen.cc"
+yy805:
+		yych = *++cursor_;
+		if (yych == 's') goto yy906;
+		if (yych == 'u') goto yy908;
+		goto yy87;
+yy806:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy910;
+		goto yy87;
+yy807:
+		yych = *++cursor_;
+		if (yych == 'c') goto yy912;
+		goto yy87;
+yy808:
+		yych = *++cursor_;
+		if (yych == '/') goto yy913;
+		goto yy87;
+yy809:
+		yych = *++cursor_;
+		if (yych == 't') goto yy914;
+		goto yy87;
+yy810:
+		yych = *++cursor_;
+		if (yych == 's') goto yy916;
+		if (yych == 'u') goto yy918;
+		goto yy87;
+yy811:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy920;
+		goto yy87;
+yy812:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 391 "src/wast-lexer.cc"
+		{ OPCODE(I64GeS); RETURN(COMPARE); }
+#line 4645 "src/prebuilt/wast-lexer-gen.cc"
+yy814:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 393 "src/wast-lexer.cc"
+		{ OPCODE(I64GeU); RETURN(COMPARE); }
+#line 4653 "src/prebuilt/wast-lexer-gen.cc"
+yy816:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 387 "src/wast-lexer.cc"
+		{ OPCODE(I64GtS); RETURN(COMPARE); }
+#line 4661 "src/prebuilt/wast-lexer-gen.cc"
+yy818:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 389 "src/wast-lexer.cc"
+		{ OPCODE(I64GtU); RETURN(COMPARE); }
+#line 4669 "src/prebuilt/wast-lexer-gen.cc"
+yy820:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 383 "src/wast-lexer.cc"
+		{ OPCODE(I64LeS); RETURN(COMPARE); }
+#line 4677 "src/prebuilt/wast-lexer-gen.cc"
+yy822:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 385 "src/wast-lexer.cc"
+		{ OPCODE(I64LeU); RETURN(COMPARE); }
+#line 4685 "src/prebuilt/wast-lexer-gen.cc"
+yy824:
+		++cursor_;
+		if ((yych = *cursor_) <= '1') {
+			if (yych <= '"') {
+				if (yych == '!') goto yy86;
+			} else {
+				if (yych <= '\'') goto yy86;
+				if (yych <= ')') goto yy825;
+				if (yych <= '0') goto yy86;
+				goto yy921;
+			}
+		} else {
+			if (yych <= '8') {
+				if (yych == '3') goto yy922;
+				if (yych <= '7') goto yy86;
+				goto yy923;
+			} else {
+				if (yych == ';') goto yy825;
+				if (yych <= '~') goto yy86;
+			}
+		}
+yy825:
+#line 280 "src/wast-lexer.cc"
+		{ OPCODE(I64Load); RETURN(LOAD); }
+#line 4710 "src/prebuilt/wast-lexer-gen.cc"
+yy826:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 379 "src/wast-lexer.cc"
+		{ OPCODE(I64LtS); RETURN(COMPARE); }
+#line 4718 "src/prebuilt/wast-lexer-gen.cc"
+yy828:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 381 "src/wast-lexer.cc"
+		{ OPCODE(I64LtU); RETURN(COMPARE); }
+#line 4726 "src/prebuilt/wast-lexer-gen.cc"
+yy830:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy924;
+		goto yy87;
+yy831:
+		yych = *++cursor_;
+		if (yych == 't') goto yy925;
+		goto yy87;
+yy832:
+		yych = *++cursor_;
+		if (yych == 's') goto yy926;
+		if (yych == 'u') goto yy928;
+		goto yy87;
+yy833:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 357 "src/wast-lexer.cc"
+		{ OPCODE(I64Rotl); RETURN(BINARY); }
+#line 4747 "src/prebuilt/wast-lexer-gen.cc"
+yy835:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 359 "src/wast-lexer.cc"
+		{ OPCODE(I64Rotr); RETURN(BINARY); }
+#line 4755 "src/prebuilt/wast-lexer-gen.cc"
+yy837:
+		yych = *++cursor_;
+		if (yych == 's') goto yy930;
+		if (yych == 'u') goto yy932;
+		goto yy87;
+yy838:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy934;
+		goto yy87;
+yy839:
+		yych = *++cursor_;
+		if (yych == 'c') goto yy936;
+		goto yy87;
+yy840:
+		++cursor_;
+		if ((yych = *cursor_) <= '/') {
+			if (yych <= '"') {
+				if (yych == '!') goto yy86;
+			} else {
+				if (yych <= '\'') goto yy86;
+				if (yych >= '*') goto yy86;
+			}
+		} else {
+			if (yych <= ';') {
+				if (yych <= '9') goto yy842;
+				if (yych <= ':') goto yy86;
+			} else {
+				if (yych == 'x') goto yy937;
+				if (yych <= '~') goto yy86;
+			}
+		}
+yy841:
+#line 302 "src/wast-lexer.cc"
+		{ TEXT_AT(7); RETURN(OFFSET_EQ_NAT); }
+#line 4790 "src/prebuilt/wast-lexer-gen.cc"
+yy842:
+		++cursor_;
+		if (limit_ <= cursor_) FILL(1);
+		yych = *cursor_;
+		if (yych <= ')') {
+			if (yych <= '!') {
+				if (yych <= ' ') goto yy841;
+				goto yy86;
+			} else {
+				if (yych <= '"') goto yy841;
+				if (yych <= '\'') goto yy86;
+				goto yy841;
+			}
+		} else {
+			if (yych <= ':') {
+				if (yych <= '/') goto yy86;
+				if (yych <= '9') goto yy842;
+				goto yy86;
+			} else {
+				if (yych <= ';') goto yy841;
+				if (yych <= '~') goto yy86;
+				goto yy841;
+			}
+		}
+yy844:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 453 "src/wast-lexer.cc"
+		{ RETURN(REGISTER); }
+#line 4822 "src/prebuilt/wast-lexer-gen.cc"
+yy846:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy938;
+		goto yy87;
+yy847:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy939;
+		goto yy87;
+yy848:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy941;
+		goto yy87;
+yy849:
+		yych = *++cursor_;
+		if (yych == 'b') goto yy943;
+		goto yy87;
+yy850:
+		++cursor_;
+		if (limit_ <= cursor_) FILL(1);
+		yych = *cursor_;
+		if (yych <= '9') {
+			if (yych <= '"') {
+				if (yych == '!') goto yy86;
+				goto yy590;
+			} else {
+				if (yych <= '\'') goto yy86;
+				if (yych <= ')') goto yy590;
+				if (yych <= '/') goto yy86;
+				goto yy850;
+			}
+		} else {
+			if (yych <= 'F') {
+				if (yych == ';') goto yy590;
+				if (yych <= '@') goto yy86;
+				goto yy850;
+			} else {
+				if (yych <= '`') goto yy86;
+				if (yych <= 'f') goto yy850;
+				if (yych <= '~') goto yy86;
+				goto yy590;
+			}
+		}
+yy852:
+		yych = *++cursor_;
+		if (yych == 'h') goto yy944;
+		goto yy87;
+yy853:
+		yych = *++cursor_;
+		if (yych == 'v') goto yy945;
+		goto yy87;
+yy854:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy946;
+		goto yy87;
+yy855:
+		yych = *++cursor_;
+		if (yych == 't') goto yy947;
+		goto yy87;
+yy856:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy948;
+		goto yy87;
+yy857:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy949;
+		goto yy87;
+yy858:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy950;
+		goto yy87;
+yy859:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 468 "src/wast-lexer.cc"
+		{ RETURN(CATCH_ALL); }
+#line 4900 "src/prebuilt/wast-lexer-gen.cc"
+yy861:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy951;
+		goto yy87;
+yy862:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 306 "src/wast-lexer.cc"
+		{ TYPE(F32); RETURN(CONST); }
+#line 4912 "src/prebuilt/wast-lexer-gen.cc"
+yy864:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy952;
+		goto yy87;
+yy865:
+		yych = *++cursor_;
+		if (yych == 'i') goto yy953;
+		goto yy87;
+yy866:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy954;
+		goto yy87;
+yy867:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 324 "src/wast-lexer.cc"
+		{ OPCODE(F32Floor); RETURN(UNARY); }
+#line 4932 "src/prebuilt/wast-lexer-gen.cc"
+yy869:
+		yych = *++cursor_;
+		if (yych == 's') goto yy955;
+		goto yy87;
+yy870:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy956;
+		goto yy87;
+yy871:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 285 "src/wast-lexer.cc"
+		{ OPCODE(F32Store); RETURN(STORE); }
+#line 4948 "src/prebuilt/wast-lexer-gen.cc"
+yy873:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 326 "src/wast-lexer.cc"
+		{ OPCODE(F32Trunc); RETURN(UNARY); }
+#line 4956 "src/prebuilt/wast-lexer-gen.cc"
+yy875:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 307 "src/wast-lexer.cc"
+		{ TYPE(F64); RETURN(CONST); }
+#line 4964 "src/prebuilt/wast-lexer-gen.cc"
+yy877:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy957;
+		goto yy87;
+yy878:
+		yych = *++cursor_;
+		if (yych == 'i') goto yy958;
+		goto yy87;
+yy879:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 325 "src/wast-lexer.cc"
+		{ OPCODE(F64Floor); RETURN(UNARY); }
+#line 4980 "src/prebuilt/wast-lexer-gen.cc"
+yy881:
+		yych = *++cursor_;
+		if (yych == 's') goto yy959;
+		goto yy87;
+yy882:
+		yych = *++cursor_;
+		if (yych == 't') goto yy960;
+		goto yy87;
+yy883:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy961;
+		goto yy87;
+yy884:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 286 "src/wast-lexer.cc"
+		{ OPCODE(F64Store); RETURN(STORE); }
+#line 5000 "src/prebuilt/wast-lexer-gen.cc"
+yy886:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 327 "src/wast-lexer.cc"
+		{ OPCODE(F64Trunc); RETURN(UNARY); }
+#line 5008 "src/prebuilt/wast-lexer-gen.cc"
+yy888:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy962;
+		goto yy87;
+yy889:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 274 "src/wast-lexer.cc"
+		{ RETURN(GET_LOCAL); }
+#line 5020 "src/prebuilt/wast-lexer-gen.cc"
+yy891:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy964;
+		goto yy87;
+yy892:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 304 "src/wast-lexer.cc"
+		{ TYPE(I32); RETURN(CONST); }
+#line 5032 "src/prebuilt/wast-lexer-gen.cc"
+yy894:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 336 "src/wast-lexer.cc"
+		{ OPCODE(I32DivS); RETURN(BINARY); }
+#line 5040 "src/prebuilt/wast-lexer-gen.cc"
+yy896:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 338 "src/wast-lexer.cc"
+		{ OPCODE(I32DivU); RETURN(BINARY); }
+#line 5048 "src/prebuilt/wast-lexer-gen.cc"
+yy898:
+		yych = *++cursor_;
+		if (yych == '6') goto yy965;
+		goto yy87;
+yy899:
+		yych = *++cursor_;
+		if (yych == '_') goto yy966;
+		goto yy87;
+yy900:
+		yych = *++cursor_;
+		if (yych == 't') goto yy967;
+		goto yy87;
+yy901:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy969;
+		goto yy87;
+yy902:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 340 "src/wast-lexer.cc"
+		{ OPCODE(I32RemS); RETURN(BINARY); }
+#line 5072 "src/prebuilt/wast-lexer-gen.cc"
+yy904:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 342 "src/wast-lexer.cc"
+		{ OPCODE(I32RemU); RETURN(BINARY); }
+#line 5080 "src/prebuilt/wast-lexer-gen.cc"
+yy906:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 352 "src/wast-lexer.cc"
+		{ OPCODE(I32ShrS); RETURN(BINARY); }
+#line 5088 "src/prebuilt/wast-lexer-gen.cc"
+yy908:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 354 "src/wast-lexer.cc"
+		{ OPCODE(I32ShrU); RETURN(BINARY); }
+#line 5096 "src/prebuilt/wast-lexer-gen.cc"
+yy910:
+		++cursor_;
+		if ((yych = *cursor_) <= '0') {
+			if (yych <= '"') {
+				if (yych == '!') goto yy86;
+			} else {
+				if (yych <= '\'') goto yy86;
+				if (yych >= '*') goto yy86;
+			}
+		} else {
+			if (yych <= '8') {
+				if (yych <= '1') goto yy970;
+				if (yych <= '7') goto yy86;
+				goto yy971;
+			} else {
+				if (yych == ';') goto yy911;
+				if (yych <= '~') goto yy86;
+			}
+		}
+yy911:
+#line 283 "src/wast-lexer.cc"
+		{ OPCODE(I32Store); RETURN(STORE); }
+#line 5119 "src/prebuilt/wast-lexer-gen.cc"
+yy912:
+		yych = *++cursor_;
+		if (yych == '_') goto yy973;
+		goto yy87;
+yy913:
+		yych = *++cursor_;
+		if (yych == 'i') goto yy974;
+		goto yy87;
+yy914:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 305 "src/wast-lexer.cc"
+		{ TYPE(I64); RETURN(CONST); }
+#line 5135 "src/prebuilt/wast-lexer-gen.cc"
+yy916:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 337 "src/wast-lexer.cc"
+		{ OPCODE(I64DivS); RETURN(BINARY); }
+#line 5143 "src/prebuilt/wast-lexer-gen.cc"
+yy918:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 339 "src/wast-lexer.cc"
+		{ OPCODE(I64DivU); RETURN(BINARY); }
+#line 5151 "src/prebuilt/wast-lexer-gen.cc"
+yy920:
+		yych = *++cursor_;
+		if (yych == 'd') goto yy975;
+		goto yy87;
+yy921:
+		yych = *++cursor_;
+		if (yych == '6') goto yy976;
+		goto yy87;
+yy922:
+		yych = *++cursor_;
+		if (yych == '2') goto yy977;
+		goto yy87;
+yy923:
+		yych = *++cursor_;
+		if (yych == '_') goto yy978;
+		goto yy87;
+yy924:
+		yych = *++cursor_;
+		if (yych == 't') goto yy979;
+		goto yy87;
+yy925:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy981;
+		goto yy87;
+yy926:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 341 "src/wast-lexer.cc"
+		{ OPCODE(I64RemS); RETURN(BINARY); }
+#line 5183 "src/prebuilt/wast-lexer-gen.cc"
+yy928:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 343 "src/wast-lexer.cc"
+		{ OPCODE(I64RemU); RETURN(BINARY); }
+#line 5191 "src/prebuilt/wast-lexer-gen.cc"
+yy930:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 353 "src/wast-lexer.cc"
+		{ OPCODE(I64ShrS); RETURN(BINARY); }
+#line 5199 "src/prebuilt/wast-lexer-gen.cc"
+yy932:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 355 "src/wast-lexer.cc"
+		{ OPCODE(I64ShrU); RETURN(BINARY); }
+#line 5207 "src/prebuilt/wast-lexer-gen.cc"
+yy934:
+		++cursor_;
+		if ((yych = *cursor_) <= '1') {
+			if (yych <= '"') {
+				if (yych == '!') goto yy86;
+			} else {
+				if (yych <= '\'') goto yy86;
+				if (yych <= ')') goto yy935;
+				if (yych <= '0') goto yy86;
+				goto yy982;
+			}
+		} else {
+			if (yych <= '8') {
+				if (yych == '3') goto yy983;
+				if (yych <= '7') goto yy86;
+				goto yy984;
+			} else {
+				if (yych == ';') goto yy935;
+				if (yych <= '~') goto yy86;
+			}
+		}
+yy935:
+#line 284 "src/wast-lexer.cc"
+		{ OPCODE(I64Store); RETURN(STORE); }
+#line 5232 "src/prebuilt/wast-lexer-gen.cc"
+yy936:
+		yych = *++cursor_;
+		if (yych == '_') goto yy986;
+		goto yy87;
+yy937:
+		yych = *++cursor_;
+		if (yych <= '@') {
+			if (yych <= '/') goto yy87;
+			if (yych <= '9') goto yy987;
+			goto yy87;
+		} else {
+			if (yych <= 'F') goto yy987;
+			if (yych <= '`') goto yy87;
+			if (yych <= 'f') goto yy987;
+			goto yy87;
+		}
+yy938:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy989;
+		goto yy87;
+yy939:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 275 "src/wast-lexer.cc"
+		{ RETURN(SET_LOCAL); }
+#line 5260 "src/prebuilt/wast-lexer-gen.cc"
+yy941:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 276 "src/wast-lexer.cc"
+		{ RETURN(TEE_LOCAL); }
+#line 5268 "src/prebuilt/wast-lexer-gen.cc"
+yy943:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy991;
+		goto yy87;
+yy944:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy992;
+		goto yy87;
+yy945:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy993;
+		goto yy87;
+yy946:
+		yych = *++cursor_;
+		if (yych == 'f') goto yy994;
+		goto yy87;
+yy947:
+		yych = *++cursor_;
+		if (yych == 'u') goto yy995;
+		goto yy87;
+yy948:
+		yych = *++cursor_;
+		if (yych == 'p') goto yy996;
+		goto yy87;
+yy949:
+		yych = *++cursor_;
+		if (yych == 'i') goto yy998;
+		goto yy87;
+yy950:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy999;
+		goto yy87;
+yy951:
+		yych = *++cursor_;
+		if (yych == 'm') goto yy1000;
+		goto yy87;
+yy952:
+		yych = *++cursor_;
+		if (yych == 't') goto yy1001;
+		goto yy87;
+yy953:
+		yych = *++cursor_;
+		if (yych == 'g') goto yy1002;
+		goto yy87;
+yy954:
+		yych = *++cursor_;
+		if (yych == '/') goto yy1003;
+		goto yy87;
+yy955:
+		yych = *++cursor_;
+		if (yych == 't') goto yy1004;
+		goto yy87;
+yy956:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy1006;
+		goto yy87;
+yy957:
+		yych = *++cursor_;
+		if (yych == 't') goto yy1007;
+		goto yy87;
+yy958:
+		yych = *++cursor_;
+		if (yych == 'g') goto yy1008;
+		goto yy87;
+yy959:
+		yych = *++cursor_;
+		if (yych == 't') goto yy1009;
+		goto yy87;
+yy960:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy1011;
+		goto yy87;
+yy961:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy1012;
+		goto yy87;
+yy962:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 277 "src/wast-lexer.cc"
+		{ RETURN(GET_GLOBAL); }
+#line 5352 "src/prebuilt/wast-lexer-gen.cc"
+yy964:
+		yych = *++cursor_;
+		if (yych == 'y') goto yy1013;
+		goto yy87;
+yy965:
+		yych = *++cursor_;
+		if (yych == '_') goto yy1015;
+		goto yy87;
+yy966:
+		yych = *++cursor_;
+		if (yych == 's') goto yy1016;
+		if (yych == 'u') goto yy1018;
+		goto yy87;
+yy967:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 314 "src/wast-lexer.cc"
+		{ OPCODE(I32Popcnt); RETURN(UNARY); }
+#line 5373 "src/prebuilt/wast-lexer-gen.cc"
+yy969:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy1020;
+		goto yy87;
+yy970:
+		yych = *++cursor_;
+		if (yych == '6') goto yy1021;
+		goto yy87;
+yy971:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 297 "src/wast-lexer.cc"
+		{ OPCODE(I32Store8); RETURN(STORE); }
+#line 5389 "src/prebuilt/wast-lexer-gen.cc"
+yy973:
+		yych = *++cursor_;
+		if (yych == 's') goto yy1023;
+		if (yych == 'u') goto yy1024;
+		goto yy87;
+yy974:
+		yych = *++cursor_;
+		if (yych == '6') goto yy1025;
+		goto yy87;
+yy975:
+		yych = *++cursor_;
+		if (yych == '_') goto yy1026;
+		goto yy87;
+yy976:
+		yych = *++cursor_;
+		if (yych == '_') goto yy1027;
+		goto yy87;
+yy977:
+		yych = *++cursor_;
+		if (yych == '_') goto yy1028;
+		goto yy87;
+yy978:
+		yych = *++cursor_;
+		if (yych == 's') goto yy1029;
+		if (yych == 'u') goto yy1031;
+		goto yy87;
+yy979:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 315 "src/wast-lexer.cc"
+		{ OPCODE(I64Popcnt); RETURN(UNARY); }
+#line 5423 "src/prebuilt/wast-lexer-gen.cc"
+yy981:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy1033;
+		goto yy87;
+yy982:
+		yych = *++cursor_;
+		if (yych == '6') goto yy1034;
+		goto yy87;
+yy983:
+		yych = *++cursor_;
+		if (yych == '2') goto yy1036;
+		goto yy87;
+yy984:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 298 "src/wast-lexer.cc"
+		{ OPCODE(I64Store8); RETURN(STORE); }
+#line 5443 "src/prebuilt/wast-lexer-gen.cc"
+yy986:
+		yych = *++cursor_;
+		if (yych == 's') goto yy1038;
+		if (yych == 'u') goto yy1039;
+		goto yy87;
+yy987:
+		++cursor_;
+		if (limit_ <= cursor_) FILL(1);
+		yych = *cursor_;
+		if (yych <= '9') {
+			if (yych <= '"') {
+				if (yych == '!') goto yy86;
+				goto yy841;
+			} else {
+				if (yych <= '\'') goto yy86;
+				if (yych <= ')') goto yy841;
+				if (yych <= '/') goto yy86;
+				goto yy987;
+			}
+		} else {
+			if (yych <= 'F') {
+				if (yych == ';') goto yy841;
+				if (yych <= '@') goto yy86;
+				goto yy987;
+			} else {
+				if (yych <= '`') goto yy86;
+				if (yych <= 'f') goto yy987;
+				if (yych <= '~') goto yy86;
+				goto yy841;
+			}
+		}
+yy989:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 278 "src/wast-lexer.cc"
+		{ RETURN(SET_GLOBAL); }
+#line 5482 "src/prebuilt/wast-lexer-gen.cc"
+yy991:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy1040;
+		goto yy87;
+yy992:
+		yych = *++cursor_;
+		if (yych == 'u') goto yy1042;
+		goto yy87;
+yy993:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy1043;
+		goto yy87;
+yy994:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy1044;
+		goto yy87;
+yy995:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy1045;
+		goto yy87;
+yy996:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 464 "src/wast-lexer.cc"
+		{ RETURN(ASSERT_TRAP); }
+#line 5510 "src/prebuilt/wast-lexer-gen.cc"
+yy998:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy1046;
+		goto yy87;
+yy999:
+		yych = *++cursor_;
+		if (yych == 'c') goto yy1047;
+		goto yy87;
+yy1000:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy1048;
+		goto yy87;
+yy1001:
+		yych = *++cursor_;
+		if (yych == '_') goto yy1049;
+		goto yy87;
+yy1002:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy1050;
+		goto yy87;
+yy1003:
+		yych = *++cursor_;
+		if (yych == 'f') goto yy1052;
+		goto yy87;
+yy1004:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 328 "src/wast-lexer.cc"
+		{ OPCODE(F32Nearest); RETURN(UNARY); }
+#line 5542 "src/prebuilt/wast-lexer-gen.cc"
+yy1006:
+		yych = *++cursor_;
+		if (yych == 'p') goto yy1053;
+		goto yy87;
+yy1007:
+		yych = *++cursor_;
+		if (yych == '_') goto yy1054;
+		goto yy87;
+yy1008:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy1055;
+		goto yy87;
+yy1009:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 329 "src/wast-lexer.cc"
+		{ OPCODE(F64Nearest); RETURN(UNARY); }
+#line 5562 "src/prebuilt/wast-lexer-gen.cc"
+yy1011:
+		yych = *++cursor_;
+		if (yych == '/') goto yy1057;
+		goto yy87;
+yy1012:
+		yych = *++cursor_;
+		if (yych == 'p') goto yy1058;
+		goto yy87;
+yy1013:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 434 "src/wast-lexer.cc"
+		{ RETURN(GROW_MEMORY); }
+#line 5578 "src/prebuilt/wast-lexer-gen.cc"
+yy1015:
+		yych = *++cursor_;
+		if (yych == 's') goto yy1059;
+		if (yych == 'u') goto yy1061;
+		goto yy87;
+yy1016:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 287 "src/wast-lexer.cc"
+		{ OPCODE(I32Load8S); RETURN(LOAD); }
+#line 5591 "src/prebuilt/wast-lexer-gen.cc"
+yy1018:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 289 "src/wast-lexer.cc"
+		{ OPCODE(I32Load8U); RETURN(LOAD); }
+#line 5599 "src/prebuilt/wast-lexer-gen.cc"
+yy1020:
+		yych = *++cursor_;
+		if (yych == 'p') goto yy1063;
+		goto yy87;
+yy1021:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 299 "src/wast-lexer.cc"
+		{ OPCODE(I32Store16); RETURN(STORE); }
+#line 5611 "src/prebuilt/wast-lexer-gen.cc"
+yy1023:
+		yych = *++cursor_;
+		if (yych == '/') goto yy1064;
+		goto yy87;
+yy1024:
+		yych = *++cursor_;
+		if (yych == '/') goto yy1065;
+		goto yy87;
+yy1025:
+		yych = *++cursor_;
+		if (yych == '4') goto yy1066;
+		goto yy87;
+yy1026:
+		yych = *++cursor_;
+		if (yych == 's') goto yy1068;
+		if (yych == 'u') goto yy1069;
+		goto yy87;
+yy1027:
+		yych = *++cursor_;
+		if (yych == 's') goto yy1070;
+		if (yych == 'u') goto yy1072;
+		goto yy87;
+yy1028:
+		yych = *++cursor_;
+		if (yych == 's') goto yy1074;
+		if (yych == 'u') goto yy1076;
+		goto yy87;
+yy1029:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 288 "src/wast-lexer.cc"
+		{ OPCODE(I64Load8S); RETURN(LOAD); }
+#line 5646 "src/prebuilt/wast-lexer-gen.cc"
+yy1031:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 290 "src/wast-lexer.cc"
+		{ OPCODE(I64Load8U); RETURN(LOAD); }
+#line 5654 "src/prebuilt/wast-lexer-gen.cc"
+yy1033:
+		yych = *++cursor_;
+		if (yych == 'p') goto yy1078;
+		goto yy87;
+yy1034:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 300 "src/wast-lexer.cc"
+		{ OPCODE(I64Store16); RETURN(STORE); }
+#line 5666 "src/prebuilt/wast-lexer-gen.cc"
+yy1036:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 301 "src/wast-lexer.cc"
+		{ OPCODE(I64Store32); RETURN(STORE); }
+#line 5674 "src/prebuilt/wast-lexer-gen.cc"
+yy1038:
+		yych = *++cursor_;
+		if (yych == '/') goto yy1079;
+		goto yy87;
+yy1039:
+		yych = *++cursor_;
+		if (yych == '/') goto yy1080;
+		goto yy87;
+yy1040:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 432 "src/wast-lexer.cc"
+		{ RETURN(UNREACHABLE); }
+#line 5690 "src/prebuilt/wast-lexer-gen.cc"
+yy1042:
+		yych = *++cursor_;
+		if (yych == 's') goto yy1081;
+		goto yy87;
+yy1043:
+		yych = *++cursor_;
+		if (yych == 'i') goto yy1082;
+		goto yy87;
+yy1044:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy1083;
+		goto yy87;
+yy1045:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy1084;
+		goto yy87;
+yy1046:
+		yych = *++cursor_;
+		if (yych == 'k') goto yy1086;
+		goto yy87;
+yy1047:
+		yych = *++cursor_;
+		if (yych == 't') goto yy1087;
+		goto yy87;
+yy1048:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy1089;
+		goto yy87;
+yy1049:
+		yych = *++cursor_;
+		if (yych == 's') goto yy1090;
+		if (yych == 'u') goto yy1091;
+		goto yy87;
+yy1050:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 372 "src/wast-lexer.cc"
+		{ OPCODE(F32Copysign); RETURN(BINARY); }
+#line 5731 "src/prebuilt/wast-lexer-gen.cc"
+yy1052:
+		yych = *++cursor_;
+		if (yych == '6') goto yy1092;
+		goto yy87;
+yy1053:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy1093;
+		goto yy87;
+yy1054:
+		yych = *++cursor_;
+		if (yych == 's') goto yy1094;
+		if (yych == 'u') goto yy1095;
+		goto yy87;
+yy1055:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 373 "src/wast-lexer.cc"
+		{ OPCODE(F64Copysign); RETURN(BINARY); }
+#line 5752 "src/prebuilt/wast-lexer-gen.cc"
+yy1057:
+		yych = *++cursor_;
+		if (yych == 'f') goto yy1096;
+		goto yy87;
+yy1058:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy1097;
+		goto yy87;
+yy1059:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 291 "src/wast-lexer.cc"
+		{ OPCODE(I32Load16S); RETURN(LOAD); }
+#line 5768 "src/prebuilt/wast-lexer-gen.cc"
+yy1061:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 293 "src/wast-lexer.cc"
+		{ OPCODE(I32Load16U); RETURN(LOAD); }
+#line 5776 "src/prebuilt/wast-lexer-gen.cc"
+yy1063:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy1098;
+		goto yy87;
+yy1064:
+		yych = *++cursor_;
+		if (yych == 'f') goto yy1099;
+		goto yy87;
+yy1065:
+		yych = *++cursor_;
+		if (yych == 'f') goto yy1100;
+		goto yy87;
+yy1066:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 408 "src/wast-lexer.cc"
+		{ OPCODE(I32WrapI64); RETURN(CONVERT); }
+#line 5796 "src/prebuilt/wast-lexer-gen.cc"
+yy1068:
+		yych = *++cursor_;
+		if (yych == '/') goto yy1101;
+		goto yy87;
+yy1069:
+		yych = *++cursor_;
+		if (yych == '/') goto yy1102;
+		goto yy87;
+yy1070:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 292 "src/wast-lexer.cc"
+		{ OPCODE(I64Load16S); RETURN(LOAD); }
+#line 5812 "src/prebuilt/wast-lexer-gen.cc"
+yy1072:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 294 "src/wast-lexer.cc"
+		{ OPCODE(I64Load16U); RETURN(LOAD); }
+#line 5820 "src/prebuilt/wast-lexer-gen.cc"
+yy1074:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 295 "src/wast-lexer.cc"
+		{ OPCODE(I64Load32S); RETURN(LOAD); }
+#line 5828 "src/prebuilt/wast-lexer-gen.cc"
+yy1076:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 296 "src/wast-lexer.cc"
+		{ OPCODE(I64Load32U); RETURN(LOAD); }
+#line 5836 "src/prebuilt/wast-lexer-gen.cc"
+yy1078:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy1103;
+		goto yy87;
+yy1079:
+		yych = *++cursor_;
+		if (yych == 'f') goto yy1104;
+		goto yy87;
+yy1080:
+		yych = *++cursor_;
+		if (yych == 'f') goto yy1105;
+		goto yy87;
+yy1081:
+		yych = *++cursor_;
+		if (yych == 't') goto yy1106;
+		goto yy87;
+yy1082:
+		yych = *++cursor_;
+		if (yych == 'd') goto yy1107;
+		goto yy87;
+yy1083:
+		yych = *++cursor_;
+		if (yych == 'm') goto yy1109;
+		goto yy87;
+yy1084:
+		++cursor_;
+		if ((yych = *cursor_) <= ')') {
+			if (yych <= '!') {
+				if (yych >= '!') goto yy86;
+			} else {
+				if (yych <= '"') goto yy1085;
+				if (yych <= '\'') goto yy86;
+			}
+		} else {
+			if (yych <= '^') {
+				if (yych != ';') goto yy86;
+			} else {
+				if (yych <= '_') goto yy1110;
+				if (yych <= '~') goto yy86;
+			}
+		}
+yy1085:
+#line 459 "src/wast-lexer.cc"
+		{ RETURN(ASSERT_RETURN); }
+#line 5881 "src/prebuilt/wast-lexer-gen.cc"
+yy1086:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy1111;
+		goto yy87;
+yy1087:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 270 "src/wast-lexer.cc"
+		{ RETURN(CALL_INDIRECT); }
+#line 5893 "src/prebuilt/wast-lexer-gen.cc"
+yy1089:
+		yych = *++cursor_;
+		if (yych == 'y') goto yy1112;
+		goto yy87;
+yy1090:
+		yych = *++cursor_;
+		if (yych == '/') goto yy1114;
+		goto yy87;
+yy1091:
+		yych = *++cursor_;
+		if (yych == '/') goto yy1115;
+		goto yy87;
+yy1092:
+		yych = *++cursor_;
+		if (yych == '4') goto yy1116;
+		goto yy87;
+yy1093:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy1118;
+		goto yy87;
+yy1094:
+		yych = *++cursor_;
+		if (yych == '/') goto yy1119;
+		goto yy87;
+yy1095:
+		yych = *++cursor_;
+		if (yych == '/') goto yy1120;
+		goto yy87;
+yy1096:
+		yych = *++cursor_;
+		if (yych == '3') goto yy1121;
+		goto yy87;
+yy1097:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy1122;
+		goto yy87;
+yy1098:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy1123;
+		goto yy87;
+yy1099:
+		yych = *++cursor_;
+		if (yych == '3') goto yy1124;
+		if (yych == '6') goto yy1125;
+		goto yy87;
+yy1100:
+		yych = *++cursor_;
+		if (yych == '3') goto yy1126;
+		if (yych == '6') goto yy1127;
+		goto yy87;
+yy1101:
+		yych = *++cursor_;
+		if (yych == 'i') goto yy1128;
+		goto yy87;
+yy1102:
+		yych = *++cursor_;
+		if (yych == 'i') goto yy1129;
+		goto yy87;
+yy1103:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy1130;
+		goto yy87;
+yy1104:
+		yych = *++cursor_;
+		if (yych == '3') goto yy1131;
+		if (yych == '6') goto yy1132;
+		goto yy87;
+yy1105:
+		yych = *++cursor_;
+		if (yych == '3') goto yy1133;
+		if (yych == '6') goto yy1134;
+		goto yy87;
+yy1106:
+		yych = *++cursor_;
+		if (yych == 'i') goto yy1135;
+		goto yy87;
+yy1107:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 457 "src/wast-lexer.cc"
+		{ RETURN(ASSERT_INVALID); }
+#line 5977 "src/prebuilt/wast-lexer-gen.cc"
+yy1109:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy1136;
+		goto yy87;
+yy1110:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy1137;
+		if (yych == 'c') goto yy1138;
+		goto yy87;
+yy1111:
+		yych = *++cursor_;
+		if (yych == 'b') goto yy1139;
+		goto yy87;
+yy1112:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 433 "src/wast-lexer.cc"
+		{ RETURN(CURRENT_MEMORY); }
+#line 5998 "src/prebuilt/wast-lexer-gen.cc"
+yy1114:
+		yych = *++cursor_;
+		if (yych == 'i') goto yy1140;
+		goto yy87;
+yy1115:
+		yych = *++cursor_;
+		if (yych == 'i') goto yy1141;
+		goto yy87;
+yy1116:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 426 "src/wast-lexer.cc"
+		{ OPCODE(F32DemoteF64); RETURN(CONVERT); }
+#line 6014 "src/prebuilt/wast-lexer-gen.cc"
+yy1118:
+		yych = *++cursor_;
+		if (yych == 't') goto yy1142;
+		goto yy87;
+yy1119:
+		yych = *++cursor_;
+		if (yych == 'i') goto yy1143;
+		goto yy87;
+yy1120:
+		yych = *++cursor_;
+		if (yych == 'i') goto yy1144;
+		goto yy87;
+yy1121:
+		yych = *++cursor_;
+		if (yych == '2') goto yy1145;
+		goto yy87;
+yy1122:
+		yych = *++cursor_;
+		if (yych == 't') goto yy1147;
+		goto yy87;
+yy1123:
+		yych = *++cursor_;
+		if (yych == 't') goto yy1148;
+		goto yy87;
+yy1124:
+		yych = *++cursor_;
+		if (yych == '2') goto yy1149;
+		goto yy87;
+yy1125:
+		yych = *++cursor_;
+		if (yych == '4') goto yy1151;
+		goto yy87;
+yy1126:
+		yych = *++cursor_;
+		if (yych == '2') goto yy1153;
+		goto yy87;
+yy1127:
+		yych = *++cursor_;
+		if (yych == '4') goto yy1155;
+		goto yy87;
+yy1128:
+		yych = *++cursor_;
+		if (yych == '3') goto yy1157;
+		goto yy87;
+yy1129:
+		yych = *++cursor_;
+		if (yych == '3') goto yy1158;
+		goto yy87;
+yy1130:
+		yych = *++cursor_;
+		if (yych == 't') goto yy1159;
+		goto yy87;
+yy1131:
+		yych = *++cursor_;
+		if (yych == '2') goto yy1160;
+		goto yy87;
+yy1132:
+		yych = *++cursor_;
+		if (yych == '4') goto yy1162;
+		goto yy87;
+yy1133:
+		yych = *++cursor_;
+		if (yych == '2') goto yy1164;
+		goto yy87;
+yy1134:
+		yych = *++cursor_;
+		if (yych == '4') goto yy1166;
+		goto yy87;
+yy1135:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy1168;
+		goto yy87;
+yy1136:
+		yych = *++cursor_;
+		if (yych == 'd') goto yy1169;
+		goto yy87;
+yy1137:
+		yych = *++cursor_;
+		if (yych == 'r') goto yy1171;
+		goto yy87;
+yy1138:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy1172;
+		goto yy87;
+yy1139:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy1173;
+		goto yy87;
+yy1140:
+		yych = *++cursor_;
+		if (yych == '3') goto yy1174;
+		if (yych == '6') goto yy1175;
+		goto yy87;
+yy1141:
+		yych = *++cursor_;
+		if (yych == '3') goto yy1176;
+		if (yych == '6') goto yy1177;
+		goto yy87;
+yy1142:
+		yych = *++cursor_;
+		if (yych == '/') goto yy1178;
+		goto yy87;
+yy1143:
+		yych = *++cursor_;
+		if (yych == '3') goto yy1179;
+		if (yych == '6') goto yy1180;
+		goto yy87;
+yy1144:
+		yych = *++cursor_;
+		if (yych == '3') goto yy1181;
+		if (yych == '6') goto yy1182;
+		goto yy87;
+yy1145:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 425 "src/wast-lexer.cc"
+		{ OPCODE(F64PromoteF32); RETURN(CONVERT); }
+#line 6134 "src/prebuilt/wast-lexer-gen.cc"
+yy1147:
+		yych = *++cursor_;
+		if (yych == '/') goto yy1183;
+		goto yy87;
+yy1148:
+		yych = *++cursor_;
+		if (yych == '/') goto yy1184;
+		goto yy87;
+yy1149:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 409 "src/wast-lexer.cc"
+		{ OPCODE(I32TruncSF32); RETURN(CONVERT); }
+#line 6150 "src/prebuilt/wast-lexer-gen.cc"
+yy1151:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 411 "src/wast-lexer.cc"
+		{ OPCODE(I32TruncSF64); RETURN(CONVERT); }
+#line 6158 "src/prebuilt/wast-lexer-gen.cc"
+yy1153:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 413 "src/wast-lexer.cc"
+		{ OPCODE(I32TruncUF32); RETURN(CONVERT); }
+#line 6166 "src/prebuilt/wast-lexer-gen.cc"
+yy1155:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 415 "src/wast-lexer.cc"
+		{ OPCODE(I32TruncUF64); RETURN(CONVERT); }
+#line 6174 "src/prebuilt/wast-lexer-gen.cc"
+yy1157:
+		yych = *++cursor_;
+		if (yych == '2') goto yy1185;
+		goto yy87;
+yy1158:
+		yych = *++cursor_;
+		if (yych == '2') goto yy1187;
+		goto yy87;
+yy1159:
+		yych = *++cursor_;
+		if (yych == '/') goto yy1189;
+		goto yy87;
+yy1160:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 410 "src/wast-lexer.cc"
+		{ OPCODE(I64TruncSF32); RETURN(CONVERT); }
+#line 6194 "src/prebuilt/wast-lexer-gen.cc"
+yy1162:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 412 "src/wast-lexer.cc"
+		{ OPCODE(I64TruncSF64); RETURN(CONVERT); }
+#line 6202 "src/prebuilt/wast-lexer-gen.cc"
+yy1164:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 414 "src/wast-lexer.cc"
+		{ OPCODE(I64TruncUF32); RETURN(CONVERT); }
+#line 6210 "src/prebuilt/wast-lexer-gen.cc"
+yy1166:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 416 "src/wast-lexer.cc"
+		{ OPCODE(I64TruncUF64); RETURN(CONVERT); }
+#line 6218 "src/prebuilt/wast-lexer-gen.cc"
+yy1168:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy1190;
+		goto yy87;
+yy1169:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 456 "src/wast-lexer.cc"
+		{ RETURN(ASSERT_MALFORMED); }
+#line 6230 "src/prebuilt/wast-lexer-gen.cc"
+yy1171:
+		yych = *++cursor_;
+		if (yych == 'i') goto yy1192;
+		goto yy87;
+yy1172:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy1193;
+		goto yy87;
+yy1173:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy1194;
+		goto yy87;
+yy1174:
+		yych = *++cursor_;
+		if (yych == '2') goto yy1196;
+		goto yy87;
+yy1175:
+		yych = *++cursor_;
+		if (yych == '4') goto yy1198;
+		goto yy87;
+yy1176:
+		yych = *++cursor_;
+		if (yych == '2') goto yy1200;
+		goto yy87;
+yy1177:
+		yych = *++cursor_;
+		if (yych == '4') goto yy1202;
+		goto yy87;
+yy1178:
+		yych = *++cursor_;
+		if (yych == 'i') goto yy1204;
+		goto yy87;
+yy1179:
+		yych = *++cursor_;
+		if (yych == '2') goto yy1205;
+		goto yy87;
+yy1180:
+		yych = *++cursor_;
+		if (yych == '4') goto yy1207;
+		goto yy87;
+yy1181:
+		yych = *++cursor_;
+		if (yych == '2') goto yy1209;
+		goto yy87;
+yy1182:
+		yych = *++cursor_;
+		if (yych == '4') goto yy1211;
+		goto yy87;
+yy1183:
+		yych = *++cursor_;
+		if (yych == 'i') goto yy1213;
+		goto yy87;
+yy1184:
+		yych = *++cursor_;
+		if (yych == 'f') goto yy1214;
+		goto yy87;
+yy1185:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 406 "src/wast-lexer.cc"
+		{ OPCODE(I64ExtendSI32); RETURN(CONVERT); }
+#line 6294 "src/prebuilt/wast-lexer-gen.cc"
+yy1187:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 407 "src/wast-lexer.cc"
+		{ OPCODE(I64ExtendUI32); RETURN(CONVERT); }
+#line 6302 "src/prebuilt/wast-lexer-gen.cc"
+yy1189:
+		yych = *++cursor_;
+		if (yych == 'f') goto yy1215;
+		goto yy87;
+yy1190:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 465 "src/wast-lexer.cc"
+		{ RETURN(ASSERT_EXHAUSTION); }
+#line 6314 "src/prebuilt/wast-lexer-gen.cc"
+yy1192:
+		yych = *++cursor_;
+		if (yych == 't') goto yy1216;
+		goto yy87;
+yy1193:
+		yych = *++cursor_;
+		if (yych == 'o') goto yy1217;
+		goto yy87;
+yy1194:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 458 "src/wast-lexer.cc"
+		{ RETURN(ASSERT_UNLINKABLE); }
+#line 6330 "src/prebuilt/wast-lexer-gen.cc"
+yy1196:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 417 "src/wast-lexer.cc"
+		{ OPCODE(F32ConvertSI32); RETURN(CONVERT); }
+#line 6338 "src/prebuilt/wast-lexer-gen.cc"
+yy1198:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 419 "src/wast-lexer.cc"
+		{ OPCODE(F32ConvertSI64); RETURN(CONVERT); }
+#line 6346 "src/prebuilt/wast-lexer-gen.cc"
+yy1200:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 421 "src/wast-lexer.cc"
+		{ OPCODE(F32ConvertUI32); RETURN(CONVERT); }
+#line 6354 "src/prebuilt/wast-lexer-gen.cc"
+yy1202:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 423 "src/wast-lexer.cc"
+		{ OPCODE(F32ConvertUI64); RETURN(CONVERT); }
+#line 6362 "src/prebuilt/wast-lexer-gen.cc"
+yy1204:
+		yych = *++cursor_;
+		if (yych == '3') goto yy1218;
+		goto yy87;
+yy1205:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 418 "src/wast-lexer.cc"
+		{ OPCODE(F64ConvertSI32); RETURN(CONVERT); }
+#line 6374 "src/prebuilt/wast-lexer-gen.cc"
+yy1207:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 420 "src/wast-lexer.cc"
+		{ OPCODE(F64ConvertSI64); RETURN(CONVERT); }
+#line 6382 "src/prebuilt/wast-lexer-gen.cc"
+yy1209:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 422 "src/wast-lexer.cc"
+		{ OPCODE(F64ConvertUI32); RETURN(CONVERT); }
+#line 6390 "src/prebuilt/wast-lexer-gen.cc"
+yy1211:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 424 "src/wast-lexer.cc"
+		{ OPCODE(F64ConvertUI64); RETURN(CONVERT); }
+#line 6398 "src/prebuilt/wast-lexer-gen.cc"
+yy1213:
+		yych = *++cursor_;
+		if (yych == '6') goto yy1219;
+		goto yy87;
+yy1214:
+		yych = *++cursor_;
+		if (yych == '3') goto yy1220;
+		goto yy87;
+yy1215:
+		yych = *++cursor_;
+		if (yych == '6') goto yy1221;
+		goto yy87;
+yy1216:
+		yych = *++cursor_;
+		if (yych == 'h') goto yy1222;
+		goto yy87;
+yy1217:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy1223;
+		goto yy87;
+yy1218:
+		yych = *++cursor_;
+		if (yych == '2') goto yy1224;
+		goto yy87;
+yy1219:
+		yych = *++cursor_;
+		if (yych == '4') goto yy1226;
+		goto yy87;
+yy1220:
+		yych = *++cursor_;
+		if (yych == '2') goto yy1228;
+		goto yy87;
+yy1221:
+		yych = *++cursor_;
+		if (yych == '4') goto yy1230;
+		goto yy87;
+yy1222:
+		yych = *++cursor_;
+		if (yych == 'm') goto yy1232;
+		goto yy87;
+yy1223:
+		yych = *++cursor_;
+		if (yych == 'i') goto yy1233;
+		goto yy87;
+yy1224:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 427 "src/wast-lexer.cc"
+		{ OPCODE(F32ReinterpretI32); RETURN(CONVERT); }
+#line 6450 "src/prebuilt/wast-lexer-gen.cc"
+yy1226:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 429 "src/wast-lexer.cc"
+		{ OPCODE(F64ReinterpretI64); RETURN(CONVERT); }
+#line 6458 "src/prebuilt/wast-lexer-gen.cc"
+yy1228:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 428 "src/wast-lexer.cc"
+		{ OPCODE(I32ReinterpretF32); RETURN(CONVERT); }
+#line 6466 "src/prebuilt/wast-lexer-gen.cc"
+yy1230:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 430 "src/wast-lexer.cc"
+		{ OPCODE(I64ReinterpretF64); RETURN(CONVERT); }
+#line 6474 "src/prebuilt/wast-lexer-gen.cc"
+yy1232:
+		yych = *++cursor_;
+		if (yych == 'e') goto yy1234;
+		goto yy87;
+yy1233:
+		yych = *++cursor_;
+		if (yych == 'c') goto yy1235;
+		goto yy87;
+yy1234:
+		yych = *++cursor_;
+		if (yych == 't') goto yy1236;
+		goto yy87;
+yy1235:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy1237;
+		goto yy87;
+yy1236:
+		yych = *++cursor_;
+		if (yych == 'i') goto yy1238;
+		goto yy87;
+yy1237:
+		yych = *++cursor_;
+		if (yych == 'l') goto yy1239;
+		goto yy87;
+yy1238:
+		yych = *++cursor_;
+		if (yych == 'c') goto yy1240;
+		goto yy87;
+yy1239:
+		yych = *++cursor_;
+		if (yych == '_') goto yy1241;
+		goto yy87;
+yy1240:
+		yych = *++cursor_;
+		if (yych == '_') goto yy1242;
+		goto yy87;
+yy1241:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy1243;
+		goto yy87;
+yy1242:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy1244;
+		goto yy87;
+yy1243:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy1245;
+		goto yy87;
+yy1244:
+		yych = *++cursor_;
+		if (yych == 'a') goto yy1246;
+		goto yy87;
+yy1245:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy1247;
+		goto yy87;
+yy1246:
+		yych = *++cursor_;
+		if (yych == 'n') goto yy1249;
+		goto yy87;
+yy1247:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 460 "src/wast-lexer.cc"
+		{
+                                  RETURN(ASSERT_RETURN_CANONICAL_NAN); }
+#line 6543 "src/prebuilt/wast-lexer-gen.cc"
+yy1249:
+		++cursor_;
+		if (yybm[0+(yych = *cursor_)] & 8) {
+			goto yy86;
+		}
+#line 462 "src/wast-lexer.cc"
+		{
+                                  RETURN(ASSERT_RETURN_ARITHMETIC_NAN); }
+#line 6552 "src/prebuilt/wast-lexer-gen.cc"
+	}
+}
+#line 491 "src/wast-lexer.cc"
+
+  }
+}
+
+}  // namespace wabt
diff --git a/lib/wabt/src/prebuilt/wast-parser-gen.cc b/lib/wabt/src/prebuilt/wast-parser-gen.cc
new file mode 100644
index 0000000..0744dd3
--- /dev/null
+++ b/lib/wabt/src/prebuilt/wast-parser-gen.cc
@@ -0,0 +1,5149 @@
+/* A Bison parser, made by GNU Bison 3.0.2.  */
+
+/* Bison implementation for Yacc-like parsers in C
+
+   Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* As a special exception, you may create a larger work that contains
+   part or all of the Bison parser skeleton and distribute that work
+   under terms of your choice, so long as that work isn't itself a
+   parser generator using the skeleton or a modified version thereof
+   as a parser skeleton.  Alternatively, if you modify or redistribute
+   the parser skeleton itself, you may (at your option) remove this
+   special exception, which will cause the skeleton and the resulting
+   Bison output files to be licensed under the GNU General Public
+   License without this special exception.
+
+   This special exception was added by the Free Software Foundation in
+   version 2.2 of Bison.  */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+   simplifying the original so-called "semantic" parser.  */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+   infringing on user name space.  This should be done even for local
+   variables, as they might otherwise be expanded by user macros.
+   There are some unavoidable exceptions within include files to
+   define necessary library symbols; they are noted "INFRINGES ON
+   USER NAME SPACE" below.  */
+
+/* Identify Bison output.  */
+#define YYBISON 1
+
+/* Bison version.  */
+#define YYBISON_VERSION "3.0.2"
+
+/* Skeleton name.  */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers.  */
+#define YYPURE 1
+
+/* Push parsers.  */
+#define YYPUSH 0
+
+/* Pull parsers.  */
+#define YYPULL 1
+
+/* Substitute the type names.  */
+#define YYSTYPE         WABT_WAST_PARSER_STYPE
+#define YYLTYPE         WABT_WAST_PARSER_LTYPE
+/* Substitute the variable and function names.  */
+#define yyparse         wabt_wast_parser_parse
+#define yylex           wabt_wast_parser_lex
+#define yyerror         wabt_wast_parser_error
+#define yydebug         wabt_wast_parser_debug
+#define yynerrs         wabt_wast_parser_nerrs
+
+
+/* Copy the first part of user declarations.  */
+#line 17 "src/wast-parser.y" /* yacc.c:339  */
+
+#include <algorithm>
+#include <cassert>
+#include <cstdarg>
+#include <cstdio>
+#include <cstdlib>
+#include <utility>
+
+#include "binary-error-handler.h"
+#include "binary-reader.h"
+#include "binary-reader-ir.h"
+#include "literal.h"
+#include "wast-parser.h"
+#include "wast-parser-lexer-shared.h"
+
+#define YYDEBUG 1
+
+#define RELOCATE_STACK(type, array, stack_base, old_size, new_size)   \
+  do {                                                                \
+    type* new_stack = new type[new_size]();                           \
+    std::move((stack_base), (stack_base) + (old_size), (new_stack));  \
+    if ((stack_base) != (array)) {                                    \
+      delete[](stack_base);                                           \
+    } else {                                                          \
+      for (size_t i = 0; i < (old_size); ++i) {                       \
+        (stack_base)[i].~type();                                      \
+      }                                                               \
+    }                                                                 \
+    /* Cache the pointer in the parser struct to be deleted later. */ \
+    parser->array = (stack_base) = new_stack;                         \
+  } while (0)
+
+#define yyoverflow(message, ss, ss_size, vs, vs_size, ls, ls_size, new_size) \
+  do {                                                                       \
+    size_t old_size = *(new_size);                                           \
+    *(new_size) *= 2;                                                        \
+    RELOCATE_STACK(yytype_int16, yyssa, *(ss), old_size, *(new_size));       \
+    RELOCATE_STACK(YYSTYPE, yyvsa, *(vs), old_size, *(new_size));            \
+    RELOCATE_STACK(YYLTYPE, yylsa, *(ls), old_size, *(new_size));            \
+  } while (0)
+
+#define DUPTEXT(dst, src)                                \
+  (dst).start = wabt_strndup((src).start, (src).length); \
+  (dst).length = (src).length
+
+#define YYLLOC_DEFAULT(Current, Rhs, N)                       \
+  do                                                          \
+    if (N) {                                                  \
+      (Current).filename = YYRHSLOC(Rhs, 1).filename;         \
+      (Current).line = YYRHSLOC(Rhs, 1).line;                 \
+      (Current).first_column = YYRHSLOC(Rhs, 1).first_column; \
+      if (YYRHSLOC(Rhs, N).line == (Current).line)            \
+        (Current).last_column = YYRHSLOC(Rhs, N).last_column; \
+      else                                                    \
+        (Current).last_column = YYRHSLOC(Rhs, 1).last_column; \
+    } else {                                                  \
+      (Current).filename = nullptr;                           \
+      (Current).line = YYRHSLOC(Rhs, 0).line;                 \
+      (Current).first_column = (Current).last_column =        \
+          YYRHSLOC(Rhs, 0).last_column;                       \
+    }                                                         \
+  while (0)
+
+#define CHECK_END_LABEL(loc, begin_label, end_label)                       \
+  do {                                                                     \
+    if (!string_slice_is_empty(&(end_label))) {                            \
+      if (string_slice_is_empty(&(begin_label))) {                         \
+        wast_parser_error(&loc, lexer, parser,                             \
+                          "unexpected label \"" PRIstringslice "\"",       \
+                          WABT_PRINTF_STRING_SLICE_ARG(end_label));        \
+      } else if (!string_slices_are_equal(&(begin_label), &(end_label))) { \
+        wast_parser_error(&loc, lexer, parser,                             \
+                          "mismatching label \"" PRIstringslice            \
+                          "\" != \"" PRIstringslice "\"",                  \
+                          WABT_PRINTF_STRING_SLICE_ARG(begin_label),       \
+                          WABT_PRINTF_STRING_SLICE_ARG(end_label));        \
+      }                                                                    \
+      destroy_string_slice(&(end_label));                                  \
+    }                                                                      \
+  } while (0)
+
+#define CHECK_ALLOW_EXCEPTIONS(loc, opcode_name)                      \
+  do {                                                                \
+    if (!parser->options->allow_exceptions) {                         \
+      wast_parser_error(loc, lexer, parser, "opcode not allowed: %s", \
+                        opcode_name);                                 \
+    }                                                                 \
+ } while (0)
+
+#define YYMALLOC(size) new char [size]
+#define YYFREE(p) delete [] (p)
+
+#define USE_NATURAL_ALIGNMENT (~0)
+
+namespace wabt {
+
+static bool is_power_of_two(uint32_t x) {
+  return x && ((x & (x - 1)) == 0);
+}
+
+static ExprList join_exprs1(Location* loc, Expr* expr1);
+static ExprList join_exprs2(Location* loc, ExprList* expr1, Expr* expr2);
+static ExprList join_expr_lists(ExprList* expr1, ExprList* expr2);
+
+static Result parse_const(Type type,
+                          LiteralType literal_type,
+                          const char* s,
+                          const char* end,
+                          Const* out);
+static void dup_text_list(TextList* text_list,
+                          char** out_data,
+                          size_t* out_size);
+
+static void reverse_bindings(TypeVector*, BindingHash*);
+
+static bool is_empty_signature(const FuncSignature* sig);
+
+static void check_import_ordering(Location* loc,
+                                  WastLexer* lexer,
+                                  WastParser* parser,
+                                  Module* module,
+                                  ModuleField* first);
+static void append_module_fields(Module*, ModuleField*);
+
+class BinaryErrorHandlerModule : public BinaryErrorHandler {
+ public:
+  BinaryErrorHandlerModule(Location* loc, WastLexer* lexer, WastParser* parser);
+  bool OnError(Offset offset, const std::string& error) override;
+
+ private:
+  Location* loc_;
+  WastLexer* lexer_;
+  WastParser* parser_;
+};
+
+#define wabt_wast_parser_lex(...) lexer->GetToken(__VA_ARGS__, parser)
+#define wabt_wast_parser_error wast_parser_error
+
+
+#line 214 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:339  */
+
+# ifndef YY_NULLPTR
+#  if defined __cplusplus && 201103L <= __cplusplus
+#   define YY_NULLPTR nullptr
+#  else
+#   define YY_NULLPTR 0
+#  endif
+# endif
+
+/* Enabling verbose error messages.  */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 1
+#endif
+
+/* In a future release of Bison, this section will be replaced
+   by #include "wast-parser-gen.hh".  */
+#ifndef YY_WABT_WAST_PARSER_SRC_PREBUILT_WAST_PARSER_GEN_HH_INCLUDED
+# define YY_WABT_WAST_PARSER_SRC_PREBUILT_WAST_PARSER_GEN_HH_INCLUDED
+/* Debug traces.  */
+#ifndef WABT_WAST_PARSER_DEBUG
+# if defined YYDEBUG
+#if YYDEBUG
+#   define WABT_WAST_PARSER_DEBUG 1
+#  else
+#   define WABT_WAST_PARSER_DEBUG 0
+#  endif
+# else /* ! defined YYDEBUG */
+#  define WABT_WAST_PARSER_DEBUG 0
+# endif /* ! defined YYDEBUG */
+#endif  /* ! defined WABT_WAST_PARSER_DEBUG */
+#if WABT_WAST_PARSER_DEBUG
+extern int wabt_wast_parser_debug;
+#endif
+
+/* Token type.  */
+#ifndef WABT_WAST_PARSER_TOKENTYPE
+# define WABT_WAST_PARSER_TOKENTYPE
+  enum wabt_wast_parser_tokentype
+  {
+    WABT_TOKEN_TYPE_EOF = 0,
+    WABT_TOKEN_TYPE_LPAR = 258,
+    WABT_TOKEN_TYPE_RPAR = 259,
+    WABT_TOKEN_TYPE_NAT = 260,
+    WABT_TOKEN_TYPE_INT = 261,
+    WABT_TOKEN_TYPE_FLOAT = 262,
+    WABT_TOKEN_TYPE_TEXT = 263,
+    WABT_TOKEN_TYPE_VAR = 264,
+    WABT_TOKEN_TYPE_VALUE_TYPE = 265,
+    WABT_TOKEN_TYPE_ANYFUNC = 266,
+    WABT_TOKEN_TYPE_MUT = 267,
+    WABT_TOKEN_TYPE_NOP = 268,
+    WABT_TOKEN_TYPE_DROP = 269,
+    WABT_TOKEN_TYPE_BLOCK = 270,
+    WABT_TOKEN_TYPE_END = 271,
+    WABT_TOKEN_TYPE_IF = 272,
+    WABT_TOKEN_TYPE_THEN = 273,
+    WABT_TOKEN_TYPE_ELSE = 274,
+    WABT_TOKEN_TYPE_LOOP = 275,
+    WABT_TOKEN_TYPE_BR = 276,
+    WABT_TOKEN_TYPE_BR_IF = 277,
+    WABT_TOKEN_TYPE_BR_TABLE = 278,
+    WABT_TOKEN_TYPE_TRY = 279,
+    WABT_TOKEN_TYPE_CATCH = 280,
+    WABT_TOKEN_TYPE_CATCH_ALL = 281,
+    WABT_TOKEN_TYPE_THROW = 282,
+    WABT_TOKEN_TYPE_RETHROW = 283,
+    WABT_TOKEN_TYPE_CALL = 284,
+    WABT_TOKEN_TYPE_CALL_INDIRECT = 285,
+    WABT_TOKEN_TYPE_RETURN = 286,
+    WABT_TOKEN_TYPE_GET_LOCAL = 287,
+    WABT_TOKEN_TYPE_SET_LOCAL = 288,
+    WABT_TOKEN_TYPE_TEE_LOCAL = 289,
+    WABT_TOKEN_TYPE_GET_GLOBAL = 290,
+    WABT_TOKEN_TYPE_SET_GLOBAL = 291,
+    WABT_TOKEN_TYPE_LOAD = 292,
+    WABT_TOKEN_TYPE_STORE = 293,
+    WABT_TOKEN_TYPE_OFFSET_EQ_NAT = 294,
+    WABT_TOKEN_TYPE_ALIGN_EQ_NAT = 295,
+    WABT_TOKEN_TYPE_CONST = 296,
+    WABT_TOKEN_TYPE_UNARY = 297,
+    WABT_TOKEN_TYPE_BINARY = 298,
+    WABT_TOKEN_TYPE_COMPARE = 299,
+    WABT_TOKEN_TYPE_CONVERT = 300,
+    WABT_TOKEN_TYPE_SELECT = 301,
+    WABT_TOKEN_TYPE_UNREACHABLE = 302,
+    WABT_TOKEN_TYPE_CURRENT_MEMORY = 303,
+    WABT_TOKEN_TYPE_GROW_MEMORY = 304,
+    WABT_TOKEN_TYPE_FUNC = 305,
+    WABT_TOKEN_TYPE_START = 306,
+    WABT_TOKEN_TYPE_TYPE = 307,
+    WABT_TOKEN_TYPE_PARAM = 308,
+    WABT_TOKEN_TYPE_RESULT = 309,
+    WABT_TOKEN_TYPE_LOCAL = 310,
+    WABT_TOKEN_TYPE_GLOBAL = 311,
+    WABT_TOKEN_TYPE_TABLE = 312,
+    WABT_TOKEN_TYPE_ELEM = 313,
+    WABT_TOKEN_TYPE_MEMORY = 314,
+    WABT_TOKEN_TYPE_DATA = 315,
+    WABT_TOKEN_TYPE_OFFSET = 316,
+    WABT_TOKEN_TYPE_IMPORT = 317,
+    WABT_TOKEN_TYPE_EXPORT = 318,
+    WABT_TOKEN_TYPE_EXCEPT = 319,
+    WABT_TOKEN_TYPE_MODULE = 320,
+    WABT_TOKEN_TYPE_BIN = 321,
+    WABT_TOKEN_TYPE_QUOTE = 322,
+    WABT_TOKEN_TYPE_REGISTER = 323,
+    WABT_TOKEN_TYPE_INVOKE = 324,
+    WABT_TOKEN_TYPE_GET = 325,
+    WABT_TOKEN_TYPE_ASSERT_MALFORMED = 326,
+    WABT_TOKEN_TYPE_ASSERT_INVALID = 327,
+    WABT_TOKEN_TYPE_ASSERT_UNLINKABLE = 328,
+    WABT_TOKEN_TYPE_ASSERT_RETURN = 329,
+    WABT_TOKEN_TYPE_ASSERT_RETURN_CANONICAL_NAN = 330,
+    WABT_TOKEN_TYPE_ASSERT_RETURN_ARITHMETIC_NAN = 331,
+    WABT_TOKEN_TYPE_ASSERT_TRAP = 332,
+    WABT_TOKEN_TYPE_ASSERT_EXHAUSTION = 333,
+    WABT_TOKEN_TYPE_LOW = 334
+  };
+#endif
+
+/* Value type.  */
+#if ! defined WABT_WAST_PARSER_STYPE && ! defined WABT_WAST_PARSER_STYPE_IS_DECLARED
+typedef ::wabt::Token WABT_WAST_PARSER_STYPE;
+# define WABT_WAST_PARSER_STYPE_IS_TRIVIAL 1
+# define WABT_WAST_PARSER_STYPE_IS_DECLARED 1
+#endif
+
+/* Location type.  */
+#if ! defined WABT_WAST_PARSER_LTYPE && ! defined WABT_WAST_PARSER_LTYPE_IS_DECLARED
+typedef struct WABT_WAST_PARSER_LTYPE WABT_WAST_PARSER_LTYPE;
+struct WABT_WAST_PARSER_LTYPE
+{
+  int first_line;
+  int first_column;
+  int last_line;
+  int last_column;
+};
+# define WABT_WAST_PARSER_LTYPE_IS_DECLARED 1
+# define WABT_WAST_PARSER_LTYPE_IS_TRIVIAL 1
+#endif
+
+
+
+int wabt_wast_parser_parse (::wabt::WastLexer* lexer, ::wabt::WastParser* parser);
+
+#endif /* !YY_WABT_WAST_PARSER_SRC_PREBUILT_WAST_PARSER_GEN_HH_INCLUDED  */
+
+/* Copy the second part of user declarations.  */
+
+#line 367 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:358  */
+
+#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#else
+typedef signed char yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+#  define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+#  define YYSIZE_T size_t
+# elif ! defined YYSIZE_T
+#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYSIZE_T size_t
+# else
+#  define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if defined YYENABLE_NLS && YYENABLE_NLS
+#  if ENABLE_NLS
+#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+#   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
+#  endif
+# endif
+# ifndef YY_
+#  define YY_(Msgid) Msgid
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE
+# if (defined __GNUC__                                               \
+      && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__)))  \
+     || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
+#  define YY_ATTRIBUTE(Spec) __attribute__(Spec)
+# else
+#  define YY_ATTRIBUTE(Spec) /* empty */
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE_PURE
+# define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))
+#endif
+
+#ifndef YY_ATTRIBUTE_UNUSED
+# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
+#endif
+
+#if !defined _Noreturn \
+     && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
+# if defined _MSC_VER && 1200 <= _MSC_VER
+#  define _Noreturn __declspec (noreturn)
+# else
+#  define _Noreturn YY_ATTRIBUTE ((__noreturn__))
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E.  */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(E) ((void) (E))
+#else
+# define YYUSE(E) /* empty */
+#endif
+
+#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+/* Suppress an incorrect diagnostic about yylval being uninitialized.  */
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+    _Pragma ("GCC diagnostic push") \
+    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
+    _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+    _Pragma ("GCC diagnostic pop")
+#else
+# define YY_INITIAL_VALUE(Value) Value
+#endif
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
+#endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
+#endif
+
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols.  */
+
+# ifdef YYSTACK_USE_ALLOCA
+#  if YYSTACK_USE_ALLOCA
+#   ifdef __GNUC__
+#    define YYSTACK_ALLOC __builtin_alloca
+#   elif defined __BUILTIN_VA_ARG_INCR
+#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+#   elif defined _AIX
+#    define YYSTACK_ALLOC __alloca
+#   elif defined _MSC_VER
+#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+#    define alloca _alloca
+#   else
+#    define YYSTACK_ALLOC alloca
+#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
+#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+      /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
+#     ifndef EXIT_SUCCESS
+#      define EXIT_SUCCESS 0
+#     endif
+#    endif
+#   endif
+#  endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+   /* Pacify GCC's 'empty if-body' warning.  */
+#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+    /* The OS might guarantee only one guard page at the bottom of the stack,
+       and a page size can be as small as 4096 bytes.  So we cannot safely
+       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
+       to allow for a few compiler-allocated temporary stack slots.  */
+#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+#  endif
+# else
+#  define YYSTACK_ALLOC YYMALLOC
+#  define YYSTACK_FREE YYFREE
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+#  endif
+#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
+       && ! ((defined YYMALLOC || defined malloc) \
+             && (defined YYFREE || defined free)))
+#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#   ifndef EXIT_SUCCESS
+#    define EXIT_SUCCESS 0
+#   endif
+#  endif
+#  ifndef YYMALLOC
+#   define YYMALLOC malloc
+#   if ! defined malloc && ! defined EXIT_SUCCESS
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+#  ifndef YYFREE
+#   define YYFREE free
+#   if ! defined free && ! defined EXIT_SUCCESS
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+# endif
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined yyoverflow \
+     && (! defined __cplusplus \
+         || (defined WABT_WAST_PARSER_LTYPE_IS_TRIVIAL && WABT_WAST_PARSER_LTYPE_IS_TRIVIAL \
+             && defined WABT_WAST_PARSER_STYPE_IS_TRIVIAL && WABT_WAST_PARSER_STYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member.  */
+union yyalloc
+{
+  yytype_int16 yyss_alloc;
+  YYSTYPE yyvs_alloc;
+  YYLTYPE yyls_alloc;
+};
+
+/* The size of the maximum gap between one aligned stack and the next.  */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+   N elements.  */
+# define YYSTACK_BYTES(N) \
+     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
+      + 2 * YYSTACK_GAP_MAXIMUM)
+
+# define YYCOPY_NEEDED 1
+
+/* Relocate STACK from its old location to the new one.  The
+   local variables YYSIZE and YYSTACKSIZE give the old and new number of
+   elements in the stack, and YYPTR gives the new location of the
+   stack.  Advance YYPTR to a properly aligned location for the next
+   stack.  */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
+    do                                                                  \
+      {                                                                 \
+        YYSIZE_T yynewbytes;                                            \
+        YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
+        Stack = &yyptr->Stack_alloc;                                    \
+        yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+        yyptr += yynewbytes / sizeof (*yyptr);                          \
+      }                                                                 \
+    while (0)
+
+#endif
+
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from SRC to DST.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if defined __GNUC__ && 1 < __GNUC__
+#   define YYCOPY(Dst, Src, Count) \
+      __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
+#  else
+#   define YYCOPY(Dst, Src, Count)              \
+      do                                        \
+        {                                       \
+          YYSIZE_T yyi;                         \
+          for (yyi = 0; yyi < (Count); yyi++)   \
+            (Dst)[yyi] = (Src)[yyi];            \
+        }                                       \
+      while (0)
+#  endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
+/* YYFINAL -- State number of the termination state.  */
+#define YYFINAL  52
+/* YYLAST -- Last index in YYTABLE.  */
+#define YYLAST   1148
+
+/* YYNTOKENS -- Number of terminals.  */
+#define YYNTOKENS  80
+/* YYNNTS -- Number of nonterminals.  */
+#define YYNNTS  87
+/* YYNRULES -- Number of rules.  */
+#define YYNRULES  216
+/* YYNSTATES -- Number of states.  */
+#define YYNSTATES  477
+
+/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
+   by yylex, with out-of-bounds checking.  */
+#define YYUNDEFTOK  2
+#define YYMAXUTOK   334
+
+#define YYTRANSLATE(YYX)                                                \
+  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
+   as returned by yylex, without out-of-bounds checking.  */
+static const yytype_uint8 yytranslate[] =
+{
+       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
+       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
+      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
+      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
+      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
+      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
+      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
+      65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
+      75,    76,    77,    78,    79
+};
+
+#if WABT_WAST_PARSER_DEBUG
+  /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
+static const yytype_uint16 yyrline[] =
+{
+       0,   262,   262,   268,   278,   279,   283,   301,   302,   308,
+     311,   316,   324,   328,   329,   334,   343,   344,   352,   358,
+     364,   369,   376,   382,   393,   397,   401,   408,   412,   420,
+     421,   428,   429,   432,   436,   437,   441,   442,   458,   459,
+     474,   475,   476,   480,   483,   486,   489,   492,   496,   500,
+     504,   507,   511,   515,   519,   523,   527,   531,   535,   538,
+     541,   554,   557,   560,   563,   566,   569,   572,   576,   583,
+     588,   593,   598,   604,   612,   615,   620,   627,   632,   639,
+     640,   646,   650,   653,   658,   663,   669,   677,   683,   687,
+     691,   704,   707,   713,   721,   724,   728,   732,   736,   740,
+     744,   751,   756,   762,   768,   769,   777,   778,   786,   791,
+     799,   808,   822,   830,   835,   846,   854,   865,   872,   873,
+     879,   889,   890,   899,   906,   907,   913,   923,   924,   933,
+     940,   944,   949,   961,   964,   968,   978,   992,  1006,  1012,
+    1020,  1028,  1048,  1058,  1072,  1086,  1091,  1099,  1107,  1131,
+    1145,  1151,  1159,  1172,  1181,  1189,  1195,  1201,  1207,  1215,
+    1225,  1233,  1239,  1245,  1251,  1257,  1265,  1274,  1284,  1291,
+    1302,  1311,  1312,  1313,  1314,  1315,  1316,  1317,  1318,  1319,
+    1320,  1321,  1325,  1326,  1330,  1335,  1343,  1363,  1370,  1373,
+    1381,  1399,  1407,  1418,  1429,  1440,  1446,  1452,  1458,  1464,
+    1470,  1475,  1480,  1486,  1495,  1500,  1501,  1506,  1516,  1520,
+    1527,  1539,  1540,  1547,  1550,  1610,  1622
+};
+#endif
+
+#if WABT_WAST_PARSER_DEBUG || YYERROR_VERBOSE || 1
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
+static const char *const yytname[] =
+{
+  "\"EOF\"", "error", "$undefined", "\"(\"", "\")\"", "NAT", "INT",
+  "FLOAT", "TEXT", "VAR", "VALUE_TYPE", "ANYFUNC", "MUT", "NOP", "DROP",
+  "BLOCK", "END", "IF", "THEN", "ELSE", "LOOP", "BR", "BR_IF", "BR_TABLE",
+  "TRY", "CATCH", "CATCH_ALL", "THROW", "RETHROW", "CALL", "CALL_INDIRECT",
+  "RETURN", "GET_LOCAL", "SET_LOCAL", "TEE_LOCAL", "GET_GLOBAL",
+  "SET_GLOBAL", "LOAD", "STORE", "OFFSET_EQ_NAT", "ALIGN_EQ_NAT", "CONST",
+  "UNARY", "BINARY", "COMPARE", "CONVERT", "SELECT", "UNREACHABLE",
+  "CURRENT_MEMORY", "GROW_MEMORY", "FUNC", "START", "TYPE", "PARAM",
+  "RESULT", "LOCAL", "GLOBAL", "TABLE", "ELEM", "MEMORY", "DATA", "OFFSET",
+  "IMPORT", "EXPORT", "EXCEPT", "MODULE", "BIN", "QUOTE", "REGISTER",
+  "INVOKE", "GET", "ASSERT_MALFORMED", "ASSERT_INVALID",
+  "ASSERT_UNLINKABLE", "ASSERT_RETURN", "ASSERT_RETURN_CANONICAL_NAN",
+  "ASSERT_RETURN_ARITHMETIC_NAN", "ASSERT_TRAP", "ASSERT_EXHAUSTION",
+  "LOW", "$accept", "text_list", "text_list_opt", "quoted_text",
+  "value_type_list", "elem_type", "global_type", "func_type", "func_sig",
+  "func_sig_result", "table_sig", "memory_sig", "limits", "type_use",
+  "nat", "literal", "var", "var_list", "bind_var_opt", "bind_var",
+  "labeling_opt", "offset_opt", "align_opt", "instr", "plain_instr",
+  "block_instr", "block_sig", "block", "catch_instr", "catch_instr_list",
+  "expr", "expr1", "try_", "try_instr_list", "catch_list", "if_block",
+  "if_", "rethrow_check", "throw_check", "try_check", "instr_list",
+  "expr_list", "const_expr", "exception", "exception_field", "func",
+  "func_fields", "func_fields_import", "func_fields_import1",
+  "func_fields_import_result", "func_fields_body", "func_fields_body1",
+  "func_result_body", "func_body", "func_body1", "offset", "elem", "table",
+  "table_fields", "data", "memory", "memory_fields", "global",
+  "global_fields", "import_desc", "import", "inline_import", "export_desc",
+  "export", "inline_export", "type_def", "start", "module_field",
+  "module_fields_opt", "module_fields", "module", "inline_module",
+  "script_var_opt", "script_module", "action", "assertion", "cmd",
+  "cmd_list", "const", "const_list", "script", "script_start", YY_NULLPTR
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[NUM] -- (External) token number corresponding to the
+   (internal) symbol number NUM (which must be that of a token).  */
+static const yytype_uint16 yytoknum[] =
+{
+       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
+     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
+     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
+     285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
+     295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
+     305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
+     315,   316,   317,   318,   319,   320,   321,   322,   323,   324,
+     325,   326,   327,   328,   329,   330,   331,   332,   333,   334
+};
+# endif
+
+#define YYPACT_NINF -378
+
+#define yypact_value_is_default(Yystate) \
+  (!!((Yystate) == (-378)))
+
+#define YYTABLE_NINF -31
+
+#define yytable_value_is_error(Yytable_value) \
+  0
+
+  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+     STATE-NUM.  */
+static const yytype_int16 yypact[] =
+{
+      25,  1070,  -378,  -378,  -378,  -378,  -378,  -378,  -378,  -378,
+    -378,  -378,  -378,  -378,  -378,    36,  -378,  -378,  -378,  -378,
+    -378,  -378,    52,  -378,    84,    85,   134,   145,    85,    85,
+     146,    85,   146,   107,   107,    85,    85,   107,   138,   138,
+     162,   162,   162,   179,   179,   179,   211,   179,   148,  -378,
+     222,  -378,  -378,  -378,   462,  -378,  -378,  -378,  -378,   224,
+     185,   258,   242,    51,   118,   413,   261,  -378,  -378,    67,
+     261,   271,  -378,   107,   279,  -378,    14,   138,  -378,   107,
+     107,   223,   107,   107,   107,   104,  -378,   307,   311,   127,
+     107,   107,   107,   369,  -378,  -378,    85,    85,    85,   134,
+     134,  -378,  -378,  -378,  -378,   134,   134,  -378,   134,   134,
+     134,   134,   134,   281,   281,   151,  -378,  -378,  -378,  -378,
+    -378,  -378,  -378,  -378,   499,   536,  -378,  -378,  -378,   134,
+     134,    85,  -378,   317,  -378,  -378,  -378,  -378,  -378,   319,
+     462,  -378,   320,  -378,   322,    33,  -378,   536,   323,   106,
+      51,   131,  -378,   325,  -378,   324,   326,   329,   326,   118,
+      85,    85,    85,   536,   327,   330,    85,  -378,   126,   121,
+    -378,  -378,   333,   326,    67,   271,  -378,   331,   334,   338,
+     159,   343,    27,   271,   271,   345,    36,   347,  -378,   349,
+     350,   351,   352,   264,  -378,  -378,   353,   354,   356,   134,
+      85,  -378,    85,   107,   107,  -378,   573,   573,   573,  -378,
+    -378,   134,  -378,  -378,  -378,  -378,  -378,  -378,  -378,  -378,
+     328,   328,  -378,  -378,  -378,  -378,   758,  -378,  1069,  -378,
+    -378,  -378,   573,  -378,   200,   361,  -378,  -378,  -378,  -378,
+     248,   370,  -378,  -378,   355,  -378,  -378,  -378,   363,  -378,
+    -378,   315,  -378,  -378,  -378,  -378,  -378,   573,   373,   573,
+     381,   327,  -378,  -378,   610,   232,  -378,  -378,   271,  -378,
+    -378,  -378,   384,  -378,  -378,   170,  -378,   390,   134,   134,
+     134,   134,   134,  -378,  -378,  -378,   213,   240,  -378,  -378,
+     282,  -378,  -378,  -378,  -378,   336,  -378,  -378,  -378,  -378,
+    -378,   391,   157,   398,   165,   176,   399,   107,   415,   957,
+     573,   404,  -378,   247,   409,   241,  -378,  -378,  -378,   288,
+      85,  -378,   263,  -378,    85,  -378,  -378,   425,  -378,  -378,
+     919,   373,   435,  -378,  -378,  -378,  -378,  -378,   881,   647,
+     610,  -378,  -378,  -378,  -378,   448,  -378,    85,    85,    85,
+      85,  -378,   449,   459,   460,   463,   464,  -378,  -378,  -378,
+     151,  -378,   499,   465,   684,   721,   466,   467,  -378,  -378,
+    -378,    85,    85,    85,    85,   134,   536,   288,   423,   181,
+     456,   191,   209,   468,   221,  -378,   238,   536,  -378,  1032,
+     327,   469,   995,  -378,  -378,  -378,   477,   106,   326,   326,
+    -378,  -378,  -378,  -378,  -378,   483,  -378,   499,   801,  -378,
+     844,  -378,   721,  -378,   228,  -378,  -378,   536,  -378,   536,
+    -378,  -378,    85,   361,   484,   478,   320,   497,   512,  -378,
+     513,   536,  -378,   515,   219,   520,   521,   534,   548,   550,
+    -378,  -378,  -378,  -378,   539,  -378,  -378,  -378,   361,   418,
+    -378,  -378,   320,   507,  -378,   559,   571,   288,  -378,  -378,
+    -378,  -378,  -378,  -378,    85,  -378,  -378,   570,   588,  -378,
+     536,   579,   595,   536,  -378,   608,  -378
+};
+
+  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
+     Performed when YYTABLE does not specify something else to do.  Zero
+     means the default is an error.  */
+static const yytype_uint8 yydefact[] =
+{
+     213,     0,   110,   181,   175,   176,   173,   177,   174,   172,
+     179,   180,   171,   178,   184,   187,   206,   215,   186,   204,
+     205,   208,   214,   216,     0,    31,     0,     0,    31,    31,
+       0,    31,     0,     0,     0,    31,    31,     0,   188,   188,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   185,
+       0,   209,     1,    33,   104,    32,    23,    28,    27,     0,
+       0,     0,     0,     0,     0,     0,     0,   134,    29,     0,
+       0,     4,     6,     0,     0,     7,   182,   188,   189,     0,
+       0,     0,     0,     0,     0,     0,   211,     0,     0,     0,
+       0,     0,     0,     0,    44,    45,    34,    34,    34,     0,
+       0,    29,   103,   102,   101,     0,     0,    50,     0,     0,
+       0,     0,     0,    36,    36,     0,    61,    62,    63,    64,
+      46,    43,    65,    66,   104,   104,    40,    41,    42,     0,
+       0,    34,   130,     0,   113,   123,   124,   127,   129,   121,
+     104,   170,    16,   168,     0,     0,    10,   104,     0,     0,
+       0,     0,     9,     0,   138,     0,    20,     0,     0,     0,
+      34,    34,    34,   104,   106,     0,    34,    29,     0,     0,
+     145,    19,     0,     0,     0,     4,     2,     5,     0,     0,
+       0,     0,     0,     0,     0,     0,   183,     0,   211,     0,
+       0,     0,     0,     0,   200,   201,     0,     0,     0,     0,
+       7,     7,     7,     0,     0,    35,   104,   104,   104,    47,
+      48,     0,    51,    52,    53,    54,    55,    56,    57,    37,
+      38,    38,    24,    25,    26,    60,     0,   112,     0,   105,
+      68,    67,   104,   111,     0,   121,   115,   117,   118,   116,
+       0,     0,    13,   169,     0,   108,   150,   149,     0,   151,
+     152,     0,    18,    21,   137,   139,   140,   104,     0,   104,
+       0,   106,    82,    81,     0,     0,   136,    30,     4,   144,
+     146,   147,     0,     3,   143,     0,   158,     0,     0,     0,
+       0,     0,     0,   166,   109,     8,     0,     0,   190,   207,
+       0,   194,   195,   196,   197,     0,   199,   212,   198,   202,
+     203,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     104,     0,    76,     0,     0,    49,    39,    58,    59,     0,
+       7,     7,     0,   114,     7,     7,    12,     0,    29,    83,
+       0,     0,     0,    85,    94,    84,   133,   107,     0,     0,
+       0,    86,    88,    89,   135,     0,   142,    31,    31,    31,
+      31,   159,     0,     0,     0,     0,     0,   191,   192,   193,
+       0,    22,   104,     0,   104,   104,     0,     0,   167,     7,
+      75,    34,    34,    34,    34,     0,   104,    79,     0,     0,
+       0,     0,     0,     0,     0,    11,     0,   104,    93,     0,
+     100,     0,     0,    90,    87,   148,    16,     0,     0,     0,
+     161,   164,   162,   163,   165,     0,   125,   104,     0,   128,
+       0,   131,   104,   160,     0,    69,    71,   104,    70,   104,
+      78,    80,    34,   121,     0,   121,    16,     0,    16,   141,
+       0,   104,    99,    91,     0,     0,     0,     0,     0,     0,
+     210,   126,   132,    74,     0,    77,    73,   119,   121,     0,
+     122,    14,    16,     0,    17,    96,     0,     0,    92,   154,
+     153,   157,   155,   156,    34,   120,    15,     0,    98,    72,
+     104,     0,     0,   104,    95,     0,    97
+};
+
+  /* YYPGOTO[NTERM-NUM].  */
+static const yytype_int16 yypgoto[] =
+{
+    -378,   135,  -150,    80,  -180,   437,  -136,   564,  -328,   201,
+    -147,  -159,   -63,  -131,   -54,   268,   -23,   -89,    31,    22,
+     -97,   522,   414,  -212,   -60,  -378,  -228,  -184,  -284,   272,
+     -28,  -378,   332,   364,   230,   335,  -378,  -378,  -378,   -49,
+    -107,   412,   502,   523,  -378,  -378,   546,   474,  -377,   275,
+     586,  -333,   359,  -378,  -322,    76,  -378,  -378,   578,  -378,
+    -378,   565,  -378,   590,  -378,  -378,   -37,  -378,  -378,    28,
+    -378,  -378,     4,  -378,   670,  -378,  -378,     2,    92,   262,
+    -378,   725,  -378,  -378,   572,  -378,  -378
+};
+
+  /* YYDEFGOTO[NTERM-NUM].  */
+static const yytype_int16 yydefgoto[] =
+{
+      -1,   177,   178,    73,   182,   153,   147,    61,   241,   242,
+     154,   170,   155,   124,    58,   225,   267,   168,    54,   205,
+     206,   220,   317,   125,   126,   127,   310,   311,   391,   378,
+     128,   165,   341,   342,   343,   333,   334,   129,   130,   131,
+     132,   262,   246,     2,     3,     4,   133,   236,   237,   238,
+     134,   135,   136,   137,   138,    68,     5,     6,   157,     7,
+       8,   172,     9,   148,   277,    10,   139,   181,    11,   140,
+      12,    13,    14,   185,    15,    16,    17,    79,    18,    19,
+      20,    21,    22,   297,   193,    23,    24
+};
+
+  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
+     positive, shift that token.  If negative, reduce the rule whose
+     number is the opposite.  If YYTABLE_NINF, syntax error.  */
+static const yytype_int16 yytable[] =
+{
+     207,   208,    67,    59,    67,   164,   171,    66,   235,    70,
+     156,   255,   211,   249,   270,   156,   166,    48,   229,    49,
+     302,   304,   305,   313,   314,   272,   149,   158,     1,   406,
+     331,   284,   173,   164,   232,   377,   340,   285,    67,    48,
+     245,    80,    67,   411,   166,   244,   447,    55,   319,    62,
+      55,    55,   339,    55,   145,    50,   245,    55,    55,    63,
+      64,   146,    69,   257,   258,   259,    75,    76,   435,   264,
+     169,   465,    56,   329,   441,   335,   209,   210,   265,   187,
+     183,   184,   212,   213,    52,   214,   215,   216,   217,   218,
+     442,   150,   159,   377,    53,   203,   204,   174,   451,   312,
+     312,   312,   253,   331,   156,   156,   230,   231,    71,   248,
+     171,   171,   340,   149,    74,    72,   146,    77,   345,   156,
+     156,   151,   158,    56,   466,   312,   370,   339,   339,   152,
+     266,    56,    82,    83,    84,    57,   261,   173,    90,    56,
+     379,   381,   167,    57,   382,   384,   175,    78,    60,    65,
+     312,    56,   312,   179,    53,    57,   222,   223,   224,   188,
+     189,   362,   190,   191,   192,    81,   164,   285,   164,   364,
+     196,   197,   198,    38,    39,   285,   301,   166,   150,   166,
+     365,   268,    85,   203,   204,   423,   285,   159,   315,   414,
+      49,   285,    36,   203,   204,   425,    38,    39,    25,    26,
+      27,   285,   174,   312,    28,    29,    30,    31,    32,   278,
+      33,    34,    35,   426,    89,   279,   280,   357,   281,   285,
+     347,   273,   303,   282,   306,   428,   348,   349,   141,   350,
+     332,   285,   443,   261,    35,   142,   344,    56,   285,   386,
+     439,    57,   429,    56,   358,    60,   -30,    57,   273,   164,
+     -30,   438,   199,   320,   321,   352,   353,   354,   355,   356,
+     166,   437,   143,   372,    65,   436,   373,   295,   296,   420,
+     164,   199,   324,   325,   415,   416,   417,   418,   164,   176,
+     430,   166,   180,   307,   308,   295,   359,    36,    36,   166,
+      37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
+      47,   324,   325,   332,   390,    86,    87,    88,    91,    92,
+     444,   194,   445,   375,   376,   195,   320,   321,   286,   287,
+     219,   233,   234,   240,   456,   446,   243,   247,   251,   164,
+     228,    56,   164,   254,   263,   152,   171,   269,   274,   273,
+     166,   275,   380,   166,   156,   156,   383,   283,   164,   288,
+     164,   289,   419,   291,   292,   293,   294,   298,   299,   166,
+     300,   166,   432,   472,   322,   327,   475,   469,   316,    55,
+      55,    55,    55,   328,   326,   244,   330,   360,   396,   397,
+     398,   399,    94,    95,   160,   336,   161,   367,   346,   162,
+      99,   100,   101,   102,   351,   361,   103,   104,   105,   106,
+     107,   108,   109,   110,   111,   112,   113,   114,   363,   366,
+     115,   116,   117,   118,   119,   120,   121,   122,   123,   368,
+     371,   199,   200,   201,   202,   374,    94,    95,   160,   385,
+     161,   203,   204,   162,    99,   100,   101,   102,   389,   422,
+     103,   104,   105,   106,   107,   108,   109,   110,   111,   112,
+     113,   114,   395,   400,   115,   116,   117,   118,   119,   120,
+     121,   122,   123,   401,   402,    93,   424,   403,   404,   407,
+     412,   413,   321,   433,   163,    94,    95,    96,   427,    97,
+     434,   449,    98,    99,   100,   101,   102,   440,   448,   103,
+     104,   105,   106,   107,   108,   109,   110,   111,   112,   113,
+     114,   452,   226,   115,   116,   117,   118,   119,   120,   121,
+     122,   123,    94,    95,    96,   453,    97,   455,   457,    98,
+      99,   100,   101,   102,   459,   460,   103,   104,   105,   106,
+     107,   108,   109,   110,   111,   112,   113,   114,   461,   228,
+     115,   116,   117,   118,   119,   120,   121,   122,   123,    94,
+      95,    96,   462,    97,   463,   464,    98,    99,   100,   101,
+     102,   325,   467,   103,   104,   105,   106,   107,   108,   109,
+     110,   111,   112,   113,   114,   468,   309,   115,   116,   117,
+     118,   119,   120,   121,   122,   123,    94,    95,    96,   470,
+      97,   471,   252,    98,    99,   100,   101,   102,   473,   474,
+     103,   104,   105,   106,   107,   108,   109,   110,   111,   112,
+     113,   114,   476,   338,   115,   116,   117,   118,   119,   120,
+     121,   122,   123,    94,    95,    96,   144,    97,   405,   454,
+      98,    99,   100,   101,   102,   318,   221,   103,   104,   105,
+     106,   107,   108,   109,   110,   111,   112,   113,   114,   421,
+     392,   115,   116,   117,   118,   119,   120,   121,   122,   123,
+      94,    95,    96,   458,    97,   260,   388,    98,    99,   100,
+     101,   102,   394,   337,   103,   104,   105,   106,   107,   108,
+     109,   110,   111,   112,   113,   114,   239,   408,   115,   116,
+     117,   118,   119,   120,   121,   122,   123,    94,    95,    96,
+     450,    97,   276,   393,    98,    99,   100,   101,   102,   323,
+     227,   103,   104,   105,   106,   107,   108,   109,   110,   111,
+     112,   113,   114,   409,   410,   115,   116,   117,   118,   119,
+     120,   121,   122,   123,    94,    95,    96,   256,    97,   271,
+     250,    98,    99,   100,   101,   102,   186,    51,   103,   104,
+     105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
+     290,     0,   115,   116,   117,   118,   119,   120,   121,   122,
+     123,    94,    95,   160,     0,   161,     0,     0,   162,    99,
+     100,   101,   102,     0,     0,   103,   104,   105,   106,   107,
+     108,   109,   110,   111,   112,   113,   114,     0,     0,   115,
+     116,   117,   118,   119,   120,   121,   122,   123,     0,     0,
+       0,   200,   201,   202,    94,    95,   160,     0,   161,     0,
+       0,   162,    99,   100,   101,   102,     0,     0,   103,   104,
+     105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
+       0,     0,   115,   116,   117,   118,   119,   120,   121,   122,
+     123,     0,     0,     0,     0,   201,   202,    94,    95,   160,
+       0,   161,     0,     0,   162,    99,   100,   101,   102,     0,
+       0,   103,   104,   105,   106,   107,   108,   109,   110,   111,
+     112,   113,   114,     0,     0,   115,   116,   117,   118,   119,
+     120,   121,   122,   123,    94,    95,   160,     0,   161,   202,
+       0,   162,    99,   100,   101,   102,   375,   376,   103,   104,
+     105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
+       0,     0,   115,   116,   117,   118,   119,   120,   121,   122,
+     123,     0,    94,    95,   160,   369,   161,   387,     0,   162,
+      99,   100,   101,   102,     0,     0,   103,   104,   105,   106,
+     107,   108,   109,   110,   111,   112,   113,   114,     0,     0,
+     115,   116,   117,   118,   119,   120,   121,   122,   123,     0,
+      94,    95,   160,   369,   161,     0,     0,   162,    99,   100,
+     101,   102,     0,     0,   103,   104,   105,   106,   107,   108,
+     109,   110,   111,   112,   113,   114,     0,     0,   115,   116,
+     117,   118,   119,   120,   121,   122,   123,     0,    94,    95,
+     160,   369,   161,     0,     0,   162,    99,   100,   101,   102,
+     375,   376,   103,   104,   105,   106,   107,   108,   109,   110,
+     111,   112,   113,   114,     0,     0,   115,   116,   117,   118,
+     119,   120,   121,   122,   123,    94,    95,   160,     0,   161,
+     431,     0,   162,    99,   100,   101,   102,     0,     0,   103,
+     104,   105,   106,   107,   108,   109,   110,   111,   112,   113,
+     114,     0,     0,   115,   116,   117,   118,   119,   120,   121,
+     122,   123,    94,    95,   160,     0,   161,     0,     0,   162,
+      99,   100,   101,   102,     0,     0,   103,   104,   105,   106,
+     107,   108,   109,   110,   111,   112,   113,   114,     0,     0,
+     115,   116,   117,   118,   119,   120,   121,   122,   123,     0,
+      25,    26,    27,     0,     0,     0,    28,    29,    30,    31,
+      32,     0,    33,    34,    35,    36,     0,     0,    37,    38,
+      39,    40,    41,    42,    43,    44,    45,    46,    47
+};
+
+static const yytype_int16 yycheck[] =
+{
+      97,    98,    30,    26,    32,    65,    69,    30,   139,    32,
+      64,   158,   101,   149,   173,    69,    65,     3,   125,    15,
+     200,   201,   202,   207,   208,   175,    63,    64,     3,   362,
+     258,     4,    69,    93,   131,   319,   264,    10,    66,     3,
+     147,    39,    70,   365,    93,    12,   423,    25,   232,    27,
+      28,    29,   264,    31,     3,     3,   163,    35,    36,    28,
+      29,    10,    31,   160,   161,   162,    35,    36,   396,   166,
+       3,   448,     5,   257,   407,   259,    99,   100,   167,    77,
+      66,    67,   105,   106,     0,   108,   109,   110,   111,   112,
+     412,    63,    64,   377,     9,    62,    63,    69,   426,   206,
+     207,   208,   156,   331,   158,   159,   129,   130,    32,     3,
+     173,   174,   340,   150,    34,     8,    10,    37,   268,   173,
+     174,     3,   159,     5,   452,   232,   310,   339,   340,    11,
+       4,     5,    40,    41,    42,     9,   164,   174,    46,     5,
+     320,   321,    66,     9,   324,   325,    70,     9,     3,     3,
+     257,     5,   259,    73,     9,     9,     5,     6,     7,    79,
+      80,     4,    82,    83,    84,     3,   226,    10,   228,     4,
+      90,    91,    92,    69,    70,    10,   199,   226,   150,   228,
+       4,    60,     3,    62,    63,     4,    10,   159,   211,   369,
+     186,    10,    65,    62,    63,     4,    69,    70,    50,    51,
+      52,    10,   174,   310,    56,    57,    58,    59,    60,    50,
+      62,    63,    64,     4,     3,    56,    57,     4,    59,    10,
+      50,     8,   200,    64,   202,     4,    56,    57,     4,    59,
+     258,    10,     4,   261,    64,    50,     4,     5,    10,   328,
+     399,     9,     4,     5,     4,     3,     5,     9,     8,   309,
+       9,   398,    52,    53,    54,   278,   279,   280,   281,   282,
+     309,   397,     4,    16,     3,   396,    19,     3,     4,   376,
+     330,    52,    53,    54,   371,   372,   373,   374,   338,     8,
+     387,   330,     3,   203,   204,     3,     4,    65,    65,   338,
+      68,    69,    70,    71,    72,    73,    74,    75,    76,    77,
+      78,    53,    54,   331,   332,    43,    44,    45,    46,    47,
+     417,     4,   419,    25,    26,     4,    53,    54,   183,   184,
+      39,     4,     3,     3,   431,   422,     4,     4,     3,   389,
+       3,     5,   392,     4,     4,    11,   399,     4,     4,     8,
+     389,     3,   320,   392,   398,   399,   324,     4,   408,     4,
+     410,     4,   375,     4,     4,     4,     4,     4,     4,   408,
+       4,   410,   390,   470,     3,    10,   473,   464,    40,   347,
+     348,   349,   350,    58,     4,    12,     3,    41,   347,   348,
+     349,   350,    13,    14,    15,     4,    17,   307,     4,    20,
+      21,    22,    23,    24,     4,     4,    27,    28,    29,    30,
+      31,    32,    33,    34,    35,    36,    37,    38,    10,    10,
+      41,    42,    43,    44,    45,    46,    47,    48,    49,     4,
+      16,    52,    53,    54,    55,    16,    13,    14,    15,     4,
+      17,    62,    63,    20,    21,    22,    23,    24,     3,    16,
+      27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
+      37,    38,     4,     4,    41,    42,    43,    44,    45,    46,
+      47,    48,    49,     4,     4,     3,    10,     4,     4,     4,
+       4,     4,    54,     4,    61,    13,    14,    15,    10,    17,
+       3,     3,    20,    21,    22,    23,    24,     4,     4,    27,
+      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
+      38,     4,     3,    41,    42,    43,    44,    45,    46,    47,
+      48,    49,    13,    14,    15,     3,    17,     4,     3,    20,
+      21,    22,    23,    24,     4,     4,    27,    28,    29,    30,
+      31,    32,    33,    34,    35,    36,    37,    38,     4,     3,
+      41,    42,    43,    44,    45,    46,    47,    48,    49,    13,
+      14,    15,     4,    17,     4,    16,    20,    21,    22,    23,
+      24,    54,     3,    27,    28,    29,    30,    31,    32,    33,
+      34,    35,    36,    37,    38,     4,     3,    41,    42,    43,
+      44,    45,    46,    47,    48,    49,    13,    14,    15,    19,
+      17,     3,   155,    20,    21,    22,    23,    24,    19,     4,
+      27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
+      37,    38,     4,     3,    41,    42,    43,    44,    45,    46,
+      47,    48,    49,    13,    14,    15,    62,    17,   360,   428,
+      20,    21,    22,    23,    24,   221,   114,    27,    28,    29,
+      30,    31,    32,    33,    34,    35,    36,    37,    38,   377,
+       3,    41,    42,    43,    44,    45,    46,    47,    48,    49,
+      13,    14,    15,   433,    17,   163,   331,    20,    21,    22,
+      23,    24,   340,   261,    27,    28,    29,    30,    31,    32,
+      33,    34,    35,    36,    37,    38,   140,     3,    41,    42,
+      43,    44,    45,    46,    47,    48,    49,    13,    14,    15,
+     425,    17,   179,   339,    20,    21,    22,    23,    24,   235,
+     124,    27,    28,    29,    30,    31,    32,    33,    34,    35,
+      36,    37,    38,   364,     3,    41,    42,    43,    44,    45,
+      46,    47,    48,    49,    13,    14,    15,   159,    17,   174,
+     150,    20,    21,    22,    23,    24,    76,    22,    27,    28,
+      29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
+     188,    -1,    41,    42,    43,    44,    45,    46,    47,    48,
+      49,    13,    14,    15,    -1,    17,    -1,    -1,    20,    21,
+      22,    23,    24,    -1,    -1,    27,    28,    29,    30,    31,
+      32,    33,    34,    35,    36,    37,    38,    -1,    -1,    41,
+      42,    43,    44,    45,    46,    47,    48,    49,    -1,    -1,
+      -1,    53,    54,    55,    13,    14,    15,    -1,    17,    -1,
+      -1,    20,    21,    22,    23,    24,    -1,    -1,    27,    28,
+      29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
+      -1,    -1,    41,    42,    43,    44,    45,    46,    47,    48,
+      49,    -1,    -1,    -1,    -1,    54,    55,    13,    14,    15,
+      -1,    17,    -1,    -1,    20,    21,    22,    23,    24,    -1,
+      -1,    27,    28,    29,    30,    31,    32,    33,    34,    35,
+      36,    37,    38,    -1,    -1,    41,    42,    43,    44,    45,
+      46,    47,    48,    49,    13,    14,    15,    -1,    17,    55,
+      -1,    20,    21,    22,    23,    24,    25,    26,    27,    28,
+      29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
+      -1,    -1,    41,    42,    43,    44,    45,    46,    47,    48,
+      49,    -1,    13,    14,    15,    54,    17,    18,    -1,    20,
+      21,    22,    23,    24,    -1,    -1,    27,    28,    29,    30,
+      31,    32,    33,    34,    35,    36,    37,    38,    -1,    -1,
+      41,    42,    43,    44,    45,    46,    47,    48,    49,    -1,
+      13,    14,    15,    54,    17,    -1,    -1,    20,    21,    22,
+      23,    24,    -1,    -1,    27,    28,    29,    30,    31,    32,
+      33,    34,    35,    36,    37,    38,    -1,    -1,    41,    42,
+      43,    44,    45,    46,    47,    48,    49,    -1,    13,    14,
+      15,    54,    17,    -1,    -1,    20,    21,    22,    23,    24,
+      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
+      35,    36,    37,    38,    -1,    -1,    41,    42,    43,    44,
+      45,    46,    47,    48,    49,    13,    14,    15,    -1,    17,
+      18,    -1,    20,    21,    22,    23,    24,    -1,    -1,    27,
+      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
+      38,    -1,    -1,    41,    42,    43,    44,    45,    46,    47,
+      48,    49,    13,    14,    15,    -1,    17,    -1,    -1,    20,
+      21,    22,    23,    24,    -1,    -1,    27,    28,    29,    30,
+      31,    32,    33,    34,    35,    36,    37,    38,    -1,    -1,
+      41,    42,    43,    44,    45,    46,    47,    48,    49,    -1,
+      50,    51,    52,    -1,    -1,    -1,    56,    57,    58,    59,
+      60,    -1,    62,    63,    64,    65,    -1,    -1,    68,    69,
+      70,    71,    72,    73,    74,    75,    76,    77,    78
+};
+
+  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+     symbol of state STATE-NUM.  */
+static const yytype_uint8 yystos[] =
+{
+       0,     3,   123,   124,   125,   136,   137,   139,   140,   142,
+     145,   148,   150,   151,   152,   154,   155,   156,   158,   159,
+     160,   161,   162,   165,   166,    50,    51,    52,    56,    57,
+      58,    59,    60,    62,    63,    64,    65,    68,    69,    70,
+      71,    72,    73,    74,    75,    76,    77,    78,     3,   152,
+       3,   161,     0,     9,    98,    99,     5,     9,    94,    96,
+       3,    87,    99,    98,    98,     3,    96,   110,   135,    98,
+      96,   135,     8,    83,    83,    98,    98,    83,     9,   157,
+     157,     3,   158,   158,   158,     3,   159,   159,   159,     3,
+     158,   159,   159,     3,    13,    14,    15,    17,    20,    21,
+      22,    23,    24,    27,    28,    29,    30,    31,    32,    33,
+      34,    35,    36,    37,    38,    41,    42,    43,    44,    45,
+      46,    47,    48,    49,    93,   103,   104,   105,   110,   117,
+     118,   119,   120,   126,   130,   131,   132,   133,   134,   146,
+     149,     4,    50,     4,    87,     3,    10,    86,   143,   146,
+     149,     3,    11,    85,    90,    92,    94,   138,   146,   149,
+      15,    17,    20,    61,   104,   111,   119,   135,    97,     3,
+      91,    92,   141,   146,   149,   135,     8,    81,    82,    83,
+       3,   147,    84,    66,    67,   153,   154,   157,    83,    83,
+      83,    83,    83,   164,     4,     4,    83,    83,    83,    52,
+      53,    54,    55,    62,    63,    99,   100,   100,   100,    96,
+      96,    97,    96,    96,    96,    96,    96,    96,    96,    39,
+     101,   101,     5,     6,     7,    95,     3,   130,     3,   120,
+      96,    96,   100,     4,     3,    93,   127,   128,   129,   126,
+       3,    88,    89,     4,    12,   120,   122,     4,     3,    86,
+     143,     3,    85,    94,     4,    90,   138,   100,   100,   100,
+     122,   110,   121,     4,   100,    97,     4,    96,    60,     4,
+      91,   141,    82,     8,     4,     3,   123,   144,    50,    56,
+      57,    59,    64,     4,     4,    10,    81,    81,     4,     4,
+     164,     4,     4,     4,     4,     3,     4,   163,     4,     4,
+       4,    96,    84,    99,    84,    84,    99,    83,    83,     3,
+     106,   107,   120,   107,   107,    96,    40,   102,   102,   107,
+      53,    54,     3,   127,    53,    54,     4,    10,    58,   107,
+       3,   106,   110,   115,   116,   107,     4,   121,     3,   103,
+     106,   112,   113,   114,     4,    82,     4,    50,    56,    57,
+      59,     4,    96,    96,    96,    96,    96,     4,     4,     4,
+      41,     4,     4,    10,     4,     4,    10,    83,     4,    54,
+     107,    16,    16,    19,    16,    25,    26,   108,   109,    84,
+      99,    84,    84,    99,    84,     4,    97,    18,   115,     3,
+     110,   108,     3,   113,   112,     4,    98,    98,    98,    98,
+       4,     4,     4,     4,     4,    95,   131,     4,     3,   132,
+       3,   134,     4,     4,    84,   100,   100,   100,   100,    96,
+     120,   109,    16,     4,    10,     4,     4,    10,     4,     4,
+     120,    18,   110,     4,     3,    88,    93,    86,    90,    91,
+       4,   131,   134,     4,   120,   120,   100,   128,     4,     3,
+     129,    88,     4,     3,    89,     4,   120,     3,   114,     4,
+       4,     4,     4,     4,    16,   128,    88,     3,     4,   100,
+      19,     3,   120,    19,     4,   120,     4
+};
+
+  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
+static const yytype_uint8 yyr1[] =
+{
+       0,    80,    81,    81,    82,    82,    83,    84,    84,    85,
+      86,    86,    87,    88,    88,    88,    89,    89,    90,    91,
+      92,    92,    93,    94,    95,    95,    95,    96,    96,    97,
+      97,    98,    98,    99,   100,   100,   101,   101,   102,   102,
+     103,   103,   103,   104,   104,   104,   104,   104,   104,   104,
+     104,   104,   104,   104,   104,   104,   104,   104,   104,   104,
+     104,   104,   104,   104,   104,   104,   104,   104,   104,   105,
+     105,   105,   105,   105,   106,   107,   107,   108,   108,   109,
+     109,   110,   111,   111,   111,   111,   111,   112,   112,   113,
+     113,   114,   114,   115,   115,   116,   116,   116,   116,   116,
+     116,   117,   118,   119,   120,   120,   121,   121,   122,   123,
+     124,   125,   126,   126,   126,   126,   126,   127,   128,   128,
+     128,   129,   129,   130,   131,   131,   131,   132,   132,   133,
+     134,   134,   134,   135,   135,   136,   136,   137,   138,   138,
+     138,   138,   139,   139,   140,   141,   141,   141,   141,   142,
+     143,   143,   143,   144,   144,   144,   144,   144,   144,   145,
+     146,   147,   147,   147,   147,   147,   148,   149,   150,   150,
+     151,   152,   152,   152,   152,   152,   152,   152,   152,   152,
+     152,   152,   153,   153,   154,   154,   155,   156,   157,   157,
+     158,   158,   158,   159,   159,   160,   160,   160,   160,   160,
+     160,   160,   160,   160,   161,   161,   161,   161,   162,   162,
+     163,   164,   164,   165,   165,   165,   166
+};
+
+  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
+static const yytype_uint8 yyr2[] =
+{
+       0,     2,     1,     2,     0,     1,     1,     0,     2,     1,
+       1,     4,     4,     1,     5,     6,     0,     5,     2,     1,
+       1,     2,     4,     1,     1,     1,     1,     1,     1,     0,
+       2,     0,     1,     1,     0,     1,     0,     1,     0,     1,
+       1,     1,     1,     1,     1,     1,     1,     2,     2,     3,
+       1,     2,     2,     2,     2,     2,     2,     2,     3,     3,
+       2,     1,     1,     1,     1,     1,     1,     2,     2,     5,
+       5,     5,     8,     6,     4,     2,     1,     3,     2,     1,
+       2,     3,     2,     3,     3,     3,     3,     2,     1,     1,
+       2,     3,     4,     2,     1,     8,     4,     9,     5,     3,
+       2,     1,     1,     1,     0,     2,     0,     2,     1,     5,
+       1,     5,     2,     1,     3,     2,     2,     1,     1,     5,
+       6,     0,     5,     1,     1,     5,     6,     1,     5,     1,
+       1,     5,     6,     4,     1,     6,     5,     5,     1,     2,
+       2,     5,     6,     5,     5,     1,     2,     2,     4,     5,
+       2,     2,     2,     5,     5,     5,     5,     5,     1,     6,
+       5,     4,     4,     4,     4,     4,     5,     4,     4,     5,
+       4,     1,     1,     1,     1,     1,     1,     1,     1,     1,
+       1,     1,     0,     1,     1,     2,     1,     1,     0,     1,
+       5,     6,     6,     6,     5,     5,     5,     5,     5,     5,
+       4,     4,     5,     5,     1,     1,     1,     5,     1,     2,
+       4,     0,     2,     0,     1,     1,     1
+};
+
+
+#define yyerrok         (yyerrstatus = 0)
+#define yyclearin       (yychar = YYEMPTY)
+#define YYEMPTY         (-2)
+#define YYEOF           0
+
+#define YYACCEPT        goto yyacceptlab
+#define YYABORT         goto yyabortlab
+#define YYERROR         goto yyerrorlab
+
+
+#define YYRECOVERING()  (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value)                                  \
+do                                                              \
+  if (yychar == YYEMPTY)                                        \
+    {                                                           \
+      yychar = (Token);                                         \
+      yylval = (Value);                                         \
+      YYPOPSTACK (yylen);                                       \
+      yystate = *yyssp;                                         \
+      goto yybackup;                                            \
+    }                                                           \
+  else                                                          \
+    {                                                           \
+      yyerror (&yylloc, lexer, parser, YY_("syntax error: cannot back up")); \
+      YYERROR;                                                  \
+    }                                                           \
+while (0)
+
+/* Error token number */
+#define YYTERROR        1
+#define YYERRCODE       256
+
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+   If N is 0, then set CURRENT to the empty location which ends
+   the previous symbol: RHS[0] (always defined).  */
+
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N)                                \
+    do                                                                  \
+      if (N)                                                            \
+        {                                                               \
+          (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
+          (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
+          (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
+          (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
+        }                                                               \
+      else                                                              \
+        {                                                               \
+          (Current).first_line   = (Current).last_line   =              \
+            YYRHSLOC (Rhs, 0).last_line;                                \
+          (Current).first_column = (Current).last_column =              \
+            YYRHSLOC (Rhs, 0).last_column;                              \
+        }                                                               \
+    while (0)
+#endif
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+
+
+/* Enable debugging if requested.  */
+#if WABT_WAST_PARSER_DEBUG
+
+# ifndef YYFPRINTF
+#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+#  define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args)                        \
+do {                                            \
+  if (yydebug)                                  \
+    YYFPRINTF Args;                             \
+} while (0)
+
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+   This macro was not mandated originally: define only if we know
+   we won't break user code: when these are the locations we know.  */
+
+#ifndef YY_LOCATION_PRINT
+# if defined WABT_WAST_PARSER_LTYPE_IS_TRIVIAL && WABT_WAST_PARSER_LTYPE_IS_TRIVIAL
+
+/* Print *YYLOCP on YYO.  Private, do not rely on its existence. */
+
+YY_ATTRIBUTE_UNUSED
+static unsigned
+yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
+{
+  unsigned res = 0;
+  int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
+  if (0 <= yylocp->first_line)
+    {
+      res += YYFPRINTF (yyo, "%d", yylocp->first_line);
+      if (0 <= yylocp->first_column)
+        res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
+    }
+  if (0 <= yylocp->last_line)
+    {
+      if (yylocp->first_line < yylocp->last_line)
+        {
+          res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
+          if (0 <= end_col)
+            res += YYFPRINTF (yyo, ".%d", end_col);
+        }
+      else if (0 <= end_col && yylocp->first_column < end_col)
+        res += YYFPRINTF (yyo, "-%d", end_col);
+    }
+  return res;
+ }
+
+#  define YY_LOCATION_PRINT(File, Loc)          \
+  yy_location_print_ (File, &(Loc))
+
+# else
+#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+#endif
+
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
+do {                                                                      \
+  if (yydebug)                                                            \
+    {                                                                     \
+      YYFPRINTF (stderr, "%s ", Title);                                   \
+      yy_symbol_print (stderr,                                            \
+                  Type, Value, Location, lexer, parser); \
+      YYFPRINTF (stderr, "\n");                                           \
+    }                                                                     \
+} while (0)
+
+
+/*----------------------------------------.
+| Print this symbol's value on YYOUTPUT.  |
+`----------------------------------------*/
+
+static void
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, ::wabt::WastLexer* lexer, ::wabt::WastParser* parser)
+{
+  FILE *yyo = yyoutput;
+  YYUSE (yyo);
+  YYUSE (yylocationp);
+  YYUSE (lexer);
+  YYUSE (parser);
+  if (!yyvaluep)
+    return;
+# ifdef YYPRINT
+  if (yytype < YYNTOKENS)
+    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# endif
+  YYUSE (yytype);
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT.  |
+`--------------------------------*/
+
+static void
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, ::wabt::WastLexer* lexer, ::wabt::WastParser* parser)
+{
+  YYFPRINTF (yyoutput, "%s %s (",
+             yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
+
+  YY_LOCATION_PRINT (yyoutput, *yylocationp);
+  YYFPRINTF (yyoutput, ": ");
+  yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, lexer, parser);
+  YYFPRINTF (yyoutput, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included).                                                   |
+`------------------------------------------------------------------*/
+
+static void
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+{
+  YYFPRINTF (stderr, "Stack now");
+  for (; yybottom <= yytop; yybottom++)
+    {
+      int yybot = *yybottom;
+      YYFPRINTF (stderr, " %d", yybot);
+    }
+  YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top)                            \
+do {                                                            \
+  if (yydebug)                                                  \
+    yy_stack_print ((Bottom), (Top));                           \
+} while (0)
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced.  |
+`------------------------------------------------*/
+
+static void
+yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, ::wabt::WastLexer* lexer, ::wabt::WastParser* parser)
+{
+  unsigned long int yylno = yyrline[yyrule];
+  int yynrhs = yyr2[yyrule];
+  int yyi;
+  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+             yyrule - 1, yylno);
+  /* The symbols being reduced.  */
+  for (yyi = 0; yyi < yynrhs; yyi++)
+    {
+      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
+      yy_symbol_print (stderr,
+                       yystos[yyssp[yyi + 1 - yynrhs]],
+                       &(yyvsp[(yyi + 1) - (yynrhs)])
+                       , &(yylsp[(yyi + 1) - (yynrhs)])                       , lexer, parser);
+      YYFPRINTF (stderr, "\n");
+    }
+}
+
+# define YY_REDUCE_PRINT(Rule)          \
+do {                                    \
+  if (yydebug)                          \
+    yy_reduce_print (yyssp, yyvsp, yylsp, Rule, lexer, parser); \
+} while (0)
+
+/* Nonzero means print parse trace.  It is left uninitialized so that
+   multiple parsers can coexist.  */
+int yydebug;
+#else /* !WABT_WAST_PARSER_DEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !WABT_WAST_PARSER_DEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks.  */
+#ifndef YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+   if the built-in stack extension method is used).
+
+   Do not make this value too large; the results are undefined if
+   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+   evaluated with infinite-precision integer arithmetic.  */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+#  if defined __GLIBC__ && defined _STRING_H
+#   define yystrlen strlen
+#  else
+/* Return the length of YYSTR.  */
+static YYSIZE_T
+yystrlen (const char *yystr)
+{
+  YYSIZE_T yylen;
+  for (yylen = 0; yystr[yylen]; yylen++)
+    continue;
+  return yylen;
+}
+#  endif
+# endif
+
+# ifndef yystpcpy
+#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+#   define yystpcpy stpcpy
+#  else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+   YYDEST.  */
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+{
+  char *yyd = yydest;
+  const char *yys = yysrc;
+
+  while ((*yyd++ = *yys++) != '\0')
+    continue;
+
+  return yyd - 1;
+}
+#  endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+   quotes and backslashes, so that it's suitable for yyerror.  The
+   heuristic is that double-quoting is unnecessary unless the string
+   contains an apostrophe, a comma, or backslash (other than
+   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
+   null, do not copy; instead, return the length of what the result
+   would have been.  */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+  if (*yystr == '"')
+    {
+      YYSIZE_T yyn = 0;
+      char const *yyp = yystr;
+
+      for (;;)
+        switch (*++yyp)
+          {
+          case '\'':
+          case ',':
+            goto do_not_strip_quotes;
+
+          case '\\':
+            if (*++yyp != '\\')
+              goto do_not_strip_quotes;
+            /* Fall through.  */
+          default:
+            if (yyres)
+              yyres[yyn] = *yyp;
+            yyn++;
+            break;
+
+          case '"':
+            if (yyres)
+              yyres[yyn] = '\0';
+            return yyn;
+          }
+    do_not_strip_quotes: ;
+    }
+
+  if (! yyres)
+    return yystrlen (yystr);
+
+  return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+   about the unexpected token YYTOKEN for the state stack whose top is
+   YYSSP.
+
+   Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
+   not large enough to hold the message.  In that case, also set
+   *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
+   required number of bytes is too large to store.  */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+                yytype_int16 *yyssp, int yytoken)
+{
+  YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
+  YYSIZE_T yysize = yysize0;
+  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+  /* Internationalized format string. */
+  const char *yyformat = YY_NULLPTR;
+  /* Arguments of yyformat. */
+  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+  /* Number of reported tokens (one for the "unexpected", one per
+     "expected"). */
+  int yycount = 0;
+
+  /* There are many possibilities here to consider:
+     - If this state is a consistent state with a default action, then
+       the only way this function was invoked is if the default action
+       is an error action.  In that case, don't check for expected
+       tokens because there are none.
+     - The only way there can be no lookahead present (in yychar) is if
+       this state is a consistent state with a default action.  Thus,
+       detecting the absence of a lookahead is sufficient to determine
+       that there is no unexpected or expected token to report.  In that
+       case, just report a simple "syntax error".
+     - Don't assume there isn't a lookahead just because this state is a
+       consistent state with a default action.  There might have been a
+       previous inconsistent state, consistent state with a non-default
+       action, or user semantic action that manipulated yychar.
+     - Of course, the expected token list depends on states to have
+       correct lookahead information, and it depends on the parser not
+       to perform extra reductions after fetching a lookahead from the
+       scanner and before detecting a syntax error.  Thus, state merging
+       (from LALR or IELR) and default reductions corrupt the expected
+       token list.  However, the list is correct for canonical LR with
+       one exception: it will still contain any token that will not be
+       accepted due to an error action in a later state.
+  */
+  if (yytoken != YYEMPTY)
+    {
+      int yyn = yypact[*yyssp];
+      yyarg[yycount++] = yytname[yytoken];
+      if (!yypact_value_is_default (yyn))
+        {
+          /* Start YYX at -YYN if negative to avoid negative indexes in
+             YYCHECK.  In other words, skip the first -YYN actions for
+             this state because they are default actions.  */
+          int yyxbegin = yyn < 0 ? -yyn : 0;
+          /* Stay within bounds of both yycheck and yytname.  */
+          int yychecklim = YYLAST - yyn + 1;
+          int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+          int yyx;
+
+          for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+            if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+                && !yytable_value_is_error (yytable[yyx + yyn]))
+              {
+                if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+                  {
+                    yycount = 1;
+                    yysize = yysize0;
+                    break;
+                  }
+                yyarg[yycount++] = yytname[yyx];
+                {
+                  YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
+                  if (! (yysize <= yysize1
+                         && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+                    return 2;
+                  yysize = yysize1;
+                }
+              }
+        }
+    }
+
+  switch (yycount)
+    {
+# define YYCASE_(N, S)                      \
+      case N:                               \
+        yyformat = S;                       \
+      break
+      YYCASE_(0, YY_("syntax error"));
+      YYCASE_(1, YY_("syntax error, unexpected %s"));
+      YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+      YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+      YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+      YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+    }
+
+  {
+    YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
+    if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+      return 2;
+    yysize = yysize1;
+  }
+
+  if (*yymsg_alloc < yysize)
+    {
+      *yymsg_alloc = 2 * yysize;
+      if (! (yysize <= *yymsg_alloc
+             && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+        *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+      return 1;
+    }
+
+  /* Avoid sprintf, as that infringes on the user's name space.
+     Don't have undefined behavior even if the translation
+     produced a string with the wrong number of "%s"s.  */
+  {
+    char *yyp = *yymsg;
+    int yyi = 0;
+    while ((*yyp = *yyformat) != '\0')
+      if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+        {
+          yyp += yytnamerr (yyp, yyarg[yyi++]);
+          yyformat += 2;
+        }
+      else
+        {
+          yyp++;
+          yyformat++;
+        }
+  }
+  return 0;
+}
+#endif /* YYERROR_VERBOSE */
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol.  |
+`-----------------------------------------------*/
+
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, ::wabt::WastLexer* lexer, ::wabt::WastParser* parser)
+{
+  YYUSE (yyvaluep);
+  YYUSE (yylocationp);
+  YYUSE (lexer);
+  YYUSE (parser);
+  if (!yymsg)
+    yymsg = "Deleting";
+  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+  switch (yytype)
+    {
+          case 5: /* NAT  */
+#line 226 "src/wast-parser.y" /* yacc.c:1257  */
+      {}
+#line 1746 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 6: /* INT  */
+#line 226 "src/wast-parser.y" /* yacc.c:1257  */
+      {}
+#line 1752 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 7: /* FLOAT  */
+#line 226 "src/wast-parser.y" /* yacc.c:1257  */
+      {}
+#line 1758 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 8: /* TEXT  */
+#line 226 "src/wast-parser.y" /* yacc.c:1257  */
+      {}
+#line 1764 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 9: /* VAR  */
+#line 226 "src/wast-parser.y" /* yacc.c:1257  */
+      {}
+#line 1770 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 39: /* OFFSET_EQ_NAT  */
+#line 226 "src/wast-parser.y" /* yacc.c:1257  */
+      {}
+#line 1776 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 40: /* ALIGN_EQ_NAT  */
+#line 226 "src/wast-parser.y" /* yacc.c:1257  */
+      {}
+#line 1782 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 81: /* text_list  */
+#line 246 "src/wast-parser.y" /* yacc.c:1257  */
+      { destroy_text_list(&((*yyvaluep).text_list)); }
+#line 1788 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 82: /* text_list_opt  */
+#line 246 "src/wast-parser.y" /* yacc.c:1257  */
+      { destroy_text_list(&((*yyvaluep).text_list)); }
+#line 1794 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 83: /* quoted_text  */
+#line 227 "src/wast-parser.y" /* yacc.c:1257  */
+      { destroy_string_slice(&((*yyvaluep).text)); }
+#line 1800 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 84: /* value_type_list  */
+#line 247 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).types); }
+#line 1806 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 86: /* global_type  */
+#line 240 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).global); }
+#line 1812 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 87: /* func_type  */
+#line 239 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).func_sig); }
+#line 1818 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 88: /* func_sig  */
+#line 239 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).func_sig); }
+#line 1824 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 89: /* func_sig_result  */
+#line 239 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).func_sig); }
+#line 1830 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 91: /* memory_sig  */
+#line 242 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).memory); }
+#line 1836 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 93: /* type_use  */
+#line 248 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).var); }
+#line 1842 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 95: /* literal  */
+#line 228 "src/wast-parser.y" /* yacc.c:1257  */
+      { destroy_string_slice(&((*yyvaluep).literal).text); }
+#line 1848 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 96: /* var  */
+#line 248 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).var); }
+#line 1854 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 97: /* var_list  */
+#line 249 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).vars); }
+#line 1860 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 98: /* bind_var_opt  */
+#line 227 "src/wast-parser.y" /* yacc.c:1257  */
+      { destroy_string_slice(&((*yyvaluep).text)); }
+#line 1866 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 99: /* bind_var  */
+#line 227 "src/wast-parser.y" /* yacc.c:1257  */
+      { destroy_string_slice(&((*yyvaluep).text)); }
+#line 1872 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 100: /* labeling_opt  */
+#line 227 "src/wast-parser.y" /* yacc.c:1257  */
+      { destroy_string_slice(&((*yyvaluep).text)); }
+#line 1878 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 103: /* instr  */
+#line 236 "src/wast-parser.y" /* yacc.c:1257  */
+      { DestroyExprList(((*yyvaluep).expr_list).first); }
+#line 1884 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 104: /* plain_instr  */
+#line 235 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).expr); }
+#line 1890 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 105: /* block_instr  */
+#line 235 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).expr); }
+#line 1896 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 106: /* block_sig  */
+#line 247 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).types); }
+#line 1902 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 107: /* block  */
+#line 230 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).block); }
+#line 1908 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 108: /* catch_instr  */
+#line 236 "src/wast-parser.y" /* yacc.c:1257  */
+      { DestroyExprList(((*yyvaluep).expr_list).first); }
+#line 1914 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 109: /* catch_instr_list  */
+#line 236 "src/wast-parser.y" /* yacc.c:1257  */
+      { DestroyExprList(((*yyvaluep).expr_list).first); }
+#line 1920 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 110: /* expr  */
+#line 236 "src/wast-parser.y" /* yacc.c:1257  */
+      { DestroyExprList(((*yyvaluep).expr_list).first); }
+#line 1926 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 111: /* expr1  */
+#line 236 "src/wast-parser.y" /* yacc.c:1257  */
+      { DestroyExprList(((*yyvaluep).expr_list).first); }
+#line 1932 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 112: /* try_  */
+#line 235 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).expr); }
+#line 1938 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 113: /* try_instr_list  */
+#line 235 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).expr); }
+#line 1944 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 114: /* catch_list  */
+#line 236 "src/wast-parser.y" /* yacc.c:1257  */
+      { DestroyExprList(((*yyvaluep).expr_list).first); }
+#line 1950 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 115: /* if_block  */
+#line 236 "src/wast-parser.y" /* yacc.c:1257  */
+      { DestroyExprList(((*yyvaluep).expr_list).first); }
+#line 1956 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 116: /* if_  */
+#line 236 "src/wast-parser.y" /* yacc.c:1257  */
+      { DestroyExprList(((*yyvaluep).expr_list).first); }
+#line 1962 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 120: /* instr_list  */
+#line 236 "src/wast-parser.y" /* yacc.c:1257  */
+      { DestroyExprList(((*yyvaluep).expr_list).first); }
+#line 1968 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 121: /* expr_list  */
+#line 236 "src/wast-parser.y" /* yacc.c:1257  */
+      { DestroyExprList(((*yyvaluep).expr_list).first); }
+#line 1974 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 122: /* const_expr  */
+#line 236 "src/wast-parser.y" /* yacc.c:1257  */
+      { DestroyExprList(((*yyvaluep).expr_list).first); }
+#line 1980 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 125: /* func  */
+#line 237 "src/wast-parser.y" /* yacc.c:1257  */
+      { destroy_module_field_list(&((*yyvaluep).module_fields)); }
+#line 1986 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 126: /* func_fields  */
+#line 237 "src/wast-parser.y" /* yacc.c:1257  */
+      { destroy_module_field_list(&((*yyvaluep).module_fields)); }
+#line 1992 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 127: /* func_fields_import  */
+#line 238 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).func); }
+#line 1998 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 128: /* func_fields_import1  */
+#line 238 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).func); }
+#line 2004 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 129: /* func_fields_import_result  */
+#line 238 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).func); }
+#line 2010 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 130: /* func_fields_body  */
+#line 238 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).func); }
+#line 2016 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 131: /* func_fields_body1  */
+#line 238 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).func); }
+#line 2022 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 132: /* func_result_body  */
+#line 238 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).func); }
+#line 2028 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 133: /* func_body  */
+#line 238 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).func); }
+#line 2034 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 134: /* func_body1  */
+#line 238 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).func); }
+#line 2040 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 135: /* offset  */
+#line 236 "src/wast-parser.y" /* yacc.c:1257  */
+      { DestroyExprList(((*yyvaluep).expr_list).first); }
+#line 2046 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 137: /* table  */
+#line 237 "src/wast-parser.y" /* yacc.c:1257  */
+      { destroy_module_field_list(&((*yyvaluep).module_fields)); }
+#line 2052 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 138: /* table_fields  */
+#line 237 "src/wast-parser.y" /* yacc.c:1257  */
+      { destroy_module_field_list(&((*yyvaluep).module_fields)); }
+#line 2058 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 140: /* memory  */
+#line 237 "src/wast-parser.y" /* yacc.c:1257  */
+      { destroy_module_field_list(&((*yyvaluep).module_fields)); }
+#line 2064 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 141: /* memory_fields  */
+#line 237 "src/wast-parser.y" /* yacc.c:1257  */
+      { destroy_module_field_list(&((*yyvaluep).module_fields)); }
+#line 2070 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 142: /* global  */
+#line 237 "src/wast-parser.y" /* yacc.c:1257  */
+      { destroy_module_field_list(&((*yyvaluep).module_fields)); }
+#line 2076 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 143: /* global_fields  */
+#line 237 "src/wast-parser.y" /* yacc.c:1257  */
+      { destroy_module_field_list(&((*yyvaluep).module_fields)); }
+#line 2082 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 144: /* import_desc  */
+#line 241 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).import); }
+#line 2088 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 146: /* inline_import  */
+#line 241 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).import); }
+#line 2094 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 147: /* export_desc  */
+#line 234 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).export_); }
+#line 2100 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 149: /* inline_export  */
+#line 234 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).export_); }
+#line 2106 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 152: /* module_field  */
+#line 237 "src/wast-parser.y" /* yacc.c:1257  */
+      { destroy_module_field_list(&((*yyvaluep).module_fields)); }
+#line 2112 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 153: /* module_fields_opt  */
+#line 243 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).module); }
+#line 2118 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 154: /* module_fields  */
+#line 243 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).module); }
+#line 2124 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 155: /* module  */
+#line 243 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).module); }
+#line 2130 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 156: /* inline_module  */
+#line 243 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).module); }
+#line 2136 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 157: /* script_var_opt  */
+#line 248 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).var); }
+#line 2142 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 158: /* script_module  */
+#line 244 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).script_module); }
+#line 2148 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 159: /* action  */
+#line 229 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).action); }
+#line 2154 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 160: /* assertion  */
+#line 231 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).command); }
+#line 2160 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 161: /* cmd  */
+#line 231 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).command); }
+#line 2166 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 162: /* cmd_list  */
+#line 232 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).commands); }
+#line 2172 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 164: /* const_list  */
+#line 233 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).consts); }
+#line 2178 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+    case 165: /* script  */
+#line 245 "src/wast-parser.y" /* yacc.c:1257  */
+      { delete ((*yyvaluep).script); }
+#line 2184 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1257  */
+        break;
+
+
+      default:
+        break;
+    }
+  YY_IGNORE_MAYBE_UNINITIALIZED_END
+}
+
+
+
+
+/*----------.
+| yyparse.  |
+`----------*/
+
+int
+yyparse (::wabt::WastLexer* lexer, ::wabt::WastParser* parser)
+{
+/* The lookahead symbol.  */
+int yychar;
+
+
+/* The semantic value of the lookahead symbol.  */
+/* Default value used for initialization, for pacifying older GCCs
+   or non-GCC compilers.  */
+YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
+YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
+
+/* Location data for the lookahead symbol.  */
+static YYLTYPE yyloc_default
+# if defined WABT_WAST_PARSER_LTYPE_IS_TRIVIAL && WABT_WAST_PARSER_LTYPE_IS_TRIVIAL
+  = { 1, 1, 1, 1 }
+# endif
+;
+YYLTYPE yylloc = yyloc_default;
+
+    /* Number of syntax errors so far.  */
+    int yynerrs;
+
+    int yystate;
+    /* Number of tokens to shift before error messages enabled.  */
+    int yyerrstatus;
+
+    /* The stacks and their tools:
+       'yyss': related to states.
+       'yyvs': related to semantic values.
+       'yyls': related to locations.
+
+       Refer to the stacks through separate pointers, to allow yyoverflow
+       to reallocate them elsewhere.  */
+
+    /* The state stack.  */
+    yytype_int16 yyssa[YYINITDEPTH];
+    yytype_int16 *yyss;
+    yytype_int16 *yyssp;
+
+    /* The semantic value stack.  */
+    YYSTYPE yyvsa[YYINITDEPTH];
+    YYSTYPE *yyvs;
+    YYSTYPE *yyvsp;
+
+    /* The location stack.  */
+    YYLTYPE yylsa[YYINITDEPTH];
+    YYLTYPE *yyls;
+    YYLTYPE *yylsp;
+
+    /* The locations where the error started and ended.  */
+    YYLTYPE yyerror_range[3];
+
+    YYSIZE_T yystacksize;
+
+  int yyn;
+  int yyresult;
+  /* Lookahead token as an internal (translated) token number.  */
+  int yytoken = 0;
+  /* The variables used to return semantic value and location from the
+     action routines.  */
+  YYSTYPE yyval;
+  YYLTYPE yyloc;
+
+#if YYERROR_VERBOSE
+  /* Buffer for error messages, and its allocated size.  */
+  char yymsgbuf[128];
+  char *yymsg = yymsgbuf;
+  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
+
+  /* The number of symbols on the RHS of the reduced rule.
+     Keep to zero when no symbol should be popped.  */
+  int yylen = 0;
+
+  yyssp = yyss = yyssa;
+  yyvsp = yyvs = yyvsa;
+  yylsp = yyls = yylsa;
+  yystacksize = YYINITDEPTH;
+
+  YYDPRINTF ((stderr, "Starting parse\n"));
+
+  yystate = 0;
+  yyerrstatus = 0;
+  yynerrs = 0;
+  yychar = YYEMPTY; /* Cause a token to be read.  */
+  yylsp[0] = yylloc;
+  goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate.  |
+`------------------------------------------------------------*/
+ yynewstate:
+  /* In all cases, when you get here, the value and location stacks
+     have just been pushed.  So pushing a state here evens the stacks.  */
+  yyssp++;
+
+ yysetstate:
+  *yyssp = yystate;
+
+  if (yyss + yystacksize - 1 <= yyssp)
+    {
+      /* Get the current used size of the three stacks, in elements.  */
+      YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+      {
+        /* Give user a chance to reallocate the stack.  Use copies of
+           these so that the &'s don't force the real ones into
+           memory.  */
+        YYSTYPE *yyvs1 = yyvs;
+        yytype_int16 *yyss1 = yyss;
+        YYLTYPE *yyls1 = yyls;
+
+        /* Each stack pointer address is followed by the size of the
+           data in use in that stack, in bytes.  This used to be a
+           conditional around just the two extra args, but that might
+           be undefined if yyoverflow is a macro.  */
+        yyoverflow (YY_("memory exhausted"),
+                    &yyss1, yysize * sizeof (*yyssp),
+                    &yyvs1, yysize * sizeof (*yyvsp),
+                    &yyls1, yysize * sizeof (*yylsp),
+                    &yystacksize);
+
+        yyls = yyls1;
+        yyss = yyss1;
+        yyvs = yyvs1;
+      }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+      goto yyexhaustedlab;
+# else
+      /* Extend the stack our own way.  */
+      if (YYMAXDEPTH <= yystacksize)
+        goto yyexhaustedlab;
+      yystacksize *= 2;
+      if (YYMAXDEPTH < yystacksize)
+        yystacksize = YYMAXDEPTH;
+
+      {
+        yytype_int16 *yyss1 = yyss;
+        union yyalloc *yyptr =
+          (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+        if (! yyptr)
+          goto yyexhaustedlab;
+        YYSTACK_RELOCATE (yyss_alloc, yyss);
+        YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+        YYSTACK_RELOCATE (yyls_alloc, yyls);
+#  undef YYSTACK_RELOCATE
+        if (yyss1 != yyssa)
+          YYSTACK_FREE (yyss1);
+      }
+# endif
+#endif /* no yyoverflow */
+
+      yyssp = yyss + yysize - 1;
+      yyvsp = yyvs + yysize - 1;
+      yylsp = yyls + yysize - 1;
+
+      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+                  (unsigned long int) yystacksize));
+
+      if (yyss + yystacksize - 1 <= yyssp)
+        YYABORT;
+    }
+
+  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+  if (yystate == YYFINAL)
+    YYACCEPT;
+
+  goto yybackup;
+
+/*-----------.
+| yybackup.  |
+`-----------*/
+yybackup:
+
+  /* Do appropriate processing given the current state.  Read a
+     lookahead token if we need one and don't already have one.  */
+
+  /* First try to decide what to do without reference to lookahead token.  */
+  yyn = yypact[yystate];
+  if (yypact_value_is_default (yyn))
+    goto yydefault;
+
+  /* Not known => get a lookahead token if don't already have one.  */
+
+  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
+  if (yychar == YYEMPTY)
+    {
+      YYDPRINTF ((stderr, "Reading a token: "));
+      yychar = yylex (&yylval, &yylloc);
+    }
+
+  if (yychar <= YYEOF)
+    {
+      yychar = yytoken = YYEOF;
+      YYDPRINTF ((stderr, "Now at end of input.\n"));
+    }
+  else
+    {
+      yytoken = YYTRANSLATE (yychar);
+      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+    }
+
+  /* If the proper action on seeing token YYTOKEN is to reduce or to
+     detect an error, take that action.  */
+  yyn += yytoken;
+  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+    goto yydefault;
+  yyn = yytable[yyn];
+  if (yyn <= 0)
+    {
+      if (yytable_value_is_error (yyn))
+        goto yyerrlab;
+      yyn = -yyn;
+      goto yyreduce;
+    }
+
+  /* Count tokens shifted since error; after three, turn off error
+     status.  */
+  if (yyerrstatus)
+    yyerrstatus--;
+
+  /* Shift the lookahead token.  */
+  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+  /* Discard the shifted token.  */
+  yychar = YYEMPTY;
+
+  yystate = yyn;
+  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+  *++yyvsp = yylval;
+  YY_IGNORE_MAYBE_UNINITIALIZED_END
+  *++yylsp = yylloc;
+  goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state.  |
+`-----------------------------------------------------------*/
+yydefault:
+  yyn = yydefact[yystate];
+  if (yyn == 0)
+    goto yyerrlab;
+  goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction.  |
+`-----------------------------*/
+yyreduce:
+  /* yyn is the number of a rule to reduce with.  */
+  yylen = yyr2[yyn];
+
+  /* If YYLEN is nonzero, implement the default value of the action:
+     '$$ = $1'.
+
+     Otherwise, the following line sets YYVAL to garbage.
+     This behavior is undocumented and Bison
+     users should not rely upon it.  Assigning to YYVAL
+     unconditionally makes the parser a bit smaller, and it avoids a
+     GCC warning that YYVAL may be used uninitialized.  */
+  yyval = yyvsp[1-yylen];
+
+  /* Default location.  */
+  YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
+  YY_REDUCE_PRINT (yyn);
+  switch (yyn)
+    {
+        case 2:
+#line 262 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      TextListNode* node = new TextListNode();
+      DUPTEXT(node->text, (yyvsp[0].text));
+      node->next = nullptr;
+      (yyval.text_list).first = (yyval.text_list).last = node;
+    }
+#line 2483 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 3:
+#line 268 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.text_list) = (yyvsp[-1].text_list);
+      TextListNode* node = new TextListNode();
+      DUPTEXT(node->text, (yyvsp[0].text));
+      node->next = nullptr;
+      (yyval.text_list).last->next = node;
+      (yyval.text_list).last = node;
+    }
+#line 2496 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 4:
+#line 278 "src/wast-parser.y" /* yacc.c:1646  */
+    { (yyval.text_list).first = (yyval.text_list).last = nullptr; }
+#line 2502 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 6:
+#line 283 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      TextListNode node;
+      node.text = (yyvsp[0].text);
+      node.next = nullptr;
+      TextList text_list;
+      text_list.first = &node;
+      text_list.last = &node;
+      char* data;
+      size_t size;
+      dup_text_list(&text_list, &data, &size);
+      (yyval.text).start = data;
+      (yyval.text).length = size;
+    }
+#line 2520 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 7:
+#line 301 "src/wast-parser.y" /* yacc.c:1646  */
+    { (yyval.types) = new TypeVector(); }
+#line 2526 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 8:
+#line 302 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.types) = (yyvsp[-1].types);
+      (yyval.types)->push_back((yyvsp[0].type));
+    }
+#line 2535 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 9:
+#line 308 "src/wast-parser.y" /* yacc.c:1646  */
+    {}
+#line 2541 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 10:
+#line 311 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.global) = new Global();
+      (yyval.global)->type = (yyvsp[0].type);
+      (yyval.global)->mutable_ = false;
+    }
+#line 2551 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 11:
+#line 316 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.global) = new Global();
+      (yyval.global)->type = (yyvsp[-1].type);
+      (yyval.global)->mutable_ = true;
+    }
+#line 2561 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 12:
+#line 324 "src/wast-parser.y" /* yacc.c:1646  */
+    { (yyval.func_sig) = (yyvsp[-1].func_sig); }
+#line 2567 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 14:
+#line 329 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.func_sig) = (yyvsp[0].func_sig);
+      (yyval.func_sig)->param_types.insert((yyval.func_sig)->param_types.begin(), (yyvsp[-2].types)->begin(), (yyvsp[-2].types)->end());
+      delete (yyvsp[-2].types);
+    }
+#line 2577 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 15:
+#line 334 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.func_sig) = (yyvsp[0].func_sig);
+      (yyval.func_sig)->param_types.insert((yyval.func_sig)->param_types.begin(), (yyvsp[-2].type));
+      // Ignore bind_var.
+      destroy_string_slice(&(yyvsp[-3].text));
+    }
+#line 2588 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 16:
+#line 343 "src/wast-parser.y" /* yacc.c:1646  */
+    { (yyval.func_sig) = new FuncSignature(); }
+#line 2594 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 17:
+#line 344 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.func_sig) = (yyvsp[0].func_sig);
+      (yyval.func_sig)->result_types.insert((yyval.func_sig)->result_types.begin(), (yyvsp[-2].types)->begin(), (yyvsp[-2].types)->end());
+      delete (yyvsp[-2].types);
+    }
+#line 2604 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 18:
+#line 352 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.table) = new Table();
+      (yyval.table)->elem_limits = (yyvsp[-1].limits);
+    }
+#line 2613 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 19:
+#line 358 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.memory) = new Memory();
+      (yyval.memory)->page_limits = (yyvsp[0].limits);
+    }
+#line 2622 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 20:
+#line 364 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.limits).has_max = false;
+      (yyval.limits).initial = (yyvsp[0].u64);
+      (yyval.limits).max = 0;
+    }
+#line 2632 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 21:
+#line 369 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.limits).has_max = true;
+      (yyval.limits).initial = (yyvsp[-1].u64);
+      (yyval.limits).max = (yyvsp[0].u64);
+    }
+#line 2642 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 22:
+#line 376 "src/wast-parser.y" /* yacc.c:1646  */
+    { (yyval.var) = (yyvsp[-1].var); }
+#line 2648 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 23:
+#line 382 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      if (WABT_FAILED(parse_uint64((yyvsp[0].literal).text.start,
+                                        (yyvsp[0].literal).text.start + (yyvsp[0].literal).text.length, &(yyval.u64)))) {
+        wast_parser_error(&(yylsp[0]), lexer, parser,
+                          "invalid int " PRIstringslice "\"",
+                          WABT_PRINTF_STRING_SLICE_ARG((yyvsp[0].literal).text));
+      }
+    }
+#line 2661 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 24:
+#line 393 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.literal).type = (yyvsp[0].literal).type;
+      DUPTEXT((yyval.literal).text, (yyvsp[0].literal).text);
+    }
+#line 2670 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 25:
+#line 397 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.literal).type = (yyvsp[0].literal).type;
+      DUPTEXT((yyval.literal).text, (yyvsp[0].literal).text);
+    }
+#line 2679 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 26:
+#line 401 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.literal).type = (yyvsp[0].literal).type;
+      DUPTEXT((yyval.literal).text, (yyvsp[0].literal).text);
+    }
+#line 2688 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 27:
+#line 408 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.var) = new Var((yyvsp[0].u64));
+      (yyval.var)->loc = (yylsp[0]);
+    }
+#line 2697 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 28:
+#line 412 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      StringSlice name;
+      DUPTEXT(name, (yyvsp[0].text));
+      (yyval.var) = new Var(name);
+      (yyval.var)->loc = (yylsp[0]);
+    }
+#line 2708 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 29:
+#line 420 "src/wast-parser.y" /* yacc.c:1646  */
+    { (yyval.vars) = new VarVector(); }
+#line 2714 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 30:
+#line 421 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.vars) = (yyvsp[-1].vars);
+      (yyval.vars)->emplace_back(std::move(*(yyvsp[0].var)));
+      delete (yyvsp[0].var);
+    }
+#line 2724 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 31:
+#line 428 "src/wast-parser.y" /* yacc.c:1646  */
+    { WABT_ZERO_MEMORY((yyval.text)); }
+#line 2730 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 33:
+#line 432 "src/wast-parser.y" /* yacc.c:1646  */
+    { DUPTEXT((yyval.text), (yyvsp[0].text)); }
+#line 2736 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 34:
+#line 436 "src/wast-parser.y" /* yacc.c:1646  */
+    { WABT_ZERO_MEMORY((yyval.text)); }
+#line 2742 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 36:
+#line 441 "src/wast-parser.y" /* yacc.c:1646  */
+    { (yyval.u64) = 0; }
+#line 2748 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 37:
+#line 442 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      uint64_t offset64;
+      if (WABT_FAILED(parse_int64((yyvsp[0].text).start, (yyvsp[0].text).start + (yyvsp[0].text).length, &offset64,
+                                  ParseIntType::SignedAndUnsigned))) {
+        wast_parser_error(&(yylsp[0]), lexer, parser,
+                          "invalid offset \"" PRIstringslice "\"",
+                          WABT_PRINTF_STRING_SLICE_ARG((yyvsp[0].text)));
+      }
+      if (offset64 > UINT32_MAX) {
+        wast_parser_error(&(yylsp[0]), lexer, parser,
+                          "offset must be less than or equal to 0xffffffff");
+      }
+      (yyval.u64) = static_cast<uint32_t>(offset64);
+    }
+#line 2767 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 38:
+#line 458 "src/wast-parser.y" /* yacc.c:1646  */
+    { (yyval.u32) = USE_NATURAL_ALIGNMENT; }
+#line 2773 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 39:
+#line 459 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      if (WABT_FAILED(parse_int32((yyvsp[0].text).start, (yyvsp[0].text).start + (yyvsp[0].text).length, &(yyval.u32),
+                                  ParseIntType::UnsignedOnly))) {
+        wast_parser_error(&(yylsp[0]), lexer, parser,
+                          "invalid alignment \"" PRIstringslice "\"",
+                          WABT_PRINTF_STRING_SLICE_ARG((yyvsp[0].text)));
+      }
+
+      if ((yyval.u32) != WABT_USE_NATURAL_ALIGNMENT && !is_power_of_two((yyval.u32))) {
+        wast_parser_error(&(yylsp[0]), lexer, parser, "alignment must be power-of-two");
+      }
+    }
+#line 2790 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 40:
+#line 474 "src/wast-parser.y" /* yacc.c:1646  */
+    { (yyval.expr_list) = join_exprs1(&(yylsp[0]), (yyvsp[0].expr)); }
+#line 2796 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 41:
+#line 475 "src/wast-parser.y" /* yacc.c:1646  */
+    { (yyval.expr_list) = join_exprs1(&(yylsp[0]), (yyvsp[0].expr)); }
+#line 2802 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 43:
+#line 480 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr) = Expr::CreateUnreachable();
+    }
+#line 2810 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 44:
+#line 483 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr) = Expr::CreateNop();
+    }
+#line 2818 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 45:
+#line 486 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr) = Expr::CreateDrop();
+    }
+#line 2826 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 46:
+#line 489 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr) = Expr::CreateSelect();
+    }
+#line 2834 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 47:
+#line 492 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr) = Expr::CreateBr(std::move(*(yyvsp[0].var)));
+      delete (yyvsp[0].var);
+    }
+#line 2843 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 48:
+#line 496 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr) = Expr::CreateBrIf(std::move(*(yyvsp[0].var)));
+      delete (yyvsp[0].var);
+    }
+#line 2852 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 49:
+#line 500 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr) = Expr::CreateBrTable((yyvsp[-1].vars), std::move(*(yyvsp[0].var)));
+      delete (yyvsp[0].var);
+    }
+#line 2861 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 50:
+#line 504 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr) = Expr::CreateReturn();
+    }
+#line 2869 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 51:
+#line 507 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr) = Expr::CreateCall(std::move(*(yyvsp[0].var)));
+      delete (yyvsp[0].var);
+    }
+#line 2878 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 52:
+#line 511 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr) = Expr::CreateCallIndirect(std::move(*(yyvsp[0].var)));
+      delete (yyvsp[0].var);
+    }
+#line 2887 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 53:
+#line 515 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr) = Expr::CreateGetLocal(std::move(*(yyvsp[0].var)));
+      delete (yyvsp[0].var);
+    }
+#line 2896 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 54:
+#line 519 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr) = Expr::CreateSetLocal(std::move(*(yyvsp[0].var)));
+      delete (yyvsp[0].var);
+    }
+#line 2905 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 55:
+#line 523 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr) = Expr::CreateTeeLocal(std::move(*(yyvsp[0].var)));
+      delete (yyvsp[0].var);
+    }
+#line 2914 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 56:
+#line 527 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr) = Expr::CreateGetGlobal(std::move(*(yyvsp[0].var)));
+      delete (yyvsp[0].var);
+    }
+#line 2923 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 57:
+#line 531 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr) = Expr::CreateSetGlobal(std::move(*(yyvsp[0].var)));
+      delete (yyvsp[0].var);
+    }
+#line 2932 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 58:
+#line 535 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr) = Expr::CreateLoad((yyvsp[-2].opcode), (yyvsp[0].u32), (yyvsp[-1].u64));
+    }
+#line 2940 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 59:
+#line 538 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr) = Expr::CreateStore((yyvsp[-2].opcode), (yyvsp[0].u32), (yyvsp[-1].u64));
+    }
+#line 2948 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 60:
+#line 541 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      Const const_;
+      WABT_ZERO_MEMORY(const_);
+      const_.loc = (yylsp[-1]);
+      if (WABT_FAILED(parse_const((yyvsp[-1].type), (yyvsp[0].literal).type, (yyvsp[0].literal).text.start,
+                                  (yyvsp[0].literal).text.start + (yyvsp[0].literal).text.length, &const_))) {
+        wast_parser_error(&(yylsp[0]), lexer, parser,
+                          "invalid literal \"" PRIstringslice "\"",
+                          WABT_PRINTF_STRING_SLICE_ARG((yyvsp[0].literal).text));
+      }
+      delete [] (yyvsp[0].literal).text.start;
+      (yyval.expr) = Expr::CreateConst(const_);
+    }
+#line 2966 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 61:
+#line 554 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr) = Expr::CreateUnary((yyvsp[0].opcode));
+    }
+#line 2974 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 62:
+#line 557 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr) = Expr::CreateBinary((yyvsp[0].opcode));
+    }
+#line 2982 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 63:
+#line 560 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr) = Expr::CreateCompare((yyvsp[0].opcode));
+    }
+#line 2990 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 64:
+#line 563 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr) = Expr::CreateConvert((yyvsp[0].opcode));
+    }
+#line 2998 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 65:
+#line 566 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr) = Expr::CreateCurrentMemory();
+    }
+#line 3006 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 66:
+#line 569 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr) = Expr::CreateGrowMemory();
+    }
+#line 3014 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 67:
+#line 572 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr) = Expr::CreateThrow(std::move(*(yyvsp[0].var)));
+      delete (yyvsp[0].var);
+    }
+#line 3023 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 68:
+#line 576 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr) = Expr::CreateRethrow(std::move(*(yyvsp[0].var)));
+      delete (yyvsp[0].var);
+    }
+#line 3032 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 69:
+#line 583 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr) = Expr::CreateBlock((yyvsp[-2].block));
+      (yyval.expr)->block->label = (yyvsp[-3].text);
+      CHECK_END_LABEL((yylsp[0]), (yyval.expr)->block->label, (yyvsp[0].text));
+    }
+#line 3042 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 70:
+#line 588 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr) = Expr::CreateLoop((yyvsp[-2].block));
+      (yyval.expr)->loop->label = (yyvsp[-3].text);
+      CHECK_END_LABEL((yylsp[0]), (yyval.expr)->loop->label, (yyvsp[0].text));
+    }
+#line 3052 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 71:
+#line 593 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr) = Expr::CreateIf((yyvsp[-2].block), nullptr);
+      (yyval.expr)->if_.true_->label = (yyvsp[-3].text);
+      CHECK_END_LABEL((yylsp[0]), (yyval.expr)->if_.true_->label, (yyvsp[0].text));
+    }
+#line 3062 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 72:
+#line 598 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr) = Expr::CreateIf((yyvsp[-5].block), (yyvsp[-2].expr_list).first);
+      (yyval.expr)->if_.true_->label = (yyvsp[-6].text);
+      CHECK_END_LABEL((yylsp[-3]), (yyval.expr)->if_.true_->label, (yyvsp[-3].text));
+      CHECK_END_LABEL((yylsp[0]), (yyval.expr)->if_.true_->label, (yyvsp[0].text));
+    }
+#line 3073 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 73:
+#line 604 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyvsp[-3].block)->label = (yyvsp[-4].text);
+      (yyval.expr) = Expr::CreateTry((yyvsp[-3].block), (yyvsp[-2].expr_list).first);
+      CHECK_END_LABEL((yylsp[0]), (yyvsp[-3].block)->label, (yyvsp[0].text));
+    }
+#line 3083 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 74:
+#line 612 "src/wast-parser.y" /* yacc.c:1646  */
+    { (yyval.types) = (yyvsp[-1].types); }
+#line 3089 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 75:
+#line 615 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.block) = (yyvsp[0].block);
+      (yyval.block)->sig.insert((yyval.block)->sig.end(), (yyvsp[-1].types)->begin(), (yyvsp[-1].types)->end());
+      delete (yyvsp[-1].types);
+    }
+#line 3099 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 76:
+#line 620 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.block) = new Block();
+      (yyval.block)->first = (yyvsp[0].expr_list).first;
+    }
+#line 3108 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 77:
+#line 627 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      Expr* expr = Expr::CreateCatch(std::move(*(yyvsp[-1].var)), (yyvsp[0].expr_list).first);
+      delete (yyvsp[-1].var);
+      (yyval.expr_list) = join_exprs1(&(yylsp[-2]), expr);
+    }
+#line 3118 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 78:
+#line 632 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      Expr* expr = Expr::CreateCatchAll((yyvsp[0].expr_list).first);
+      (yyval.expr_list) = join_exprs1(&(yylsp[-1]), expr);
+    }
+#line 3127 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 80:
+#line 640 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr_list) = join_expr_lists(&(yyvsp[-1].expr_list), &(yyvsp[0].expr_list));
+    }
+#line 3135 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 81:
+#line 646 "src/wast-parser.y" /* yacc.c:1646  */
+    { (yyval.expr_list) = (yyvsp[-1].expr_list); }
+#line 3141 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 82:
+#line 650 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr_list) = join_exprs2(&(yylsp[-1]), &(yyvsp[0].expr_list), (yyvsp[-1].expr));
+    }
+#line 3149 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 83:
+#line 653 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      Expr* expr = Expr::CreateBlock((yyvsp[0].block));
+      expr->block->label = (yyvsp[-1].text);
+      (yyval.expr_list) = join_exprs1(&(yylsp[-2]), expr);
+    }
+#line 3159 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 84:
+#line 658 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      Expr* expr = Expr::CreateLoop((yyvsp[0].block));
+      expr->loop->label = (yyvsp[-1].text);
+      (yyval.expr_list) = join_exprs1(&(yylsp[-2]), expr);
+    }
+#line 3169 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 85:
+#line 663 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr_list) = (yyvsp[0].expr_list);
+      Expr* if_ = (yyvsp[0].expr_list).last;
+      assert(if_->type == ExprType::If);
+      if_->if_.true_->label = (yyvsp[-1].text);
+    }
+#line 3180 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 86:
+#line 669 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      Block* block = (yyvsp[0].expr)->try_block.block;
+      block->label = (yyvsp[-1].text);
+      (yyval.expr_list) = join_exprs1(&(yylsp[-2]), (yyvsp[0].expr));
+    }
+#line 3190 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 87:
+#line 677 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr) = (yyvsp[0].expr);
+      Block* block = (yyval.expr)->try_block.block;
+      block->sig.insert(block->sig.end(), (yyvsp[-1].types)->begin(), (yyvsp[-1].types)->end());
+      delete (yyvsp[-1].types);
+    }
+#line 3201 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 89:
+#line 687 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+        Block* block = new Block();
+        (yyval.expr) = Expr::CreateTry(block, (yyvsp[0].expr_list).first);
+      }
+#line 3210 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 90:
+#line 691 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+        (yyval.expr) = (yyvsp[0].expr);
+        Block* block = (yyval.expr)->try_block.block;
+        if ((yyvsp[-1].expr_list).last) {
+          (yyvsp[-1].expr_list).last->next = block->first;
+        } else {
+          (yyvsp[-1].expr_list).first->next = block->first;
+        }
+        block->first = (yyvsp[-1].expr_list).first;
+      }
+#line 3225 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 91:
+#line 704 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr_list) = (yyvsp[-1].expr_list);
+    }
+#line 3233 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 92:
+#line 707 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr_list) = join_expr_lists(&(yyvsp[-2].expr_list), &(yyvsp[0].expr_list));
+    }
+#line 3241 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 93:
+#line 713 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      Expr* if_ = (yyvsp[0].expr_list).last;
+      assert(if_->type == ExprType::If);
+      (yyval.expr_list) = (yyvsp[0].expr_list);
+      Block* true_ = if_->if_.true_;
+      true_->sig.insert(true_->sig.end(), (yyvsp[-1].types)->begin(), (yyvsp[-1].types)->end());
+      delete (yyvsp[-1].types);
+    }
+#line 3254 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 95:
+#line 724 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      Expr* expr = Expr::CreateIf(new Block((yyvsp[-5].expr_list).first), (yyvsp[-1].expr_list).first);
+      (yyval.expr_list) = join_exprs1(&(yylsp[-7]), expr);
+    }
+#line 3263 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 96:
+#line 728 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      Expr* expr = Expr::CreateIf(new Block((yyvsp[-1].expr_list).first), nullptr);
+      (yyval.expr_list) = join_exprs1(&(yylsp[-3]), expr);
+    }
+#line 3272 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 97:
+#line 732 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      Expr* expr = Expr::CreateIf(new Block((yyvsp[-5].expr_list).first), (yyvsp[-1].expr_list).first);
+      (yyval.expr_list) = join_exprs2(&(yylsp[-8]), &(yyvsp[-8].expr_list), expr);
+    }
+#line 3281 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 98:
+#line 736 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      Expr* expr = Expr::CreateIf(new Block((yyvsp[-1].expr_list).first), nullptr);
+      (yyval.expr_list) = join_exprs2(&(yylsp[-4]), &(yyvsp[-4].expr_list), expr);
+    }
+#line 3290 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 99:
+#line 740 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      Expr* expr = Expr::CreateIf(new Block((yyvsp[-1].expr_list).first), (yyvsp[0].expr_list).first);
+      (yyval.expr_list) = join_exprs2(&(yylsp[-2]), &(yyvsp[-2].expr_list), expr);
+    }
+#line 3299 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 100:
+#line 744 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      Expr* expr = Expr::CreateIf(new Block((yyvsp[0].expr_list).first), nullptr);
+      (yyval.expr_list) = join_exprs2(&(yylsp[-1]), &(yyvsp[-1].expr_list), expr);
+    }
+#line 3308 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 101:
+#line 751 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+     CHECK_ALLOW_EXCEPTIONS(&(yylsp[0]), "rethrow");
+    }
+#line 3316 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 102:
+#line 756 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      CHECK_ALLOW_EXCEPTIONS(&(yylsp[0]), "throw");
+    }
+#line 3324 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 103:
+#line 762 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      CHECK_ALLOW_EXCEPTIONS(&(yylsp[0]), "try");      
+    }
+#line 3332 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 104:
+#line 768 "src/wast-parser.y" /* yacc.c:1646  */
+    { WABT_ZERO_MEMORY((yyval.expr_list)); }
+#line 3338 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 105:
+#line 769 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr_list).first = (yyvsp[-1].expr_list).first;
+      (yyvsp[-1].expr_list).last->next = (yyvsp[0].expr_list).first;
+      (yyval.expr_list).last = (yyvsp[0].expr_list).last ? (yyvsp[0].expr_list).last : (yyvsp[-1].expr_list).last;
+      (yyval.expr_list).size = (yyvsp[-1].expr_list).size + (yyvsp[0].expr_list).size;
+    }
+#line 3349 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 106:
+#line 777 "src/wast-parser.y" /* yacc.c:1646  */
+    { WABT_ZERO_MEMORY((yyval.expr_list)); }
+#line 3355 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 107:
+#line 778 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr_list).first = (yyvsp[-1].expr_list).first;
+      (yyvsp[-1].expr_list).last->next = (yyvsp[0].expr_list).first;
+      (yyval.expr_list).last = (yyvsp[0].expr_list).last ? (yyvsp[0].expr_list).last : (yyvsp[-1].expr_list).last;
+      (yyval.expr_list).size = (yyvsp[-1].expr_list).size + (yyvsp[0].expr_list).size;
+    }
+#line 3366 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 109:
+#line 791 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.exception) = new Exception();
+      (yyval.exception)->name = (yyvsp[-2].text);
+      (yyval.exception)->sig = std::move(*(yyvsp[-1].types));
+      delete (yyvsp[-1].types);
+    }
+#line 3377 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 110:
+#line 799 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.module_field) = new ModuleField(ModuleFieldType::Except);
+      (yyval.module_field)->loc = (yylsp[0]);
+      (yyval.module_field)->except = (yyvsp[0].exception);
+    }
+#line 3387 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 111:
+#line 808 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.module_fields) = (yyvsp[-1].module_fields);
+      ModuleField* main = (yyval.module_fields).first;
+      main->loc = (yylsp[-3]);
+      if (main->type == ModuleFieldType::Func) {
+        main->func->name = (yyvsp[-2].text);
+      } else {
+        assert(main->type == ModuleFieldType::Import);
+        main->import->func->name = (yyvsp[-2].text);
+      }
+    }
+#line 3403 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 112:
+#line 822 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      ModuleField* field = new ModuleField(ModuleFieldType::Func);
+      field->func = (yyvsp[0].func);
+      field->func->decl.has_func_type = true;
+      field->func->decl.type_var = std::move(*(yyvsp[-1].var));
+      delete (yyvsp[-1].var);
+      (yyval.module_fields).first = (yyval.module_fields).last = field;
+    }
+#line 3416 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 113:
+#line 830 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      ModuleField* field = new ModuleField(ModuleFieldType::Func);
+      field->func = (yyvsp[0].func);
+      (yyval.module_fields).first = (yyval.module_fields).last = field;
+    }
+#line 3426 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 114:
+#line 835 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      ModuleField* field = new ModuleField(ModuleFieldType::Import);
+      field->loc = (yylsp[-2]);
+      field->import = (yyvsp[-2].import);
+      field->import->kind = ExternalKind::Func;
+      field->import->func = (yyvsp[0].func);
+      field->import->func->decl.has_func_type = true;
+      field->import->func->decl.type_var = std::move(*(yyvsp[-1].var));
+      delete (yyvsp[-1].var);
+      (yyval.module_fields).first = (yyval.module_fields).last = field;
+    }
+#line 3442 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 115:
+#line 846 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      ModuleField* field = new ModuleField(ModuleFieldType::Import);
+      field->loc = (yylsp[-1]);
+      field->import = (yyvsp[-1].import);
+      field->import->kind = ExternalKind::Func;
+      field->import->func = (yyvsp[0].func);
+      (yyval.module_fields).first = (yyval.module_fields).last = field;
+    }
+#line 3455 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 116:
+#line 854 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      ModuleField* field = new ModuleField(ModuleFieldType::Export);
+      field->loc = (yylsp[-1]);
+      field->export_ = (yyvsp[-1].export_);
+      field->export_->kind = ExternalKind::Func;
+      (yyval.module_fields).first = (yyvsp[0].module_fields).first;
+      (yyval.module_fields).last = (yyvsp[0].module_fields).last->next = field;
+    }
+#line 3468 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 117:
+#line 865 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.func) = (yyvsp[0].func);
+      reverse_bindings(&(yyval.func)->decl.sig.param_types, &(yyval.func)->param_bindings);
+    }
+#line 3477 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 119:
+#line 873 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.func) = (yyvsp[0].func);
+      (yyval.func)->decl.sig.param_types.insert((yyval.func)->decl.sig.param_types.begin(),
+                                      (yyvsp[-2].types)->begin(), (yyvsp[-2].types)->end());
+      delete (yyvsp[-2].types);
+    }
+#line 3488 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 120:
+#line 879 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.func) = (yyvsp[0].func);
+      (yyval.func)->param_bindings.emplace(string_slice_to_string((yyvsp[-3].text)),
+                                 Binding((yylsp[-3]), (yyval.func)->decl.sig.param_types.size()));
+      destroy_string_slice(&(yyvsp[-3].text));
+      (yyval.func)->decl.sig.param_types.insert((yyval.func)->decl.sig.param_types.begin(), (yyvsp[-2].type));
+    }
+#line 3500 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 121:
+#line 889 "src/wast-parser.y" /* yacc.c:1646  */
+    { (yyval.func) = new Func(); }
+#line 3506 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 122:
+#line 890 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.func) = (yyvsp[0].func);
+      (yyval.func)->decl.sig.result_types.insert((yyval.func)->decl.sig.result_types.begin(),
+                                       (yyvsp[-2].types)->begin(), (yyvsp[-2].types)->end());
+      delete (yyvsp[-2].types);
+    }
+#line 3517 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 123:
+#line 899 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.func) = (yyvsp[0].func);
+      reverse_bindings(&(yyval.func)->decl.sig.param_types, &(yyval.func)->param_bindings);
+    }
+#line 3526 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 125:
+#line 907 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.func) = (yyvsp[0].func);
+      (yyval.func)->decl.sig.param_types.insert((yyval.func)->decl.sig.param_types.begin(),
+                                      (yyvsp[-2].types)->begin(), (yyvsp[-2].types)->end());
+      delete (yyvsp[-2].types);
+    }
+#line 3537 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 126:
+#line 913 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.func) = (yyvsp[0].func);
+      (yyval.func)->param_bindings.emplace(string_slice_to_string((yyvsp[-3].text)),
+                                 Binding((yylsp[-3]), (yyval.func)->decl.sig.param_types.size()));
+      destroy_string_slice(&(yyvsp[-3].text));
+      (yyval.func)->decl.sig.param_types.insert((yyval.func)->decl.sig.param_types.begin(), (yyvsp[-2].type));
+    }
+#line 3549 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 128:
+#line 924 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.func) = (yyvsp[0].func);
+      (yyval.func)->decl.sig.result_types.insert((yyval.func)->decl.sig.result_types.begin(),
+                                       (yyvsp[-2].types)->begin(), (yyvsp[-2].types)->end());
+      delete (yyvsp[-2].types);
+    }
+#line 3560 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 129:
+#line 933 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.func) = (yyvsp[0].func);
+      reverse_bindings(&(yyval.func)->local_types, &(yyval.func)->local_bindings);
+    }
+#line 3569 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 130:
+#line 940 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.func) = new Func();
+      (yyval.func)->first_expr = (yyvsp[0].expr_list).first;
+    }
+#line 3578 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 131:
+#line 944 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.func) = (yyvsp[0].func);
+      (yyval.func)->local_types.insert((yyval.func)->local_types.begin(), (yyvsp[-2].types)->begin(), (yyvsp[-2].types)->end());
+      delete (yyvsp[-2].types);
+    }
+#line 3588 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 132:
+#line 949 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.func) = (yyvsp[0].func);
+      (yyval.func)->local_bindings.emplace(string_slice_to_string((yyvsp[-3].text)),
+                                 Binding((yylsp[-3]), (yyval.func)->local_types.size()));
+      destroy_string_slice(&(yyvsp[-3].text));
+      (yyval.func)->local_types.insert((yyval.func)->local_types.begin(), (yyvsp[-2].type));
+    }
+#line 3600 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 133:
+#line 961 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.expr_list) = (yyvsp[-1].expr_list);
+    }
+#line 3608 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 135:
+#line 968 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.module_field) = new ModuleField(ModuleFieldType::ElemSegment);
+      (yyval.module_field)->loc = (yylsp[-4]);
+      (yyval.module_field)->elem_segment = new ElemSegment();
+      (yyval.module_field)->elem_segment->table_var = std::move(*(yyvsp[-3].var));
+      delete (yyvsp[-3].var);
+      (yyval.module_field)->elem_segment->offset = (yyvsp[-2].expr_list).first;
+      (yyval.module_field)->elem_segment->vars = std::move(*(yyvsp[-1].vars));
+      delete (yyvsp[-1].vars);
+    }
+#line 3623 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 136:
+#line 978 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.module_field) = new ModuleField(ModuleFieldType::ElemSegment);
+      (yyval.module_field)->loc = (yylsp[-3]);
+      (yyval.module_field)->elem_segment = new ElemSegment();
+      (yyval.module_field)->elem_segment->table_var.loc = (yylsp[-3]);
+      (yyval.module_field)->elem_segment->table_var.type = VarType::Index;
+      (yyval.module_field)->elem_segment->table_var.index = 0;
+      (yyval.module_field)->elem_segment->offset = (yyvsp[-2].expr_list).first;
+      (yyval.module_field)->elem_segment->vars = std::move(*(yyvsp[-1].vars));
+      delete (yyvsp[-1].vars);
+    }
+#line 3639 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 137:
+#line 992 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.module_fields) = (yyvsp[-1].module_fields);
+      ModuleField* main = (yyval.module_fields).first;
+      main->loc = (yylsp[-3]);
+      if (main->type == ModuleFieldType::Table) {
+        main->table->name = (yyvsp[-2].text);
+      } else {
+        assert(main->type == ModuleFieldType::Import);
+        main->import->table->name = (yyvsp[-2].text);
+      }
+    }
+#line 3655 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 138:
+#line 1006 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      ModuleField* field = new ModuleField(ModuleFieldType::Table);
+      field->loc = (yylsp[0]);
+      field->table = (yyvsp[0].table);
+      (yyval.module_fields).first = (yyval.module_fields).last = field;
+    }
+#line 3666 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 139:
+#line 1012 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      ModuleField* field = new ModuleField(ModuleFieldType::Import);
+      field->loc = (yylsp[-1]);
+      field->import = (yyvsp[-1].import);
+      field->import->kind = ExternalKind::Table;
+      field->import->table = (yyvsp[0].table);
+      (yyval.module_fields).first = (yyval.module_fields).last = field;
+    }
+#line 3679 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 140:
+#line 1020 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      ModuleField* field = new ModuleField(ModuleFieldType::Export);
+      field->loc = (yylsp[-1]);
+      field->export_ = (yyvsp[-1].export_);
+      field->export_->kind = ExternalKind::Table;
+      (yyval.module_fields).first = (yyvsp[0].module_fields).first;
+      (yyval.module_fields).last = (yyvsp[0].module_fields).last->next = field;
+    }
+#line 3692 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 141:
+#line 1028 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      ModuleField* table_field = new ModuleField(ModuleFieldType::Table);
+      Table* table = table_field->table = new Table();
+      table->elem_limits.initial = (yyvsp[-1].vars)->size();
+      table->elem_limits.max = (yyvsp[-1].vars)->size();
+      table->elem_limits.has_max = true;
+      ModuleField* elem_field = new ModuleField(ModuleFieldType::ElemSegment);
+      elem_field->loc = (yylsp[-2]);
+      ElemSegment* elem_segment = elem_field->elem_segment = new ElemSegment();
+      elem_segment->table_var = Var(kInvalidIndex);
+      elem_segment->offset = Expr::CreateConst(Const(Const::I32(), 0));
+      elem_segment->offset->loc = (yylsp[-2]);
+      elem_segment->vars = std::move(*(yyvsp[-1].vars));
+      delete (yyvsp[-1].vars);
+      (yyval.module_fields).first = table_field;
+      (yyval.module_fields).last = table_field->next = elem_field;
+    }
+#line 3714 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 142:
+#line 1048 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.module_field) = new ModuleField(ModuleFieldType::DataSegment);
+      (yyval.module_field)->loc = (yylsp[-4]);
+      (yyval.module_field)->data_segment = new DataSegment();
+      (yyval.module_field)->data_segment->memory_var = std::move(*(yyvsp[-3].var));
+      delete (yyvsp[-3].var);
+      (yyval.module_field)->data_segment->offset = (yyvsp[-2].expr_list).first;
+      dup_text_list(&(yyvsp[-1].text_list), &(yyval.module_field)->data_segment->data, &(yyval.module_field)->data_segment->size);
+      destroy_text_list(&(yyvsp[-1].text_list));
+    }
+#line 3729 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 143:
+#line 1058 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.module_field) = new ModuleField(ModuleFieldType::DataSegment);
+      (yyval.module_field)->loc = (yylsp[-3]);
+      (yyval.module_field)->data_segment = new DataSegment();
+      (yyval.module_field)->data_segment->memory_var.loc = (yylsp[-3]);
+      (yyval.module_field)->data_segment->memory_var.type = VarType::Index;
+      (yyval.module_field)->data_segment->memory_var.index = 0;
+      (yyval.module_field)->data_segment->offset = (yyvsp[-2].expr_list).first;
+      dup_text_list(&(yyvsp[-1].text_list), &(yyval.module_field)->data_segment->data, &(yyval.module_field)->data_segment->size);
+      destroy_text_list(&(yyvsp[-1].text_list));
+    }
+#line 3745 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 144:
+#line 1072 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.module_fields) = (yyvsp[-1].module_fields);
+      ModuleField* main = (yyval.module_fields).first;
+      main->loc = (yylsp[-3]);
+      if (main->type == ModuleFieldType::Memory) {
+        main->memory->name = (yyvsp[-2].text);
+      } else {
+        assert(main->type == ModuleFieldType::Import);
+        main->import->memory->name = (yyvsp[-2].text);
+      }
+    }
+#line 3761 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 145:
+#line 1086 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      ModuleField* field = new ModuleField(ModuleFieldType::Memory);
+      field->memory = (yyvsp[0].memory);
+      (yyval.module_fields).first = (yyval.module_fields).last = field;
+    }
+#line 3771 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 146:
+#line 1091 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      ModuleField* field = new ModuleField(ModuleFieldType::Import);
+      field->loc = (yylsp[-1]);
+      field->import = (yyvsp[-1].import);
+      field->import->kind = ExternalKind::Memory;
+      field->import->memory = (yyvsp[0].memory);
+      (yyval.module_fields).first = (yyval.module_fields).last = field;
+    }
+#line 3784 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 147:
+#line 1099 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      ModuleField* field = new ModuleField(ModuleFieldType::Export);
+      field->loc = (yylsp[-1]);
+      field->export_ = (yyvsp[-1].export_);
+      field->export_->kind = ExternalKind::Memory;
+      (yyval.module_fields).first = (yyvsp[0].module_fields).first;
+      (yyval.module_fields).last = (yyvsp[0].module_fields).last->next = field;
+    }
+#line 3797 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 148:
+#line 1107 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      ModuleField* data_field = new ModuleField(ModuleFieldType::DataSegment);
+      data_field->loc = (yylsp[-2]);
+      DataSegment* data_segment = data_field->data_segment = new DataSegment();
+      data_segment->memory_var = Var(kInvalidIndex);
+      data_segment->offset = Expr::CreateConst(Const(Const::I32(), 0));
+      data_segment->offset->loc = (yylsp[-2]);
+      dup_text_list(&(yyvsp[-1].text_list), &data_segment->data, &data_segment->size);
+      destroy_text_list(&(yyvsp[-1].text_list));
+      uint32_t byte_size = WABT_ALIGN_UP_TO_PAGE(data_segment->size);
+      uint32_t page_size = WABT_BYTES_TO_PAGES(byte_size);
+
+      ModuleField* memory_field = new ModuleField(ModuleFieldType::Memory);
+      memory_field->loc = (yylsp[-2]);
+      Memory* memory = memory_field->memory = new Memory();
+      memory->page_limits.initial = page_size;
+      memory->page_limits.max = page_size;
+      memory->page_limits.has_max = true;
+      (yyval.module_fields).first = memory_field;
+      (yyval.module_fields).last = memory_field->next = data_field;
+    }
+#line 3823 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 149:
+#line 1131 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.module_fields) = (yyvsp[-1].module_fields);
+      ModuleField* main = (yyval.module_fields).first;
+      main->loc = (yylsp[-3]);
+      if (main->type == ModuleFieldType::Global) {
+        main->global->name = (yyvsp[-2].text);
+      } else {
+        assert(main->type == ModuleFieldType::Import);
+        main->import->global->name = (yyvsp[-2].text);
+      }
+    }
+#line 3839 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 150:
+#line 1145 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      ModuleField* field = new ModuleField(ModuleFieldType::Global);
+      field->global = (yyvsp[-1].global);
+      field->global->init_expr = (yyvsp[0].expr_list).first;
+      (yyval.module_fields).first = (yyval.module_fields).last = field;
+    }
+#line 3850 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 151:
+#line 1151 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      ModuleField* field = new ModuleField(ModuleFieldType::Import);
+      field->loc = (yylsp[-1]);
+      field->import = (yyvsp[-1].import);
+      field->import->kind = ExternalKind::Global;
+      field->import->global = (yyvsp[0].global);
+      (yyval.module_fields).first = (yyval.module_fields).last = field;
+    }
+#line 3863 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 152:
+#line 1159 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      ModuleField* field = new ModuleField(ModuleFieldType::Export);
+      field->loc = (yylsp[-1]);
+      field->export_ = (yyvsp[-1].export_);
+      field->export_->kind = ExternalKind::Global;
+      (yyval.module_fields).first = (yyvsp[0].module_fields).first;
+      (yyval.module_fields).last = (yyvsp[0].module_fields).last->next = field;
+    }
+#line 3876 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 153:
+#line 1172 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.import) = new Import();
+      (yyval.import)->kind = ExternalKind::Func;
+      (yyval.import)->func = new Func();
+      (yyval.import)->func->name = (yyvsp[-2].text);
+      (yyval.import)->func->decl.has_func_type = true;
+      (yyval.import)->func->decl.type_var = std::move(*(yyvsp[-1].var));
+      delete (yyvsp[-1].var);
+    }
+#line 3890 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 154:
+#line 1181 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.import) = new Import();
+      (yyval.import)->kind = ExternalKind::Func;
+      (yyval.import)->func = new Func();
+      (yyval.import)->func->name = (yyvsp[-2].text);
+      (yyval.import)->func->decl.sig = std::move(*(yyvsp[-1].func_sig));
+      delete (yyvsp[-1].func_sig);
+    }
+#line 3903 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 155:
+#line 1189 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.import) = new Import();
+      (yyval.import)->kind = ExternalKind::Table;
+      (yyval.import)->table = (yyvsp[-1].table);
+      (yyval.import)->table->name = (yyvsp[-2].text);
+    }
+#line 3914 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 156:
+#line 1195 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.import) = new Import();
+      (yyval.import)->kind = ExternalKind::Memory;
+      (yyval.import)->memory = (yyvsp[-1].memory);
+      (yyval.import)->memory->name = (yyvsp[-2].text);
+    }
+#line 3925 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 157:
+#line 1201 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.import) = new Import();
+      (yyval.import)->kind = ExternalKind::Global;
+      (yyval.import)->global = (yyvsp[-1].global);
+      (yyval.import)->global->name = (yyvsp[-2].text);
+    }
+#line 3936 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 158:
+#line 1207 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.import) = new Import();
+      (yyval.import)->kind = ExternalKind::Except;
+      (yyval.import)->except = (yyvsp[0].exception);
+    }
+#line 3946 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 159:
+#line 1215 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.module_field) = new ModuleField(ModuleFieldType::Import);
+      (yyval.module_field)->loc = (yylsp[-4]);
+      (yyval.module_field)->import = (yyvsp[-1].import);
+      (yyval.module_field)->import->module_name = (yyvsp[-3].text);
+      (yyval.module_field)->import->field_name = (yyvsp[-2].text);
+    }
+#line 3958 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 160:
+#line 1225 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.import) = new Import();
+      (yyval.import)->module_name = (yyvsp[-2].text);
+      (yyval.import)->field_name = (yyvsp[-1].text);
+    }
+#line 3968 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 161:
+#line 1233 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.export_) = new Export();
+      (yyval.export_)->kind = ExternalKind::Func;
+      (yyval.export_)->var = std::move(*(yyvsp[-1].var));
+      delete (yyvsp[-1].var);
+    }
+#line 3979 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 162:
+#line 1239 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.export_) = new Export();
+      (yyval.export_)->kind = ExternalKind::Table;
+      (yyval.export_)->var = std::move(*(yyvsp[-1].var));
+      delete (yyvsp[-1].var);
+    }
+#line 3990 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 163:
+#line 1245 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.export_) = new Export();
+      (yyval.export_)->kind = ExternalKind::Memory;
+      (yyval.export_)->var = std::move(*(yyvsp[-1].var));
+      delete (yyvsp[-1].var);
+    }
+#line 4001 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 164:
+#line 1251 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.export_) = new Export();
+      (yyval.export_)->kind = ExternalKind::Global;
+      (yyval.export_)->var = std::move(*(yyvsp[-1].var));
+      delete (yyvsp[-1].var);
+    }
+#line 4012 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 165:
+#line 1257 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.export_) = new Export();
+      (yyval.export_)->kind = ExternalKind::Except;
+      (yyval.export_)->var = std::move(*(yyvsp[-1].var));
+      delete (yyvsp[-1].var);
+    }
+#line 4023 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 166:
+#line 1265 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.module_field) = new ModuleField(ModuleFieldType::Export);
+      (yyval.module_field)->loc = (yylsp[-3]);
+      (yyval.module_field)->export_ = (yyvsp[-1].export_);
+      (yyval.module_field)->export_->name = (yyvsp[-2].text);
+    }
+#line 4034 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 167:
+#line 1274 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.export_) = new Export();
+      (yyval.export_)->name = (yyvsp[-1].text);
+    }
+#line 4043 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 168:
+#line 1284 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.module_field) = new ModuleField(ModuleFieldType::FuncType);
+      (yyval.module_field)->loc = (yylsp[-2]);
+      (yyval.module_field)->func_type = new FuncType();
+      (yyval.module_field)->func_type->sig = std::move(*(yyvsp[-1].func_sig));
+      delete (yyvsp[-1].func_sig);
+    }
+#line 4055 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 169:
+#line 1291 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.module_field) = new ModuleField(ModuleFieldType::FuncType);
+      (yyval.module_field)->loc = (yylsp[-3]);
+      (yyval.module_field)->func_type = new FuncType();
+      (yyval.module_field)->func_type->name = (yyvsp[-2].text);
+      (yyval.module_field)->func_type->sig = std::move(*(yyvsp[-1].func_sig));
+      delete (yyvsp[-1].func_sig);
+    }
+#line 4068 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 170:
+#line 1302 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.module_field) = new ModuleField(ModuleFieldType::Start);
+      (yyval.module_field)->loc = (yylsp[-2]);
+      (yyval.module_field)->start = std::move(*(yyvsp[-1].var));
+      delete (yyvsp[-1].var);
+    }
+#line 4079 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 171:
+#line 1311 "src/wast-parser.y" /* yacc.c:1646  */
+    { (yyval.module_fields).first = (yyval.module_fields).last = (yyvsp[0].module_field); }
+#line 4085 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 176:
+#line 1316 "src/wast-parser.y" /* yacc.c:1646  */
+    { (yyval.module_fields).first = (yyval.module_fields).last = (yyvsp[0].module_field); }
+#line 4091 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 177:
+#line 1317 "src/wast-parser.y" /* yacc.c:1646  */
+    { (yyval.module_fields).first = (yyval.module_fields).last = (yyvsp[0].module_field); }
+#line 4097 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 178:
+#line 1318 "src/wast-parser.y" /* yacc.c:1646  */
+    { (yyval.module_fields).first = (yyval.module_fields).last = (yyvsp[0].module_field); }
+#line 4103 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 179:
+#line 1319 "src/wast-parser.y" /* yacc.c:1646  */
+    { (yyval.module_fields).first = (yyval.module_fields).last = (yyvsp[0].module_field); }
+#line 4109 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 180:
+#line 1320 "src/wast-parser.y" /* yacc.c:1646  */
+    { (yyval.module_fields).first = (yyval.module_fields).last = (yyvsp[0].module_field); }
+#line 4115 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 181:
+#line 1321 "src/wast-parser.y" /* yacc.c:1646  */
+    { (yyval.module_fields).first = (yyval.module_fields).last = (yyvsp[0].module_field); }
+#line 4121 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 182:
+#line 1325 "src/wast-parser.y" /* yacc.c:1646  */
+    { (yyval.module) = new Module(); }
+#line 4127 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 184:
+#line 1330 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.module) = new Module();
+      check_import_ordering(&(yylsp[0]), lexer, parser, (yyval.module), (yyvsp[0].module_fields).first);
+      append_module_fields((yyval.module), (yyvsp[0].module_fields).first);
+    }
+#line 4137 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 185:
+#line 1335 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.module) = (yyvsp[-1].module);
+      check_import_ordering(&(yylsp[0]), lexer, parser, (yyval.module), (yyvsp[0].module_fields).first);
+      append_module_fields((yyval.module), (yyvsp[0].module_fields).first);
+    }
+#line 4147 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 186:
+#line 1343 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      if ((yyvsp[0].script_module)->type == ScriptModule::Type::Text) {
+        (yyval.module) = (yyvsp[0].script_module)->text;
+        (yyvsp[0].script_module)->text = nullptr;
+      } else {
+        assert((yyvsp[0].script_module)->type == ScriptModule::Type::Binary);
+        (yyval.module) = new Module();
+        ReadBinaryOptions options = WABT_READ_BINARY_OPTIONS_DEFAULT;
+        BinaryErrorHandlerModule error_handler(&(yyvsp[0].script_module)->binary.loc, lexer, parser);
+        read_binary_ir((yyvsp[0].script_module)->binary.data, (yyvsp[0].script_module)->binary.size, &options,
+                       &error_handler, (yyval.module));
+        (yyval.module)->name = (yyvsp[0].script_module)->binary.name;
+        (yyval.module)->loc = (yyvsp[0].script_module)->binary.loc;
+        WABT_ZERO_MEMORY((yyvsp[0].script_module)->binary.name);
+      }
+      delete (yyvsp[0].script_module);
+    }
+#line 4169 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 188:
+#line 1370 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.var) = new Var(kInvalidIndex);
+    }
+#line 4177 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 189:
+#line 1373 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      StringSlice name;
+      DUPTEXT(name, (yyvsp[0].text));
+      (yyval.var) = new Var(name);
+    }
+#line 4187 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 190:
+#line 1381 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.script_module) = new ScriptModule();
+      (yyval.script_module)->type = ScriptModule::Type::Text;
+      (yyval.script_module)->text = (yyvsp[-1].module);
+      (yyval.script_module)->text->name = (yyvsp[-2].text);
+      (yyval.script_module)->text->loc = (yylsp[-3]);
+
+      // Resolve func type variables where the signature was not specified
+      // explicitly.
+      for (Func* func: (yyvsp[-1].module)->funcs) {
+        if (func->decl.has_func_type && is_empty_signature(&func->decl.sig)) {
+          FuncType* func_type = (yyvsp[-1].module)->GetFuncType(func->decl.type_var);
+          if (func_type) {
+            func->decl.sig = func_type->sig;
+          }
+        }
+      }
+    }
+#line 4210 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 191:
+#line 1399 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.script_module) = new ScriptModule();
+      (yyval.script_module)->type = ScriptModule::Type::Binary;
+      (yyval.script_module)->binary.name = (yyvsp[-3].text);
+      (yyval.script_module)->binary.loc = (yylsp[-4]);
+      dup_text_list(&(yyvsp[-1].text_list), &(yyval.script_module)->binary.data, &(yyval.script_module)->binary.size);
+      destroy_text_list(&(yyvsp[-1].text_list));
+    }
+#line 4223 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 192:
+#line 1407 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.script_module) = new ScriptModule();
+      (yyval.script_module)->type = ScriptModule::Type::Quoted;
+      (yyval.script_module)->quoted.name = (yyvsp[-3].text);
+      (yyval.script_module)->quoted.loc = (yylsp[-4]);
+      dup_text_list(&(yyvsp[-1].text_list), &(yyval.script_module)->quoted.data, &(yyval.script_module)->quoted.size);
+      destroy_text_list(&(yyvsp[-1].text_list));
+    }
+#line 4236 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 193:
+#line 1418 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.action) = new Action();
+      (yyval.action)->loc = (yylsp[-4]);
+      (yyval.action)->module_var = std::move(*(yyvsp[-3].var));
+      delete (yyvsp[-3].var);
+      (yyval.action)->type = ActionType::Invoke;
+      (yyval.action)->name = (yyvsp[-2].text);
+      (yyval.action)->invoke = new ActionInvoke();
+      (yyval.action)->invoke->args = std::move(*(yyvsp[-1].consts));
+      delete (yyvsp[-1].consts);
+    }
+#line 4252 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 194:
+#line 1429 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.action) = new Action();
+      (yyval.action)->loc = (yylsp[-3]);
+      (yyval.action)->module_var = std::move(*(yyvsp[-2].var));
+      delete (yyvsp[-2].var);
+      (yyval.action)->type = ActionType::Get;
+      (yyval.action)->name = (yyvsp[-1].text);
+    }
+#line 4265 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 195:
+#line 1440 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.command) = new Command();
+      (yyval.command)->type = CommandType::AssertMalformed;
+      (yyval.command)->assert_malformed.module = (yyvsp[-2].script_module);
+      (yyval.command)->assert_malformed.text = (yyvsp[-1].text);
+    }
+#line 4276 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 196:
+#line 1446 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.command) = new Command();
+      (yyval.command)->type = CommandType::AssertInvalid;
+      (yyval.command)->assert_invalid.module = (yyvsp[-2].script_module);
+      (yyval.command)->assert_invalid.text = (yyvsp[-1].text);
+    }
+#line 4287 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 197:
+#line 1452 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.command) = new Command();
+      (yyval.command)->type = CommandType::AssertUnlinkable;
+      (yyval.command)->assert_unlinkable.module = (yyvsp[-2].script_module);
+      (yyval.command)->assert_unlinkable.text = (yyvsp[-1].text);
+    }
+#line 4298 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 198:
+#line 1458 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.command) = new Command();
+      (yyval.command)->type = CommandType::AssertUninstantiable;
+      (yyval.command)->assert_uninstantiable.module = (yyvsp[-2].script_module);
+      (yyval.command)->assert_uninstantiable.text = (yyvsp[-1].text);
+    }
+#line 4309 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 199:
+#line 1464 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.command) = new Command();
+      (yyval.command)->type = CommandType::AssertReturn;
+      (yyval.command)->assert_return.action = (yyvsp[-2].action);
+      (yyval.command)->assert_return.expected = (yyvsp[-1].consts);
+    }
+#line 4320 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 200:
+#line 1470 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.command) = new Command();
+      (yyval.command)->type = CommandType::AssertReturnCanonicalNan;
+      (yyval.command)->assert_return_canonical_nan.action = (yyvsp[-1].action);
+    }
+#line 4330 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 201:
+#line 1475 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.command) = new Command();
+      (yyval.command)->type = CommandType::AssertReturnArithmeticNan;
+      (yyval.command)->assert_return_arithmetic_nan.action = (yyvsp[-1].action);
+    }
+#line 4340 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 202:
+#line 1480 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.command) = new Command();
+      (yyval.command)->type = CommandType::AssertTrap;
+      (yyval.command)->assert_trap.action = (yyvsp[-2].action);
+      (yyval.command)->assert_trap.text = (yyvsp[-1].text);
+    }
+#line 4351 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 203:
+#line 1486 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.command) = new Command();
+      (yyval.command)->type = CommandType::AssertExhaustion;
+      (yyval.command)->assert_trap.action = (yyvsp[-2].action);
+      (yyval.command)->assert_trap.text = (yyvsp[-1].text);
+    }
+#line 4362 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 204:
+#line 1495 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.command) = new Command();
+      (yyval.command)->type = CommandType::Action;
+      (yyval.command)->action = (yyvsp[0].action);
+    }
+#line 4372 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 206:
+#line 1501 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.command) = new Command();
+      (yyval.command)->type = CommandType::Module;
+      (yyval.command)->module = (yyvsp[0].module);
+    }
+#line 4382 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 207:
+#line 1506 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.command) = new Command();
+      (yyval.command)->type = CommandType::Register;
+      (yyval.command)->register_.module_name = (yyvsp[-2].text);
+      (yyval.command)->register_.var = std::move(*(yyvsp[-1].var));
+      delete (yyvsp[-1].var);
+      (yyval.command)->register_.var.loc = (yylsp[-1]);
+    }
+#line 4395 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 208:
+#line 1516 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.commands) = new CommandPtrVector();
+      (yyval.commands)->emplace_back((yyvsp[0].command));
+    }
+#line 4404 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 209:
+#line 1520 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.commands) = (yyvsp[-1].commands);
+      (yyval.commands)->emplace_back((yyvsp[0].command));
+    }
+#line 4413 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 210:
+#line 1527 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.const_).loc = (yylsp[-2]);
+      if (WABT_FAILED(parse_const((yyvsp[-2].type), (yyvsp[-1].literal).type, (yyvsp[-1].literal).text.start,
+                                  (yyvsp[-1].literal).text.start + (yyvsp[-1].literal).text.length, &(yyval.const_)))) {
+        wast_parser_error(&(yylsp[-1]), lexer, parser,
+                          "invalid literal \"" PRIstringslice "\"",
+                          WABT_PRINTF_STRING_SLICE_ARG((yyvsp[-1].literal).text));
+      }
+      delete [] (yyvsp[-1].literal).text.start;
+    }
+#line 4428 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 211:
+#line 1539 "src/wast-parser.y" /* yacc.c:1646  */
+    { (yyval.consts) = new ConstVector(); }
+#line 4434 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 212:
+#line 1540 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.consts) = (yyvsp[-1].consts);
+      (yyval.consts)->push_back((yyvsp[0].const_));
+    }
+#line 4443 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 213:
+#line 1547 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.script) = new Script();
+    }
+#line 4451 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 214:
+#line 1550 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.script) = new Script();
+      (yyval.script)->commands = std::move(*(yyvsp[0].commands));
+      delete (yyvsp[0].commands);
+
+      int last_module_index = -1;
+      for (size_t i = 0; i < (yyval.script)->commands.size(); ++i) {
+        Command& command = *(yyval.script)->commands[i].get();
+        Var* module_var = nullptr;
+        switch (command.type) {
+          case CommandType::Module: {
+            last_module_index = i;
+
+            /* Wire up module name bindings. */
+            Module* module = command.module;
+            if (module->name.length == 0)
+              continue;
+
+            (yyval.script)->module_bindings.emplace(string_slice_to_string(module->name),
+                                        Binding(module->loc, i));
+            break;
+          }
+
+          case CommandType::AssertReturn:
+            module_var = &command.assert_return.action->module_var;
+            goto has_module_var;
+          case CommandType::AssertReturnCanonicalNan:
+            module_var =
+                &command.assert_return_canonical_nan.action->module_var;
+            goto has_module_var;
+          case CommandType::AssertReturnArithmeticNan:
+            module_var =
+                &command.assert_return_arithmetic_nan.action->module_var;
+            goto has_module_var;
+          case CommandType::AssertTrap:
+          case CommandType::AssertExhaustion:
+            module_var = &command.assert_trap.action->module_var;
+            goto has_module_var;
+          case CommandType::Action:
+            module_var = &command.action->module_var;
+            goto has_module_var;
+          case CommandType::Register:
+            module_var = &command.register_.var;
+            goto has_module_var;
+
+          has_module_var: {
+            /* Resolve actions with an invalid index to use the preceding
+             * module. */
+            if (module_var->type == VarType::Index &&
+                module_var->index == kInvalidIndex) {
+              module_var->index = last_module_index;
+            }
+            break;
+          }
+
+          default:
+            break;
+        }
+      }
+    }
+#line 4516 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 215:
+#line 1610 "src/wast-parser.y" /* yacc.c:1646  */
+    {
+      (yyval.script) = new Script();
+      Command* command = new Command();
+      command->type = CommandType::Module;
+      command->module = (yyvsp[0].module);
+      (yyval.script)->commands.emplace_back(command);
+    }
+#line 4528 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+  case 216:
+#line 1622 "src/wast-parser.y" /* yacc.c:1646  */
+    { parser->script = (yyvsp[0].script); }
+#line 4534 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+    break;
+
+
+#line 4538 "src/prebuilt/wast-parser-gen.cc" /* yacc.c:1646  */
+      default: break;
+    }
+  /* User semantic actions sometimes alter yychar, and that requires
+     that yytoken be updated with the new translation.  We take the
+     approach of translating immediately before every use of yytoken.
+     One alternative is translating here after every semantic action,
+     but that translation would be missed if the semantic action invokes
+     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
+     incorrect destructor might then be invoked immediately.  In the
+     case of YYERROR or YYBACKUP, subsequent parser actions might lead
+     to an incorrect destructor call or verbose syntax error message
+     before the lookahead is translated.  */
+  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+  YYPOPSTACK (yylen);
+  yylen = 0;
+  YY_STACK_PRINT (yyss, yyssp);
+
+  *++yyvsp = yyval;
+  *++yylsp = yyloc;
+
+  /* Now 'shift' the result of the reduction.  Determine what state
+     that goes to, based on the state we popped back to and the rule
+     number reduced by.  */
+
+  yyn = yyr1[yyn];
+
+  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+    yystate = yytable[yystate];
+  else
+    yystate = yydefgoto[yyn - YYNTOKENS];
+
+  goto yynewstate;
+
+
+/*--------------------------------------.
+| yyerrlab -- here on detecting error.  |
+`--------------------------------------*/
+yyerrlab:
+  /* Make sure we have latest lookahead translation.  See comments at
+     user semantic actions for why this is necessary.  */
+  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
+  /* If not already recovering from an error, report this error.  */
+  if (!yyerrstatus)
+    {
+      ++yynerrs;
+#if ! YYERROR_VERBOSE
+      yyerror (&yylloc, lexer, parser, YY_("syntax error"));
+#else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+                                        yyssp, yytoken)
+      {
+        char const *yymsgp = YY_("syntax error");
+        int yysyntax_error_status;
+        yysyntax_error_status = YYSYNTAX_ERROR;
+        if (yysyntax_error_status == 0)
+          yymsgp = yymsg;
+        else if (yysyntax_error_status == 1)
+          {
+            if (yymsg != yymsgbuf)
+              YYSTACK_FREE (yymsg);
+            yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+            if (!yymsg)
+              {
+                yymsg = yymsgbuf;
+                yymsg_alloc = sizeof yymsgbuf;
+                yysyntax_error_status = 2;
+              }
+            else
+              {
+                yysyntax_error_status = YYSYNTAX_ERROR;
+                yymsgp = yymsg;
+              }
+          }
+        yyerror (&yylloc, lexer, parser, yymsgp);
+        if (yysyntax_error_status == 2)
+          goto yyexhaustedlab;
+      }
+# undef YYSYNTAX_ERROR
+#endif
+    }
+
+  yyerror_range[1] = yylloc;
+
+  if (yyerrstatus == 3)
+    {
+      /* If just tried and failed to reuse lookahead token after an
+         error, discard it.  */
+
+      if (yychar <= YYEOF)
+        {
+          /* Return failure if at end of input.  */
+          if (yychar == YYEOF)
+            YYABORT;
+        }
+      else
+        {
+          yydestruct ("Error: discarding",
+                      yytoken, &yylval, &yylloc, lexer, parser);
+          yychar = YYEMPTY;
+        }
+    }
+
+  /* Else will try to reuse lookahead token after shifting the error
+     token.  */
+  goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR.  |
+`---------------------------------------------------*/
+yyerrorlab:
+
+  /* Pacify compilers like GCC when the user code never invokes
+     YYERROR and the label yyerrorlab therefore never appears in user
+     code.  */
+  if (/*CONSTCOND*/ 0)
+     goto yyerrorlab;
+
+  yyerror_range[1] = yylsp[1-yylen];
+  /* Do not reclaim the symbols of the rule whose action triggered
+     this YYERROR.  */
+  YYPOPSTACK (yylen);
+  yylen = 0;
+  YY_STACK_PRINT (yyss, yyssp);
+  yystate = *yyssp;
+  goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR.  |
+`-------------------------------------------------------------*/
+yyerrlab1:
+  yyerrstatus = 3;      /* Each real token shifted decrements this.  */
+
+  for (;;)
+    {
+      yyn = yypact[yystate];
+      if (!yypact_value_is_default (yyn))
+        {
+          yyn += YYTERROR;
+          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+            {
+              yyn = yytable[yyn];
+              if (0 < yyn)
+                break;
+            }
+        }
+
+      /* Pop the current state because it cannot handle the error token.  */
+      if (yyssp == yyss)
+        YYABORT;
+
+      yyerror_range[1] = *yylsp;
+      yydestruct ("Error: popping",
+                  yystos[yystate], yyvsp, yylsp, lexer, parser);
+      YYPOPSTACK (1);
+      yystate = *yyssp;
+      YY_STACK_PRINT (yyss, yyssp);
+    }
+
+  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+  *++yyvsp = yylval;
+  YY_IGNORE_MAYBE_UNINITIALIZED_END
+
+  yyerror_range[2] = yylloc;
+  /* Using YYLLOC is tempting, but would change the location of
+     the lookahead.  YYLOC is available though.  */
+  YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
+  *++yylsp = yyloc;
+
+  /* Shift the error token.  */
+  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
+  yystate = yyn;
+  goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here.  |
+`-------------------------------------*/
+yyacceptlab:
+  yyresult = 0;
+  goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here.  |
+`-----------------------------------*/
+yyabortlab:
+  yyresult = 1;
+  goto yyreturn;
+
+#if !defined yyoverflow || YYERROR_VERBOSE
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here.  |
+`-------------------------------------------------*/
+yyexhaustedlab:
+  yyerror (&yylloc, lexer, parser, YY_("memory exhausted"));
+  yyresult = 2;
+  /* Fall through.  */
+#endif
+
+yyreturn:
+  if (yychar != YYEMPTY)
+    {
+      /* Make sure we have latest lookahead translation.  See comments at
+         user semantic actions for why this is necessary.  */
+      yytoken = YYTRANSLATE (yychar);
+      yydestruct ("Cleanup: discarding lookahead",
+                  yytoken, &yylval, &yylloc, lexer, parser);
+    }
+  /* Do not reclaim the symbols of the rule whose action triggered
+     this YYABORT or YYACCEPT.  */
+  YYPOPSTACK (yylen);
+  YY_STACK_PRINT (yyss, yyssp);
+  while (yyssp != yyss)
+    {
+      yydestruct ("Cleanup: popping",
+                  yystos[*yyssp], yyvsp, yylsp, lexer, parser);
+      YYPOPSTACK (1);
+    }
+#ifndef yyoverflow
+  if (yyss != yyssa)
+    YYSTACK_FREE (yyss);
+#endif
+#if YYERROR_VERBOSE
+  if (yymsg != yymsgbuf)
+    YYSTACK_FREE (yymsg);
+#endif
+  return yyresult;
+}
+#line 1625 "src/wast-parser.y" /* yacc.c:1906  */
+
+
+void append_expr_list(ExprList* expr_list, ExprList* expr) {
+  if (!expr->first)
+    return;
+  if (expr_list->last)
+    expr_list->last->next = expr->first;
+  else
+    expr_list->first = expr->first;
+  expr_list->last = expr->last;
+  expr_list->size += expr->size;
+}
+
+void append_expr(ExprList* expr_list, Expr* expr) {
+  if (expr_list->last)
+    expr_list->last->next = expr;
+  else
+    expr_list->first = expr;
+  expr_list->last = expr;
+  expr_list->size++;
+}
+
+ExprList join_exprs1(Location* loc, Expr* expr1) {
+  ExprList result;
+  WABT_ZERO_MEMORY(result);
+  append_expr(&result, expr1);
+  expr1->loc = *loc;
+  return result;
+}
+
+ExprList join_exprs2(Location* loc, ExprList* expr1, Expr* expr2) {
+  ExprList result;
+  WABT_ZERO_MEMORY(result);
+  append_expr_list(&result, expr1);
+  append_expr(&result, expr2);
+  expr2->loc = *loc;
+  return result;
+}
+
+ExprList join_expr_lists(ExprList* expr1, ExprList* expr2) {
+  ExprList result;
+  WABT_ZERO_MEMORY(result);
+  append_expr_list(&result, expr1);
+  append_expr_list(&result, expr2);
+  return result;
+}
+
+Result parse_const(Type type,
+                   LiteralType literal_type,
+                   const char* s,
+                   const char* end,
+                   Const* out) {
+  out->type = type;
+  switch (type) {
+    case Type::I32:
+      return parse_int32(s, end, &out->u32, ParseIntType::SignedAndUnsigned);
+    case Type::I64:
+      return parse_int64(s, end, &out->u64, ParseIntType::SignedAndUnsigned);
+    case Type::F32:
+      return parse_float(literal_type, s, end, &out->f32_bits);
+    case Type::F64:
+      return parse_double(literal_type, s, end, &out->f64_bits);
+    default:
+      assert(0);
+      break;
+  }
+  return Result::Error;
+}
+
+size_t copy_string_contents(StringSlice* text, char* dest) {
+  const char* src = text->start + 1;
+  const char* end = text->start + text->length - 1;
+
+  char* dest_start = dest;
+
+  while (src < end) {
+    if (*src == '\\') {
+      src++;
+      switch (*src) {
+        case 'n':
+          *dest++ = '\n';
+          break;
+        case 'r':
+          *dest++ = '\r';
+          break;
+        case 't':
+          *dest++ = '\t';
+          break;
+        case '\\':
+          *dest++ = '\\';
+          break;
+        case '\'':
+          *dest++ = '\'';
+          break;
+        case '\"':
+          *dest++ = '\"';
+          break;
+        default: {
+          // The string should be validated already, so we know this is a hex
+          // sequence.
+          uint32_t hi;
+          uint32_t lo;
+          if (WABT_SUCCEEDED(parse_hexdigit(src[0], &hi)) &&
+              WABT_SUCCEEDED(parse_hexdigit(src[1], &lo))) {
+            *dest++ = (hi << 4) | lo;
+          } else {
+            assert(0);
+          }
+          src++;
+          break;
+        }
+      }
+      src++;
+    } else {
+      *dest++ = *src++;
+    }
+  }
+  /* return the data length */
+  return dest - dest_start;
+}
+
+void dup_text_list(TextList* text_list, char** out_data, size_t* out_size) {
+  /* walk the linked list to see how much total space is needed */
+  size_t total_size = 0;
+  for (TextListNode* node = text_list->first; node; node = node->next) {
+    /* Always allocate enough space for the entire string including the escape
+     * characters. It will only get shorter, and this way we only have to
+     * iterate through the string once. */
+    const char* src = node->text.start + 1;
+    const char* end = node->text.start + node->text.length - 1;
+    size_t size = (end > src) ? (end - src) : 0;
+    total_size += size;
+  }
+  char* result = new char [total_size];
+  char* dest = result;
+  for (TextListNode* node = text_list->first; node; node = node->next) {
+    size_t actual_size = copy_string_contents(&node->text, dest);
+    dest += actual_size;
+  }
+  *out_data = result;
+  *out_size = dest - result;
+}
+
+void reverse_bindings(TypeVector* types, BindingHash* bindings) {
+  for (auto& pair : *bindings) {
+    pair.second.index = types->size() - pair.second.index - 1;
+  }
+}
+
+bool is_empty_signature(const FuncSignature* sig) {
+  return sig->result_types.empty() && sig->param_types.empty();
+}
+
+void append_implicit_func_declaration(Location* loc,
+                                      Module* module,
+                                      FuncDeclaration* decl) {
+  if (decl->has_func_type)
+    return;
+
+  int sig_index = module->GetFuncTypeIndex(*decl);
+  if (sig_index == -1) {
+    module->AppendImplicitFuncType(*loc, decl->sig);
+  } else {
+    decl->sig = module->func_types[sig_index]->sig;
+  }
+}
+
+void check_import_ordering(Location* loc, WastLexer* lexer, WastParser* parser,
+                           Module* module, ModuleField* first) {
+  for (ModuleField* field = first; field; field = field->next) {
+    if (field->type == ModuleFieldType::Import) {
+      if (module->funcs.size() != module->num_func_imports ||
+          module->tables.size() != module->num_table_imports ||
+          module->memories.size() != module->num_memory_imports ||
+          module->globals.size() != module->num_global_imports ||
+          module->excepts.size() != module->num_except_imports) {
+        wast_parser_error(
+            loc, lexer, parser,
+            "imports must occur before all non-import definitions");
+      }
+    }
+  }
+}
+
+void append_module_fields(Module* module, ModuleField* first) {
+  ModuleField* main_field = first;
+  Index main_index = kInvalidIndex;
+
+  for (ModuleField* field = first; field; field = field->next) {
+    StringSlice* name = nullptr;
+    BindingHash* bindings = nullptr;
+    Index index = kInvalidIndex;
+
+    switch (field->type) {
+      case ModuleFieldType::Func:
+        append_implicit_func_declaration(&field->loc, module,
+                                         &field->func->decl);
+        name = &field->func->name;
+        bindings = &module->func_bindings;
+        index = module->funcs.size();
+        module->funcs.push_back(field->func);
+        break;
+
+      case ModuleFieldType::Global:
+        name = &field->global->name;
+        bindings = &module->global_bindings;
+        index = module->globals.size();
+        module->globals.push_back(field->global);
+        break;
+
+      case ModuleFieldType::Import:
+        switch (field->import->kind) {
+          case ExternalKind::Func:
+            append_implicit_func_declaration(&field->loc, module,
+                                             &field->import->func->decl);
+            name = &field->import->func->name;
+            bindings = &module->func_bindings;
+            index = module->funcs.size();
+            module->funcs.push_back(field->import->func);
+            ++module->num_func_imports;
+            break;
+          case ExternalKind::Table:
+            name = &field->import->table->name;
+            bindings = &module->table_bindings;
+            index = module->tables.size();
+            module->tables.push_back(field->import->table);
+            ++module->num_table_imports;
+            break;
+          case ExternalKind::Memory:
+            name = &field->import->memory->name;
+            bindings = &module->memory_bindings;
+            index = module->memories.size();
+            module->memories.push_back(field->import->memory);
+            ++module->num_memory_imports;
+            break;
+          case ExternalKind::Global:
+            name = &field->import->global->name;
+            bindings = &module->global_bindings;
+            index = module->globals.size();
+            module->globals.push_back(field->import->global);
+            ++module->num_global_imports;
+            break;
+          case ExternalKind::Except:
+            name = &field->import->except->name;
+            bindings = &module->except_bindings;
+            index = module->excepts.size();
+            module->excepts.push_back(field->except);
+            ++module->num_except_imports;
+            break;
+        }
+        module->imports.push_back(field->import);
+        break;
+
+      case ModuleFieldType::Export:
+        if (field != main_field) {
+          // If this is not the main field, it must be an inline export.
+          field->export_->var.type = VarType::Index;
+          field->export_->var.index = main_index;
+        }
+        name = &field->export_->name;
+        bindings = &module->export_bindings;
+        index = module->exports.size();
+        module->exports.push_back(field->export_);
+        break;
+
+      case ModuleFieldType::FuncType:
+        name = &field->func_type->name;
+        bindings = &module->func_type_bindings;
+        index = module->func_types.size();
+        module->func_types.push_back(field->func_type);
+        break;
+
+      case ModuleFieldType::Table:
+        name = &field->table->name;
+        bindings = &module->table_bindings;
+        index = module->tables.size();
+        module->tables.push_back(field->table);
+        break;
+
+      case ModuleFieldType::ElemSegment:
+        if (field != main_field) {
+          // If this is not the main field, it must be an inline elem segment.
+          field->elem_segment->table_var.type = VarType::Index;
+          field->elem_segment->table_var.index = main_index;
+        }
+        module->elem_segments.push_back(field->elem_segment);
+        break;
+
+      case ModuleFieldType::Memory:
+        name = &field->memory->name;
+        bindings = &module->memory_bindings;
+        index = module->memories.size();
+        module->memories.push_back(field->memory);
+        break;
+
+      case ModuleFieldType::DataSegment:
+        if (field != main_field) {
+          // If this is not the main field, it must be an inline data segment.
+          field->data_segment->memory_var.type = VarType::Index;
+          field->data_segment->memory_var.index = main_index;
+        }
+        module->data_segments.push_back(field->data_segment);
+        break;
+
+      case ModuleFieldType::Except:
+        name = &field->except->name;        
+        bindings = &module->except_bindings;
+        index = module->excepts.size();
+        module->excepts.push_back(field->except);
+        break;
+
+      case ModuleFieldType::Start:
+        module->start = &field->start;
+        break;
+    }
+
+    if (field == main_field)
+      main_index = index;
+
+    if (module->last_field)
+      module->last_field->next = field;
+    else
+      module->first_field = field;
+    module->last_field = field;
+
+    if (name && bindings) {
+      // Exported names are allowed to be empty; other names aren't.
+      if (bindings == &module->export_bindings ||
+          !string_slice_is_empty(name)) {
+        bindings->emplace(string_slice_to_string(*name),
+                          Binding(field->loc, index));
+      }
+    }
+  }
+}
+
+Result parse_wast(WastLexer* lexer, Script** out_script,
+                  SourceErrorHandler* error_handler,
+                  WastParseOptions* options) {
+  WastParser parser;
+  WABT_ZERO_MEMORY(parser);
+  static WastParseOptions default_options;
+  if (options == nullptr)
+    options = &default_options;
+  parser.options = options;
+  parser.error_handler = error_handler;
+  wabt_wast_parser_debug = int(options->debug_parsing);
+  int result = wabt_wast_parser_parse(lexer, &parser);
+  delete [] parser.yyssa;
+  delete [] parser.yyvsa;
+  delete [] parser.yylsa;
+  if (out_script) {
+    *out_script = parser.script;
+  } else {
+    delete parser.script;
+  }
+  return result == 0 && parser.errors == 0 ? Result::Ok : Result::Error;
+}
+
+BinaryErrorHandlerModule::BinaryErrorHandlerModule(
+    Location* loc, WastLexer* lexer, WastParser* parser)
+  : loc_(loc), lexer_(lexer), parser_(parser) {}
+
+bool BinaryErrorHandlerModule::OnError(Offset offset,
+                                       const std::string& error) {
+  if (offset == kInvalidOffset) {
+    wast_parser_error(loc_, lexer_, parser_, "error in binary module: %s",
+                      error.c_str());
+  } else {
+    wast_parser_error(loc_, lexer_, parser_,
+                      "error in binary module: @0x%08" PRIzx ": %s", offset,
+                      error.c_str());
+  }
+  return true;
+}
+
+}  // namespace wabt
diff --git a/lib/wabt/src/prebuilt/wast-parser-gen.hh b/lib/wabt/src/prebuilt/wast-parser-gen.hh
new file mode 100644
index 0000000..b20d1b9
--- /dev/null
+++ b/lib/wabt/src/prebuilt/wast-parser-gen.hh
@@ -0,0 +1,162 @@
+/* A Bison parser, made by GNU Bison 3.0.2.  */
+
+/* Bison interface for Yacc-like parsers in C
+
+   Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* As a special exception, you may create a larger work that contains
+   part or all of the Bison parser skeleton and distribute that work
+   under terms of your choice, so long as that work isn't itself a
+   parser generator using the skeleton or a modified version thereof
+   as a parser skeleton.  Alternatively, if you modify or redistribute
+   the parser skeleton itself, you may (at your option) remove this
+   special exception, which will cause the skeleton and the resulting
+   Bison output files to be licensed under the GNU General Public
+   License without this special exception.
+
+   This special exception was added by the Free Software Foundation in
+   version 2.2 of Bison.  */
+
+#ifndef YY_WABT_WAST_PARSER_SRC_PREBUILT_WAST_PARSER_GEN_HH_INCLUDED
+# define YY_WABT_WAST_PARSER_SRC_PREBUILT_WAST_PARSER_GEN_HH_INCLUDED
+/* Debug traces.  */
+#ifndef WABT_WAST_PARSER_DEBUG
+# if defined YYDEBUG
+#if YYDEBUG
+#   define WABT_WAST_PARSER_DEBUG 1
+#  else
+#   define WABT_WAST_PARSER_DEBUG 0
+#  endif
+# else /* ! defined YYDEBUG */
+#  define WABT_WAST_PARSER_DEBUG 0
+# endif /* ! defined YYDEBUG */
+#endif  /* ! defined WABT_WAST_PARSER_DEBUG */
+#if WABT_WAST_PARSER_DEBUG
+extern int wabt_wast_parser_debug;
+#endif
+
+/* Token type.  */
+#ifndef WABT_WAST_PARSER_TOKENTYPE
+# define WABT_WAST_PARSER_TOKENTYPE
+  enum wabt_wast_parser_tokentype
+  {
+    WABT_TOKEN_TYPE_EOF = 0,
+    WABT_TOKEN_TYPE_LPAR = 258,
+    WABT_TOKEN_TYPE_RPAR = 259,
+    WABT_TOKEN_TYPE_NAT = 260,
+    WABT_TOKEN_TYPE_INT = 261,
+    WABT_TOKEN_TYPE_FLOAT = 262,
+    WABT_TOKEN_TYPE_TEXT = 263,
+    WABT_TOKEN_TYPE_VAR = 264,
+    WABT_TOKEN_TYPE_VALUE_TYPE = 265,
+    WABT_TOKEN_TYPE_ANYFUNC = 266,
+    WABT_TOKEN_TYPE_MUT = 267,
+    WABT_TOKEN_TYPE_NOP = 268,
+    WABT_TOKEN_TYPE_DROP = 269,
+    WABT_TOKEN_TYPE_BLOCK = 270,
+    WABT_TOKEN_TYPE_END = 271,
+    WABT_TOKEN_TYPE_IF = 272,
+    WABT_TOKEN_TYPE_THEN = 273,
+    WABT_TOKEN_TYPE_ELSE = 274,
+    WABT_TOKEN_TYPE_LOOP = 275,
+    WABT_TOKEN_TYPE_BR = 276,
+    WABT_TOKEN_TYPE_BR_IF = 277,
+    WABT_TOKEN_TYPE_BR_TABLE = 278,
+    WABT_TOKEN_TYPE_TRY = 279,
+    WABT_TOKEN_TYPE_CATCH = 280,
+    WABT_TOKEN_TYPE_CATCH_ALL = 281,
+    WABT_TOKEN_TYPE_THROW = 282,
+    WABT_TOKEN_TYPE_RETHROW = 283,
+    WABT_TOKEN_TYPE_CALL = 284,
+    WABT_TOKEN_TYPE_CALL_INDIRECT = 285,
+    WABT_TOKEN_TYPE_RETURN = 286,
+    WABT_TOKEN_TYPE_GET_LOCAL = 287,
+    WABT_TOKEN_TYPE_SET_LOCAL = 288,
+    WABT_TOKEN_TYPE_TEE_LOCAL = 289,
+    WABT_TOKEN_TYPE_GET_GLOBAL = 290,
+    WABT_TOKEN_TYPE_SET_GLOBAL = 291,
+    WABT_TOKEN_TYPE_LOAD = 292,
+    WABT_TOKEN_TYPE_STORE = 293,
+    WABT_TOKEN_TYPE_OFFSET_EQ_NAT = 294,
+    WABT_TOKEN_TYPE_ALIGN_EQ_NAT = 295,
+    WABT_TOKEN_TYPE_CONST = 296,
+    WABT_TOKEN_TYPE_UNARY = 297,
+    WABT_TOKEN_TYPE_BINARY = 298,
+    WABT_TOKEN_TYPE_COMPARE = 299,
+    WABT_TOKEN_TYPE_CONVERT = 300,
+    WABT_TOKEN_TYPE_SELECT = 301,
+    WABT_TOKEN_TYPE_UNREACHABLE = 302,
+    WABT_TOKEN_TYPE_CURRENT_MEMORY = 303,
+    WABT_TOKEN_TYPE_GROW_MEMORY = 304,
+    WABT_TOKEN_TYPE_FUNC = 305,
+    WABT_TOKEN_TYPE_START = 306,
+    WABT_TOKEN_TYPE_TYPE = 307,
+    WABT_TOKEN_TYPE_PARAM = 308,
+    WABT_TOKEN_TYPE_RESULT = 309,
+    WABT_TOKEN_TYPE_LOCAL = 310,
+    WABT_TOKEN_TYPE_GLOBAL = 311,
+    WABT_TOKEN_TYPE_TABLE = 312,
+    WABT_TOKEN_TYPE_ELEM = 313,
+    WABT_TOKEN_TYPE_MEMORY = 314,
+    WABT_TOKEN_TYPE_DATA = 315,
+    WABT_TOKEN_TYPE_OFFSET = 316,
+    WABT_TOKEN_TYPE_IMPORT = 317,
+    WABT_TOKEN_TYPE_EXPORT = 318,
+    WABT_TOKEN_TYPE_EXCEPT = 319,
+    WABT_TOKEN_TYPE_MODULE = 320,
+    WABT_TOKEN_TYPE_BIN = 321,
+    WABT_TOKEN_TYPE_QUOTE = 322,
+    WABT_TOKEN_TYPE_REGISTER = 323,
+    WABT_TOKEN_TYPE_INVOKE = 324,
+    WABT_TOKEN_TYPE_GET = 325,
+    WABT_TOKEN_TYPE_ASSERT_MALFORMED = 326,
+    WABT_TOKEN_TYPE_ASSERT_INVALID = 327,
+    WABT_TOKEN_TYPE_ASSERT_UNLINKABLE = 328,
+    WABT_TOKEN_TYPE_ASSERT_RETURN = 329,
+    WABT_TOKEN_TYPE_ASSERT_RETURN_CANONICAL_NAN = 330,
+    WABT_TOKEN_TYPE_ASSERT_RETURN_ARITHMETIC_NAN = 331,
+    WABT_TOKEN_TYPE_ASSERT_TRAP = 332,
+    WABT_TOKEN_TYPE_ASSERT_EXHAUSTION = 333,
+    WABT_TOKEN_TYPE_LOW = 334
+  };
+#endif
+
+/* Value type.  */
+#if ! defined WABT_WAST_PARSER_STYPE && ! defined WABT_WAST_PARSER_STYPE_IS_DECLARED
+typedef ::wabt::Token WABT_WAST_PARSER_STYPE;
+# define WABT_WAST_PARSER_STYPE_IS_TRIVIAL 1
+# define WABT_WAST_PARSER_STYPE_IS_DECLARED 1
+#endif
+
+/* Location type.  */
+#if ! defined WABT_WAST_PARSER_LTYPE && ! defined WABT_WAST_PARSER_LTYPE_IS_DECLARED
+typedef struct WABT_WAST_PARSER_LTYPE WABT_WAST_PARSER_LTYPE;
+struct WABT_WAST_PARSER_LTYPE
+{
+  int first_line;
+  int first_column;
+  int last_line;
+  int last_column;
+};
+# define WABT_WAST_PARSER_LTYPE_IS_DECLARED 1
+# define WABT_WAST_PARSER_LTYPE_IS_TRIVIAL 1
+#endif
+
+
+
+int wabt_wast_parser_parse (::wabt::WastLexer* lexer, ::wabt::WastParser* parser);
+
+#endif /* !YY_WABT_WAST_PARSER_SRC_PREBUILT_WAST_PARSER_GEN_HH_INCLUDED  */
diff --git a/lib/wabt/src/prebuilt/wast-parser-gen.output b/lib/wabt/src/prebuilt/wast-parser-gen.output
new file mode 100644
index 0000000..1c4f03e
--- /dev/null
+++ b/lib/wabt/src/prebuilt/wast-parser-gen.output
@@ -0,0 +1,6436 @@
+Grammar
+
+    0 $accept: script_start "EOF"
+
+    1 text_list: TEXT
+    2          | text_list TEXT
+
+    3 text_list_opt: %empty
+    4              | text_list
+
+    5 quoted_text: TEXT
+
+    6 value_type_list: %empty
+    7                | value_type_list VALUE_TYPE
+
+    8 elem_type: ANYFUNC
+
+    9 global_type: VALUE_TYPE
+   10            | "(" MUT VALUE_TYPE ")"
+
+   11 func_type: "(" FUNC func_sig ")"
+
+   12 func_sig: func_sig_result
+   13         | "(" PARAM value_type_list ")" func_sig
+   14         | "(" PARAM bind_var VALUE_TYPE ")" func_sig
+
+   15 func_sig_result: %empty
+   16                | "(" RESULT value_type_list ")" func_sig_result
+
+   17 table_sig: limits elem_type
+
+   18 memory_sig: limits
+
+   19 limits: nat
+   20       | nat nat
+
+   21 type_use: "(" TYPE var ")"
+
+   22 nat: NAT
+
+   23 literal: NAT
+   24        | INT
+   25        | FLOAT
+
+   26 var: nat
+   27    | VAR
+
+   28 var_list: %empty
+   29         | var_list var
+
+   30 bind_var_opt: %empty
+   31             | bind_var
+
+   32 bind_var: VAR
+
+   33 labeling_opt: %empty
+   34             | bind_var
+
+   35 offset_opt: %empty
+   36           | OFFSET_EQ_NAT
+
+   37 align_opt: %empty
+   38          | ALIGN_EQ_NAT
+
+   39 instr: plain_instr
+   40      | block_instr
+   41      | expr
+
+   42 plain_instr: UNREACHABLE
+   43            | NOP
+   44            | DROP
+   45            | SELECT
+   46            | BR var
+   47            | BR_IF var
+   48            | BR_TABLE var_list var
+   49            | RETURN
+   50            | CALL var
+   51            | CALL_INDIRECT var
+   52            | GET_LOCAL var
+   53            | SET_LOCAL var
+   54            | TEE_LOCAL var
+   55            | GET_GLOBAL var
+   56            | SET_GLOBAL var
+   57            | LOAD offset_opt align_opt
+   58            | STORE offset_opt align_opt
+   59            | CONST literal
+   60            | UNARY
+   61            | BINARY
+   62            | COMPARE
+   63            | CONVERT
+   64            | CURRENT_MEMORY
+   65            | GROW_MEMORY
+   66            | throw_check var
+   67            | rethrow_check var
+
+   68 block_instr: BLOCK labeling_opt block END labeling_opt
+   69            | LOOP labeling_opt block END labeling_opt
+   70            | IF labeling_opt block END labeling_opt
+   71            | IF labeling_opt block ELSE labeling_opt instr_list END labeling_opt
+   72            | try_check labeling_opt block catch_instr_list END labeling_opt
+
+   73 block_sig: "(" RESULT value_type_list ")"
+
+   74 block: block_sig block
+   75      | instr_list
+
+   76 catch_instr: CATCH var instr_list
+   77            | CATCH_ALL instr_list
+
+   78 catch_instr_list: catch_instr
+   79                 | catch_instr catch_instr_list
+
+   80 expr: "(" expr1 ")"
+
+   81 expr1: plain_instr expr_list
+   82      | BLOCK labeling_opt block
+   83      | LOOP labeling_opt block
+   84      | IF labeling_opt if_block
+   85      | try_check labeling_opt try_
+
+   86 try_: block_sig try_
+   87     | try_instr_list
+
+   88 try_instr_list: catch_list
+   89               | instr try_instr_list
+
+   90 catch_list: "(" catch_instr ")"
+   91           | "(" catch_instr ")" catch_list
+
+   92 if_block: block_sig if_block
+   93         | if_
+
+   94 if_: "(" THEN instr_list ")" "(" ELSE instr_list ")"
+   95    | "(" THEN instr_list ")"
+   96    | expr "(" THEN instr_list ")" "(" ELSE instr_list ")"
+   97    | expr "(" THEN instr_list ")"
+   98    | expr expr expr
+   99    | expr expr
+
+  100 rethrow_check: RETHROW
+
+  101 throw_check: THROW
+
+  102 try_check: TRY
+
+  103 instr_list: %empty
+  104           | instr instr_list
+
+  105 expr_list: %empty
+  106          | expr expr_list
+
+  107 const_expr: instr_list
+
+  108 exception: "(" EXCEPT bind_var_opt value_type_list ")"
+
+  109 exception_field: exception
+
+  110 func: "(" FUNC bind_var_opt func_fields ")"
+
+  111 func_fields: type_use func_fields_body
+  112            | func_fields_body
+  113            | inline_import type_use func_fields_import
+  114            | inline_import func_fields_import
+  115            | inline_export func_fields
+
+  116 func_fields_import: func_fields_import1
+
+  117 func_fields_import1: func_fields_import_result
+  118                    | "(" PARAM value_type_list ")" func_fields_import1
+  119                    | "(" PARAM bind_var VALUE_TYPE ")" func_fields_import1
+
+  120 func_fields_import_result: %empty
+  121                          | "(" RESULT value_type_list ")" func_fields_import_result
+
+  122 func_fields_body: func_fields_body1
+
+  123 func_fields_body1: func_result_body
+  124                  | "(" PARAM value_type_list ")" func_fields_body1
+  125                  | "(" PARAM bind_var VALUE_TYPE ")" func_fields_body1
+
+  126 func_result_body: func_body
+  127                 | "(" RESULT value_type_list ")" func_result_body
+
+  128 func_body: func_body1
+
+  129 func_body1: instr_list
+  130           | "(" LOCAL value_type_list ")" func_body1
+  131           | "(" LOCAL bind_var VALUE_TYPE ")" func_body1
+
+  132 offset: "(" OFFSET const_expr ")"
+  133       | expr
+
+  134 elem: "(" ELEM var offset var_list ")"
+  135     | "(" ELEM offset var_list ")"
+
+  136 table: "(" TABLE bind_var_opt table_fields ")"
+
+  137 table_fields: table_sig
+  138             | inline_import table_sig
+  139             | inline_export table_fields
+  140             | elem_type "(" ELEM var_list ")"
+
+  141 data: "(" DATA var offset text_list_opt ")"
+  142     | "(" DATA offset text_list_opt ")"
+
+  143 memory: "(" MEMORY bind_var_opt memory_fields ")"
+
+  144 memory_fields: memory_sig
+  145              | inline_import memory_sig
+  146              | inline_export memory_fields
+  147              | "(" DATA text_list_opt ")"
+
+  148 global: "(" GLOBAL bind_var_opt global_fields ")"
+
+  149 global_fields: global_type const_expr
+  150              | inline_import global_type
+  151              | inline_export global_fields
+
+  152 import_desc: "(" FUNC bind_var_opt type_use ")"
+  153            | "(" FUNC bind_var_opt func_sig ")"
+  154            | "(" TABLE bind_var_opt table_sig ")"
+  155            | "(" MEMORY bind_var_opt memory_sig ")"
+  156            | "(" GLOBAL bind_var_opt global_type ")"
+  157            | exception
+
+  158 import: "(" IMPORT quoted_text quoted_text import_desc ")"
+
+  159 inline_import: "(" IMPORT quoted_text quoted_text ")"
+
+  160 export_desc: "(" FUNC var ")"
+  161            | "(" TABLE var ")"
+  162            | "(" MEMORY var ")"
+  163            | "(" GLOBAL var ")"
+  164            | "(" EXCEPT var ")"
+
+  165 export: "(" EXPORT quoted_text export_desc ")"
+
+  166 inline_export: "(" EXPORT quoted_text ")"
+
+  167 type_def: "(" TYPE func_type ")"
+  168         | "(" TYPE bind_var func_type ")"
+
+  169 start: "(" START var ")"
+
+  170 module_field: type_def
+  171             | global
+  172             | table
+  173             | memory
+  174             | func
+  175             | elem
+  176             | data
+  177             | start
+  178             | import
+  179             | export
+  180             | exception_field
+
+  181 module_fields_opt: %empty
+  182                  | module_fields
+
+  183 module_fields: module_field
+  184              | module_fields module_field
+
+  185 module: script_module
+
+  186 inline_module: module_fields
+
+  187 script_var_opt: %empty
+  188               | VAR
+
+  189 script_module: "(" MODULE bind_var_opt module_fields_opt ")"
+  190              | "(" MODULE bind_var_opt BIN text_list ")"
+  191              | "(" MODULE bind_var_opt QUOTE text_list ")"
+
+  192 action: "(" INVOKE script_var_opt quoted_text const_list ")"
+  193       | "(" GET script_var_opt quoted_text ")"
+
+  194 assertion: "(" ASSERT_MALFORMED script_module quoted_text ")"
+  195          | "(" ASSERT_INVALID script_module quoted_text ")"
+  196          | "(" ASSERT_UNLINKABLE script_module quoted_text ")"
+  197          | "(" ASSERT_TRAP script_module quoted_text ")"
+  198          | "(" ASSERT_RETURN action const_list ")"
+  199          | "(" ASSERT_RETURN_CANONICAL_NAN action ")"
+  200          | "(" ASSERT_RETURN_ARITHMETIC_NAN action ")"
+  201          | "(" ASSERT_TRAP action quoted_text ")"
+  202          | "(" ASSERT_EXHAUSTION action quoted_text ")"
+
+  203 cmd: action
+  204    | assertion
+  205    | module
+  206    | "(" REGISTER quoted_text script_var_opt ")"
+
+  207 cmd_list: cmd
+  208         | cmd_list cmd
+
+  209 const: "(" CONST literal ")"
+
+  210 const_list: %empty
+  211           | const_list const
+
+  212 script: %empty
+  213       | cmd_list
+  214       | inline_module
+
+  215 script_start: script
+
+
+Terminals, with rules where they appear
+
+"EOF" (0) 0
+error (256)
+"(" (258) 10 11 13 14 16 21 73 80 90 91 94 95 96 97 108 110 118 119
+    121 124 125 127 130 131 132 134 135 136 140 141 142 143 147 148
+    152 153 154 155 156 158 159 160 161 162 163 164 165 166 167 168
+    169 189 190 191 192 193 194 195 196 197 198 199 200 201 202 206
+    209
+")" (259) 10 11 13 14 16 21 73 80 90 91 94 95 96 97 108 110 118 119
+    121 124 125 127 130 131 132 134 135 136 140 141 142 143 147 148
+    152 153 154 155 156 158 159 160 161 162 163 164 165 166 167 168
+    169 189 190 191 192 193 194 195 196 197 198 199 200 201 202 206
+    209
+NAT (260) 22 23
+INT (261) 24
+FLOAT (262) 25
+TEXT (263) 1 2 5
+VAR (264) 27 32 188
+VALUE_TYPE (265) 7 9 10 14 119 125 131
+ANYFUNC (266) 8
+MUT (267) 10
+NOP (268) 43
+DROP (269) 44
+BLOCK (270) 68 82
+END (271) 68 69 70 71 72
+IF (272) 70 71 84
+THEN (273) 94 95 96 97
+ELSE (274) 71 94 96
+LOOP (275) 69 83
+BR (276) 46
+BR_IF (277) 47
+BR_TABLE (278) 48
+TRY (279) 102
+CATCH (280) 76
+CATCH_ALL (281) 77
+THROW (282) 101
+RETHROW (283) 100
+CALL (284) 50
+CALL_INDIRECT (285) 51
+RETURN (286) 49
+GET_LOCAL (287) 52
+SET_LOCAL (288) 53
+TEE_LOCAL (289) 54
+GET_GLOBAL (290) 55
+SET_GLOBAL (291) 56
+LOAD (292) 57
+STORE (293) 58
+OFFSET_EQ_NAT (294) 36
+ALIGN_EQ_NAT (295) 38
+CONST (296) 59 209
+UNARY (297) 60
+BINARY (298) 61
+COMPARE (299) 62
+CONVERT (300) 63
+SELECT (301) 45
+UNREACHABLE (302) 42
+CURRENT_MEMORY (303) 64
+GROW_MEMORY (304) 65
+FUNC (305) 11 110 152 153 160
+START (306) 169
+TYPE (307) 21 167 168
+PARAM (308) 13 14 118 119 124 125
+RESULT (309) 16 73 121 127
+LOCAL (310) 130 131
+GLOBAL (311) 148 156 163
+TABLE (312) 136 154 161
+ELEM (313) 134 135 140
+MEMORY (314) 143 155 162
+DATA (315) 141 142 147
+OFFSET (316) 132
+IMPORT (317) 158 159
+EXPORT (318) 165 166
+EXCEPT (319) 108 164
+MODULE (320) 189 190 191
+BIN (321) 190
+QUOTE (322) 191
+REGISTER (323) 206
+INVOKE (324) 192
+GET (325) 193
+ASSERT_MALFORMED (326) 194
+ASSERT_INVALID (327) 195
+ASSERT_UNLINKABLE (328) 196
+ASSERT_RETURN (329) 198
+ASSERT_RETURN_CANONICAL_NAN (330) 199
+ASSERT_RETURN_ARITHMETIC_NAN (331) 200
+ASSERT_TRAP (332) 197 201
+ASSERT_EXHAUSTION (333) 202
+LOW (334)
+
+
+Nonterminals, with rules where they appear
+
+$accept (80)
+    on left: 0
+text_list (81)
+    on left: 1 2, on right: 2 4 190 191
+text_list_opt (82)
+    on left: 3 4, on right: 141 142 147
+quoted_text (83)
+    on left: 5, on right: 158 159 165 166 192 193 194 195 196 197 201
+    202 206
+value_type_list (84)
+    on left: 6 7, on right: 7 13 16 73 108 118 121 124 127 130
+elem_type (85)
+    on left: 8, on right: 17 140
+global_type (86)
+    on left: 9 10, on right: 149 150 156
+func_type (87)
+    on left: 11, on right: 167 168
+func_sig (88)
+    on left: 12 13 14, on right: 11 13 14 153
+func_sig_result (89)
+    on left: 15 16, on right: 12 16
+table_sig (90)
+    on left: 17, on right: 137 138 154
+memory_sig (91)
+    on left: 18, on right: 144 145 155
+limits (92)
+    on left: 19 20, on right: 17 18
+type_use (93)
+    on left: 21, on right: 111 113 152
+nat (94)
+    on left: 22, on right: 19 20 26
+literal (95)
+    on left: 23 24 25, on right: 59 209
+var (96)
+    on left: 26 27, on right: 21 29 46 47 48 50 51 52 53 54 55 56 66
+    67 76 134 141 160 161 162 163 164 169
+var_list (97)
+    on left: 28 29, on right: 29 48 134 135 140
+bind_var_opt (98)
+    on left: 30 31, on right: 108 110 136 143 148 152 153 154 155 156
+    189 190 191
+bind_var (99)
+    on left: 32, on right: 14 31 34 119 125 131 168
+labeling_opt (100)
+    on left: 33 34, on right: 68 69 70 71 72 82 83 84 85
+offset_opt (101)
+    on left: 35 36, on right: 57 58
+align_opt (102)
+    on left: 37 38, on right: 57 58
+instr (103)
+    on left: 39 40 41, on right: 89 104
+plain_instr (104)
+    on left: 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
+    60 61 62 63 64 65 66 67, on right: 39 81
+block_instr (105)
+    on left: 68 69 70 71 72, on right: 40
+block_sig (106)
+    on left: 73, on right: 74 86 92
+block (107)
+    on left: 74 75, on right: 68 69 70 71 72 74 82 83
+catch_instr (108)
+    on left: 76 77, on right: 78 79 90 91
+catch_instr_list (109)
+    on left: 78 79, on right: 72 79
+expr (110)
+    on left: 80, on right: 41 96 97 98 99 106 133
+expr1 (111)
+    on left: 81 82 83 84 85, on right: 80
+try_ (112)
+    on left: 86 87, on right: 85 86
+try_instr_list (113)
+    on left: 88 89, on right: 87 89
+catch_list (114)
+    on left: 90 91, on right: 88 91
+if_block (115)
+    on left: 92 93, on right: 84 92
+if_ (116)
+    on left: 94 95 96 97 98 99, on right: 93
+rethrow_check (117)
+    on left: 100, on right: 67
+throw_check (118)
+    on left: 101, on right: 66
+try_check (119)
+    on left: 102, on right: 72 85
+instr_list (120)
+    on left: 103 104, on right: 71 75 76 77 94 95 96 97 104 107 129
+expr_list (121)
+    on left: 105 106, on right: 81 106
+const_expr (122)
+    on left: 107, on right: 132 149
+exception (123)
+    on left: 108, on right: 109 157
+exception_field (124)
+    on left: 109, on right: 180
+func (125)
+    on left: 110, on right: 174
+func_fields (126)
+    on left: 111 112 113 114 115, on right: 110 115
+func_fields_import (127)
+    on left: 116, on right: 113 114
+func_fields_import1 (128)
+    on left: 117 118 119, on right: 116 118 119
+func_fields_import_result (129)
+    on left: 120 121, on right: 117 121
+func_fields_body (130)
+    on left: 122, on right: 111 112
+func_fields_body1 (131)
+    on left: 123 124 125, on right: 122 124 125
+func_result_body (132)
+    on left: 126 127, on right: 123 127
+func_body (133)
+    on left: 128, on right: 126
+func_body1 (134)
+    on left: 129 130 131, on right: 128 130 131
+offset (135)
+    on left: 132 133, on right: 134 135 141 142
+elem (136)
+    on left: 134 135, on right: 175
+table (137)
+    on left: 136, on right: 172
+table_fields (138)
+    on left: 137 138 139 140, on right: 136 139
+data (139)
+    on left: 141 142, on right: 176
+memory (140)
+    on left: 143, on right: 173
+memory_fields (141)
+    on left: 144 145 146 147, on right: 143 146
+global (142)
+    on left: 148, on right: 171
+global_fields (143)
+    on left: 149 150 151, on right: 148 151
+import_desc (144)
+    on left: 152 153 154 155 156 157, on right: 158
+import (145)
+    on left: 158, on right: 178
+inline_import (146)
+    on left: 159, on right: 113 114 138 145 150
+export_desc (147)
+    on left: 160 161 162 163 164, on right: 165
+export (148)
+    on left: 165, on right: 179
+inline_export (149)
+    on left: 166, on right: 115 139 146 151
+type_def (150)
+    on left: 167 168, on right: 170
+start (151)
+    on left: 169, on right: 177
+module_field (152)
+    on left: 170 171 172 173 174 175 176 177 178 179 180, on right:
+    183 184
+module_fields_opt (153)
+    on left: 181 182, on right: 189
+module_fields (154)
+    on left: 183 184, on right: 182 184 186
+module (155)
+    on left: 185, on right: 205
+inline_module (156)
+    on left: 186, on right: 214
+script_var_opt (157)
+    on left: 187 188, on right: 192 193 206
+script_module (158)
+    on left: 189 190 191, on right: 185 194 195 196 197
+action (159)
+    on left: 192 193, on right: 198 199 200 201 202 203
+assertion (160)
+    on left: 194 195 196 197 198 199 200 201 202, on right: 204
+cmd (161)
+    on left: 203 204 205 206, on right: 207 208
+cmd_list (162)
+    on left: 207 208, on right: 208 213
+const (163)
+    on left: 209, on right: 211
+const_list (164)
+    on left: 210 211, on right: 192 198 211
+script (165)
+    on left: 212 213 214, on right: 215
+script_start (166)
+    on left: 215, on right: 0
+
+
+State 0
+
+    0 $accept: . script_start "EOF"
+
+    "("  shift, and go to state 1
+
+    $default  reduce using rule 212 (script)
+
+    exception        go to state 2
+    exception_field  go to state 3
+    func             go to state 4
+    elem             go to state 5
+    table            go to state 6
+    data             go to state 7
+    memory           go to state 8
+    global           go to state 9
+    import           go to state 10
+    export           go to state 11
+    type_def         go to state 12
+    start            go to state 13
+    module_field     go to state 14
+    module_fields    go to state 15
+    module           go to state 16
+    inline_module    go to state 17
+    script_module    go to state 18
+    action           go to state 19
+    assertion        go to state 20
+    cmd              go to state 21
+    cmd_list         go to state 22
+    script           go to state 23
+    script_start     go to state 24
+
+
+State 1
+
+  108 exception: "(" . EXCEPT bind_var_opt value_type_list ")"
+  110 func: "(" . FUNC bind_var_opt func_fields ")"
+  134 elem: "(" . ELEM var offset var_list ")"
+  135     | "(" . ELEM offset var_list ")"
+  136 table: "(" . TABLE bind_var_opt table_fields ")"
+  141 data: "(" . DATA var offset text_list_opt ")"
+  142     | "(" . DATA offset text_list_opt ")"
+  143 memory: "(" . MEMORY bind_var_opt memory_fields ")"
+  148 global: "(" . GLOBAL bind_var_opt global_fields ")"
+  158 import: "(" . IMPORT quoted_text quoted_text import_desc ")"
+  165 export: "(" . EXPORT quoted_text export_desc ")"
+  167 type_def: "(" . TYPE func_type ")"
+  168         | "(" . TYPE bind_var func_type ")"
+  169 start: "(" . START var ")"
+  189 script_module: "(" . MODULE bind_var_opt module_fields_opt ")"
+  190              | "(" . MODULE bind_var_opt BIN text_list ")"
+  191              | "(" . MODULE bind_var_opt QUOTE text_list ")"
+  192 action: "(" . INVOKE script_var_opt quoted_text const_list ")"
+  193       | "(" . GET script_var_opt quoted_text ")"
+  194 assertion: "(" . ASSERT_MALFORMED script_module quoted_text ")"
+  195          | "(" . ASSERT_INVALID script_module quoted_text ")"
+  196          | "(" . ASSERT_UNLINKABLE script_module quoted_text ")"
+  197          | "(" . ASSERT_TRAP script_module quoted_text ")"
+  198          | "(" . ASSERT_RETURN action const_list ")"
+  199          | "(" . ASSERT_RETURN_CANONICAL_NAN action ")"
+  200          | "(" . ASSERT_RETURN_ARITHMETIC_NAN action ")"
+  201          | "(" . ASSERT_TRAP action quoted_text ")"
+  202          | "(" . ASSERT_EXHAUSTION action quoted_text ")"
+  206 cmd: "(" . REGISTER quoted_text script_var_opt ")"
+
+    FUNC                          shift, and go to state 25
+    START                         shift, and go to state 26
+    TYPE                          shift, and go to state 27
+    GLOBAL                        shift, and go to state 28
+    TABLE                         shift, and go to state 29
+    ELEM                          shift, and go to state 30
+    MEMORY                        shift, and go to state 31
+    DATA                          shift, and go to state 32
+    IMPORT                        shift, and go to state 33
+    EXPORT                        shift, and go to state 34
+    EXCEPT                        shift, and go to state 35
+    MODULE                        shift, and go to state 36
+    REGISTER                      shift, and go to state 37
+    INVOKE                        shift, and go to state 38
+    GET                           shift, and go to state 39
+    ASSERT_MALFORMED              shift, and go to state 40
+    ASSERT_INVALID                shift, and go to state 41
+    ASSERT_UNLINKABLE             shift, and go to state 42
+    ASSERT_RETURN                 shift, and go to state 43
+    ASSERT_RETURN_CANONICAL_NAN   shift, and go to state 44
+    ASSERT_RETURN_ARITHMETIC_NAN  shift, and go to state 45
+    ASSERT_TRAP                   shift, and go to state 46
+    ASSERT_EXHAUSTION             shift, and go to state 47
+
+
+State 2
+
+  109 exception_field: exception .
+
+    $default  reduce using rule 109 (exception_field)
+
+
+State 3
+
+  180 module_field: exception_field .
+
+    $default  reduce using rule 180 (module_field)
+
+
+State 4
+
+  174 module_field: func .
+
+    $default  reduce using rule 174 (module_field)
+
+
+State 5
+
+  175 module_field: elem .
+
+    $default  reduce using rule 175 (module_field)
+
+
+State 6
+
+  172 module_field: table .
+
+    $default  reduce using rule 172 (module_field)
+
+
+State 7
+
+  176 module_field: data .
+
+    $default  reduce using rule 176 (module_field)
+
+
+State 8
+
+  173 module_field: memory .
+
+    $default  reduce using rule 173 (module_field)
+
+
+State 9
+
+  171 module_field: global .
+
+    $default  reduce using rule 171 (module_field)
+
+
+State 10
+
+  178 module_field: import .
+
+    $default  reduce using rule 178 (module_field)
+
+
+State 11
+
+  179 module_field: export .
+
+    $default  reduce using rule 179 (module_field)
+
+
+State 12
+
+  170 module_field: type_def .
+
+    $default  reduce using rule 170 (module_field)
+
+
+State 13
+
+  177 module_field: start .
+
+    $default  reduce using rule 177 (module_field)
+
+
+State 14
+
+  183 module_fields: module_field .
+
+    $default  reduce using rule 183 (module_fields)
+
+
+State 15
+
+  184 module_fields: module_fields . module_field
+  186 inline_module: module_fields .
+
+    "("  shift, and go to state 48
+
+    $default  reduce using rule 186 (inline_module)
+
+    exception        go to state 2
+    exception_field  go to state 3
+    func             go to state 4
+    elem             go to state 5
+    table            go to state 6
+    data             go to state 7
+    memory           go to state 8
+    global           go to state 9
+    import           go to state 10
+    export           go to state 11
+    type_def         go to state 12
+    start            go to state 13
+    module_field     go to state 49
+
+
+State 16
+
+  205 cmd: module .
+
+    $default  reduce using rule 205 (cmd)
+
+
+State 17
+
+  214 script: inline_module .
+
+    $default  reduce using rule 214 (script)
+
+
+State 18
+
+  185 module: script_module .
+
+    $default  reduce using rule 185 (module)
+
+
+State 19
+
+  203 cmd: action .
+
+    $default  reduce using rule 203 (cmd)
+
+
+State 20
+
+  204 cmd: assertion .
+
+    $default  reduce using rule 204 (cmd)
+
+
+State 21
+
+  207 cmd_list: cmd .
+
+    $default  reduce using rule 207 (cmd_list)
+
+
+State 22
+
+  208 cmd_list: cmd_list . cmd
+  213 script: cmd_list .
+
+    "("  shift, and go to state 50
+
+    $default  reduce using rule 213 (script)
+
+    module         go to state 16
+    script_module  go to state 18
+    action         go to state 19
+    assertion      go to state 20
+    cmd            go to state 51
+
+
+State 23
+
+  215 script_start: script .
+
+    $default  reduce using rule 215 (script_start)
+
+
+State 24
+
+    0 $accept: script_start . "EOF"
+
+    "EOF"  shift, and go to state 52
+
+
+State 25
+
+  110 func: "(" FUNC . bind_var_opt func_fields ")"
+
+    VAR  shift, and go to state 53
+
+    $default  reduce using rule 30 (bind_var_opt)
+
+    bind_var_opt  go to state 54
+    bind_var      go to state 55
+
+
+State 26
+
+  169 start: "(" START . var ")"
+
+    NAT  shift, and go to state 56
+    VAR  shift, and go to state 57
+
+    nat  go to state 58
+    var  go to state 59
+
+
+State 27
+
+  167 type_def: "(" TYPE . func_type ")"
+  168         | "(" TYPE . bind_var func_type ")"
+
+    "("  shift, and go to state 60
+    VAR  shift, and go to state 53
+
+    func_type  go to state 61
+    bind_var   go to state 62
+
+
+State 28
+
+  148 global: "(" GLOBAL . bind_var_opt global_fields ")"
+
+    VAR  shift, and go to state 53
+
+    $default  reduce using rule 30 (bind_var_opt)
+
+    bind_var_opt  go to state 63
+    bind_var      go to state 55
+
+
+State 29
+
+  136 table: "(" TABLE . bind_var_opt table_fields ")"
+
+    VAR  shift, and go to state 53
+
+    $default  reduce using rule 30 (bind_var_opt)
+
+    bind_var_opt  go to state 64
+    bind_var      go to state 55
+
+
+State 30
+
+  134 elem: "(" ELEM . var offset var_list ")"
+  135     | "(" ELEM . offset var_list ")"
+
+    "("  shift, and go to state 65
+    NAT  shift, and go to state 56
+    VAR  shift, and go to state 57
+
+    nat     go to state 58
+    var     go to state 66
+    expr    go to state 67
+    offset  go to state 68
+
+
+State 31
+
+  143 memory: "(" MEMORY . bind_var_opt memory_fields ")"
+
+    VAR  shift, and go to state 53
+
+    $default  reduce using rule 30 (bind_var_opt)
+
+    bind_var_opt  go to state 69
+    bind_var      go to state 55
+
+
+State 32
+
+  141 data: "(" DATA . var offset text_list_opt ")"
+  142     | "(" DATA . offset text_list_opt ")"
+
+    "("  shift, and go to state 65
+    NAT  shift, and go to state 56
+    VAR  shift, and go to state 57
+
+    nat     go to state 58
+    var     go to state 70
+    expr    go to state 67
+    offset  go to state 71
+
+
+State 33
+
+  158 import: "(" IMPORT . quoted_text quoted_text import_desc ")"
+
+    TEXT  shift, and go to state 72
+
+    quoted_text  go to state 73
+
+
+State 34
+
+  165 export: "(" EXPORT . quoted_text export_desc ")"
+
+    TEXT  shift, and go to state 72
+
+    quoted_text  go to state 74
+
+
+State 35
+
+  108 exception: "(" EXCEPT . bind_var_opt value_type_list ")"
+
+    VAR  shift, and go to state 53
+
+    $default  reduce using rule 30 (bind_var_opt)
+
+    bind_var_opt  go to state 75
+    bind_var      go to state 55
+
+
+State 36
+
+  189 script_module: "(" MODULE . bind_var_opt module_fields_opt ")"
+  190              | "(" MODULE . bind_var_opt BIN text_list ")"
+  191              | "(" MODULE . bind_var_opt QUOTE text_list ")"
+
+    VAR  shift, and go to state 53
+
+    $default  reduce using rule 30 (bind_var_opt)
+
+    bind_var_opt  go to state 76
+    bind_var      go to state 55
+
+
+State 37
+
+  206 cmd: "(" REGISTER . quoted_text script_var_opt ")"
+
+    TEXT  shift, and go to state 72
+
+    quoted_text  go to state 77
+
+
+State 38
+
+  192 action: "(" INVOKE . script_var_opt quoted_text const_list ")"
+
+    VAR  shift, and go to state 78
+
+    $default  reduce using rule 187 (script_var_opt)
+
+    script_var_opt  go to state 79
+
+
+State 39
+
+  193 action: "(" GET . script_var_opt quoted_text ")"
+
+    VAR  shift, and go to state 78
+
+    $default  reduce using rule 187 (script_var_opt)
+
+    script_var_opt  go to state 80
+
+
+State 40
+
+  194 assertion: "(" ASSERT_MALFORMED . script_module quoted_text ")"
+
+    "("  shift, and go to state 81
+
+    script_module  go to state 82
+
+
+State 41
+
+  195 assertion: "(" ASSERT_INVALID . script_module quoted_text ")"
+
+    "("  shift, and go to state 81
+
+    script_module  go to state 83
+
+
+State 42
+
+  196 assertion: "(" ASSERT_UNLINKABLE . script_module quoted_text ")"
+
+    "("  shift, and go to state 81
+
+    script_module  go to state 84
+
+
+State 43
+
+  198 assertion: "(" ASSERT_RETURN . action const_list ")"
+
+    "("  shift, and go to state 85
+
+    action  go to state 86
+
+
+State 44
+
+  199 assertion: "(" ASSERT_RETURN_CANONICAL_NAN . action ")"
+
+    "("  shift, and go to state 85
+
+    action  go to state 87
+
+
+State 45
+
+  200 assertion: "(" ASSERT_RETURN_ARITHMETIC_NAN . action ")"
+
+    "("  shift, and go to state 85
+
+    action  go to state 88
+
+
+State 46
+
+  197 assertion: "(" ASSERT_TRAP . script_module quoted_text ")"
+  201          | "(" ASSERT_TRAP . action quoted_text ")"
+
+    "("  shift, and go to state 89
+
+    script_module  go to state 90
+    action         go to state 91
+
+
+State 47
+
+  202 assertion: "(" ASSERT_EXHAUSTION . action quoted_text ")"
+
+    "("  shift, and go to state 85
+
+    action  go to state 92
+
+
+State 48
+
+  108 exception: "(" . EXCEPT bind_var_opt value_type_list ")"
+  110 func: "(" . FUNC bind_var_opt func_fields ")"
+  134 elem: "(" . ELEM var offset var_list ")"
+  135     | "(" . ELEM offset var_list ")"
+  136 table: "(" . TABLE bind_var_opt table_fields ")"
+  141 data: "(" . DATA var offset text_list_opt ")"
+  142     | "(" . DATA offset text_list_opt ")"
+  143 memory: "(" . MEMORY bind_var_opt memory_fields ")"
+  148 global: "(" . GLOBAL bind_var_opt global_fields ")"
+  158 import: "(" . IMPORT quoted_text quoted_text import_desc ")"
+  165 export: "(" . EXPORT quoted_text export_desc ")"
+  167 type_def: "(" . TYPE func_type ")"
+  168         | "(" . TYPE bind_var func_type ")"
+  169 start: "(" . START var ")"
+
+    FUNC    shift, and go to state 25
+    START   shift, and go to state 26
+    TYPE    shift, and go to state 27
+    GLOBAL  shift, and go to state 28
+    TABLE   shift, and go to state 29
+    ELEM    shift, and go to state 30
+    MEMORY  shift, and go to state 31
+    DATA    shift, and go to state 32
+    IMPORT  shift, and go to state 33
+    EXPORT  shift, and go to state 34
+    EXCEPT  shift, and go to state 35
+
+
+State 49
+
+  184 module_fields: module_fields module_field .
+
+    $default  reduce using rule 184 (module_fields)
+
+
+State 50
+
+  189 script_module: "(" . MODULE bind_var_opt module_fields_opt ")"
+  190              | "(" . MODULE bind_var_opt BIN text_list ")"
+  191              | "(" . MODULE bind_var_opt QUOTE text_list ")"
+  192 action: "(" . INVOKE script_var_opt quoted_text const_list ")"
+  193       | "(" . GET script_var_opt quoted_text ")"
+  194 assertion: "(" . ASSERT_MALFORMED script_module quoted_text ")"
+  195          | "(" . ASSERT_INVALID script_module quoted_text ")"
+  196          | "(" . ASSERT_UNLINKABLE script_module quoted_text ")"
+  197          | "(" . ASSERT_TRAP script_module quoted_text ")"
+  198          | "(" . ASSERT_RETURN action const_list ")"
+  199          | "(" . ASSERT_RETURN_CANONICAL_NAN action ")"
+  200          | "(" . ASSERT_RETURN_ARITHMETIC_NAN action ")"
+  201          | "(" . ASSERT_TRAP action quoted_text ")"
+  202          | "(" . ASSERT_EXHAUSTION action quoted_text ")"
+  206 cmd: "(" . REGISTER quoted_text script_var_opt ")"
+
+    MODULE                        shift, and go to state 36
+    REGISTER                      shift, and go to state 37
+    INVOKE                        shift, and go to state 38
+    GET                           shift, and go to state 39
+    ASSERT_MALFORMED              shift, and go to state 40
+    ASSERT_INVALID                shift, and go to state 41
+    ASSERT_UNLINKABLE             shift, and go to state 42
+    ASSERT_RETURN                 shift, and go to state 43
+    ASSERT_RETURN_CANONICAL_NAN   shift, and go to state 44
+    ASSERT_RETURN_ARITHMETIC_NAN  shift, and go to state 45
+    ASSERT_TRAP                   shift, and go to state 46
+    ASSERT_EXHAUSTION             shift, and go to state 47
+
+
+State 51
+
+  208 cmd_list: cmd_list cmd .
+
+    $default  reduce using rule 208 (cmd_list)
+
+
+State 52
+
+    0 $accept: script_start "EOF" .
+
+    $default  accept
+
+
+State 53
+
+   32 bind_var: VAR .
+
+    $default  reduce using rule 32 (bind_var)
+
+
+State 54
+
+  110 func: "(" FUNC bind_var_opt . func_fields ")"
+
+    "("             shift, and go to state 93
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 96
+    IF              shift, and go to state 97
+    LOOP            shift, and go to state 98
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+
+    $default  reduce using rule 103 (instr_list)
+
+    type_use           go to state 124
+    instr              go to state 125
+    plain_instr        go to state 126
+    block_instr        go to state 127
+    expr               go to state 128
+    rethrow_check      go to state 129
+    throw_check        go to state 130
+    try_check          go to state 131
+    instr_list         go to state 132
+    func_fields        go to state 133
+    func_fields_body   go to state 134
+    func_fields_body1  go to state 135
+    func_result_body   go to state 136
+    func_body          go to state 137
+    func_body1         go to state 138
+    inline_import      go to state 139
+    inline_export      go to state 140
+
+
+State 55
+
+   31 bind_var_opt: bind_var .
+
+    $default  reduce using rule 31 (bind_var_opt)
+
+
+State 56
+
+   22 nat: NAT .
+
+    $default  reduce using rule 22 (nat)
+
+
+State 57
+
+   27 var: VAR .
+
+    $default  reduce using rule 27 (var)
+
+
+State 58
+
+   26 var: nat .
+
+    $default  reduce using rule 26 (var)
+
+
+State 59
+
+  169 start: "(" START var . ")"
+
+    ")"  shift, and go to state 141
+
+
+State 60
+
+   11 func_type: "(" . FUNC func_sig ")"
+
+    FUNC  shift, and go to state 142
+
+
+State 61
+
+  167 type_def: "(" TYPE func_type . ")"
+
+    ")"  shift, and go to state 143
+
+
+State 62
+
+  168 type_def: "(" TYPE bind_var . func_type ")"
+
+    "("  shift, and go to state 60
+
+    func_type  go to state 144
+
+
+State 63
+
+  148 global: "(" GLOBAL bind_var_opt . global_fields ")"
+
+    "("         shift, and go to state 145
+    VALUE_TYPE  shift, and go to state 146
+
+    global_type    go to state 147
+    global_fields  go to state 148
+    inline_import  go to state 149
+    inline_export  go to state 150
+
+
+State 64
+
+  136 table: "(" TABLE bind_var_opt . table_fields ")"
+
+    "("      shift, and go to state 151
+    NAT      shift, and go to state 56
+    ANYFUNC  shift, and go to state 152
+
+    elem_type      go to state 153
+    table_sig      go to state 154
+    limits         go to state 155
+    nat            go to state 156
+    table_fields   go to state 157
+    inline_import  go to state 158
+    inline_export  go to state 159
+
+
+State 65
+
+   80 expr: "(" . expr1 ")"
+  132 offset: "(" . OFFSET const_expr ")"
+
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 160
+    IF              shift, and go to state 161
+    LOOP            shift, and go to state 162
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+    OFFSET          shift, and go to state 163
+
+    plain_instr    go to state 164
+    expr1          go to state 165
+    rethrow_check  go to state 129
+    throw_check    go to state 130
+    try_check      go to state 166
+
+
+State 66
+
+  134 elem: "(" ELEM var . offset var_list ")"
+
+    "("  shift, and go to state 65
+
+    expr    go to state 67
+    offset  go to state 167
+
+
+State 67
+
+  133 offset: expr .
+
+    $default  reduce using rule 133 (offset)
+
+
+State 68
+
+  135 elem: "(" ELEM offset . var_list ")"
+
+    $default  reduce using rule 28 (var_list)
+
+    var_list  go to state 168
+
+
+State 69
+
+  143 memory: "(" MEMORY bind_var_opt . memory_fields ")"
+
+    "("  shift, and go to state 169
+    NAT  shift, and go to state 56
+
+    memory_sig     go to state 170
+    limits         go to state 171
+    nat            go to state 156
+    memory_fields  go to state 172
+    inline_import  go to state 173
+    inline_export  go to state 174
+
+
+State 70
+
+  141 data: "(" DATA var . offset text_list_opt ")"
+
+    "("  shift, and go to state 65
+
+    expr    go to state 67
+    offset  go to state 175
+
+
+State 71
+
+  142 data: "(" DATA offset . text_list_opt ")"
+
+    TEXT  shift, and go to state 176
+
+    $default  reduce using rule 3 (text_list_opt)
+
+    text_list      go to state 177
+    text_list_opt  go to state 178
+
+
+State 72
+
+    5 quoted_text: TEXT .
+
+    $default  reduce using rule 5 (quoted_text)
+
+
+State 73
+
+  158 import: "(" IMPORT quoted_text . quoted_text import_desc ")"
+
+    TEXT  shift, and go to state 72
+
+    quoted_text  go to state 179
+
+
+State 74
+
+  165 export: "(" EXPORT quoted_text . export_desc ")"
+
+    "("  shift, and go to state 180
+
+    export_desc  go to state 181
+
+
+State 75
+
+  108 exception: "(" EXCEPT bind_var_opt . value_type_list ")"
+
+    $default  reduce using rule 6 (value_type_list)
+
+    value_type_list  go to state 182
+
+
+State 76
+
+  189 script_module: "(" MODULE bind_var_opt . module_fields_opt ")"
+  190              | "(" MODULE bind_var_opt . BIN text_list ")"
+  191              | "(" MODULE bind_var_opt . QUOTE text_list ")"
+
+    "("    shift, and go to state 48
+    BIN    shift, and go to state 183
+    QUOTE  shift, and go to state 184
+
+    $default  reduce using rule 181 (module_fields_opt)
+
+    exception          go to state 2
+    exception_field    go to state 3
+    func               go to state 4
+    elem               go to state 5
+    table              go to state 6
+    data               go to state 7
+    memory             go to state 8
+    global             go to state 9
+    import             go to state 10
+    export             go to state 11
+    type_def           go to state 12
+    start              go to state 13
+    module_field       go to state 14
+    module_fields_opt  go to state 185
+    module_fields      go to state 186
+
+
+State 77
+
+  206 cmd: "(" REGISTER quoted_text . script_var_opt ")"
+
+    VAR  shift, and go to state 78
+
+    $default  reduce using rule 187 (script_var_opt)
+
+    script_var_opt  go to state 187
+
+
+State 78
+
+  188 script_var_opt: VAR .
+
+    $default  reduce using rule 188 (script_var_opt)
+
+
+State 79
+
+  192 action: "(" INVOKE script_var_opt . quoted_text const_list ")"
+
+    TEXT  shift, and go to state 72
+
+    quoted_text  go to state 188
+
+
+State 80
+
+  193 action: "(" GET script_var_opt . quoted_text ")"
+
+    TEXT  shift, and go to state 72
+
+    quoted_text  go to state 189
+
+
+State 81
+
+  189 script_module: "(" . MODULE bind_var_opt module_fields_opt ")"
+  190              | "(" . MODULE bind_var_opt BIN text_list ")"
+  191              | "(" . MODULE bind_var_opt QUOTE text_list ")"
+
+    MODULE  shift, and go to state 36
+
+
+State 82
+
+  194 assertion: "(" ASSERT_MALFORMED script_module . quoted_text ")"
+
+    TEXT  shift, and go to state 72
+
+    quoted_text  go to state 190
+
+
+State 83
+
+  195 assertion: "(" ASSERT_INVALID script_module . quoted_text ")"
+
+    TEXT  shift, and go to state 72
+
+    quoted_text  go to state 191
+
+
+State 84
+
+  196 assertion: "(" ASSERT_UNLINKABLE script_module . quoted_text ")"
+
+    TEXT  shift, and go to state 72
+
+    quoted_text  go to state 192
+
+
+State 85
+
+  192 action: "(" . INVOKE script_var_opt quoted_text const_list ")"
+  193       | "(" . GET script_var_opt quoted_text ")"
+
+    INVOKE  shift, and go to state 38
+    GET     shift, and go to state 39
+
+
+State 86
+
+  198 assertion: "(" ASSERT_RETURN action . const_list ")"
+
+    $default  reduce using rule 210 (const_list)
+
+    const_list  go to state 193
+
+
+State 87
+
+  199 assertion: "(" ASSERT_RETURN_CANONICAL_NAN action . ")"
+
+    ")"  shift, and go to state 194
+
+
+State 88
+
+  200 assertion: "(" ASSERT_RETURN_ARITHMETIC_NAN action . ")"
+
+    ")"  shift, and go to state 195
+
+
+State 89
+
+  189 script_module: "(" . MODULE bind_var_opt module_fields_opt ")"
+  190              | "(" . MODULE bind_var_opt BIN text_list ")"
+  191              | "(" . MODULE bind_var_opt QUOTE text_list ")"
+  192 action: "(" . INVOKE script_var_opt quoted_text const_list ")"
+  193       | "(" . GET script_var_opt quoted_text ")"
+
+    MODULE  shift, and go to state 36
+    INVOKE  shift, and go to state 38
+    GET     shift, and go to state 39
+
+
+State 90
+
+  197 assertion: "(" ASSERT_TRAP script_module . quoted_text ")"
+
+    TEXT  shift, and go to state 72
+
+    quoted_text  go to state 196
+
+
+State 91
+
+  201 assertion: "(" ASSERT_TRAP action . quoted_text ")"
+
+    TEXT  shift, and go to state 72
+
+    quoted_text  go to state 197
+
+
+State 92
+
+  202 assertion: "(" ASSERT_EXHAUSTION action . quoted_text ")"
+
+    TEXT  shift, and go to state 72
+
+    quoted_text  go to state 198
+
+
+State 93
+
+   21 type_use: "(" . TYPE var ")"
+   80 expr: "(" . expr1 ")"
+  124 func_fields_body1: "(" . PARAM value_type_list ")" func_fields_body1
+  125                  | "(" . PARAM bind_var VALUE_TYPE ")" func_fields_body1
+  127 func_result_body: "(" . RESULT value_type_list ")" func_result_body
+  130 func_body1: "(" . LOCAL value_type_list ")" func_body1
+  131           | "(" . LOCAL bind_var VALUE_TYPE ")" func_body1
+  159 inline_import: "(" . IMPORT quoted_text quoted_text ")"
+  166 inline_export: "(" . EXPORT quoted_text ")"
+
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 160
+    IF              shift, and go to state 161
+    LOOP            shift, and go to state 162
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+    TYPE            shift, and go to state 199
+    PARAM           shift, and go to state 200
+    RESULT          shift, and go to state 201
+    LOCAL           shift, and go to state 202
+    IMPORT          shift, and go to state 203
+    EXPORT          shift, and go to state 204
+
+    plain_instr    go to state 164
+    expr1          go to state 165
+    rethrow_check  go to state 129
+    throw_check    go to state 130
+    try_check      go to state 166
+
+
+State 94
+
+   43 plain_instr: NOP .
+
+    $default  reduce using rule 43 (plain_instr)
+
+
+State 95
+
+   44 plain_instr: DROP .
+
+    $default  reduce using rule 44 (plain_instr)
+
+
+State 96
+
+   68 block_instr: BLOCK . labeling_opt block END labeling_opt
+
+    VAR  shift, and go to state 53
+
+    $default  reduce using rule 33 (labeling_opt)
+
+    bind_var      go to state 205
+    labeling_opt  go to state 206
+
+
+State 97
+
+   70 block_instr: IF . labeling_opt block END labeling_opt
+   71            | IF . labeling_opt block ELSE labeling_opt instr_list END labeling_opt
+
+    VAR  shift, and go to state 53
+
+    $default  reduce using rule 33 (labeling_opt)
+
+    bind_var      go to state 205
+    labeling_opt  go to state 207
+
+
+State 98
+
+   69 block_instr: LOOP . labeling_opt block END labeling_opt
+
+    VAR  shift, and go to state 53
+
+    $default  reduce using rule 33 (labeling_opt)
+
+    bind_var      go to state 205
+    labeling_opt  go to state 208
+
+
+State 99
+
+   46 plain_instr: BR . var
+
+    NAT  shift, and go to state 56
+    VAR  shift, and go to state 57
+
+    nat  go to state 58
+    var  go to state 209
+
+
+State 100
+
+   47 plain_instr: BR_IF . var
+
+    NAT  shift, and go to state 56
+    VAR  shift, and go to state 57
+
+    nat  go to state 58
+    var  go to state 210
+
+
+State 101
+
+   48 plain_instr: BR_TABLE . var_list var
+
+    $default  reduce using rule 28 (var_list)
+
+    var_list  go to state 211
+
+
+State 102
+
+  102 try_check: TRY .
+
+    $default  reduce using rule 102 (try_check)
+
+
+State 103
+
+  101 throw_check: THROW .
+
+    $default  reduce using rule 101 (throw_check)
+
+
+State 104
+
+  100 rethrow_check: RETHROW .
+
+    $default  reduce using rule 100 (rethrow_check)
+
+
+State 105
+
+   50 plain_instr: CALL . var
+
+    NAT  shift, and go to state 56
+    VAR  shift, and go to state 57
+
+    nat  go to state 58
+    var  go to state 212
+
+
+State 106
+
+   51 plain_instr: CALL_INDIRECT . var
+
+    NAT  shift, and go to state 56
+    VAR  shift, and go to state 57
+
+    nat  go to state 58
+    var  go to state 213
+
+
+State 107
+
+   49 plain_instr: RETURN .
+
+    $default  reduce using rule 49 (plain_instr)
+
+
+State 108
+
+   52 plain_instr: GET_LOCAL . var
+
+    NAT  shift, and go to state 56
+    VAR  shift, and go to state 57
+
+    nat  go to state 58
+    var  go to state 214
+
+
+State 109
+
+   53 plain_instr: SET_LOCAL . var
+
+    NAT  shift, and go to state 56
+    VAR  shift, and go to state 57
+
+    nat  go to state 58
+    var  go to state 215
+
+
+State 110
+
+   54 plain_instr: TEE_LOCAL . var
+
+    NAT  shift, and go to state 56
+    VAR  shift, and go to state 57
+
+    nat  go to state 58
+    var  go to state 216
+
+
+State 111
+
+   55 plain_instr: GET_GLOBAL . var
+
+    NAT  shift, and go to state 56
+    VAR  shift, and go to state 57
+
+    nat  go to state 58
+    var  go to state 217
+
+
+State 112
+
+   56 plain_instr: SET_GLOBAL . var
+
+    NAT  shift, and go to state 56
+    VAR  shift, and go to state 57
+
+    nat  go to state 58
+    var  go to state 218
+
+
+State 113
+
+   57 plain_instr: LOAD . offset_opt align_opt
+
+    OFFSET_EQ_NAT  shift, and go to state 219
+
+    $default  reduce using rule 35 (offset_opt)
+
+    offset_opt  go to state 220
+
+
+State 114
+
+   58 plain_instr: STORE . offset_opt align_opt
+
+    OFFSET_EQ_NAT  shift, and go to state 219
+
+    $default  reduce using rule 35 (offset_opt)
+
+    offset_opt  go to state 221
+
+
+State 115
+
+   59 plain_instr: CONST . literal
+
+    NAT    shift, and go to state 222
+    INT    shift, and go to state 223
+    FLOAT  shift, and go to state 224
+
+    literal  go to state 225
+
+
+State 116
+
+   60 plain_instr: UNARY .
+
+    $default  reduce using rule 60 (plain_instr)
+
+
+State 117
+
+   61 plain_instr: BINARY .
+
+    $default  reduce using rule 61 (plain_instr)
+
+
+State 118
+
+   62 plain_instr: COMPARE .
+
+    $default  reduce using rule 62 (plain_instr)
+
+
+State 119
+
+   63 plain_instr: CONVERT .
+
+    $default  reduce using rule 63 (plain_instr)
+
+
+State 120
+
+   45 plain_instr: SELECT .
+
+    $default  reduce using rule 45 (plain_instr)
+
+
+State 121
+
+   42 plain_instr: UNREACHABLE .
+
+    $default  reduce using rule 42 (plain_instr)
+
+
+State 122
+
+   64 plain_instr: CURRENT_MEMORY .
+
+    $default  reduce using rule 64 (plain_instr)
+
+
+State 123
+
+   65 plain_instr: GROW_MEMORY .
+
+    $default  reduce using rule 65 (plain_instr)
+
+
+State 124
+
+  111 func_fields: type_use . func_fields_body
+
+    "("             shift, and go to state 226
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 96
+    IF              shift, and go to state 97
+    LOOP            shift, and go to state 98
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+
+    $default  reduce using rule 103 (instr_list)
+
+    instr              go to state 125
+    plain_instr        go to state 126
+    block_instr        go to state 127
+    expr               go to state 128
+    rethrow_check      go to state 129
+    throw_check        go to state 130
+    try_check          go to state 131
+    instr_list         go to state 132
+    func_fields_body   go to state 227
+    func_fields_body1  go to state 135
+    func_result_body   go to state 136
+    func_body          go to state 137
+    func_body1         go to state 138
+
+
+State 125
+
+  104 instr_list: instr . instr_list
+
+    "("             shift, and go to state 228
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 96
+    IF              shift, and go to state 97
+    LOOP            shift, and go to state 98
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+
+    $default  reduce using rule 103 (instr_list)
+
+    instr          go to state 125
+    plain_instr    go to state 126
+    block_instr    go to state 127
+    expr           go to state 128
+    rethrow_check  go to state 129
+    throw_check    go to state 130
+    try_check      go to state 131
+    instr_list     go to state 229
+
+
+State 126
+
+   39 instr: plain_instr .
+
+    $default  reduce using rule 39 (instr)
+
+
+State 127
+
+   40 instr: block_instr .
+
+    $default  reduce using rule 40 (instr)
+
+
+State 128
+
+   41 instr: expr .
+
+    $default  reduce using rule 41 (instr)
+
+
+State 129
+
+   67 plain_instr: rethrow_check . var
+
+    NAT  shift, and go to state 56
+    VAR  shift, and go to state 57
+
+    nat  go to state 58
+    var  go to state 230
+
+
+State 130
+
+   66 plain_instr: throw_check . var
+
+    NAT  shift, and go to state 56
+    VAR  shift, and go to state 57
+
+    nat  go to state 58
+    var  go to state 231
+
+
+State 131
+
+   72 block_instr: try_check . labeling_opt block catch_instr_list END labeling_opt
+
+    VAR  shift, and go to state 53
+
+    $default  reduce using rule 33 (labeling_opt)
+
+    bind_var      go to state 205
+    labeling_opt  go to state 232
+
+
+State 132
+
+  129 func_body1: instr_list .
+
+    $default  reduce using rule 129 (func_body1)
+
+
+State 133
+
+  110 func: "(" FUNC bind_var_opt func_fields . ")"
+
+    ")"  shift, and go to state 233
+
+
+State 134
+
+  112 func_fields: func_fields_body .
+
+    $default  reduce using rule 112 (func_fields)
+
+
+State 135
+
+  122 func_fields_body: func_fields_body1 .
+
+    $default  reduce using rule 122 (func_fields_body)
+
+
+State 136
+
+  123 func_fields_body1: func_result_body .
+
+    $default  reduce using rule 123 (func_fields_body1)
+
+
+State 137
+
+  126 func_result_body: func_body .
+
+    $default  reduce using rule 126 (func_result_body)
+
+
+State 138
+
+  128 func_body: func_body1 .
+
+    $default  reduce using rule 128 (func_body)
+
+
+State 139
+
+  113 func_fields: inline_import . type_use func_fields_import
+  114            | inline_import . func_fields_import
+
+    "("  shift, and go to state 234
+
+    $default  reduce using rule 120 (func_fields_import_result)
+
+    type_use                   go to state 235
+    func_fields_import         go to state 236
+    func_fields_import1        go to state 237
+    func_fields_import_result  go to state 238
+
+
+State 140
+
+  115 func_fields: inline_export . func_fields
+
+    "("             shift, and go to state 93
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 96
+    IF              shift, and go to state 97
+    LOOP            shift, and go to state 98
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+
+    $default  reduce using rule 103 (instr_list)
+
+    type_use           go to state 124
+    instr              go to state 125
+    plain_instr        go to state 126
+    block_instr        go to state 127
+    expr               go to state 128
+    rethrow_check      go to state 129
+    throw_check        go to state 130
+    try_check          go to state 131
+    instr_list         go to state 132
+    func_fields        go to state 239
+    func_fields_body   go to state 134
+    func_fields_body1  go to state 135
+    func_result_body   go to state 136
+    func_body          go to state 137
+    func_body1         go to state 138
+    inline_import      go to state 139
+    inline_export      go to state 140
+
+
+State 141
+
+  169 start: "(" START var ")" .
+
+    $default  reduce using rule 169 (start)
+
+
+State 142
+
+   11 func_type: "(" FUNC . func_sig ")"
+
+    "("  shift, and go to state 240
+
+    $default  reduce using rule 15 (func_sig_result)
+
+    func_sig         go to state 241
+    func_sig_result  go to state 242
+
+
+State 143
+
+  167 type_def: "(" TYPE func_type ")" .
+
+    $default  reduce using rule 167 (type_def)
+
+
+State 144
+
+  168 type_def: "(" TYPE bind_var func_type . ")"
+
+    ")"  shift, and go to state 243
+
+
+State 145
+
+   10 global_type: "(" . MUT VALUE_TYPE ")"
+  159 inline_import: "(" . IMPORT quoted_text quoted_text ")"
+  166 inline_export: "(" . EXPORT quoted_text ")"
+
+    MUT     shift, and go to state 244
+    IMPORT  shift, and go to state 203
+    EXPORT  shift, and go to state 204
+
+
+State 146
+
+    9 global_type: VALUE_TYPE .
+
+    $default  reduce using rule 9 (global_type)
+
+
+State 147
+
+  149 global_fields: global_type . const_expr
+
+    "("             shift, and go to state 228
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 96
+    IF              shift, and go to state 97
+    LOOP            shift, and go to state 98
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+
+    $default  reduce using rule 103 (instr_list)
+
+    instr          go to state 125
+    plain_instr    go to state 126
+    block_instr    go to state 127
+    expr           go to state 128
+    rethrow_check  go to state 129
+    throw_check    go to state 130
+    try_check      go to state 131
+    instr_list     go to state 245
+    const_expr     go to state 246
+
+
+State 148
+
+  148 global: "(" GLOBAL bind_var_opt global_fields . ")"
+
+    ")"  shift, and go to state 247
+
+
+State 149
+
+  150 global_fields: inline_import . global_type
+
+    "("         shift, and go to state 248
+    VALUE_TYPE  shift, and go to state 146
+
+    global_type  go to state 249
+
+
+State 150
+
+  151 global_fields: inline_export . global_fields
+
+    "("         shift, and go to state 145
+    VALUE_TYPE  shift, and go to state 146
+
+    global_type    go to state 147
+    global_fields  go to state 250
+    inline_import  go to state 149
+    inline_export  go to state 150
+
+
+State 151
+
+  159 inline_import: "(" . IMPORT quoted_text quoted_text ")"
+  166 inline_export: "(" . EXPORT quoted_text ")"
+
+    IMPORT  shift, and go to state 203
+    EXPORT  shift, and go to state 204
+
+
+State 152
+
+    8 elem_type: ANYFUNC .
+
+    $default  reduce using rule 8 (elem_type)
+
+
+State 153
+
+  140 table_fields: elem_type . "(" ELEM var_list ")"
+
+    "("  shift, and go to state 251
+
+
+State 154
+
+  137 table_fields: table_sig .
+
+    $default  reduce using rule 137 (table_fields)
+
+
+State 155
+
+   17 table_sig: limits . elem_type
+
+    ANYFUNC  shift, and go to state 152
+
+    elem_type  go to state 252
+
+
+State 156
+
+   19 limits: nat .
+   20       | nat . nat
+
+    NAT  shift, and go to state 56
+
+    $default  reduce using rule 19 (limits)
+
+    nat  go to state 253
+
+
+State 157
+
+  136 table: "(" TABLE bind_var_opt table_fields . ")"
+
+    ")"  shift, and go to state 254
+
+
+State 158
+
+  138 table_fields: inline_import . table_sig
+
+    NAT  shift, and go to state 56
+
+    table_sig  go to state 255
+    limits     go to state 155
+    nat        go to state 156
+
+
+State 159
+
+  139 table_fields: inline_export . table_fields
+
+    "("      shift, and go to state 151
+    NAT      shift, and go to state 56
+    ANYFUNC  shift, and go to state 152
+
+    elem_type      go to state 153
+    table_sig      go to state 154
+    limits         go to state 155
+    nat            go to state 156
+    table_fields   go to state 256
+    inline_import  go to state 158
+    inline_export  go to state 159
+
+
+State 160
+
+   82 expr1: BLOCK . labeling_opt block
+
+    VAR  shift, and go to state 53
+
+    $default  reduce using rule 33 (labeling_opt)
+
+    bind_var      go to state 205
+    labeling_opt  go to state 257
+
+
+State 161
+
+   84 expr1: IF . labeling_opt if_block
+
+    VAR  shift, and go to state 53
+
+    $default  reduce using rule 33 (labeling_opt)
+
+    bind_var      go to state 205
+    labeling_opt  go to state 258
+
+
+State 162
+
+   83 expr1: LOOP . labeling_opt block
+
+    VAR  shift, and go to state 53
+
+    $default  reduce using rule 33 (labeling_opt)
+
+    bind_var      go to state 205
+    labeling_opt  go to state 259
+
+
+State 163
+
+  132 offset: "(" OFFSET . const_expr ")"
+
+    "("             shift, and go to state 228
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 96
+    IF              shift, and go to state 97
+    LOOP            shift, and go to state 98
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+
+    $default  reduce using rule 103 (instr_list)
+
+    instr          go to state 125
+    plain_instr    go to state 126
+    block_instr    go to state 127
+    expr           go to state 128
+    rethrow_check  go to state 129
+    throw_check    go to state 130
+    try_check      go to state 131
+    instr_list     go to state 245
+    const_expr     go to state 260
+
+
+State 164
+
+   81 expr1: plain_instr . expr_list
+
+    "("  shift, and go to state 228
+
+    $default  reduce using rule 105 (expr_list)
+
+    expr       go to state 261
+    expr_list  go to state 262
+
+
+State 165
+
+   80 expr: "(" expr1 . ")"
+
+    ")"  shift, and go to state 263
+
+
+State 166
+
+   85 expr1: try_check . labeling_opt try_
+
+    VAR  shift, and go to state 53
+
+    $default  reduce using rule 33 (labeling_opt)
+
+    bind_var      go to state 205
+    labeling_opt  go to state 264
+
+
+State 167
+
+  134 elem: "(" ELEM var offset . var_list ")"
+
+    $default  reduce using rule 28 (var_list)
+
+    var_list  go to state 265
+
+
+State 168
+
+   29 var_list: var_list . var
+  135 elem: "(" ELEM offset var_list . ")"
+
+    ")"  shift, and go to state 266
+    NAT  shift, and go to state 56
+    VAR  shift, and go to state 57
+
+    nat  go to state 58
+    var  go to state 267
+
+
+State 169
+
+  147 memory_fields: "(" . DATA text_list_opt ")"
+  159 inline_import: "(" . IMPORT quoted_text quoted_text ")"
+  166 inline_export: "(" . EXPORT quoted_text ")"
+
+    DATA    shift, and go to state 268
+    IMPORT  shift, and go to state 203
+    EXPORT  shift, and go to state 204
+
+
+State 170
+
+  144 memory_fields: memory_sig .
+
+    $default  reduce using rule 144 (memory_fields)
+
+
+State 171
+
+   18 memory_sig: limits .
+
+    $default  reduce using rule 18 (memory_sig)
+
+
+State 172
+
+  143 memory: "(" MEMORY bind_var_opt memory_fields . ")"
+
+    ")"  shift, and go to state 269
+
+
+State 173
+
+  145 memory_fields: inline_import . memory_sig
+
+    NAT  shift, and go to state 56
+
+    memory_sig  go to state 270
+    limits      go to state 171
+    nat         go to state 156
+
+
+State 174
+
+  146 memory_fields: inline_export . memory_fields
+
+    "("  shift, and go to state 169
+    NAT  shift, and go to state 56
+
+    memory_sig     go to state 170
+    limits         go to state 171
+    nat            go to state 156
+    memory_fields  go to state 271
+    inline_import  go to state 173
+    inline_export  go to state 174
+
+
+State 175
+
+  141 data: "(" DATA var offset . text_list_opt ")"
+
+    TEXT  shift, and go to state 176
+
+    $default  reduce using rule 3 (text_list_opt)
+
+    text_list      go to state 177
+    text_list_opt  go to state 272
+
+
+State 176
+
+    1 text_list: TEXT .
+
+    $default  reduce using rule 1 (text_list)
+
+
+State 177
+
+    2 text_list: text_list . TEXT
+    4 text_list_opt: text_list .
+
+    TEXT  shift, and go to state 273
+
+    $default  reduce using rule 4 (text_list_opt)
+
+
+State 178
+
+  142 data: "(" DATA offset text_list_opt . ")"
+
+    ")"  shift, and go to state 274
+
+
+State 179
+
+  158 import: "(" IMPORT quoted_text quoted_text . import_desc ")"
+
+    "("  shift, and go to state 275
+
+    exception    go to state 276
+    import_desc  go to state 277
+
+
+State 180
+
+  160 export_desc: "(" . FUNC var ")"
+  161            | "(" . TABLE var ")"
+  162            | "(" . MEMORY var ")"
+  163            | "(" . GLOBAL var ")"
+  164            | "(" . EXCEPT var ")"
+
+    FUNC    shift, and go to state 278
+    GLOBAL  shift, and go to state 279
+    TABLE   shift, and go to state 280
+    MEMORY  shift, and go to state 281
+    EXCEPT  shift, and go to state 282
+
+
+State 181
+
+  165 export: "(" EXPORT quoted_text export_desc . ")"
+
+    ")"  shift, and go to state 283
+
+
+State 182
+
+    7 value_type_list: value_type_list . VALUE_TYPE
+  108 exception: "(" EXCEPT bind_var_opt value_type_list . ")"
+
+    ")"         shift, and go to state 284
+    VALUE_TYPE  shift, and go to state 285
+
+
+State 183
+
+  190 script_module: "(" MODULE bind_var_opt BIN . text_list ")"
+
+    TEXT  shift, and go to state 176
+
+    text_list  go to state 286
+
+
+State 184
+
+  191 script_module: "(" MODULE bind_var_opt QUOTE . text_list ")"
+
+    TEXT  shift, and go to state 176
+
+    text_list  go to state 287
+
+
+State 185
+
+  189 script_module: "(" MODULE bind_var_opt module_fields_opt . ")"
+
+    ")"  shift, and go to state 288
+
+
+State 186
+
+  182 module_fields_opt: module_fields .
+  184 module_fields: module_fields . module_field
+
+    "("  shift, and go to state 48
+
+    $default  reduce using rule 182 (module_fields_opt)
+
+    exception        go to state 2
+    exception_field  go to state 3
+    func             go to state 4
+    elem             go to state 5
+    table            go to state 6
+    data             go to state 7
+    memory           go to state 8
+    global           go to state 9
+    import           go to state 10
+    export           go to state 11
+    type_def         go to state 12
+    start            go to state 13
+    module_field     go to state 49
+
+
+State 187
+
+  206 cmd: "(" REGISTER quoted_text script_var_opt . ")"
+
+    ")"  shift, and go to state 289
+
+
+State 188
+
+  192 action: "(" INVOKE script_var_opt quoted_text . const_list ")"
+
+    $default  reduce using rule 210 (const_list)
+
+    const_list  go to state 290
+
+
+State 189
+
+  193 action: "(" GET script_var_opt quoted_text . ")"
+
+    ")"  shift, and go to state 291
+
+
+State 190
+
+  194 assertion: "(" ASSERT_MALFORMED script_module quoted_text . ")"
+
+    ")"  shift, and go to state 292
+
+
+State 191
+
+  195 assertion: "(" ASSERT_INVALID script_module quoted_text . ")"
+
+    ")"  shift, and go to state 293
+
+
+State 192
+
+  196 assertion: "(" ASSERT_UNLINKABLE script_module quoted_text . ")"
+
+    ")"  shift, and go to state 294
+
+
+State 193
+
+  198 assertion: "(" ASSERT_RETURN action const_list . ")"
+  211 const_list: const_list . const
+
+    "("  shift, and go to state 295
+    ")"  shift, and go to state 296
+
+    const  go to state 297
+
+
+State 194
+
+  199 assertion: "(" ASSERT_RETURN_CANONICAL_NAN action ")" .
+
+    $default  reduce using rule 199 (assertion)
+
+
+State 195
+
+  200 assertion: "(" ASSERT_RETURN_ARITHMETIC_NAN action ")" .
+
+    $default  reduce using rule 200 (assertion)
+
+
+State 196
+
+  197 assertion: "(" ASSERT_TRAP script_module quoted_text . ")"
+
+    ")"  shift, and go to state 298
+
+
+State 197
+
+  201 assertion: "(" ASSERT_TRAP action quoted_text . ")"
+
+    ")"  shift, and go to state 299
+
+
+State 198
+
+  202 assertion: "(" ASSERT_EXHAUSTION action quoted_text . ")"
+
+    ")"  shift, and go to state 300
+
+
+State 199
+
+   21 type_use: "(" TYPE . var ")"
+
+    NAT  shift, and go to state 56
+    VAR  shift, and go to state 57
+
+    nat  go to state 58
+    var  go to state 301
+
+
+State 200
+
+  124 func_fields_body1: "(" PARAM . value_type_list ")" func_fields_body1
+  125                  | "(" PARAM . bind_var VALUE_TYPE ")" func_fields_body1
+
+    VAR  shift, and go to state 53
+
+    $default  reduce using rule 6 (value_type_list)
+
+    value_type_list  go to state 302
+    bind_var         go to state 303
+
+
+State 201
+
+  127 func_result_body: "(" RESULT . value_type_list ")" func_result_body
+
+    $default  reduce using rule 6 (value_type_list)
+
+    value_type_list  go to state 304
+
+
+State 202
+
+  130 func_body1: "(" LOCAL . value_type_list ")" func_body1
+  131           | "(" LOCAL . bind_var VALUE_TYPE ")" func_body1
+
+    VAR  shift, and go to state 53
+
+    $default  reduce using rule 6 (value_type_list)
+
+    value_type_list  go to state 305
+    bind_var         go to state 306
+
+
+State 203
+
+  159 inline_import: "(" IMPORT . quoted_text quoted_text ")"
+
+    TEXT  shift, and go to state 72
+
+    quoted_text  go to state 307
+
+
+State 204
+
+  166 inline_export: "(" EXPORT . quoted_text ")"
+
+    TEXT  shift, and go to state 72
+
+    quoted_text  go to state 308
+
+
+State 205
+
+   34 labeling_opt: bind_var .
+
+    $default  reduce using rule 34 (labeling_opt)
+
+
+State 206
+
+   68 block_instr: BLOCK labeling_opt . block END labeling_opt
+
+    "("             shift, and go to state 309
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 96
+    IF              shift, and go to state 97
+    LOOP            shift, and go to state 98
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+
+    $default  reduce using rule 103 (instr_list)
+
+    instr          go to state 125
+    plain_instr    go to state 126
+    block_instr    go to state 127
+    block_sig      go to state 310
+    block          go to state 311
+    expr           go to state 128
+    rethrow_check  go to state 129
+    throw_check    go to state 130
+    try_check      go to state 131
+    instr_list     go to state 312
+
+
+State 207
+
+   70 block_instr: IF labeling_opt . block END labeling_opt
+   71            | IF labeling_opt . block ELSE labeling_opt instr_list END labeling_opt
+
+    "("             shift, and go to state 309
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 96
+    IF              shift, and go to state 97
+    LOOP            shift, and go to state 98
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+
+    $default  reduce using rule 103 (instr_list)
+
+    instr          go to state 125
+    plain_instr    go to state 126
+    block_instr    go to state 127
+    block_sig      go to state 310
+    block          go to state 313
+    expr           go to state 128
+    rethrow_check  go to state 129
+    throw_check    go to state 130
+    try_check      go to state 131
+    instr_list     go to state 312
+
+
+State 208
+
+   69 block_instr: LOOP labeling_opt . block END labeling_opt
+
+    "("             shift, and go to state 309
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 96
+    IF              shift, and go to state 97
+    LOOP            shift, and go to state 98
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+
+    $default  reduce using rule 103 (instr_list)
+
+    instr          go to state 125
+    plain_instr    go to state 126
+    block_instr    go to state 127
+    block_sig      go to state 310
+    block          go to state 314
+    expr           go to state 128
+    rethrow_check  go to state 129
+    throw_check    go to state 130
+    try_check      go to state 131
+    instr_list     go to state 312
+
+
+State 209
+
+   46 plain_instr: BR var .
+
+    $default  reduce using rule 46 (plain_instr)
+
+
+State 210
+
+   47 plain_instr: BR_IF var .
+
+    $default  reduce using rule 47 (plain_instr)
+
+
+State 211
+
+   29 var_list: var_list . var
+   48 plain_instr: BR_TABLE var_list . var
+
+    NAT  shift, and go to state 56
+    VAR  shift, and go to state 57
+
+    nat  go to state 58
+    var  go to state 315
+
+
+State 212
+
+   50 plain_instr: CALL var .
+
+    $default  reduce using rule 50 (plain_instr)
+
+
+State 213
+
+   51 plain_instr: CALL_INDIRECT var .
+
+    $default  reduce using rule 51 (plain_instr)
+
+
+State 214
+
+   52 plain_instr: GET_LOCAL var .
+
+    $default  reduce using rule 52 (plain_instr)
+
+
+State 215
+
+   53 plain_instr: SET_LOCAL var .
+
+    $default  reduce using rule 53 (plain_instr)
+
+
+State 216
+
+   54 plain_instr: TEE_LOCAL var .
+
+    $default  reduce using rule 54 (plain_instr)
+
+
+State 217
+
+   55 plain_instr: GET_GLOBAL var .
+
+    $default  reduce using rule 55 (plain_instr)
+
+
+State 218
+
+   56 plain_instr: SET_GLOBAL var .
+
+    $default  reduce using rule 56 (plain_instr)
+
+
+State 219
+
+   36 offset_opt: OFFSET_EQ_NAT .
+
+    $default  reduce using rule 36 (offset_opt)
+
+
+State 220
+
+   57 plain_instr: LOAD offset_opt . align_opt
+
+    ALIGN_EQ_NAT  shift, and go to state 316
+
+    $default  reduce using rule 37 (align_opt)
+
+    align_opt  go to state 317
+
+
+State 221
+
+   58 plain_instr: STORE offset_opt . align_opt
+
+    ALIGN_EQ_NAT  shift, and go to state 316
+
+    $default  reduce using rule 37 (align_opt)
+
+    align_opt  go to state 318
+
+
+State 222
+
+   23 literal: NAT .
+
+    $default  reduce using rule 23 (literal)
+
+
+State 223
+
+   24 literal: INT .
+
+    $default  reduce using rule 24 (literal)
+
+
+State 224
+
+   25 literal: FLOAT .
+
+    $default  reduce using rule 25 (literal)
+
+
+State 225
+
+   59 plain_instr: CONST literal .
+
+    $default  reduce using rule 59 (plain_instr)
+
+
+State 226
+
+   80 expr: "(" . expr1 ")"
+  124 func_fields_body1: "(" . PARAM value_type_list ")" func_fields_body1
+  125                  | "(" . PARAM bind_var VALUE_TYPE ")" func_fields_body1
+  127 func_result_body: "(" . RESULT value_type_list ")" func_result_body
+  130 func_body1: "(" . LOCAL value_type_list ")" func_body1
+  131           | "(" . LOCAL bind_var VALUE_TYPE ")" func_body1
+
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 160
+    IF              shift, and go to state 161
+    LOOP            shift, and go to state 162
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+    PARAM           shift, and go to state 200
+    RESULT          shift, and go to state 201
+    LOCAL           shift, and go to state 202
+
+    plain_instr    go to state 164
+    expr1          go to state 165
+    rethrow_check  go to state 129
+    throw_check    go to state 130
+    try_check      go to state 166
+
+
+State 227
+
+  111 func_fields: type_use func_fields_body .
+
+    $default  reduce using rule 111 (func_fields)
+
+
+State 228
+
+   80 expr: "(" . expr1 ")"
+
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 160
+    IF              shift, and go to state 161
+    LOOP            shift, and go to state 162
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+
+    plain_instr    go to state 164
+    expr1          go to state 165
+    rethrow_check  go to state 129
+    throw_check    go to state 130
+    try_check      go to state 166
+
+
+State 229
+
+  104 instr_list: instr instr_list .
+
+    $default  reduce using rule 104 (instr_list)
+
+
+State 230
+
+   67 plain_instr: rethrow_check var .
+
+    $default  reduce using rule 67 (plain_instr)
+
+
+State 231
+
+   66 plain_instr: throw_check var .
+
+    $default  reduce using rule 66 (plain_instr)
+
+
+State 232
+
+   72 block_instr: try_check labeling_opt . block catch_instr_list END labeling_opt
+
+    "("             shift, and go to state 309
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 96
+    IF              shift, and go to state 97
+    LOOP            shift, and go to state 98
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+
+    $default  reduce using rule 103 (instr_list)
+
+    instr          go to state 125
+    plain_instr    go to state 126
+    block_instr    go to state 127
+    block_sig      go to state 310
+    block          go to state 319
+    expr           go to state 128
+    rethrow_check  go to state 129
+    throw_check    go to state 130
+    try_check      go to state 131
+    instr_list     go to state 312
+
+
+State 233
+
+  110 func: "(" FUNC bind_var_opt func_fields ")" .
+
+    $default  reduce using rule 110 (func)
+
+
+State 234
+
+   21 type_use: "(" . TYPE var ")"
+  118 func_fields_import1: "(" . PARAM value_type_list ")" func_fields_import1
+  119                    | "(" . PARAM bind_var VALUE_TYPE ")" func_fields_import1
+  121 func_fields_import_result: "(" . RESULT value_type_list ")" func_fields_import_result
+
+    TYPE    shift, and go to state 199
+    PARAM   shift, and go to state 320
+    RESULT  shift, and go to state 321
+
+
+State 235
+
+  113 func_fields: inline_import type_use . func_fields_import
+
+    "("  shift, and go to state 322
+
+    $default  reduce using rule 120 (func_fields_import_result)
+
+    func_fields_import         go to state 323
+    func_fields_import1        go to state 237
+    func_fields_import_result  go to state 238
+
+
+State 236
+
+  114 func_fields: inline_import func_fields_import .
+
+    $default  reduce using rule 114 (func_fields)
+
+
+State 237
+
+  116 func_fields_import: func_fields_import1 .
+
+    $default  reduce using rule 116 (func_fields_import)
+
+
+State 238
+
+  117 func_fields_import1: func_fields_import_result .
+
+    $default  reduce using rule 117 (func_fields_import1)
+
+
+State 239
+
+  115 func_fields: inline_export func_fields .
+
+    $default  reduce using rule 115 (func_fields)
+
+
+State 240
+
+   13 func_sig: "(" . PARAM value_type_list ")" func_sig
+   14         | "(" . PARAM bind_var VALUE_TYPE ")" func_sig
+   16 func_sig_result: "(" . RESULT value_type_list ")" func_sig_result
+
+    PARAM   shift, and go to state 324
+    RESULT  shift, and go to state 325
+
+
+State 241
+
+   11 func_type: "(" FUNC func_sig . ")"
+
+    ")"  shift, and go to state 326
+
+
+State 242
+
+   12 func_sig: func_sig_result .
+
+    $default  reduce using rule 12 (func_sig)
+
+
+State 243
+
+  168 type_def: "(" TYPE bind_var func_type ")" .
+
+    $default  reduce using rule 168 (type_def)
+
+
+State 244
+
+   10 global_type: "(" MUT . VALUE_TYPE ")"
+
+    VALUE_TYPE  shift, and go to state 327
+
+
+State 245
+
+  107 const_expr: instr_list .
+
+    $default  reduce using rule 107 (const_expr)
+
+
+State 246
+
+  149 global_fields: global_type const_expr .
+
+    $default  reduce using rule 149 (global_fields)
+
+
+State 247
+
+  148 global: "(" GLOBAL bind_var_opt global_fields ")" .
+
+    $default  reduce using rule 148 (global)
+
+
+State 248
+
+   10 global_type: "(" . MUT VALUE_TYPE ")"
+
+    MUT  shift, and go to state 244
+
+
+State 249
+
+  150 global_fields: inline_import global_type .
+
+    $default  reduce using rule 150 (global_fields)
+
+
+State 250
+
+  151 global_fields: inline_export global_fields .
+
+    $default  reduce using rule 151 (global_fields)
+
+
+State 251
+
+  140 table_fields: elem_type "(" . ELEM var_list ")"
+
+    ELEM  shift, and go to state 328
+
+
+State 252
+
+   17 table_sig: limits elem_type .
+
+    $default  reduce using rule 17 (table_sig)
+
+
+State 253
+
+   20 limits: nat nat .
+
+    $default  reduce using rule 20 (limits)
+
+
+State 254
+
+  136 table: "(" TABLE bind_var_opt table_fields ")" .
+
+    $default  reduce using rule 136 (table)
+
+
+State 255
+
+  138 table_fields: inline_import table_sig .
+
+    $default  reduce using rule 138 (table_fields)
+
+
+State 256
+
+  139 table_fields: inline_export table_fields .
+
+    $default  reduce using rule 139 (table_fields)
+
+
+State 257
+
+   82 expr1: BLOCK labeling_opt . block
+
+    "("             shift, and go to state 309
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 96
+    IF              shift, and go to state 97
+    LOOP            shift, and go to state 98
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+
+    $default  reduce using rule 103 (instr_list)
+
+    instr          go to state 125
+    plain_instr    go to state 126
+    block_instr    go to state 127
+    block_sig      go to state 310
+    block          go to state 329
+    expr           go to state 128
+    rethrow_check  go to state 129
+    throw_check    go to state 130
+    try_check      go to state 131
+    instr_list     go to state 312
+
+
+State 258
+
+   84 expr1: IF labeling_opt . if_block
+
+    "("  shift, and go to state 330
+
+    block_sig  go to state 331
+    expr       go to state 332
+    if_block   go to state 333
+    if_        go to state 334
+
+
+State 259
+
+   83 expr1: LOOP labeling_opt . block
+
+    "("             shift, and go to state 309
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 96
+    IF              shift, and go to state 97
+    LOOP            shift, and go to state 98
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+
+    $default  reduce using rule 103 (instr_list)
+
+    instr          go to state 125
+    plain_instr    go to state 126
+    block_instr    go to state 127
+    block_sig      go to state 310
+    block          go to state 335
+    expr           go to state 128
+    rethrow_check  go to state 129
+    throw_check    go to state 130
+    try_check      go to state 131
+    instr_list     go to state 312
+
+
+State 260
+
+  132 offset: "(" OFFSET const_expr . ")"
+
+    ")"  shift, and go to state 336
+
+
+State 261
+
+  106 expr_list: expr . expr_list
+
+    "("  shift, and go to state 228
+
+    $default  reduce using rule 105 (expr_list)
+
+    expr       go to state 261
+    expr_list  go to state 337
+
+
+State 262
+
+   81 expr1: plain_instr expr_list .
+
+    $default  reduce using rule 81 (expr1)
+
+
+State 263
+
+   80 expr: "(" expr1 ")" .
+
+    $default  reduce using rule 80 (expr)
+
+
+State 264
+
+   85 expr1: try_check labeling_opt . try_
+
+    "("             shift, and go to state 338
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 96
+    IF              shift, and go to state 97
+    LOOP            shift, and go to state 98
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+
+    instr           go to state 339
+    plain_instr     go to state 126
+    block_instr     go to state 127
+    block_sig       go to state 340
+    expr            go to state 128
+    try_            go to state 341
+    try_instr_list  go to state 342
+    catch_list      go to state 343
+    rethrow_check   go to state 129
+    throw_check     go to state 130
+    try_check       go to state 131
+
+
+State 265
+
+   29 var_list: var_list . var
+  134 elem: "(" ELEM var offset var_list . ")"
+
+    ")"  shift, and go to state 344
+    NAT  shift, and go to state 56
+    VAR  shift, and go to state 57
+
+    nat  go to state 58
+    var  go to state 267
+
+
+State 266
+
+  135 elem: "(" ELEM offset var_list ")" .
+
+    $default  reduce using rule 135 (elem)
+
+
+State 267
+
+   29 var_list: var_list var .
+
+    $default  reduce using rule 29 (var_list)
+
+
+State 268
+
+  147 memory_fields: "(" DATA . text_list_opt ")"
+
+    TEXT  shift, and go to state 176
+
+    $default  reduce using rule 3 (text_list_opt)
+
+    text_list      go to state 177
+    text_list_opt  go to state 345
+
+
+State 269
+
+  143 memory: "(" MEMORY bind_var_opt memory_fields ")" .
+
+    $default  reduce using rule 143 (memory)
+
+
+State 270
+
+  145 memory_fields: inline_import memory_sig .
+
+    $default  reduce using rule 145 (memory_fields)
+
+
+State 271
+
+  146 memory_fields: inline_export memory_fields .
+
+    $default  reduce using rule 146 (memory_fields)
+
+
+State 272
+
+  141 data: "(" DATA var offset text_list_opt . ")"
+
+    ")"  shift, and go to state 346
+
+
+State 273
+
+    2 text_list: text_list TEXT .
+
+    $default  reduce using rule 2 (text_list)
+
+
+State 274
+
+  142 data: "(" DATA offset text_list_opt ")" .
+
+    $default  reduce using rule 142 (data)
+
+
+State 275
+
+  108 exception: "(" . EXCEPT bind_var_opt value_type_list ")"
+  152 import_desc: "(" . FUNC bind_var_opt type_use ")"
+  153            | "(" . FUNC bind_var_opt func_sig ")"
+  154            | "(" . TABLE bind_var_opt table_sig ")"
+  155            | "(" . MEMORY bind_var_opt memory_sig ")"
+  156            | "(" . GLOBAL bind_var_opt global_type ")"
+
+    FUNC    shift, and go to state 347
+    GLOBAL  shift, and go to state 348
+    TABLE   shift, and go to state 349
+    MEMORY  shift, and go to state 350
+    EXCEPT  shift, and go to state 35
+
+
+State 276
+
+  157 import_desc: exception .
+
+    $default  reduce using rule 157 (import_desc)
+
+
+State 277
+
+  158 import: "(" IMPORT quoted_text quoted_text import_desc . ")"
+
+    ")"  shift, and go to state 351
+
+
+State 278
+
+  160 export_desc: "(" FUNC . var ")"
+
+    NAT  shift, and go to state 56
+    VAR  shift, and go to state 57
+
+    nat  go to state 58
+    var  go to state 352
+
+
+State 279
+
+  163 export_desc: "(" GLOBAL . var ")"
+
+    NAT  shift, and go to state 56
+    VAR  shift, and go to state 57
+
+    nat  go to state 58
+    var  go to state 353
+
+
+State 280
+
+  161 export_desc: "(" TABLE . var ")"
+
+    NAT  shift, and go to state 56
+    VAR  shift, and go to state 57
+
+    nat  go to state 58
+    var  go to state 354
+
+
+State 281
+
+  162 export_desc: "(" MEMORY . var ")"
+
+    NAT  shift, and go to state 56
+    VAR  shift, and go to state 57
+
+    nat  go to state 58
+    var  go to state 355
+
+
+State 282
+
+  164 export_desc: "(" EXCEPT . var ")"
+
+    NAT  shift, and go to state 56
+    VAR  shift, and go to state 57
+
+    nat  go to state 58
+    var  go to state 356
+
+
+State 283
+
+  165 export: "(" EXPORT quoted_text export_desc ")" .
+
+    $default  reduce using rule 165 (export)
+
+
+State 284
+
+  108 exception: "(" EXCEPT bind_var_opt value_type_list ")" .
+
+    $default  reduce using rule 108 (exception)
+
+
+State 285
+
+    7 value_type_list: value_type_list VALUE_TYPE .
+
+    $default  reduce using rule 7 (value_type_list)
+
+
+State 286
+
+    2 text_list: text_list . TEXT
+  190 script_module: "(" MODULE bind_var_opt BIN text_list . ")"
+
+    ")"   shift, and go to state 357
+    TEXT  shift, and go to state 273
+
+
+State 287
+
+    2 text_list: text_list . TEXT
+  191 script_module: "(" MODULE bind_var_opt QUOTE text_list . ")"
+
+    ")"   shift, and go to state 358
+    TEXT  shift, and go to state 273
+
+
+State 288
+
+  189 script_module: "(" MODULE bind_var_opt module_fields_opt ")" .
+
+    $default  reduce using rule 189 (script_module)
+
+
+State 289
+
+  206 cmd: "(" REGISTER quoted_text script_var_opt ")" .
+
+    $default  reduce using rule 206 (cmd)
+
+
+State 290
+
+  192 action: "(" INVOKE script_var_opt quoted_text const_list . ")"
+  211 const_list: const_list . const
+
+    "("  shift, and go to state 295
+    ")"  shift, and go to state 359
+
+    const  go to state 297
+
+
+State 291
+
+  193 action: "(" GET script_var_opt quoted_text ")" .
+
+    $default  reduce using rule 193 (action)
+
+
+State 292
+
+  194 assertion: "(" ASSERT_MALFORMED script_module quoted_text ")" .
+
+    $default  reduce using rule 194 (assertion)
+
+
+State 293
+
+  195 assertion: "(" ASSERT_INVALID script_module quoted_text ")" .
+
+    $default  reduce using rule 195 (assertion)
+
+
+State 294
+
+  196 assertion: "(" ASSERT_UNLINKABLE script_module quoted_text ")" .
+
+    $default  reduce using rule 196 (assertion)
+
+
+State 295
+
+  209 const: "(" . CONST literal ")"
+
+    CONST  shift, and go to state 360
+
+
+State 296
+
+  198 assertion: "(" ASSERT_RETURN action const_list ")" .
+
+    $default  reduce using rule 198 (assertion)
+
+
+State 297
+
+  211 const_list: const_list const .
+
+    $default  reduce using rule 211 (const_list)
+
+
+State 298
+
+  197 assertion: "(" ASSERT_TRAP script_module quoted_text ")" .
+
+    $default  reduce using rule 197 (assertion)
+
+
+State 299
+
+  201 assertion: "(" ASSERT_TRAP action quoted_text ")" .
+
+    $default  reduce using rule 201 (assertion)
+
+
+State 300
+
+  202 assertion: "(" ASSERT_EXHAUSTION action quoted_text ")" .
+
+    $default  reduce using rule 202 (assertion)
+
+
+State 301
+
+   21 type_use: "(" TYPE var . ")"
+
+    ")"  shift, and go to state 361
+
+
+State 302
+
+    7 value_type_list: value_type_list . VALUE_TYPE
+  124 func_fields_body1: "(" PARAM value_type_list . ")" func_fields_body1
+
+    ")"         shift, and go to state 362
+    VALUE_TYPE  shift, and go to state 285
+
+
+State 303
+
+  125 func_fields_body1: "(" PARAM bind_var . VALUE_TYPE ")" func_fields_body1
+
+    VALUE_TYPE  shift, and go to state 363
+
+
+State 304
+
+    7 value_type_list: value_type_list . VALUE_TYPE
+  127 func_result_body: "(" RESULT value_type_list . ")" func_result_body
+
+    ")"         shift, and go to state 364
+    VALUE_TYPE  shift, and go to state 285
+
+
+State 305
+
+    7 value_type_list: value_type_list . VALUE_TYPE
+  130 func_body1: "(" LOCAL value_type_list . ")" func_body1
+
+    ")"         shift, and go to state 365
+    VALUE_TYPE  shift, and go to state 285
+
+
+State 306
+
+  131 func_body1: "(" LOCAL bind_var . VALUE_TYPE ")" func_body1
+
+    VALUE_TYPE  shift, and go to state 366
+
+
+State 307
+
+  159 inline_import: "(" IMPORT quoted_text . quoted_text ")"
+
+    TEXT  shift, and go to state 72
+
+    quoted_text  go to state 367
+
+
+State 308
+
+  166 inline_export: "(" EXPORT quoted_text . ")"
+
+    ")"  shift, and go to state 368
+
+
+State 309
+
+   73 block_sig: "(" . RESULT value_type_list ")"
+   80 expr: "(" . expr1 ")"
+
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 160
+    IF              shift, and go to state 161
+    LOOP            shift, and go to state 162
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+    RESULT          shift, and go to state 369
+
+    plain_instr    go to state 164
+    expr1          go to state 165
+    rethrow_check  go to state 129
+    throw_check    go to state 130
+    try_check      go to state 166
+
+
+State 310
+
+   74 block: block_sig . block
+
+    "("             shift, and go to state 309
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 96
+    IF              shift, and go to state 97
+    LOOP            shift, and go to state 98
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+
+    $default  reduce using rule 103 (instr_list)
+
+    instr          go to state 125
+    plain_instr    go to state 126
+    block_instr    go to state 127
+    block_sig      go to state 310
+    block          go to state 370
+    expr           go to state 128
+    rethrow_check  go to state 129
+    throw_check    go to state 130
+    try_check      go to state 131
+    instr_list     go to state 312
+
+
+State 311
+
+   68 block_instr: BLOCK labeling_opt block . END labeling_opt
+
+    END  shift, and go to state 371
+
+
+State 312
+
+   75 block: instr_list .
+
+    $default  reduce using rule 75 (block)
+
+
+State 313
+
+   70 block_instr: IF labeling_opt block . END labeling_opt
+   71            | IF labeling_opt block . ELSE labeling_opt instr_list END labeling_opt
+
+    END   shift, and go to state 372
+    ELSE  shift, and go to state 373
+
+
+State 314
+
+   69 block_instr: LOOP labeling_opt block . END labeling_opt
+
+    END  shift, and go to state 374
+
+
+State 315
+
+   29 var_list: var_list var .
+   48 plain_instr: BR_TABLE var_list var .
+
+    NAT       reduce using rule 29 (var_list)
+    VAR       reduce using rule 29 (var_list)
+    $default  reduce using rule 48 (plain_instr)
+
+
+State 316
+
+   38 align_opt: ALIGN_EQ_NAT .
+
+    $default  reduce using rule 38 (align_opt)
+
+
+State 317
+
+   57 plain_instr: LOAD offset_opt align_opt .
+
+    $default  reduce using rule 57 (plain_instr)
+
+
+State 318
+
+   58 plain_instr: STORE offset_opt align_opt .
+
+    $default  reduce using rule 58 (plain_instr)
+
+
+State 319
+
+   72 block_instr: try_check labeling_opt block . catch_instr_list END labeling_opt
+
+    CATCH      shift, and go to state 375
+    CATCH_ALL  shift, and go to state 376
+
+    catch_instr       go to state 377
+    catch_instr_list  go to state 378
+
+
+State 320
+
+  118 func_fields_import1: "(" PARAM . value_type_list ")" func_fields_import1
+  119                    | "(" PARAM . bind_var VALUE_TYPE ")" func_fields_import1
+
+    VAR  shift, and go to state 53
+
+    $default  reduce using rule 6 (value_type_list)
+
+    value_type_list  go to state 379
+    bind_var         go to state 380
+
+
+State 321
+
+  121 func_fields_import_result: "(" RESULT . value_type_list ")" func_fields_import_result
+
+    $default  reduce using rule 6 (value_type_list)
+
+    value_type_list  go to state 381
+
+
+State 322
+
+  118 func_fields_import1: "(" . PARAM value_type_list ")" func_fields_import1
+  119                    | "(" . PARAM bind_var VALUE_TYPE ")" func_fields_import1
+  121 func_fields_import_result: "(" . RESULT value_type_list ")" func_fields_import_result
+
+    PARAM   shift, and go to state 320
+    RESULT  shift, and go to state 321
+
+
+State 323
+
+  113 func_fields: inline_import type_use func_fields_import .
+
+    $default  reduce using rule 113 (func_fields)
+
+
+State 324
+
+   13 func_sig: "(" PARAM . value_type_list ")" func_sig
+   14         | "(" PARAM . bind_var VALUE_TYPE ")" func_sig
+
+    VAR  shift, and go to state 53
+
+    $default  reduce using rule 6 (value_type_list)
+
+    value_type_list  go to state 382
+    bind_var         go to state 383
+
+
+State 325
+
+   16 func_sig_result: "(" RESULT . value_type_list ")" func_sig_result
+
+    $default  reduce using rule 6 (value_type_list)
+
+    value_type_list  go to state 384
+
+
+State 326
+
+   11 func_type: "(" FUNC func_sig ")" .
+
+    $default  reduce using rule 11 (func_type)
+
+
+State 327
+
+   10 global_type: "(" MUT VALUE_TYPE . ")"
+
+    ")"  shift, and go to state 385
+
+
+State 328
+
+  140 table_fields: elem_type "(" ELEM . var_list ")"
+
+    $default  reduce using rule 28 (var_list)
+
+    var_list  go to state 386
+
+
+State 329
+
+   82 expr1: BLOCK labeling_opt block .
+
+    $default  reduce using rule 82 (expr1)
+
+
+State 330
+
+   73 block_sig: "(" . RESULT value_type_list ")"
+   80 expr: "(" . expr1 ")"
+   94 if_: "(" . THEN instr_list ")" "(" ELSE instr_list ")"
+   95    | "(" . THEN instr_list ")"
+
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 160
+    IF              shift, and go to state 161
+    THEN            shift, and go to state 387
+    LOOP            shift, and go to state 162
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+    RESULT          shift, and go to state 369
+
+    plain_instr    go to state 164
+    expr1          go to state 165
+    rethrow_check  go to state 129
+    throw_check    go to state 130
+    try_check      go to state 166
+
+
+State 331
+
+   92 if_block: block_sig . if_block
+
+    "("  shift, and go to state 330
+
+    block_sig  go to state 331
+    expr       go to state 332
+    if_block   go to state 388
+    if_        go to state 334
+
+
+State 332
+
+   96 if_: expr . "(" THEN instr_list ")" "(" ELSE instr_list ")"
+   97    | expr . "(" THEN instr_list ")"
+   98    | expr . expr expr
+   99    | expr . expr
+
+    "("  shift, and go to state 389
+
+    expr  go to state 390
+
+
+State 333
+
+   84 expr1: IF labeling_opt if_block .
+
+    $default  reduce using rule 84 (expr1)
+
+
+State 334
+
+   93 if_block: if_ .
+
+    $default  reduce using rule 93 (if_block)
+
+
+State 335
+
+   83 expr1: LOOP labeling_opt block .
+
+    $default  reduce using rule 83 (expr1)
+
+
+State 336
+
+  132 offset: "(" OFFSET const_expr ")" .
+
+    $default  reduce using rule 132 (offset)
+
+
+State 337
+
+  106 expr_list: expr expr_list .
+
+    $default  reduce using rule 106 (expr_list)
+
+
+State 338
+
+   73 block_sig: "(" . RESULT value_type_list ")"
+   80 expr: "(" . expr1 ")"
+   90 catch_list: "(" . catch_instr ")"
+   91           | "(" . catch_instr ")" catch_list
+
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 160
+    IF              shift, and go to state 161
+    LOOP            shift, and go to state 162
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    CATCH           shift, and go to state 375
+    CATCH_ALL       shift, and go to state 376
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+    RESULT          shift, and go to state 369
+
+    plain_instr    go to state 164
+    catch_instr    go to state 391
+    expr1          go to state 165
+    rethrow_check  go to state 129
+    throw_check    go to state 130
+    try_check      go to state 166
+
+
+State 339
+
+   89 try_instr_list: instr . try_instr_list
+
+    "("             shift, and go to state 392
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 96
+    IF              shift, and go to state 97
+    LOOP            shift, and go to state 98
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+
+    instr           go to state 339
+    plain_instr     go to state 126
+    block_instr     go to state 127
+    expr            go to state 128
+    try_instr_list  go to state 393
+    catch_list      go to state 343
+    rethrow_check   go to state 129
+    throw_check     go to state 130
+    try_check       go to state 131
+
+
+State 340
+
+   86 try_: block_sig . try_
+
+    "("             shift, and go to state 338
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 96
+    IF              shift, and go to state 97
+    LOOP            shift, and go to state 98
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+
+    instr           go to state 339
+    plain_instr     go to state 126
+    block_instr     go to state 127
+    block_sig       go to state 340
+    expr            go to state 128
+    try_            go to state 394
+    try_instr_list  go to state 342
+    catch_list      go to state 343
+    rethrow_check   go to state 129
+    throw_check     go to state 130
+    try_check       go to state 131
+
+
+State 341
+
+   85 expr1: try_check labeling_opt try_ .
+
+    $default  reduce using rule 85 (expr1)
+
+
+State 342
+
+   87 try_: try_instr_list .
+
+    $default  reduce using rule 87 (try_)
+
+
+State 343
+
+   88 try_instr_list: catch_list .
+
+    $default  reduce using rule 88 (try_instr_list)
+
+
+State 344
+
+  134 elem: "(" ELEM var offset var_list ")" .
+
+    $default  reduce using rule 134 (elem)
+
+
+State 345
+
+  147 memory_fields: "(" DATA text_list_opt . ")"
+
+    ")"  shift, and go to state 395
+
+
+State 346
+
+  141 data: "(" DATA var offset text_list_opt ")" .
+
+    $default  reduce using rule 141 (data)
+
+
+State 347
+
+  152 import_desc: "(" FUNC . bind_var_opt type_use ")"
+  153            | "(" FUNC . bind_var_opt func_sig ")"
+
+    VAR  shift, and go to state 53
+
+    $default  reduce using rule 30 (bind_var_opt)
+
+    bind_var_opt  go to state 396
+    bind_var      go to state 55
+
+
+State 348
+
+  156 import_desc: "(" GLOBAL . bind_var_opt global_type ")"
+
+    VAR  shift, and go to state 53
+
+    $default  reduce using rule 30 (bind_var_opt)
+
+    bind_var_opt  go to state 397
+    bind_var      go to state 55
+
+
+State 349
+
+  154 import_desc: "(" TABLE . bind_var_opt table_sig ")"
+
+    VAR  shift, and go to state 53
+
+    $default  reduce using rule 30 (bind_var_opt)
+
+    bind_var_opt  go to state 398
+    bind_var      go to state 55
+
+
+State 350
+
+  155 import_desc: "(" MEMORY . bind_var_opt memory_sig ")"
+
+    VAR  shift, and go to state 53
+
+    $default  reduce using rule 30 (bind_var_opt)
+
+    bind_var_opt  go to state 399
+    bind_var      go to state 55
+
+
+State 351
+
+  158 import: "(" IMPORT quoted_text quoted_text import_desc ")" .
+
+    $default  reduce using rule 158 (import)
+
+
+State 352
+
+  160 export_desc: "(" FUNC var . ")"
+
+    ")"  shift, and go to state 400
+
+
+State 353
+
+  163 export_desc: "(" GLOBAL var . ")"
+
+    ")"  shift, and go to state 401
+
+
+State 354
+
+  161 export_desc: "(" TABLE var . ")"
+
+    ")"  shift, and go to state 402
+
+
+State 355
+
+  162 export_desc: "(" MEMORY var . ")"
+
+    ")"  shift, and go to state 403
+
+
+State 356
+
+  164 export_desc: "(" EXCEPT var . ")"
+
+    ")"  shift, and go to state 404
+
+
+State 357
+
+  190 script_module: "(" MODULE bind_var_opt BIN text_list ")" .
+
+    $default  reduce using rule 190 (script_module)
+
+
+State 358
+
+  191 script_module: "(" MODULE bind_var_opt QUOTE text_list ")" .
+
+    $default  reduce using rule 191 (script_module)
+
+
+State 359
+
+  192 action: "(" INVOKE script_var_opt quoted_text const_list ")" .
+
+    $default  reduce using rule 192 (action)
+
+
+State 360
+
+  209 const: "(" CONST . literal ")"
+
+    NAT    shift, and go to state 222
+    INT    shift, and go to state 223
+    FLOAT  shift, and go to state 224
+
+    literal  go to state 405
+
+
+State 361
+
+   21 type_use: "(" TYPE var ")" .
+
+    $default  reduce using rule 21 (type_use)
+
+
+State 362
+
+  124 func_fields_body1: "(" PARAM value_type_list ")" . func_fields_body1
+
+    "("             shift, and go to state 226
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 96
+    IF              shift, and go to state 97
+    LOOP            shift, and go to state 98
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+
+    $default  reduce using rule 103 (instr_list)
+
+    instr              go to state 125
+    plain_instr        go to state 126
+    block_instr        go to state 127
+    expr               go to state 128
+    rethrow_check      go to state 129
+    throw_check        go to state 130
+    try_check          go to state 131
+    instr_list         go to state 132
+    func_fields_body1  go to state 406
+    func_result_body   go to state 136
+    func_body          go to state 137
+    func_body1         go to state 138
+
+
+State 363
+
+  125 func_fields_body1: "(" PARAM bind_var VALUE_TYPE . ")" func_fields_body1
+
+    ")"  shift, and go to state 407
+
+
+State 364
+
+  127 func_result_body: "(" RESULT value_type_list ")" . func_result_body
+
+    "("             shift, and go to state 408
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 96
+    IF              shift, and go to state 97
+    LOOP            shift, and go to state 98
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+
+    $default  reduce using rule 103 (instr_list)
+
+    instr             go to state 125
+    plain_instr       go to state 126
+    block_instr       go to state 127
+    expr              go to state 128
+    rethrow_check     go to state 129
+    throw_check       go to state 130
+    try_check         go to state 131
+    instr_list        go to state 132
+    func_result_body  go to state 409
+    func_body         go to state 137
+    func_body1        go to state 138
+
+
+State 365
+
+  130 func_body1: "(" LOCAL value_type_list ")" . func_body1
+
+    "("             shift, and go to state 410
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 96
+    IF              shift, and go to state 97
+    LOOP            shift, and go to state 98
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+
+    $default  reduce using rule 103 (instr_list)
+
+    instr          go to state 125
+    plain_instr    go to state 126
+    block_instr    go to state 127
+    expr           go to state 128
+    rethrow_check  go to state 129
+    throw_check    go to state 130
+    try_check      go to state 131
+    instr_list     go to state 132
+    func_body1     go to state 411
+
+
+State 366
+
+  131 func_body1: "(" LOCAL bind_var VALUE_TYPE . ")" func_body1
+
+    ")"  shift, and go to state 412
+
+
+State 367
+
+  159 inline_import: "(" IMPORT quoted_text quoted_text . ")"
+
+    ")"  shift, and go to state 413
+
+
+State 368
+
+  166 inline_export: "(" EXPORT quoted_text ")" .
+
+    $default  reduce using rule 166 (inline_export)
+
+
+State 369
+
+   73 block_sig: "(" RESULT . value_type_list ")"
+
+    $default  reduce using rule 6 (value_type_list)
+
+    value_type_list  go to state 414
+
+
+State 370
+
+   74 block: block_sig block .
+
+    $default  reduce using rule 74 (block)
+
+
+State 371
+
+   68 block_instr: BLOCK labeling_opt block END . labeling_opt
+
+    VAR  shift, and go to state 53
+
+    $default  reduce using rule 33 (labeling_opt)
+
+    bind_var      go to state 205
+    labeling_opt  go to state 415
+
+
+State 372
+
+   70 block_instr: IF labeling_opt block END . labeling_opt
+
+    VAR  shift, and go to state 53
+
+    $default  reduce using rule 33 (labeling_opt)
+
+    bind_var      go to state 205
+    labeling_opt  go to state 416
+
+
+State 373
+
+   71 block_instr: IF labeling_opt block ELSE . labeling_opt instr_list END labeling_opt
+
+    VAR  shift, and go to state 53
+
+    $default  reduce using rule 33 (labeling_opt)
+
+    bind_var      go to state 205
+    labeling_opt  go to state 417
+
+
+State 374
+
+   69 block_instr: LOOP labeling_opt block END . labeling_opt
+
+    VAR  shift, and go to state 53
+
+    $default  reduce using rule 33 (labeling_opt)
+
+    bind_var      go to state 205
+    labeling_opt  go to state 418
+
+
+State 375
+
+   76 catch_instr: CATCH . var instr_list
+
+    NAT  shift, and go to state 56
+    VAR  shift, and go to state 57
+
+    nat  go to state 58
+    var  go to state 419
+
+
+State 376
+
+   77 catch_instr: CATCH_ALL . instr_list
+
+    "("             shift, and go to state 228
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 96
+    IF              shift, and go to state 97
+    LOOP            shift, and go to state 98
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+
+    $default  reduce using rule 103 (instr_list)
+
+    instr          go to state 125
+    plain_instr    go to state 126
+    block_instr    go to state 127
+    expr           go to state 128
+    rethrow_check  go to state 129
+    throw_check    go to state 130
+    try_check      go to state 131
+    instr_list     go to state 420
+
+
+State 377
+
+   78 catch_instr_list: catch_instr .
+   79                 | catch_instr . catch_instr_list
+
+    CATCH      shift, and go to state 375
+    CATCH_ALL  shift, and go to state 376
+
+    $default  reduce using rule 78 (catch_instr_list)
+
+    catch_instr       go to state 377
+    catch_instr_list  go to state 421
+
+
+State 378
+
+   72 block_instr: try_check labeling_opt block catch_instr_list . END labeling_opt
+
+    END  shift, and go to state 422
+
+
+State 379
+
+    7 value_type_list: value_type_list . VALUE_TYPE
+  118 func_fields_import1: "(" PARAM value_type_list . ")" func_fields_import1
+
+    ")"         shift, and go to state 423
+    VALUE_TYPE  shift, and go to state 285
+
+
+State 380
+
+  119 func_fields_import1: "(" PARAM bind_var . VALUE_TYPE ")" func_fields_import1
+
+    VALUE_TYPE  shift, and go to state 424
+
+
+State 381
+
+    7 value_type_list: value_type_list . VALUE_TYPE
+  121 func_fields_import_result: "(" RESULT value_type_list . ")" func_fields_import_result
+
+    ")"         shift, and go to state 425
+    VALUE_TYPE  shift, and go to state 285
+
+
+State 382
+
+    7 value_type_list: value_type_list . VALUE_TYPE
+   13 func_sig: "(" PARAM value_type_list . ")" func_sig
+
+    ")"         shift, and go to state 426
+    VALUE_TYPE  shift, and go to state 285
+
+
+State 383
+
+   14 func_sig: "(" PARAM bind_var . VALUE_TYPE ")" func_sig
+
+    VALUE_TYPE  shift, and go to state 427
+
+
+State 384
+
+    7 value_type_list: value_type_list . VALUE_TYPE
+   16 func_sig_result: "(" RESULT value_type_list . ")" func_sig_result
+
+    ")"         shift, and go to state 428
+    VALUE_TYPE  shift, and go to state 285
+
+
+State 385
+
+   10 global_type: "(" MUT VALUE_TYPE ")" .
+
+    $default  reduce using rule 10 (global_type)
+
+
+State 386
+
+   29 var_list: var_list . var
+  140 table_fields: elem_type "(" ELEM var_list . ")"
+
+    ")"  shift, and go to state 429
+    NAT  shift, and go to state 56
+    VAR  shift, and go to state 57
+
+    nat  go to state 58
+    var  go to state 267
+
+
+State 387
+
+   94 if_: "(" THEN . instr_list ")" "(" ELSE instr_list ")"
+   95    | "(" THEN . instr_list ")"
+
+    "("             shift, and go to state 228
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 96
+    IF              shift, and go to state 97
+    LOOP            shift, and go to state 98
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+
+    $default  reduce using rule 103 (instr_list)
+
+    instr          go to state 125
+    plain_instr    go to state 126
+    block_instr    go to state 127
+    expr           go to state 128
+    rethrow_check  go to state 129
+    throw_check    go to state 130
+    try_check      go to state 131
+    instr_list     go to state 430
+
+
+State 388
+
+   92 if_block: block_sig if_block .
+
+    $default  reduce using rule 92 (if_block)
+
+
+State 389
+
+   80 expr: "(" . expr1 ")"
+   96 if_: expr "(" . THEN instr_list ")" "(" ELSE instr_list ")"
+   97    | expr "(" . THEN instr_list ")"
+
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 160
+    IF              shift, and go to state 161
+    THEN            shift, and go to state 431
+    LOOP            shift, and go to state 162
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+
+    plain_instr    go to state 164
+    expr1          go to state 165
+    rethrow_check  go to state 129
+    throw_check    go to state 130
+    try_check      go to state 166
+
+
+State 390
+
+   98 if_: expr expr . expr
+   99    | expr expr .
+
+    "("  shift, and go to state 228
+
+    $default  reduce using rule 99 (if_)
+
+    expr  go to state 432
+
+
+State 391
+
+   90 catch_list: "(" catch_instr . ")"
+   91           | "(" catch_instr . ")" catch_list
+
+    ")"  shift, and go to state 433
+
+
+State 392
+
+   80 expr: "(" . expr1 ")"
+   90 catch_list: "(" . catch_instr ")"
+   91           | "(" . catch_instr ")" catch_list
+
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 160
+    IF              shift, and go to state 161
+    LOOP            shift, and go to state 162
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    CATCH           shift, and go to state 375
+    CATCH_ALL       shift, and go to state 376
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+
+    plain_instr    go to state 164
+    catch_instr    go to state 391
+    expr1          go to state 165
+    rethrow_check  go to state 129
+    throw_check    go to state 130
+    try_check      go to state 166
+
+
+State 393
+
+   89 try_instr_list: instr try_instr_list .
+
+    $default  reduce using rule 89 (try_instr_list)
+
+
+State 394
+
+   86 try_: block_sig try_ .
+
+    $default  reduce using rule 86 (try_)
+
+
+State 395
+
+  147 memory_fields: "(" DATA text_list_opt ")" .
+
+    $default  reduce using rule 147 (memory_fields)
+
+
+State 396
+
+  152 import_desc: "(" FUNC bind_var_opt . type_use ")"
+  153            | "(" FUNC bind_var_opt . func_sig ")"
+
+    "("  shift, and go to state 434
+
+    $default  reduce using rule 15 (func_sig_result)
+
+    func_sig         go to state 435
+    func_sig_result  go to state 242
+    type_use         go to state 436
+
+
+State 397
+
+  156 import_desc: "(" GLOBAL bind_var_opt . global_type ")"
+
+    "("         shift, and go to state 248
+    VALUE_TYPE  shift, and go to state 146
+
+    global_type  go to state 437
+
+
+State 398
+
+  154 import_desc: "(" TABLE bind_var_opt . table_sig ")"
+
+    NAT  shift, and go to state 56
+
+    table_sig  go to state 438
+    limits     go to state 155
+    nat        go to state 156
+
+
+State 399
+
+  155 import_desc: "(" MEMORY bind_var_opt . memory_sig ")"
+
+    NAT  shift, and go to state 56
+
+    memory_sig  go to state 439
+    limits      go to state 171
+    nat         go to state 156
+
+
+State 400
+
+  160 export_desc: "(" FUNC var ")" .
+
+    $default  reduce using rule 160 (export_desc)
+
+
+State 401
+
+  163 export_desc: "(" GLOBAL var ")" .
+
+    $default  reduce using rule 163 (export_desc)
+
+
+State 402
+
+  161 export_desc: "(" TABLE var ")" .
+
+    $default  reduce using rule 161 (export_desc)
+
+
+State 403
+
+  162 export_desc: "(" MEMORY var ")" .
+
+    $default  reduce using rule 162 (export_desc)
+
+
+State 404
+
+  164 export_desc: "(" EXCEPT var ")" .
+
+    $default  reduce using rule 164 (export_desc)
+
+
+State 405
+
+  209 const: "(" CONST literal . ")"
+
+    ")"  shift, and go to state 440
+
+
+State 406
+
+  124 func_fields_body1: "(" PARAM value_type_list ")" func_fields_body1 .
+
+    $default  reduce using rule 124 (func_fields_body1)
+
+
+State 407
+
+  125 func_fields_body1: "(" PARAM bind_var VALUE_TYPE ")" . func_fields_body1
+
+    "("             shift, and go to state 226
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 96
+    IF              shift, and go to state 97
+    LOOP            shift, and go to state 98
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+
+    $default  reduce using rule 103 (instr_list)
+
+    instr              go to state 125
+    plain_instr        go to state 126
+    block_instr        go to state 127
+    expr               go to state 128
+    rethrow_check      go to state 129
+    throw_check        go to state 130
+    try_check          go to state 131
+    instr_list         go to state 132
+    func_fields_body1  go to state 441
+    func_result_body   go to state 136
+    func_body          go to state 137
+    func_body1         go to state 138
+
+
+State 408
+
+   80 expr: "(" . expr1 ")"
+  127 func_result_body: "(" . RESULT value_type_list ")" func_result_body
+  130 func_body1: "(" . LOCAL value_type_list ")" func_body1
+  131           | "(" . LOCAL bind_var VALUE_TYPE ")" func_body1
+
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 160
+    IF              shift, and go to state 161
+    LOOP            shift, and go to state 162
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+    RESULT          shift, and go to state 201
+    LOCAL           shift, and go to state 202
+
+    plain_instr    go to state 164
+    expr1          go to state 165
+    rethrow_check  go to state 129
+    throw_check    go to state 130
+    try_check      go to state 166
+
+
+State 409
+
+  127 func_result_body: "(" RESULT value_type_list ")" func_result_body .
+
+    $default  reduce using rule 127 (func_result_body)
+
+
+State 410
+
+   80 expr: "(" . expr1 ")"
+  130 func_body1: "(" . LOCAL value_type_list ")" func_body1
+  131           | "(" . LOCAL bind_var VALUE_TYPE ")" func_body1
+
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 160
+    IF              shift, and go to state 161
+    LOOP            shift, and go to state 162
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+    LOCAL           shift, and go to state 202
+
+    plain_instr    go to state 164
+    expr1          go to state 165
+    rethrow_check  go to state 129
+    throw_check    go to state 130
+    try_check      go to state 166
+
+
+State 411
+
+  130 func_body1: "(" LOCAL value_type_list ")" func_body1 .
+
+    $default  reduce using rule 130 (func_body1)
+
+
+State 412
+
+  131 func_body1: "(" LOCAL bind_var VALUE_TYPE ")" . func_body1
+
+    "("             shift, and go to state 410
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 96
+    IF              shift, and go to state 97
+    LOOP            shift, and go to state 98
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+
+    $default  reduce using rule 103 (instr_list)
+
+    instr          go to state 125
+    plain_instr    go to state 126
+    block_instr    go to state 127
+    expr           go to state 128
+    rethrow_check  go to state 129
+    throw_check    go to state 130
+    try_check      go to state 131
+    instr_list     go to state 132
+    func_body1     go to state 442
+
+
+State 413
+
+  159 inline_import: "(" IMPORT quoted_text quoted_text ")" .
+
+    $default  reduce using rule 159 (inline_import)
+
+
+State 414
+
+    7 value_type_list: value_type_list . VALUE_TYPE
+   73 block_sig: "(" RESULT value_type_list . ")"
+
+    ")"         shift, and go to state 443
+    VALUE_TYPE  shift, and go to state 285
+
+
+State 415
+
+   68 block_instr: BLOCK labeling_opt block END labeling_opt .
+
+    $default  reduce using rule 68 (block_instr)
+
+
+State 416
+
+   70 block_instr: IF labeling_opt block END labeling_opt .
+
+    $default  reduce using rule 70 (block_instr)
+
+
+State 417
+
+   71 block_instr: IF labeling_opt block ELSE labeling_opt . instr_list END labeling_opt
+
+    "("             shift, and go to state 228
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 96
+    IF              shift, and go to state 97
+    LOOP            shift, and go to state 98
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+
+    $default  reduce using rule 103 (instr_list)
+
+    instr          go to state 125
+    plain_instr    go to state 126
+    block_instr    go to state 127
+    expr           go to state 128
+    rethrow_check  go to state 129
+    throw_check    go to state 130
+    try_check      go to state 131
+    instr_list     go to state 444
+
+
+State 418
+
+   69 block_instr: LOOP labeling_opt block END labeling_opt .
+
+    $default  reduce using rule 69 (block_instr)
+
+
+State 419
+
+   76 catch_instr: CATCH var . instr_list
+
+    "("             shift, and go to state 228
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 96
+    IF              shift, and go to state 97
+    LOOP            shift, and go to state 98
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+
+    $default  reduce using rule 103 (instr_list)
+
+    instr          go to state 125
+    plain_instr    go to state 126
+    block_instr    go to state 127
+    expr           go to state 128
+    rethrow_check  go to state 129
+    throw_check    go to state 130
+    try_check      go to state 131
+    instr_list     go to state 445
+
+
+State 420
+
+   77 catch_instr: CATCH_ALL instr_list .
+
+    $default  reduce using rule 77 (catch_instr)
+
+
+State 421
+
+   79 catch_instr_list: catch_instr catch_instr_list .
+
+    $default  reduce using rule 79 (catch_instr_list)
+
+
+State 422
+
+   72 block_instr: try_check labeling_opt block catch_instr_list END . labeling_opt
+
+    VAR  shift, and go to state 53
+
+    $default  reduce using rule 33 (labeling_opt)
+
+    bind_var      go to state 205
+    labeling_opt  go to state 446
+
+
+State 423
+
+  118 func_fields_import1: "(" PARAM value_type_list ")" . func_fields_import1
+
+    "("  shift, and go to state 322
+
+    $default  reduce using rule 120 (func_fields_import_result)
+
+    func_fields_import1        go to state 447
+    func_fields_import_result  go to state 238
+
+
+State 424
+
+  119 func_fields_import1: "(" PARAM bind_var VALUE_TYPE . ")" func_fields_import1
+
+    ")"  shift, and go to state 448
+
+
+State 425
+
+  121 func_fields_import_result: "(" RESULT value_type_list ")" . func_fields_import_result
+
+    "("  shift, and go to state 449
+
+    $default  reduce using rule 120 (func_fields_import_result)
+
+    func_fields_import_result  go to state 450
+
+
+State 426
+
+   13 func_sig: "(" PARAM value_type_list ")" . func_sig
+
+    "("  shift, and go to state 240
+
+    $default  reduce using rule 15 (func_sig_result)
+
+    func_sig         go to state 451
+    func_sig_result  go to state 242
+
+
+State 427
+
+   14 func_sig: "(" PARAM bind_var VALUE_TYPE . ")" func_sig
+
+    ")"  shift, and go to state 452
+
+
+State 428
+
+   16 func_sig_result: "(" RESULT value_type_list ")" . func_sig_result
+
+    "("  shift, and go to state 453
+
+    $default  reduce using rule 15 (func_sig_result)
+
+    func_sig_result  go to state 454
+
+
+State 429
+
+  140 table_fields: elem_type "(" ELEM var_list ")" .
+
+    $default  reduce using rule 140 (table_fields)
+
+
+State 430
+
+   94 if_: "(" THEN instr_list . ")" "(" ELSE instr_list ")"
+   95    | "(" THEN instr_list . ")"
+
+    ")"  shift, and go to state 455
+
+
+State 431
+
+   96 if_: expr "(" THEN . instr_list ")" "(" ELSE instr_list ")"
+   97    | expr "(" THEN . instr_list ")"
+
+    "("             shift, and go to state 228
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 96
+    IF              shift, and go to state 97
+    LOOP            shift, and go to state 98
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+
+    $default  reduce using rule 103 (instr_list)
+
+    instr          go to state 125
+    plain_instr    go to state 126
+    block_instr    go to state 127
+    expr           go to state 128
+    rethrow_check  go to state 129
+    throw_check    go to state 130
+    try_check      go to state 131
+    instr_list     go to state 456
+
+
+State 432
+
+   98 if_: expr expr expr .
+
+    $default  reduce using rule 98 (if_)
+
+
+State 433
+
+   90 catch_list: "(" catch_instr ")" .
+   91           | "(" catch_instr ")" . catch_list
+
+    "("  shift, and go to state 457
+
+    $default  reduce using rule 90 (catch_list)
+
+    catch_list  go to state 458
+
+
+State 434
+
+   13 func_sig: "(" . PARAM value_type_list ")" func_sig
+   14         | "(" . PARAM bind_var VALUE_TYPE ")" func_sig
+   16 func_sig_result: "(" . RESULT value_type_list ")" func_sig_result
+   21 type_use: "(" . TYPE var ")"
+
+    TYPE    shift, and go to state 199
+    PARAM   shift, and go to state 324
+    RESULT  shift, and go to state 325
+
+
+State 435
+
+  153 import_desc: "(" FUNC bind_var_opt func_sig . ")"
+
+    ")"  shift, and go to state 459
+
+
+State 436
+
+  152 import_desc: "(" FUNC bind_var_opt type_use . ")"
+
+    ")"  shift, and go to state 460
+
+
+State 437
+
+  156 import_desc: "(" GLOBAL bind_var_opt global_type . ")"
+
+    ")"  shift, and go to state 461
+
+
+State 438
+
+  154 import_desc: "(" TABLE bind_var_opt table_sig . ")"
+
+    ")"  shift, and go to state 462
+
+
+State 439
+
+  155 import_desc: "(" MEMORY bind_var_opt memory_sig . ")"
+
+    ")"  shift, and go to state 463
+
+
+State 440
+
+  209 const: "(" CONST literal ")" .
+
+    $default  reduce using rule 209 (const)
+
+
+State 441
+
+  125 func_fields_body1: "(" PARAM bind_var VALUE_TYPE ")" func_fields_body1 .
+
+    $default  reduce using rule 125 (func_fields_body1)
+
+
+State 442
+
+  131 func_body1: "(" LOCAL bind_var VALUE_TYPE ")" func_body1 .
+
+    $default  reduce using rule 131 (func_body1)
+
+
+State 443
+
+   73 block_sig: "(" RESULT value_type_list ")" .
+
+    $default  reduce using rule 73 (block_sig)
+
+
+State 444
+
+   71 block_instr: IF labeling_opt block ELSE labeling_opt instr_list . END labeling_opt
+
+    END  shift, and go to state 464
+
+
+State 445
+
+   76 catch_instr: CATCH var instr_list .
+
+    $default  reduce using rule 76 (catch_instr)
+
+
+State 446
+
+   72 block_instr: try_check labeling_opt block catch_instr_list END labeling_opt .
+
+    $default  reduce using rule 72 (block_instr)
+
+
+State 447
+
+  118 func_fields_import1: "(" PARAM value_type_list ")" func_fields_import1 .
+
+    $default  reduce using rule 118 (func_fields_import1)
+
+
+State 448
+
+  119 func_fields_import1: "(" PARAM bind_var VALUE_TYPE ")" . func_fields_import1
+
+    "("  shift, and go to state 322
+
+    $default  reduce using rule 120 (func_fields_import_result)
+
+    func_fields_import1        go to state 465
+    func_fields_import_result  go to state 238
+
+
+State 449
+
+  121 func_fields_import_result: "(" . RESULT value_type_list ")" func_fields_import_result
+
+    RESULT  shift, and go to state 321
+
+
+State 450
+
+  121 func_fields_import_result: "(" RESULT value_type_list ")" func_fields_import_result .
+
+    $default  reduce using rule 121 (func_fields_import_result)
+
+
+State 451
+
+   13 func_sig: "(" PARAM value_type_list ")" func_sig .
+
+    $default  reduce using rule 13 (func_sig)
+
+
+State 452
+
+   14 func_sig: "(" PARAM bind_var VALUE_TYPE ")" . func_sig
+
+    "("  shift, and go to state 240
+
+    $default  reduce using rule 15 (func_sig_result)
+
+    func_sig         go to state 466
+    func_sig_result  go to state 242
+
+
+State 453
+
+   16 func_sig_result: "(" . RESULT value_type_list ")" func_sig_result
+
+    RESULT  shift, and go to state 325
+
+
+State 454
+
+   16 func_sig_result: "(" RESULT value_type_list ")" func_sig_result .
+
+    $default  reduce using rule 16 (func_sig_result)
+
+
+State 455
+
+   94 if_: "(" THEN instr_list ")" . "(" ELSE instr_list ")"
+   95    | "(" THEN instr_list ")" .
+
+    "("  shift, and go to state 467
+
+    $default  reduce using rule 95 (if_)
+
+
+State 456
+
+   96 if_: expr "(" THEN instr_list . ")" "(" ELSE instr_list ")"
+   97    | expr "(" THEN instr_list . ")"
+
+    ")"  shift, and go to state 468
+
+
+State 457
+
+   90 catch_list: "(" . catch_instr ")"
+   91           | "(" . catch_instr ")" catch_list
+
+    CATCH      shift, and go to state 375
+    CATCH_ALL  shift, and go to state 376
+
+    catch_instr  go to state 391
+
+
+State 458
+
+   91 catch_list: "(" catch_instr ")" catch_list .
+
+    $default  reduce using rule 91 (catch_list)
+
+
+State 459
+
+  153 import_desc: "(" FUNC bind_var_opt func_sig ")" .
+
+    $default  reduce using rule 153 (import_desc)
+
+
+State 460
+
+  152 import_desc: "(" FUNC bind_var_opt type_use ")" .
+
+    $default  reduce using rule 152 (import_desc)
+
+
+State 461
+
+  156 import_desc: "(" GLOBAL bind_var_opt global_type ")" .
+
+    $default  reduce using rule 156 (import_desc)
+
+
+State 462
+
+  154 import_desc: "(" TABLE bind_var_opt table_sig ")" .
+
+    $default  reduce using rule 154 (import_desc)
+
+
+State 463
+
+  155 import_desc: "(" MEMORY bind_var_opt memory_sig ")" .
+
+    $default  reduce using rule 155 (import_desc)
+
+
+State 464
+
+   71 block_instr: IF labeling_opt block ELSE labeling_opt instr_list END . labeling_opt
+
+    VAR  shift, and go to state 53
+
+    $default  reduce using rule 33 (labeling_opt)
+
+    bind_var      go to state 205
+    labeling_opt  go to state 469
+
+
+State 465
+
+  119 func_fields_import1: "(" PARAM bind_var VALUE_TYPE ")" func_fields_import1 .
+
+    $default  reduce using rule 119 (func_fields_import1)
+
+
+State 466
+
+   14 func_sig: "(" PARAM bind_var VALUE_TYPE ")" func_sig .
+
+    $default  reduce using rule 14 (func_sig)
+
+
+State 467
+
+   94 if_: "(" THEN instr_list ")" "(" . ELSE instr_list ")"
+
+    ELSE  shift, and go to state 470
+
+
+State 468
+
+   96 if_: expr "(" THEN instr_list ")" . "(" ELSE instr_list ")"
+   97    | expr "(" THEN instr_list ")" .
+
+    "("  shift, and go to state 471
+
+    $default  reduce using rule 97 (if_)
+
+
+State 469
+
+   71 block_instr: IF labeling_opt block ELSE labeling_opt instr_list END labeling_opt .
+
+    $default  reduce using rule 71 (block_instr)
+
+
+State 470
+
+   94 if_: "(" THEN instr_list ")" "(" ELSE . instr_list ")"
+
+    "("             shift, and go to state 228
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 96
+    IF              shift, and go to state 97
+    LOOP            shift, and go to state 98
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+
+    $default  reduce using rule 103 (instr_list)
+
+    instr          go to state 125
+    plain_instr    go to state 126
+    block_instr    go to state 127
+    expr           go to state 128
+    rethrow_check  go to state 129
+    throw_check    go to state 130
+    try_check      go to state 131
+    instr_list     go to state 472
+
+
+State 471
+
+   96 if_: expr "(" THEN instr_list ")" "(" . ELSE instr_list ")"
+
+    ELSE  shift, and go to state 473
+
+
+State 472
+
+   94 if_: "(" THEN instr_list ")" "(" ELSE instr_list . ")"
+
+    ")"  shift, and go to state 474
+
+
+State 473
+
+   96 if_: expr "(" THEN instr_list ")" "(" ELSE . instr_list ")"
+
+    "("             shift, and go to state 228
+    NOP             shift, and go to state 94
+    DROP            shift, and go to state 95
+    BLOCK           shift, and go to state 96
+    IF              shift, and go to state 97
+    LOOP            shift, and go to state 98
+    BR              shift, and go to state 99
+    BR_IF           shift, and go to state 100
+    BR_TABLE        shift, and go to state 101
+    TRY             shift, and go to state 102
+    THROW           shift, and go to state 103
+    RETHROW         shift, and go to state 104
+    CALL            shift, and go to state 105
+    CALL_INDIRECT   shift, and go to state 106
+    RETURN          shift, and go to state 107
+    GET_LOCAL       shift, and go to state 108
+    SET_LOCAL       shift, and go to state 109
+    TEE_LOCAL       shift, and go to state 110
+    GET_GLOBAL      shift, and go to state 111
+    SET_GLOBAL      shift, and go to state 112
+    LOAD            shift, and go to state 113
+    STORE           shift, and go to state 114
+    CONST           shift, and go to state 115
+    UNARY           shift, and go to state 116
+    BINARY          shift, and go to state 117
+    COMPARE         shift, and go to state 118
+    CONVERT         shift, and go to state 119
+    SELECT          shift, and go to state 120
+    UNREACHABLE     shift, and go to state 121
+    CURRENT_MEMORY  shift, and go to state 122
+    GROW_MEMORY     shift, and go to state 123
+
+    $default  reduce using rule 103 (instr_list)
+
+    instr          go to state 125
+    plain_instr    go to state 126
+    block_instr    go to state 127
+    expr           go to state 128
+    rethrow_check  go to state 129
+    throw_check    go to state 130
+    try_check      go to state 131
+    instr_list     go to state 475
+
+
+State 474
+
+   94 if_: "(" THEN instr_list ")" "(" ELSE instr_list ")" .
+
+    $default  reduce using rule 94 (if_)
+
+
+State 475
+
+   96 if_: expr "(" THEN instr_list ")" "(" ELSE instr_list . ")"
+
+    ")"  shift, and go to state 476
+
+
+State 476
+
+   96 if_: expr "(" THEN instr_list ")" "(" ELSE instr_list ")" .
+
+    $default  reduce using rule 96 (if_)
diff --git a/lib/wabt/src/range.h b/lib/wabt/src/range.h
new file mode 100644
index 0000000..aba816f
--- /dev/null
+++ b/lib/wabt/src/range.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2017 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef WABT_RANGE_H_
+#define WABT_RANGE_H_
+
+namespace wabt {
+
+template <typename T>
+struct Range {
+  Range() : start(0), end(0) {}
+  Range(T start, T end) : start(start), end(end) {}
+  T start;
+  T end;
+
+  T size() const { return end - start; }
+};
+
+typedef Range<Offset> OffsetRange;
+typedef Range<int> ColumnRange;
+
+} // namespace wabt
+
+#endif  // WABT_RANGE_H_
diff --git a/lib/wabt/src/resolve-names.cc b/lib/wabt/src/resolve-names.cc
index b20d1d7..a55ec3c 100644
--- a/lib/wabt/src/resolve-names.cc
+++ b/lib/wabt/src/resolve-names.cc
@@ -16,11 +16,12 @@
 
 #include "resolve-names.h"
 
-#include <assert.h>
-#include <stdio.h>
+#include <cassert>
+#include <cstdio>
 
-#include "ast.h"
-#include "ast-parser-lexer-shared.h"
+#include "expr-visitor.h"
+#include "ir.h"
+#include "wast-parser-lexer-shared.h"
 
 namespace wabt {
 
@@ -28,96 +29,129 @@
 
 typedef Label* LabelPtr;
 
-struct Context {
-  Context();
+class NameResolver : public ExprVisitor::DelegateNop {
+ public:
+  NameResolver(WastLexer* lexer,
+               Script* script,
+               SourceErrorHandler* error_handler);
 
-  SourceErrorHandler* error_handler = nullptr;
-  AstLexer* lexer = nullptr;
-  Script* script = nullptr;
-  Module* current_module = nullptr;
-  Func* current_func = nullptr;
-  ExprVisitor visitor;
-  std::vector<Label*> labels;
-  Result result = Result::Ok;
+  Result VisitModule(Module* module);
+  Result VisitScript(Script* script);
+
+  // Implementation of ExprVisitor::DelegateNop.
+  Result BeginBlockExpr(Expr*) override;
+  Result EndBlockExpr(Expr*) override;
+  Result OnBrExpr(Expr*) override;
+  Result OnBrIfExpr(Expr*) override;
+  Result OnBrTableExpr(Expr*) override;
+  Result OnCallExpr(Expr*) override;
+  Result OnCallIndirectExpr(Expr*) override;
+  Result OnGetGlobalExpr(Expr*) override;
+  Result OnGetLocalExpr(Expr*) override;
+  Result BeginIfExpr(Expr*) override;
+  Result EndIfExpr(Expr*) override;
+  Result BeginLoopExpr(Expr*) override;
+  Result EndLoopExpr(Expr*) override;
+  Result OnSetGlobalExpr(Expr*) override;
+  Result OnSetLocalExpr(Expr*) override;
+  Result OnTeeLocalExpr(Expr*) override;
+
+ private:
+  void PrintError(const Location* loc, const char* fmt, ...);
+  void PushLabel(Label* label);
+  void PopLabel();
+  void CheckDuplicateBindings(const BindingHash* bindings, const char* desc);
+  void ResolveLabelVar(Var* var);
+  void ResolveVar(const BindingHash* bindings, Var* var, const char* desc);
+  void ResolveFuncVar(Var* var);
+  void ResolveGlobalVar(Var* var);
+  void ResolveFuncTypeVar(Var* var);
+  void ResolveTableVar(Var* var);
+  void ResolveMemoryVar(Var* var);
+  void ResolveLocalVar(Var* var);
+  void VisitFunc(Func* func);
+  void VisitExport(Export* export_);
+  void VisitGlobal(Global* global);
+  void VisitElemSegment(ElemSegment* segment);
+  void VisitDataSegment(DataSegment* segment);
+  void VisitScriptModule(ScriptModule* script_module);
+  void VisitCommand(Command* command);
+
+  SourceErrorHandler* error_handler_ = nullptr;
+  WastLexer* lexer_ = nullptr;
+  Script* script_ = nullptr;
+  Module* current_module_ = nullptr;
+  Func* current_func_ = nullptr;
+  ExprVisitor visitor_;
+  std::vector<Label*> labels_;
+  Result result_ = Result::Ok;
 };
 
-Context::Context() {
-  WABT_ZERO_MEMORY(visitor);
-}
+NameResolver::NameResolver(WastLexer* lexer,
+                           Script* script,
+                           SourceErrorHandler* error_handler)
+    : error_handler_(error_handler),
+      lexer_(lexer),
+      script_(script),
+      visitor_(this) {}
 
 }  // namespace
 
-static void WABT_PRINTF_FORMAT(3, 4)
-    print_error(Context* ctx, const Location* loc, const char* fmt, ...) {
-  ctx->result = Result::Error;
+void WABT_PRINTF_FORMAT(3, 4) NameResolver::PrintError(const Location* loc,
+                                                       const char* fmt,
+                                                       ...) {
+  result_ = Result::Error;
   va_list args;
   va_start(args, fmt);
-  ast_format_error(ctx->error_handler, loc, ctx->lexer, fmt, args);
+  wast_format_error(error_handler_, loc, lexer_, fmt, args);
   va_end(args);
 }
 
-static void push_label(Context* ctx, Label* label) {
-  ctx->labels.push_back(label);
+void NameResolver::PushLabel(Label* label) {
+  labels_.push_back(label);
 }
 
-static void pop_label(Context* ctx) {
-  ctx->labels.pop_back();
+void NameResolver::PopLabel() {
+  labels_.pop_back();
 }
 
-struct FindDuplicateBindingContext {
-  Context* ctx;
-  const char* desc;
-};
+void NameResolver::CheckDuplicateBindings(const BindingHash* bindings,
+                                          const char* desc) {
+  bindings->FindDuplicates([this, desc](const BindingHash::value_type& a,
+                                        const BindingHash::value_type& b) {
+    // Choose the location that is later in the file.
+    const Location& a_loc = a.second.loc;
+    const Location& b_loc = b.second.loc;
+    const Location& loc = a_loc.line > b_loc.line ? a_loc : b_loc;
+    PrintError(&loc, "redefinition of %s \"%s\"", desc, a.first.c_str());
 
-static void on_duplicate_binding(const BindingHash::value_type& a,
-                                 const BindingHash::value_type& b,
-                                 void* user_data) {
-  FindDuplicateBindingContext* fdbc =
-      static_cast<FindDuplicateBindingContext*>(user_data);
-  /* choose the location that is later in the file */
-  const Location& a_loc = a.second.loc;
-  const Location& b_loc = b.second.loc;
-  const Location& loc = a_loc.line > b_loc.line ? a_loc : b_loc;
-  print_error(fdbc->ctx, &loc, "redefinition of %s \"%s\"", fdbc->desc,
-              a.first.c_str());
+  });
 }
 
-static void check_duplicate_bindings(Context* ctx,
-                                     const BindingHash* bindings,
-                                     const char* desc) {
-  FindDuplicateBindingContext fdbc;
-  fdbc.ctx = ctx;
-  fdbc.desc = desc;
-  bindings->find_duplicates(on_duplicate_binding, &fdbc);
-}
-
-static void resolve_label_var(Context* ctx, Var* var) {
+void NameResolver::ResolveLabelVar(Var* var) {
   if (var->type == VarType::Name) {
-    for (int i = ctx->labels.size() - 1; i >= 0; --i) {
-      Label* label = ctx->labels[i];
+    for (int i = labels_.size() - 1; i >= 0; --i) {
+      Label* label = labels_[i];
       if (string_slices_are_equal(label, &var->name)) {
         destroy_string_slice(&var->name);
         var->type = VarType::Index;
-        var->index = ctx->labels.size() - i - 1;
+        var->index = labels_.size() - i - 1;
         return;
       }
     }
-    print_error(ctx, &var->loc,
-                "undefined label variable \"" PRIstringslice "\"",
-                WABT_PRINTF_STRING_SLICE_ARG(var->name));
+    PrintError(&var->loc, "undefined label variable \"" PRIstringslice "\"",
+               WABT_PRINTF_STRING_SLICE_ARG(var->name));
   }
 }
 
-static void resolve_var(Context* ctx,
-                        const BindingHash* bindings,
-                        Var* var,
-                        const char* desc) {
+void NameResolver::ResolveVar(const BindingHash* bindings,
+                              Var* var,
+                              const char* desc) {
   if (var->type == VarType::Name) {
-    int index = get_index_from_var(bindings, var);
-    if (index == -1) {
-      print_error(ctx, &var->loc,
-                  "undefined %s variable \"" PRIstringslice "\"", desc,
-                  WABT_PRINTF_STRING_SLICE_ARG(var->name));
+    Index index = bindings->FindIndex(*var);
+    if (index == kInvalidIndex) {
+      PrintError(&var->loc, "undefined %s variable \"" PRIstringslice "\"",
+                 desc, WABT_PRINTF_STRING_SLICE_ARG(var->name));
       return;
     }
 
@@ -127,34 +161,35 @@
   }
 }
 
-static void resolve_func_var(Context* ctx, Var* var) {
-  resolve_var(ctx, &ctx->current_module->func_bindings, var, "function");
+void NameResolver::ResolveFuncVar(Var* var) {
+  ResolveVar(&current_module_->func_bindings, var, "function");
 }
 
-static void resolve_global_var(Context* ctx, Var* var) {
-  resolve_var(ctx, &ctx->current_module->global_bindings, var, "global");
+void NameResolver::ResolveGlobalVar(Var* var) {
+  ResolveVar(&current_module_->global_bindings, var, "global");
 }
 
-static void resolve_func_type_var(Context* ctx, Var* var) {
-  resolve_var(ctx, &ctx->current_module->func_type_bindings, var,
-              "function type");
+void NameResolver::ResolveFuncTypeVar(Var* var) {
+  ResolveVar(&current_module_->func_type_bindings, var, "function type");
 }
 
-static void resolve_table_var(Context* ctx, Var* var) {
-  resolve_var(ctx, &ctx->current_module->table_bindings, var, "table");
+void NameResolver::ResolveTableVar(Var* var) {
+  ResolveVar(&current_module_->table_bindings, var, "table");
 }
 
-static void resolve_memory_var(Context* ctx, Var* var) {
-  resolve_var(ctx, &ctx->current_module->memory_bindings, var, "memory");
+void NameResolver::ResolveMemoryVar(Var* var) {
+  ResolveVar(&current_module_->memory_bindings, var, "memory");
 }
 
-static void resolve_local_var(Context* ctx, Var* var) {
+void NameResolver::ResolveLocalVar(Var* var) {
   if (var->type == VarType::Name) {
-    int index = get_local_index_by_var(ctx->current_func, var);
-    if (index == -1) {
-      print_error(ctx, &var->loc,
-                  "undefined local variable \"" PRIstringslice "\"",
-                  WABT_PRINTF_STRING_SLICE_ARG(var->name));
+    if (!current_func_)
+      return;
+
+    Index index = current_func_->GetLocalIndex(*var);
+    if (index == kInvalidIndex) {
+      PrintError(&var->loc, "undefined local variable \"" PRIstringslice "\"",
+                 WABT_PRINTF_STRING_SLICE_ARG(var->name));
       return;
     }
 
@@ -164,193 +199,173 @@
   }
 }
 
-static Result begin_block_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  push_label(ctx, &expr->block->label);
+Result NameResolver::BeginBlockExpr(Expr* expr) {
+  PushLabel(&expr->block->label);
   return Result::Ok;
 }
 
-static Result end_block_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  pop_label(ctx);
+Result NameResolver::EndBlockExpr(Expr* expr) {
+  PopLabel();
   return Result::Ok;
 }
 
-static Result begin_loop_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  push_label(ctx, &expr->loop->label);
+Result NameResolver::BeginLoopExpr(Expr* expr) {
+  PushLabel(&expr->loop->label);
   return Result::Ok;
 }
 
-static Result end_loop_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  pop_label(ctx);
+Result NameResolver::EndLoopExpr(Expr* expr) {
+  PopLabel();
   return Result::Ok;
 }
 
-static Result on_br_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  resolve_label_var(ctx, &expr->br.var);
+Result NameResolver::OnBrExpr(Expr* expr) {
+  ResolveLabelVar(&expr->br.var);
   return Result::Ok;
 }
 
-static Result on_br_if_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  resolve_label_var(ctx, &expr->br_if.var);
+Result NameResolver::OnBrIfExpr(Expr* expr) {
+  ResolveLabelVar(&expr->br_if.var);
   return Result::Ok;
 }
 
-static Result on_br_table_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  for (Var& target: *expr->br_table.targets)
-    resolve_label_var(ctx, &target);
-  resolve_label_var(ctx, &expr->br_table.default_target);
+Result NameResolver::OnBrTableExpr(Expr* expr) {
+  for (Var& target : *expr->br_table.targets)
+    ResolveLabelVar(&target);
+  ResolveLabelVar(&expr->br_table.default_target);
   return Result::Ok;
 }
 
-static Result on_call_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  resolve_func_var(ctx, &expr->call.var);
+Result NameResolver::OnCallExpr(Expr* expr) {
+  ResolveFuncVar(&expr->call.var);
   return Result::Ok;
 }
 
-static Result on_call_indirect_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  resolve_func_type_var(ctx, &expr->call_indirect.var);
+Result NameResolver::OnCallIndirectExpr(Expr* expr) {
+  ResolveFuncTypeVar(&expr->call_indirect.var);
   return Result::Ok;
 }
 
-static Result on_get_global_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  resolve_global_var(ctx, &expr->get_global.var);
+Result NameResolver::OnGetGlobalExpr(Expr* expr) {
+  ResolveGlobalVar(&expr->get_global.var);
   return Result::Ok;
 }
 
-static Result on_get_local_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  resolve_local_var(ctx, &expr->get_local.var);
+Result NameResolver::OnGetLocalExpr(Expr* expr) {
+  ResolveLocalVar(&expr->get_local.var);
   return Result::Ok;
 }
 
-static Result begin_if_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  push_label(ctx, &expr->if_.true_->label);
+Result NameResolver::BeginIfExpr(Expr* expr) {
+  PushLabel(&expr->if_.true_->label);
   return Result::Ok;
 }
 
-static Result end_if_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  pop_label(ctx);
+Result NameResolver::EndIfExpr(Expr* expr) {
+  PopLabel();
   return Result::Ok;
 }
 
-static Result on_set_global_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  resolve_global_var(ctx, &expr->set_global.var);
+Result NameResolver::OnSetGlobalExpr(Expr* expr) {
+  ResolveGlobalVar(&expr->set_global.var);
   return Result::Ok;
 }
 
-static Result on_set_local_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  resolve_local_var(ctx, &expr->set_local.var);
+Result NameResolver::OnSetLocalExpr(Expr* expr) {
+  ResolveLocalVar(&expr->set_local.var);
   return Result::Ok;
 }
 
-static Result on_tee_local_expr(Expr* expr, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  resolve_local_var(ctx, &expr->tee_local.var);
+Result NameResolver::OnTeeLocalExpr(Expr* expr) {
+  ResolveLocalVar(&expr->tee_local.var);
   return Result::Ok;
 }
 
-static void visit_func(Context* ctx, Func* func) {
-  ctx->current_func = func;
-  if (decl_has_func_type(&func->decl))
-    resolve_func_type_var(ctx, &func->decl.type_var);
+void NameResolver::VisitFunc(Func* func) {
+  current_func_ = func;
+  if (func->decl.has_func_type)
+    ResolveFuncTypeVar(&func->decl.type_var);
 
-  check_duplicate_bindings(ctx, &func->param_bindings, "parameter");
-  check_duplicate_bindings(ctx, &func->local_bindings, "local");
+  CheckDuplicateBindings(&func->param_bindings, "parameter");
+  CheckDuplicateBindings(&func->local_bindings, "local");
 
-  visit_func(func, &ctx->visitor);
-  ctx->current_func = nullptr;
+  visitor_.VisitFunc(func);
+  current_func_ = nullptr;
 }
 
-static void visit_export(Context* ctx, Export* export_) {
+void NameResolver::VisitExport(Export* export_) {
   switch (export_->kind) {
     case ExternalKind::Func:
-      resolve_func_var(ctx, &export_->var);
+      ResolveFuncVar(&export_->var);
       break;
 
     case ExternalKind::Table:
-      resolve_table_var(ctx, &export_->var);
+      ResolveTableVar(&export_->var);
       break;
 
     case ExternalKind::Memory:
-      resolve_memory_var(ctx, &export_->var);
+      ResolveMemoryVar(&export_->var);
       break;
 
     case ExternalKind::Global:
-      resolve_global_var(ctx, &export_->var);
+      ResolveGlobalVar(&export_->var);
+      break;
+
+    case ExternalKind::Except:
+      WABT_FATAL("NameResolver::VisitExport(except) not defined\n");
       break;
   }
 }
 
-static void visit_global(Context* ctx, Global* global) {
-  visit_expr_list(global->init_expr, &ctx->visitor);
+void NameResolver::VisitGlobal(Global* global) {
+  visitor_.VisitExprList(global->init_expr);
 }
 
-static void visit_elem_segment(Context* ctx, ElemSegment* segment) {
-  resolve_table_var(ctx, &segment->table_var);
-  visit_expr_list(segment->offset, &ctx->visitor);
-  for (Var& var: segment->vars)
-    resolve_func_var(ctx, &var);
+void NameResolver::VisitElemSegment(ElemSegment* segment) {
+  ResolveTableVar(&segment->table_var);
+  visitor_.VisitExprList(segment->offset);
+  for (Var& var : segment->vars)
+    ResolveFuncVar(&var);
 }
 
-static void visit_data_segment(Context* ctx, DataSegment* segment) {
-  resolve_memory_var(ctx, &segment->memory_var);
-  visit_expr_list(segment->offset, &ctx->visitor);
+void NameResolver::VisitDataSegment(DataSegment* segment) {
+  ResolveMemoryVar(&segment->memory_var);
+  visitor_.VisitExprList(segment->offset);
 }
 
-static void visit_module(Context* ctx, Module* module) {
-  ctx->current_module = module;
-  check_duplicate_bindings(ctx, &module->func_bindings, "function");
-  check_duplicate_bindings(ctx, &module->global_bindings, "global");
-  check_duplicate_bindings(ctx, &module->func_type_bindings, "function type");
-  check_duplicate_bindings(ctx, &module->table_bindings, "table");
-  check_duplicate_bindings(ctx, &module->memory_bindings, "memory");
+Result NameResolver::VisitModule(Module* module) {
+  current_module_ = module;
+  CheckDuplicateBindings(&module->func_bindings, "function");
+  CheckDuplicateBindings(&module->global_bindings, "global");
+  CheckDuplicateBindings(&module->func_type_bindings, "function type");
+  CheckDuplicateBindings(&module->table_bindings, "table");
+  CheckDuplicateBindings(&module->memory_bindings, "memory");
 
   for (Func* func : module->funcs)
-    visit_func(ctx, func);
+    VisitFunc(func);
   for (Export* export_ : module->exports)
-    visit_export(ctx, export_);
+    VisitExport(export_);
   for (Global* global : module->globals)
-    visit_global(ctx, global);
+    VisitGlobal(global);
   for (ElemSegment* elem_segment : module->elem_segments)
-    visit_elem_segment(ctx, elem_segment);
+    VisitElemSegment(elem_segment);
   for (DataSegment* data_segment : module->data_segments)
-    visit_data_segment(ctx, data_segment);
+    VisitDataSegment(data_segment);
   if (module->start)
-    resolve_func_var(ctx, module->start);
-  ctx->current_module = nullptr;
+    ResolveFuncVar(module->start);
+  current_module_ = nullptr;
+  return result_;
 }
 
-static void visit_raw_module(Context* ctx, RawModule* raw_module) {
-  if (raw_module->type == RawModuleType::Text)
-    visit_module(ctx, raw_module->text);
+void NameResolver::VisitScriptModule(ScriptModule* script_module) {
+  if (script_module->type == ScriptModule::Type::Text)
+    VisitModule(script_module->text);
 }
 
-static bool dummy_source_error_callback(const Location* loc,
-                                        const char* error,
-                                        const char* source_line,
-                                        size_t source_line_length,
-                                        size_t source_line_column_offset,
-                                        void* user_data) {
-  return false;
-}
-
-static void visit_command(Context* ctx, Command* command) {
+void NameResolver::VisitCommand(Command* command) {
   switch (command->type) {
     case CommandType::Module:
-      visit_module(ctx, command->module);
+      VisitModule(command->module);
       break;
 
     case CommandType::Action:
@@ -373,20 +388,11 @@
       /* The module may be invalid because the names cannot be resolved; we
        * don't want to print errors or fail if that's the case, but we still
        * should try to resolve names when possible. */
-      SourceErrorHandler new_error_handler;
-      new_error_handler.on_error = dummy_source_error_callback;
-      new_error_handler.source_line_max_length =
-          ctx->error_handler->source_line_max_length;
+      SourceErrorHandlerNop new_error_handler;
 
-      Context new_ctx;
-      new_ctx.error_handler = &new_error_handler;
-      new_ctx.lexer = ctx->lexer;
-      new_ctx.visitor = ctx->visitor;
-      new_ctx.visitor.user_data = &new_ctx;
-      new_ctx.result = Result::Ok;
-
-      visit_raw_module(&new_ctx, command->assert_invalid.module);
-      if (WABT_FAILED(new_ctx.result)) {
+      NameResolver new_resolver(lexer_, script_, &new_error_handler);
+      new_resolver.VisitScriptModule(command->assert_invalid.module);
+      if (WABT_FAILED(new_resolver.result_)) {
         command->type = CommandType::AssertInvalidNonBinary;
       }
       break;
@@ -399,63 +405,33 @@
       break;
 
     case CommandType::AssertUnlinkable:
-      visit_raw_module(ctx, command->assert_unlinkable.module);
+      VisitScriptModule(command->assert_unlinkable.module);
       break;
 
     case CommandType::AssertUninstantiable:
-      visit_raw_module(ctx, command->assert_uninstantiable.module);
+      VisitScriptModule(command->assert_uninstantiable.module);
       break;
   }
 }
 
-static void visit_script(Context* ctx, Script* script) {
-  for (const std::unique_ptr<Command>& command: script->commands)
-    visit_command(ctx, command.get());
+Result NameResolver::VisitScript(Script* script) {
+  for (const std::unique_ptr<Command>& command : script->commands)
+    VisitCommand(command.get());
+  return result_;
 }
 
-static void init_context(Context* ctx,
-                         AstLexer* lexer,
-                         Script* script,
-                         SourceErrorHandler* error_handler) {
-  ctx->lexer = lexer;
-  ctx->error_handler = error_handler;
-  ctx->result = Result::Ok;
-  ctx->script = script;
-  ctx->visitor.user_data = ctx;
-  ctx->visitor.begin_block_expr = begin_block_expr;
-  ctx->visitor.end_block_expr = end_block_expr;
-  ctx->visitor.begin_loop_expr = begin_loop_expr;
-  ctx->visitor.end_loop_expr = end_loop_expr;
-  ctx->visitor.on_br_expr = on_br_expr;
-  ctx->visitor.on_br_if_expr = on_br_if_expr;
-  ctx->visitor.on_br_table_expr = on_br_table_expr;
-  ctx->visitor.on_call_expr = on_call_expr;
-  ctx->visitor.on_call_indirect_expr = on_call_indirect_expr;
-  ctx->visitor.on_get_global_expr = on_get_global_expr;
-  ctx->visitor.on_get_local_expr = on_get_local_expr;
-  ctx->visitor.begin_if_expr = begin_if_expr;
-  ctx->visitor.end_if_expr = end_if_expr;
-  ctx->visitor.on_set_global_expr = on_set_global_expr;
-  ctx->visitor.on_set_local_expr = on_set_local_expr;
-  ctx->visitor.on_tee_local_expr = on_tee_local_expr;
-}
-
-Result resolve_names_module(AstLexer* lexer,
+Result resolve_names_module(WastLexer* lexer,
                             Module* module,
                             SourceErrorHandler* error_handler) {
-  Context ctx;
-  init_context(&ctx, lexer, nullptr, error_handler);
-  visit_module(&ctx, module);
-  return ctx.result;
+  NameResolver resolver(lexer, nullptr, error_handler);
+  return resolver.VisitModule(module);
 }
 
-Result resolve_names_script(AstLexer* lexer,
+Result resolve_names_script(WastLexer* lexer,
                             Script* script,
                             SourceErrorHandler* error_handler) {
-  Context ctx;
-  init_context(&ctx, lexer, script, error_handler);
-  visit_script(&ctx, script);
-  return ctx.result;
+  NameResolver resolver(lexer, script, error_handler);
+  return resolver.VisitScript(script);
 }
 
 }  // namespace wabt
diff --git a/lib/wabt/src/resolve-names.h b/lib/wabt/src/resolve-names.h
index db98342..2ae7a0f 100644
--- a/lib/wabt/src/resolve-names.h
+++ b/lib/wabt/src/resolve-names.h
@@ -21,18 +21,13 @@
 
 namespace wabt {
 
-struct AstLexer;
+class WastLexer;
 struct Module;
 struct Script;
-struct SourceErrorHandler;
+class SourceErrorHandler;
 
-Result resolve_names_module(struct AstLexer*,
-                            struct Module*,
-                            struct SourceErrorHandler*);
-
-Result resolve_names_script(struct AstLexer*,
-                            struct Script*,
-                            struct SourceErrorHandler*);
+Result resolve_names_module(WastLexer*, Module*, SourceErrorHandler*);
+Result resolve_names_script(WastLexer*, Script*, SourceErrorHandler*);
 
 }  // namespace wabt
 
diff --git a/lib/wabt/src/source-error-handler.cc b/lib/wabt/src/source-error-handler.cc
new file mode 100644
index 0000000..96db134
--- /dev/null
+++ b/lib/wabt/src/source-error-handler.cc
@@ -0,0 +1,102 @@
+/*
+ * Copyright 2017 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "source-error-handler.h"
+
+#include <algorithm>
+
+namespace wabt {
+
+std::string SourceErrorHandler::DefaultErrorMessage(
+    const Location* loc,
+    const std::string& error,
+    const std::string& source_line,
+    size_t source_line_column_offset,
+    int indent) {
+  std::string indent_str(indent, ' ');
+  std::string result =
+      string_printf("%s%s:%d:%d: %s\n", indent_str.c_str(), loc->filename,
+                    loc->line, loc->first_column, error.c_str());
+  result += indent_str;
+  if (!source_line.empty()) {
+    result += source_line;
+    result += '\n';
+    result += indent_str;
+
+    size_t num_spaces = (loc->first_column - 1) - source_line_column_offset;
+    size_t num_carets = loc->last_column - loc->first_column;
+    num_carets = std::min(num_carets, source_line.size() - num_spaces);
+    num_carets = std::max<size_t>(num_carets, 1);
+    result.append(num_spaces, ' ');
+    result.append(num_carets, '^');
+    result += '\n';
+  }
+  return result;
+}
+
+SourceErrorHandlerFile::SourceErrorHandlerFile(FILE* file,
+                                               const std::string& header,
+                                               PrintHeader print_header,
+                                               size_t source_line_max_length)
+    : file_(file),
+      header_(header),
+      print_header_(print_header),
+      source_line_max_length_(source_line_max_length) {}
+
+bool SourceErrorHandlerFile::OnError(const Location* loc,
+                                     const std::string& error,
+                                     const std::string& source_line,
+                                     size_t source_line_column_offset) {
+  PrintErrorHeader();
+  int indent = header_.empty() ? 0 : 2;
+  std::string message = DefaultErrorMessage(loc, error, source_line,
+                                            source_line_column_offset, indent);
+  fwrite(message.data(), 1, message.size(), file_);
+  return true;
+}
+
+void SourceErrorHandlerFile::PrintErrorHeader() {
+  if (header_.empty())
+    return;
+
+  switch (print_header_) {
+    case PrintHeader::Never:
+      break;
+
+    case PrintHeader::Once:
+      print_header_ = PrintHeader::Never;
+    // Fallthrough.
+
+    case PrintHeader::Always:
+      fprintf(file_, "%s:\n", header_.c_str());
+      break;
+  }
+}
+
+SourceErrorHandlerBuffer::SourceErrorHandlerBuffer(
+    size_t source_line_max_length)
+    : source_line_max_length_(source_line_max_length) {}
+
+bool SourceErrorHandlerBuffer::OnError(const Location* loc,
+                                       const std::string& error,
+                                       const std::string& source_line,
+                                       size_t source_line_column_offset) {
+  buffer_ += DefaultErrorMessage(loc, error, source_line,
+                                 source_line_column_offset, 0);
+  return true;
+}
+
+}  // namespace wabt
diff --git a/lib/wabt/src/source-error-handler.h b/lib/wabt/src/source-error-handler.h
new file mode 100644
index 0000000..3da6c9f
--- /dev/null
+++ b/lib/wabt/src/source-error-handler.h
@@ -0,0 +1,112 @@
+/*
+ * Copyright 2017 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef WABT_SOURCE_ERROR_HANDLER_H_
+#define WABT_SOURCE_ERROR_HANDLER_H_
+
+#include <string>
+
+#include "common.h"
+
+namespace wabt {
+
+class SourceErrorHandler {
+ public:
+  virtual ~SourceErrorHandler() {}
+
+  // Returns true if the error was handled.
+  virtual bool OnError(const Location*,
+                       const std::string& error,
+                       const std::string& source_line,
+                       size_t source_line_column_offset) = 0;
+
+  // OnError will be called with with source_line trimmed to this length.
+  virtual size_t source_line_max_length() const = 0;
+
+  std::string DefaultErrorMessage(const Location*,
+                                  const std::string& error,
+                                  const std::string& source_line,
+                                  size_t source_line_column_offset,
+                                  int indent);
+};
+
+class SourceErrorHandlerNop : public SourceErrorHandler {
+ public:
+  bool OnError(const Location*,
+               const std::string& error,
+               const std::string& source_line,
+               size_t source_line_column_offset) override {
+    return false;
+  }
+
+  size_t source_line_max_length() const override { return 80; }
+};
+
+class SourceErrorHandlerFile : public SourceErrorHandler {
+ public:
+  enum class PrintHeader {
+    Never,
+    Once,
+    Always,
+  };
+
+  SourceErrorHandlerFile(FILE* file = stderr,
+                         const std::string& header = std::string(),
+                         PrintHeader print_header = PrintHeader::Never,
+                         size_t source_line_max_length = 80);
+
+  bool OnError(const Location*,
+               const std::string& error,
+               const std::string& source_line,
+               size_t source_line_column_offset) override;
+
+  size_t source_line_max_length() const override {
+    return source_line_max_length_;
+  }
+
+ private:
+  void PrintErrorHeader();
+  void PrintSourceError();
+
+  FILE* file_;
+  std::string header_;
+  PrintHeader print_header_;
+  size_t source_line_max_length_;
+};
+
+class SourceErrorHandlerBuffer : public SourceErrorHandler {
+ public:
+  explicit SourceErrorHandlerBuffer(size_t source_line_max_length = 80);
+
+  bool OnError(const Location*,
+               const std::string& error,
+               const std::string& source_line,
+               size_t source_line_column_offset) override;
+
+  size_t source_line_max_length() const override {
+    return source_line_max_length_;
+  }
+
+  const std::string& buffer() const { return buffer_; }
+
+ private:
+  size_t source_line_max_length_;
+  std::string buffer_;
+};
+
+}  // namespace wabt
+
+#endif // WABT_SOURCE_ERROR_HANDLER_H_
diff --git a/lib/wabt/src/stream.cc b/lib/wabt/src/stream.cc
index 12510e9..e6e989f 100644
--- a/lib/wabt/src/stream.cc
+++ b/lib/wabt/src/stream.cc
@@ -16,148 +16,118 @@
 
 #include "stream.h"
 
-#include <assert.h>
-#include <ctype.h>
+#include <cassert>
+#include <cctype>
 
 #define DUMP_OCTETS_PER_LINE 16
 #define DUMP_OCTETS_PER_GROUP 2
 
 namespace wabt {
 
-static FileStream s_stdout_stream;
-static FileStream s_stderr_stream;
+Stream::Stream(Writer* writer, Stream* log_stream)
+    : writer_(writer),
+      offset_(0),
+      result_(Result::Ok),
+      log_stream_(log_stream) {}
 
-void init_stream(Stream* stream, Writer* writer, Stream* log_stream) {
-  stream->writer = writer;
-  stream->offset = 0;
-  stream->result = Result::Ok;
-  stream->log_stream = log_stream;
+void Stream::AddOffset(ssize_t delta) {
+  offset_ += delta;
 }
 
-void init_file_stream_from_existing(FileStream* stream, FILE* file) {
-  init_file_writer_existing(&stream->writer, file);
-  init_stream(&stream->base, &stream->writer.base, nullptr);
-}
-
-Stream* init_stdout_stream(void) {
-  init_file_stream_from_existing(&s_stdout_stream, stdout);
-  return &s_stdout_stream.base;
-}
-
-Stream* init_stderr_stream(void) {
-  init_file_stream_from_existing(&s_stderr_stream, stderr);
-  return &s_stderr_stream.base;
-}
-
-void write_data_at(Stream* stream,
-                   size_t offset,
-                   const void* src,
-                   size_t size,
-                   PrintChars print_chars,
-                   const char* desc) {
-  if (WABT_FAILED(stream->result))
+void Stream::WriteDataAt(size_t at,
+                         const void* src,
+                         size_t size,
+                         const char* desc,
+                         PrintChars print_chars) {
+  if (WABT_FAILED(result_))
     return;
-  if (stream->log_stream) {
-    write_memory_dump(stream->log_stream, src, size, offset, print_chars,
-                      nullptr, desc);
+  if (log_stream_) {
+    log_stream_->WriteMemoryDump(src, size, at, nullptr, desc, print_chars);
   }
-  if (stream->writer->write_data) {
-    stream->result = stream->writer->write_data(offset, src, size,
-                                                stream->writer->user_data);
-  }
+  result_ = writer_->WriteData(at, src, size);
 }
 
-void write_data(Stream* stream,
-                const void* src,
-                size_t size,
-                const char* desc) {
-  write_data_at(stream, stream->offset, src, size, PrintChars::No, desc);
-  stream->offset += size;
-}
-
-void move_data(Stream* stream,
-               size_t dst_offset,
-               size_t src_offset,
-               size_t size) {
-  if (WABT_FAILED(stream->result))
-    return;
-  if (stream->log_stream) {
-    writef(stream->log_stream, "; move data: [%" PRIzx ", %" PRIzx
-                               ") -> [%" PRIzx ", %" PRIzx ")\n",
-           src_offset, src_offset + size, dst_offset, dst_offset + size);
-  }
-  if (stream->writer->write_data) {
-    stream->result = stream->writer->move_data(dst_offset, src_offset, size,
-                                               stream->writer->user_data);
-  }
-}
-
-void writef(Stream* stream, const char* format, ...) {
-  WABT_SNPRINTF_ALLOCA(buffer, length, format);
-  write_data(stream, buffer, length, nullptr);
-}
-
-void write_u8(Stream* stream, uint32_t value, const char* desc) {
-  assert(value <= UINT8_MAX);
-  uint8_t value8 = value;
-  write_data_at(stream, stream->offset, &value8, sizeof(value8), PrintChars::No,
-                desc);
-  stream->offset += sizeof(value8);
-}
-
-void write_u32(Stream* stream, uint32_t value, const char* desc) {
-  write_data_at(stream, stream->offset, &value, sizeof(value), PrintChars::No,
-                desc);
-  stream->offset += sizeof(value);
-}
-
-void write_u64(Stream* stream, uint64_t value, const char* desc) {
-  write_data_at(stream, stream->offset, &value, sizeof(value), PrintChars::No,
-                desc);
-  stream->offset += sizeof(value);
-}
-
-void write_memory_dump(Stream* stream,
-                       const void* start,
+void Stream::WriteData(const void* src,
                        size_t size,
-                       size_t offset,
-                       PrintChars print_chars,
-                       const char* prefix,
-                       const char* desc) {
+                       const char* desc,
+                       PrintChars print_chars) {
+  WriteDataAt(offset_, src, size, desc, print_chars);
+  offset_ += size;
+}
+
+void Stream::MoveData(size_t dst_offset, size_t src_offset, size_t size) {
+  if (WABT_FAILED(result_))
+    return;
+  if (log_stream_) {
+    log_stream_->Writef(
+        "; move data: [%" PRIzx ", %" PRIzx ") -> [%" PRIzx ", %" PRIzx ")\n",
+        src_offset, src_offset + size, dst_offset, dst_offset + size);
+  }
+  result_ = writer_->MoveData(dst_offset, src_offset, size);
+}
+
+void Stream::Writef(const char* format, ...) {
+  WABT_SNPRINTF_ALLOCA(buffer, length, format);
+  WriteData(buffer, length);
+}
+
+void Stream::WriteMemoryDump(const void* start,
+                             size_t size,
+                             size_t offset,
+                             const char* prefix,
+                             const char* desc,
+                             PrintChars print_chars) {
   const uint8_t* p = static_cast<const uint8_t*>(start);
   const uint8_t* end = p + size;
   while (p < end) {
     const uint8_t* line = p;
     const uint8_t* line_end = p + DUMP_OCTETS_PER_LINE;
     if (prefix)
-      writef(stream, "%s", prefix);
-    writef(stream, "%07" PRIzx ": ", reinterpret_cast<intptr_t>(p) -
-                                         reinterpret_cast<intptr_t>(start) +
-                                         offset);
+      Writef("%s", prefix);
+    Writef("%07" PRIzx ": ", reinterpret_cast<intptr_t>(p) -
+                                 reinterpret_cast<intptr_t>(start) + offset);
     while (p < line_end) {
       for (int i = 0; i < DUMP_OCTETS_PER_GROUP; ++i, ++p) {
         if (p < end) {
-          writef(stream, "%02x", *p);
+          Writef("%02x", *p);
         } else {
-          write_char(stream, ' ');
-          write_char(stream, ' ');
+          WriteChar(' ');
+          WriteChar(' ');
         }
       }
-      write_char(stream, ' ');
+      WriteChar(' ');
     }
 
     if (print_chars == PrintChars::Yes) {
-      write_char(stream, ' ');
+      WriteChar(' ');
       p = line;
       for (int i = 0; i < DUMP_OCTETS_PER_LINE && p < end; ++i, ++p)
-        write_char(stream, isprint(*p) ? *p : '.');
+        WriteChar(isprint(*p) ? *p : '.');
     }
 
     /* if there are multiple lines, only print the desc on the last one */
     if (p >= end && desc)
-      writef(stream, "  ; %s", desc);
-    write_char(stream, '\n');
+      Writef("  ; %s", desc);
+    WriteChar('\n');
   }
 }
 
+MemoryStream::MemoryStream() : Stream(&writer_) {}
+
+FileStream::FileStream(const char* filename)
+    : Stream(&writer_), writer_(filename) {}
+
+FileStream::FileStream(FILE* file) : Stream(&writer_), writer_(file) {}
+
+// static
+std::unique_ptr<FileStream> FileStream::CreateStdout() {
+  return std::unique_ptr<FileStream>(new FileStream(stdout));
+}
+
+// static
+std::unique_ptr<FileStream> FileStream::CreateStderr() {
+  return std::unique_ptr<FileStream>(new FileStream(stderr));
+}
+
+
 }  // namespace wabt
diff --git a/lib/wabt/src/stream.h b/lib/wabt/src/stream.h
index 8e02733..a43c5c1 100644
--- a/lib/wabt/src/stream.h
+++ b/lib/wabt/src/stream.h
@@ -17,26 +17,14 @@
 #ifndef WABT_STREAM_H_
 #define WABT_STREAM_H_
 
-#include <stdio.h>
+#include <cassert>
+#include <memory>
 
 #include "common.h"
 #include "writer.h"
 
 namespace wabt {
 
-struct Stream {
-  Writer* writer;
-  size_t offset;
-  Result result;
-  /* if non-null, log all writes to this stream */
-  struct Stream* log_stream;
-};
-
-struct FileStream {
-  Stream base;
-  FileWriter writer;
-};
-
 /* whether to display the ASCII characters in the debug output for
  * write_memory */
 enum class PrintChars {
@@ -44,55 +32,127 @@
   Yes = 1,
 };
 
-void init_stream(Stream* stream, Writer* writer, Stream* log_stream);
-void init_file_stream_from_existing(FileStream* stream, FILE* file);
-Stream* init_stdout_stream(void);
-Stream* init_stderr_stream(void);
+class Stream {
+ public:
+  Stream(Writer* writer, Stream* log_stream = nullptr);
 
-/* helper functions for writing to a Stream. the |desc| parameter is
- * optional, and will be appended to the log stream if |stream.log_stream| is
- * non-null. */
-void write_data_at(Stream*,
-                   size_t offset,
+  size_t offset() { return offset_; }
+  Result result() { return result_; }
+
+  void set_log_stream(Stream* stream) {
+    assert(stream);
+    log_stream_ = stream;
+  }
+
+  Stream& log_stream() {
+    assert(log_stream_);
+    return *log_stream_;
+  }
+
+  bool has_log_stream() const { return log_stream_ != nullptr; }
+
+  void AddOffset(ssize_t delta);
+
+  void WriteData(const void* src,
+                 size_t size,
+                 const char* desc = nullptr,
+                 PrintChars = PrintChars::No);
+  void MoveData(size_t dst_offset, size_t src_offset, size_t size);
+
+  void WriteDataAt(size_t offset,
                    const void* src,
                    size_t size,
-                   PrintChars print_chars,
-                   const char* desc);
-void write_data(Stream*, const void* src, size_t size, const char* desc);
-void move_data(Stream*, size_t dst_offset, size_t src_offset, size_t size);
+                   const char* desc = nullptr,
+                   PrintChars = PrintChars::No);
 
-void WABT_PRINTF_FORMAT(2, 3) writef(Stream*, const char* format, ...);
-/* specified as uint32_t instead of uint8_t so we can check if the value given
- * is in range before wrapping */
-void write_u8(Stream*, uint32_t value, const char* desc);
-void write_u32(Stream*, uint32_t value, const char* desc);
-void write_u64(Stream*, uint64_t value, const char* desc);
+  void WABT_PRINTF_FORMAT(2, 3) Writef(const char* format, ...);
 
-static WABT_INLINE void write_char(Stream* stream, char c) {
-  write_u8(stream, c, nullptr);
-}
+  // Specified as uint32_t instead of uint8_t so we can check if the value
+  // given is in range before wrapping.
+  void WriteU8(uint32_t value,
+               const char* desc = nullptr,
+               PrintChars print_chars = PrintChars::No) {
+    assert(value <= UINT8_MAX);
+    Write(static_cast<uint8_t>(value), desc, print_chars);
+  }
+  void WriteU32(uint32_t value,
+                const char* desc = nullptr,
+                PrintChars print_chars = PrintChars::No) {
+    Write(value, desc, print_chars);
+  }
+  void WriteU64(uint64_t value,
+                const char* desc = nullptr,
+                PrintChars print_chars = PrintChars::No) {
+    Write(value, desc, print_chars);
+  }
+  void WriteChar(char c,
+                 const char* desc = nullptr,
+                 PrintChars print_chars = PrintChars::No) {
+    WriteU8(c, desc, print_chars);
+  }
 
-/* dump memory as text, similar to the xxd format */
-void write_memory_dump(Stream*,
-                       const void* start,
+  // Dump memory as text, similar to the xxd format.
+  void WriteMemoryDump(const void* start,
                        size_t size,
-                       size_t offset,
-                       PrintChars print_chars,
-                       const char* prefix,
-                       const char* desc);
+                       size_t offset = 0,
+                       const char* prefix = nullptr,
+                       const char* desc = nullptr,
+                       PrintChars print_chars = PrintChars::No);
 
-static WABT_INLINE void write_output_buffer_memory_dump(
-    Stream* stream,
-    struct OutputBuffer* buf) {
-  write_memory_dump(stream, buf->start, buf->size, 0, PrintChars::No, nullptr,
-                    nullptr);
-}
+  // Convenience functions for writing enums.
+  template <typename T>
+  void WriteU8Enum(T value,
+                   const char* desc = nullptr,
+                   PrintChars print_chars = PrintChars::No) {
+    WriteU8(static_cast<uint32_t>(value), desc, print_chars);
+  }
 
-/* Helper function for writing enums as u8. */
-template <typename T>
-void write_u8_enum(Stream* stream, T value, const char* desc) {
-  write_u8(stream, static_cast<uint32_t>(value), desc);
-}
+ private:
+  template <typename T>
+  void Write(const T& data, const char* desc, PrintChars print_chars) {
+    WriteData(&data, sizeof(data), desc, print_chars);
+  }
+
+  Writer* writer_;  // Not owned.
+  size_t offset_;
+  Result result_;
+  // Not owned. If non-null, log all writes to this stream.
+  Stream* log_stream_;
+};
+
+class MemoryStream : public Stream {
+ public:
+  MemoryStream();
+
+  MemoryWriter& writer() { return writer_; }
+
+  std::unique_ptr<OutputBuffer> ReleaseOutputBuffer() {
+    return writer_.ReleaseOutputBuffer();
+  }
+
+  Result WriteToFile(const char* filename) {
+    return writer_.output_buffer().WriteToFile(filename);
+  }
+
+ private:
+  MemoryWriter writer_;
+};
+
+class FileStream : public Stream {
+ public:
+  explicit FileStream(const char* filename);
+  explicit FileStream(FILE*);
+
+  FileWriter& writer() { return writer_; }
+
+  static std::unique_ptr<FileStream> CreateStdout();
+  static std::unique_ptr<FileStream> CreateStderr();
+
+  bool is_open() const { return writer_.is_open(); }
+
+ private:
+  FileWriter writer_;
+};
 
 }  // namespace wabt
 
diff --git a/lib/wabt/src/test-utf8.cc b/lib/wabt/src/test-utf8.cc
new file mode 100644
index 0000000..4c7430e
--- /dev/null
+++ b/lib/wabt/src/test-utf8.cc
@@ -0,0 +1,172 @@
+/*
+ * Copyright 2017 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "gtest/gtest.h"
+
+#include "utf8.h"
+
+using namespace wabt;
+
+namespace {
+
+void assert_is_valid_utf8(bool expected,
+                          int length,
+                          int cu0 = 0,
+                          int cu1 = 0,
+                          int cu2 = 0,
+                          int cu3 = 0) {
+  assert(length <= 4);
+  char buf[4] = {static_cast<char>(cu0), static_cast<char>(cu1),
+                 static_cast<char>(cu2), static_cast<char>(cu3)};
+  if (expected) {
+    // Make sure it fails if there are continuation bytes past the end of the
+    // string.
+    for (int bad_length = 1; bad_length < length; ++bad_length) {
+      ASSERT_FALSE(is_valid_utf8(buf, bad_length)) << cu0 << ", " << cu1 << ", "
+                                                   << cu2 << ", " << cu3;
+    }
+  }
+
+  ASSERT_TRUE(expected == is_valid_utf8(buf, length))
+      << cu0 << ", " << cu1 << ", " << cu2 << ", " << cu3;
+}
+
+bool is_in_range(int x, int low, int high) {
+  return x >= low && x < high;
+}
+
+}  // namespace
+
+#define FOR_RANGE(var, low, high) for (int var = low; var < high; var++)
+#define FOR_EACH_BYTE(var) FOR_RANGE(var, 0, 0x100)
+
+TEST(utf8, valid_empty) {
+  assert_is_valid_utf8(true, 0);
+}
+
+TEST(utf8, valid_1_byte) {
+  FOR_RANGE(cu0, 0, 0x80) {
+    assert_is_valid_utf8(true, 1, cu0);
+  }
+}
+
+TEST(utf8, invalid_continuation_bytes) {
+  FOR_RANGE(cu0, 0x80, 0xc0) {
+    assert_is_valid_utf8(false, 1, cu0);
+  }
+}
+
+TEST(utf8, invalid_2_byte) {
+  FOR_RANGE(cu0, 0xc0, 0xc2) {
+    assert_is_valid_utf8(false, 1, cu0);
+  }
+}
+
+TEST(utf8, valid_2_bytes) {
+  FOR_RANGE(cu0, 0xc2, 0xe0) {
+    FOR_EACH_BYTE(cu1) {
+      bool is_valid = is_in_range(cu1, 0x80, 0xc0);
+      assert_is_valid_utf8(is_valid, 2, cu0, cu1);
+    }
+  }
+}
+
+TEST(utf8, valid_3_bytes_e0) {
+  int cu0 = 0xe0;
+  FOR_EACH_BYTE(cu1) {
+    FOR_EACH_BYTE(cu2) {
+      bool is_valid =
+          is_in_range(cu1, 0xa0, 0xc0) && is_in_range(cu2, 0x80, 0xc0);
+      assert_is_valid_utf8(is_valid, 3, cu0, cu1, cu2);
+    }
+  }
+}
+
+TEST(utf8, valid_3_bytes) {
+  FOR_RANGE(cu0, 0xe1, 0xf0) {
+    // Handle 0xed in valid_3_bytes_ed.
+    if (cu0 == 0xed)
+      continue;
+
+    FOR_EACH_BYTE(cu1) {
+      FOR_EACH_BYTE(cu2) {
+        bool is_valid =
+            is_in_range(cu1, 0x80, 0xc0) && is_in_range(cu2, 0x80, 0xc0);
+        assert_is_valid_utf8(is_valid, 3, cu0, cu1, cu2);
+      }
+    }
+  }
+}
+
+TEST(utf8, valid_3_bytes_ed) {
+  int cu0 = 0xed;
+  FOR_EACH_BYTE(cu1) {
+    FOR_EACH_BYTE(cu2) {
+      bool is_valid =
+          is_in_range(cu1, 0x80, 0xa0) && is_in_range(cu2, 0x80, 0xc0);
+      assert_is_valid_utf8(is_valid, 3, cu0, cu1, cu2);
+    }
+  }
+}
+
+TEST(utf8, valid_4_bytes_f0) {
+  int cu0 = 0xf0;
+  FOR_EACH_BYTE(cu1) {
+    FOR_EACH_BYTE(cu2) {
+      FOR_EACH_BYTE(cu3) {
+        bool is_valid = is_in_range(cu1, 0x90, 0xc0) &&
+                        is_in_range(cu2, 0x80, 0xc0) &&
+                        is_in_range(cu3, 0x80, 0xc0);
+        assert_is_valid_utf8(is_valid, 4, cu0, cu1, cu2, cu3);
+      }
+    }
+  }
+}
+
+TEST(utf8, valid_4_bytes) {
+  FOR_RANGE(cu0, 0xf1, 0xf4) {
+    FOR_EACH_BYTE(cu1) {
+      FOR_EACH_BYTE(cu2) {
+        FOR_EACH_BYTE(cu3) {
+          bool is_valid = is_in_range(cu1, 0x80, 0xc0) &&
+                          is_in_range(cu2, 0x80, 0xc0) &&
+                          is_in_range(cu3, 0x80, 0xc0);
+          assert_is_valid_utf8(is_valid, 4, cu0, cu1, cu2, cu3);
+        }
+      }
+    }
+  }
+}
+
+TEST(utf8, valid_4_bytes_f4) {
+  int cu0 = 0xf4;
+  FOR_EACH_BYTE(cu1) {
+    FOR_EACH_BYTE(cu2) {
+      FOR_EACH_BYTE(cu3) {
+        bool is_valid = is_in_range(cu1, 0x80, 0x90) &&
+                        is_in_range(cu2, 0x80, 0xc0) &&
+                        is_in_range(cu3, 0x80, 0xc0);
+        assert_is_valid_utf8(is_valid, 4, cu0, cu1, cu2, cu3);
+      }
+    }
+  }
+}
+
+TEST(utf8, invalid_4_bytes) {
+  FOR_RANGE(cu0, 0xf5, 0x100) {
+    assert_is_valid_utf8(false, 4, cu0, 0x80, 0x80, 0x80);
+  }
+}
diff --git a/lib/wabt/src/tools/wasm-interp.cc b/lib/wabt/src/tools/wasm-interp.cc
index 924c6b2..2ef8980 100644
--- a/lib/wabt/src/tools/wasm-interp.cc
+++ b/lib/wabt/src/tools/wasm-interp.cc
@@ -14,24 +14,28 @@
  * limitations under the License.
  */
 
-#include <assert.h>
-#include <inttypes.h>
-#include <stdio.h>
-#include <stdlib.h>
-
+#include <algorithm>
+#include <cassert>
+#include <cinttypes>
+#include <cstdio>
+#include <cstdlib>
+#include <memory>
+#include <string>
 #include <vector>
 
-#include "binary-reader.h"
+#include "binary-error-handler.h"
 #include "binary-reader-interpreter.h"
+#include "binary-reader.h"
 #include "interpreter.h"
 #include "literal.h"
 #include "option-parser.h"
+#include "source-error-handler.h"
 #include "stream.h"
-
-#define INSTRUCTION_QUANTUM 1000
-#define PROGRAM_NAME "wasm-interp"
+#include "wast-lexer.h"
+#include "wast-parser.h"
 
 using namespace wabt;
+using namespace wabt::interpreter;
 
 #define V(name, str) str,
 static const char* s_trap_strings[] = {FOREACH_INTERPRETER_RESULT(V)};
@@ -41,157 +45,101 @@
 static const char* s_infile;
 static ReadBinaryOptions s_read_binary_options =
     WABT_READ_BINARY_OPTIONS_DEFAULT;
-static InterpreterThreadOptions s_thread_options =
-    WABT_INTERPRETER_THREAD_OPTIONS_DEFAULT;
+static Thread::Options s_thread_options;
 static bool s_trace;
 static bool s_spec;
 static bool s_run_all_exports;
-static Stream* s_stdout_stream;
 
-static BinaryErrorHandler s_error_handler = WABT_BINARY_ERROR_HANDLER_DEFAULT;
-
-static FileWriter s_log_stream_writer;
-static Stream s_log_stream;
-
-#define NOPE HasArgument::No
-#define YEP HasArgument::Yes
+static std::unique_ptr<FileStream> s_log_stream;
+static std::unique_ptr<FileStream> s_stdout_stream;
 
 enum class RunVerbosity {
   Quiet = 0,
   Verbose = 1,
 };
 
-enum {
-  FLAG_VERBOSE,
-  FLAG_HELP,
-  FLAG_VALUE_STACK_SIZE,
-  FLAG_CALL_STACK_SIZE,
-  FLAG_TRACE,
-  FLAG_SPEC,
-  FLAG_RUN_ALL_EXPORTS,
-  NUM_FLAGS
-};
-
-
 static const char s_description[] =
-    "  read a file in the wasm binary format, and run in it a stack-based\n"
-    "  interpreter.\n"
-    "\n"
-    "examples:\n"
-    "  # parse binary file test.wasm, and type-check it\n"
-    "  $ wasm-interp test.wasm\n"
-    "\n"
-    "  # parse test.wasm and run all its exported functions\n"
-    "  $ wasm-interp test.wasm --run-all-exports\n"
-    "\n"
-    "  # parse test.wasm, run the exported functions and trace the output\n"
-    "  $ wasm-interp test.wasm --run-all-exports --trace\n"
-    "\n"
-    "  # parse test.json and run the spec tests\n"
-    "  $ wasm-interp test.json --spec\n"
-    "\n"
-    "  # parse test.wasm and run all its exported functions, setting the\n"
-    "  # value stack size to 100 elements\n"
-    "  $ wasm-interp test.wasm -V 100 --run-all-exports\n";
+R"(  read a file in the wasm binary format, and run in it a stack-based
+  interpreter.
 
-static Option s_options[] = {
-    {FLAG_VERBOSE, 'v', "verbose", nullptr, NOPE,
-     "use multiple times for more info"},
-    {FLAG_HELP, 'h', "help", nullptr, NOPE, "print this help message"},
-    {FLAG_VALUE_STACK_SIZE, 'V', "value-stack-size", "SIZE", YEP,
-     "size in elements of the value stack"},
-    {FLAG_CALL_STACK_SIZE, 'C', "call-stack-size", "SIZE", YEP,
-     "size in frames of the call stack"},
-    {FLAG_TRACE, 't', "trace", nullptr, NOPE, "trace execution"},
-    {FLAG_SPEC, 0, "spec", nullptr, NOPE,
-     "run spec tests (input file should be .json)"},
-    {FLAG_RUN_ALL_EXPORTS, 0, "run-all-exports", nullptr, NOPE,
-     "run all the exported functions, in order. useful for testing"},
-};
-WABT_STATIC_ASSERT(NUM_FLAGS == WABT_ARRAY_SIZE(s_options));
+examples:
+  # parse binary file test.wasm, and type-check it
+  $ wasm-interp test.wasm
 
-static void on_option(struct OptionParser* parser,
-                      struct Option* option,
-                      const char* argument) {
-  switch (option->id) {
-    case FLAG_VERBOSE:
-      s_verbose++;
-      init_file_writer_existing(&s_log_stream_writer, stdout);
-      init_stream(&s_log_stream, &s_log_stream_writer.base, nullptr);
-      s_read_binary_options.log_stream = &s_log_stream;
-      break;
+  # parse test.wasm and run all its exported functions
+  $ wasm-interp test.wasm --run-all-exports
 
-    case FLAG_HELP:
-      print_help(parser, PROGRAM_NAME);
-      exit(0);
-      break;
+  # parse test.wasm, run the exported functions and trace the output
+  $ wasm-interp test.wasm --run-all-exports --trace
 
-    case FLAG_VALUE_STACK_SIZE:
-      /* TODO(binji): validate */
-      s_thread_options.value_stack_size = atoi(argument);
-      break;
+  # parse test.json and run the spec tests
+  $ wasm-interp test.json --spec
 
-    case FLAG_CALL_STACK_SIZE:
-      /* TODO(binji): validate */
-      s_thread_options.call_stack_size = atoi(argument);
-      break;
-
-    case FLAG_TRACE:
-      s_trace = true;
-      break;
-
-    case FLAG_SPEC:
-      s_spec = true;
-      break;
-
-    case FLAG_RUN_ALL_EXPORTS:
-      s_run_all_exports = true;
-      break;
-  }
-}
-
-static void on_argument(struct OptionParser* parser, const char* argument) {
-  s_infile = argument;
-}
-
-static void on_option_error(struct OptionParser* parser, const char* message) {
-  WABT_FATAL("%s\n", message);
-}
+  # parse test.wasm and run all its exported functions, setting the
+  # value stack size to 100 elements
+  $ wasm-interp test.wasm -V 100 --run-all-exports
+)";
 
 static void parse_options(int argc, char** argv) {
-  OptionParser parser;
-  WABT_ZERO_MEMORY(parser);
-  parser.description = s_description;
-  parser.options = s_options;
-  parser.num_options = WABT_ARRAY_SIZE(s_options);
-  parser.on_option = on_option;
-  parser.on_argument = on_argument;
-  parser.on_error = on_option_error;
-  parse_options(&parser, argc, argv);
+  OptionParser parser("wasm-interp", s_description);
+
+  parser.AddOption('v', "verbose", "Use multiple times for more info", []() {
+    s_verbose++;
+    s_log_stream = FileStream::CreateStdout();
+    s_read_binary_options.log_stream = s_log_stream.get();
+  });
+  parser.AddHelpOption();
+  parser.AddOption('V', "value-stack-size", "SIZE",
+                   "Size in elements of the value stack",
+                   [](const std::string& argument) {
+                     // TODO(binji): validate.
+                     s_thread_options.value_stack_size = atoi(argument.c_str());
+                   });
+  parser.AddOption('C', "call-stack-size", "SIZE",
+                   "Size in elements of the call stack",
+                   [](const std::string& argument) {
+                     // TODO(binji): validate.
+                     s_thread_options.call_stack_size = atoi(argument.c_str());
+                   });
+  parser.AddOption('t', "trace", "Trace execution", []() { s_trace = true; });
+  parser.AddOption("spec", "Run spec tests (input file should be .json)",
+                   []() { s_spec = true; });
+  parser.AddOption(
+      "run-all-exports",
+      "Run all the exported functions, in order. Useful for testing",
+      []() { s_run_all_exports = true; });
+
+  parser.AddArgument("filename", OptionParser::ArgumentCount::One,
+                     [](const char* argument) { s_infile = argument; });
+  parser.Parse(argc, argv);
 
   if (s_spec && s_run_all_exports)
     WABT_FATAL("--spec and --run-all-exports are incompatible.\n");
-
-  if (!s_infile) {
-    print_help(&parser, PROGRAM_NAME);
-    WABT_FATAL("No filename given.\n");
-  }
 }
 
+enum class ModuleType {
+  Text,
+  Binary,
+};
+
 static StringSlice get_dirname(const char* s) {
-  /* strip everything after and including the last slash, e.g.:
+  /* strip everything after and including the last slash (or backslash), e.g.:
    *
    * s = "foo/bar/baz", => "foo/bar"
    * s = "/usr/local/include/stdio.h", => "/usr/local/include"
    * s = "foo.bar", => ""
+   * s = "some\windows\directory", => "some\windows"
    */
   const char* last_slash = strrchr(s, '/');
-  if (last_slash == nullptr)
+  const char* last_backslash = strrchr(s, '\\');
+  if (!last_slash)
     last_slash = s;
+  if (!last_backslash)
+    last_backslash = s;
 
   StringSlice result;
   result.start = s;
-  result.length = last_slash - s;
+  result.length = std::max(last_slash, last_backslash) - s;
   return result;
 }
 
@@ -200,7 +148,7 @@
 
 static void sprint_typed_value(char* buffer,
                                size_t size,
-                               const InterpreterTypedValue* tv) {
+                               const TypedValue* tv) {
   switch (tv->type) {
     case Type::I32:
       snprintf(buffer, size, "i32:%u", tv->value.i32);
@@ -213,14 +161,14 @@
     case Type::F32: {
       float value;
       memcpy(&value, &tv->value.f32_bits, sizeof(float));
-      snprintf(buffer, size, "f32:%g", value);
+      snprintf(buffer, size, "f32:%f", value);
       break;
     }
 
     case Type::F64: {
       double value;
       memcpy(&value, &tv->value.f64_bits, sizeof(double));
-      snprintf(buffer, size, "f64:%g", value);
+      snprintf(buffer, size, "f64:%f", value);
       break;
     }
 
@@ -230,14 +178,13 @@
   }
 }
 
-static void print_typed_value(const InterpreterTypedValue* tv) {
+static void print_typed_value(const TypedValue* tv) {
   char buffer[MAX_TYPED_VALUE_CHARS];
   sprint_typed_value(buffer, sizeof(buffer), tv);
   printf("%s", buffer);
 }
 
-static void print_typed_value_vector(
-    const std::vector<InterpreterTypedValue>& values) {
+static void print_typed_value_vector(const std::vector<TypedValue>& values) {
   for (size_t i = 0; i < values.size(); ++i) {
     print_typed_value(&values[i]);
     if (i != values.size() - 1)
@@ -246,21 +193,21 @@
 }
 
 static void print_interpreter_result(const char* desc,
-                                     InterpreterResult iresult) {
+                                     interpreter::Result iresult) {
   printf("%s: %s\n", desc, s_trap_strings[static_cast<size_t>(iresult)]);
 }
 
 static void print_call(StringSlice module_name,
                        StringSlice func_name,
-                       const std::vector<InterpreterTypedValue>& args,
-                       const std::vector<InterpreterTypedValue>& results,
-                       InterpreterResult iresult) {
+                       const std::vector<TypedValue>& args,
+                       const std::vector<TypedValue>& results,
+                       interpreter::Result iresult) {
   if (module_name.length)
     printf(PRIstringslice ".", WABT_PRINTF_STRING_SLICE_ARG(module_name));
   printf(PRIstringslice "(", WABT_PRINTF_STRING_SLICE_ARG(func_name));
   print_typed_value_vector(args);
   printf(") =>");
-  if (iresult == InterpreterResult::Ok) {
+  if (iresult == interpreter::Result::Ok) {
     if (results.size() > 0) {
       printf(" ");
       print_typed_value_vector(results);
@@ -271,103 +218,34 @@
   }
 }
 
-static InterpreterResult run_defined_function(InterpreterThread* thread,
-                                              uint32_t offset) {
-  thread->pc = offset;
-  InterpreterResult iresult = InterpreterResult::Ok;
-  uint32_t quantum = s_trace ? 1 : INSTRUCTION_QUANTUM;
-  uint32_t* call_stack_return_top = thread->call_stack_top;
-  while (iresult == InterpreterResult::Ok) {
-    if (s_trace)
-      trace_pc(thread, s_stdout_stream);
-    iresult = run_interpreter(thread, quantum, call_stack_return_top);
-  }
-  if (iresult != InterpreterResult::Returned)
-    return iresult;
-  /* use OK instead of RETURNED for consistency */
-  return InterpreterResult::Ok;
+static interpreter::Result run_function(Thread* thread,
+                                        Index func_index,
+                                        const std::vector<TypedValue>& args,
+                                        std::vector<TypedValue>* out_results) {
+  return s_trace ? thread->TraceFunction(func_index, s_stdout_stream.get(),
+                                         args, out_results)
+                 : thread->RunFunction(func_index, args, out_results);
 }
 
-static InterpreterResult push_args(
-    InterpreterThread* thread,
-    const InterpreterFuncSignature* sig,
-    const std::vector<InterpreterTypedValue>& args) {
-  if (sig->param_types.size() != args.size())
-    return InterpreterResult::ArgumentTypeMismatch;
-
-  for (size_t i = 0; i < sig->param_types.size(); ++i) {
-    if (sig->param_types[i] != args[i].type)
-      return InterpreterResult::ArgumentTypeMismatch;
-
-    InterpreterResult iresult = push_thread_value(thread, args[i].value);
-    if (iresult != InterpreterResult::Ok) {
-      thread->value_stack_top = thread->value_stack.data();
-      return iresult;
-    }
-  }
-  return InterpreterResult::Ok;
-}
-
-static void copy_results(InterpreterThread* thread,
-                         const InterpreterFuncSignature* sig,
-                         std::vector<InterpreterTypedValue>* out_results) {
-  size_t expected_results = sig->result_types.size();
-  size_t value_stack_depth =
-      thread->value_stack_top - thread->value_stack.data();
-  WABT_USE(value_stack_depth);
-  assert(expected_results == value_stack_depth);
-
-  out_results->clear();
-  for (size_t i = 0; i < expected_results; ++i)
-    out_results->emplace_back(sig->result_types[i], thread->value_stack[i]);
-}
-
-static InterpreterResult run_function(
-    InterpreterThread* thread,
-    uint32_t func_index,
-    const std::vector<InterpreterTypedValue>& args,
-    std::vector<InterpreterTypedValue>* out_results) {
-  assert(func_index < thread->env->funcs.size());
-  InterpreterFunc* func = thread->env->funcs[func_index].get();
-  uint32_t sig_index = func->sig_index;
-  assert(sig_index < thread->env->sigs.size());
-  InterpreterFuncSignature* sig = &thread->env->sigs[sig_index];
-
-  InterpreterResult iresult = push_args(thread, sig, args);
-  if (iresult == InterpreterResult::Ok) {
-    iresult = func->is_host
-                  ? call_host(thread, func->as_host())
-                  : run_defined_function(thread, func->as_defined()->offset);
-    if (iresult == InterpreterResult::Ok)
-      copy_results(thread, sig, out_results);
-  }
-
-  /* Always reset the value and call stacks */
-  thread->value_stack_top = thread->value_stack.data();
-  thread->call_stack_top = thread->call_stack.data();
-  return iresult;
-}
-
-static InterpreterResult run_start_function(InterpreterThread* thread,
-                                            DefinedInterpreterModule* module) {
-  if (module->start_func_index == WABT_INVALID_INDEX)
-    return InterpreterResult::Ok;
+static interpreter::Result run_start_function(Thread* thread,
+                                              DefinedModule* module) {
+  if (module->start_func_index == kInvalidIndex)
+    return interpreter::Result::Ok;
 
   if (s_trace)
     printf(">>> running start function:\n");
-  std::vector<InterpreterTypedValue> args;
-  std::vector<InterpreterTypedValue> results;
-  InterpreterResult iresult =
+  std::vector<TypedValue> args;
+  std::vector<TypedValue> results;
+  interpreter::Result iresult =
       run_function(thread, module->start_func_index, args, &results);
   assert(results.size() == 0);
   return iresult;
 }
 
-static InterpreterResult run_export(
-    InterpreterThread* thread,
-    const InterpreterExport* export_,
-    const std::vector<InterpreterTypedValue>& args,
-    std::vector<InterpreterTypedValue>* out_results) {
+static interpreter::Result run_export(Thread* thread,
+                                      const Export* export_,
+                                      const std::vector<TypedValue>& args,
+                                      std::vector<TypedValue>* out_results) {
   if (s_trace) {
     printf(">>> running export \"" PRIstringslice "\":\n",
            WABT_PRINTF_STRING_SLICE_ARG(export_->name));
@@ -377,56 +255,56 @@
   return run_function(thread, export_->index, args, out_results);
 }
 
-static InterpreterResult run_export_by_name(
-    InterpreterThread* thread,
-    InterpreterModule* module,
+static interpreter::Result run_export_by_name(
+    Thread* thread,
+    Module* module,
     const StringSlice* name,
-    const std::vector<InterpreterTypedValue>& args,
-    std::vector<InterpreterTypedValue>* out_results,
+    const std::vector<TypedValue>& args,
+    std::vector<TypedValue>* out_results,
     RunVerbosity verbose) {
-  InterpreterExport* export_ = get_interpreter_export_by_name(module, name);
+  Export* export_ = module->GetExport(*name);
   if (!export_)
-    return InterpreterResult::UnknownExport;
+    return interpreter::Result::UnknownExport;
   if (export_->kind != ExternalKind::Func)
-    return InterpreterResult::ExportKindMismatch;
+    return interpreter::Result::ExportKindMismatch;
   return run_export(thread, export_, args, out_results);
 }
 
-static InterpreterResult get_global_export_by_name(
-    InterpreterThread* thread,
-    InterpreterModule* module,
+static interpreter::Result get_global_export_by_name(
+    Thread* thread,
+    Module* module,
     const StringSlice* name,
-    std::vector<InterpreterTypedValue>* out_results) {
-  InterpreterExport* export_ = get_interpreter_export_by_name(module, name);
+    std::vector<TypedValue>* out_results) {
+  Export* export_ = module->GetExport(*name);
   if (!export_)
-    return InterpreterResult::UnknownExport;
+    return interpreter::Result::UnknownExport;
   if (export_->kind != ExternalKind::Global)
-    return InterpreterResult::ExportKindMismatch;
+    return interpreter::Result::ExportKindMismatch;
 
-  InterpreterGlobal* global = &thread->env->globals[export_->index];
+  Global* global = thread->env()->GetGlobal(export_->index);
   out_results->clear();
   out_results->push_back(global->typed_value);
-  return InterpreterResult::Ok;
+  return interpreter::Result::Ok;
 }
 
-static void run_all_exports(InterpreterModule* module,
-                            InterpreterThread* thread,
+static void run_all_exports(Module* module,
+                            Thread* thread,
                             RunVerbosity verbose) {
-  std::vector<InterpreterTypedValue> args;
-  std::vector<InterpreterTypedValue> results;
-  for (const InterpreterExport& export_: module->exports) {
-    InterpreterResult iresult = run_export(thread, &export_, args, &results);
+  std::vector<TypedValue> args;
+  std::vector<TypedValue> results;
+  for (const Export& export_ : module->exports) {
+    interpreter::Result iresult = run_export(thread, &export_, args, &results);
     if (verbose == RunVerbosity::Verbose) {
       print_call(empty_string_slice(), export_.name, args, results, iresult);
     }
   }
 }
 
-static Result read_module(const char* module_filename,
-                          InterpreterEnvironment* env,
-                          BinaryErrorHandler* error_handler,
-                          DefinedInterpreterModule** out_module) {
-  Result result;
+static wabt::Result read_module(const char* module_filename,
+                                Environment* env,
+                                BinaryErrorHandler* error_handler,
+                                DefinedModule** out_module) {
+  wabt::Result result;
   char* data;
   size_t size;
 
@@ -439,32 +317,31 @@
 
     if (WABT_SUCCEEDED(result)) {
       if (s_verbose)
-        disassemble_module(env, s_stdout_stream, *out_module);
+        env->DisassembleModule(s_stdout_stream.get(), *out_module);
     }
     delete[] data;
   }
   return result;
 }
 
-static Result default_host_callback(const HostInterpreterFunc* func,
-                                    const InterpreterFuncSignature* sig,
-                                    uint32_t num_args,
-                                    InterpreterTypedValue* args,
-                                    uint32_t num_results,
-                                    InterpreterTypedValue* out_results,
-                                    void* user_data) {
-  memset(out_results, 0, sizeof(InterpreterTypedValue) * num_results);
-  for (uint32_t i = 0; i < num_results; ++i)
+static interpreter::Result default_host_callback(const HostFunc* func,
+                                                 const FuncSignature* sig,
+                                                 Index num_args,
+                                                 TypedValue* args,
+                                                 Index num_results,
+                                                 TypedValue* out_results,
+                                                 void* user_data) {
+  memset(out_results, 0, sizeof(TypedValue) * num_results);
+  for (Index i = 0; i < num_results; ++i)
     out_results[i].type = sig->result_types[i];
 
-  std::vector<InterpreterTypedValue> vec_args(args, args + num_args);
-  std::vector<InterpreterTypedValue> vec_results(out_results,
-                                                 out_results + num_results);
+  std::vector<TypedValue> vec_args(args, args + num_args);
+  std::vector<TypedValue> vec_results(out_results, out_results + num_results);
 
   printf("called host ");
   print_call(func->module_name, func->field_name, vec_args, vec_results,
-             InterpreterResult::Ok);
-  return Result::Ok;
+             interpreter::Result::Ok);
+  return interpreter::Result::Ok;
 }
 
 #define PRIimport "\"" PRIstringslice "." PRIstringslice "\""
@@ -472,136 +349,132 @@
   WABT_PRINTF_STRING_SLICE_ARG((x).module_name) \
   , WABT_PRINTF_STRING_SLICE_ARG((x).field_name)
 
-static void WABT_PRINTF_FORMAT(2, 3)
-    print_error(PrintErrorCallback callback, const char* format, ...) {
-  WABT_SNPRINTF_ALLOCA(buffer, length, format);
-  callback.print_error(buffer, callback.user_data);
-}
-
-static Result spectest_import_func(InterpreterImport* import,
-                                   InterpreterFunc* func,
-                                   InterpreterFuncSignature* sig,
-                                   PrintErrorCallback callback,
-                                   void* user_data) {
-  if (string_slice_eq_cstr(&import->field_name, "print")) {
-    func->as_host()->callback = default_host_callback;
-    return Result::Ok;
-  } else {
-    print_error(callback, "unknown host function import " PRIimport,
-                PRINTF_IMPORT_ARG(*import));
-    return Result::Error;
-  }
-}
-
-static Result spectest_import_table(InterpreterImport* import,
-                                    InterpreterTable* table,
-                                    PrintErrorCallback callback,
-                                    void* user_data) {
-  if (string_slice_eq_cstr(&import->field_name, "table")) {
-    table->limits.has_max = true;
-    table->limits.initial = 10;
-    table->limits.max = 20;
-    return Result::Ok;
-  } else {
-    print_error(callback, "unknown host table import " PRIimport,
-                PRINTF_IMPORT_ARG(*import));
-    return Result::Error;
-  }
-}
-
-static Result spectest_import_memory(InterpreterImport* import,
-                                     InterpreterMemory* memory,
-                                     PrintErrorCallback callback,
-                                     void* user_data) {
-  if (string_slice_eq_cstr(&import->field_name, "memory")) {
-    memory->page_limits.has_max = true;
-    memory->page_limits.initial = 1;
-    memory->page_limits.max = 2;
-    memory->data.resize(memory->page_limits.initial * WABT_MAX_PAGES);
-    return Result::Ok;
-  } else {
-    print_error(callback, "unknown host memory import " PRIimport,
-                PRINTF_IMPORT_ARG(*import));
-    return Result::Error;
-  }
-}
-
-static Result spectest_import_global(InterpreterImport* import,
-                                     InterpreterGlobal* global,
-                                     PrintErrorCallback callback,
-                                     void* user_data) {
-  if (string_slice_eq_cstr(&import->field_name, "global")) {
-    switch (global->typed_value.type) {
-      case Type::I32:
-        global->typed_value.value.i32 = 666;
-        break;
-
-      case Type::F32: {
-        float value = 666.6f;
-        memcpy(&global->typed_value.value.f32_bits, &value, sizeof(value));
-        break;
-      }
-
-      case Type::I64:
-        global->typed_value.value.i64 = 666;
-        break;
-
-      case Type::F64: {
-        double value = 666.6;
-        memcpy(&global->typed_value.value.f64_bits, &value, sizeof(value));
-        break;
-      }
-
-      default:
-        print_error(callback, "bad type for host global import " PRIimport,
-                    PRINTF_IMPORT_ARG(*import));
-        return Result::Error;
+class SpectestHostImportDelegate : public HostImportDelegate {
+ public:
+  wabt::Result ImportFunc(Import* import,
+                          Func* func,
+                          FuncSignature* func_sig,
+                          const ErrorCallback& callback) override {
+    if (string_slice_eq_cstr(&import->field_name, "print")) {
+      func->as_host()->callback = default_host_callback;
+      return wabt::Result::Ok;
+    } else {
+      PrintError(callback, "unknown host function import " PRIimport,
+                 PRINTF_IMPORT_ARG(*import));
+      return wabt::Result::Error;
     }
-
-    return Result::Ok;
-  } else {
-    print_error(callback, "unknown host global import " PRIimport,
-                PRINTF_IMPORT_ARG(*import));
-    return Result::Error;
   }
+
+  wabt::Result ImportTable(Import* import,
+                           Table* table,
+                           const ErrorCallback& callback) override {
+    if (string_slice_eq_cstr(&import->field_name, "table")) {
+      table->limits.has_max = true;
+      table->limits.initial = 10;
+      table->limits.max = 20;
+      return wabt::Result::Ok;
+    } else {
+      PrintError(callback, "unknown host table import " PRIimport,
+                 PRINTF_IMPORT_ARG(*import));
+      return wabt::Result::Error;
+    }
+  }
+
+  wabt::Result ImportMemory(Import* import,
+                            Memory* memory,
+                            const ErrorCallback& callback) override {
+    if (string_slice_eq_cstr(&import->field_name, "memory")) {
+      memory->page_limits.has_max = true;
+      memory->page_limits.initial = 1;
+      memory->page_limits.max = 2;
+      memory->data.resize(memory->page_limits.initial * WABT_MAX_PAGES);
+      return wabt::Result::Ok;
+    } else {
+      PrintError(callback, "unknown host memory import " PRIimport,
+                 PRINTF_IMPORT_ARG(*import));
+      return wabt::Result::Error;
+    }
+  }
+
+  wabt::Result ImportGlobal(Import* import,
+                            Global* global,
+                            const ErrorCallback& callback) override {
+    if (string_slice_eq_cstr(&import->field_name, "global")) {
+      switch (global->typed_value.type) {
+        case Type::I32:
+          global->typed_value.value.i32 = 666;
+          break;
+
+        case Type::F32: {
+          float value = 666.6f;
+          memcpy(&global->typed_value.value.f32_bits, &value, sizeof(value));
+          break;
+        }
+
+        case Type::I64:
+          global->typed_value.value.i64 = 666;
+          break;
+
+        case Type::F64: {
+          double value = 666.6;
+          memcpy(&global->typed_value.value.f64_bits, &value, sizeof(value));
+          break;
+        }
+
+        default:
+          PrintError(callback, "bad type for host global import " PRIimport,
+                     PRINTF_IMPORT_ARG(*import));
+          return wabt::Result::Error;
+      }
+
+      return wabt::Result::Ok;
+    } else {
+      PrintError(callback, "unknown host global import " PRIimport,
+                 PRINTF_IMPORT_ARG(*import));
+      return wabt::Result::Error;
+    }
+  }
+
+ private:
+  void PrintError(const ErrorCallback& callback, const char* format, ...) {
+    WABT_SNPRINTF_ALLOCA(buffer, length, format);
+    callback(buffer);
+  }
+};
+
+static void init_environment(Environment* env) {
+  HostModule* host_module =
+      env->AppendHostModule(string_slice_from_cstr("spectest"));
+  host_module->import_delegate.reset(new SpectestHostImportDelegate());
 }
 
-static void init_environment(InterpreterEnvironment* env) {
-  HostInterpreterModule* host_module =
-      append_host_module(env, string_slice_from_cstr("spectest"));
-  host_module->import_delegate.import_func = spectest_import_func;
-  host_module->import_delegate.import_table = spectest_import_table;
-  host_module->import_delegate.import_memory = spectest_import_memory;
-  host_module->import_delegate.import_global = spectest_import_global;
-}
-
-static Result read_and_run_module(const char* module_filename) {
-  Result result;
-  InterpreterEnvironment env;
-  DefinedInterpreterModule* module = nullptr;
-  InterpreterThread thread;
-
+static wabt::Result read_and_run_module(const char* module_filename) {
+  wabt::Result result;
+  Environment env;
   init_environment(&env);
-  init_interpreter_thread(&env, &thread, &s_thread_options);
-  result = read_module(module_filename, &env, &s_error_handler, &module);
+
+  BinaryErrorHandlerFile error_handler;
+  DefinedModule* module = nullptr;
+  result = read_module(module_filename, &env, &error_handler, &module);
   if (WABT_SUCCEEDED(result)) {
-    InterpreterResult iresult = run_start_function(&thread, module);
-    if (iresult == InterpreterResult::Ok) {
+    Thread thread(&env, s_thread_options);
+    interpreter::Result iresult = run_start_function(&thread, module);
+    if (iresult == interpreter::Result::Ok) {
       if (s_run_all_exports)
         run_all_exports(module, &thread, RunVerbosity::Verbose);
     } else {
       print_interpreter_result("error running start function", iresult);
     }
   }
-  destroy_interpreter_environment(&env);
   return result;
 }
 
 /* An extremely simple JSON parser that only knows how to parse the expected
- * format from wast2wabt. */
+ * format from wast2wasm. */
 struct Context {
   Context()
-      : last_module(nullptr),
+      : thread(&env, s_thread_options),
+        last_module(nullptr),
         json_data(nullptr),
         json_data_size(0),
         json_offset(0),
@@ -614,9 +487,9 @@
     WABT_ZERO_MEMORY(prev_loc);
   }
 
-  InterpreterEnvironment env;
-  InterpreterThread thread;
-  DefinedInterpreterModule* last_module;
+  Environment env;
+  Thread thread;
+  DefinedModule* last_module;
 
   /* Parsing info */
   char* json_data;
@@ -647,13 +520,13 @@
   ActionType type = ActionType::Invoke;
   StringSlice module_name;
   StringSlice field_name;
-  std::vector<InterpreterTypedValue> args;
+  std::vector<TypedValue> args;
 };
 
-#define CHECK_RESULT(x)     \
-  do {                      \
-    if (WABT_FAILED(x))     \
-      return Result::Error; \
+#define CHECK_RESULT(x)           \
+  do {                            \
+    if (WABT_FAILED(x))           \
+      return wabt::Result::Error; \
   } while (0)
 
 #define EXPECT(x) CHECK_RESULT(expect(ctx, x))
@@ -733,26 +606,26 @@
   }
 }
 
-static Result expect(Context* ctx, const char* s) {
+static wabt::Result expect(Context* ctx, const char* s) {
   if (match(ctx, s)) {
-    return Result::Ok;
+    return wabt::Result::Ok;
   } else {
     print_parse_error(ctx, "expected %s", s);
-    return Result::Error;
+    return wabt::Result::Error;
   }
 }
 
-static Result expect_key(Context* ctx, const char* key) {
+static wabt::Result expect_key(Context* ctx, const char* key) {
   size_t keylen = strlen(key);
   size_t quoted_len = keylen + 2 + 1;
   char* quoted = static_cast<char*>(alloca(quoted_len));
   snprintf(quoted, quoted_len, "\"%s\"", key);
   EXPECT(quoted);
   EXPECT(":");
-  return Result::Ok;
+  return wabt::Result::Ok;
 }
 
-static Result parse_uint32(Context* ctx, uint32_t* out_int) {
+static wabt::Result parse_uint32(Context* ctx, uint32_t* out_int) {
   uint32_t result = 0;
   skip_whitespace(ctx);
   while (1) {
@@ -762,7 +635,7 @@
       result = result * 10 + static_cast<uint32_t>(c - '0');
       if (result < last_result) {
         print_parse_error(ctx, "uint32 overflow");
-        return Result::Error;
+        return wabt::Result::Error;
       }
     } else {
       putback_char(ctx);
@@ -770,16 +643,16 @@
     }
   }
   *out_int = result;
-  return Result::Ok;
+  return wabt::Result::Ok;
 }
 
-static Result parse_string(Context* ctx, StringSlice* out_string) {
+static wabt::Result parse_string(Context* ctx, StringSlice* out_string) {
   WABT_ZERO_MEMORY(*out_string);
 
   skip_whitespace(ctx);
   if (read_char(ctx) != '"') {
     print_parse_error(ctx, "expected string");
-    return Result::Error;
+    return wabt::Result::Error;
   }
   /* Modify json_data in-place so we can use the StringSlice directly
    * without having to allocate additional memory; this is only necessary when
@@ -797,7 +670,7 @@
       c = read_char(ctx);
       if (c != 'u') {
         print_parse_error(ctx, "expected escape: \\uxxxx");
-        return Result::Error;
+        return wabt::Result::Error;
       }
       uint16_t code = 0;
       for (int i = 0; i < 4; ++i) {
@@ -811,7 +684,7 @@
           cval = c - 'A' + 10;
         } else {
           print_parse_error(ctx, "expected hex char");
-          return Result::Error;
+          return wabt::Result::Error;
         }
         code = (code << 4) + cval;
       }
@@ -827,35 +700,35 @@
     }
   }
   out_string->length = p - start;
-  return Result::Ok;
+  return wabt::Result::Ok;
 }
 
-static Result parse_key_string_value(Context* ctx,
-                                     const char* key,
-                                     StringSlice* out_string) {
+static wabt::Result parse_key_string_value(Context* ctx,
+                                           const char* key,
+                                           StringSlice* out_string) {
   WABT_ZERO_MEMORY(*out_string);
   EXPECT_KEY(key);
   return parse_string(ctx, out_string);
 }
 
-static Result parse_opt_name_string_value(Context* ctx,
-                                          StringSlice* out_string) {
+static wabt::Result parse_opt_name_string_value(Context* ctx,
+                                                StringSlice* out_string) {
   WABT_ZERO_MEMORY(*out_string);
   if (match(ctx, "\"name\"")) {
     EXPECT(":");
     CHECK_RESULT(parse_string(ctx, out_string));
     EXPECT(",");
   }
-  return Result::Ok;
+  return wabt::Result::Ok;
 }
 
-static Result parse_line(Context* ctx) {
+static wabt::Result parse_line(Context* ctx) {
   EXPECT_KEY("line");
   CHECK_RESULT(parse_uint32(ctx, &ctx->command_line_number));
-  return Result::Ok;
+  return wabt::Result::Ok;
 }
 
-static Result parse_type_object(Context* ctx, Type* out_type) {
+static wabt::Result parse_type_object(Context* ctx, Type* out_type) {
   StringSlice type_str;
   EXPECT("{");
   PARSE_KEY_STRING_VALUE("type", &type_str);
@@ -863,24 +736,24 @@
 
   if (string_slice_eq_cstr(&type_str, "i32")) {
     *out_type = Type::I32;
-    return Result::Ok;
+    return wabt::Result::Ok;
   } else if (string_slice_eq_cstr(&type_str, "f32")) {
     *out_type = Type::F32;
-    return Result::Ok;
+    return wabt::Result::Ok;
   } else if (string_slice_eq_cstr(&type_str, "i64")) {
     *out_type = Type::I64;
-    return Result::Ok;
+    return wabt::Result::Ok;
   } else if (string_slice_eq_cstr(&type_str, "f64")) {
     *out_type = Type::F64;
-    return Result::Ok;
+    return wabt::Result::Ok;
   } else {
     print_parse_error(ctx, "unknown type: \"" PRIstringslice "\"",
                       WABT_PRINTF_STRING_SLICE_ARG(type_str));
-    return Result::Error;
+    return wabt::Result::Error;
   }
 }
 
-static Result parse_type_vector(Context* ctx, TypeVector* out_types) {
+static wabt::Result parse_type_vector(Context* ctx, TypeVector* out_types) {
   out_types->clear();
   EXPECT("[");
   bool first = true;
@@ -892,10 +765,10 @@
     first = false;
     out_types->push_back(type);
   }
-  return Result::Ok;
+  return wabt::Result::Ok;
 }
 
-static Result parse_const(Context* ctx, InterpreterTypedValue* out_value) {
+static wabt::Result parse_const(Context* ctx, TypedValue* out_value) {
   StringSlice type_str;
   StringSlice value_str;
   EXPECT("{");
@@ -913,53 +786,52 @@
                              ParseIntType::UnsignedOnly));
     out_value->type = Type::I32;
     out_value->value.i32 = value;
-    return Result::Ok;
+    return wabt::Result::Ok;
   } else if (string_slice_eq_cstr(&type_str, "f32")) {
     uint32_t value_bits;
     CHECK_RESULT(parse_int32(value_start, value_end, &value_bits,
                              ParseIntType::UnsignedOnly));
     out_value->type = Type::F32;
     out_value->value.f32_bits = value_bits;
-    return Result::Ok;
+    return wabt::Result::Ok;
   } else if (string_slice_eq_cstr(&type_str, "i64")) {
     uint64_t value;
     CHECK_RESULT(parse_int64(value_start, value_end, &value,
                              ParseIntType::UnsignedOnly));
     out_value->type = Type::I64;
     out_value->value.i64 = value;
-    return Result::Ok;
+    return wabt::Result::Ok;
   } else if (string_slice_eq_cstr(&type_str, "f64")) {
     uint64_t value_bits;
     CHECK_RESULT(parse_int64(value_start, value_end, &value_bits,
                              ParseIntType::UnsignedOnly));
     out_value->type = Type::F64;
     out_value->value.f64_bits = value_bits;
-    return Result::Ok;
+    return wabt::Result::Ok;
   } else {
     print_parse_error(ctx, "unknown type: \"" PRIstringslice "\"",
                       WABT_PRINTF_STRING_SLICE_ARG(type_str));
-    return Result::Error;
+    return wabt::Result::Error;
   }
 }
 
-static Result parse_const_vector(
-    Context* ctx,
-    std::vector<InterpreterTypedValue>* out_values) {
+static wabt::Result parse_const_vector(Context* ctx,
+                                       std::vector<TypedValue>* out_values) {
   out_values->clear();
   EXPECT("[");
   bool first = true;
   while (!match(ctx, "]")) {
     if (!first)
       EXPECT(",");
-    InterpreterTypedValue value;
+    TypedValue value;
     CHECK_RESULT(parse_const(ctx, &value));
     out_values->push_back(value);
     first = false;
   }
-  return Result::Ok;
+  return wabt::Result::Ok;
 }
 
-static Result parse_action(Context* ctx, Action* out_action) {
+static wabt::Result parse_action(Context* ctx, Action* out_action) {
   EXPECT_KEY("action");
   EXPECT("{");
   EXPECT_KEY("type");
@@ -982,7 +854,31 @@
     CHECK_RESULT(parse_const_vector(ctx, &out_action->args));
   }
   EXPECT("}");
-  return Result::Ok;
+  return wabt::Result::Ok;
+}
+
+static wabt::Result parse_module_type(Context* ctx, ModuleType* out_type) {
+  StringSlice module_type_str;
+  WABT_ZERO_MEMORY(module_type_str);
+
+  PARSE_KEY_STRING_VALUE("module_type", &module_type_str);
+  if (string_slice_eq_cstr(&module_type_str, "text")) {
+    *out_type = ModuleType::Text;
+    return wabt::Result::Ok;
+  } else if (string_slice_eq_cstr(&module_type_str, "binary")) {
+    *out_type = ModuleType::Binary;
+    return wabt::Result::Ok;
+  } else {
+    print_parse_error(ctx, "unknown module type: \"" PRIstringslice "\"",
+                      WABT_PRINTF_STRING_SLICE_ARG(module_type_str));
+    return wabt::Result::Error;
+  }
+}
+
+static void convert_backslash_to_slash(char* s, size_t length) {
+  for (size_t i = 0; i < length; ++i)
+    if (s[i] == '\\')
+      s[i] = '/';
 }
 
 static char* create_module_path(Context* ctx, StringSlice filename) {
@@ -1000,58 +896,58 @@
              WABT_PRINTF_STRING_SLICE_ARG(filename));
   }
 
+  convert_backslash_to_slash(path, path_len);
   return path;
 }
 
-static Result on_module_command(Context* ctx,
-                                StringSlice filename,
-                                StringSlice name) {
+static wabt::Result on_module_command(Context* ctx,
+                                      StringSlice filename,
+                                      StringSlice name) {
   char* path = create_module_path(ctx, filename);
-  InterpreterEnvironmentMark mark = mark_interpreter_environment(&ctx->env);
-  Result result =
-      read_module(path, &ctx->env, &s_error_handler, &ctx->last_module);
+  Environment::MarkPoint mark = ctx->env.Mark();
+  BinaryErrorHandlerFile error_handler;
+  wabt::Result result =
+      read_module(path, &ctx->env, &error_handler, &ctx->last_module);
 
   if (WABT_FAILED(result)) {
-    reset_interpreter_environment_to_mark(&ctx->env, mark);
+    ctx->env.ResetToMarkPoint(mark);
     print_command_error(ctx, "error reading module: \"%s\"", path);
     delete[] path;
-    return Result::Error;
+    return wabt::Result::Error;
   }
 
   delete[] path;
 
-  InterpreterResult iresult =
+  interpreter::Result iresult =
       run_start_function(&ctx->thread, ctx->last_module);
-  if (iresult != InterpreterResult::Ok) {
-    reset_interpreter_environment_to_mark(&ctx->env, mark);
+  if (iresult != interpreter::Result::Ok) {
+    ctx->env.ResetToMarkPoint(mark);
     print_interpreter_result("error running start function", iresult);
-    return Result::Error;
+    return wabt::Result::Error;
   }
 
   if (!string_slice_is_empty(&name)) {
     ctx->last_module->name = dup_string_slice(name);
-    ctx->env.module_bindings.emplace(string_slice_to_string(name),
-                                     Binding(ctx->env.modules.size() - 1));
+    ctx->env.EmplaceModuleBinding(string_slice_to_string(name),
+                                  Binding(ctx->env.GetModuleCount() - 1));
   }
-  return Result::Ok;
+  return wabt::Result::Ok;
 }
 
-static Result run_action(Context* ctx,
-                         Action* action,
-                         InterpreterResult* out_iresult,
-                         std::vector<InterpreterTypedValue>* out_results,
-                         RunVerbosity verbose) {
+static wabt::Result run_action(Context* ctx,
+                               Action* action,
+                               interpreter::Result* out_iresult,
+                               std::vector<TypedValue>* out_results,
+                               RunVerbosity verbose) {
   out_results->clear();
 
-  int module_index;
+  Module* module;
   if (!string_slice_is_empty(&action->module_name)) {
-    module_index = ctx->env.module_bindings.find_index(action->module_name);
+    module = ctx->env.FindModule(action->module_name);
   } else {
-    module_index = static_cast<int>(ctx->env.modules.size()) - 1;
+    module = ctx->env.GetLastModule();
   }
-
-  assert(module_index < static_cast<int>(ctx->env.modules.size()));
-  InterpreterModule* module = ctx->env.modules[module_index].get();
+  assert(module);
 
   switch (action->type) {
     case ActionType::Invoke:
@@ -1062,209 +958,202 @@
         print_call(empty_string_slice(), action->field_name, action->args,
                    *out_results, *out_iresult);
       }
-      return Result::Ok;
+      return wabt::Result::Ok;
 
     case ActionType::Get: {
       *out_iresult = get_global_export_by_name(
           &ctx->thread, module, &action->field_name, out_results);
-      return Result::Ok;
+      return wabt::Result::Ok;
     }
 
     default:
       print_command_error(ctx, "invalid action type %d",
                           static_cast<int>(action->type));
-      return Result::Error;
+      return wabt::Result::Error;
   }
 }
 
-static Result on_action_command(Context* ctx, Action* action) {
-  std::vector<InterpreterTypedValue> results;
-  InterpreterResult iresult;
+static wabt::Result on_action_command(Context* ctx, Action* action) {
+  std::vector<TypedValue> results;
+  interpreter::Result iresult;
 
   ctx->total++;
-  Result result =
+  wabt::Result result =
       run_action(ctx, action, &iresult, &results, RunVerbosity::Verbose);
   if (WABT_SUCCEEDED(result)) {
-    if (iresult == InterpreterResult::Ok) {
+    if (iresult == interpreter::Result::Ok) {
       ctx->passed++;
     } else {
       print_command_error(ctx, "unexpected trap: %s",
                           s_trap_strings[static_cast<size_t>(iresult)]);
-      result = Result::Error;
+      result = wabt::Result::Error;
     }
   }
 
   return result;
 }
 
-static BinaryErrorHandler* new_custom_error_handler(Context* ctx,
-                                                    const char* desc) {
-  size_t header_size = ctx->source_filename.length + strlen(desc) + 100;
-  char* header = new char[header_size];
-  snprintf(header, header_size, PRIstringslice ":%d: %s passed",
-           WABT_PRINTF_STRING_SLICE_ARG(ctx->source_filename),
-           ctx->command_line_number, desc);
-
-  DefaultErrorHandlerInfo* info = new DefaultErrorHandlerInfo();
-  info->header = header;
-  info->out_file = stdout;
-  info->print_header = PrintErrorHeader::Once;
-
-  BinaryErrorHandler* error_handler = new BinaryErrorHandler();
-  error_handler->on_error = default_binary_error_callback;
-  error_handler->user_data = info;
-  return error_handler;
+static wabt::Result read_invalid_text_module(
+    const char* module_filename,
+    Environment* env,
+    SourceErrorHandler* source_error_handler) {
+  std::unique_ptr<WastLexer> lexer =
+      WastLexer::CreateFileLexer(module_filename);
+  wabt::Result result = parse_wast(lexer.get(), nullptr, source_error_handler);
+  return result;
 }
 
-static void destroy_custom_error_handler(BinaryErrorHandler* error_handler) {
-  DefaultErrorHandlerInfo* info =
-      static_cast<DefaultErrorHandlerInfo*>(error_handler->user_data);
-  delete [] info->header;
-  delete info;
-  delete error_handler;
+static wabt::Result read_invalid_module(Context* ctx,
+                                        const char* module_filename,
+                                        Environment* env,
+                                        ModuleType module_type,
+                                        const char* desc) {
+  std::string header =
+      string_printf(PRIstringslice ":%d: %s passed",
+                    WABT_PRINTF_STRING_SLICE_ARG(ctx->source_filename),
+                    ctx->command_line_number, desc);
+
+  switch (module_type) {
+    case ModuleType::Text: {
+      SourceErrorHandlerFile error_handler(
+          stdout, header, SourceErrorHandlerFile::PrintHeader::Once);
+      return read_invalid_text_module(module_filename, env, &error_handler);
+    }
+
+    case ModuleType::Binary: {
+      DefinedModule* module;
+      BinaryErrorHandlerFile error_handler(
+          stdout, header, BinaryErrorHandlerFile::PrintHeader::Once);
+      return read_module(module_filename, env, &error_handler, &module);
+    }
+
+    default:
+      return wabt::Result::Error;
+  }
 }
 
-static Result on_assert_malformed_command(Context* ctx,
-                                          StringSlice filename,
-                                          StringSlice text) {
-  BinaryErrorHandler* error_handler =
-      new_custom_error_handler(ctx, "assert_malformed");
-  InterpreterEnvironment env;
+static wabt::Result on_assert_malformed_command(Context* ctx,
+                                                StringSlice filename,
+                                                StringSlice text,
+                                                ModuleType module_type) {
+  Environment env;
   init_environment(&env);
 
   ctx->total++;
   char* path = create_module_path(ctx, filename);
-  DefinedInterpreterModule* module;
-  Result result = read_module(path, &env, error_handler, &module);
+  wabt::Result result =
+      read_invalid_module(ctx, path, &env, module_type, "assert_malformed");
   if (WABT_FAILED(result)) {
     ctx->passed++;
-    result = Result::Ok;
+    result = wabt::Result::Ok;
   } else {
     print_command_error(ctx, "expected module to be malformed: \"%s\"", path);
-    result = Result::Error;
+    result = wabt::Result::Error;
   }
 
   delete[] path;
-  destroy_interpreter_environment(&env);
-  destroy_custom_error_handler(error_handler);
   return result;
 }
 
-static Result on_register_command(Context* ctx,
-                                  StringSlice name,
-                                  StringSlice as) {
-  int module_index;
+static wabt::Result on_register_command(Context* ctx,
+                                        StringSlice name,
+                                        StringSlice as) {
+  Index module_index;
   if (!string_slice_is_empty(&name)) {
-    /* The module names can be different than their registered names. We don't
-     * keep a hash for the module names (just the registered names), so we'll
-     * just iterate over all the modules to find it. */
-    module_index = -1;
-    for (size_t i = 0; i < ctx->env.modules.size(); ++i) {
-      const StringSlice* module_name = &ctx->env.modules[i]->name;
-      if (!string_slice_is_empty(module_name) &&
-          string_slices_are_equal(&name, module_name)) {
-        module_index = static_cast<int>(i);
-        break;
-      }
-    }
+    module_index = ctx->env.FindModuleIndex(name);
   } else {
-    module_index = static_cast<int>(ctx->env.modules.size()) - 1;
+    module_index = ctx->env.GetLastModuleIndex();
   }
 
-  if (module_index < 0 ||
-      module_index >= static_cast<int>(ctx->env.modules.size())) {
+  if (module_index == kInvalidIndex) {
     print_command_error(ctx, "unknown module in register");
-    return Result::Error;
+    return wabt::Result::Error;
   }
 
-  ctx->env.registered_module_bindings.emplace(string_slice_to_string(as),
-                                              Binding(module_index));
-  return Result::Ok;
+  ctx->env.EmplaceRegisteredModuleBinding(string_slice_to_string(as),
+                                          Binding(module_index));
+  return wabt::Result::Ok;
 }
 
-static Result on_assert_unlinkable_command(Context* ctx,
-                                           StringSlice filename,
-                                           StringSlice text) {
-  BinaryErrorHandler* error_handler =
-      new_custom_error_handler(ctx, "assert_unlinkable");
-
+static wabt::Result on_assert_unlinkable_command(Context* ctx,
+                                                 StringSlice filename,
+                                                 StringSlice text,
+                                                 ModuleType module_type) {
   ctx->total++;
   char* path = create_module_path(ctx, filename);
-  DefinedInterpreterModule* module;
-  InterpreterEnvironmentMark mark = mark_interpreter_environment(&ctx->env);
-  Result result = read_module(path, &ctx->env, error_handler, &module);
-  reset_interpreter_environment_to_mark(&ctx->env, mark);
+  Environment::MarkPoint mark = ctx->env.Mark();
+  wabt::Result result = read_invalid_module(ctx, path, &ctx->env, module_type,
+                                            "assert_unlinkable");
+  ctx->env.ResetToMarkPoint(mark);
 
   if (WABT_FAILED(result)) {
     ctx->passed++;
-    result = Result::Ok;
+    result = wabt::Result::Ok;
   } else {
     print_command_error(ctx, "expected module to be unlinkable: \"%s\"", path);
-    result = Result::Error;
+    result = wabt::Result::Error;
   }
 
   delete[] path;
-  destroy_custom_error_handler(error_handler);
   return result;
 }
 
-static Result on_assert_invalid_command(Context* ctx,
-                                        StringSlice filename,
-                                        StringSlice text) {
-  BinaryErrorHandler* error_handler =
-      new_custom_error_handler(ctx, "assert_invalid");
-  InterpreterEnvironment env;
+static wabt::Result on_assert_invalid_command(Context* ctx,
+                                              StringSlice filename,
+                                              StringSlice text,
+                                              ModuleType module_type) {
+  Environment env;
   init_environment(&env);
 
   ctx->total++;
   char* path = create_module_path(ctx, filename);
-  DefinedInterpreterModule* module;
-  Result result = read_module(path, &env, error_handler, &module);
+  wabt::Result result =
+      read_invalid_module(ctx, path, &env, module_type, "assert_invalid");
   if (WABT_FAILED(result)) {
     ctx->passed++;
-    result = Result::Ok;
+    result = wabt::Result::Ok;
   } else {
     print_command_error(ctx, "expected module to be invalid: \"%s\"", path);
-    result = Result::Error;
+    result = wabt::Result::Error;
   }
 
   delete[] path;
-  destroy_interpreter_environment(&env);
-  destroy_custom_error_handler(error_handler);
   return result;
 }
 
-static Result on_assert_uninstantiable_command(Context* ctx,
-                                               StringSlice filename,
-                                               StringSlice text) {
+static wabt::Result on_assert_uninstantiable_command(Context* ctx,
+                                                     StringSlice filename,
+                                                     StringSlice text,
+                                                     ModuleType module_type) {
+  BinaryErrorHandlerFile error_handler;
   ctx->total++;
   char* path = create_module_path(ctx, filename);
-  DefinedInterpreterModule* module;
-  InterpreterEnvironmentMark mark = mark_interpreter_environment(&ctx->env);
-  Result result = read_module(path, &ctx->env, &s_error_handler, &module);
+  DefinedModule* module;
+  Environment::MarkPoint mark = ctx->env.Mark();
+  wabt::Result result = read_module(path, &ctx->env, &error_handler, &module);
 
   if (WABT_SUCCEEDED(result)) {
-    InterpreterResult iresult = run_start_function(&ctx->thread, module);
-    if (iresult == InterpreterResult::Ok) {
+    interpreter::Result iresult = run_start_function(&ctx->thread, module);
+    if (iresult == interpreter::Result::Ok) {
       print_command_error(ctx, "expected error running start function: \"%s\"",
                           path);
-      result = Result::Error;
+      result = wabt::Result::Error;
     } else {
       ctx->passed++;
-      result = Result::Ok;
+      result = wabt::Result::Ok;
     }
   } else {
     print_command_error(ctx, "error reading module: \"%s\"", path);
-    result = Result::Error;
+    result = wabt::Result::Error;
   }
 
-  reset_interpreter_environment_to_mark(&ctx->env, mark);
+  ctx->env.ResetToMarkPoint(mark);
   delete[] path;
   return result;
 }
 
-static bool typed_values_are_equal(const InterpreterTypedValue* tv1,
-                                   const InterpreterTypedValue* tv2) {
+static bool typed_values_are_equal(const TypedValue* tv1,
+                                   const TypedValue* tv2) {
   if (tv1->type != tv2->type)
     return false;
 
@@ -1283,45 +1172,47 @@
   }
 }
 
-static Result on_assert_return_command(
+static wabt::Result on_assert_return_command(
     Context* ctx,
     Action* action,
-    const std::vector<InterpreterTypedValue>& expected) {
-  std::vector<InterpreterTypedValue> results;
-  InterpreterResult iresult;
+    const std::vector<TypedValue>& expected) {
+  std::vector<TypedValue> results;
+  interpreter::Result iresult;
 
   ctx->total++;
-  Result result =
+  wabt::Result result =
       run_action(ctx, action, &iresult, &results, RunVerbosity::Quiet);
 
   if (WABT_SUCCEEDED(result)) {
-    if (iresult == InterpreterResult::Ok) {
+    if (iresult == interpreter::Result::Ok) {
       if (results.size() == expected.size()) {
         for (size_t i = 0; i < results.size(); ++i) {
-          const InterpreterTypedValue* expected_tv = &expected[i];
-          const InterpreterTypedValue* actual_tv = &results[i];
+          const TypedValue* expected_tv = &expected[i];
+          const TypedValue* actual_tv = &results[i];
           if (!typed_values_are_equal(expected_tv, actual_tv)) {
             char expected_str[MAX_TYPED_VALUE_CHARS];
             char actual_str[MAX_TYPED_VALUE_CHARS];
             sprint_typed_value(expected_str, sizeof(expected_str), expected_tv);
             sprint_typed_value(actual_str, sizeof(actual_str), actual_tv);
-            print_command_error(ctx, "mismatch in result %" PRIzd
-                                     " of assert_return: expected %s, got %s",
+            print_command_error(ctx,
+                                "mismatch in result %" PRIzd
+                                " of assert_return: expected %s, got %s",
                                 i, expected_str, actual_str);
-            result = Result::Error;
+            result = wabt::Result::Error;
           }
         }
       } else {
         print_command_error(
-            ctx, "result length mismatch in assert_return: expected %" PRIzd
-                 ", got %" PRIzd,
+            ctx,
+            "result length mismatch in assert_return: expected %" PRIzd
+            ", got %" PRIzd,
             expected.size(), results.size());
-        result = Result::Error;
+        result = wabt::Result::Error;
       }
     } else {
       print_command_error(ctx, "unexpected trap: %s",
                           s_trap_strings[static_cast<size_t>(iresult)]);
-      result = Result::Error;
+      result = wabt::Result::Error;
     }
   }
 
@@ -1331,24 +1222,24 @@
   return result;
 }
 
-static Result on_assert_return_nan_command(Context* ctx,
-                                           Action* action,
-                                           bool canonical) {
-  std::vector<InterpreterTypedValue> results;
-  InterpreterResult iresult;
+static wabt::Result on_assert_return_nan_command(Context* ctx,
+                                                 Action* action,
+                                                 bool canonical) {
+  std::vector<TypedValue> results;
+  interpreter::Result iresult;
 
   ctx->total++;
-  Result result =
+  wabt::Result result =
       run_action(ctx, action, &iresult, &results, RunVerbosity::Quiet);
   if (WABT_SUCCEEDED(result)) {
-    if (iresult == InterpreterResult::Ok) {
+    if (iresult == interpreter::Result::Ok) {
       if (results.size() != 1) {
         print_command_error(ctx, "expected one result, got %" PRIzd,
                             results.size());
-        result = Result::Error;
+        result = wabt::Result::Error;
       }
 
-      const InterpreterTypedValue& actual = results[0];
+      const TypedValue& actual = results[0];
       switch (actual.type) {
         case Type::F32: {
           typedef bool (*IsNanFunc)(uint32_t);
@@ -1359,7 +1250,7 @@
             sprint_typed_value(actual_str, sizeof(actual_str), &actual);
             print_command_error(ctx, "expected result to be nan, got %s",
                                 actual_str);
-            result = Result::Error;
+            result = wabt::Result::Error;
           }
           break;
         }
@@ -1373,7 +1264,7 @@
             sprint_typed_value(actual_str, sizeof(actual_str), &actual);
             print_command_error(ctx, "expected result to be nan, got %s",
                                 actual_str);
-            result = Result::Error;
+            result = wabt::Result::Error;
           }
           break;
         }
@@ -1382,65 +1273,65 @@
           print_command_error(ctx,
                               "expected result type to be f32 or f64, got %s",
                               get_type_name(actual.type));
-          result = Result::Error;
+          result = wabt::Result::Error;
           break;
       }
     } else {
       print_command_error(ctx, "unexpected trap: %s",
                           s_trap_strings[static_cast<int>(iresult)]);
-      result = Result::Error;
+      result = wabt::Result::Error;
     }
   }
 
   if (WABT_SUCCEEDED(result))
     ctx->passed++;
 
-  return Result::Ok;
+  return wabt::Result::Ok;
 }
 
-static Result on_assert_trap_command(Context* ctx,
-                                     Action* action,
-                                     StringSlice text) {
-  std::vector<InterpreterTypedValue> results;
-  InterpreterResult iresult;
+static wabt::Result on_assert_trap_command(Context* ctx,
+                                           Action* action,
+                                           StringSlice text) {
+  std::vector<TypedValue> results;
+  interpreter::Result iresult;
 
   ctx->total++;
-  Result result =
+  wabt::Result result =
       run_action(ctx, action, &iresult, &results, RunVerbosity::Quiet);
   if (WABT_SUCCEEDED(result)) {
-    if (iresult != InterpreterResult::Ok) {
+    if (iresult != interpreter::Result::Ok) {
       ctx->passed++;
     } else {
       print_command_error(ctx, "expected trap: \"" PRIstringslice "\"",
                           WABT_PRINTF_STRING_SLICE_ARG(text));
-      result = Result::Error;
+      result = wabt::Result::Error;
     }
   }
 
   return result;
 }
 
-static Result on_assert_exhaustion_command(Context* ctx, Action* action) {
-  std::vector<InterpreterTypedValue> results;
-  InterpreterResult iresult;
+static wabt::Result on_assert_exhaustion_command(Context* ctx, Action* action) {
+  std::vector<TypedValue> results;
+  interpreter::Result iresult;
 
   ctx->total++;
-  Result result =
+  wabt::Result result =
       run_action(ctx, action, &iresult, &results, RunVerbosity::Quiet);
   if (WABT_SUCCEEDED(result)) {
-    if (iresult == InterpreterResult::TrapCallStackExhausted ||
-        iresult == InterpreterResult::TrapValueStackExhausted) {
+    if (iresult == interpreter::Result::TrapCallStackExhausted ||
+        iresult == interpreter::Result::TrapValueStackExhausted) {
       ctx->passed++;
     } else {
       print_command_error(ctx, "expected call stack exhaustion");
-      result = Result::Error;
+      result = wabt::Result::Error;
     }
   }
 
   return result;
 }
 
-static Result parse_command(Context* ctx) {
+static wabt::Result parse_command(Context* ctx) {
   EXPECT("{");
   EXPECT_KEY("type");
   if (match(ctx, "\"module\"")) {
@@ -1478,6 +1369,7 @@
   } else if (match(ctx, "\"assert_malformed\"")) {
     StringSlice filename;
     StringSlice text;
+    ModuleType module_type;
     WABT_ZERO_MEMORY(filename);
     WABT_ZERO_MEMORY(text);
 
@@ -1487,20 +1379,29 @@
     PARSE_KEY_STRING_VALUE("filename", &filename);
     EXPECT(",");
     PARSE_KEY_STRING_VALUE("text", &text);
-    on_assert_malformed_command(ctx, filename, text);
+    EXPECT(",");
+    CHECK_RESULT(parse_module_type(ctx, &module_type));
+    on_assert_malformed_command(ctx, filename, text, module_type);
   } else if (match(ctx, "\"assert_invalid\"")) {
     StringSlice filename;
     StringSlice text;
+    ModuleType module_type;
+    WABT_ZERO_MEMORY(filename);
+    WABT_ZERO_MEMORY(text);
+
     EXPECT(",");
     CHECK_RESULT(parse_line(ctx));
     EXPECT(",");
     PARSE_KEY_STRING_VALUE("filename", &filename);
     EXPECT(",");
     PARSE_KEY_STRING_VALUE("text", &text);
-    on_assert_invalid_command(ctx, filename, text);
+    EXPECT(",");
+    CHECK_RESULT(parse_module_type(ctx, &module_type));
+    on_assert_invalid_command(ctx, filename, text, module_type);
   } else if (match(ctx, "\"assert_unlinkable\"")) {
     StringSlice filename;
     StringSlice text;
+    ModuleType module_type;
     WABT_ZERO_MEMORY(filename);
     WABT_ZERO_MEMORY(text);
 
@@ -1510,10 +1411,13 @@
     PARSE_KEY_STRING_VALUE("filename", &filename);
     EXPECT(",");
     PARSE_KEY_STRING_VALUE("text", &text);
-    on_assert_unlinkable_command(ctx, filename, text);
+    EXPECT(",");
+    CHECK_RESULT(parse_module_type(ctx, &module_type));
+    on_assert_unlinkable_command(ctx, filename, text, module_type);
   } else if (match(ctx, "\"assert_uninstantiable\"")) {
     StringSlice filename;
     StringSlice text;
+    ModuleType module_type;
     WABT_ZERO_MEMORY(filename);
     WABT_ZERO_MEMORY(text);
 
@@ -1523,10 +1427,12 @@
     PARSE_KEY_STRING_VALUE("filename", &filename);
     EXPECT(",");
     PARSE_KEY_STRING_VALUE("text", &text);
-    on_assert_uninstantiable_command(ctx, filename, text);
+    EXPECT(",");
+    CHECK_RESULT(parse_module_type(ctx, &module_type));
+    on_assert_uninstantiable_command(ctx, filename, text, module_type);
   } else if (match(ctx, "\"assert_return\"")) {
     Action action;
-    std::vector<InterpreterTypedValue> expected;
+    std::vector<TypedValue> expected;
 
     EXPECT(",");
     CHECK_RESULT(parse_line(ctx));
@@ -1586,13 +1492,13 @@
     on_assert_exhaustion_command(ctx, &action);
   } else {
     print_command_error(ctx, "unknown command type");
-    return Result::Error;
+    return wabt::Result::Error;
   }
   EXPECT("}");
-  return Result::Ok;
+  return wabt::Result::Ok;
 }
 
-static Result parse_commands(Context* ctx) {
+static wabt::Result parse_commands(Context* ctx) {
   EXPECT("{");
   PARSE_KEY_STRING_VALUE("source_filename", &ctx->source_filename);
   EXPECT(",");
@@ -1606,27 +1512,25 @@
     first = false;
   }
   EXPECT("}");
-  return Result::Ok;
+  return wabt::Result::Ok;
 }
 
 static void destroy_context(Context* ctx) {
-  destroy_interpreter_environment(&ctx->env);
   delete[] ctx->json_data;
 }
 
-static Result read_and_run_spec_json(const char* spec_json_filename) {
+static wabt::Result read_and_run_spec_json(const char* spec_json_filename) {
   Context ctx;
   ctx.loc.filename = spec_json_filename;
   ctx.loc.line = 1;
   ctx.loc.first_column = 1;
   init_environment(&ctx.env);
-  init_interpreter_thread(&ctx.env, &ctx.thread, &s_thread_options);
 
   char* data;
   size_t size;
-  Result result = read_file(spec_json_filename, &data, &size);
+  wabt::Result result = read_file(spec_json_filename, &data, &size);
   if (WABT_FAILED(result))
-    return Result::Error;
+    return wabt::Result::Error;
 
   ctx.json_data = data;
   ctx.json_data_size = size;
@@ -1637,17 +1541,23 @@
   return result;
 }
 
-int main(int argc, char** argv) {
+int ProgramMain(int argc, char** argv) {
   init_stdio();
   parse_options(argc, argv);
 
-  s_stdout_stream = init_stdout_stream();
+  s_stdout_stream = FileStream::CreateStdout();
 
-  Result result;
+  wabt::Result result;
   if (s_spec) {
     result = read_and_run_spec_json(s_infile);
   } else {
     result = read_and_run_module(s_infile);
   }
-  return result != Result::Ok;
+  return result != wabt::Result::Ok;
+}
+
+int main(int argc, char** argv) {
+  WABT_TRY
+  return ProgramMain(argc, argv);
+  WABT_CATCH_BAD_ALLOC_AND_EXIT
 }
diff --git a/lib/wabt/src/tools/wasm-link.cc b/lib/wabt/src/tools/wasm-link.cc
index 577dff4..522982c 100644
--- a/lib/wabt/src/tools/wasm-link.cc
+++ b/lib/wabt/src/tools/wasm-link.cc
@@ -16,6 +16,9 @@
 
 #include "wasm-link.h"
 
+#include <memory>
+#include <vector>
+
 #include "binary-reader.h"
 #include "binding-hash.h"
 #include "binary-writer.h"
@@ -24,100 +27,52 @@
 #include "writer.h"
 #include "binary-reader-linker.h"
 
-#include <memory>
-#include <vector>
-
-#define PROGRAM_NAME "wasm-link"
-#define NOPE HasArgument::No
-#define YEP HasArgument::Yes
 #define FIRST_KNOWN_SECTION static_cast<size_t>(BinarySection::Type)
+#define LOG_DEBUG(fmt, ...) if (s_debug) s_log_stream->Writef(fmt, __VA_ARGS__);
 
 using namespace wabt;
 using namespace wabt::link;
 
-enum { FLAG_DEBUG, FLAG_OUTPUT, FLAG_RELOCATABLE, FLAG_HELP, NUM_FLAGS };
-
 static const char s_description[] =
-    "  link one or more wasm binary modules into a single binary module."
-    "\n"
-    "  $ wasm-link m1.wasm m2.wasm -o out.wasm\n";
-
-static Option s_options[] = {
-    {FLAG_DEBUG, '\0', "debug", nullptr, NOPE,
-     "log extra information when reading and writing wasm files"},
-    {FLAG_OUTPUT, 'o', "output", "FILE", YEP, "output wasm binary file"},
-    {FLAG_RELOCATABLE, 'r', "relocatable", nullptr, NOPE,
-     "output a relocatable object file"},
-    {FLAG_HELP, 'h', "help", nullptr, NOPE, "print this help message"},
-};
-WABT_STATIC_ASSERT(NUM_FLAGS == WABT_ARRAY_SIZE(s_options));
+R"(  link one or more wasm binary modules into a single binary module.
+  $ wasm-link m1.wasm m2.wasm -o out.wasm
+)";
 
 static bool s_debug;
 static bool s_relocatable;
 static const char* s_outfile = "a.wasm";
 static std::vector<std::string> s_infiles;
-static FileWriter s_log_stream_writer;
-static Stream s_log_stream;
+static std::unique_ptr<FileStream> s_log_stream;
 
 struct Context {
   WABT_DISALLOW_COPY_AND_ASSIGN(Context);
-  Context() {
-    WABT_ZERO_MEMORY(stream);
-  }
+  Context() {}
 
-  Stream stream;
+  MemoryStream stream;
   std::vector<std::unique_ptr<LinkerInputBinary>> inputs;
   ssize_t current_section_payload_offset = 0;
 };
 
-static void on_option(struct OptionParser* parser,
-                      struct Option* option,
-                      const char* argument) {
-  switch (option->id) {
-    case FLAG_DEBUG:
-      s_debug = true;
-      init_file_writer_existing(&s_log_stream_writer, stdout);
-      init_stream(&s_log_stream, &s_log_stream_writer.base, nullptr);
-      break;
-
-    case FLAG_OUTPUT:
-      s_outfile = argument;
-      break;
-
-    case FLAG_RELOCATABLE:
-      s_relocatable = true;
-      break;
-
-    case FLAG_HELP:
-      print_help(parser, PROGRAM_NAME);
-      exit(0);
-      break;
-  }
-}
-
-static void on_argument(struct OptionParser* parser, const char* argument) {
-  s_infiles.emplace_back(argument);
-}
-
-static void on_option_error(struct OptionParser* parser, const char* message) {
-  WABT_FATAL("%s\n", message);
-}
-
 static void parse_options(int argc, char** argv) {
-  OptionParser parser;
-  WABT_ZERO_MEMORY(parser);
-  parser.description = s_description;
-  parser.options = s_options;
-  parser.num_options = WABT_ARRAY_SIZE(s_options);
-  parser.on_option = on_option;
-  parser.on_argument = on_argument;
-  parser.on_error = on_option_error;
-  parse_options(&parser, argc, argv);
+  OptionParser parser("wasm-link", s_description);
 
-  if (!s_infiles.size()) {
-    print_help(&parser, PROGRAM_NAME);
-    WABT_FATAL("No inputs files specified.\n");
-  }
+  parser.AddOption("debug",
+                   "Log extra information when reading and writing wasm files",
+                   []() {
+                     s_debug = true;
+                     s_log_stream = FileStream::CreateStdout();
+                   });
+  parser.AddOption('o', "output", "FILE", "Output wasm binary file",
+                   [](const char* argument) { s_outfile = argument; });
+  parser.AddOption('r', "relocatable", "Output a relocatable object file",
+                   []() { s_relocatable = true; });
+  parser.AddHelpOption();
+
+  parser.AddArgument(
+      "filename", OptionParser::ArgumentCount::OneOrMore,
+      [](const std::string& argument) { s_infiles.emplace_back(argument); });
+
+  parser.Parse(argc, argv);
 }
 
 Section::Section()
@@ -128,11 +83,13 @@
       payload_size(0),
       payload_offset(0),
       count(0),
-      output_payload_offset(0) {}
+      output_payload_offset(0) {
+  WABT_ZERO_MEMORY(data);
+}
 
 Section::~Section() {
   if (section_code == BinarySection::Data) {
-    delete data_segments;
+    delete data.data_segments;
   }
 }
 
@@ -156,57 +113,78 @@
   delete[] data;
 }
 
-static uint32_t relocate_func_index(LinkerInputBinary* binary,
-                                    uint32_t function_index) {
-  uint32_t offset;
-  if (function_index >= binary->function_imports.size()) {
+bool LinkerInputBinary::IsFunctionImport(Index index) {
+  assert(IsValidFunctionIndex(index));
+  return index < function_imports.size();
+}
+
+bool LinkerInputBinary::IsInactiveFunctionImport(Index index){
+  return IsFunctionImport(index) && !function_imports[index].active;
+}
+
+bool LinkerInputBinary::IsValidFunctionIndex(Index index) {
+  return index < function_imports.size() + function_count;
+}
+
+Index LinkerInputBinary::RelocateFuncIndex(Index function_index) {
+  Index offset;
+  if (!IsFunctionImport(function_index)) {
     /* locally declared function call */
-    offset = binary->function_index_offset;
-    if (s_debug)
-      writef(&s_log_stream, "func reloc %d + %d\n", function_index, offset);
+    offset = function_index_offset;
+    LOG_DEBUG("func reloc %d + %d\n", function_index, offset);
   } else {
     /* imported function call */
-    FunctionImport* import = &binary->function_imports[function_index];
-    offset = binary->imported_function_index_offset;
+    FunctionImport* import = &function_imports[function_index];
     if (!import->active) {
       function_index = import->foreign_index;
       offset = import->foreign_binary->function_index_offset;
-      if (s_debug)
-        writef(&s_log_stream,
-               "reloc for disabled import. new index = %d + %d\n",
-               function_index, offset);
+      LOG_DEBUG("reloc for disabled import. new index = %d + %d\n",
+                function_index, offset);
+    } else {
+      Index new_index = import->relocated_function_index;
+      LOG_DEBUG("reloc for active import. old index = %d, new index = %d\n",
+                function_index, new_index);
+      return new_index;
     }
   }
   return function_index + offset;
 }
 
+Index LinkerInputBinary::RelocateTypeIndex(Index type_index) {
+  return type_index + type_index_offset;
+}
+
+Index LinkerInputBinary::RelocateGlobalIndex(Index global_index) {
+  Index offset;
+  if (global_index >= global_imports.size()) {
+    offset = global_index_offset;
+  } else {
+    offset = imported_global_index_offset;
+  }
+  return global_index + offset;
+}
+
 static void apply_relocation(Section* section, Reloc* r) {
   LinkerInputBinary* binary = section->binary;
   uint8_t* section_data = &binary->data[section->offset];
   size_t section_size = section->size;
 
-  uint32_t cur_value = 0, new_value = 0;
+  Index cur_value = 0, new_value = 0;
   read_u32_leb128(section_data + r->offset, section_data + section_size,
                   &cur_value);
 
-  uint32_t offset = 0;
   switch (r->type) {
     case RelocType::FuncIndexLEB:
-      new_value = relocate_func_index(binary, cur_value);
+      new_value = binary->RelocateFuncIndex(cur_value);
+      break;
+    case RelocType::TypeIndexLEB:
+      new_value = binary->RelocateTypeIndex(cur_value);
       break;
     case RelocType::TableIndexSLEB:
-      printf("%s: table index reloc: %d offset=%d\n", binary->filename,
-             cur_value, binary->table_index_offset);
-      offset = binary->table_index_offset;
-      new_value = cur_value + offset;
+      new_value = cur_value + binary->table_index_offset;
       break;
     case RelocType::GlobalIndexLEB:
-      if (cur_value >= binary->global_imports.size()) {
-        offset = binary->global_index_offset;
-      } else {
-        offset = binary->imported_global_index_offset;
-      }
-      new_value = cur_value + offset;
+      new_value = binary->RelocateGlobalIndex(cur_value);
       break;
     default:
       WABT_FATAL("unhandled relocation type: %s\n",
@@ -222,9 +200,7 @@
   if (!section->relocations.size())
     return;
 
-  if (s_debug)
-    writef(&s_log_stream, "apply_relocations: %s\n",
-           get_section_name(section->section_code));
+  LOG_DEBUG("apply_relocations: %s\n", get_section_name(section->section_code));
 
   /* Perform relocations in-place */
   for (Reloc& reloc: section->relocations) {
@@ -236,45 +212,45 @@
   assert(ctx->current_section_payload_offset != -1);
 
   sec->output_payload_offset =
-      ctx->stream.offset - ctx->current_section_payload_offset;
+      ctx->stream.offset() - ctx->current_section_payload_offset;
 
   uint8_t* payload = &sec->binary->data[sec->payload_offset];
-  write_data(&ctx->stream, payload, sec->payload_size, "section content");
+  ctx->stream.WriteData(payload, sec->payload_size, "section content");
 }
 
 static void write_c_str(Stream* stream, const char* str, const char* desc) {
-  write_str(stream, str, strlen(str), PrintChars::Yes, desc);
+  write_str(stream, str, strlen(str), desc, PrintChars::Yes);
 }
 
 static void write_slice(Stream* stream, StringSlice str, const char* desc) {
-  write_str(stream, str.start, str.length, PrintChars::Yes, desc);
+  write_str(stream, str.start, str.length, desc, PrintChars::Yes);
 }
 
 static void write_string(Stream* stream,
                          const std::string& str,
                          const char* desc) {
-  write_str(stream, str.data(), str.length(), PrintChars::Yes, desc);
+  write_str(stream, str.data(), str.length(), desc, PrintChars::Yes);
 }
 
-#define WRITE_UNKNOWN_SIZE(STREAM)                        \
-  {                                                       \
-  uint32_t fixup_offset = (STREAM)->offset;               \
-  write_fixed_u32_leb128(STREAM, 0, "unknown size");      \
-  ctx->current_section_payload_offset = (STREAM)->offset; \
-  uint32_t start = (STREAM)->offset;
+#define WRITE_UNKNOWN_SIZE(STREAM)                            \
+  {                                                           \
+    Offset fixup_offset = (STREAM)->offset();                 \
+    write_fixed_u32_leb128(STREAM, 0, "unknown size");        \
+    ctx->current_section_payload_offset = (STREAM)->offset(); \
+    Offset start = (STREAM)->offset();
 
-#define FIXUP_SIZE(STREAM)                                                  \
-  write_fixed_u32_leb128_at(STREAM, fixup_offset, (STREAM)->offset - start, \
-                            "fixup size");                              \
+#define FIXUP_SIZE(STREAM)                                                    \
+  write_fixed_u32_leb128_at(STREAM, fixup_offset, (STREAM)->offset() - start, \
+                            "fixup size");                                    \
   }
 
 static void write_table_section(Context* ctx,
                                 const SectionPtrVector& sections) {
   /* Total section size includes the element count leb128 which is
    * always 1 in the current spec */
-  uint32_t table_count = 1;
+  Index table_count = 1;
   uint32_t flags = WABT_BINARY_LIMITS_HAS_MAX_FLAG;
-  uint32_t elem_count = 0;
+  Index elem_count = 0;
 
   for (Section* section: sections) {
     elem_count += section->binary->table_elem_count;
@@ -291,7 +267,7 @@
 }
 
 static void write_export_section(Context* ctx) {
-  uint32_t total_exports = 0;
+  Index total_exports = 0;
   for (const std::unique_ptr<LinkerInputBinary>& binary: ctx->inputs) {
     total_exports += binary->exports.size();
   }
@@ -303,11 +279,11 @@
   for (const std::unique_ptr<LinkerInputBinary>& binary : ctx->inputs) {
     for (const Export& export_ : binary->exports) {
       write_slice(stream, export_.name, "export name");
-      write_u8_enum(stream, export_.kind, "export kind");
-      uint32_t index = export_.index;
+      stream->WriteU8Enum(export_.kind, "export kind");
+      Index index = export_.index;
       switch (export_.kind) {
         case ExternalKind::Func:
-          index = relocate_func_index(binary.get(), index);
+          index = binary->RelocateFuncIndex(index);
           break;
         default:
           WABT_FATAL("unsupport export type: %d\n",
@@ -325,7 +301,7 @@
   Stream* stream = &ctx->stream;
   WRITE_UNKNOWN_SIZE(stream);
 
-  uint32_t total_elem_count = 0;
+  Index total_elem_count = 0;
   for (Section* section : sections) {
     total_elem_count += section->binary->table_elem_count;
   }
@@ -337,7 +313,7 @@
   write_opcode(&ctx->stream, Opcode::End);
   write_u32_leb128(stream, total_elem_count, "num elements");
 
-  ctx->current_section_payload_offset = stream->offset;
+  ctx->current_section_payload_offset = stream->offset();
 
   for (Section* section : sections) {
     apply_relocations(section);
@@ -359,7 +335,7 @@
   limits.has_max = true;
   for (size_t i = 0; i < sections.size(); i++) {
     Section* sec = sections[i];
-    limits.initial += sec->memory_limits.initial;
+    limits.initial += sec->data.memory_limits.initial;
   }
   limits.max = limits.initial;
   write_limits(stream, &limits);
@@ -369,24 +345,24 @@
 
 static void write_function_import(Context* ctx,
                                   FunctionImport* import,
-                                  uint32_t offset) {
-  write_c_str(&ctx->stream, WABT_LINK_MODULE_NAME, "import module name");
+                                  Index offset) {
+  write_slice(&ctx->stream, import->module_name, "import module name");
   write_slice(&ctx->stream, import->name, "import field name");
-  write_u8_enum(&ctx->stream, ExternalKind::Func, "import kind");
+  ctx->stream.WriteU8Enum(ExternalKind::Func, "import kind");
   write_u32_leb128(&ctx->stream, import->sig_index + offset,
                    "import signature index");
 }
 
 static void write_global_import(Context* ctx, GlobalImport* import) {
-  write_c_str(&ctx->stream, WABT_LINK_MODULE_NAME, "import module name");
+  write_slice(&ctx->stream, import->module_name, "import module name");
   write_slice(&ctx->stream, import->name, "import field name");
-  write_u8_enum(&ctx->stream, ExternalKind::Global, "import kind");
+  ctx->stream.WriteU8Enum(ExternalKind::Global, "import kind");
   write_type(&ctx->stream, import->type);
-  write_u8(&ctx->stream, import->mutable_, "global mutability");
+  ctx->stream.WriteU8(import->mutable_, "global mutability");
 }
 
 static void write_import_section(Context* ctx) {
-  uint32_t num_imports = 0;
+  Index num_imports = 0;
   for (size_t i = 0; i < ctx->inputs.size(); i++) {
     LinkerInputBinary* binary = ctx->inputs[i].get();
     std::vector<FunctionImport>& imports = binary->function_imports;
@@ -421,7 +397,7 @@
 
 static void write_function_section(Context* ctx,
                                    const SectionPtrVector& sections,
-                                   uint32_t total_count) {
+                                   Index total_count) {
   Stream* stream = &ctx->stream;
   WRITE_UNKNOWN_SIZE(stream);
 
@@ -429,16 +405,16 @@
 
   for (size_t i = 0; i < sections.size(); i++) {
     Section* sec = sections[i];
-    uint32_t count = sec->count;
-    uint32_t input_offset = 0;
-    uint32_t sig_index = 0;
+    Index count = sec->count;
+    Offset input_offset = 0;
+    Index sig_index = 0;
     const uint8_t* start = &sec->binary->data[sec->payload_offset];
     const uint8_t* end =
         &sec->binary->data[sec->payload_offset + sec->payload_size];
     while (count--) {
       input_offset += read_u32_leb128(start + input_offset, end, &sig_index);
-      sig_index += sec->binary->type_index_offset;
-      write_u32_leb128(stream, sig_index, "sig");
+      write_u32_leb128(stream, sec->binary->RelocateTypeIndex(sig_index),
+                       "sig");
     }
   }
 
@@ -447,27 +423,27 @@
 
 static void write_data_segment(Stream* stream,
                                const DataSegment& segment,
-                               uint32_t offset) {
+                               Address offset) {
   assert(segment.memory_index == 0);
   write_u32_leb128(stream, segment.memory_index, "memory index");
   write_opcode(stream, Opcode::I32Const);
   write_u32_leb128(stream, segment.offset + offset, "offset");
   write_opcode(stream, Opcode::End);
   write_u32_leb128(stream, segment.size, "segment size");
-  write_data(stream, segment.data, segment.size, "segment data");
+  stream->WriteData(segment.data, segment.size, "segment data");
 }
 
 static void write_data_section(Context* ctx,
                                const SectionPtrVector& sections,
-                               uint32_t total_count) {
+                               Index total_count) {
   Stream* stream = &ctx->stream;
   WRITE_UNKNOWN_SIZE(stream);
 
   write_u32_leb128(stream, total_count, "data segment count");
   for (size_t i = 0; i < sections.size(); i++) {
     Section* sec = sections[i];
-    for (size_t j = 0; j < sec->data_segments->size(); j++) {
-      const DataSegment& segment = (*sec->data_segments)[j];
+    for (size_t j = 0; j < sec->data.data_segments->size(); j++) {
+      const DataSegment& segment = (*sec->data.data_segments)[j];
       write_data_segment(stream, segment,
                          sec->binary->memory_page_offset * WABT_PAGE_SIZE);
     }
@@ -477,15 +453,13 @@
 }
 
 static void write_names_section(Context* ctx) {
-  uint32_t total_count = 0;
-  size_t k;
-  for (size_t i = 0; i < ctx->inputs.size(); i++) {
-    LinkerInputBinary* binary = ctx->inputs[i].get();
-    for (size_t j = 0; j < binary->debug_names.size(); j++) {
-      if (j < binary->function_imports.size()) {
-        if (!binary->function_imports[j].active)
-          continue;
-      }
+  Index total_count = 0;
+  for (const std::unique_ptr<LinkerInputBinary>& binary: ctx->inputs) {
+    for (size_t i = 0; i < binary->debug_names.size(); i++) {
+      if (binary->debug_names[i].empty())
+        continue;
+      if (binary->IsInactiveFunctionImport(i))
+        continue;
       total_count++;
     }
   }
@@ -494,40 +468,49 @@
     return;
 
   Stream* stream = &ctx->stream;
-  write_u8_enum(stream, BinarySection::Custom, "section code");
+  stream->WriteU8Enum(BinarySection::Custom, "section code");
   WRITE_UNKNOWN_SIZE(stream);
   write_c_str(stream, "name", "custom section name");
-  write_u8_enum(stream, NameSectionSubsection::Function, "subsection code");
+
+  stream->WriteU8Enum(NameSectionSubsection::Function, "subsection code");
   WRITE_UNKNOWN_SIZE(stream);
   write_u32_leb128(stream, total_count, "element count");
 
-  k = 0;
-  for (size_t i = 0; i < ctx->inputs.size(); i++) {
-    LinkerInputBinary* binary = ctx->inputs[i].get();
-    for (size_t j = 0; j < binary->debug_names.size(); j++) {
-      if (j < binary->function_imports.size()) {
-        if (!binary->function_imports[j].active)
-          continue;
-      }
-      write_u32_leb128(stream, k++, "function index");
-      write_string(stream, binary->debug_names[j], "function name");
+  // Write import names
+  for (const std::unique_ptr<LinkerInputBinary>& binary: ctx->inputs) {
+    for (size_t i = 0; i < binary->debug_names.size(); i++) {
+      if (binary->debug_names[i].empty() || !binary->IsFunctionImport(i))
+        continue;
+      if (binary->IsInactiveFunctionImport(i))
+        continue;
+      write_u32_leb128(stream, binary->RelocateFuncIndex(i), "function index");
+      write_string(stream, binary->debug_names[i], "function name");
+    }
+  }
+
+  // Write non-import names
+  for (const std::unique_ptr<LinkerInputBinary>& binary: ctx->inputs) {
+    for (size_t i = 0; i < binary->debug_names.size(); i++) {
+      if (binary->debug_names[i].empty() || binary->IsFunctionImport(i))
+        continue;
+      write_u32_leb128(stream, binary->RelocateFuncIndex(i), "function index");
+      write_string(stream, binary->debug_names[i], "function name");
     }
   }
 
   FIXUP_SIZE(stream);
+
   FIXUP_SIZE(stream);
 }
 
 static void write_reloc_section(Context* ctx,
                                 BinarySection section_code,
                                 const SectionPtrVector& sections) {
-  uint32_t total_relocs = 0;
+  Index total_relocs = 0;
 
   /* First pass to know total reloc count */
-  for (size_t i = 0; i < sections.size(); i++) {
-    Section* sec = sections[i];
+  for (Section* sec: sections)
     total_relocs += sec->relocations.size();
-  }
 
   if (!total_relocs)
     return;
@@ -537,20 +520,34 @@
            WABT_BINARY_SECTION_RELOC, get_section_name(section_code));
 
   Stream* stream = &ctx->stream;
-  write_u8_enum(stream, BinarySection::Custom, "section code");
+  stream->WriteU8Enum(BinarySection::Custom, "section code");
   WRITE_UNKNOWN_SIZE(stream);
   write_c_str(stream, section_name, "reloc section name");
   write_u32_leb128_enum(&ctx->stream, section_code, "reloc section");
   write_u32_leb128(&ctx->stream, total_relocs, "num relocs");
 
-  for (size_t i = 0; i < sections.size(); i++) {
-    Section* sec = sections[i];
-    const std::vector<Reloc>& relocs = sec->relocations;
-    for (size_t j = 0; j < relocs.size(); j++) {
-      write_u32_leb128_enum(&ctx->stream, relocs[j].type, "reloc type");
-      uint32_t new_offset = relocs[j].offset + sec->output_payload_offset;
+  for (Section* sec: sections) {
+    for (const Reloc& reloc: sec->relocations) {
+      write_u32_leb128_enum(&ctx->stream, reloc.type, "reloc type");
+      Offset new_offset = reloc.offset + sec->output_payload_offset;
       write_u32_leb128(&ctx->stream, new_offset, "reloc offset");
-      write_u32_leb128(&ctx->stream, relocs[j].index, "reloc index");
+      Index relocated_index;
+      switch (reloc.type) {
+        case RelocType::FuncIndexLEB:
+          relocated_index = sec->binary->RelocateFuncIndex(reloc.index);
+          break;
+        case RelocType::TypeIndexLEB:
+          relocated_index = sec->binary->RelocateTypeIndex(reloc.index);
+          break;
+        case RelocType::GlobalIndexLEB:
+          relocated_index = sec->binary->RelocateGlobalIndex(reloc.index);
+          break;
+        // TODO(sbc): Handle other relocation types.
+        default:
+          WABT_FATAL("Unhandled reloc type: %s\n", get_reloc_type_name(reloc.type));
+          break;
+      }
+      write_u32_leb128(&ctx->stream, relocated_index, "reloc index");
     }
   }
 
@@ -568,17 +565,16 @@
                get_section_name(section_code));
   }
 
-  uint32_t total_count = 0;
-  uint32_t total_size = 0;
+  Index total_count = 0;
+  Index total_size = 0;
 
   /* Sum section size and element count */
-  for (size_t i = 0; i < sections.size(); i++) {
-    Section* sec = sections[i];
+  for (Section* sec: sections) {
     total_size += sec->payload_size;
     total_count += sec->count;
   }
 
-  write_u8_enum(&ctx->stream, section_code, "section code");
+  ctx->stream.WriteU8Enum(section_code, "section code");
   ctx->current_section_payload_offset = -1;
 
   switch (section_code) {
@@ -611,9 +607,8 @@
       Stream* stream = &ctx->stream;
       write_u32_leb128(stream, total_size, "section size");
       write_u32_leb128(stream, total_count, "element count");
-      ctx->current_section_payload_offset = ctx->stream.offset;
-      for (size_t i = 0; i < sections.size(); i++) {
-        Section* sec = sections[i];
+      ctx->current_section_payload_offset = ctx->stream.offset();
+      for (Section* sec: sections) {
         apply_relocations(sec);
         write_section_payload(ctx, sec);
       }
@@ -656,7 +651,7 @@
     LinkerInputBinary* binary = ctx->inputs[i].get();
     for (size_t j = 0; j < binary->function_imports.size(); j++) {
       FunctionImport* import = &binary->function_imports[j];
-      int export_index = export_map.find_index(import->name);
+      int export_index = export_map.FindIndex(import->name);
       if (export_index == -1) {
         if (!s_relocatable)
           WABT_FATAL("undefined symbol: " PRIstringslice "\n",
@@ -677,13 +672,13 @@
 }
 
 static void calculate_reloc_offsets(Context* ctx) {
-  uint32_t memory_page_offset = 0;
-  uint32_t type_count = 0;
-  uint32_t global_count = 0;
-  uint32_t function_count = 0;
-  uint32_t table_elem_count = 0;
-  uint32_t total_function_imports = 0;
-  uint32_t total_global_imports = 0;
+  Index memory_page_offset = 0;
+  Index type_count = 0;
+  Index global_count = 0;
+  Index function_count = 0;
+  Index table_elem_count = 0;
+  Index total_function_imports = 0;
+  Index total_global_imports = 0;
   for (size_t i = 0; i < ctx->inputs.size(); i++) {
     LinkerInputBinary* binary = ctx->inputs[i].get();
     /* The imported_function_index_offset is the sum of all the function
@@ -692,6 +687,17 @@
     binary->imported_function_index_offset = total_function_imports;
     binary->imported_global_index_offset = total_global_imports;
     binary->memory_page_offset = memory_page_offset;
+
+    size_t delta = 0;
+    for (size_t i = 0; i < binary->function_imports.size(); i++) {
+      if (!binary->function_imports[i].active) {
+        delta++;
+      } else {
+        binary->function_imports[i].relocated_function_index =
+          total_function_imports + i - delta;
+      }
+    }
+
     memory_page_offset += binary->memory_page_count;
     total_function_imports += binary->active_function_imports;
     total_global_imports += binary->global_imports.size();
@@ -741,8 +747,8 @@
   }
 
   /* Write the final binary */
-  write_u32(&ctx->stream, WABT_BINARY_MAGIC, "WABT_BINARY_MAGIC");
-  write_u32(&ctx->stream, WABT_BINARY_VERSION, "WABT_BINARY_VERSION");
+  ctx->stream.WriteU32(WABT_BINARY_MAGIC, "WABT_BINARY_MAGIC");
+  ctx->stream.WriteU32(WABT_BINARY_VERSION, "WABT_BINARY_VERSION");
 
   /* Write known sections first */
   for (size_t i = FIRST_KNOWN_SECTION; i < kBinarySectionCount; i++) {
@@ -759,53 +765,44 @@
 
 static void dump_reloc_offsets(Context* ctx) {
   if (s_debug) {
-    for (uint32_t i = 0; i < ctx->inputs.size(); i++) {
+    for (size_t i = 0; i < ctx->inputs.size(); i++) {
       LinkerInputBinary* binary = ctx->inputs[i].get();
-      writef(&s_log_stream, "Relocation info for: %s\n", binary->filename);
-      writef(&s_log_stream, " - type index offset       : %d\n",
-             binary->type_index_offset);
-      writef(&s_log_stream, " - mem page offset         : %d\n",
-             binary->memory_page_offset);
-      writef(&s_log_stream, " - function index offset   : %d\n",
-             binary->function_index_offset);
-      writef(&s_log_stream, " - global index offset     : %d\n",
-             binary->global_index_offset);
-      writef(&s_log_stream, " - imported function offset: %d\n",
-             binary->imported_function_index_offset);
-      writef(&s_log_stream, " - imported global offset  : %d\n",
-             binary->imported_global_index_offset);
+      LOG_DEBUG("Relocation info for: %s\n", binary->filename);
+      LOG_DEBUG(" - type index offset       : %d\n",
+                           binary->type_index_offset);
+      LOG_DEBUG(" - mem page offset         : %d\n",
+                           binary->memory_page_offset);
+      LOG_DEBUG(" - function index offset   : %d\n",
+                           binary->function_index_offset);
+      LOG_DEBUG(" - global index offset     : %d\n",
+                           binary->global_index_offset);
+      LOG_DEBUG(" - imported function offset: %d\n",
+                           binary->imported_function_index_offset);
+      LOG_DEBUG(" - imported global offset  : %d\n",
+                           binary->imported_global_index_offset);
     }
   }
 }
 
 static Result perform_link(Context* ctx) {
-  MemoryWriter writer;
-  WABT_ZERO_MEMORY(writer);
-  if (WABT_FAILED(init_mem_writer(&writer)))
-    WABT_FATAL("unable to open memory writer for writing\n");
-
-  Stream* log_stream = nullptr;
   if (s_debug)
-    log_stream = &s_log_stream;
+    ctx->stream.set_log_stream(s_log_stream.get());
 
-  if (s_debug)
-    writef(&s_log_stream, "writing file: %s\n", s_outfile);
-
+  LOG_DEBUG("writing file: %s\n", s_outfile);
   calculate_reloc_offsets(ctx);
   resolve_symbols(ctx);
   calculate_reloc_offsets(ctx);
   dump_reloc_offsets(ctx);
-  init_stream(&ctx->stream, &writer.base, log_stream);
   write_binary(ctx);
 
-  if (WABT_FAILED(write_output_buffer_to_file(&writer.buf, s_outfile)))
+  if (WABT_FAILED(ctx->stream.WriteToFile(s_outfile))) {
     WABT_FATAL("error writing linked output to file\n");
+  }
 
-  close_mem_writer(&writer);
   return Result::Ok;
 }
 
-int main(int argc, char** argv) {
+int ProgramMain(int argc, char** argv) {
   init_stdio();
 
   Context context;
@@ -815,8 +812,7 @@
   Result result = Result::Ok;
   for (size_t i = 0; i < s_infiles.size(); i++) {
     const std::string& input_filename = s_infiles[i];
-    if (s_debug)
-      writef(&s_log_stream, "reading file: %s\n", input_filename.c_str());
+    LOG_DEBUG("reading file: %s\n", input_filename.c_str());
     char* data;
     size_t size;
     result = read_file(input_filename.c_str(), &data, &size);
@@ -827,7 +823,7 @@
     context.inputs.emplace_back(b);
     LinkOptions options = { NULL };
     if (s_debug)
-      options.log_stream = &s_log_stream;
+      options.log_stream = s_log_stream.get();
     result = read_binary_linker(b, &options);
     if (WABT_FAILED(result))
       WABT_FATAL("error parsing file: %s\n", input_filename.c_str());
@@ -836,3 +832,9 @@
   result = perform_link(&context);
   return result != Result::Ok;
 }
+
+int main(int argc, char** argv) {
+  WABT_TRY
+  return ProgramMain(argc, argv);
+  WABT_CATCH_BAD_ALLOC_AND_EXIT
+}
diff --git a/lib/wabt/src/tools/wasm-objdump.cc b/lib/wabt/src/tools/wasm-objdump.cc
new file mode 100644
index 0000000..ec967c4
--- /dev/null
+++ b/lib/wabt/src/tools/wasm-objdump.cc
@@ -0,0 +1,157 @@
+/*
+ * Copyright 2016 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+
+#include "common.h"
+#include "option-parser.h"
+#include "stream.h"
+#include "writer.h"
+#include "binary-reader.h"
+#include "binary-reader-objdump.h"
+
+using namespace wabt;
+
+static const char s_description[] =
+R"(  Print information about the contents of wasm binaries.
+
+examples:
+  $ wasm-objdump test.wasm
+)";
+
+static ObjdumpOptions s_objdump_options;
+
+static std::vector<const char*> s_infiles;
+
+static std::unique_ptr<FileStream> s_log_stream;
+
+static void parse_options(int argc, char** argv) {
+  OptionParser parser("wasm-objdump", s_description);
+
+  parser.AddOption('h', "headers", "Print headers",
+                   []() { s_objdump_options.headers = true; });
+  parser.AddOption(
+      'j', "section", "SECTION", "Select just one section",
+      [](const char* argument) { s_objdump_options.section_name = argument; });
+  parser.AddOption('s', "full-contents", "Print raw section contents",
+                   []() { s_objdump_options.raw = true; });
+  parser.AddOption('d', "disassemble", "Disassemble function bodies",
+                   []() { s_objdump_options.disassemble = true; });
+  parser.AddOption("debug", "Print extra debug information", []() {
+    s_objdump_options.debug = true;
+    s_log_stream = FileStream::CreateStdout();
+    s_objdump_options.log_stream = s_log_stream.get();
+  });
+  parser.AddOption('x', "details", "Show section details",
+                   []() { s_objdump_options.details = true; });
+  parser.AddOption('r', "reloc", "Show relocations inline with disassembly",
+                   []() { s_objdump_options.relocs = true; });
+  parser.AddHelpOption();
+  parser.AddArgument(
+      "filename", OptionParser::ArgumentCount::OneOrMore,
+      [](const char* argument) { s_infiles.push_back(argument); });
+
+  parser.Parse(argc, argv);
+}
+
+Result dump_file(const char* filename) {
+  char* char_data;
+  size_t size;
+  Result result = read_file(filename, &char_data, &size);
+  if (WABT_FAILED(result))
+    return result;
+
+  uint8_t* data = reinterpret_cast<uint8_t*>(char_data);
+
+  // Perform serveral passed over the binary in order to print out different
+  // types of information.
+  s_objdump_options.filename = filename;
+  printf("\n");
+
+  ObjdumpState state;
+
+  // Pass 0: Prepass
+  s_objdump_options.mode = ObjdumpMode::Prepass;
+  result = read_binary_objdump(data, size, &s_objdump_options, &state);
+  if (WABT_FAILED(result))
+    goto done;
+  s_objdump_options.log_stream = nullptr;
+
+  // Pass 1: Print the section headers
+  if (s_objdump_options.headers) {
+    s_objdump_options.mode = ObjdumpMode::Headers;
+    result = read_binary_objdump(data, size, &s_objdump_options, &state);
+    if (WABT_FAILED(result))
+      goto done;
+  }
+
+  // Pass 2: Print extra information based on section type
+  if (s_objdump_options.details) {
+    s_objdump_options.mode = ObjdumpMode::Details;
+    result = read_binary_objdump(data, size, &s_objdump_options, &state);
+    if (WABT_FAILED(result))
+      goto done;
+  }
+
+  // Pass 3: Disassemble code section
+  if (s_objdump_options.disassemble) {
+    s_objdump_options.mode = ObjdumpMode::Disassemble;
+    result = read_binary_objdump(data, size, &s_objdump_options, &state);
+    if (WABT_FAILED(result))
+      goto done;
+  }
+
+  // Pass 4: Dump to raw contents of the sections
+  if (s_objdump_options.raw) {
+    s_objdump_options.mode = ObjdumpMode::RawData;
+    result = read_binary_objdump(data, size, &s_objdump_options, &state);
+  }
+
+done:
+  delete[] data;
+  return result;
+}
+
+int ProgramMain(int argc, char** argv) {
+  init_stdio();
+
+  parse_options(argc, argv);
+  if (!s_objdump_options.headers && !s_objdump_options.details &&
+      !s_objdump_options.disassemble && !s_objdump_options.raw) {
+    fprintf(stderr, "At least one of the following switches must be given:\n");
+    fprintf(stderr, " -d/--disassemble\n");
+    fprintf(stderr, " -h/--headers\n");
+    fprintf(stderr, " -x/--details\n");
+    fprintf(stderr, " -s/--full-contents\n");
+    return 1;
+  }
+
+  for (const char* filename: s_infiles) {
+    if (WABT_FAILED(dump_file(filename))) {
+      return 1;
+    }
+  }
+
+  return 0;
+}
+
+int main(int argc, char** argv) {
+  WABT_TRY
+  return ProgramMain(argc, argv);
+  WABT_CATCH_BAD_ALLOC_AND_EXIT
+}
diff --git a/lib/wabt/src/tools/wasmopcodecnt.cc b/lib/wabt/src/tools/wasm-opcodecnt.cc
similarity index 76%
rename from lib/wabt/src/tools/wasmopcodecnt.cc
rename to lib/wabt/src/tools/wasm-opcodecnt.cc
index 89009ac..3571871 100644
--- a/lib/wabt/src/tools/wasmopcodecnt.cc
+++ b/lib/wabt/src/tools/wasm-opcodecnt.cc
@@ -14,21 +14,18 @@
  * limitations under the License.
  */
 
-#include <assert.h>
-#include <errno.h>
-#include <inttypes.h>
-#include <stdio.h>
-#include <stdlib.h>
-
 #include <algorithm>
+#include <cassert>
+#include <cerrno>
+#include <cinttypes>
+#include <cstdio>
+#include <cstdlib>
 
 #include "binary-reader.h"
 #include "binary-reader-opcnt.h"
 #include "option-parser.h"
 #include "stream.h"
 
-#define PROGRAM_NAME "wasmopcodecnt"
-
 #define ERROR(fmt, ...) \
   fprintf(stderr, "%s:%d: " fmt, __FILE__, __LINE__, __VA_ARGS__)
 
@@ -43,95 +40,42 @@
 static ReadBinaryOptions s_read_binary_options =
     WABT_READ_BINARY_OPTIONS_DEFAULT;
 
-static FileWriter s_log_stream_writer;
-static Stream s_log_stream;
-
-#define NOPE HasArgument::No
-#define YEP HasArgument::Yes
-
-enum {
-  FLAG_VERBOSE,
-  FLAG_HELP,
-  FLAG_OUTPUT,
-  FLAG_CUTOFF,
-  FLAG_SEPARATOR,
-  NUM_FLAGS
-};
+static std::unique_ptr<FileStream> s_log_stream;
 
 static const char s_description[] =
-    "  Read a file in the wasm binary format, and count opcode usage for\n"
-    "  instructions.\n"
-    "\n"
-    "examples:\n"
-    "  # parse binary file test.wasm and write pcode dist file test.dist\n"
-    "  $ wasmopcodecnt test.wasm -o test.dist\n";
+R"(  Read a file in the wasm binary format, and count opcode usage for
+  instructions.
 
-static Option s_options[] = {
-    {FLAG_VERBOSE, 'v', "verbose", nullptr, NOPE,
-     "use multiple times for more info"},
-    {FLAG_HELP, 'h', "help", nullptr, NOPE, "print this help message"},
-    {FLAG_OUTPUT, 'o', "output", "FILENAME", YEP,
-     "output file for the opcode counts, by default use stdout"},
-    {FLAG_CUTOFF, 'c', "cutoff", "N", YEP,
-     "cutoff for reporting counts less than N"},
-    {FLAG_SEPARATOR, 's', "separator", "SEPARATOR", YEP,
-     "Separator text between element and count when reporting counts"}};
-
-WABT_STATIC_ASSERT(NUM_FLAGS == WABT_ARRAY_SIZE(s_options));
-
-static void on_option(struct OptionParser* parser,
-                      struct Option* option,
-                      const char* argument) {
-  switch (option->id) {
-    case FLAG_VERBOSE:
-      s_verbose++;
-      init_file_writer_existing(&s_log_stream_writer, stdout);
-      init_stream(&s_log_stream, &s_log_stream_writer.base, nullptr);
-      s_read_binary_options.log_stream = &s_log_stream;
-      break;
-
-    case FLAG_HELP:
-      print_help(parser, PROGRAM_NAME);
-      exit(0);
-      break;
-
-    case FLAG_OUTPUT:
-      s_outfile = argument;
-      break;
-
-    case FLAG_CUTOFF:
-      s_cutoff = atol(argument);
-      break;
-
-    case FLAG_SEPARATOR:
-      s_separator = argument;
-      break;
-  }
-}
-
-static void on_argument(struct OptionParser* parser, const char* argument) {
-  s_infile = argument;
-}
-
-static void on_option_error(struct OptionParser* parser, const char* message) {
-  WABT_FATAL("%s\n", message);
-}
+examples:
+  # parse binary file test.wasm and write pcode dist file test.dist
+  $ wasm-opcodecnt test.wasm -o test.dist
+)";
 
 static void parse_options(int argc, char** argv) {
-  OptionParser parser;
-  WABT_ZERO_MEMORY(parser);
-  parser.description = s_description;
-  parser.options = s_options;
-  parser.num_options = WABT_ARRAY_SIZE(s_options);
-  parser.on_option = on_option;
-  parser.on_argument = on_argument;
-  parser.on_error = on_option_error;
-  parse_options(&parser, argc, argv);
+  OptionParser parser("wasm-opcodecnt", s_description);
 
-  if (!s_infile) {
-    print_help(&parser, PROGRAM_NAME);
-    WABT_FATAL("No filename given.\n");
-  }
+  parser.AddOption('v', "verbose", "Use multiple times for more info", []() {
+    s_verbose++;
+    s_log_stream = FileStream::CreateStdout();
+    s_read_binary_options.log_stream = s_log_stream.get();
+  });
+  parser.AddOption('h', "help", "Print this help message", [&parser]() {
+    parser.PrintHelp();
+    exit(0);
+  });
+  parser.AddOption('o', "output", "FILENAME",
+                   "Output file for the opcode counts, by default use stdout",
+                   [](const char* argument) { s_outfile = argument; });
+  parser.AddOption(
+      'c', "cutoff", "N", "Cutoff for reporting counts less than N",
+      [](const std::string& argument) { s_cutoff = atol(argument.c_str()); });
+  parser.AddOption(
+      's', "separator", "SEPARATOR",
+      "Separator text between element and count when reporting counts",
+      [](const char* argument) { s_separator = argument; });
+  parser.AddArgument("filename", OptionParser::ArgumentCount::OneOrMore,
+                     [](const char* argument) { s_infile = argument; });
+  parser.Parse(argc, argv);
 }
 
 typedef int(int_counter_lt_fcn)(const IntCounter&, const IntCounter&);
@@ -287,7 +231,7 @@
                                   display_second_fcn, opcode_name);
 }
 
-int main(int argc, char** argv) {
+int ProgramMain(int argc, char** argv) {
   init_stdio();
   parse_options(argc, argv);
 
@@ -336,3 +280,9 @@
   delete[] data;
   return result != Result::Ok;
 }
+
+int main(int argc, char** argv) {
+  WABT_TRY
+  return ProgramMain(argc, argv);
+  WABT_CATCH_BAD_ALLOC_AND_EXIT
+}
diff --git a/lib/wabt/src/tools/wasm2wast.cc b/lib/wabt/src/tools/wasm2wast.cc
index d885f74..45ce4bc 100644
--- a/lib/wabt/src/tools/wasm2wast.cc
+++ b/lib/wabt/src/tools/wasm2wast.cc
@@ -14,128 +14,73 @@
  * limitations under the License.
  */
 
-#include <assert.h>
-#include <inttypes.h>
-#include <stdio.h>
-#include <stdlib.h>
+#include <cassert>
+#include <cinttypes>
+#include <cstdio>
+#include <cstdlib>
 
 #include "apply-names.h"
-#include "ast.h"
-#include "ast-writer.h"
+#include "binary-error-handler.h"
 #include "binary-reader.h"
-#include "binary-reader-ast.h"
+#include "binary-reader-ir.h"
 #include "generate-names.h"
+#include "ir.h"
 #include "option-parser.h"
 #include "stream.h"
+#include "wat-writer.h"
 #include "writer.h"
 
-#define PROGRAM_NAME "wasm2wast"
-
 using namespace wabt;
 
 static int s_verbose;
 static const char* s_infile;
 static const char* s_outfile;
 static ReadBinaryOptions s_read_binary_options = {nullptr, true};
+static WriteWatOptions s_write_wat_options;
 static bool s_generate_names;
-
-static BinaryErrorHandler s_error_handler = WABT_BINARY_ERROR_HANDLER_DEFAULT;
-
-static FileWriter s_log_stream_writer;
-static Stream s_log_stream;
-
-#define NOPE HasArgument::No
-#define YEP HasArgument::Yes
-
-enum {
-  FLAG_VERBOSE,
-  FLAG_HELP,
-  FLAG_OUTPUT,
-  FLAG_NO_DEBUG_NAMES,
-  FLAG_GENERATE_NAMES,
-  NUM_FLAGS
-};
+static std::unique_ptr<FileStream> s_log_stream;
 
 static const char s_description[] =
-    "  read a file in the wasm binary format, and convert it to the wasm\n"
-    "  s-expression file format.\n"
-    "\n"
-    "examples:\n"
-    "  # parse binary file test.wasm and write s-expression file test.wast\n"
-    "  $ wasm2wast test.wasm -o test.wast\n"
-    "\n"
-    "  # parse test.wasm, write test.wast, but ignore the debug names, if any\n"
-    "  $ wasm2wast test.wasm --no-debug-names -o test.wast\n";
+R"(  read a file in the wasm binary format, and convert it to the wasm
+  s-expression file format.
 
-static Option s_options[] = {
-    {FLAG_VERBOSE, 'v', "verbose", nullptr, NOPE,
-     "use multiple times for more info"},
-    {FLAG_HELP, 'h', "help", nullptr, NOPE, "print this help message"},
-    {FLAG_OUTPUT, 'o', "output", "FILENAME", YEP,
-     "output file for the generated wast file, by default use stdout"},
-    {FLAG_NO_DEBUG_NAMES, 0, "no-debug-names", nullptr, NOPE,
-     "Ignore debug names in the binary file"},
-    {FLAG_GENERATE_NAMES, 0, "generate-names", nullptr, NOPE,
-     "Give auto-generated names to non-named functions, types, etc."},
-};
-WABT_STATIC_ASSERT(NUM_FLAGS == WABT_ARRAY_SIZE(s_options));
+examples:
+  # parse binary file test.wasm and write s-expression file test.wast
+  $ wasm2wast test.wasm -o test.wast
 
-static void on_option(struct OptionParser* parser,
-                      struct Option* option,
-                      const char* argument) {
-  switch (option->id) {
-    case FLAG_VERBOSE:
-      s_verbose++;
-      init_file_writer_existing(&s_log_stream_writer, stdout);
-      init_stream(&s_log_stream, &s_log_stream_writer.base, nullptr);
-      s_read_binary_options.log_stream = &s_log_stream;
-      break;
-
-    case FLAG_HELP:
-      print_help(parser, PROGRAM_NAME);
-      exit(0);
-      break;
-
-    case FLAG_OUTPUT:
-      s_outfile = argument;
-      break;
-
-    case FLAG_NO_DEBUG_NAMES:
-      s_read_binary_options.read_debug_names = false;
-      break;
-
-    case FLAG_GENERATE_NAMES:
-      s_generate_names = true;
-      break;
-  }
-}
-
-static void on_argument(struct OptionParser* parser, const char* argument) {
-  s_infile = argument;
-}
-
-static void on_option_error(struct OptionParser* parser, const char* message) {
-  WABT_FATAL("%s\n", message);
-}
+  # parse test.wasm, write test.wast, but ignore the debug names, if any
+  $ wasm2wast test.wasm --no-debug-names -o test.wast
+)";
 
 static void parse_options(int argc, char** argv) {
-  OptionParser parser;
-  WABT_ZERO_MEMORY(parser);
-  parser.description = s_description;
-  parser.options = s_options;
-  parser.num_options = WABT_ARRAY_SIZE(s_options);
-  parser.on_option = on_option;
-  parser.on_argument = on_argument;
-  parser.on_error = on_option_error;
-  parse_options(&parser, argc, argv);
+  OptionParser parser("wasm2wast", s_description);
 
-  if (!s_infile) {
-    print_help(&parser, PROGRAM_NAME);
-    WABT_FATAL("No filename given.\n");
-  }
+  parser.AddOption('v', "verbose", "Use multiple times for more info", []() {
+    s_verbose++;
+    s_log_stream = FileStream::CreateStdout();
+    s_read_binary_options.log_stream = s_log_stream.get();
+  });
+  parser.AddHelpOption();
+  parser.AddOption(
+      'o', "output", "FILENAME",
+      "Output file for the generated wast file, by default use stdout",
+      [](const char* argument) { s_outfile = argument; });
+  parser.AddOption('f', "fold-exprs", "Write folded expressions where possible",
+                   []() { s_write_wat_options.fold_exprs = true; });
+  parser.AddOption("inline-exports", "Write all exports inline",
+                   []() { s_write_wat_options.inline_export = true; });
+  parser.AddOption("no-debug-names", "Ignore debug names in the binary file",
+                   []() { s_read_binary_options.read_debug_names = false; });
+  parser.AddOption(
+      "generate-names",
+      "Give auto-generated names to non-named functions, types, etc.",
+      []() { s_generate_names = true; });
+  parser.AddArgument("filename", OptionParser::ArgumentCount::One,
+                     [](const char* argument) { s_infile = argument; });
+  parser.Parse(argc, argv);
 }
 
-int main(int argc, char** argv) {
+int ProgramMain(int argc, char** argv) {
   Result result;
 
   init_stdio();
@@ -145,9 +90,10 @@
   size_t size;
   result = read_file(s_infile, &data, &size);
   if (WABT_SUCCEEDED(result)) {
+    BinaryErrorHandlerFile error_handler;
     Module module;
-    result = read_binary_ast(data, size, &s_read_binary_options,
-                             &s_error_handler, &module);
+    result = read_binary_ir(data, size, &s_read_binary_options, &error_handler,
+                            &module);
     if (WABT_SUCCEEDED(result)) {
       if (s_generate_names)
         result = generate_names(&module);
@@ -160,20 +106,18 @@
       }
 
       if (WABT_SUCCEEDED(result)) {
-        FileWriter file_writer;
-        if (s_outfile) {
-          result = init_file_writer(&file_writer, s_outfile);
-        } else {
-          init_file_writer_existing(&file_writer, stdout);
-        }
-
-        if (WABT_SUCCEEDED(result)) {
-          result = write_ast(&file_writer.base, &module);
-          close_file_writer(&file_writer);
-        }
+        FileWriter writer(s_outfile ? FileWriter(s_outfile)
+                                    : FileWriter(stdout));
+        result = write_wat(&writer, &module, &s_write_wat_options);
       }
     }
     delete[] data;
   }
   return result != Result::Ok;
 }
+
+int main(int argc, char** argv) {
+  WABT_TRY
+  return ProgramMain(argc, argv);
+  WABT_CATCH_BAD_ALLOC_AND_EXIT
+}
diff --git a/lib/wabt/src/tools/wasmdump.cc b/lib/wabt/src/tools/wasmdump.cc
deleted file mode 100644
index faa62f6..0000000
--- a/lib/wabt/src/tools/wasmdump.cc
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * Copyright 2016 WebAssembly Community Group participants
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "common.h"
-#include "option-parser.h"
-#include "stream.h"
-#include "writer.h"
-#include "binary-reader.h"
-#include "binary-reader-objdump.h"
-
-#define PROGRAM_NAME "wasmdump"
-
-#define NOPE HasArgument::No
-#define YEP HasArgument::Yes
-
-using namespace wabt;
-
-enum {
-  FLAG_HEADERS,
-  FLAG_SECTION,
-  FLAG_RAW,
-  FLAG_DISASSEMBLE,
-  FLAG_DEBUG,
-  FLAG_DETAILS,
-  FLAG_RELOCS,
-  FLAG_HELP,
-  NUM_FLAGS
-};
-
-static const char s_description[] =
-    "  Print information about the contents of a wasm binary file.\n"
-    "\n"
-    "examples:\n"
-    "  $ wasmdump test.wasm\n";
-
-static Option s_options[] = {
-    {FLAG_HEADERS, 'h', "headers", nullptr, NOPE, "print headers"},
-    {FLAG_SECTION, 'j', "section", nullptr, YEP, "select just one section"},
-    {FLAG_RAW, 's', "full-contents", nullptr, NOPE,
-     "print raw section contents"},
-    {FLAG_DISASSEMBLE, 'd', "disassemble", nullptr, NOPE,
-     "disassemble function bodies"},
-    {FLAG_DEBUG, '\0', "debug", nullptr, NOPE, "print extra debug information"},
-    {FLAG_DETAILS, 'x', "details", nullptr, NOPE, "Show section details"},
-    {FLAG_RELOCS, 'r', "reloc", nullptr, NOPE,
-     "show relocations inline with disassembly"},
-    {FLAG_HELP, 'h', "help", nullptr, NOPE, "print this help message"},
-};
-
-WABT_STATIC_ASSERT(NUM_FLAGS == WABT_ARRAY_SIZE(s_options));
-
-static ObjdumpOptions s_objdump_options;
-static FileWriter s_log_stream_writer;
-static Stream s_log_stream;
-
-static void on_argument(struct OptionParser* parser, const char* argument) {
-  s_objdump_options.infile = argument;
-}
-
-static void on_option(struct OptionParser* parser,
-                      struct Option* option,
-                      const char* argument) {
-  switch (option->id) {
-    case FLAG_HEADERS:
-      s_objdump_options.headers = true;
-      break;
-
-    case FLAG_RAW:
-      s_objdump_options.raw = true;
-      break;
-
-    case FLAG_DEBUG:
-      s_objdump_options.debug = true;
-      init_file_writer_existing(&s_log_stream_writer, stdout);
-      init_stream(&s_log_stream, &s_log_stream_writer.base, nullptr);
-      s_objdump_options.log_stream = &s_log_stream;
-      break;
-
-    case FLAG_DISASSEMBLE:
-      s_objdump_options.disassemble = true;
-      break;
-
-    case FLAG_DETAILS:
-      s_objdump_options.details = true;
-      break;
-
-    case FLAG_RELOCS:
-      s_objdump_options.relocs = true;
-      break;
-
-    case FLAG_SECTION:
-      s_objdump_options.section_name = argument;
-      break;
-
-    case FLAG_HELP:
-      print_help(parser, PROGRAM_NAME);
-      exit(0);
-      break;
-  }
-}
-
-static void on_option_error(struct OptionParser* parser, const char* message) {
-  WABT_FATAL("%s\n", message);
-}
-
-static void parse_options(int argc, char** argv) {
-  OptionParser parser;
-  WABT_ZERO_MEMORY(parser);
-  parser.description = s_description;
-  parser.options = s_options;
-  parser.num_options = WABT_ARRAY_SIZE(s_options);
-  parser.on_option = on_option;
-  parser.on_argument = on_argument;
-  parser.on_error = on_option_error;
-  parse_options(&parser, argc, argv);
-
-  if (!s_objdump_options.infile) {
-    print_help(&parser, PROGRAM_NAME);
-    WABT_FATAL("No filename given.\n");
-  }
-}
-
-int main(int argc, char** argv) {
-  init_stdio();
-
-  parse_options(argc, argv);
-  if (!s_objdump_options.headers && !s_objdump_options.details &&
-      !s_objdump_options.disassemble && !s_objdump_options.raw) {
-    fprintf(stderr, "At least one of the following switches must be given:\n");
-    fprintf(stderr, " -d/--disassemble\n");
-    fprintf(stderr, " -h/--headers\n");
-    fprintf(stderr, " -x/--details\n");
-    fprintf(stderr, " -s/--full-contents\n");
-    return 1;
-  }
-
-  char* char_data;
-  size_t size;
-  Result result = read_file(s_objdump_options.infile, &char_data, &size);
-  if (WABT_FAILED(result))
-    return result != Result::Ok;
-
-  uint8_t* data = reinterpret_cast<uint8_t*>(char_data);
-
-  // Perform serveral passed over the binary in order to print out different
-  // types of information.
-  s_objdump_options.print_header = true;
-  if (!s_objdump_options.headers && !s_objdump_options.details &&
-      !s_objdump_options.disassemble && !s_objdump_options.raw) {
-    printf("At least one of the following switches must be given:\n");
-    printf(" -d/--disassemble\n");
-    printf(" -h/--headers\n");
-    printf(" -x/--details\n");
-    printf(" -s/--full-contents\n");
-    return 1;
-  }
-
-  s_objdump_options.mode = ObjdumpMode::Prepass;
-  result = read_binary_objdump(data, size, &s_objdump_options);
-  if (WABT_FAILED(result))
-    goto done;
-  s_objdump_options.log_stream = nullptr;
-
-  // Pass 1: Print the section headers
-  if (s_objdump_options.headers) {
-    s_objdump_options.mode = ObjdumpMode::Headers;
-    result = read_binary_objdump(data, size, &s_objdump_options);
-    if (WABT_FAILED(result))
-      goto done;
-    s_objdump_options.print_header = false;
-  }
-  // Pass 2: Print extra information based on section type
-  if (s_objdump_options.details) {
-    s_objdump_options.mode = ObjdumpMode::Details;
-    result = read_binary_objdump(data, size, &s_objdump_options);
-    if (WABT_FAILED(result))
-      goto done;
-    s_objdump_options.print_header = false;
-  }
-  if (s_objdump_options.disassemble) {
-    s_objdump_options.mode = ObjdumpMode::Disassemble;
-    result = read_binary_objdump(data, size, &s_objdump_options);
-    if (WABT_FAILED(result))
-      goto done;
-    s_objdump_options.print_header = false;
-  }
-  // Pass 3: Dump to raw contents of the sections
-  if (s_objdump_options.raw) {
-    s_objdump_options.mode = ObjdumpMode::RawData;
-    result = read_binary_objdump(data, size, &s_objdump_options);
-  }
-
-done:
-  delete[] data;
-  return result != Result::Ok;
-}
diff --git a/lib/wabt/src/tools/wast-desugar.cc b/lib/wabt/src/tools/wast-desugar.cc
index 74fbf0b..55caf7d 100644
--- a/lib/wabt/src/tools/wast-desugar.cc
+++ b/lib/wabt/src/tools/wast-desugar.cc
@@ -14,131 +14,77 @@
  * limitations under the License.
  */
 
-#include <assert.h>
-#include <stdarg.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
+#include <cassert>
+#include <cstdarg>
+#include <cstdint>
+#include <cstdio>
+#include <cstdlib>
 
 #include "apply-names.h"
-#include "ast.h"
-#include "ast-parser.h"
-#include "ast-writer.h"
 #include "common.h"
 #include "config.h"
 #include "generate-names.h"
+#include "ir.h"
 #include "option-parser.h"
+#include "source-error-handler.h"
 #include "stream.h"
+#include "wast-parser.h"
+#include "wat-writer.h"
 #include "writer.h"
 
-#define PROGRAM_NAME "wast-desugar"
-
 using namespace wabt;
 
 static const char* s_infile;
 static const char* s_outfile;
+static WriteWatOptions s_write_wat_options;
 static bool s_generate_names;
 
-static SourceErrorHandler s_error_handler =
-    WABT_SOURCE_ERROR_HANDLER_DEFAULT;
-
-enum {
-  FLAG_HELP,
-  FLAG_OUTPUT,
-  FLAG_GENERATE_NAMES,
-  NUM_FLAGS
-};
-
 static const char s_description[] =
-    "  read a file in the wasm s-expression format and format it.\n"
-    "\n"
-    "examples:\n"
-    "  # write output to stdout\n"
-    "  $ wast-desugar test.wast\n"
-    "\n"
-    "  # write output to test2.wast\n"
-    "  $ wast-desugar test.wast -o test2.wast\n"
-    "\n"
-    "  # generate names for indexed variables\n"
-    "  $ wast-desugar --generate-names test.wast\n";
+R"(  read a file in the wasm s-expression format and format it.
 
-static Option s_options[] = {
-    {FLAG_HELP, 'h', "help", nullptr, HasArgument::No,
-     "print this help message"},
-    {FLAG_OUTPUT, 'o', "output", "FILE", HasArgument::Yes,
-     "output file for the formatted file"},
-    {FLAG_GENERATE_NAMES, 0, "generate-names", nullptr, HasArgument::No,
-     "Give auto-generated names to non-named functions, types, etc."},
-};
-WABT_STATIC_ASSERT(NUM_FLAGS == WABT_ARRAY_SIZE(s_options));
+examples:
+  # write output to stdout
+  $ wast-desugar test.wast
 
-static void on_option(struct OptionParser* parser,
-                      struct Option* option,
-                      const char* argument) {
-  switch (option->id) {
-    case FLAG_HELP:
-      print_help(parser, PROGRAM_NAME);
-      exit(0);
-      break;
+  # write output to test2.wast
+  $ wast-desugar test.wast -o test2.wast
 
-    case FLAG_OUTPUT:
-      s_outfile = argument;
-      break;
-
-    case FLAG_GENERATE_NAMES:
-      s_generate_names = true;
-      break;
-  }
-}
-
-static void on_argument(struct OptionParser* parser, const char* argument) {
-  s_infile = argument;
-}
-
-static void on_option_error(struct OptionParser* parser,
-                            const char* message) {
-  WABT_FATAL("%s\n", message);
-}
+  # generate names for indexed variables
+  $ wast-desugar --generate-names test.wast
+)";
 
 static void parse_options(int argc, char** argv) {
-  OptionParser parser;
-  WABT_ZERO_MEMORY(parser);
-  parser.description = s_description;
-  parser.options = s_options;
-  parser.num_options = WABT_ARRAY_SIZE(s_options);
-  parser.on_option = on_option;
-  parser.on_argument = on_argument;
-  parser.on_error = on_option_error;
-  parse_options(&parser, argc, argv);
+  OptionParser parser("wast-desugar", s_description);
 
-  if (!s_infile) {
-    print_help(&parser, PROGRAM_NAME);
-    WABT_FATAL("No filename given.\n");
-  }
+  parser.AddHelpOption();
+  parser.AddOption('o', "output", "FILE", "Output file for the formatted file",
+                   [](const char* argument) { s_outfile = argument; });
+  parser.AddOption('f', "fold-exprs", "Write folded expressions where possible",
+                   []() { s_write_wat_options.fold_exprs = true; });
+  parser.AddOption(
+      "generate-names",
+      "Give auto-generated names to non-named functions, types, etc.",
+      []() { s_generate_names = true; });
+
+  parser.AddArgument("filename", OptionParser::ArgumentCount::One,
+                     [](const char* argument) { s_infile = argument; });
+  parser.Parse(argc, argv);
 }
 
-struct Context {
-  MemoryWriter json_writer;
-  MemoryWriter module_writer;
-  Stream json_stream;
-  StringSlice output_filename_noext;
-  char* module_filename;
-  Result result;
-};
-
-int main(int argc, char** argv) {
+int ProgramMain(int argc, char** argv) {
   init_stdio();
   parse_options(argc, argv);
 
-  AstLexer* lexer = new_ast_file_lexer(s_infile);
+  std::unique_ptr<WastLexer> lexer(WastLexer::CreateFileLexer(s_infile));
   if (!lexer)
     WABT_FATAL("unable to read %s\n", s_infile);
 
+  SourceErrorHandlerFile error_handler;
   Script* script;
-  Result result = parse_ast(lexer, &script, &s_error_handler);
+  Result result = parse_wast(lexer.get(), &script, &error_handler);
 
   if (WABT_SUCCEEDED(result)) {
-    Module* module = get_first_module(script);
+    Module* module = script->GetFirstModule();
     if (!module)
       WABT_FATAL("no module in file.\n");
 
@@ -149,21 +95,17 @@
       result = apply_names(module);
 
     if (WABT_SUCCEEDED(result)) {
-      FileWriter file_writer;
-      if (s_outfile) {
-        result = init_file_writer(&file_writer, s_outfile);
-      } else {
-        init_file_writer_existing(&file_writer, stdout);
-      }
-
-      if (WABT_SUCCEEDED(result)) {
-        result = write_ast(&file_writer.base, module);
-        close_file_writer(&file_writer);
-      }
+      FileWriter writer(s_outfile ? FileWriter(s_outfile) : FileWriter(stdout));
+      result = write_wat(&writer, module, &s_write_wat_options);
     }
   }
 
-  destroy_ast_lexer(lexer);
   delete script;
   return result != Result::Ok;
 }
+
+int main(int argc, char** argv) {
+  WABT_TRY
+  return ProgramMain(argc, argv);
+  WABT_CATCH_BAD_ALLOC_AND_EXIT
+}
diff --git a/lib/wabt/src/tools/wast2wasm.cc b/lib/wabt/src/tools/wast2wasm.cc
index 26248c6..4bfc2e7 100644
--- a/lib/wabt/src/tools/wast2wasm.cc
+++ b/lib/wabt/src/tools/wast2wasm.cc
@@ -14,26 +14,27 @@
  * limitations under the License.
  */
 
-#include <assert.h>
-#include <stdarg.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
+#include <cassert>
+#include <cstdarg>
+#include <cstdint>
+#include <cstdlib>
+#include <cstdio>
+#include <string>
+
 #include "config.h"
 
-#include "ast.h"
-#include "ast-parser.h"
 #include "binary-writer.h"
 #include "binary-writer-spec.h"
 #include "common.h"
+#include "ir.h"
 #include "option-parser.h"
 #include "resolve-names.h"
+#include "source-error-handler.h"
 #include "stream.h"
 #include "validator.h"
+#include "wast-parser.h"
 #include "writer.h"
 
-#define PROGRAM_NAME "wast2wasm"
-
 using namespace wabt;
 
 static const char* s_infile;
@@ -46,169 +47,106 @@
     WABT_WRITE_BINARY_SPEC_OPTIONS_DEFAULT;
 static bool s_spec;
 static bool s_validate = true;
+static WastParseOptions s_parse_options;
 
-static SourceErrorHandler s_error_handler =
-    WABT_SOURCE_ERROR_HANDLER_DEFAULT;
-
-static FileStream s_log_stream;
-
-#define NOPE HasArgument::No
-#define YEP HasArgument::Yes
-
-enum {
-  FLAG_VERBOSE,
-  FLAG_HELP,
-  FLAG_DUMP_MODULE,
-  FLAG_OUTPUT,
-  FLAG_RELOCATABLE,
-  FLAG_SPEC,
-  FLAG_NO_CANONICALIZE_LEB128S,
-  FLAG_DEBUG_NAMES,
-  FLAG_NO_CHECK,
-  NUM_FLAGS
-};
+static std::unique_ptr<FileStream> s_log_stream;
 
 static const char s_description[] =
-    "  read a file in the wasm s-expression format, check it for errors, and\n"
-    "  convert it to the wasm binary format.\n"
-    "\n"
-    "examples:\n"
-    "  # parse and typecheck test.wast\n"
-    "  $ wast2wasm test.wast\n"
-    "\n"
-    "  # parse test.wast and write to binary file test.wasm\n"
-    "  $ wast2wasm test.wast -o test.wasm\n"
-    "\n"
-    "  # parse spec-test.wast, and write verbose output to stdout (including\n"
-    "  # the meaning of every byte)\n"
-    "  $ wast2wasm spec-test.wast -v\n"
-    "\n"
-    "  # parse spec-test.wast, and write files to spec-test.json. Modules are\n"
-    "  # written to spec-test.0.wasm, spec-test.1.wasm, etc.\n"
-    "  $ wast2wasm spec-test.wast --spec -o spec-test.json\n";
+R"(  read a file in the wasm s-expression format, check it for errors, and
+  convert it to the wasm binary format.
 
-static Option s_options[] = {
-    {FLAG_VERBOSE, 'v', "verbose", nullptr, NOPE,
-     "use multiple times for more info"},
-    {FLAG_HELP, 'h', "help", nullptr, NOPE, "print this help message"},
-    {FLAG_DUMP_MODULE, 'd', "dump-module", nullptr, NOPE,
-     "print a hexdump of the module to stdout"},
-    {FLAG_OUTPUT, 'o', "output", "FILE", YEP, "output wasm binary file"},
-    {FLAG_RELOCATABLE, 'r', nullptr, nullptr, NOPE,
-     "create a relocatable wasm binary (suitable for linking with wasm-link)"},
-    {FLAG_SPEC, 0, "spec", nullptr, NOPE,
-     "parse a file with multiple modules and assertions, like the spec "
-     "tests"},
-    {FLAG_NO_CANONICALIZE_LEB128S, 0, "no-canonicalize-leb128s", nullptr, NOPE,
-     "Write all LEB128 sizes as 5-bytes instead of their minimal size"},
-    {FLAG_DEBUG_NAMES, 0, "debug-names", nullptr, NOPE,
-     "Write debug names to the generated binary file"},
-    {FLAG_NO_CHECK, 0, "no-check", nullptr, NOPE,
-     "Don't check for invalid modules"},
-};
-WABT_STATIC_ASSERT(NUM_FLAGS == WABT_ARRAY_SIZE(s_options));
+examples:
+  # parse and typecheck test.wast
+  $ wast2wasm test.wast
 
-static void on_option(struct OptionParser* parser,
-                      struct Option* option,
-                      const char* argument) {
-  switch (option->id) {
-    case FLAG_VERBOSE:
-      s_verbose++;
-      s_write_binary_options.log_stream = &s_log_stream.base;
-      break;
+  # parse test.wast and write to binary file test.wasm
+  $ wast2wasm test.wast -o test.wasm
 
-    case FLAG_HELP:
-      print_help(parser, PROGRAM_NAME);
-      exit(0);
-      break;
+  # parse spec-test.wast, and write verbose output to stdout (including
+  # the meaning of every byte)
+  $ wast2wasm spec-test.wast -v
 
-    case FLAG_DUMP_MODULE:
-      s_dump_module = true;
-      break;
+  # parse spec-test.wast, and write files to spec-test.json. Modules are
+  # written to spec-test.0.wasm, spec-test.1.wasm, etc.
+  $ wast2wasm spec-test.wast --spec -o spec-test.json
+)";
 
-    case FLAG_OUTPUT:
-      s_outfile = argument;
-      break;
+static void parse_options(int argc, char* argv[]) {
+  OptionParser parser("wast2wasm", s_description);
 
-    case FLAG_RELOCATABLE:
-      s_write_binary_options.relocatable = true;
-      break;
+  parser.AddOption('v', "verbose", "Use multiple times for more info", []() {
+    s_verbose++;
+    s_log_stream = FileStream::CreateStdout();
+    s_write_binary_options.log_stream = s_log_stream.get();
+  });
+  parser.AddHelpOption();
+  parser.AddOption("debug-parser", "Turn on debugging the parser of wast files",
+                   []() { s_parse_options.debug_parsing = true; });
+  parser.AddOption('d', "dump-module",
+                   "Print a hexdump of the module to stdout",
+                   []() { s_dump_module = true; });
+  parser.AddOption("future-exceptions",
+                   "Test future extension for exception handling",
+                   []() { s_parse_options.allow_exceptions = true; });
+  parser.AddOption('o', "output", "FILE", "output wasm binary file",
+                   [](const char* argument) { s_outfile = argument; });
+  parser.AddOption(
+      'r', "relocatable",
+      "Create a relocatable wasm binary (suitable for linking with wasm-link)",
+      []() { s_write_binary_options.relocatable = true; });
+  parser.AddOption(
+      "spec",
+      "Parse a file with multiple modules and assertions, like the spec tests",
+      []() { s_spec = true; });
+  parser.AddOption(
+      "no-canonicalize-leb128s",
+      "Write all LEB128 sizes as 5-bytes instead of their minimal size",
+      []() { s_write_binary_options.canonicalize_lebs = false; });
+  parser.AddOption("debug-names",
+                   "Write debug names to the generated binary file",
+                   []() { s_write_binary_options.write_debug_names = true; });
+  parser.AddOption("no-check", "Don't check for invalid modules",
+                   []() { s_validate = false; });
+  parser.AddArgument("filename", OptionParser::ArgumentCount::One,
+                     [](const char* argument) { s_infile = argument; });
 
-    case FLAG_SPEC:
-      s_spec = true;
-      break;
-
-    case FLAG_NO_CANONICALIZE_LEB128S:
-      s_write_binary_options.canonicalize_lebs = false;
-      break;
-
-    case FLAG_DEBUG_NAMES:
-      s_write_binary_options.write_debug_names = true;
-      break;
-
-    case FLAG_NO_CHECK:
-      s_validate = false;
-      break;
-  }
-}
-
-static void on_argument(struct OptionParser* parser, const char* argument) {
-  s_infile = argument;
-}
-
-static void on_option_error(struct OptionParser* parser,
-                            const char* message) {
-  WABT_FATAL("%s\n", message);
-}
-
-static void parse_options(int argc, char** argv) {
-  OptionParser parser;
-  WABT_ZERO_MEMORY(parser);
-  parser.description = s_description;
-  parser.options = s_options;
-  parser.num_options = WABT_ARRAY_SIZE(s_options);
-  parser.on_option = on_option;
-  parser.on_argument = on_argument;
-  parser.on_error = on_option_error;
-  parse_options(&parser, argc, argv);
-
-  if (!s_infile) {
-    print_help(&parser, PROGRAM_NAME);
-    WABT_FATAL("No filename given.\n");
-  }
+  parser.Parse(argc, argv);
 }
 
 static void write_buffer_to_file(const char* filename,
-                                 OutputBuffer* buffer) {
+                                 const OutputBuffer& buffer) {
   if (s_dump_module) {
     if (s_verbose)
-      writef(&s_log_stream.base, ";; dump\n");
-    write_output_buffer_memory_dump(&s_log_stream.base, buffer);
+      s_log_stream->Writef(";; dump\n");
+    if (!buffer.data.empty()) {
+      s_log_stream->WriteMemoryDump(buffer.data.data(), buffer.data.size());
+    }
   }
 
   if (filename) {
-    write_output_buffer_to_file(buffer, filename);
+    buffer.WriteToFile(filename);
   }
 }
 
-int main(int argc, char** argv) {
+int ProgramMain(int argc, char** argv) {
   init_stdio();
 
-  init_file_stream_from_existing(&s_log_stream, stdout);
   parse_options(argc, argv);
 
-  AstLexer* lexer = new_ast_file_lexer(s_infile);
+  std::unique_ptr<WastLexer> lexer = WastLexer::CreateFileLexer(s_infile);
   if (!lexer)
     WABT_FATAL("unable to read file: %s\n", s_infile);
 
+  SourceErrorHandlerFile error_handler;
   Script* script;
-  Result result = parse_ast(lexer, &script, &s_error_handler);
+  Result result = parse_wast(lexer.get(), &script, &error_handler,
+                             &s_parse_options);
 
   if (WABT_SUCCEEDED(result)) {
-    result = resolve_names_script(lexer, script, &s_error_handler);
+    result = resolve_names_script(lexer.get(), script, &error_handler);
 
     if (WABT_SUCCEEDED(result) && s_validate)
-      result = validate_script(lexer, script, &s_error_handler);
+      result = validate_script(lexer.get(), script, &error_handler);
 
     if (WABT_SUCCEEDED(result)) {
       if (s_spec) {
@@ -219,26 +157,26 @@
                                           &s_write_binary_spec_options);
       } else {
         MemoryWriter writer;
-        WABT_ZERO_MEMORY(writer);
-        if (WABT_FAILED(init_mem_writer(&writer)))
-          WABT_FATAL("unable to open memory writer for writing\n");
-
-        Module* module = get_first_module(script);
+        const Module* module = script->GetFirstModule();
         if (module) {
-          result = write_binary_module(&writer.base, module,
-                                       &s_write_binary_options);
+          result =
+              write_binary_module(&writer, module, &s_write_binary_options);
         } else {
           WABT_FATAL("no module found\n");
         }
 
         if (WABT_SUCCEEDED(result))
-          write_buffer_to_file(s_outfile, &writer.buf);
-        close_mem_writer(&writer);
+          write_buffer_to_file(s_outfile, writer.output_buffer());
       }
     }
   }
 
-  destroy_ast_lexer(lexer);
   delete script;
   return result != Result::Ok;
 }
+
+int main(int argc, char** argv) {
+  WABT_TRY
+  return ProgramMain(argc, argv);
+  WABT_CATCH_BAD_ALLOC_AND_EXIT
+}
diff --git a/lib/wabt/src/type-checker.cc b/lib/wabt/src/type-checker.cc
index 6a998da..eba23c7 100644
--- a/lib/wabt/src/type-checker.cc
+++ b/lib/wabt/src/type-checker.cc
@@ -16,10 +16,10 @@
 
 #include "type-checker.h"
 
-#define CHECK_RESULT(expr) \
-  do {                     \
-    if (WABT_FAILED(expr)) \
-      return Result::Error;   \
+#define CHECK_RESULT(expr)  \
+  do {                      \
+    if (WABT_FAILED(expr))  \
+      return Result::Error; \
   } while (0)
 
 #define COMBINE_RESULT(result_var, result)                            \
@@ -30,487 +30,470 @@
 
 namespace wabt {
 
-TypeCheckerLabel::TypeCheckerLabel(LabelType label_type,
-                                   const TypeVector& sig,
-                                   size_t limit)
+TypeChecker::Label::Label(LabelType label_type,
+                          const TypeVector& sig,
+                          size_t limit)
     : label_type(label_type),
       sig(sig),
       type_stack_limit(limit),
       unreachable(false) {}
 
-static void WABT_PRINTF_FORMAT(2, 3)
-    print_error(TypeChecker* tc, const char* fmt, ...) {
-  if (tc->error_handler->on_error) {
+TypeChecker::TypeChecker(const ErrorCallback& error_callback)
+    : error_callback_(error_callback) {}
+
+void TypeChecker::PrintError(const char* fmt, ...) {
+  if (error_callback_) {
     WABT_SNPRINTF_ALLOCA(buffer, length, fmt);
-    tc->error_handler->on_error(buffer, tc->error_handler->user_data);
+    error_callback_(buffer);
   }
 }
 
-Result typechecker_get_label(TypeChecker* tc,
-                             size_t depth,
-                             TypeCheckerLabel** out_label) {
-  if (depth >= tc->label_stack.size()) {
-    assert(tc->label_stack.size() > 0);
-    print_error(tc, "invalid depth: %" PRIzd " (max %" PRIzd ")", depth,
-                tc->label_stack.size() - 1);
+Result TypeChecker::GetLabel(Index depth, Label** out_label) {
+  if (depth >= label_stack_.size()) {
+    assert(label_stack_.size() > 0);
+    PrintError("invalid depth: %" PRIindex " (max %" PRIzd ")", depth,
+               label_stack_.size() - 1);
     *out_label = nullptr;
     return Result::Error;
   }
-  *out_label = &tc->label_stack[tc->label_stack.size() - depth - 1];
+  *out_label = &label_stack_[label_stack_.size() - depth - 1];
   return Result::Ok;
 }
 
-static Result top_label(TypeChecker* tc, TypeCheckerLabel** out_label) {
-  return typechecker_get_label(tc, 0, out_label);
+Result TypeChecker::TopLabel(Label** out_label) {
+  return GetLabel(0, out_label);
 }
 
-bool typechecker_is_unreachable(TypeChecker* tc) {
-  TypeCheckerLabel* label;
-  if (WABT_FAILED(top_label(tc, &label)))
+bool TypeChecker::IsUnreachable() {
+  Label* label;
+  if (WABT_FAILED(TopLabel(&label)))
     return true;
   return label->unreachable;
 }
 
-static void reset_type_stack_to_label(TypeChecker* tc,
-                                      TypeCheckerLabel* label) {
-  tc->type_stack.resize(label->type_stack_limit);
+void TypeChecker::ResetTypeStackToLabel(Label* label) {
+  type_stack_.resize(label->type_stack_limit);
 }
 
-static Result set_unreachable(TypeChecker* tc) {
-  TypeCheckerLabel* label;
-  CHECK_RESULT(top_label(tc, &label));
+Result TypeChecker::SetUnreachable() {
+  Label* label;
+  CHECK_RESULT(TopLabel(&label));
   label->unreachable = true;
-  reset_type_stack_to_label(tc, label);
+  ResetTypeStackToLabel(label);
   return Result::Ok;
 }
 
-static void push_label(TypeChecker* tc,
-                       LabelType label_type,
-                       const TypeVector& sig) {
-  tc->label_stack.emplace_back(label_type, sig, tc->type_stack.size());
+void TypeChecker::PushLabel(LabelType label_type, const TypeVector& sig) {
+  label_stack_.emplace_back(label_type, sig, type_stack_.size());
 }
 
-static Result pop_label(TypeChecker* tc) {
-  tc->label_stack.pop_back();
+Result TypeChecker::PopLabel() {
+  label_stack_.pop_back();
   return Result::Ok;
 }
 
-static Result check_label_type(TypeCheckerLabel* label, LabelType label_type) {
+Result TypeChecker::CheckLabelType(Label* label, LabelType label_type) {
   return label->label_type == label_type ? Result::Ok : Result::Error;
 }
 
-static Result peek_type(TypeChecker* tc, uint32_t depth, Type* out_type) {
-  TypeCheckerLabel* label;
-  CHECK_RESULT(top_label(tc, &label));
+Result TypeChecker::PeekType(Index depth, Type* out_type) {
+  Label* label;
+  CHECK_RESULT(TopLabel(&label));
 
-  if (label->type_stack_limit + depth >= tc->type_stack.size()) {
+  if (label->type_stack_limit + depth >= type_stack_.size()) {
     *out_type = Type::Any;
     return label->unreachable ? Result::Ok : Result::Error;
   }
-  *out_type = tc->type_stack[tc->type_stack.size() - depth - 1];
+  *out_type = type_stack_[type_stack_.size() - depth - 1];
   return Result::Ok;
 }
 
-static Result top_type(TypeChecker* tc, Type* out_type) {
-  return peek_type(tc, 0, out_type);
+Result TypeChecker::TopType(Type* out_type) {
+  return PeekType(0, out_type);
 }
 
-static Result pop_type(TypeChecker* tc, Type* out_type) {
-  TypeCheckerLabel* label;
-  CHECK_RESULT(top_label(tc, &label));
-  Result result = top_type(tc, out_type);
-  if (tc->type_stack.size() > label->type_stack_limit)
-    tc->type_stack.pop_back();
+Result TypeChecker::PopType(Type* out_type) {
+  Label* label;
+  CHECK_RESULT(TopLabel(&label));
+  Result result = TopType(out_type);
+  if (type_stack_.size() > label->type_stack_limit)
+    type_stack_.pop_back();
   return result;
 }
 
-static Result drop_types(TypeChecker* tc, size_t drop_count) {
-  TypeCheckerLabel* label;
-  CHECK_RESULT(top_label(tc, &label));
-  if (label->type_stack_limit + drop_count > tc->type_stack.size()) {
+Result TypeChecker::DropTypes(size_t drop_count) {
+  Label* label;
+  CHECK_RESULT(TopLabel(&label));
+  if (label->type_stack_limit + drop_count > type_stack_.size()) {
     if (label->unreachable) {
-      reset_type_stack_to_label(tc, label);
+      ResetTypeStackToLabel(label);
       return Result::Ok;
     }
     return Result::Error;
   }
-  tc->type_stack.erase(tc->type_stack.end() - drop_count, tc->type_stack.end());
+  type_stack_.erase(type_stack_.end() - drop_count, type_stack_.end());
   return Result::Ok;
 }
 
-static void push_type(TypeChecker* tc, Type type) {
+void TypeChecker::PushType(Type type) {
   if (type != Type::Void)
-    tc->type_stack.push_back(type);
+    type_stack_.push_back(type);
 }
 
-static void push_types(TypeChecker* tc, const TypeVector& types) {
-  for (Type type: types)
-    push_type(tc, type);
+void TypeChecker::PushTypes(const TypeVector& types) {
+  for (Type type : types)
+    PushType(type);
 }
 
-static Result check_type_stack_limit(TypeChecker* tc,
-                                     size_t expected,
-                                     const char* desc) {
-  TypeCheckerLabel* label;
-  CHECK_RESULT(top_label(tc, &label));
-  size_t avail = tc->type_stack.size() - label->type_stack_limit;
+Result TypeChecker::CheckTypeStackLimit(size_t expected, const char* desc) {
+  Label* label;
+  CHECK_RESULT(TopLabel(&label));
+  size_t avail = type_stack_.size() - label->type_stack_limit;
   if (!label->unreachable && expected > avail) {
-    print_error(tc, "type stack size too small at %s. got %" PRIzd
-                    ", expected at least %" PRIzd,
-                desc, avail, expected);
+    PrintError("type stack size too small at %s. got %" PRIzd
+               ", expected at least %" PRIzd,
+               desc, avail, expected);
     return Result::Error;
   }
   return Result::Ok;
 }
 
-static Result check_type_stack_end(TypeChecker* tc, const char* desc) {
-  TypeCheckerLabel* label;
-  CHECK_RESULT(top_label(tc, &label));
-  if (tc->type_stack.size() != label->type_stack_limit) {
-    print_error(tc, "type stack at end of %s is %" PRIzd ", expected %" PRIzd,
-                desc, tc->type_stack.size(), label->type_stack_limit);
+Result TypeChecker::CheckTypeStackEnd(const char* desc) {
+  Label* label;
+  CHECK_RESULT(TopLabel(&label));
+  if (type_stack_.size() != label->type_stack_limit) {
+    PrintError("type stack at end of %s is %" PRIzd ", expected %" PRIzd, desc,
+               type_stack_.size(), label->type_stack_limit);
     return Result::Error;
   }
   return Result::Ok;
 }
 
-static Result check_type(TypeChecker* tc,
-                         Type actual,
-                         Type expected,
-                         const char* desc) {
+Result TypeChecker::CheckType(Type actual, Type expected, const char* desc) {
   if (expected != actual && expected != Type::Any && actual != Type::Any) {
-    print_error(tc, "type mismatch in %s, expected %s but got %s.", desc,
-                get_type_name(expected), get_type_name(actual));
+    PrintError("type mismatch in %s, expected %s but got %s.", desc,
+               get_type_name(expected), get_type_name(actual));
     return Result::Error;
   }
   return Result::Ok;
 }
 
-static Result check_signature(TypeChecker* tc,
-                              const TypeVector& sig,
-                              const char* desc) {
+Result TypeChecker::CheckSignature(const TypeVector& sig, const char* desc) {
   Result result = Result::Ok;
-  COMBINE_RESULT(result, check_type_stack_limit(tc, sig.size(), desc));
+  COMBINE_RESULT(result, CheckTypeStackLimit(sig.size(), desc));
   for (size_t i = 0; i < sig.size(); ++i) {
     Type actual = Type::Any;
-    COMBINE_RESULT(result, peek_type(tc, sig.size() - i - 1, &actual));
-    COMBINE_RESULT(result, check_type(tc, actual, sig[i], desc));
+    COMBINE_RESULT(result, PeekType(sig.size() - i - 1, &actual));
+    COMBINE_RESULT(result, CheckType(actual, sig[i], desc));
   }
   return result;
 }
 
-static Result pop_and_check_signature(TypeChecker* tc,
-                                      const TypeVector& sig,
-                                      const char* desc) {
+Result TypeChecker::PopAndCheckSignature(const TypeVector& sig,
+                                         const char* desc) {
   Result result = Result::Ok;
-  COMBINE_RESULT(result, check_signature(tc, sig, desc));
-  COMBINE_RESULT(result, drop_types(tc, sig.size()));
+  COMBINE_RESULT(result, CheckSignature(sig, desc));
+  COMBINE_RESULT(result, DropTypes(sig.size()));
   return result;
 }
 
-static Result pop_and_check_call(TypeChecker* tc,
-                                 const TypeVector& param_types,
-                                 const TypeVector& result_types,
-                                 const char* desc) {
+Result TypeChecker::PopAndCheckCall(const TypeVector& param_types,
+                                    const TypeVector& result_types,
+                                    const char* desc) {
   Result result = Result::Ok;
-  COMBINE_RESULT(result, check_type_stack_limit(tc, param_types.size(), desc));
+  COMBINE_RESULT(result, CheckTypeStackLimit(param_types.size(), desc));
   for (size_t i = 0; i < param_types.size(); ++i) {
     Type actual = Type::Any;
-    COMBINE_RESULT(result, peek_type(tc, param_types.size() - i - 1, &actual));
-    COMBINE_RESULT(result, check_type(tc, actual, param_types[i], desc));
+    COMBINE_RESULT(result, PeekType(param_types.size() - i - 1, &actual));
+    COMBINE_RESULT(result, CheckType(actual, param_types[i], desc));
   }
-  COMBINE_RESULT(result, drop_types(tc, param_types.size()));
-  push_types(tc, result_types);
+  COMBINE_RESULT(result, DropTypes(param_types.size()));
+  PushTypes(result_types);
   return result;
 }
 
-static Result pop_and_check_1_type(TypeChecker* tc,
-                                   Type expected,
-                                   const char* desc) {
+Result TypeChecker::PopAndCheck1Type(Type expected, const char* desc) {
   Result result = Result::Ok;
   Type actual = Type::Any;
-  COMBINE_RESULT(result, check_type_stack_limit(tc, 1, desc));
-  COMBINE_RESULT(result, pop_type(tc, &actual));
-  COMBINE_RESULT(result, check_type(tc, actual, expected, desc));
+  COMBINE_RESULT(result, CheckTypeStackLimit(1, desc));
+  COMBINE_RESULT(result, PopType(&actual));
+  COMBINE_RESULT(result, CheckType(actual, expected, desc));
   return result;
 }
 
-static Result pop_and_check_2_types(TypeChecker* tc,
-                                    Type expected1,
-                                    Type expected2,
-                                    const char* desc) {
+Result TypeChecker::PopAndCheck2Types(Type expected1,
+                                      Type expected2,
+                                      const char* desc) {
   Result result = Result::Ok;
   Type actual1 = Type::Any;
   Type actual2 = Type::Any;
-  COMBINE_RESULT(result, check_type_stack_limit(tc, 2, desc));
-  COMBINE_RESULT(result, pop_type(tc, &actual2));
-  COMBINE_RESULT(result, pop_type(tc, &actual1));
-  COMBINE_RESULT(result, check_type(tc, actual1, expected1, desc));
-  COMBINE_RESULT(result, check_type(tc, actual2, expected2, desc));
+  COMBINE_RESULT(result, CheckTypeStackLimit(2, desc));
+  COMBINE_RESULT(result, PopType(&actual2));
+  COMBINE_RESULT(result, PopType(&actual1));
+  COMBINE_RESULT(result, CheckType(actual1, expected1, desc));
+  COMBINE_RESULT(result, CheckType(actual2, expected2, desc));
   return result;
 }
 
-static Result pop_and_check_2_types_are_equal(TypeChecker* tc,
-                                              Type* out_type,
+Result TypeChecker::PopAndCheck2TypesAreEqual(Type* out_type,
                                               const char* desc) {
   Result result = Result::Ok;
   Type right = Type::Any;
   Type left = Type::Any;
-  COMBINE_RESULT(result, check_type_stack_limit(tc, 2, desc));
-  COMBINE_RESULT(result, pop_type(tc, &right));
-  COMBINE_RESULT(result, pop_type(tc, &left));
-  COMBINE_RESULT(result, check_type(tc, left, right, desc));
+  COMBINE_RESULT(result, CheckTypeStackLimit(2, desc));
+  COMBINE_RESULT(result, PopType(&right));
+  COMBINE_RESULT(result, PopType(&left));
+  COMBINE_RESULT(result, CheckType(left, right, desc));
   *out_type = right;
   return result;
 }
 
-static Result check_opcode1(TypeChecker* tc, Opcode opcode) {
-  Result result = pop_and_check_1_type(tc, get_opcode_param_type_1(opcode),
-                                       get_opcode_name(opcode));
-  push_type(tc, get_opcode_result_type(opcode));
+Result TypeChecker::CheckOpcode1(Opcode opcode) {
+  Result result = PopAndCheck1Type(get_opcode_param_type_1(opcode),
+                                   get_opcode_name(opcode));
+  PushType(get_opcode_result_type(opcode));
   return result;
 }
 
-static Result check_opcode2(TypeChecker* tc, Opcode opcode) {
-  Result result = pop_and_check_2_types(tc, get_opcode_param_type_1(opcode),
-                                        get_opcode_param_type_2(opcode),
-                                        get_opcode_name(opcode));
-  push_type(tc, get_opcode_result_type(opcode));
+Result TypeChecker::CheckOpcode2(Opcode opcode) {
+  Result result = PopAndCheck2Types(get_opcode_param_type_1(opcode),
+                                    get_opcode_param_type_2(opcode),
+                                    get_opcode_name(opcode));
+  PushType(get_opcode_result_type(opcode));
   return result;
 }
 
-Result typechecker_begin_function(TypeChecker* tc, const TypeVector* sig) {
-  tc->type_stack.clear();
-  tc->label_stack.clear();
-  push_label(tc, LabelType::Func, *sig);
+Result TypeChecker::BeginFunction(const TypeVector* sig) {
+  type_stack_.clear();
+  label_stack_.clear();
+  PushLabel(LabelType::Func, *sig);
   return Result::Ok;
 }
 
-Result typechecker_on_binary(TypeChecker* tc, Opcode opcode) {
-  return check_opcode2(tc, opcode);
+Result TypeChecker::OnBinary(Opcode opcode) {
+  return CheckOpcode2(opcode);
 }
 
-Result typechecker_on_block(TypeChecker* tc, const TypeVector* sig) {
-  push_label(tc, LabelType::Block, *sig);
+Result TypeChecker::OnBlock(const TypeVector* sig) {
+  PushLabel(LabelType::Block, *sig);
   return Result::Ok;
 }
 
-Result typechecker_on_br(TypeChecker* tc, size_t depth) {
+Result TypeChecker::OnBr(Index depth) {
   Result result = Result::Ok;
-  TypeCheckerLabel* label;
-  CHECK_RESULT(typechecker_get_label(tc, depth, &label));
+  Label* label;
+  CHECK_RESULT(GetLabel(depth, &label));
   if (label->label_type != LabelType::Loop)
-    COMBINE_RESULT(result, check_signature(tc, label->sig, "br"));
-  CHECK_RESULT(set_unreachable(tc));
+    COMBINE_RESULT(result, CheckSignature(label->sig, "br"));
+  CHECK_RESULT(SetUnreachable());
   return result;
 }
 
-Result typechecker_on_br_if(TypeChecker* tc, size_t depth) {
+Result TypeChecker::OnBrIf(Index depth) {
   Result result = Result::Ok;
-  COMBINE_RESULT(result, pop_and_check_1_type(tc, Type::I32, "br_if"));
-  TypeCheckerLabel* label;
-  CHECK_RESULT(typechecker_get_label(tc, depth, &label));
+  COMBINE_RESULT(result, PopAndCheck1Type(Type::I32, "br_if"));
+  Label* label;
+  CHECK_RESULT(GetLabel(depth, &label));
   if (label->label_type != LabelType::Loop)
-    COMBINE_RESULT(result, check_signature(tc, label->sig, "br_if"));
+    COMBINE_RESULT(result, CheckSignature(label->sig, "br_if"));
   return result;
 }
 
-Result typechecker_begin_br_table(TypeChecker* tc) {
-  tc->br_table_sig = Type::Any;
-  return pop_and_check_1_type(tc, Type::I32, "br_table");
+Result TypeChecker::BeginBrTable() {
+  br_table_sig_ = Type::Any;
+  return PopAndCheck1Type(Type::I32, "br_table");
 }
 
-Result typechecker_on_br_table_target(TypeChecker* tc, size_t depth) {
+Result TypeChecker::OnBrTableTarget(Index depth) {
   Result result = Result::Ok;
-  TypeCheckerLabel* label;
-  CHECK_RESULT(typechecker_get_label(tc, depth, &label));
-  assert(label->sig.size() <= 1);
-  Type label_sig = label->sig.size() == 0 ? Type::Void : label->sig[0];
-  COMBINE_RESULT(result,
-                 check_type(tc, tc->br_table_sig, label_sig, "br_table"));
-  tc->br_table_sig = label_sig;
+  Label* label;
+  CHECK_RESULT(GetLabel(depth, &label));
+  Type label_sig;
+  if (label->label_type == LabelType::Loop) {
+    label_sig = Type::Void;
+  } else {
+    assert(label->sig.size() <= 1);
+    label_sig = label->sig.size() == 0 ? Type::Void : label->sig[0];
+  }
+
+  COMBINE_RESULT(result, CheckType(br_table_sig_, label_sig, "br_table"));
+  br_table_sig_ = label_sig;
 
   if (label->label_type != LabelType::Loop)
-    COMBINE_RESULT(result, check_signature(tc, label->sig, "br_table"));
+    COMBINE_RESULT(result, CheckSignature(label->sig, "br_table"));
   return result;
 }
 
-Result typechecker_end_br_table(TypeChecker* tc) {
-  return set_unreachable(tc);
+Result TypeChecker::EndBrTable() {
+  return SetUnreachable();
 }
 
-Result typechecker_on_call(TypeChecker* tc,
-                           const TypeVector* param_types,
+Result TypeChecker::OnCall(const TypeVector* param_types,
                            const TypeVector* result_types) {
-  return pop_and_check_call(tc, *param_types, *result_types, "call");
+  return PopAndCheckCall(*param_types, *result_types, "call");
 }
 
-Result typechecker_on_call_indirect(TypeChecker* tc,
-                                    const TypeVector* param_types,
-                                    const TypeVector* result_types) {
+Result TypeChecker::OnCallIndirect(const TypeVector* param_types,
+                                   const TypeVector* result_types) {
   Result result = Result::Ok;
-  COMBINE_RESULT(result, pop_and_check_1_type(tc, Type::I32, "call_indirect"));
-  COMBINE_RESULT(result, pop_and_check_call(tc, *param_types, *result_types,
-                                            "call_indirect"));
+  COMBINE_RESULT(result, PopAndCheck1Type(Type::I32, "call_indirect"));
+  COMBINE_RESULT(result,
+                 PopAndCheckCall(*param_types, *result_types, "call_indirect"));
   return result;
 }
 
-Result typechecker_on_compare(TypeChecker* tc, Opcode opcode) {
-  return check_opcode2(tc, opcode);
+Result TypeChecker::OnCompare(Opcode opcode) {
+  return CheckOpcode2(opcode);
 }
 
-Result typechecker_on_const(TypeChecker* tc, Type type) {
-  push_type(tc, type);
+Result TypeChecker::OnConst(Type type) {
+  PushType(type);
   return Result::Ok;
 }
 
-Result typechecker_on_convert(TypeChecker* tc, Opcode opcode) {
-  return check_opcode1(tc, opcode);
+Result TypeChecker::OnConvert(Opcode opcode) {
+  return CheckOpcode1(opcode);
 }
 
-Result typechecker_on_current_memory(TypeChecker* tc) {
-  push_type(tc, Type::I32);
+Result TypeChecker::OnCurrentMemory() {
+  PushType(Type::I32);
   return Result::Ok;
 }
 
-Result typechecker_on_drop(TypeChecker* tc) {
+Result TypeChecker::OnDrop() {
   Result result = Result::Ok;
   Type type = Type::Any;
-  COMBINE_RESULT(result, check_type_stack_limit(tc, 1, "drop"));
-  COMBINE_RESULT(result, pop_type(tc, &type));
+  COMBINE_RESULT(result, CheckTypeStackLimit(1, "drop"));
+  COMBINE_RESULT(result, PopType(&type));
   return result;
 }
 
-Result typechecker_on_else(TypeChecker* tc) {
+Result TypeChecker::OnElse() {
   Result result = Result::Ok;
-  TypeCheckerLabel* label;
-  CHECK_RESULT(top_label(tc, &label));
-  COMBINE_RESULT(result, check_label_type(label, LabelType::If));
-  COMBINE_RESULT(result,
-                 pop_and_check_signature(tc, label->sig, "if true branch"));
-  COMBINE_RESULT(result, check_type_stack_end(tc, "if true branch"));
-  reset_type_stack_to_label(tc, label);
+  Label* label;
+  CHECK_RESULT(TopLabel(&label));
+  COMBINE_RESULT(result, CheckLabelType(label, LabelType::If));
+  COMBINE_RESULT(result, PopAndCheckSignature(label->sig, "if true branch"));
+  COMBINE_RESULT(result, CheckTypeStackEnd("if true branch"));
+  ResetTypeStackToLabel(label);
   label->label_type = LabelType::Else;
   label->unreachable = false;
   return result;
 }
 
-static Result on_end(TypeChecker* tc,
-                     TypeCheckerLabel* label,
-                     const char* sig_desc,
-                     const char* end_desc) {
+Result TypeChecker::OnEnd(Label* label,
+                          const char* sig_desc,
+                          const char* end_desc) {
   Result result = Result::Ok;
-  COMBINE_RESULT(result, pop_and_check_signature(tc, label->sig, sig_desc));
-  COMBINE_RESULT(result, check_type_stack_end(tc, end_desc));
-  reset_type_stack_to_label(tc, label);
-  push_types(tc, label->sig);
-  pop_label(tc);
+  COMBINE_RESULT(result, PopAndCheckSignature(label->sig, sig_desc));
+  COMBINE_RESULT(result, CheckTypeStackEnd(end_desc));
+  ResetTypeStackToLabel(label);
+  PushTypes(label->sig);
+  PopLabel();
   return result;
 }
 
-Result typechecker_on_end(TypeChecker* tc) {
+Result TypeChecker::OnEnd() {
   Result result = Result::Ok;
   static const char* s_label_type_name[] = {"function", "block", "loop", "if",
                                             "if false branch"};
   WABT_STATIC_ASSERT(WABT_ARRAY_SIZE(s_label_type_name) == kLabelTypeCount);
-  TypeCheckerLabel* label;
-  CHECK_RESULT(top_label(tc, &label));
+  Label* label;
+  CHECK_RESULT(TopLabel(&label));
   assert(static_cast<int>(label->label_type) < kLabelTypeCount);
   if (label->label_type == LabelType::If) {
     if (label->sig.size() != 0) {
-      print_error(tc, "if without else cannot have type signature.");
+      PrintError("if without else cannot have type signature.");
       result = Result::Error;
     }
   }
   const char* desc = s_label_type_name[static_cast<int>(label->label_type)];
-  COMBINE_RESULT(result, on_end(tc, label, desc, desc));
+  COMBINE_RESULT(result, OnEnd(label, desc, desc));
   return result;
 }
 
-Result typechecker_on_grow_memory(TypeChecker* tc) {
-  return check_opcode1(tc, Opcode::GrowMemory);
+Result TypeChecker::OnGrowMemory() {
+  return CheckOpcode1(Opcode::GrowMemory);
 }
 
-Result typechecker_on_if(TypeChecker* tc, const TypeVector* sig) {
-  Result result = pop_and_check_1_type(tc, Type::I32, "if");
-  push_label(tc, LabelType::If, *sig);
+Result TypeChecker::OnIf(const TypeVector* sig) {
+  Result result = PopAndCheck1Type(Type::I32, "if");
+  PushLabel(LabelType::If, *sig);
   return result;
 }
 
-Result typechecker_on_get_global(TypeChecker* tc, Type type) {
-  push_type(tc, type);
+Result TypeChecker::OnGetGlobal(Type type) {
+  PushType(type);
   return Result::Ok;
 }
 
-Result typechecker_on_get_local(TypeChecker* tc, Type type) {
-  push_type(tc, type);
+Result TypeChecker::OnGetLocal(Type type) {
+  PushType(type);
   return Result::Ok;
 }
 
-Result typechecker_on_load(TypeChecker* tc, Opcode opcode) {
-  return check_opcode1(tc, opcode);
+Result TypeChecker::OnLoad(Opcode opcode) {
+  return CheckOpcode1(opcode);
 }
 
-Result typechecker_on_loop(TypeChecker* tc, const TypeVector* sig) {
-  push_label(tc, LabelType::Loop, *sig);
+Result TypeChecker::OnLoop(const TypeVector* sig) {
+  PushLabel(LabelType::Loop, *sig);
   return Result::Ok;
 }
 
-Result typechecker_on_return(TypeChecker* tc) {
+Result TypeChecker::OnReturn() {
   Result result = Result::Ok;
-  TypeCheckerLabel* func_label;
-  CHECK_RESULT(
-      typechecker_get_label(tc, tc->label_stack.size() - 1, &func_label));
-  COMBINE_RESULT(result,
-                 pop_and_check_signature(tc, func_label->sig, "return"));
-  CHECK_RESULT(set_unreachable(tc));
+  Label* func_label;
+  CHECK_RESULT(GetLabel(label_stack_.size() - 1, &func_label));
+  COMBINE_RESULT(result, PopAndCheckSignature(func_label->sig, "return"));
+  CHECK_RESULT(SetUnreachable());
   return result;
 }
 
-Result typechecker_on_select(TypeChecker* tc) {
+Result TypeChecker::OnSelect() {
   Result result = Result::Ok;
-  COMBINE_RESULT(result, pop_and_check_1_type(tc, Type::I32, "select"));
+  COMBINE_RESULT(result, PopAndCheck1Type(Type::I32, "select"));
   Type type = Type::Any;
-  COMBINE_RESULT(result, pop_and_check_2_types_are_equal(tc, &type, "select"));
-  push_type(tc, type);
+  COMBINE_RESULT(result, PopAndCheck2TypesAreEqual(&type, "select"));
+  PushType(type);
   return result;
 }
 
-Result typechecker_on_set_global(TypeChecker* tc, Type type) {
-  return pop_and_check_1_type(tc, type, "set_global");
+Result TypeChecker::OnSetGlobal(Type type) {
+  return PopAndCheck1Type(type, "set_global");
 }
 
-Result typechecker_on_set_local(TypeChecker* tc, Type type) {
-  return pop_and_check_1_type(tc, type, "set_local");
+Result TypeChecker::OnSetLocal(Type type) {
+  return PopAndCheck1Type(type, "set_local");
 }
 
-Result typechecker_on_store(TypeChecker* tc, Opcode opcode) {
-  return check_opcode2(tc, opcode);
+Result TypeChecker::OnStore(Opcode opcode) {
+  return CheckOpcode2(opcode);
 }
 
-Result typechecker_on_tee_local(TypeChecker* tc, Type type) {
+Result TypeChecker::OnTeeLocal(Type type) {
   Result result = Result::Ok;
   Type value = Type::Any;
-  COMBINE_RESULT(result, check_type_stack_limit(tc, 1, "tee_local"));
-  COMBINE_RESULT(result, top_type(tc, &value));
-  COMBINE_RESULT(result, check_type(tc, value, type, "tee_local"));
+  COMBINE_RESULT(result, CheckTypeStackLimit(1, "tee_local"));
+  COMBINE_RESULT(result, TopType(&value));
+  COMBINE_RESULT(result, CheckType(value, type, "tee_local"));
   return result;
 }
 
-Result typechecker_on_unary(TypeChecker* tc, Opcode opcode) {
-  return check_opcode1(tc, opcode);
+Result TypeChecker::OnUnary(Opcode opcode) {
+  return CheckOpcode1(opcode);
 }
 
-Result typechecker_on_unreachable(TypeChecker* tc) {
-  return set_unreachable(tc);
+Result TypeChecker::OnUnreachable() {
+  return SetUnreachable();
 }
 
-Result typechecker_end_function(TypeChecker* tc) {
+Result TypeChecker::EndFunction() {
   Result result = Result::Ok;
-  TypeCheckerLabel* label;
-  CHECK_RESULT(top_label(tc, &label));
-  COMBINE_RESULT(result, check_label_type(label, LabelType::Func));
-  COMBINE_RESULT(result, on_end(tc, label, "implicit return", "function"));
+  Label* label;
+  CHECK_RESULT(TopLabel(&label));
+  COMBINE_RESULT(result, CheckLabelType(label, LabelType::Func));
+  COMBINE_RESULT(result, OnEnd(label, "implicit return", "function"));
   return result;
 }
 
diff --git a/lib/wabt/src/type-checker.h b/lib/wabt/src/type-checker.h
index b3135d1..f723836 100644
--- a/lib/wabt/src/type-checker.h
+++ b/lib/wabt/src/type-checker.h
@@ -17,79 +17,110 @@
 #ifndef WABT_TYPE_CHECKER_H_
 #define WABT_TYPE_CHECKER_H_
 
+#include <functional>
 #include <vector>
 
 #include "common.h"
+#include "opcode.h"
 
 namespace wabt {
 
-typedef void (*TypeCheckerErrorCallback)(const char* msg, void* user_data);
+class TypeChecker {
+ public:
+  typedef std::function<void(const char* msg)> ErrorCallback;
 
-struct TypeCheckerErrorHandler {
-  TypeCheckerErrorCallback on_error;
-  void* user_data;
+  struct Label {
+    Label(LabelType, const TypeVector& sig, size_t limit);
+
+    LabelType label_type;
+    TypeVector sig;
+    size_t type_stack_limit;
+    bool unreachable;
+  };
+
+  TypeChecker() = default;
+  explicit TypeChecker(const ErrorCallback&);
+
+  void set_error_callback(const ErrorCallback& error_callback) {
+    error_callback_ = error_callback;
+  }
+
+  size_t type_stack_size() const { return type_stack_.size(); }
+
+  bool IsUnreachable();
+  Result GetLabel(Index depth, Label** out_label);
+
+  Result BeginFunction(const TypeVector* sig);
+  Result OnBinary(Opcode);
+  Result OnBlock(const TypeVector* sig);
+  Result OnBr(Index depth);
+  Result OnBrIf(Index depth);
+  Result BeginBrTable();
+  Result OnBrTableTarget(Index depth);
+  Result EndBrTable();
+  Result OnCall(const TypeVector* param_types, const TypeVector* result_types);
+  Result OnCallIndirect(const TypeVector* param_types,
+                        const TypeVector* result_types);
+  Result OnCompare(Opcode);
+  Result OnConst(Type);
+  Result OnConvert(Opcode);
+  Result OnCurrentMemory();
+  Result OnDrop();
+  Result OnElse();
+  Result OnEnd();
+  Result OnGetGlobal(Type);
+  Result OnGetLocal(Type);
+  Result OnGrowMemory();
+  Result OnIf(const TypeVector* sig);
+  Result OnLoad(Opcode);
+  Result OnLoop(const TypeVector* sig);
+  Result OnReturn();
+  Result OnSelect();
+  Result OnSetGlobal(Type);
+  Result OnSetLocal(Type);
+  Result OnStore(Opcode);
+  Result OnTeeLocal(Type);
+  Result OnUnary(Opcode);
+  Result OnUnreachable();
+  Result EndFunction();
+
+ private:
+  void WABT_PRINTF_FORMAT(2, 3) PrintError(const char* fmt, ...);
+  Result TopLabel(Label** out_label);
+  void ResetTypeStackToLabel(Label* label);
+  Result SetUnreachable();
+  void PushLabel(LabelType label_type, const TypeVector& sig);
+  Result PopLabel();
+  Result CheckLabelType(Label* label, LabelType label_type);
+  Result PeekType(Index depth, Type* out_type);
+  Result TopType(Type* out_type);
+  Result PopType(Type* out_type);
+  Result DropTypes(size_t drop_count);
+  void PushType(Type type);
+  void PushTypes(const TypeVector& types);
+  Result CheckTypeStackLimit(size_t expected, const char* desc);
+  Result CheckTypeStackEnd(const char* desc);
+  Result CheckType(Type actual, Type expected, const char* desc);
+  Result CheckSignature(const TypeVector& sig, const char* desc);
+  Result PopAndCheckSignature(const TypeVector& sig, const char* desc);
+  Result PopAndCheckCall(const TypeVector& param_types,
+                         const TypeVector& result_types,
+                         const char* desc);
+  Result PopAndCheck1Type(Type expected, const char* desc);
+  Result PopAndCheck2Types(Type expected1, Type expected2, const char* desc);
+  Result PopAndCheck2TypesAreEqual(Type* out_type, const char* desc);
+  Result CheckOpcode1(Opcode opcode);
+  Result CheckOpcode2(Opcode opcode);
+  Result OnEnd(Label* label, const char* sig_desc, const char* end_desc);
+
+  ErrorCallback error_callback_;
+  TypeVector type_stack_;
+  std::vector<Label> label_stack_;
+  // TODO(binji): This will need to be complete signature when signatures with
+  // multiple types are allowed.
+  Type br_table_sig_ = Type::Void;
 };
 
-struct TypeCheckerLabel {
-  TypeCheckerLabel(LabelType, const TypeVector& sig, size_t limit);
-
-  LabelType label_type;
-  TypeVector sig;
-  size_t type_stack_limit;
-  bool unreachable;
-};
-
-struct TypeChecker {
-  TypeCheckerErrorHandler* error_handler = nullptr;
-  TypeVector type_stack;
-  std::vector<TypeCheckerLabel> label_stack;
-  /* TODO(binji): will need to be complete signature when signatures with
-   * multiple types are allowed. */
-  Type br_table_sig;
-};
-
-bool typechecker_is_unreachable(TypeChecker* tc);
-Result typechecker_get_label(TypeChecker* tc,
-                             size_t depth,
-                             TypeCheckerLabel** out_label);
-
-Result typechecker_begin_function(TypeChecker*, const TypeVector* sig);
-Result typechecker_on_binary(TypeChecker*, Opcode);
-Result typechecker_on_block(TypeChecker*, const TypeVector* sig);
-Result typechecker_on_br(TypeChecker*, size_t depth);
-Result typechecker_on_br_if(TypeChecker*, size_t depth);
-Result typechecker_begin_br_table(TypeChecker*);
-Result typechecker_on_br_table_target(TypeChecker*, size_t depth);
-Result typechecker_end_br_table(TypeChecker*);
-Result typechecker_on_call(TypeChecker*,
-                           const TypeVector* param_types,
-                           const TypeVector* result_types);
-Result typechecker_on_call_indirect(TypeChecker*,
-                                    const TypeVector* param_types,
-                                    const TypeVector* result_types);
-Result typechecker_on_compare(TypeChecker*, Opcode);
-Result typechecker_on_const(TypeChecker*, Type);
-Result typechecker_on_convert(TypeChecker*, Opcode);
-Result typechecker_on_current_memory(TypeChecker*);
-Result typechecker_on_drop(TypeChecker*);
-Result typechecker_on_else(TypeChecker*);
-Result typechecker_on_end(TypeChecker*);
-Result typechecker_on_get_global(TypeChecker*, Type);
-Result typechecker_on_get_local(TypeChecker*, Type);
-Result typechecker_on_grow_memory(TypeChecker*);
-Result typechecker_on_if(TypeChecker*, const TypeVector* sig);
-Result typechecker_on_load(TypeChecker*, Opcode);
-Result typechecker_on_loop(TypeChecker*, const TypeVector* sig);
-Result typechecker_on_return(TypeChecker*);
-Result typechecker_on_select(TypeChecker*);
-Result typechecker_on_set_global(TypeChecker*, Type);
-Result typechecker_on_set_local(TypeChecker*, Type);
-Result typechecker_on_store(TypeChecker*, Opcode);
-Result typechecker_on_tee_local(TypeChecker*, Type);
-Result typechecker_on_unary(TypeChecker*, Opcode);
-Result typechecker_on_unreachable(TypeChecker*);
-Result typechecker_end_function(TypeChecker*);
-
 }  // namespace wabt
 
 #endif /* WABT_TYPE_CHECKER_H_ */
diff --git a/lib/wabt/src/utf8.cc b/lib/wabt/src/utf8.cc
new file mode 100644
index 0000000..f582d76
--- /dev/null
+++ b/lib/wabt/src/utf8.cc
@@ -0,0 +1,102 @@
+/*
+ * Copyright 2017 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "utf8.h"
+
+#include <cstdint>
+
+namespace wabt {
+
+namespace {
+
+const int s_utf8_length[256] = {
+ // 0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  // 0x00
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  // 0x10
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  // 0x20
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  // 0x30
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  // 0x40
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  // 0x50
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  // 0x60
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  // 0x70
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  // 0x80
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  // 0x90
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  // 0xa0
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  // 0xb0
+    0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,  // 0xc0
+    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,  // 0xd0
+    3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,  // 0xe0
+    4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  // 0xf0
+};
+
+// Returns true if this is a valid continuation byte.
+bool is_cont(uint8_t c) {
+  return (c & 0xc0) == 0x80;
+}
+
+}  // namespace
+
+bool is_valid_utf8(const char* s, size_t s_length) {
+  const uint8_t* p = reinterpret_cast<const uint8_t*>(s);
+  const uint8_t* end = p + s_length;
+  while (p < end) {
+    uint8_t cu0 = *p;
+    int length = s_utf8_length[cu0];
+    if (p + length > end)
+      return false;
+
+    switch (length) {
+      case 0:
+        return false;
+
+      case 1:
+        p++;
+        break;
+
+      case 2:
+        p++;
+        if (!is_cont(*p++))
+          return false;
+        break;
+
+      case 3: {
+        p++;
+        uint8_t cu1 = *p++;
+        uint8_t cu2 = *p++;
+        if (!(is_cont(cu1) && is_cont(cu2)) ||
+            (cu0 == 0xe0 && cu1 < 0xa0) ||  // Overlong encoding.
+            (cu0 == 0xed && cu1 >= 0xa0))   // UTF-16 surrogate halves.
+          return false;
+        break;
+      }
+
+      case 4: {
+        p++;
+        uint8_t cu1 = *p++;
+        uint8_t cu2 = *p++;
+        uint8_t cu3 = *p++;
+        if (!(is_cont(cu1) && is_cont(cu2) && is_cont(cu3)) ||
+            (cu0 == 0xf0 && cu1 < 0x90) ||  // Overlong encoding.
+            (cu0 == 0xf4 && cu1 >= 0x90))   // Code point >= 0x11000.
+          return false;
+        break;
+      }
+    }
+  }
+  return true;
+}
+
+}  // namespace wabt
diff --git a/lib/wabt/src/ast-writer.h b/lib/wabt/src/utf8.h
similarity index 70%
copy from lib/wabt/src/ast-writer.h
copy to lib/wabt/src/utf8.h
index 950e640..3870062 100644
--- a/lib/wabt/src/ast-writer.h
+++ b/lib/wabt/src/utf8.h
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 WebAssembly Community Group participants
+ * Copyright 2017 WebAssembly Community Group participants
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -14,18 +14,15 @@
  * limitations under the License.
  */
 
-#ifndef WABT_AST_WRITER_H_
-#define WABT_AST_WRITER_H_
+#ifndef WABT_UTF8_H_
+#define WABT_UTF8_H_
 
-#include "common.h"
+#include <stdlib.h>
 
 namespace wabt {
 
-struct Module;
-struct Writer;
-
-Result write_ast(struct Writer*, const struct Module*);
+bool is_valid_utf8(const char* s, size_t length);
 
 }  // namespace wabt
 
-#endif /* WABT_AST_WRITER_H_ */
+#endif // WABT_UTF8_H_
diff --git a/lib/wabt/src/validator.cc b/lib/wabt/src/validator.cc
index dc1f12b..b652bf3 100644
--- a/lib/wabt/src/validator.cc
+++ b/lib/wabt/src/validator.cc
@@ -17,370 +17,435 @@
 #include "validator.h"
 #include "config.h"
 
-#include <assert.h>
-#include <inttypes.h>
-#include <memory.h>
-#include <stdarg.h>
-#include <stdio.h>
+#include <cassert>
+#include <cinttypes>
+#include <cstdarg>
+#include <cstdio>
 
-#include "ast-parser-lexer-shared.h"
-#include "binary-reader-ast.h"
 #include "binary-reader.h"
+#include "source-error-handler.h"
 #include "type-checker.h"
+#include "wast-parser-lexer-shared.h"
 
 namespace wabt {
 
 namespace {
 
-enum class ActionResultKind {
-  Error,
-  Types,
-  Type,
-};
+class Validator {
+ public:
+  WABT_DISALLOW_COPY_AND_ASSIGN(Validator);
+  Validator(SourceErrorHandler*, WastLexer*, const Script*);
 
-struct ActionResult {
-  ActionResultKind kind;
-  union {
-    const TypeVector* types;
-    Type type;
+  Result CheckScript(const Script* script);
+
+ private:
+  struct ActionResult {
+    enum class Kind {
+      Error,
+      Types,
+      Type,
+    } kind;
+
+    union {
+      const TypeVector* types;
+      Type type;
+    };
   };
+
+  void WABT_PRINTF_FORMAT(3, 4)
+      PrintError(const Location* loc, const char* fmt, ...);
+  void OnTypecheckerError(const char* msg);
+  Result CheckVar(Index max_index,
+                  const Var* var,
+                  const char* desc,
+                  Index* out_index);
+  Result CheckFuncVar(const Var* var, const Func** out_func);
+  Result CheckGlobalVar(const Var* var,
+                        const Global** out_global,
+                        Index* out_global_index);
+  Type GetGlobalVarTypeOrAny(const Var* var);
+  Result CheckFuncTypeVar(const Var* var, const FuncType** out_func_type);
+  Result CheckTableVar(const Var* var, const Table** out_table);
+  Result CheckMemoryVar(const Var* var, const Memory** out_memory);
+  Result CheckLocalVar(const Var* var, Type* out_type);
+  Type GetLocalVarTypeOrAny(const Var* var);
+  void CheckAlign(const Location* loc,
+                  Address alignment,
+                  Address natural_alignment);
+  void CheckType(const Location* loc,
+                 Type actual,
+                 Type expected,
+                 const char* desc);
+  void CheckTypeIndex(const Location* loc,
+                      Type actual,
+                      Type expected,
+                      const char* desc,
+                      Index index,
+                      const char* index_kind);
+  void CheckTypes(const Location* loc,
+                  const TypeVector& actual,
+                  const TypeVector& expected,
+                  const char* desc,
+                  const char* index_kind);
+  void CheckConstTypes(const Location* loc,
+                       const TypeVector& actual,
+                       const ConstVector& expected,
+                       const char* desc);
+  void CheckConstType(const Location* loc,
+                      Type actual,
+                      const ConstVector& expected,
+                      const char* desc);
+  void CheckAssertReturnNanType(const Location* loc,
+                                Type actual,
+                                const char* desc);
+  void CheckExprList(const Location* loc, const Expr* first);
+  void CheckHasMemory(const Location* loc, Opcode opcode);
+  void CheckBlockSig(const Location* loc,
+                     Opcode opcode,
+                     const BlockSignature* sig);
+  void CheckExpr(const Expr* expr);
+  void CheckFuncSignatureMatchesFuncType(const Location* loc,
+                                         const FuncSignature& sig,
+                                         const FuncType* func_type);
+  void CheckFunc(const Location* loc, const Func* func);
+  void PrintConstExprError(const Location* loc, const char* desc);
+  void CheckConstInitExpr(const Location* loc,
+                          const Expr* expr,
+                          Type expected_type,
+                          const char* desc);
+  void CheckGlobal(const Location* loc, const Global* global);
+  void CheckLimits(const Location* loc,
+                   const Limits* limits,
+                   uint64_t absolute_max,
+                   const char* desc);
+  void CheckTable(const Location* loc, const Table* table);
+  void CheckElemSegments(const Module* module);
+  void CheckMemory(const Location* loc, const Memory* memory);
+  void CheckDataSegments(const Module* module);
+  void CheckImport(const Location* loc, const Import* import);
+  void CheckExport(const Location* loc, const Export* export_);
+
+  void CheckDuplicateExportBindings(const Module* module);
+  void CheckModule(const Module* module);
+  const TypeVector* CheckInvoke(const Action* action);
+  Result CheckGet(const Action* action, Type* out_type);
+  ActionResult CheckAction(const Action* action);
+  void CheckAssertReturnNanCommand(const Action* action);
+  void CheckCommand(const Command* command);
+
+  SourceErrorHandler* error_handler_ = nullptr;
+  WastLexer* lexer_ = nullptr;
+  const Script* script_ = nullptr;
+  const Module* current_module_ = nullptr;
+  const Func* current_func_ = nullptr;
+  Index current_table_index_ = 0;
+  Index current_memory_index_ = 0;
+  Index current_global_index_ = 0;
+  Index num_imported_globals_ = 0;
+  TypeChecker typechecker_;
+  // Cached for access by OnTypecheckerError.
+  const Location* expr_loc_ = nullptr;
+  Result result_ = Result::Ok;
 };
 
-struct Context {
-  WABT_DISALLOW_COPY_AND_ASSIGN(Context);
-  Context(SourceErrorHandler*, AstLexer*, const Script*);
+Validator::Validator(SourceErrorHandler* error_handler,
+                     WastLexer* lexer,
+                     const Script* script)
+    : error_handler_(error_handler), lexer_(lexer), script_(script) {
+  typechecker_.set_error_callback(
+      [this](const char* msg) { OnTypecheckerError(msg); });
+}
 
-  SourceErrorHandler* error_handler = nullptr;
-  AstLexer* lexer = nullptr;
-  const Script* script = nullptr;
-  const Module* current_module = nullptr;
-  const Func* current_func = nullptr;
-  int current_table_index = 0;
-  int current_memory_index = 0;
-  int current_global_index = 0;
-  int num_imported_globals = 0;
-  TypeChecker typechecker;
-  /* Cached for access by on_typechecker_error */
-  const Location* expr_loc = nullptr;
-  Result result = Result::Ok;
-};
-
-Context::Context(SourceErrorHandler* error_handler,
-                 AstLexer* lexer,
-                 const Script* script)
-    : error_handler(error_handler), lexer(lexer), script(script) {}
-
-}  // namespace
-
-static void WABT_PRINTF_FORMAT(3, 4)
-    print_error(Context* ctx, const Location* loc, const char* fmt, ...) {
-  ctx->result = Result::Error;
+void Validator::PrintError(const Location* loc, const char* fmt, ...) {
+  result_ = Result::Error;
   va_list args;
   va_start(args, fmt);
-  ast_format_error(ctx->error_handler, loc, ctx->lexer, fmt, args);
+  wast_format_error(error_handler_, loc, lexer_, fmt, args);
   va_end(args);
 }
 
-static void on_typechecker_error(const char* msg, void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  print_error(ctx, ctx->expr_loc, "%s", msg);
+void Validator::OnTypecheckerError(const char* msg) {
+  PrintError(expr_loc_, "%s", msg);
 }
 
 static bool is_power_of_two(uint32_t x) {
   return x && ((x & (x - 1)) == 0);
 }
 
-static uint32_t get_opcode_natural_alignment(Opcode opcode) {
-  uint32_t memory_size = get_opcode_memory_size(opcode);
+static Address get_opcode_natural_alignment(Opcode opcode) {
+  Address memory_size = get_opcode_memory_size(opcode);
   assert(memory_size != 0);
   return memory_size;
 }
 
-static Result check_var(Context* ctx,
-                        int max_index,
-                        const Var* var,
-                        const char* desc,
-                        int* out_index) {
+Result Validator::CheckVar(Index max_index,
+                           const Var* var,
+                           const char* desc,
+                           Index* out_index) {
   assert(var->type == VarType::Index);
-  if (var->index >= 0 && var->index < max_index) {
+  if (var->index < max_index) {
     if (out_index)
       *out_index = var->index;
     return Result::Ok;
   }
-  print_error(ctx, &var->loc, "%s variable out of range (max %d)", desc,
-              max_index);
+  PrintError(&var->loc, "%s variable out of range (max %" PRIindex ")", desc,
+             max_index);
   return Result::Error;
 }
 
-static Result check_func_var(Context* ctx,
-                             const Var* var,
-                             const Func** out_func) {
-  int index;
-  if (WABT_FAILED(check_var(ctx, ctx->current_module->funcs.size(), var,
-                            "function", &index))) {
+Result Validator::CheckFuncVar(const Var* var, const Func** out_func) {
+  Index index;
+  if (WABT_FAILED(
+          CheckVar(current_module_->funcs.size(), var, "function", &index))) {
     return Result::Error;
   }
 
   if (out_func)
-    *out_func = ctx->current_module->funcs[index];
+    *out_func = current_module_->funcs[index];
   return Result::Ok;
 }
 
-static Result check_global_var(Context* ctx,
-                               const Var* var,
-                               const Global** out_global,
-                               int* out_global_index) {
-  int index;
-  if (WABT_FAILED(check_var(ctx, ctx->current_module->globals.size(), var,
-                            "global", &index))) {
+Result Validator::CheckGlobalVar(const Var* var,
+                                 const Global** out_global,
+                                 Index* out_global_index) {
+  Index index;
+  if (WABT_FAILED(
+          CheckVar(current_module_->globals.size(), var, "global", &index))) {
     return Result::Error;
   }
 
   if (out_global)
-    *out_global = ctx->current_module->globals[index];
+    *out_global = current_module_->globals[index];
   if (out_global_index)
     *out_global_index = index;
   return Result::Ok;
 }
 
-static Type get_global_var_type_or_any(Context* ctx, const Var* var) {
+Type Validator::GetGlobalVarTypeOrAny(const Var* var) {
   const Global* global;
-  if (WABT_SUCCEEDED(check_global_var(ctx, var, &global, nullptr)))
+  if (WABT_SUCCEEDED(CheckGlobalVar(var, &global, nullptr)))
     return global->type;
   return Type::Any;
 }
 
-static Result check_func_type_var(Context* ctx,
-                                  const Var* var,
-                                  const FuncType** out_func_type) {
-  int index;
-  if (WABT_FAILED(check_var(ctx, ctx->current_module->func_types.size(), var,
-                            "function type", &index))) {
+Result Validator::CheckFuncTypeVar(const Var* var,
+                                   const FuncType** out_func_type) {
+  Index index;
+  if (WABT_FAILED(CheckVar(current_module_->func_types.size(), var,
+                           "function type", &index))) {
     return Result::Error;
   }
 
   if (out_func_type)
-    *out_func_type = ctx->current_module->func_types[index];
+    *out_func_type = current_module_->func_types[index];
   return Result::Ok;
 }
 
-static Result check_table_var(Context* ctx,
-                              const Var* var,
-                              const Table** out_table) {
-  int index;
-  if (WABT_FAILED(check_var(ctx, ctx->current_module->tables.size(), var,
-                            "table", &index))) {
+Result Validator::CheckTableVar(const Var* var, const Table** out_table) {
+  Index index;
+  if (WABT_FAILED(
+          CheckVar(current_module_->tables.size(), var, "table", &index))) {
     return Result::Error;
   }
 
   if (out_table)
-    *out_table = ctx->current_module->tables[index];
+    *out_table = current_module_->tables[index];
   return Result::Ok;
 }
 
-static Result check_memory_var(Context* ctx,
-                               const Var* var,
-                               const Memory** out_memory) {
-  int index;
-  if (WABT_FAILED(check_var(ctx, ctx->current_module->memories.size(), var,
-                            "memory", &index))) {
+Result Validator::CheckMemoryVar(const Var* var, const Memory** out_memory) {
+  Index index;
+  if (WABT_FAILED(
+          CheckVar(current_module_->memories.size(), var, "memory", &index))) {
     return Result::Error;
   }
 
   if (out_memory)
-    *out_memory = ctx->current_module->memories[index];
+    *out_memory = current_module_->memories[index];
   return Result::Ok;
 }
 
-static Result check_local_var(Context* ctx, const Var* var, Type* out_type) {
-  const Func* func = ctx->current_func;
-  int max_index = get_num_params_and_locals(func);
-  int index = get_local_index_by_var(func, var);
-  if (index >= 0 && index < max_index) {
+Result Validator::CheckLocalVar(const Var* var, Type* out_type) {
+  const Func* func = current_func_;
+  Index max_index = func->GetNumParamsAndLocals();
+  Index index = func->GetLocalIndex(*var);
+  if (index < max_index) {
     if (out_type) {
-      int num_params = get_num_params(func);
+      Index num_params = func->GetNumParams();
       if (index < num_params) {
-        *out_type = get_param_type(func, index);
+        *out_type = func->GetParamType(index);
       } else {
-        *out_type = ctx->current_func->local_types[index - num_params];
+        *out_type = current_func_->local_types[index - num_params];
       }
     }
     return Result::Ok;
   }
 
   if (var->type == VarType::Name) {
-    print_error(ctx, &var->loc,
-                "undefined local variable \"" PRIstringslice "\"",
-                WABT_PRINTF_STRING_SLICE_ARG(var->name));
+    PrintError(&var->loc, "undefined local variable \"" PRIstringslice "\"",
+               WABT_PRINTF_STRING_SLICE_ARG(var->name));
   } else {
-    print_error(ctx, &var->loc, "local variable out of range (max %d)",
-                max_index);
+    PrintError(&var->loc, "local variable out of range (max %" PRIindex ")",
+               max_index);
   }
   return Result::Error;
 }
 
-static Type get_local_var_type_or_any(Context* ctx, const Var* var) {
+Type Validator::GetLocalVarTypeOrAny(const Var* var) {
   Type type = Type::Any;
-  check_local_var(ctx, var, &type);
+  CheckLocalVar(var, &type);
   return type;
 }
 
-static void check_align(Context* ctx,
-                        const Location* loc,
-                        uint32_t alignment,
-                        uint32_t natural_alignment) {
+void Validator::CheckAlign(const Location* loc,
+                           Address alignment,
+                           Address natural_alignment) {
   if (alignment != WABT_USE_NATURAL_ALIGNMENT) {
     if (!is_power_of_two(alignment))
-      print_error(ctx, loc, "alignment must be power-of-two");
+      PrintError(loc, "alignment must be power-of-two");
     if (alignment > natural_alignment) {
-      print_error(ctx, loc,
-                  "alignment must not be larger than natural alignment (%u)",
-                  natural_alignment);
+      PrintError(loc,
+                 "alignment must not be larger than natural alignment (%u)",
+                 natural_alignment);
     }
   }
 }
 
-static void check_offset(Context* ctx, const Location* loc, uint64_t offset) {
-  if (offset > UINT32_MAX) {
-    print_error(ctx, loc, "offset must be less than or equal to 0xffffffff");
-  }
-}
-
-static void check_type(Context* ctx,
-                       const Location* loc,
-                       Type actual,
-                       Type expected,
-                       const char* desc) {
+void Validator::CheckType(const Location* loc,
+                          Type actual,
+                          Type expected,
+                          const char* desc) {
   if (expected != actual) {
-    print_error(ctx, loc, "type mismatch at %s. got %s, expected %s", desc,
-                get_type_name(actual), get_type_name(expected));
+    PrintError(loc, "type mismatch at %s. got %s, expected %s", desc,
+               get_type_name(actual), get_type_name(expected));
   }
 }
 
-static void check_type_index(Context* ctx,
-                             const Location* loc,
-                             Type actual,
-                             Type expected,
-                             const char* desc,
-                             int index,
-                             const char* index_kind) {
+void Validator::CheckTypeIndex(const Location* loc,
+                               Type actual,
+                               Type expected,
+                               const char* desc,
+                               Index index,
+                               const char* index_kind) {
   if (expected != actual && expected != Type::Any && actual != Type::Any) {
-    print_error(ctx, loc, "type mismatch for %s %d of %s. got %s, expected %s",
-                index_kind, index, desc, get_type_name(actual),
-                get_type_name(expected));
+    PrintError(loc,
+               "type mismatch for %s %" PRIindex " of %s. got %s, expected %s",
+               index_kind, index, desc, get_type_name(actual),
+               get_type_name(expected));
   }
 }
 
-static void check_types(Context* ctx,
-                        const Location* loc,
-                        const TypeVector& actual,
-                        const TypeVector& expected,
-                        const char* desc,
-                        const char* index_kind) {
+void Validator::CheckTypes(const Location* loc,
+                           const TypeVector& actual,
+                           const TypeVector& expected,
+                           const char* desc,
+                           const char* index_kind) {
   if (actual.size() == expected.size()) {
     for (size_t i = 0; i < actual.size(); ++i) {
-      check_type_index(ctx, loc, actual[i], expected[i], desc, i, index_kind);
+      CheckTypeIndex(loc, actual[i], expected[i], desc, i, index_kind);
     }
   } else {
-    print_error(ctx, loc, "expected %" PRIzd " %ss, got %" PRIzd,
-                expected.size(), index_kind, actual.size());
+    PrintError(loc, "expected %" PRIzd " %ss, got %" PRIzd, expected.size(),
+               index_kind, actual.size());
   }
 }
 
-static void check_const_types(Context* ctx,
-                              const Location* loc,
-                              const TypeVector& actual,
-                              const ConstVector& expected,
-                              const char* desc) {
+void Validator::CheckConstTypes(const Location* loc,
+                                const TypeVector& actual,
+                                const ConstVector& expected,
+                                const char* desc) {
   if (actual.size() == expected.size()) {
     for (size_t i = 0; i < actual.size(); ++i) {
-      check_type_index(ctx, loc, actual[i], expected[i].type, desc, i,
-                       "result");
+      CheckTypeIndex(loc, actual[i], expected[i].type, desc, i, "result");
     }
   } else {
-    print_error(ctx, loc, "expected %" PRIzd " results, got %" PRIzd,
-                expected.size(), actual.size());
+    PrintError(loc, "expected %" PRIzd " results, got %" PRIzd, expected.size(),
+               actual.size());
   }
 }
 
-static void check_const_type(Context* ctx,
-                             const Location* loc,
-                             Type actual,
-                             const ConstVector& expected,
-                             const char* desc) {
+void Validator::CheckConstType(const Location* loc,
+                               Type actual,
+                               const ConstVector& expected,
+                               const char* desc) {
   TypeVector actual_types;
   if (actual != Type::Void)
     actual_types.push_back(actual);
-  check_const_types(ctx, loc, actual_types, expected, desc);
+  CheckConstTypes(loc, actual_types, expected, desc);
 }
 
-static void check_assert_return_nan_type(Context* ctx,
-                                         const Location* loc,
+void Validator::CheckAssertReturnNanType(const Location* loc,
                                          Type actual,
                                          const char* desc) {
-  /* when using assert_return_nan, the result can be either a f32 or f64 type
-   * so we special case it here. */
+  // When using assert_return_nan, the result can be either a f32 or f64 type
+  // so we special case it here.
   if (actual != Type::F32 && actual != Type::F64) {
-    print_error(ctx, loc, "type mismatch at %s. got %s, expected f32 or f64",
-                desc, get_type_name(actual));
+    PrintError(loc, "type mismatch at %s. got %s, expected f32 or f64", desc,
+               get_type_name(actual));
   }
 }
 
-static void check_expr(Context* ctx, const Expr* expr);
-
-static void check_expr_list(Context* ctx,
-                            const Location* loc,
-                            const Expr* first) {
+void Validator::CheckExprList(const Location* loc, const Expr* first) {
   if (first) {
     for (const Expr* expr = first; expr; expr = expr->next)
-      check_expr(ctx, expr);
+      CheckExpr(expr);
   }
 }
 
-static void check_has_memory(Context* ctx, const Location* loc, Opcode opcode) {
-  if (ctx->current_module->memories.size() == 0) {
-    print_error(ctx, loc, "%s requires an imported or defined memory.",
-                get_opcode_name(opcode));
+void Validator::CheckHasMemory(const Location* loc, Opcode opcode) {
+  if (current_module_->memories.size() == 0) {
+    PrintError(loc, "%s requires an imported or defined memory.",
+               get_opcode_name(opcode));
   }
 }
 
-static void check_expr(Context* ctx, const Expr* expr) {
-  ctx->expr_loc = &expr->loc;
+void Validator::CheckBlockSig(const Location* loc,
+                              Opcode opcode,
+                              const BlockSignature* sig) {
+  if (sig->size() > 1) {
+    PrintError(loc,
+               "multiple %s signature result types not currently supported.",
+               get_opcode_name(opcode));
+  }
+}
+
+void Validator::CheckExpr(const Expr* expr) {
+  expr_loc_ = &expr->loc;
 
   switch (expr->type) {
     case ExprType::Binary:
-      typechecker_on_binary(&ctx->typechecker, expr->binary.opcode);
+      typechecker_.OnBinary(expr->binary.opcode);
       break;
 
     case ExprType::Block:
-      typechecker_on_block(&ctx->typechecker, &expr->block->sig);
-      check_expr_list(ctx, &expr->loc, expr->block->first);
-      typechecker_on_end(&ctx->typechecker);
+      CheckBlockSig(&expr->loc, Opcode::Block, &expr->block->sig);
+      typechecker_.OnBlock(&expr->block->sig);
+      CheckExprList(&expr->loc, expr->block->first);
+      typechecker_.OnEnd();
       break;
 
     case ExprType::Br:
-      typechecker_on_br(&ctx->typechecker, expr->br.var.index);
+      typechecker_.OnBr(expr->br.var.index);
       break;
 
     case ExprType::BrIf:
-      typechecker_on_br_if(&ctx->typechecker, expr->br_if.var.index);
+      typechecker_.OnBrIf(expr->br_if.var.index);
       break;
 
     case ExprType::BrTable: {
-      typechecker_begin_br_table(&ctx->typechecker);
-      for (Var& var: *expr->br_table.targets) {
-        typechecker_on_br_table_target(&ctx->typechecker, var.index);
+      typechecker_.BeginBrTable();
+      for (Var& var : *expr->br_table.targets) {
+        typechecker_.OnBrTableTarget(var.index);
       }
-      typechecker_on_br_table_target(&ctx->typechecker,
-                                     expr->br_table.default_target.index);
-      typechecker_end_br_table(&ctx->typechecker);
+      typechecker_.OnBrTableTarget(expr->br_table.default_target.index);
+      typechecker_.EndBrTable();
       break;
     }
 
     case ExprType::Call: {
       const Func* callee;
-      if (WABT_SUCCEEDED(check_func_var(ctx, &expr->call.var, &callee))) {
-        typechecker_on_call(&ctx->typechecker, &callee->decl.sig.param_types,
+      if (WABT_SUCCEEDED(CheckFuncVar(&expr->call.var, &callee))) {
+        typechecker_.OnCall(&callee->decl.sig.param_types,
                             &callee->decl.sig.result_types);
       }
       break;
@@ -388,179 +453,186 @@
 
     case ExprType::CallIndirect: {
       const FuncType* func_type;
-      if (ctx->current_module->tables.size() == 0) {
-        print_error(ctx, &expr->loc,
-                    "found call_indirect operator, but no table");
+      if (current_module_->tables.size() == 0) {
+        PrintError(&expr->loc, "found call_indirect operator, but no table");
       }
       if (WABT_SUCCEEDED(
-              check_func_type_var(ctx, &expr->call_indirect.var, &func_type))) {
-        typechecker_on_call_indirect(&ctx->typechecker,
-                                     &func_type->sig.param_types,
-                                     &func_type->sig.result_types);
+              CheckFuncTypeVar(&expr->call_indirect.var, &func_type))) {
+        typechecker_.OnCallIndirect(&func_type->sig.param_types,
+                                    &func_type->sig.result_types);
       }
       break;
     }
 
+    case ExprType::Catch:
+      // TODO(karlschimpf) Define.
+      PrintError(&expr->loc, "Catch: don't know how to validate");
+      break;
+
+    case ExprType::CatchAll:
+      // TODO(karlschimpf) Define.
+      PrintError(&expr->loc, "CatchAll: don't know how to validate");
+      break;
+
     case ExprType::Compare:
-      typechecker_on_compare(&ctx->typechecker, expr->compare.opcode);
+      typechecker_.OnCompare(expr->compare.opcode);
       break;
 
     case ExprType::Const:
-      typechecker_on_const(&ctx->typechecker, expr->const_.type);
+      typechecker_.OnConst(expr->const_.type);
       break;
 
     case ExprType::Convert:
-      typechecker_on_convert(&ctx->typechecker, expr->convert.opcode);
+      typechecker_.OnConvert(expr->convert.opcode);
       break;
 
     case ExprType::Drop:
-      typechecker_on_drop(&ctx->typechecker);
+      typechecker_.OnDrop();
       break;
 
     case ExprType::GetGlobal:
-      typechecker_on_get_global(
-          &ctx->typechecker,
-          get_global_var_type_or_any(ctx, &expr->get_global.var));
+      typechecker_.OnGetGlobal(GetGlobalVarTypeOrAny(&expr->get_global.var));
       break;
 
     case ExprType::GetLocal:
-      typechecker_on_get_local(
-          &ctx->typechecker,
-          get_local_var_type_or_any(ctx, &expr->get_local.var));
+      typechecker_.OnGetLocal(GetLocalVarTypeOrAny(&expr->get_local.var));
       break;
 
     case ExprType::GrowMemory:
-      check_has_memory(ctx, &expr->loc, Opcode::GrowMemory);
-      typechecker_on_grow_memory(&ctx->typechecker);
+      CheckHasMemory(&expr->loc, Opcode::GrowMemory);
+      typechecker_.OnGrowMemory();
       break;
 
     case ExprType::If:
-      typechecker_on_if(&ctx->typechecker, &expr->if_.true_->sig);
-      check_expr_list(ctx, &expr->loc, expr->if_.true_->first);
+      CheckBlockSig(&expr->loc, Opcode::If, &expr->if_.true_->sig);
+      typechecker_.OnIf(&expr->if_.true_->sig);
+      CheckExprList(&expr->loc, expr->if_.true_->first);
       if (expr->if_.false_) {
-        typechecker_on_else(&ctx->typechecker);
-        check_expr_list(ctx, &expr->loc, expr->if_.false_);
+        typechecker_.OnElse();
+        CheckExprList(&expr->loc, expr->if_.false_);
       }
-      typechecker_on_end(&ctx->typechecker);
+      typechecker_.OnEnd();
       break;
 
     case ExprType::Load:
-      check_has_memory(ctx, &expr->loc, expr->load.opcode);
-      check_align(ctx, &expr->loc, expr->load.align,
-                  get_opcode_natural_alignment(expr->load.opcode));
-      check_offset(ctx, &expr->loc, expr->load.offset);
-      typechecker_on_load(&ctx->typechecker, expr->load.opcode);
+      CheckHasMemory(&expr->loc, expr->load.opcode);
+      CheckAlign(&expr->loc, expr->load.align,
+                 get_opcode_natural_alignment(expr->load.opcode));
+      typechecker_.OnLoad(expr->load.opcode);
       break;
 
     case ExprType::Loop:
-      typechecker_on_loop(&ctx->typechecker, &expr->loop->sig);
-      check_expr_list(ctx, &expr->loc, expr->loop->first);
-      typechecker_on_end(&ctx->typechecker);
+      CheckBlockSig(&expr->loc, Opcode::Loop, &expr->loop->sig);
+      typechecker_.OnLoop(&expr->loop->sig);
+      CheckExprList(&expr->loc, expr->loop->first);
+      typechecker_.OnEnd();
       break;
 
     case ExprType::CurrentMemory:
-      check_has_memory(ctx, &expr->loc, Opcode::CurrentMemory);
-      typechecker_on_current_memory(&ctx->typechecker);
+      CheckHasMemory(&expr->loc, Opcode::CurrentMemory);
+      typechecker_.OnCurrentMemory();
       break;
 
     case ExprType::Nop:
       break;
 
+    case ExprType::Rethrow:
+      // TODO(karlschimpf) Define.
+      PrintError(&expr->loc, "Rethrow: don't know how to validate");
+      break;
+
     case ExprType::Return:
-      typechecker_on_return(&ctx->typechecker);
+      typechecker_.OnReturn();
       break;
 
     case ExprType::Select:
-      typechecker_on_select(&ctx->typechecker);
+      typechecker_.OnSelect();
       break;
 
     case ExprType::SetGlobal:
-      typechecker_on_set_global(
-          &ctx->typechecker,
-          get_global_var_type_or_any(ctx, &expr->set_global.var));
+      typechecker_.OnSetGlobal(GetGlobalVarTypeOrAny(&expr->set_global.var));
       break;
 
     case ExprType::SetLocal:
-      typechecker_on_set_local(
-          &ctx->typechecker,
-          get_local_var_type_or_any(ctx, &expr->set_local.var));
+      typechecker_.OnSetLocal(GetLocalVarTypeOrAny(&expr->set_local.var));
       break;
 
     case ExprType::Store:
-      check_has_memory(ctx, &expr->loc, expr->store.opcode);
-      check_align(ctx, &expr->loc, expr->store.align,
-                  get_opcode_natural_alignment(expr->store.opcode));
-      check_offset(ctx, &expr->loc, expr->store.offset);
-      typechecker_on_store(&ctx->typechecker, expr->store.opcode);
+      CheckHasMemory(&expr->loc, expr->store.opcode);
+      CheckAlign(&expr->loc, expr->store.align,
+                 get_opcode_natural_alignment(expr->store.opcode));
+      typechecker_.OnStore(expr->store.opcode);
       break;
 
     case ExprType::TeeLocal:
-      typechecker_on_tee_local(
-          &ctx->typechecker,
-          get_local_var_type_or_any(ctx, &expr->tee_local.var));
+      typechecker_.OnTeeLocal(GetLocalVarTypeOrAny(&expr->tee_local.var));
+      break;
+
+    case ExprType::Throw:
+      // TODO(karlschimpf) Define.
+      PrintError(&expr->loc, "Throw: don't know how to validate");
+      break;
+
+    case ExprType::TryBlock:
+      // TODO(karlschimpf) Define.
+      PrintError(&expr->loc, "TryBlock: don't know how to validate");
       break;
 
     case ExprType::Unary:
-      typechecker_on_unary(&ctx->typechecker, expr->unary.opcode);
+      typechecker_.OnUnary(expr->unary.opcode);
       break;
 
     case ExprType::Unreachable:
-      typechecker_on_unreachable(&ctx->typechecker);
+      typechecker_.OnUnreachable();
       break;
   }
 }
 
-static void check_func_signature_matches_func_type(Context* ctx,
-                                                   const Location* loc,
-                                                   const FuncSignature& sig,
-                                                   const FuncType* func_type) {
-  check_types(ctx, loc, sig.result_types, func_type->sig.result_types,
-              "function", "result");
-  check_types(ctx, loc, sig.param_types, func_type->sig.param_types, "function",
-              "argument");
+void Validator::CheckFuncSignatureMatchesFuncType(const Location* loc,
+                                                  const FuncSignature& sig,
+                                                  const FuncType* func_type) {
+  CheckTypes(loc, sig.result_types, func_type->sig.result_types, "function",
+             "result");
+  CheckTypes(loc, sig.param_types, func_type->sig.param_types, "function",
+             "argument");
 }
 
-static void check_func(Context* ctx, const Location* loc, const Func* func) {
-  ctx->current_func = func;
-  if (get_num_results(func) > 1) {
-    print_error(ctx, loc, "multiple result values not currently supported.");
-    /* don't run any other checks, the won't test the result_type properly */
+void Validator::CheckFunc(const Location* loc, const Func* func) {
+  current_func_ = func;
+  if (func->GetNumResults() > 1) {
+    PrintError(loc, "multiple result values not currently supported.");
+    // Don't run any other checks, the won't test the result_type properly.
     return;
   }
-  if (decl_has_func_type(&func->decl)) {
+  if (func->decl.has_func_type) {
     const FuncType* func_type;
-    if (WABT_SUCCEEDED(
-            check_func_type_var(ctx, &func->decl.type_var, &func_type))) {
-      check_func_signature_matches_func_type(ctx, loc, func->decl.sig,
-                                             func_type);
+    if (WABT_SUCCEEDED(CheckFuncTypeVar(&func->decl.type_var, &func_type))) {
+      CheckFuncSignatureMatchesFuncType(loc, func->decl.sig, func_type);
     }
   }
 
-  ctx->expr_loc = loc;
-  typechecker_begin_function(&ctx->typechecker, &func->decl.sig.result_types);
-  check_expr_list(ctx, loc, func->first_expr);
-  typechecker_end_function(&ctx->typechecker);
-  ctx->current_func = nullptr;
+  expr_loc_ = loc;
+  typechecker_.BeginFunction(&func->decl.sig.result_types);
+  CheckExprList(loc, func->first_expr);
+  typechecker_.EndFunction();
+  current_func_ = nullptr;
 }
 
-static void print_const_expr_error(Context* ctx,
-                                   const Location* loc,
+void Validator::PrintConstExprError(const Location* loc, const char* desc) {
+  PrintError(loc,
+             "invalid %s, must be a constant expression; either *.const or "
+             "get_global.",
+             desc);
+}
+
+void Validator::CheckConstInitExpr(const Location* loc,
+                                   const Expr* expr,
+                                   Type expected_type,
                                    const char* desc) {
-  print_error(ctx, loc,
-              "invalid %s, must be a constant expression; either *.const or "
-              "get_global.",
-              desc);
-}
-
-static void check_const_init_expr(Context* ctx,
-                                  const Location* loc,
-                                  const Expr* expr,
-                                  Type expected_type,
-                                  const char* desc) {
   Type type = Type::Void;
   if (expr) {
     if (expr->next) {
-      print_const_expr_error(ctx, loc, desc);
+      PrintConstExprError(loc, desc);
       return;
     }
 
@@ -571,166 +643,158 @@
 
       case ExprType::GetGlobal: {
         const Global* ref_global = nullptr;
-        int ref_global_index;
-        if (WABT_FAILED(check_global_var(ctx, &expr->get_global.var,
-                                         &ref_global, &ref_global_index))) {
+        Index ref_global_index;
+        if (WABT_FAILED(CheckGlobalVar(&expr->get_global.var, &ref_global,
+                                       &ref_global_index))) {
           return;
         }
 
         type = ref_global->type;
-        /* globals can only reference previously defined, internal globals */
-        if (ref_global_index >= ctx->current_global_index) {
-          print_error(ctx, loc,
-                      "initializer expression can only reference a previously "
-                      "defined global");
-        } else if (ref_global_index >= ctx->num_imported_globals) {
-          print_error(
-              ctx, loc,
+        if (ref_global_index >= num_imported_globals_) {
+          PrintError(
+              loc,
               "initializer expression can only reference an imported global");
         }
 
         if (ref_global->mutable_) {
-          print_error(
-              ctx, loc,
-              "initializer expression cannot reference a mutable global");
+          PrintError(
+              loc, "initializer expression cannot reference a mutable global");
         }
         break;
       }
 
       default:
-        print_const_expr_error(ctx, loc, desc);
+        PrintConstExprError(loc, desc);
         return;
     }
   }
 
-  check_type(ctx, expr ? &expr->loc : loc, type, expected_type, desc);
+  CheckType(expr ? &expr->loc : loc, type, expected_type, desc);
 }
 
-static void check_global(Context* ctx,
-                         const Location* loc,
-                         const Global* global) {
-  check_const_init_expr(ctx, loc, global->init_expr, global->type,
-                        "global initializer expression");
+void Validator::CheckGlobal(const Location* loc, const Global* global) {
+  CheckConstInitExpr(loc, global->init_expr, global->type,
+                     "global initializer expression");
 }
 
-static void check_limits(Context* ctx,
-                         const Location* loc,
-                         const Limits* limits,
-                         uint64_t absolute_max,
-                         const char* desc) {
+void Validator::CheckLimits(const Location* loc,
+                            const Limits* limits,
+                            uint64_t absolute_max,
+                            const char* desc) {
   if (limits->initial > absolute_max) {
-    print_error(ctx, loc, "initial %s (%" PRIu64 ") must be <= (%" PRIu64 ")",
-                desc, limits->initial, absolute_max);
+    PrintError(loc, "initial %s (%" PRIu64 ") must be <= (%" PRIu64 ")", desc,
+               limits->initial, absolute_max);
   }
 
   if (limits->has_max) {
     if (limits->max > absolute_max) {
-      print_error(ctx, loc, "max %s (%" PRIu64 ") must be <= (%" PRIu64 ")",
-                  desc, limits->max, absolute_max);
+      PrintError(loc, "max %s (%" PRIu64 ") must be <= (%" PRIu64 ")", desc,
+                 limits->max, absolute_max);
     }
 
     if (limits->max < limits->initial) {
-      print_error(ctx, loc,
-                  "max %s (%" PRIu64 ") must be >= initial %s (%" PRIu64 ")",
-                  desc, limits->max, desc, limits->initial);
+      PrintError(loc,
+                 "max %s (%" PRIu64 ") must be >= initial %s (%" PRIu64 ")",
+                 desc, limits->max, desc, limits->initial);
     }
   }
 }
 
-static void check_table(Context* ctx, const Location* loc, const Table* table) {
-  if (ctx->current_table_index == 1)
-    print_error(ctx, loc, "only one table allowed");
-  check_limits(ctx, loc, &table->elem_limits, UINT32_MAX, "elems");
+void Validator::CheckTable(const Location* loc, const Table* table) {
+  if (current_table_index_ == 1)
+    PrintError(loc, "only one table allowed");
+  CheckLimits(loc, &table->elem_limits, UINT32_MAX, "elems");
 }
 
-static void check_elem_segments(Context* ctx, const Module* module) {
+void Validator::CheckElemSegments(const Module* module) {
   for (ModuleField* field = module->first_field; field; field = field->next) {
     if (field->type != ModuleFieldType::ElemSegment)
       continue;
 
     ElemSegment* elem_segment = field->elem_segment;
     const Table* table;
-    if (!WABT_SUCCEEDED(check_table_var(ctx, &elem_segment->table_var, &table)))
+    if (!WABT_SUCCEEDED(CheckTableVar(&elem_segment->table_var, &table)))
       continue;
 
-    for (const Var& var: elem_segment->vars) {
-      if (!WABT_SUCCEEDED(check_func_var(ctx, &var, nullptr)))
+    for (const Var& var : elem_segment->vars) {
+      if (!WABT_SUCCEEDED(CheckFuncVar(&var, nullptr)))
         continue;
     }
 
-    check_const_init_expr(ctx, &field->loc, elem_segment->offset, Type::I32,
-                          "elem segment offset");
+    CheckConstInitExpr(&field->loc, elem_segment->offset, Type::I32,
+                       "elem segment offset");
   }
 }
 
-static void check_memory(Context* ctx,
-                         const Location* loc,
-                         const Memory* memory) {
-  if (ctx->current_memory_index == 1)
-    print_error(ctx, loc, "only one memory block allowed");
-  check_limits(ctx, loc, &memory->page_limits, WABT_MAX_PAGES, "pages");
+void Validator::CheckMemory(const Location* loc, const Memory* memory) {
+  if (current_memory_index_ == 1)
+    PrintError(loc, "only one memory block allowed");
+  CheckLimits(loc, &memory->page_limits, WABT_MAX_PAGES, "pages");
 }
 
-static void check_data_segments(Context* ctx, const Module* module) {
+void Validator::CheckDataSegments(const Module* module) {
   for (ModuleField* field = module->first_field; field; field = field->next) {
     if (field->type != ModuleFieldType::DataSegment)
       continue;
 
     DataSegment* data_segment = field->data_segment;
     const Memory* memory;
-    if (!WABT_SUCCEEDED(
-            check_memory_var(ctx, &data_segment->memory_var, &memory)))
+    if (!WABT_SUCCEEDED(CheckMemoryVar(&data_segment->memory_var, &memory)))
       continue;
 
-    check_const_init_expr(ctx, &field->loc, data_segment->offset, Type::I32,
-                          "data segment offset");
+    CheckConstInitExpr(&field->loc, data_segment->offset, Type::I32,
+                       "data segment offset");
   }
 }
 
-static void check_import(Context* ctx,
-                         const Location* loc,
-                         const Import* import) {
+void Validator::CheckImport(const Location* loc, const Import* import) {
   switch (import->kind) {
+    case ExternalKind::Except:
+      // TODO(karlschimpf) Define.
+      PrintError(loc, "import except: don't know how to validate");
+      break;
     case ExternalKind::Func:
-      if (decl_has_func_type(&import->func->decl))
-        check_func_type_var(ctx, &import->func->decl.type_var, nullptr);
+      if (import->func->decl.has_func_type)
+        CheckFuncTypeVar(&import->func->decl.type_var, nullptr);
       break;
     case ExternalKind::Table:
-      check_table(ctx, loc, import->table);
-      ctx->current_table_index++;
+      CheckTable(loc, import->table);
+      current_table_index_++;
       break;
     case ExternalKind::Memory:
-      check_memory(ctx, loc, import->memory);
-      ctx->current_memory_index++;
+      CheckMemory(loc, import->memory);
+      current_memory_index_++;
       break;
     case ExternalKind::Global:
       if (import->global->mutable_) {
-        print_error(ctx, loc, "mutable globals cannot be imported");
+        PrintError(loc, "mutable globals cannot be imported");
       }
-      ctx->num_imported_globals++;
-      ctx->current_global_index++;
+      num_imported_globals_++;
+      current_global_index_++;
       break;
   }
 }
 
-static void check_export(Context* ctx, const Export* export_) {
+void Validator::CheckExport(const Location* loc, const Export* export_) {
   switch (export_->kind) {
+    case ExternalKind::Except:
+      // TODO(karlschimpf) Define.
+      PrintError(loc, "except: don't know how to validate export");
+      break;
     case ExternalKind::Func:
-      check_func_var(ctx, &export_->var, nullptr);
+      CheckFuncVar(&export_->var, nullptr);
       break;
     case ExternalKind::Table:
-      check_table_var(ctx, &export_->var, nullptr);
+      CheckTableVar(&export_->var, nullptr);
       break;
     case ExternalKind::Memory:
-      check_memory_var(ctx, &export_->var, nullptr);
+      CheckMemoryVar(&export_->var, nullptr);
       break;
     case ExternalKind::Global: {
       const Global* global;
-      if (WABT_SUCCEEDED(
-              check_global_var(ctx, &export_->var, &global, nullptr))) {
+      if (WABT_SUCCEEDED(CheckGlobalVar(&export_->var, &global, nullptr))) {
         if (global->mutable_) {
-          print_error(ctx, &export_->var.loc,
-                      "mutable globals cannot be exported");
+          PrintError(&export_->var.loc, "mutable globals cannot be exported");
         }
       }
       break;
@@ -738,66 +802,65 @@
   }
 }
 
-static void on_duplicate_binding(const BindingHash::value_type& a,
-                                 const BindingHash::value_type& b,
-                                 void* user_data) {
-  Context* ctx = static_cast<Context*>(user_data);
-  /* choose the location that is later in the file */
-  const Location& a_loc = a.second.loc;
-  const Location& b_loc = b.second.loc;
-  const Location& loc = a_loc.line > b_loc.line ? a_loc : b_loc;
-  print_error(ctx, &loc, "redefinition of export \"%s\"", a.first.c_str());
+void Validator::CheckDuplicateExportBindings(const Module* module) {
+  module->export_bindings.FindDuplicates([this](
+      const BindingHash::value_type& a, const BindingHash::value_type& b) {
+    // Choose the location that is later in the file.
+    const Location& a_loc = a.second.loc;
+    const Location& b_loc = b.second.loc;
+    const Location& loc = a_loc.line > b_loc.line ? a_loc : b_loc;
+    PrintError(&loc, "redefinition of export \"%s\"", a.first.c_str());
+  });
 }
 
-static void check_duplicate_export_bindings(Context* ctx,
-                                            const Module* module) {
-  module->export_bindings.find_duplicates(on_duplicate_binding, ctx);
-}
-
-static void check_module(Context* ctx, const Module* module) {
+void Validator::CheckModule(const Module* module) {
   bool seen_start = false;
 
-  ctx->current_module = module;
-  ctx->current_table_index = 0;
-  ctx->current_memory_index = 0;
-  ctx->current_global_index = 0;
-  ctx->num_imported_globals = 0;
+  current_module_ = module;
+  current_table_index_ = 0;
+  current_memory_index_ = 0;
+  current_global_index_ = 0;
+  num_imported_globals_ = 0;
 
   for (ModuleField* field = module->first_field; field; field = field->next) {
     switch (field->type) {
+      case ModuleFieldType::Except:
+        // TODO(karlschimpf) Define.
+        PrintError(&field->loc, "except clause: don't know how to validate");
+        break;
       case ModuleFieldType::Func:
-        check_func(ctx, &field->loc, field->func);
+        CheckFunc(&field->loc, field->func);
         break;
 
       case ModuleFieldType::Global:
-        check_global(ctx, &field->loc, field->global);
-        ctx->current_global_index++;
+        CheckGlobal(&field->loc, field->global);
+        current_global_index_++;
         break;
 
       case ModuleFieldType::Import:
-        check_import(ctx, &field->loc, field->import);
+        CheckImport(&field->loc, field->import);
         break;
 
       case ModuleFieldType::Export:
-        check_export(ctx, field->export_);
+        CheckExport(&field->loc, field->export_);
         break;
 
       case ModuleFieldType::Table:
-        check_table(ctx, &field->loc, field->table);
-        ctx->current_table_index++;
+        CheckTable(&field->loc, field->table);
+        current_table_index_++;
         break;
 
       case ModuleFieldType::ElemSegment:
-        /* checked below */
+        // Checked below.
         break;
 
       case ModuleFieldType::Memory:
-        check_memory(ctx, &field->loc, field->memory);
-        ctx->current_memory_index++;
+        CheckMemory(&field->loc, field->memory);
+        current_memory_index_++;
         break;
 
       case ModuleFieldType::DataSegment:
-        /* checked below */
+        // Checked below.
         break;
 
       case ModuleFieldType::FuncType:
@@ -805,19 +868,18 @@
 
       case ModuleFieldType::Start: {
         if (seen_start) {
-          print_error(ctx, &field->loc, "only one start function allowed");
+          PrintError(&field->loc, "only one start function allowed");
         }
 
         const Func* start_func = nullptr;
-        check_func_var(ctx, &field->start, &start_func);
+        CheckFuncVar(&field->start, &start_func);
         if (start_func) {
-          if (get_num_params(start_func) != 0) {
-            print_error(ctx, &field->loc, "start function must be nullary");
+          if (start_func->GetNumParams() != 0) {
+            PrintError(&field->loc, "start function must be nullary");
           }
 
-          if (get_num_results(start_func) != 0) {
-            print_error(ctx, &field->loc,
-                        "start function must not return anything");
+          if (start_func->GetNumResults() != 0) {
+            PrintError(&field->loc, "start function must not return anything");
           }
         }
         seen_start = true;
@@ -826,72 +888,70 @@
     }
   }
 
-  check_elem_segments(ctx, module);
-  check_data_segments(ctx, module);
-  check_duplicate_export_bindings(ctx, module);
+  CheckElemSegments(module);
+  CheckDataSegments(module);
+  CheckDuplicateExportBindings(module);
 }
 
-/* returns the result type of the invoked function, checked by the caller;
- * returning nullptr means that another error occured first, so the result type
- * should be ignored. */
-static const TypeVector* check_invoke(Context* ctx, const Action* action) {
+// Returns the result type of the invoked function, checked by the caller;
+// returning nullptr means that another error occured first, so the result type
+// should be ignored.
+const TypeVector* Validator::CheckInvoke(const Action* action) {
   const ActionInvoke* invoke = action->invoke;
-  const Module* module = get_module_by_var(ctx->script, &action->module_var);
+  const Module* module = script_->GetModule(action->module_var);
   if (!module) {
-    print_error(ctx, &action->loc, "unknown module");
+    PrintError(&action->loc, "unknown module");
     return nullptr;
   }
 
-  Export* export_ = get_export_by_name(module, &action->name);
+  const Export* export_ = module->GetExport(action->name);
   if (!export_) {
-    print_error(ctx, &action->loc,
-                "unknown function export \"" PRIstringslice "\"",
-                WABT_PRINTF_STRING_SLICE_ARG(action->name));
+    PrintError(&action->loc, "unknown function export \"" PRIstringslice "\"",
+               WABT_PRINTF_STRING_SLICE_ARG(action->name));
     return nullptr;
   }
 
-  Func* func = get_func_by_var(module, &export_->var);
+  const Func* func = module->GetFunc(export_->var);
   if (!func) {
-    /* this error will have already been reported, just skip it */
+    // This error will have already been reported, just skip it.
     return nullptr;
   }
 
   size_t actual_args = invoke->args.size();
-  size_t expected_args = get_num_params(func);
+  size_t expected_args = func->GetNumParams();
   if (expected_args != actual_args) {
-    print_error(ctx, &action->loc, "too %s parameters to function. got %" PRIzd
-                                   ", expected %" PRIzd,
-                actual_args > expected_args ? "many" : "few", actual_args,
-                expected_args);
+    PrintError(&action->loc, "too %s parameters to function. got %" PRIzd
+                             ", expected %" PRIzd,
+               actual_args > expected_args ? "many" : "few", actual_args,
+               expected_args);
     return nullptr;
   }
   for (size_t i = 0; i < actual_args; ++i) {
     const Const* const_ = &invoke->args[i];
-    check_type_index(ctx, &const_->loc, const_->type, get_param_type(func, i),
-                     "invoke", i, "argument");
+    CheckTypeIndex(&const_->loc, const_->type, func->GetParamType(i), "invoke",
+                   i, "argument");
   }
 
   return &func->decl.sig.result_types;
 }
 
-static Result check_get(Context* ctx, const Action* action, Type* out_type) {
-  const Module* module = get_module_by_var(ctx->script, &action->module_var);
+Result Validator::CheckGet(const Action* action, Type* out_type) {
+  const Module* module = script_->GetModule(action->module_var);
   if (!module) {
-    print_error(ctx, &action->loc, "unknown module");
+    PrintError(&action->loc, "unknown module");
     return Result::Error;
   }
 
-  Export* export_ = get_export_by_name(module, &action->name);
+  const Export* export_ = module->GetExport(action->name);
   if (!export_) {
-    print_error(ctx, &action->loc,
-                "unknown global export \"" PRIstringslice "\"",
-                WABT_PRINTF_STRING_SLICE_ARG(action->name));
+    PrintError(&action->loc, "unknown global export \"" PRIstringslice "\"",
+               WABT_PRINTF_STRING_SLICE_ARG(action->name));
     return Result::Error;
   }
 
-  Global* global = get_global_by_var(module, &export_->var);
+  const Global* global = module->GetGlobal(export_->var);
   if (!global) {
-    /* this error will have already been reported, just skip it */
+    // This error will have already been reported, just skip it.
     return Result::Error;
   }
 
@@ -899,60 +959,59 @@
   return Result::Ok;
 }
 
-static ActionResult check_action(Context* ctx, const Action* action) {
+Validator::ActionResult Validator::CheckAction(const Action* action) {
   ActionResult result;
   WABT_ZERO_MEMORY(result);
 
   switch (action->type) {
     case ActionType::Invoke:
-      result.types = check_invoke(ctx, action);
+      result.types = CheckInvoke(action);
       result.kind =
-          result.types ? ActionResultKind::Types : ActionResultKind::Error;
+          result.types ? ActionResult::Kind::Types : ActionResult::Kind::Error;
       break;
 
     case ActionType::Get:
-      if (WABT_SUCCEEDED(check_get(ctx, action, &result.type)))
-        result.kind = ActionResultKind::Type;
+      if (WABT_SUCCEEDED(CheckGet(action, &result.type)))
+        result.kind = ActionResult::Kind::Type;
       else
-        result.kind = ActionResultKind::Error;
+        result.kind = ActionResult::Kind::Error;
       break;
   }
 
   return result;
 }
 
-static void check_assert_return_nan_command(Context* ctx,
-                                            const Action* action) {
-  ActionResult result = check_action(ctx, action);
+void Validator::CheckAssertReturnNanCommand(const Action* action) {
+  ActionResult result = CheckAction(action);
 
-  /* a valid result type will either be f32 or f64; convert a TYPES result
-   * into a TYPE result, so it is easier to check below. Type::Any is
-   * used to specify a type that should not be checked (because an earlier
-   * error occurred). */
-  if (result.kind == ActionResultKind::Types) {
+  // A valid result type will either be f32 or f64; convert a Types result into
+  // a Type result, so it is easier to check below. Type::Any is used to
+  // specify a type that should not be checked (because an earlier error
+  // occurred).
+  if (result.kind == ActionResult::Kind::Types) {
     if (result.types->size() == 1) {
-      result.kind = ActionResultKind::Type;
+      result.kind = ActionResult::Kind::Type;
       result.type = (*result.types)[0];
     } else {
-      print_error(ctx, &action->loc, "expected 1 result, got %" PRIzd,
-                  result.types->size());
+      PrintError(&action->loc, "expected 1 result, got %" PRIzd,
+                 result.types->size());
       result.type = Type::Any;
     }
   }
 
-  if (result.kind == ActionResultKind::Type && result.type != Type::Any)
-    check_assert_return_nan_type(ctx, &action->loc, result.type, "action");
+  if (result.kind == ActionResult::Kind::Type && result.type != Type::Any)
+    CheckAssertReturnNanType(&action->loc, result.type, "action");
 }
 
-static void check_command(Context* ctx, const Command* command) {
+void Validator::CheckCommand(const Command* command) {
   switch (command->type) {
     case CommandType::Module:
-      check_module(ctx, command->module);
+      CheckModule(command->module);
       break;
 
     case CommandType::Action:
-      /* ignore result type */
-      check_action(ctx, command->action);
+      // Ignore result type.
+      CheckAction(command->action);
       break;
 
     case CommandType::Register:
@@ -961,61 +1020,60 @@
     case CommandType::AssertInvalidNonBinary:
     case CommandType::AssertUnlinkable:
     case CommandType::AssertUninstantiable:
-      /* ignore */
+      // Ignore.
       break;
 
     case CommandType::AssertReturn: {
       const Action* action = command->assert_return.action;
-      ActionResult result = check_action(ctx, action);
+      ActionResult result = CheckAction(action);
       switch (result.kind) {
-        case ActionResultKind::Types:
-          check_const_types(ctx, &action->loc, *result.types,
-                            *command->assert_return.expected, "action");
+        case ActionResult::Kind::Types:
+          CheckConstTypes(&action->loc, *result.types,
+                          *command->assert_return.expected, "action");
           break;
 
-        case ActionResultKind::Type:
-          check_const_type(ctx, &action->loc, result.type,
-                           *command->assert_return.expected, "action");
+        case ActionResult::Kind::Type:
+          CheckConstType(&action->loc, result.type,
+                         *command->assert_return.expected, "action");
           break;
 
-        case ActionResultKind::Error:
-          /* error occurred, don't do any further checks */
+        case ActionResult::Kind::Error:
+          // Error occurred, don't do any further checks.
           break;
       }
       break;
     }
 
     case CommandType::AssertReturnCanonicalNan:
-      check_assert_return_nan_command(
-          ctx, command->assert_return_canonical_nan.action);
+      CheckAssertReturnNanCommand(command->assert_return_canonical_nan.action);
       break;
 
     case CommandType::AssertReturnArithmeticNan:
-      check_assert_return_nan_command(
-          ctx, command->assert_return_arithmetic_nan.action);
+      CheckAssertReturnNanCommand(command->assert_return_arithmetic_nan.action);
       break;
 
     case CommandType::AssertTrap:
     case CommandType::AssertExhaustion:
-      /* ignore result type */
-      check_action(ctx, command->assert_trap.action);
+      // ignore result type.
+      CheckAction(command->assert_trap.action);
       break;
   }
 }
 
-Result validate_script(AstLexer* lexer,
-                       const struct Script* script,
-                       SourceErrorHandler* error_handler) {
-  Context ctx(error_handler, lexer, script);
-
-  TypeCheckerErrorHandler tc_error_handler;
-  tc_error_handler.on_error = on_typechecker_error;
-  tc_error_handler.user_data = &ctx;
-  ctx.typechecker.error_handler = &tc_error_handler;
-
+Result Validator::CheckScript(const Script* script) {
   for (const std::unique_ptr<Command>& command : script->commands)
-    check_command(&ctx, command.get());
-  return ctx.result;
+    CheckCommand(command.get());
+  return result_;
+}
+
+}  // namespace
+
+Result validate_script(WastLexer* lexer,
+                       const Script* script,
+                       SourceErrorHandler* error_handler) {
+  Validator validator(error_handler, lexer, script);
+
+  return validator.CheckScript(script);
 }
 
 }  // namespace wabt
diff --git a/lib/wabt/src/validator.h b/lib/wabt/src/validator.h
index 4f19435..fc0ccf1 100644
--- a/lib/wabt/src/validator.h
+++ b/lib/wabt/src/validator.h
@@ -17,17 +17,17 @@
 #ifndef WABT_VALIDATOR_H_
 #define WABT_VALIDATOR_H_
 
-#include "ast-lexer.h"
-#include "common.h"
+#include "wast-lexer.h"
 
 namespace wabt {
 
 struct Module;
 struct Script;
+class SourceErrorHandler;
 
-/* perform all checks on the AST; the module is valid if and only if this
- * function succeeds. */
-Result validate_script(AstLexer*, const struct Script*, SourceErrorHandler*);
+// Perform all checks on the script. It is valid if and only if this function
+// succeeds.
+Result validate_script(WastLexer*, const Script*, SourceErrorHandler*);
 
 }  // namespace wabt
 
diff --git a/lib/wabt/src/wabt.js b/lib/wabt/src/wabt.js
deleted file mode 100644
index 483d3ff..0000000
--- a/lib/wabt/src/wabt.js
+++ /dev/null
@@ -1,1014 +0,0 @@
-/*
- * Copyright 2016 WebAssembly Community Group participants
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var wabt = {};
-
-wabt.ready = new Promise(function(resolve, reject) {
-  wabt.$resolve = resolve;
-  wabt.$reject = reject;
-});
-
-var Module = {};
-Module.onRuntimeInitialized = function() {
-
-// Helpers /////////////////////////////////////////////////////////////////////
-
-function loadi8(addr) { return HEAP8[addr]; }
-function loadi16(addr) { return HEAP16[addr>>1]; }
-function loadi32(addr) { return HEAP32[addr>>2]; }
-function loadu8(addr) { return HEAPU8[addr]; }
-function loadu16(addr) { return HEAPU16[addr>>1]; }
-function loadu32(addr) { return HEAPU32[addr>>2]; }
-function loadf32(addr) { return HEAPF32[addr>>2]; }
-function loadf64(addr) { return HEAPF64[addr>>4]; }
-function storei8(addr, value) { HEAP8[addr] = value; }
-function storei16(addr, value) { HEAP16[addr>>1] = value; }
-function storei32(addr, value) { HEAP32[addr>>2] = value; }
-function storeu8(addr, value) { HEAPU8[addr] = value; }
-function storeu16(addr, value) { HEAPU16[addr>>1] = value; }
-function storeu32(addr, value) { HEAPU32[addr>>2] = value; }
-function storef32(addr, value) { HEAPF32[addr>>2] = value; }
-function storef64(addr, value) { HEAPF64[addr>>4] = value; }
-
-function loadcstr(addr) { return Module.AsciiToString(addr); }
-function loadstrslice(addr, len) { return Module.Pointer_stringify(addr, len); }
-function loadbuffer(addr, len) {
-  return new Uint8Array(HEAPU8.buffer, addr, len);
-}
-
-function sizeof(structName) { return Module['_wabt_sizeof_' + structName](); }
-function offsetof(structName, fieldName) {
-  return Module['_wabt_offsetof_' + structName + '_' + fieldName]();
-}
-
-function malloc(size) {
-  var addr = Module._malloc(size);
-  if (addr == 0) {
-    throw new Error('out of memory');
-  }
-  return addr;
-}
-
-function mallocz(size) {
-  var addr = malloc(size);
-  HEAPU8.fill(0, addr, addr + size);
-  return addr;
-}
-
-function free(addr) { Module._free(addr); }
-
-// Types ///////////////////////////////////////////////////////////////////////
-
-function Type(name, id) {
-  this.name = name;
-  if (id) {
-    // alias
-    this.id = id;
-  } else {
-    this.id = Type.id++;
-    Type.map[this.id] = this;
-  }
-}
-Type.id = 0;
-Type.map = {};
-Type.check = function(expected, actual) {
-  if (actual.id != expected.id) {
-    throw new Error('type mismatch; expected ' + expected.toString() +
-                    ', got ' + actual.toString());
-  }
-};
-Type.prototype = Object.create(Object.prototype);
-Type.prototype.toString = function(name, lastPrec) {
-  var result = ''
-  if (this.name) {
-    result = this.name;
-    if (name) {
-      result += ' ' + name;
-    }
-    return result;
-  }
-  name = name || '';
-  var prec = this.prec;
-
-  if (prec && lastPrec && prec > lastPrec) {
-    name = '(' + name + ')';
-  }
-
-  if (this.kind == 'ptr') {
-    return this.pointee.toString('*' + result + name, prec);
-  } else if (this.kind == 'array') {
-    return this.element.toString(result + '[]', prec);
-  } else if (this.kind == 'fn') {
-    name += '(';
-    if (this.params.length > 0) {
-      var paramNames = [];
-      for (var i = 0; i < this.params.length; ++i) {
-        paramNames.push(this.params[i].toString());
-      }
-      name += paramNames.join(', ');
-    }
-    name += ')';
-    return this.result.toString(name, prec);
-  } else {
-    throw new Error('unknown type kind');
-  }
-};
-Type.prototype.load = function() {
-  throw new Error(this.toString() + " cannot be loaded");
-};
-Type.prototype.store = function() {
-  throw new Error(this.toString() + " cannot be stored");
-};
-Type.prototype.call = function() {
-  throw new Error(this.toString() + " cannot be called");
-};
-
-function PrimitiveType(name, size, sig, min, max) {
-  Type.call(this, name);
-  this.size = size;
-  this.sig = sig;
-  this.min = min;
-  this.max = max;
-}
-PrimitiveType.prototype = Object.create(Type.prototype);
-PrimitiveType.prototype.kind = 'primitive'
-PrimitiveType.prototype.primitive = true;
-PrimitiveType.prototype.checkRange = function(value) {
-  if (value < this.min || value > this.max) {
-    throw new Error('value out of range: ' + value + ' not in [' + this.min + ',' +
-        this.max + ']');
-  }
-};
-PrimitiveType.prototype.toJS = function(value) {
-  return value;
-};
-PrimitiveType.prototype.initAccessors = function(value, addr) {
-  var type = this;
-  value.load = function() { return type.toJS(type.load(addr)); };
-  value.store = function(value) { type.store(addr, type.fromJS(value)); };
-};
-
-// TODO(binji): figure out what the signature chars actually are
-var Void = new PrimitiveType('Void', 0, 'v');
-var Bool = new PrimitiveType('Bool', 1, 'i');
-var I8 = new PrimitiveType('I8', 1, 'i', -128, 127);
-var I16 = new PrimitiveType('I16', 2, 'i', -32768, 32767);
-var I32 = new PrimitiveType('I32', 4, 'i', -0x80000000, 0x7fffffff);
-var U8 = new PrimitiveType('U8', 1, 'i', 0, 255);
-var U16 = new PrimitiveType('U16', 2, 'i', 0, 65535);
-var U32 = new PrimitiveType('U32', 4, 'i', 0, 0xffffffff);
-var U64 = new PrimitiveType('U64', 8, 'i');
-var F32 = new PrimitiveType('F32', 4, 'f');
-var F64 = new PrimitiveType('F64', 8, 'd');
-
-Void.fromJS = function(value) {}
-Bool.fromJS = function(value) { return !!value; };
-I8.fromJS = function(value) { this.checkRange(value); return value|0; };
-I16.fromJS = function(value) { this.checkRange(value); return value|0; };
-I32.fromJS = function(value) { this.checkRange(value); return value|0; };
-U8.fromJS = function(value) { this.checkRange(value); return value>>>0; };
-U16.fromJS = function(value) { this.checkRange(value); return value>>>0; };
-U32.fromJS = function(value) { this.checkRange(value); return value>>>0; };
-U64.fromJS = function(value) { throw new Error('u64 not yet supported'); };
-F32.fromJS = function(value) { return Math.fround(value); };
-F64.fromJS = function(value) { return +value; };
-
-Bool.toJS = function(value) { return value ? true : false; };
-
-Bool.load = function(addr) { return loadu8(addr); };
-I8.load = function(addr) { return loadi8(addr); };
-I16.load = function(addr) { return loadi16(addr); };
-I32.load = function(addr) { return loadi32(addr); };
-U8.load = function(addr) { return loadu8(addr); };
-U16.load = function(addr) { return loadu16(addr); };
-U32.load = function(addr) { return loadu32(addr); };
-U64.load = function(addr) { throw new Error('u64 not yet supported'); };
-F32.load = function(addr) { return loadf32(addr); };
-F64.load = function(addr) { return loadf64(addr); };
-
-Bool.store = function(addr, value) { return storeu8(addr, value); };
-I8.store = function(addr, value) { return storei8(addr, value); };
-I16.store = function(addr, value) { return storei16(addr, value); };
-I32.store = function(addr, value) { return storei32(addr, value); };
-U8.store = function(addr, value) { return storeu8(addr, value); };
-U16.store = function(addr, value) { return storeu16(addr, value); };
-U32.store = function(addr, value) { return storeu32(addr, value); };
-U64.store = function(addr, value) { throw new Error('u64 not yet supported'); };
-F32.store = function(addr, value) { return storef32(addr, value); };
-F64.store = function(addr, value) { return storef64(addr, value); };
-
-function Alias(name, type) {
-  var alias = Object.create(type);
-  alias.name = name;
-  return alias;
-}
-
-function PtrType(type) {
-  Type.call(this);
-  this.pointee = type;
-}
-PtrType.map = {};
-PtrType.prototype = Object.create(Type.prototype);
-PtrType.prototype.kind = 'ptr';
-PtrType.prototype.prec = 1;
-PtrType.prototype.primitive = true;
-PtrType.prototype.sig = 'i'
-PtrType.prototype.size = 4;
-PtrType.prototype.fromJS = function(value) {
-  if (value === null) {
-    return 0;
-  }
-  Value.$check(value);
-  Type.check(this, value.$ptrType);
-  return value.$addr;
-};
-PtrType.prototype.toJS = function(value) {
-  if (value == 0) {
-    return null;
-  }
-  return new Value(this.pointee, value);
-};
-PtrType.prototype.initAccessors = function(value, addr) {
-  var type = this;
-  value.load = function() { return type.toJS(loadu32(addr)); };
-  value.store = function(value) { storeu32(addr, type.fromJS(value)); };
-};
-
-function Ptr(type) {
-  if (type.id in PtrType.map) {
-    return PtrType.map[type.id];
-  }
-  var result = new PtrType(type);
-  PtrType.map[type.id] = result;
-  return result;
-}
-
-var VoidPtr = Ptr(Void);
-var ArrayLen = Alias('ArrayLen', U32);
-var BufLen = Alias('BufLen', U32);
-var BufPtr = Alias('BufPtr', VoidPtr);
-var Str = Alias('Str', Ptr(U8));
-var StrLen = Alias('StrLen', U32);
-var StrPtr = Alias('StrPtr', Ptr(U8));
-var UserData = Alias('UserData', VoidPtr);
-
-Str.toJS = function(addr) { return loadcstr(addr); };
-Str.initAccessors = function(value, addr) {
-  value.load = function() { return loadcstr(loadu32(addr)); }
-};
-
-function ArrayType(type) {
-  Type.call(this);
-  this.element = type;
-}
-ArrayType.map = {};
-ArrayType.prototype = Object.create(Type.prototype);
-ArrayType.prototype.kind = 'ptr';
-ArrayType.prototype.prec = 2;
-ArrayType.prototype.primitive = true;
-ArrayType.prototype.sig = 'i'
-ArrayType.prototype.size = 4;
-ArrayType.prototype.initAccessors = function(value, arrayAddr) {
-  var type = this;
-  value.index = function(index) {
-    return new Value(type.element, arrayAddr + index * type.element.size);
-  };
-};
-
-function ArrayPtr(type) {
-  if (type.id in ArrayType.map) {
-    return ArrayType.map[type.id];
-  }
-  var result = new ArrayType(type);
-  ArrayType.map[type.id] = result;
-  return result;
-}
-
-function FnType(result, params) {
-  if (!result.primitive) {
-    throw new Error(result.toString() + " is not a primitive type");
-  }
-  for (var i = 0; i < params.length; ++i) {
-    var param = params[i];
-    if (!param.primitive) {
-      throw new Error(param.toString() + " is not a primitive type");
-    }
-  }
-  Type.call(this);
-  this.result = result;
-  this.params = params;
-  this.funcSig = this.generateSig();
-}
-FnType.generateKey = function(result, params) {
-  var key = result.id + ',';
-  for (var i = 0; i < params.length; ++i) {
-    key += params[i].id + ',';
-  }
-  return key;
-};
-FnType.map = {};
-FnType.prototype = Object.create(Type.prototype);
-FnType.prototype.kind = 'fn';
-FnType.prototype.prec = 3;
-FnType.prototype.primitive = true;
-FnType.prototype.sig = 'i'
-FnType.prototype.size = 4;
-FnType.prototype.generateSig = function() {
-  var result = this.result.sig;
-  for (var i = 0; i < this.params.length; ++i) {
-    result += this.params[i].sig;
-  }
-  return result;
-};
-FnType.prototype.argsFromJS = function(inArgs) {
-  if (inArgs.length != this.params.length) {
-    throw new Error("argument count mismatch: expecting " + this.params.length +
-        ", got " + inArgs.length);
-  }
-  var outArgs = [];
-  for (var i = 0; i < inArgs.length; ++i) {
-    outArgs.push(this.params[i].fromJS(inArgs[i]));
-  }
-  return outArgs;
-};
-FnType.prototype.argsToJS = function(inArgs) {
-  var outArgs = [];
-  for (var i = 0; i < inArgs.length; ++i) {
-    outArgs.push(this.params[i].toJS(inArgs[i]));
-  }
-  return outArgs;
-};
-FnType.prototype.define = function(name) {
-  var type = this;
-  return function() {
-    var result = Module[name].apply(Module, type.argsFromJS(arguments));
-    return type.result.toJS(result);
-  };
-};
-FnType.prototype.initAccessors = function(value, addr) {
-  var type = this;
-  value.load = function() { return new FnValue(type, loadu32(addr)); };
-  value.store = function(value) {
-    if (!(value instanceof FnValue)) {
-      throw new Error('fn value ' + value + ' not instanceof FnValue');
-    }
-    Type.check(type, value.$type);
-    return storeu32(addr, value.$index);
-  };
-  value.call = function() {
-    var result = Runtime.dynCall(type.funcSig, loadu32(addr),
-                                 type.argsFromJS(arguments));
-    return type.result.toJS(result);
-  };
-};
-
-function Fn(result, params) {
-  var key = FnType.generateKey(result, params);
-  if (key in FnType.map) {
-    return FnType.map[key];
-  }
-  var result = new FnType(result, params);
-  FnType.map[key] = result;
-  return result;
-}
-
-function Field(name, type, offset) {
-  this.name = name;
-  this.type = type;
-  this.offset = offset;
-}
-Field.prototype = Object.create(Object.prototype);
-Field.prototype.initAccessors = function(value, structAddr) {
-  value[this.name] = new Value(this.type, structAddr + this.offset);
-};
-
-function StructType(name) {
-  Type.call(this, name);
-  this.fields = {};
-}
-StructType.prototype = Object.create(Type.prototype);
-StructType.prototype.kind = 'struct';
-StructType.prototype.primitive = false;
-StructType.prototype.define = function(cName, fieldTypes) {
-  this.cName = cName;
-  this.size = sizeof(cName);
-  for (fieldName in fieldTypes) {
-    var type = fieldTypes[fieldName];
-    var offset = offsetof(cName, fieldName);
-    this.fields[fieldName] = new Field(fieldName, type, offset);
-  }
-};
-StructType.prototype.describe = function() {
-  var result = 'struct ' + this.name + ' {\n';
-  var lines = [];
-  for (fieldName in this.fields) {
-    var field = this.fields[fieldName];
-    lines.push('  ' + field.type.toString(fieldName) + ';');
-  }
-  result += lines.join('\n');
-  result += '\n};';
-  return result;
-};
-StructType.prototype.initAccessors = function(value, addr) {
-  var type = this;
-  for (fieldName in this.fields) {
-    var field = this.fields[fieldName];
-    field.initAccessors(value, addr);
-  }
-};
-
-function Struct(name) {
-  return new StructType(name);
-}
-
-// Values //////////////////////////////////////////////////////////////////////
-
-function Value(type, addr) {
-  this.$type = type;
-  this.$ptrType = Ptr(type);
-  this.$addr = addr;
-  type.initAccessors(this, this.$addr);
-}
-Value.$at = function(type, addr) { return new Value(type, addr); };
-Value.$malloc = function(type) { return new Value(type, mallocz(type.size)); };
-Value.$check = function(value) {
-  if (!(value instanceof Value)) {
-    throw new Error('value ' + value + ' not instanceof Value');
-  }
-};
-Value.prototype = Object.create(Object.prototype);
-Value.prototype.toString = function() {
-  return '<' + this.$type + '>@' + this.$addr;
-};
-Value.prototype.$free = function() { free(this.$addr); };
-
-function FnValue(type, f) {
-  if (!(type instanceof FnType)) {
-    throw new Error('type ' + type + ' not instanceof FnType');
-  }
-  this.$type = type;
-  if (typeof f == 'function') {
-    if (f.length != type.params.length) {
-      throw new Error("argument count mismatch: expecting " + type.params.length +
-          ", got " + f.length);
-    }
-    var wrapped = function() {
-      return type.result.fromJS(f.apply(null, type.argsToJS(arguments)));
-    };
-
-    this.$index = Runtime.addFunction(wrapped);
-    this.$owned = true;
-  } else {
-    // assume that if is the table index.
-    this.$index = f | 0;
-    this.$owned = false;
-  }
-}
-FnValue.prototype = Object.create(Object.prototype);
-FnValue.prototype.toString = function() {
-  return '<' + this.type + '>@' + this.$index;
-};
-FnValue.prototype.$destroy = function() {
-  if (this.$owned) {
-    Runtime.removeFunction(this.$index);
-  }
-};
-
-function StrValue(addr) {
-  Value.call(this, Str.pointee, addr);
-}
-StrValue.$at = function(addr) { return new StrValue(addr); }
-StrValue.$mallocCStr = function(s) {
-  var addr = malloc(s.length + 1);
-  Module.writeAsciiToMemory(s, addr);
-  return new StrValue(addr);
-}
-StrValue.prototype = Object.create(Value.prototype);
-StrValue.prototype.toString = function() {
-  return '<Str>@' + this.$addr;
-};
-
-function BufferValue(addr, size) {
-  Value.call(this, VoidPtr.pointee, addr);
-  this.size = size;
-}
-BufferValue.$malloc = function(buf) {
-  var addr;
-  var size;
-  if (buf instanceof ArrayBuffer) {
-    size = buf.byteLength;
-    addr = malloc(size);
-    HEAPU8.set(new Uint8Array(buf), addr);
-  } else if (ArrayBuffer.isView(buf)) {
-    size = buf.byteLength;
-    addr = malloc(size);
-    HEAPU8.set(new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength),
-               addr);
-  } else if (typeof buf == 'string') {
-    size = buf.length;
-    addr = malloc(size);
-    Module.writeAsciiToMemory(buf, addr, true);  // don't null-terminate
-  } else {
-    throw new Error('unknown buffer type: ' + buf);
-  }
-  return new BufferValue(addr, size);
-};
-BufferValue.prototype = Object.create(Value.prototype);
-BufferValue.prototype.toString = function() {
-  return '<Buffer>@' + this.$addr + ', ' + this.size + ' bytes';
-};
-
-// Wabt enums //////////////////////////////////////////////////////////////////
-
-// WabtResult
-var OK = 0;
-var ERROR = 1;
-
-// Wabt low-level types ////////////////////////////////////////////////////////
-
-var I = (function() {
-
-var AstLexer = Struct('AstLexer');
-var BinaryErrorHandler = Struct('BinaryErrorHandler');
-var Location = Struct('Location');
-var MemoryWriter = Struct('MemoryWriter');
-var Module = Struct('Module');
-var OutputBuffer = Struct('OutputBuffer');
-var ReadBinaryOptions = Struct('ReadBinaryOptions');
-var Script = Struct('Script');
-var SourceErrorHandler = Struct('SourceErrorHandler');
-var Stream = Struct('Stream');
-var StrSlice = Struct('StrSlice');
-var WriteBinaryOptions = Struct('WriteBinaryOptions');
-var Writer = Struct('Writer');
-
-var BinaryErrorHandlerCallback = Fn(Void, [U32, Str, UserData]);
-var SourceErrorHandlerCallback =
-    Fn(Void, [Ptr(Location), Str, StrPtr, StrLen, U32, UserData]);
-
-BinaryErrorHandler.define('binary_error_handler', {
-  on_error: BinaryErrorHandlerCallback,
-  user_data: UserData,
-});
-
-Location.define('location', {
-  filename: Str,
-  line: U32,
-  first_column: U32,
-  last_column: U32,
-});
-
-MemoryWriter.define('memory_writer', {
-  base: Writer,
-  buf: OutputBuffer,
-});
-
-Module.define('module');
-
-OutputBuffer.define('output_buffer', {
-  start: BufPtr,
-  size: BufLen,
-  capacity: U32,
-});
-
-ReadBinaryOptions.define('read_binary_options', {
-  read_debug_names: Bool,
-});
-
-Script.define('script');
-
-SourceErrorHandler.define('source_error_handler', {
-  on_error: SourceErrorHandlerCallback,
-  source_line_max_length: U32,
-  user_data: UserData,
-});
-
-Stream.define('stream', {
-  writer: Ptr(Writer),
-  result: U32,
-  offset: U32,
-  log_stream: Ptr(Stream),
-});
-
-StrSlice.define('string_slice', {
-  start: StrPtr,
-  length: StrLen,
-});
-
-WriteBinaryOptions.define('write_binary_options', {
-  log_stream: Ptr(Stream),
-  canonicalize_lebs: Bool,
-  write_debug_names: Bool,
-});
-
-Writer.define('writer', {
-  write_data: Fn(I32, [U32, BufPtr, BufLen, UserData]),
-  move_data: Fn(I32, [U32, U32, U32, UserData]),
-});
-
-// Wabt low-level functions ////////////////////////////////////////////////////
-
-var closeMemWriter = Fn(Void, [Ptr(MemoryWriter)]).define('_wabt_close_mem_writer');
-var defaultBinaryErrorCallback = BinaryErrorHandlerCallback.define('_wabt_default_binary_error_callback');
-var defaultSourceErrorCallback = SourceErrorHandlerCallback.define('_wabt_default_source_error_callback');
-var destroyAstLexer = Fn(Void, [Ptr(AstLexer)]).define('_wabt_destroy_ast_lexer');
-var destroyOutputBuffer = Fn(Void, [Ptr(OutputBuffer)]).define('_wabt_destroy_output_buffer');
-var destroyScript = Fn(Void, [Ptr(Script)]).define('_wabt_destroy_script');
-var getFirstModule = Fn(Ptr(Module), [Ptr(Script)]).define('_wabt_get_first_module');
-var initMemWriter = Fn(I32, [Ptr(MemoryWriter)]).define('_wabt_init_mem_writer');
-var initStream = Fn(Void, [Ptr(Stream), Ptr(Writer), Ptr(Stream)]).define('_wabt_init_stream');
-var newAstBufferLexer = Fn(Ptr(AstLexer), [Str, BufPtr, BufLen]).define('_wabt_new_ast_buffer_lexer');
-var parseAst = Fn(I32, [Ptr(AstLexer), Ptr(Script), Ptr(SourceErrorHandler)]).define('_wabt_parse_ast');
-var resolveNamesScript = Fn(I32, [Ptr(AstLexer), Ptr(Script), Ptr(SourceErrorHandler)]).define('_wabt_resolve_names_script');
-var validateScript = Fn(I32, [Ptr(AstLexer), Ptr(Script), Ptr(SourceErrorHandler)]).define('_wabt_validate_script');
-var writeBinaryModule = Fn(I32, [Ptr(Writer), Ptr(Module), Ptr(WriteBinaryOptions)]).define('_wabt_write_binary_module');
-
-return {
-  // Types
-  AstLexer: AstLexer,
-  BinaryErrorHandler: BinaryErrorHandler,
-  Location: Location,
-  MemoryWriter: MemoryWriter,
-  Module: Module,
-  OutputBuffer: OutputBuffer,
-  ReadBinaryOptions: ReadBinaryOptions,
-  Script: Script,
-  SourceErrorHandler: SourceErrorHandler,
-  Stream: Stream,
-  StrSlice: StrSlice,
-  WriteBinaryOptions: WriteBinaryOptions,
-  Writer: Writer,
-
-  // Functions
-  closeMemWriter: closeMemWriter,
-  defaultBinaryErrorCallback: defaultBinaryErrorCallback,
-  defaultSourceErrorCallback: defaultSourceErrorCallback,
-  destroyAstLexer: destroyAstLexer,
-  destroyOutputBuffer: destroyOutputBuffer,
-  destroyScript: destroyScript,
-  getFirstModule: getFirstModule,
-  initMemWriter: initMemWriter,
-  initStream: initStream,
-  newAstBufferLexer: newAstBufferLexer,
-  parseAst: parseAst,
-  resolveNamesScript: resolveNamesScript,
-  validateScript: validateScript,
-  writeBinaryModule: writeBinaryModule,
-};
-
-})();
-
-// Helpers for friendly objects ////////////////////////////////////////////////
-
-function define$From(obj) {
-  obj.$from = function($) {
-    var o = Object.create(obj.prototype);
-    o.$ = $;
-    return o;
-  };
-}
-
-function definePrimitiveGetter(proto, name, cName) {
-  cName = cName || name;
-  Object.defineProperty(proto, name, {
-    get: function() { return this.$[cName].load(); }
-  });
-}
-
-function definePrimitiveGetterSetter(proto, name, cName) {
-  cName = cName || name;
-  Object.defineProperty(proto, name, {
-    get: function() { return this.$[cName].load(); },
-    set: function(value) { this.$[cName].store(value); },
-  });
-}
-
-function defineStrGetter(proto, name, cName) {
-  cName = cName || name;
-  Object.defineProperty(proto, name, {
-    get: function() {
-      return this.$[cName].load();
-    }
-  });
-}
-
-// Get a StrSlice, given a pointer and length
-function defineStrSliceGetter(proto, name, ptrName, lenName) {
-  Object.defineProperty(proto, name, {
-    get: function() {
-      var offset = this.$[ptrName].load();
-      var length = this.$[lenName].load();
-      return loadstrslice(offset.$addr, length);
-    }
-  });
-}
-
-// Get a StrSlice, given a StrSlice object
-function defineStrSliceObjGetter(proto, name, cName) {
-  cName = cName || name;
-  Object.defineProperty(proto, name, {
-    get: function() {
-      var offset = this.$[cName].start.load();
-      var length = this.$[cName].length.load();
-      return loadstrslice(offset.$addr, length);
-    }
-  });
-}
-
-function defineBufferGetter(proto, name, ptrName, lenName) {
-  Object.defineProperty(proto, name, {
-    get: function() {
-      var offset = this.$[ptrName].load();
-      var length = this.$[lenName].load();
-      return loadbuffer(offset.$addr, length);
-    }
-  });
-}
-
-// Friendly objects ////////////////////////////////////////////////////////////
-
-// Writer
-function Writer(writeData, moveData) {
-  this.$ = Value.$malloc(I.Writer);
-  this.$writeData = new FnValue(I.Writer.fields.write_data.type, writeData);
-  this.$moveData = new FnValue(I.Writer.fields.move_data.type, moveData);
-  this.$.write_data.store(this.$writeData);
-  this.$.move_data.store(this.$moveData);
-}
-define$From(Writer);
-Writer.prototype = Object.create(Object.prototype);
-Writer.prototype.$destroy = function() {
-  this.$moveData.$destroy();
-  this.$writeData.$destroy();
-  this.$.$free();
-};
-
-// MemoryWriter
-function MemoryWriter() {
-  this.$ = Value.$malloc(I.MemoryWriter);
-  var result = I.initMemWriter(this.$);
-  if (result != OK) {
-    throw new Error('unable to initialize MemoryWriter');
-  }
-  this.writer = Writer.$from(this.$.base);
-  this.buf = OutputBuffer.$from(this.$.buf);
-}
-MemoryWriter.prototype = Object.create(MemoryWriter.prototype);
-MemoryWriter.prototype.$destroy = function() {
-  I.closeMemWriter(this.$);
-  this.$.$free();
-};
-
-// OutputBuffer
-function OutputBuffer() {
-  this.$ = null;
-}
-define$From(OutputBuffer);
-OutputBuffer.prototype = Object.create(Object.prototype);
-defineBufferGetter(OutputBuffer.prototype, 'buf', 'start', 'size');
-defineStrSliceGetter(OutputBuffer.prototype, 'bufStr', 'start', 'size');
-definePrimitiveGetter(OutputBuffer.prototype, 'size');
-definePrimitiveGetter(OutputBuffer.prototype, 'capacity');
-OutputBuffer.prototype.$destroy = function() {
-  I.destroyOutputBuffer(this.$);
-  this.$.$free();
-};
-
-// Stream
-function Stream(writer, logStream) {
-  this.$ = Value.$malloc(I.Stream);
-  I.initStream(this.$, writer.$, logStream ? logStream.$ : null);
-}
-Stream.prototype = Object.create(Object.prototype);
-definePrimitiveGetter(Stream.prototype, 'offset');
-definePrimitiveGetter(Stream.prototype, 'result');
-Stream.prototype.$destroy = function() {
-  this.$.$free();
-};
-
-// StringStream
-function StringStream() {
-  this.$writer = new MemoryWriter();
-  Stream.call(this, this.$writer.writer, null);
-}
-StringStream.prototype = Object.create(Object.prototype);
-Object.defineProperty(StringStream.prototype, 'string', {
-  get: function() {
-    return this.$writer.buf.bufStr;
-  }
-});
-StringStream.prototype.$destroy = function() {
-  Stream.prototype.$destroy.call(this);
-  this.$writer.$destroy();
-};
-
-// parseAst
-function parseAst(filename, buffer) {
-  var sourceLineMaxLength = 80;
-  var astLexer = new AstLexer(filename, buffer);
-  var errorHandler = new SourceErrorHandler(sourceLineMaxLength);
-  var script = new Script();
-  var result = I.parseAst(astLexer.$, script.$, errorHandler.$);
-  script.$astLexer = astLexer;
-  script.$errorHandler = errorHandler;
-  if (result != OK) {
-    script.$destroy();
-    throw new Error('parseAst failed:\n' + errorHandler.errorMessage);
-  }
-  return script;
-}
-
-// AstLexer
-function AstLexer(filename, buffer) {
-  this.$filename = StrValue.$mallocCStr(filename);
-  this.$buffer = BufferValue.$malloc(buffer);
-  this.$ = I.newAstBufferLexer(this.$filename, this.$buffer, this.$buffer.size);
-  if (this.$ === null) {
-    this.$buffer.$free();
-    this.$filename.$free();
-    throw new Error('unable to create AstLexer');
-  }
-}
-AstLexer.prototype = Object.create(Object.prototype);
-AstLexer.prototype.$destroy = function() {
-  I.destroyAstLexer(this.$);
-  this.$.$free();
-  this.$buffer.$free();
-  this.$filename.$free();
-}
-
-// SourceErrorHandler
-function SourceErrorHandler(sourceLineMaxLength) {
-  this.$ = Value.$malloc(I.SourceErrorHandler);
-  var wrapper = function(loc, error, sourceLine, sourceLineLength,
-                         sourceLineColumnOffset, userData){
-    loc = Location.$from(loc);
-    sourceLine = loadstrslice(sourceLine.$addr, sourceLineLength);
-
-    var lines = [
-      loc.filename + ':' + loc.line + ':' + loc.firstColumn,
-      error
-    ];
-    if (sourceLine.length > 0) {
-      var numSpaces = loc.firstColumn - 1 - sourceLineColumnOffset;
-      var numCarets =
-          Math.min(loc.lastColumn - loc.firstColumn, sourceLine.length);
-      lines.push(sourceLine);
-      lines.push(' '.repeat(numSpaces) + '^'.repeat(numCarets));
-    }
-    this.errorMessage += lines.join('\n') + '\n';
-  }.bind(this);
-  this.$callback =
-      new FnValue(I.SourceErrorHandler.fields.on_error.type, wrapper);
-  this.$.on_error.store(this.$callback);
-  this.$.source_line_max_length.store(sourceLineMaxLength);
-  this.errorMessage = '';
-}
-SourceErrorHandler.prototype = Object.create(Object.prototype);
-SourceErrorHandler.prototype.$destroy = function() {
-  this.$callback.$destroy();
-  this.$.$free();
-};
-
-// Location
-function Location() {
-  this.$ = null;
-}
-define$From(Location);
-Location.prototype = Object.create(Object.prototype);
-defineStrGetter(Location.prototype, 'filename');
-definePrimitiveGetter(Location.prototype, 'line');
-definePrimitiveGetter(Location.prototype, 'firstColumn', 'first_column');
-definePrimitiveGetter(Location.prototype, 'lastColumn', 'last_column');
-Location.prototype.$destroy = function() {
-  this.$.$free();
-};
-
-// Script
-function Script() {
-  this.$ = Value.$malloc(I.Script);
-  this.$astLexer = null;
-  this.$errorHandler = null;
-}
-Script.prototype = Object.create(Object.prototype);
-Script.prototype.resolveNames = function() {
-  var result =
-      I.resolveNamesScript(this.$astLexer.$, this.$, this.$errorHandler.$);
-  if (result != OK) {
-    throw new Error('resolveNames failed:\n' + this.$errorHandler.errorMessage);
-  }
-};
-Script.prototype.validate = function() {
-  var result = I.validateScript(this.$astLexer.$, this.$, this.$errorHandler.$);
-  if (result != OK) {
-    throw new Error('validate failed:\n' + this.$errorHandler.errorMessage);
-  }
-};
-Script.prototype.toBinary = function(options) {
-  var mw = new MemoryWriter();
-  options = new WriteBinaryOptions(options || {});
-  try {
-    var module = I.getFirstModule(this.$);
-    if (module.$addr === 0) {
-      throw new Error('Script has no module.');
-    }
-    var result = I.writeBinaryModule(mw.writer.$, module, options.$);
-    if (result != OK) {
-      throw new Error('writeBinaryModule failed');
-    }
-    return {buffer: mw.buf.buf, log: options.log}
-  } finally {
-    options.$destroy();
-    mw.$destroy();
-  }
-};
-Script.prototype.$destroy = function() {
-  I.destroyScript(this.$);
-  if (this.$errorHandler) this.$errorHandler.$destroy();
-  if (this.$astLexer) this.$astLexer.$destroy();
-  this.$.$free();
-};
-
-// WriteBinaryOptions
-function WriteBinaryOptions(options) {
-  this.$ = Value.$malloc(I.WriteBinaryOptions);
-  if (options.log) {
-    this.$logStream = new StringStream();
-    this.$.log_stream.store(this.$logStream.$);
-  } else {
-    this.$logStream = null;
-    this.$.log_stream.store(null);
-  }
-  var optBool = function(v, def) { return v === undefined ? def : v; };
-  this.$.canonicalize_lebs.store(optBool(options.canonicalizeLebs, true));
-  this.$.write_debug_names.store(optBool(options.writeDebugNames, false));
-}
-WriteBinaryOptions.prototype = Object.create(Object.prototype);
-Object.defineProperty(WriteBinaryOptions.prototype, 'log', {
-  get: function() {
-    return this.$logStream ? this.$logStream.string : '';
-  }
-});
-WriteBinaryOptions.prototype.$destroy = function() {
-  if (this.$logStream) {
-    this.$logStream.$destroy();
-  }
-  this.$.$free();
-};
-
-// BinaryErrorHandler
-function BinaryErrorHandler() {
-  this.$ = Value.$malloc(I.BinaryErrorHandler);
-  this.$callback = new FnValue(
-      I.BinaryErrorHandler.fields.on_error.type,
-      function(offset, error, userData) {
-        this.errorMessage += '@0x' + offset.toString(16) + ': ' + error + '\n';
-      }.bind(this));
-  this.$.on_error.store(this.$callback);
-  this.$.user_data.store(null);
-  this.errorMessage = '';
-}
-BinaryErrorHandler.prototype = Object.create(Object.prototype);
-BinaryErrorHandler.prototype.$destroy = function() {
-  this.$callback.$destroy();
-  this.$.$free();
-};
-
-// ReadBinaryOptions
-function ReadBinaryOptions(options) {
-  this.$ = Value.$malloc(I.ReadBinaryOptions);
-  this.$.read_debug_names.store(options.readDebugNames || false);
-}
-ReadBinaryOptions.prototype = Object.create(Object.prototype);
-ReadBinaryOptions.prototype.$destroy = function() {
-  this.$.$free();
-};
-
-
-////////////////////////////////////////////////////////////////////////////////
-
-var resolve = wabt.$resolve;
-
-wabt = {
-  ready: wabt.ready,
-
-  // Functions
-  parseAst: parseAst,
-};
-
-resolve();
-
-};
diff --git a/lib/wabt/src/wabt.post.js b/lib/wabt/src/wabt.post.js
new file mode 100644
index 0000000..bca6efa
--- /dev/null
+++ b/lib/wabt/src/wabt.post.js
@@ -0,0 +1,359 @@
+/*
+ * Copyright 2016 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var WABT_OK = 0;
+var WABT_ERROR = 1;
+
+/// If value is not undefined, return it. Otherwise return default_.
+function maybeDefault(value, default_) {
+  if (value === undefined) {
+    return default_;
+  }
+  return value;
+}
+
+/// Coerce value to boolean if not undefined. Otherwise return default_.
+function booleanOrDefault(value, default_) {
+  return !!maybeDefault(value, default_);
+}
+
+/// Allocate memory in the Module.
+function malloc(size) {
+  var addr = Module._malloc(size);
+  if (addr == 0) {
+    throw new Error('out of memory');
+  }
+  return addr;
+}
+
+/// Convert an ArrayBuffer/TypedArray/string into a buffer that can be
+/// used by the Module.
+function allocateBuffer(buf) {
+  var addr;
+  var size;
+  if (buf instanceof ArrayBuffer) {
+    size = buf.byteLength;
+    addr = malloc(size);
+    (new Uint8Array(Module.buffer, addr, size)).set(new Uint8Array(buf))
+  } else if (ArrayBuffer.isView(buf)) {
+    size = buf.buffer.byteLength;
+    addr = malloc(size);
+    (new Uint8Array(Module.buffer, addr, size)).set(buf);
+  } else if (typeof buf == 'string') {
+    size = buf.length;
+    addr = malloc(size);
+    Module.writeAsciiToMemory(buf, addr, true);  // don't null-terminate
+  } else {
+    throw new Error('unknown buffer type: ' + buf);
+  }
+  return {addr: addr, size: size};
+}
+
+function allocateCString(s) {
+  var size = s.length;
+  var addr = malloc(size);
+  Module.writeAsciiToMemory(s, addr);
+  return {addr: addr, size: size};
+}
+
+
+/// Lexer
+function Lexer(filename, buffer) {
+  this.filenameObj = allocateCString(filename);
+  this.bufferObj = allocateBuffer(buffer);
+  this.addr = Module._wabt_new_wast_buffer_lexer(
+      this.filenameObj.addr, this.bufferObj.addr, this.bufferObj.size);
+}
+Lexer.prototype = Object.create(Object.prototype);
+
+Lexer.prototype.destroy = function() {
+  Module._wabt_destroy_wast_lexer(this.addr);
+  Module._free(this.bufferObj.addr);
+  Module._free(this.filenameObj.addr);
+};
+
+
+/// OutputBuffer
+function OutputBuffer(addr) {
+  this.addr = addr;
+}
+OutputBuffer.prototype = Object.create(Object.prototype);
+
+OutputBuffer.prototype.toTypedArray = function() {
+  if (!this.addr) {
+    return null;
+  }
+
+  var addr = Module._wabt_output_buffer_get_data(this.addr);
+  var size = Module._wabt_output_buffer_get_size(this.addr);
+  var buffer = new Uint8Array(size);
+  buffer.set(new Uint8Array(HEAPU8.buffer, addr, size));
+  return buffer;
+};
+
+OutputBuffer.prototype.toString = function() {
+  if (!this.addr) {
+    return '';
+  }
+
+  var addr = Module._wabt_output_buffer_get_data(this.addr);
+  var size = Module._wabt_output_buffer_get_size(this.addr);
+  return Module.Pointer_stringify(addr, size);
+};
+
+OutputBuffer.prototype.destroy = function() {
+  Module._wabt_destroy_output_buffer(this.addr);
+};
+
+
+/// SourceErrorHandler
+function SourceErrorHandler() {
+  this.addr = Module._wabt_new_source_error_handler_buffer();
+}
+SourceErrorHandler.prototype = Object.create(Object.prototype);
+
+SourceErrorHandler.prototype.getMessage = function() {
+  var addr = Module._wabt_source_error_handler_buffer_get_data(this.addr);
+  var size = Module._wabt_source_error_handler_buffer_get_size(this.addr);
+  return Module.Pointer_stringify(addr, size);
+}
+
+SourceErrorHandler.prototype.destroy = function() {
+  Module._wabt_destroy_source_error_handler_buffer(this.addr);
+};
+
+
+/// BinaryErrorHandler
+function BinaryErrorHandler() {
+  this.addr = Module._wabt_new_binary_error_handler_buffer();
+}
+BinaryErrorHandler.prototype = Object.create(Object.prototype);
+
+BinaryErrorHandler.prototype.getMessage = function() {
+  var addr = Module._wabt_binary_error_handler_buffer_get_data(this.addr);
+  var size = Module._wabt_binary_error_handler_buffer_get_size(this.addr);
+  return Module.Pointer_stringify(addr, size);
+}
+
+BinaryErrorHandler.prototype.destroy = function() {
+  Module._wabt_destroy_binary_error_handler_buffer(this.addr);
+};
+
+
+/// parseWast
+function parseWast(filename, buffer) {
+  var lexer = new Lexer(filename, buffer);
+  var errorHandler = new SourceErrorHandler();
+
+  try {
+    var parseResult_addr =
+        Module._wabt_parse_wast(lexer.addr, errorHandler.addr);
+
+    var result =
+        Module._wabt_parse_wast_result_get_result(parseResult_addr);
+    if (result !== WABT_OK) {
+      throw new Error('parseWast failed:\n' + errorHandler.getMessage());
+    }
+
+    var script_addr =
+        Module._wabt_parse_wast_result_release_script(parseResult_addr);
+    var result = new WasmScript(lexer, script_addr);
+    // Clear lexer so it isn't destroyed below.
+    lexer = null;
+    return result;
+  } finally {
+    Module._wabt_destroy_parse_wast_result(parseResult_addr);
+    errorHandler.destroy();
+    if (lexer) {
+      lexer.destroy();
+    }
+  }
+}
+
+
+// readWasm
+function readWasm(buffer, options) {
+  var bufferObj = allocateBuffer(buffer);
+  var errorHandler = new BinaryErrorHandler();
+  var readDebugNames = booleanOrDefault(options.readDebugNames, false);
+
+  try {
+    var readBinaryResult_addr = Module._wabt_read_binary(
+        bufferObj.addr, bufferObj.size, readDebugNames, errorHandler.addr);
+
+    var result =
+        Module._wabt_read_binary_result_get_result(readBinaryResult_addr);
+    if (result !== WABT_OK) {
+      throw new Error('readWasm failed:\n' + errorHandler.getMessage());
+    }
+
+    var module_addr =
+        Module._wabt_read_binary_result_release_module(readBinaryResult_addr);
+    var result = new WasmModule(module_addr);
+    return result;
+  } finally {
+    Module._wabt_destroy_read_binary_result(readBinaryResult_addr);
+    errorHandler.destroy();
+    Module._free(bufferObj.addr);
+  }
+}
+
+
+/// WasmScript
+function WasmScript(lexer, script_addr) {
+  this.lexer = lexer;
+  this.script_addr = script_addr;
+}
+WasmScript.prototype = Object.create(Object.prototype);
+
+WasmScript.prototype.resolveNames = function() {
+  var errorHandler = new SourceErrorHandler();
+  try {
+    var result = Module._wabt_resolve_names_script(
+        this.lexer.addr, this.script_addr, errorHandler.addr);
+    if (result !== WABT_OK) {
+      throw new Error('resolveNames failed:\n' + errorHandler.getMessage());
+    }
+  } finally {
+    errorHandler.destroy();
+  }
+};
+
+WasmScript.prototype.validate = function() {
+  var errorHandler = new SourceErrorHandler();
+  try {
+    var result = Module._wabt_validate_script(
+        this.lexer.addr, this.script_addr, errorHandler.addr);
+    if (result !== WABT_OK) {
+      throw new Error('validate failed:\n' + errorHandler.getMessage());
+    }
+  } finally {
+    errorHandler.destroy();
+  }
+};
+
+WasmScript.prototype.toBinary = function(options) {
+  var module_addr = Module._wabt_get_first_module(this.script_addr);
+  var module = new WasmModule(module_addr);
+  return module.toBinary(options);
+};
+
+WasmScript.prototype.destroy = function() {
+  Module._wabt_destroy_script(this.script_addr);
+  this.lexer.destroy();
+};
+
+
+// WasmModule (can't call it Module because emscripten has claimed it.)
+function WasmModule(module_addr) {
+  this.module_addr = module_addr;
+}
+WasmModule.prototype = Object.create(Object.prototype);
+
+WasmModule.prototype.generateNames = function() {
+  var result = Module._wabt_generate_names_module(this.module_addr);
+  if (result !== WABT_OK) {
+    throw new Error('generateNames failed.');
+  }
+};
+
+WasmModule.prototype.applyNames = function() {
+  var result = Module._wabt_apply_names_module(this.module_addr);
+  if (result !== WABT_OK) {
+    throw new Error('applyNames failed.');
+  }
+};
+
+WasmModule.prototype.toText = function(options) {
+  var foldExprs = booleanOrDefault(options.foldExprs, false);
+  var inlineExport = booleanOrDefault(options.inlineExport, false);
+
+  var writeModuleResult_addr =
+      Module._wabt_write_text_module(this.module_addr, foldExprs, inlineExport);
+
+  var result = Module._wabt_write_module_result_get_result(
+      writeModuleResult_addr);
+
+  try {
+    if (result !== WABT_OK) {
+      throw new Error('toText failed.');
+    }
+
+    var outputBuffer = new OutputBuffer(
+        Module._wabt_write_module_result_release_output_buffer(
+            writeModuleResult_addr));
+
+    return outputBuffer.toString();
+
+  } finally {
+    if (outputBuffer) {
+      outputBuffer.destroy();
+    }
+    Module._wabt_destroy_write_module_result(writeModuleResult_addr);
+  }
+};
+
+WasmModule.prototype.toBinary = function(options) {
+  var log = booleanOrDefault(options.log, false);
+  var canonicalize_lebs = booleanOrDefault(options.canonicalize_lebs, true);
+  var relocatable = booleanOrDefault(options.relocatable, false);
+  var write_debug_names = booleanOrDefault(options.write_debug_names, false);
+
+  var writeModuleResult_addr = Module._wabt_write_binary_module(
+      this.module_addr, log, canonicalize_lebs, relocatable, write_debug_names);
+
+  var result =
+      Module._wabt_write_module_result_get_result(writeModuleResult_addr);
+
+  try {
+    if (result !== WABT_OK) {
+      throw new Error('toBinary failed.');
+    }
+
+    var binaryOutputBuffer =
+        new OutputBuffer(Module._wabt_write_module_result_release_output_buffer(
+            writeModuleResult_addr));
+    var logOutputBuffer = new OutputBuffer(
+        Module._wabt_write_module_result_release_log_output_buffer(
+            writeModuleResult_addr));
+
+    return {
+      buffer: binaryOutputBuffer.toTypedArray(),
+      log: logOutputBuffer.toString()
+    };
+
+  } finally {
+    if (binaryOutputBuffer) {
+      binaryOutputBuffer.destroy();
+    }
+    if (logOutputBuffer) {
+      logOutputBuffer.destroy();
+    }
+    Module._wabt_destroy_write_module_result(writeModuleResult_addr);
+  }
+};
+
+WasmModule.prototype.destroy = function() {
+  Module._wabt_destroy_module(this.module_addr);
+};
+
+return {
+  ready: Promise.resolve(),
+  parseWast: parseWast,
+  readWasm: readWasm,
+};
+
+})();  // Call IIFE from wabt.pre.js.
diff --git a/lib/wabt/src/ast-writer.h b/lib/wabt/src/wabt.pre.js
similarity index 65%
copy from lib/wabt/src/ast-writer.h
copy to lib/wabt/src/wabt.pre.js
index 950e640..e53f918 100644
--- a/lib/wabt/src/ast-writer.h
+++ b/lib/wabt/src/wabt.pre.js
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 WebAssembly Community Group participants
+ * Copyright 2017 WebAssembly Community Group participants
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -14,18 +14,5 @@
  * limitations under the License.
  */
 
-#ifndef WABT_AST_WRITER_H_
-#define WABT_AST_WRITER_H_
-
-#include "common.h"
-
-namespace wabt {
-
-struct Module;
-struct Writer;
-
-Result write_ast(struct Writer*, const struct Module*);
-
-}  // namespace wabt
-
-#endif /* WABT_AST_WRITER_H_ */
+var wabt = (function() {
+  "use strict";
diff --git a/lib/wabt/src/wasm-link.h b/lib/wabt/src/wasm-link.h
index 6ddbe14..86cdecb 100644
--- a/lib/wabt/src/wasm-link.h
+++ b/lib/wabt/src/wasm-link.h
@@ -23,30 +23,31 @@
 #include "binary.h"
 #include "common.h"
 
-#define WABT_LINK_MODULE_NAME "__extern"
-
 namespace wabt {
 namespace link {
 
-struct LinkerInputBinary;
+class LinkerInputBinary;
 
 struct FunctionImport {
+  StringSlice module_name;
   StringSlice name;
-  uint32_t sig_index;
+  Index sig_index;
   bool active; /* Is this import present in the linked binary */
-  struct LinkerInputBinary* foreign_binary;
-  uint32_t foreign_index;
+  Index relocated_function_index;
+  LinkerInputBinary* foreign_binary;
+  Index foreign_index;
 };
 
 struct GlobalImport {
+  StringSlice module_name;
   StringSlice name;
   Type type;
   bool mutable_;
 };
 
 struct DataSegment {
-  uint32_t memory_index;
-  uint32_t offset;
+  Index memory_index;
+  Address offset;
   const uint8_t* data;
   size_t size;
 };
@@ -54,7 +55,7 @@
 struct Export {
   ExternalKind kind;
   StringSlice name;
-  uint32_t index;
+  Index index;
 };
 
 struct SectionDataCustom {
@@ -68,7 +69,7 @@
   ~Section();
 
   /* The binary to which this section belongs */
-  struct LinkerInputBinary* binary;
+  LinkerInputBinary* binary;
   std::vector<Reloc> relocations; /* The relocations for this section */
 
   BinarySection section_code;
@@ -79,16 +80,16 @@
   size_t payload_offset;
 
   /* For known sections, the count of the number of elements in the section */
-  uint32_t count;
+  Index count;
 
   union {
     /* CUSTOM section data */
-    SectionDataCustom data_custom;
+    SectionDataCustom custom;
     /* DATA section data */
     std::vector<DataSegment>* data_segments;
     /* MEMORY section data */
     Limits memory_limits;
-  };
+  } data;
 
   /* The offset at which this section appears within the combined output
    * section. */
@@ -97,11 +98,20 @@
 
 typedef std::vector<Section*> SectionPtrVector;
 
-struct LinkerInputBinary {
+class LinkerInputBinary {
+ public:
   WABT_DISALLOW_COPY_AND_ASSIGN(LinkerInputBinary);
   LinkerInputBinary(const char* filename, uint8_t* data, size_t size);
   ~LinkerInputBinary();
 
+  Index RelocateFuncIndex(Index findex);
+  Index RelocateTypeIndex(Index index);
+  Index RelocateGlobalIndex(Index index);
+
+  bool IsValidFunctionIndex(Index index);
+  bool IsFunctionImport(Index index);
+  bool IsInactiveFunctionImport(Index index);
+
   const char* filename;
   uint8_t* data;
   size_t size;
@@ -109,20 +119,21 @@
   std::vector<Export> exports;
 
   std::vector<FunctionImport> function_imports;
-  uint32_t active_function_imports;
+  Index active_function_imports;
   std::vector<GlobalImport> global_imports;
-  uint32_t active_global_imports;
+  Index active_global_imports;
 
-  uint32_t type_index_offset;
-  uint32_t function_index_offset;
-  uint32_t imported_function_index_offset;
-  uint32_t global_index_offset;
-  uint32_t imported_global_index_offset;
-  uint32_t table_index_offset;
-  uint32_t memory_page_count;
-  uint32_t memory_page_offset;
+  Index type_index_offset;
+  Index function_index_offset;
+  Index imported_function_index_offset;
+  Index global_index_offset;
+  Index imported_global_index_offset;
+  Index table_index_offset;
+  Index memory_page_count;
+  Index memory_page_offset;
 
-  uint32_t table_elem_count;
+  Index table_elem_count = 0;
+  Index function_count = 0;
 
   std::vector<std::string> debug_names;
 };
diff --git a/lib/wabt/src/wast-lexer.cc b/lib/wabt/src/wast-lexer.cc
new file mode 100644
index 0000000..bf1bb13
--- /dev/null
+++ b/lib/wabt/src/wast-lexer.cc
@@ -0,0 +1,495 @@
+/*
+ * Copyright 2016 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "wast-lexer.h"
+
+#include <cassert>
+#include <cstdio>
+
+#include "config.h"
+
+#include "lexer-source.h"
+#include "wast-parser.h"
+#include "wast-parser-lexer-shared.h"
+
+/* must be included after so some typedefs will be defined */
+#include "wast-parser-gen.hh"
+
+/*!max:re2c */
+
+#define INITIAL_LEXER_BUFFER_SIZE (64 * 1024)
+
+#define YY_USER_ACTION                  \
+  {                                     \
+    loc->filename = filename_;          \
+    loc->line = line_;                  \
+    loc->first_column = COLUMN(token_); \
+    loc->last_column = COLUMN(cursor_); \
+  }
+
+#define RETURN(name) \
+  YY_USER_ACTION;    \
+  return WABT_TOKEN_TYPE_##name
+
+#define ERROR(...) \
+  YY_USER_ACTION;  \
+  wast_parser_error(loc, this, parser, __VA_ARGS__)
+
+#define BEGIN(c) cond = (c)
+#define FILL(n)                                \
+  do {                                         \
+    if (WABT_FAILED(Fill(loc, parser, (n)))) { \
+      RETURN(EOF);                             \
+    }                                          \
+  } while (0)
+
+#define MAYBE_MALFORMED_UTF8(desc)                \
+  if (!(eof_ && limit_ - cursor_ <= YYMAXFILL)) { \
+    ERROR("malformed utf-8%s", desc);             \
+  }                                               \
+  continue
+
+#define yytext (token_)
+#define yyleng (cursor_ - token_)
+
+/* p must be a pointer somewhere in the lexer buffer */
+#define FILE_OFFSET(p) ((p) - (buffer_) + buffer_file_offset_)
+#define COLUMN(p) (FILE_OFFSET(p) - line_file_offset_ + 1)
+
+#define COMMENT_NESTING (comment_nesting_)
+#define NEWLINE                               \
+  do {                                        \
+    line_++;                                  \
+    line_file_offset_ = FILE_OFFSET(cursor_); \
+  } while (0)
+
+#define TEXT                 \
+  lval->text.start = yytext; \
+  lval->text.length = yyleng
+
+#define TEXT_AT(offset)               \
+  lval->text.start = yytext + offset; \
+  lval->text.length = yyleng - offset
+
+#define TYPE(type_) lval->type = Type::type_
+
+#define OPCODE(name) lval->opcode = Opcode::name
+
+#define LITERAL(type_)                     \
+  lval->literal.type = LiteralType::type_; \
+  lval->literal.text.start = yytext;       \
+  lval->literal.text.length = yyleng
+
+namespace wabt {
+
+WastLexer::WastLexer(std::unique_ptr<LexerSource> source, const char* filename)
+    : source_(std::move(source)),
+      line_finder_(source_->Clone()),
+      filename_(filename),
+      line_(1),
+      comment_nesting_(0),
+      buffer_file_offset_(0),
+      line_file_offset_(0),
+      eof_(false),
+      buffer_(nullptr),
+      buffer_size_(0),
+      marker_(nullptr),
+      token_(nullptr),
+      cursor_(nullptr),
+      limit_(nullptr) {}
+
+WastLexer::~WastLexer() {
+  delete[] buffer_;
+}
+
+// static
+std::unique_ptr<WastLexer> WastLexer::CreateFileLexer(const char* filename) {
+  std::unique_ptr<LexerSource> source(new LexerSourceFile(filename));
+  return std::unique_ptr<WastLexer>(new WastLexer(std::move(source), filename));
+}
+
+// static
+std::unique_ptr<WastLexer> WastLexer::CreateBufferLexer(const char* filename,
+                                                        const void* data,
+                                                        size_t size) {
+  std::unique_ptr<LexerSource> source(new LexerSourceBuffer(data, size));
+  return std::unique_ptr<WastLexer>(new WastLexer(std::move(source), filename));
+}
+
+Result WastLexer::Fill(Location* loc, WastParser* parser, size_t need) {
+  if (eof_)
+    return Result::Error;
+  size_t free = token_ - buffer_;
+  assert(static_cast<size_t>(cursor_ - buffer_) >= free);
+  // Our buffer is too small, need to realloc.
+  if (free < need) {
+    char* old_buffer = buffer_;
+    size_t old_buffer_size = buffer_size_;
+    size_t new_buffer_size =
+        old_buffer_size ? old_buffer_size * 2 : INITIAL_LEXER_BUFFER_SIZE;
+    // Make sure there is enough space for the bytes requested (need) and an
+    // additional YYMAXFILL bytes which is needed for the re2c lexer
+    // implementation when the eof is reached.
+    while ((new_buffer_size - old_buffer_size) + free < need + YYMAXFILL)
+      new_buffer_size *= 2;
+
+    char* new_buffer = new char[new_buffer_size];
+    if (limit_ > token_)
+      memmove(new_buffer, token_, limit_ - token_);
+    buffer_ = new_buffer;
+    buffer_size_ = new_buffer_size;
+    token_ = new_buffer + (token_ - old_buffer) - free;
+    marker_ = new_buffer + (marker_ - old_buffer) - free;
+    cursor_ = new_buffer + (cursor_ - old_buffer) - free;
+    limit_ = new_buffer + (limit_ - old_buffer) - free;
+    buffer_file_offset_ += free;
+    free += new_buffer_size - old_buffer_size;
+    delete[] old_buffer;
+  } else {
+    // Shift everything down to make more room in the buffer.
+    if (limit_ > token_)
+      memmove(buffer_, token_, limit_ - token_);
+    token_ -= free;
+    marker_ -= free;
+    cursor_ -= free;
+    limit_ -= free;
+    buffer_file_offset_ += free;
+  }
+  // Read the new data into the buffer.
+  limit_ += source_->Fill(limit_, free);
+
+  // If at the end of file, need to fill YYMAXFILL more characters with "fake
+  // characters", that are not a lexeme nor a lexeme suffix. see
+  // http://re2c.org/examples/example_03.html.
+  if (limit_ < buffer_ + buffer_size_ - YYMAXFILL) {
+    eof_ = true;
+    // Fill with 0xff, since that is an invalid utf-8 byte.
+    memset(limit_, 0xff, YYMAXFILL);
+    limit_ += YYMAXFILL;
+  }
+  return Result::Ok;
+}
+
+int WastLexer::GetToken(Token* lval, Location* loc, WastParser* parser) {
+  enum {
+    YYCOND_INIT,
+    YYCOND_BAD_TEXT,
+    YYCOND_LINE_COMMENT,
+    YYCOND_BLOCK_COMMENT,
+    YYCOND_i = YYCOND_INIT,
+  } cond = YYCOND_INIT;
+
+  for (;;) {
+    token_ = cursor_;
+    /*!re2c
+      re2c:condprefix = YYCOND_;
+      re2c:condenumprefix = YYCOND_;
+      re2c:define:YYCTYPE = "unsigned char";
+      re2c:define:YYCURSOR = cursor_;
+      re2c:define:YYMARKER = marker_;
+      re2c:define:YYLIMIT = limit_;
+      re2c:define:YYFILL = "FILL";
+      re2c:define:YYGETCONDITION = "cond";
+      re2c:define:YYGETCONDITION:naked = 1;
+      re2c:define:YYSETCONDITION = "BEGIN";
+
+      digit =     [0-9];
+      hexdigit =  [0-9a-fA-F];
+      num =       digit+;
+      hexnum =    hexdigit+;
+      letter =    [a-zA-Z];
+      symbol =    [+\-*\/\\\^~=<>!?@#$%&|:`.'];
+      character = [^"\\\x00-\x1f]
+                | "\\" [nrt\\'"]
+                | "\\" hexdigit hexdigit;
+      sign =      [+-];
+      nat =       num | "0x" hexnum;
+      int =       sign nat;
+      hexfloat =  sign? "0x" hexnum ("." hexdigit*)? "p" sign? num;
+      infinity =  sign? "inf";
+      nan =       sign? "nan"
+          |       sign? "nan:0x" hexnum;
+      float =     sign? num "." digit*
+            |     sign? num ("." digit*)? [eE] sign? num;
+      text =      '"' character* '"';
+      name =      "$" (letter | digit | "_" | symbol)+;
+
+      // Should be ([\x21-\x7e] \ [()"; ])+ , but re2c doesn't like this...
+      reserved =  [\x21\x23-\x27\x2a-\x3a\x3c-\x7e]+;  
+
+      <i> "("                   { RETURN(LPAR); }
+      <i> ")"                   { RETURN(RPAR); }
+      <i> nat                   { LITERAL(Int); RETURN(NAT); }
+      <i> int                   { LITERAL(Int); RETURN(INT); }
+      <i> float                 { LITERAL(Float); RETURN(FLOAT); }
+      <i> hexfloat              { LITERAL(Hexfloat); RETURN(FLOAT); }
+      <i> infinity              { LITERAL(Infinity); RETURN(FLOAT); }
+      <i> nan                   { LITERAL(Nan); RETURN(FLOAT); }
+      <i> text                  { TEXT; RETURN(TEXT); }
+      <i> '"' => BAD_TEXT       { continue; }
+      <BAD_TEXT> character      { continue; }
+      <BAD_TEXT> "\n" => i      { ERROR("newline in string");
+                                  NEWLINE;
+                                  continue; }
+      <BAD_TEXT> "\\".          { ERROR("bad escape \"%.*s\"",
+                                        static_cast<int>(yyleng), yytext);
+                                  continue; }
+      <BAD_TEXT> '"' => i       { TEXT; RETURN(TEXT); }
+      <BAD_TEXT> [^]            { ERROR("illegal character in string");
+                                  continue; }
+      <BAD_TEXT> *              { MAYBE_MALFORMED_UTF8(" in string"); }
+      <i> "i32"                 { TYPE(I32); RETURN(VALUE_TYPE); }
+      <i> "i64"                 { TYPE(I64); RETURN(VALUE_TYPE); }
+      <i> "f32"                 { TYPE(F32); RETURN(VALUE_TYPE); }
+      <i> "f64"                 { TYPE(F64); RETURN(VALUE_TYPE); }
+      <i> "anyfunc"             { RETURN(ANYFUNC); }
+      <i> "mut"                 { RETURN(MUT); }
+      <i> "nop"                 { RETURN(NOP); }
+      <i> "block"               { RETURN(BLOCK); }
+      <i> "if"                  { RETURN(IF); }
+      <i> "then"                { RETURN(THEN); }
+      <i> "else"                { RETURN(ELSE); }
+      <i> "loop"                { RETURN(LOOP); }
+      <i> "br"                  { RETURN(BR); }
+      <i> "br_if"               { RETURN(BR_IF); }
+      <i> "br_table"            { RETURN(BR_TABLE); }
+      <i> "call"                { RETURN(CALL); }
+      <i> "call_indirect"       { RETURN(CALL_INDIRECT); }
+      <i> "drop"                { RETURN(DROP); }
+      <i> "end"                 { RETURN(END); }
+      <i> "return"              { RETURN(RETURN); }
+      <i> "get_local"           { RETURN(GET_LOCAL); }
+      <i> "set_local"           { RETURN(SET_LOCAL); }
+      <i> "tee_local"           { RETURN(TEE_LOCAL); }
+      <i> "get_global"          { RETURN(GET_GLOBAL); }
+      <i> "set_global"          { RETURN(SET_GLOBAL); }
+      <i> "i32.load"            { OPCODE(I32Load); RETURN(LOAD); }
+      <i> "i64.load"            { OPCODE(I64Load); RETURN(LOAD); }
+      <i> "f32.load"            { OPCODE(F32Load); RETURN(LOAD); }
+      <i> "f64.load"            { OPCODE(F64Load); RETURN(LOAD); }
+      <i> "i32.store"           { OPCODE(I32Store); RETURN(STORE); }
+      <i> "i64.store"           { OPCODE(I64Store); RETURN(STORE); }
+      <i> "f32.store"           { OPCODE(F32Store); RETURN(STORE); }
+      <i> "f64.store"           { OPCODE(F64Store); RETURN(STORE); }
+      <i> "i32.load8_s"         { OPCODE(I32Load8S); RETURN(LOAD); }
+      <i> "i64.load8_s"         { OPCODE(I64Load8S); RETURN(LOAD); }
+      <i> "i32.load8_u"         { OPCODE(I32Load8U); RETURN(LOAD); }
+      <i> "i64.load8_u"         { OPCODE(I64Load8U); RETURN(LOAD); }
+      <i> "i32.load16_s"        { OPCODE(I32Load16S); RETURN(LOAD); }
+      <i> "i64.load16_s"        { OPCODE(I64Load16S); RETURN(LOAD); }
+      <i> "i32.load16_u"        { OPCODE(I32Load16U); RETURN(LOAD); }
+      <i> "i64.load16_u"        { OPCODE(I64Load16U); RETURN(LOAD); }
+      <i> "i64.load32_s"        { OPCODE(I64Load32S); RETURN(LOAD); }
+      <i> "i64.load32_u"        { OPCODE(I64Load32U); RETURN(LOAD); }
+      <i> "i32.store8"          { OPCODE(I32Store8); RETURN(STORE); }
+      <i> "i64.store8"          { OPCODE(I64Store8); RETURN(STORE); }
+      <i> "i32.store16"         { OPCODE(I32Store16); RETURN(STORE); }
+      <i> "i64.store16"         { OPCODE(I64Store16); RETURN(STORE); }
+      <i> "i64.store32"         { OPCODE(I64Store32); RETURN(STORE); }
+      <i> "offset=" nat         { TEXT_AT(7); RETURN(OFFSET_EQ_NAT); }
+      <i> "align=" nat          { TEXT_AT(6); RETURN(ALIGN_EQ_NAT); }
+      <i> "i32.const"           { TYPE(I32); RETURN(CONST); }
+      <i> "i64.const"           { TYPE(I64); RETURN(CONST); }
+      <i> "f32.const"           { TYPE(F32); RETURN(CONST); }
+      <i> "f64.const"           { TYPE(F64); RETURN(CONST); }
+      <i> "i32.eqz"             { OPCODE(I32Eqz); RETURN(CONVERT); }
+      <i> "i64.eqz"             { OPCODE(I64Eqz); RETURN(CONVERT); }
+      <i> "i32.clz"             { OPCODE(I32Clz); RETURN(UNARY); }
+      <i> "i64.clz"             { OPCODE(I64Clz); RETURN(UNARY); }
+      <i> "i32.ctz"             { OPCODE(I32Ctz); RETURN(UNARY); }
+      <i> "i64.ctz"             { OPCODE(I64Ctz); RETURN(UNARY); }
+      <i> "i32.popcnt"          { OPCODE(I32Popcnt); RETURN(UNARY); }
+      <i> "i64.popcnt"          { OPCODE(I64Popcnt); RETURN(UNARY); }
+      <i> "f32.neg"             { OPCODE(F32Neg); RETURN(UNARY); }
+      <i> "f64.neg"             { OPCODE(F64Neg); RETURN(UNARY); }
+      <i> "f32.abs"             { OPCODE(F32Abs); RETURN(UNARY); }
+      <i> "f64.abs"             { OPCODE(F64Abs); RETURN(UNARY); }
+      <i> "f32.sqrt"            { OPCODE(F32Sqrt); RETURN(UNARY); }
+      <i> "f64.sqrt"            { OPCODE(F64Sqrt); RETURN(UNARY); }
+      <i> "f32.ceil"            { OPCODE(F32Ceil); RETURN(UNARY); }
+      <i> "f64.ceil"            { OPCODE(F64Ceil); RETURN(UNARY); }
+      <i> "f32.floor"           { OPCODE(F32Floor); RETURN(UNARY); }
+      <i> "f64.floor"           { OPCODE(F64Floor); RETURN(UNARY); }
+      <i> "f32.trunc"           { OPCODE(F32Trunc); RETURN(UNARY); }
+      <i> "f64.trunc"           { OPCODE(F64Trunc); RETURN(UNARY); }
+      <i> "f32.nearest"         { OPCODE(F32Nearest); RETURN(UNARY); }
+      <i> "f64.nearest"         { OPCODE(F64Nearest); RETURN(UNARY); }
+      <i> "i32.add"             { OPCODE(I32Add); RETURN(BINARY); }
+      <i> "i64.add"             { OPCODE(I64Add); RETURN(BINARY); }
+      <i> "i32.sub"             { OPCODE(I32Sub); RETURN(BINARY); }
+      <i> "i64.sub"             { OPCODE(I64Sub); RETURN(BINARY); }
+      <i> "i32.mul"             { OPCODE(I32Mul); RETURN(BINARY); }
+      <i> "i64.mul"             { OPCODE(I64Mul); RETURN(BINARY); }
+      <i> "i32.div_s"           { OPCODE(I32DivS); RETURN(BINARY); }
+      <i> "i64.div_s"           { OPCODE(I64DivS); RETURN(BINARY); }
+      <i> "i32.div_u"           { OPCODE(I32DivU); RETURN(BINARY); }
+      <i> "i64.div_u"           { OPCODE(I64DivU); RETURN(BINARY); }
+      <i> "i32.rem_s"           { OPCODE(I32RemS); RETURN(BINARY); }
+      <i> "i64.rem_s"           { OPCODE(I64RemS); RETURN(BINARY); }
+      <i> "i32.rem_u"           { OPCODE(I32RemU); RETURN(BINARY); }
+      <i> "i64.rem_u"           { OPCODE(I64RemU); RETURN(BINARY); }
+      <i> "i32.and"             { OPCODE(I32And); RETURN(BINARY); }
+      <i> "i64.and"             { OPCODE(I64And); RETURN(BINARY); }
+      <i> "i32.or"              { OPCODE(I32Or); RETURN(BINARY); }
+      <i> "i64.or"              { OPCODE(I64Or); RETURN(BINARY); }
+      <i> "i32.xor"             { OPCODE(I32Xor); RETURN(BINARY); }
+      <i> "i64.xor"             { OPCODE(I64Xor); RETURN(BINARY); }
+      <i> "i32.shl"             { OPCODE(I32Shl); RETURN(BINARY); }
+      <i> "i64.shl"             { OPCODE(I64Shl); RETURN(BINARY); }
+      <i> "i32.shr_s"           { OPCODE(I32ShrS); RETURN(BINARY); }
+      <i> "i64.shr_s"           { OPCODE(I64ShrS); RETURN(BINARY); }
+      <i> "i32.shr_u"           { OPCODE(I32ShrU); RETURN(BINARY); }
+      <i> "i64.shr_u"           { OPCODE(I64ShrU); RETURN(BINARY); }
+      <i> "i32.rotl"            { OPCODE(I32Rotl); RETURN(BINARY); }
+      <i> "i64.rotl"            { OPCODE(I64Rotl); RETURN(BINARY); }
+      <i> "i32.rotr"            { OPCODE(I32Rotr); RETURN(BINARY); }
+      <i> "i64.rotr"            { OPCODE(I64Rotr); RETURN(BINARY); }
+      <i> "f32.add"             { OPCODE(F32Add); RETURN(BINARY); }
+      <i> "f64.add"             { OPCODE(F64Add); RETURN(BINARY); }
+      <i> "f32.sub"             { OPCODE(F32Sub); RETURN(BINARY); }
+      <i> "f64.sub"             { OPCODE(F64Sub); RETURN(BINARY); }
+      <i> "f32.mul"             { OPCODE(F32Mul); RETURN(BINARY); }
+      <i> "f64.mul"             { OPCODE(F64Mul); RETURN(BINARY); }
+      <i> "f32.div"             { OPCODE(F32Div); RETURN(BINARY); }
+      <i> "f64.div"             { OPCODE(F64Div); RETURN(BINARY); }
+      <i> "f32.min"             { OPCODE(F32Min); RETURN(BINARY); }
+      <i> "f64.min"             { OPCODE(F64Min); RETURN(BINARY); }
+      <i> "f32.max"             { OPCODE(F32Max); RETURN(BINARY); }
+      <i> "f64.max"             { OPCODE(F64Max); RETURN(BINARY); }
+      <i> "f32.copysign"        { OPCODE(F32Copysign); RETURN(BINARY); }
+      <i> "f64.copysign"        { OPCODE(F64Copysign); RETURN(BINARY); }
+      <i> "i32.eq"              { OPCODE(I32Eq); RETURN(COMPARE); }
+      <i> "i64.eq"              { OPCODE(I64Eq); RETURN(COMPARE); }
+      <i> "i32.ne"              { OPCODE(I32Ne); RETURN(COMPARE); }
+      <i> "i64.ne"              { OPCODE(I64Ne); RETURN(COMPARE); }
+      <i> "i32.lt_s"            { OPCODE(I32LtS); RETURN(COMPARE); }
+      <i> "i64.lt_s"            { OPCODE(I64LtS); RETURN(COMPARE); }
+      <i> "i32.lt_u"            { OPCODE(I32LtU); RETURN(COMPARE); }
+      <i> "i64.lt_u"            { OPCODE(I64LtU); RETURN(COMPARE); }
+      <i> "i32.le_s"            { OPCODE(I32LeS); RETURN(COMPARE); }
+      <i> "i64.le_s"            { OPCODE(I64LeS); RETURN(COMPARE); }
+      <i> "i32.le_u"            { OPCODE(I32LeU); RETURN(COMPARE); }
+      <i> "i64.le_u"            { OPCODE(I64LeU); RETURN(COMPARE); }
+      <i> "i32.gt_s"            { OPCODE(I32GtS); RETURN(COMPARE); }
+      <i> "i64.gt_s"            { OPCODE(I64GtS); RETURN(COMPARE); }
+      <i> "i32.gt_u"            { OPCODE(I32GtU); RETURN(COMPARE); }
+      <i> "i64.gt_u"            { OPCODE(I64GtU); RETURN(COMPARE); }
+      <i> "i32.ge_s"            { OPCODE(I32GeS); RETURN(COMPARE); }
+      <i> "i64.ge_s"            { OPCODE(I64GeS); RETURN(COMPARE); }
+      <i> "i32.ge_u"            { OPCODE(I32GeU); RETURN(COMPARE); }
+      <i> "i64.ge_u"            { OPCODE(I64GeU); RETURN(COMPARE); }
+      <i> "f32.eq"              { OPCODE(F32Eq); RETURN(COMPARE); }
+      <i> "f64.eq"              { OPCODE(F64Eq); RETURN(COMPARE); }
+      <i> "f32.ne"              { OPCODE(F32Ne); RETURN(COMPARE); }
+      <i> "f64.ne"              { OPCODE(F64Ne); RETURN(COMPARE); }
+      <i> "f32.lt"              { OPCODE(F32Lt); RETURN(COMPARE); }
+      <i> "f64.lt"              { OPCODE(F64Lt); RETURN(COMPARE); }
+      <i> "f32.le"              { OPCODE(F32Le); RETURN(COMPARE); }
+      <i> "f64.le"              { OPCODE(F64Le); RETURN(COMPARE); }
+      <i> "f32.gt"              { OPCODE(F32Gt); RETURN(COMPARE); }
+      <i> "f64.gt"              { OPCODE(F64Gt); RETURN(COMPARE); }
+      <i> "f32.ge"              { OPCODE(F32Ge); RETURN(COMPARE); }
+      <i> "f64.ge"              { OPCODE(F64Ge); RETURN(COMPARE); }
+      <i> "i64.extend_s/i32"    { OPCODE(I64ExtendSI32); RETURN(CONVERT); }
+      <i> "i64.extend_u/i32"    { OPCODE(I64ExtendUI32); RETURN(CONVERT); }
+      <i> "i32.wrap/i64"        { OPCODE(I32WrapI64); RETURN(CONVERT); }
+      <i> "i32.trunc_s/f32"     { OPCODE(I32TruncSF32); RETURN(CONVERT); }
+      <i> "i64.trunc_s/f32"     { OPCODE(I64TruncSF32); RETURN(CONVERT); }
+      <i> "i32.trunc_s/f64"     { OPCODE(I32TruncSF64); RETURN(CONVERT); }
+      <i> "i64.trunc_s/f64"     { OPCODE(I64TruncSF64); RETURN(CONVERT); }
+      <i> "i32.trunc_u/f32"     { OPCODE(I32TruncUF32); RETURN(CONVERT); }
+      <i> "i64.trunc_u/f32"     { OPCODE(I64TruncUF32); RETURN(CONVERT); }
+      <i> "i32.trunc_u/f64"     { OPCODE(I32TruncUF64); RETURN(CONVERT); }
+      <i> "i64.trunc_u/f64"     { OPCODE(I64TruncUF64); RETURN(CONVERT); }
+      <i> "f32.convert_s/i32"   { OPCODE(F32ConvertSI32); RETURN(CONVERT); }
+      <i> "f64.convert_s/i32"   { OPCODE(F64ConvertSI32); RETURN(CONVERT); }
+      <i> "f32.convert_s/i64"   { OPCODE(F32ConvertSI64); RETURN(CONVERT); }
+      <i> "f64.convert_s/i64"   { OPCODE(F64ConvertSI64); RETURN(CONVERT); }
+      <i> "f32.convert_u/i32"   { OPCODE(F32ConvertUI32); RETURN(CONVERT); }
+      <i> "f64.convert_u/i32"   { OPCODE(F64ConvertUI32); RETURN(CONVERT); }
+      <i> "f32.convert_u/i64"   { OPCODE(F32ConvertUI64); RETURN(CONVERT); }
+      <i> "f64.convert_u/i64"   { OPCODE(F64ConvertUI64); RETURN(CONVERT); }
+      <i> "f64.promote/f32"     { OPCODE(F64PromoteF32); RETURN(CONVERT); }
+      <i> "f32.demote/f64"      { OPCODE(F32DemoteF64); RETURN(CONVERT); }
+      <i> "f32.reinterpret/i32" { OPCODE(F32ReinterpretI32); RETURN(CONVERT); }
+      <i> "i32.reinterpret/f32" { OPCODE(I32ReinterpretF32); RETURN(CONVERT); }
+      <i> "f64.reinterpret/i64" { OPCODE(F64ReinterpretI64); RETURN(CONVERT); }
+      <i> "i64.reinterpret/f64" { OPCODE(I64ReinterpretF64); RETURN(CONVERT); }
+      <i> "select"              { RETURN(SELECT); }
+      <i> "unreachable"         { RETURN(UNREACHABLE); }
+      <i> "current_memory"      { RETURN(CURRENT_MEMORY); }
+      <i> "grow_memory"         { RETURN(GROW_MEMORY); }
+      <i> "type"                { RETURN(TYPE); }
+      <i> "func"                { RETURN(FUNC); }
+      <i> "param"               { RETURN(PARAM); }
+      <i> "result"              { RETURN(RESULT); }
+      <i> "local"               { RETURN(LOCAL); }
+      <i> "global"              { RETURN(GLOBAL); }
+      <i> "module"              { RETURN(MODULE); }
+      <i> "binary"              { RETURN(BIN); }
+      <i> "quote"               { RETURN(QUOTE); }
+      <i> "table"               { RETURN(TABLE); }
+      <i> "memory"              { RETURN(MEMORY); }
+      <i> "start"               { RETURN(START); }
+      <i> "elem"                { RETURN(ELEM); }
+      <i> "data"                { RETURN(DATA); }
+      <i> "offset"              { RETURN(OFFSET); }
+      <i> "import"              { RETURN(IMPORT); }
+      <i> "export"              { RETURN(EXPORT); }
+      <i> "except"              { RETURN(EXCEPT); }
+      <i> "register"            { RETURN(REGISTER); }
+      <i> "invoke"              { RETURN(INVOKE); }
+      <i> "get"                 { RETURN(GET); }
+      <i> "assert_malformed"    { RETURN(ASSERT_MALFORMED); }
+      <i> "assert_invalid"      { RETURN(ASSERT_INVALID); }
+      <i> "assert_unlinkable"   { RETURN(ASSERT_UNLINKABLE); }
+      <i> "assert_return"       { RETURN(ASSERT_RETURN); }
+      <i> "assert_return_canonical_nan" {
+                                  RETURN(ASSERT_RETURN_CANONICAL_NAN); }
+      <i> "assert_return_arithmetic_nan" {
+                                  RETURN(ASSERT_RETURN_ARITHMETIC_NAN); }
+      <i> "assert_trap"         { RETURN(ASSERT_TRAP); }
+      <i> "assert_exhaustion"   { RETURN(ASSERT_EXHAUSTION); }
+      <i> "try"                 { RETURN(TRY); }
+      <i> "catch"               { RETURN(CATCH); }
+      <i> "catch_all"           { RETURN(CATCH_ALL); }
+      <i> "throw"               { RETURN(THROW); }
+      <i> "rethrow"             { RETURN(RETHROW); }
+      <i> name                  { TEXT; RETURN(VAR); }
+
+      <i> ";;" => LINE_COMMENT  { continue; }
+      <LINE_COMMENT> "\n" => i  { NEWLINE; continue; }
+      <LINE_COMMENT> [^\n]*     { continue; }
+      <i> "(;" => BLOCK_COMMENT { COMMENT_NESTING = 1; continue; }
+      <BLOCK_COMMENT> "(;"      { COMMENT_NESTING++; continue; }
+      <BLOCK_COMMENT> ";)"      { if (--COMMENT_NESTING == 0)
+                                    BEGIN(YYCOND_INIT);
+                                  continue; }
+      <BLOCK_COMMENT> "\n"      { NEWLINE; continue; }
+      <BLOCK_COMMENT> [^]       { continue; }
+      <BLOCK_COMMENT> *         { MAYBE_MALFORMED_UTF8(" in block comment"); }
+      <i> "\n"                  { NEWLINE; continue; }
+      <i> [ \t\r]+              { continue; }
+      <i> reserved              { ERROR("unexpected token \"%.*s\"",
+                                        static_cast<int>(yyleng), yytext);
+                                  continue; }
+      <*> [^]                   { ERROR("unexpected char"); continue; }
+      <*> *                     { MAYBE_MALFORMED_UTF8(""); }
+     */
+  }
+}
+
+}  // namespace wabt
diff --git a/lib/wabt/src/wast-lexer.h b/lib/wabt/src/wast-lexer.h
new file mode 100644
index 0000000..40ecd43
--- /dev/null
+++ b/lib/wabt/src/wast-lexer.h
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2016 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef WABT_WAST_LEXER_H_
+#define WABT_WAST_LEXER_H_
+
+#include <cstddef>
+#include <cstdio>
+#include <memory>
+
+#include "common.h"
+#include "lexer-source-line-finder.h"
+
+namespace wabt {
+
+union Token;
+struct WastParser;
+class LexerSource;
+
+class WastLexer {
+ public:
+  WastLexer(std::unique_ptr<LexerSource> source, const char* filename);
+  ~WastLexer();
+
+  // Convenience functions.
+  static std::unique_ptr<WastLexer> CreateFileLexer(const char* filename);
+  static std::unique_ptr<WastLexer> CreateBufferLexer(const char* filename,
+                                                      const void* data,
+                                                      size_t size);
+
+  int GetToken(Token* lval, Location* loc, WastParser* parser);
+  Result Fill(Location* loc, WastParser* parser, size_t need);
+
+  LexerSourceLineFinder& line_finder() { return line_finder_; }
+
+ private:
+  std::unique_ptr<LexerSource> source_;
+  LexerSourceLineFinder line_finder_;
+  const char* filename_;
+  int line_;
+  int comment_nesting_;
+  size_t buffer_file_offset_; // File offset of the start of the buffer.
+  size_t line_file_offset_;   // File offset of the start of the current line.
+
+  // Lexing data needed by re2c.
+  bool eof_;
+  char* buffer_;
+  size_t buffer_size_;
+  char* marker_;
+  char* token_;
+  char* cursor_;
+  char* limit_;
+
+  WABT_DISALLOW_COPY_AND_ASSIGN(WastLexer);
+};
+
+}  // namespace wabt
+
+#endif /* WABT_WAST_LEXER_H_ */
diff --git a/lib/wabt/src/wast-parser-lexer-shared.cc b/lib/wabt/src/wast-parser-lexer-shared.cc
new file mode 100644
index 0000000..34bf7eb
--- /dev/null
+++ b/lib/wabt/src/wast-parser-lexer-shared.cc
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2016 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "wast-parser-lexer-shared.h"
+
+#include <cstdarg>
+#include <cstdio>
+#include <cstring>
+#include <string>
+
+namespace wabt {
+
+void wast_parser_error(Location* loc,
+                       WastLexer* lexer,
+                       WastParser* parser,
+                       const char* format,
+                       ...) {
+  parser->errors++;
+  va_list args;
+  va_start(args, format);
+  wast_format_error(parser->error_handler, loc, lexer, format, args);
+  va_end(args);
+}
+
+void wast_format_error(SourceErrorHandler* error_handler,
+                       const struct Location* loc,
+                       WastLexer* lexer,
+                       const char* format,
+                       va_list args) {
+  va_list args_copy;
+  va_copy(args_copy, args);
+  char fixed_buf[WABT_DEFAULT_SNPRINTF_ALLOCA_BUFSIZE];
+  char* buffer = fixed_buf;
+  size_t len = wabt_vsnprintf(fixed_buf, sizeof(fixed_buf), format, args);
+  if (len + 1 > sizeof(fixed_buf)) {
+    buffer = static_cast<char*>(alloca(len + 1));
+    len = wabt_vsnprintf(buffer, len + 1, format, args_copy);
+  }
+
+  LexerSourceLineFinder::SourceLine source_line;
+  if (loc && lexer) {
+    size_t source_line_max_length = error_handler->source_line_max_length();
+    Result result = lexer->line_finder().GetSourceLine(
+        *loc, source_line_max_length, &source_line);
+    if (WABT_FAILED(result)) {
+      // If this fails, it means that we've probably screwed up the lexer. Blow
+      // up.
+      WABT_FATAL("error getting the source line.\n");
+    }
+  }
+
+  error_handler->OnError(loc, std::string(buffer), source_line.line,
+                         source_line.column_offset);
+  va_end(args_copy);
+}
+
+void destroy_text_list(TextList* text_list) {
+  TextListNode* node = text_list->first;
+  while (node) {
+    TextListNode* next = node->next;
+    destroy_string_slice(&node->text);
+    delete node;
+    node = next;
+  }
+}
+
+void destroy_module_field_list(ModuleFieldList* fields) {
+  ModuleField* field = fields->first;
+  while (field) {
+    ModuleField* next = field->next;
+    delete field;
+    field = next;
+  }
+}
+
+}  // namespace wabt
diff --git a/lib/wabt/src/wast-parser-lexer-shared.h b/lib/wabt/src/wast-parser-lexer-shared.h
new file mode 100644
index 0000000..76be8f3
--- /dev/null
+++ b/lib/wabt/src/wast-parser-lexer-shared.h
@@ -0,0 +1,129 @@
+/*
+ * Copyright 2016 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef WABT_WAST_PARSER_LEXER_SHARED_H_
+#define WABT_WAST_PARSER_LEXER_SHARED_H_
+
+#include <cstdarg>
+#include <memory>
+
+#include "common.h"
+#include "ir.h"
+#include "source-error-handler.h"
+#include "wast-parser.h"
+
+#define WABT_WAST_PARSER_STYPE Token
+#define WABT_WAST_PARSER_LTYPE Location
+#define YYSTYPE WABT_WAST_PARSER_STYPE
+#define YYLTYPE WABT_WAST_PARSER_LTYPE
+
+namespace wabt {
+
+struct ExprList {
+  Expr* first;
+  Expr* last;
+  size_t size;
+};
+
+struct TextListNode {
+  StringSlice text;
+  struct TextListNode* next;
+};
+
+struct TextList {
+  TextListNode* first;
+  TextListNode* last;
+};
+
+struct ModuleFieldList {
+  ModuleField* first;
+  ModuleField* last;
+};
+
+union Token {
+  /* terminals */
+  StringSlice text;
+  Type type;
+  Opcode opcode;
+  Literal literal;
+
+  /* non-terminals */
+  /* some of these use pointers to keep the size of Token down; copying the
+   tokens is a hotspot when parsing large files. */
+  Action* action;
+  Block* block;
+  Command* command;
+  CommandPtrVector* commands;
+  Const const_;
+  ConstVector* consts;
+  DataSegment* data_segment;
+  ElemSegment* elem_segment;
+  Exception* exception;
+  Export* export_;
+  Expr* expr;
+  ExprList expr_list;
+  Func* func;
+  FuncSignature* func_sig;
+  FuncType* func_type;
+  Global* global;
+  Import* import;
+  Limits limits;
+  Memory* memory;
+  Module* module;
+  ModuleField* module_field;
+  ModuleFieldList module_fields;
+  ScriptModule* script_module;
+  Script* script;
+  Table* table;
+  TextList text_list;
+  TypeVector* types;
+  uint32_t u32;
+  uint64_t u64;
+  Var* var;
+  VarVector* vars;
+};
+
+struct WastParser {
+  Script* script;
+  SourceErrorHandler* error_handler;
+  int errors;
+  /* Cached pointers to reallocated parser buffers, so they don't leak. */
+  int16_t* yyssa;
+  YYSTYPE* yyvsa;
+  YYLTYPE* yylsa;
+  WastParseOptions* options;
+};
+
+int wast_lexer_lex(union Token*,
+                   struct Location*,
+                   WastLexer*,
+                   struct WastParser*);
+void WABT_PRINTF_FORMAT(4, 5) wast_parser_error(struct Location*,
+                                                WastLexer*,
+                                                struct WastParser*,
+                                                const char*,
+                                                ...);
+void wast_format_error(SourceErrorHandler*,
+                       const struct Location*,
+                       WastLexer*,
+                       const char* format,
+                       va_list);
+void destroy_text_list(TextList*);
+void destroy_module_field_list(ModuleFieldList*);
+
+}  // namespace wabt
+
+#endif /* WABT_WAST_PARSER_LEXER_SHARED_H_ */
diff --git a/lib/wabt/src/ast-parser.h b/lib/wabt/src/wast-parser.h
similarity index 65%
rename from lib/wabt/src/ast-parser.h
rename to lib/wabt/src/wast-parser.h
index 0992d16..53ba442 100644
--- a/lib/wabt/src/ast-parser.h
+++ b/lib/wabt/src/wast-parser.h
@@ -14,20 +14,24 @@
  * limitations under the License.
  */
 
-#ifndef WABT_AST_PARSER_H_
-#define WABT_AST_PARSER_H_
+#ifndef WABT_WAST_PARSER_H_
+#define WABT_WAST_PARSER_H_
 
-#include "ast-lexer.h"
-#include "common.h"
+#include "wast-lexer.h"
 
 namespace wabt {
 
 struct Script;
+class SourceErrorHandler;
 
-Result parse_ast(AstLexer* lexer,
-                 struct Script** out_script,
-                 SourceErrorHandler*);
+struct WastParseOptions {
+  bool allow_exceptions = false;
+  bool debug_parsing = false;
+};
+
+Result parse_wast(WastLexer* lexer, Script** out_script, SourceErrorHandler*,
+                  WastParseOptions* options = nullptr);
 
 }  // namespace wabt
 
-#endif /* WABT_AST_PARSER_H_ */
+#endif /* WABT_WAST_PARSER_H_ */
diff --git a/lib/wabt/src/wast-parser.y b/lib/wabt/src/wast-parser.y
new file mode 100644
index 0000000..91dd633
--- /dev/null
+++ b/lib/wabt/src/wast-parser.y
@@ -0,0 +1,2001 @@
+/*
+ * Copyright 2016 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+%{
+#include <algorithm>
+#include <cassert>
+#include <cstdarg>
+#include <cstdio>
+#include <cstdlib>
+#include <utility>
+
+#include "binary-error-handler.h"
+#include "binary-reader.h"
+#include "binary-reader-ir.h"
+#include "literal.h"
+#include "wast-parser.h"
+#include "wast-parser-lexer-shared.h"
+
+#define YYDEBUG 1
+
+#define RELOCATE_STACK(type, array, stack_base, old_size, new_size)   \
+  do {                                                                \
+    type* new_stack = new type[new_size]();                           \
+    std::move((stack_base), (stack_base) + (old_size), (new_stack));  \
+    if ((stack_base) != (array)) {                                    \
+      delete[](stack_base);                                           \
+    } else {                                                          \
+      for (size_t i = 0; i < (old_size); ++i) {                       \
+        (stack_base)[i].~type();                                      \
+      }                                                               \
+    }                                                                 \
+    /* Cache the pointer in the parser struct to be deleted later. */ \
+    parser->array = (stack_base) = new_stack;                         \
+  } while (0)
+
+#define yyoverflow(message, ss, ss_size, vs, vs_size, ls, ls_size, new_size) \
+  do {                                                                       \
+    size_t old_size = *(new_size);                                           \
+    *(new_size) *= 2;                                                        \
+    RELOCATE_STACK(yytype_int16, yyssa, *(ss), old_size, *(new_size));       \
+    RELOCATE_STACK(YYSTYPE, yyvsa, *(vs), old_size, *(new_size));            \
+    RELOCATE_STACK(YYLTYPE, yylsa, *(ls), old_size, *(new_size));            \
+  } while (0)
+
+#define DUPTEXT(dst, src)                                \
+  (dst).start = wabt_strndup((src).start, (src).length); \
+  (dst).length = (src).length
+
+#define YYLLOC_DEFAULT(Current, Rhs, N)                       \
+  do                                                          \
+    if (N) {                                                  \
+      (Current).filename = YYRHSLOC(Rhs, 1).filename;         \
+      (Current).line = YYRHSLOC(Rhs, 1).line;                 \
+      (Current).first_column = YYRHSLOC(Rhs, 1).first_column; \
+      if (YYRHSLOC(Rhs, N).line == (Current).line)            \
+        (Current).last_column = YYRHSLOC(Rhs, N).last_column; \
+      else                                                    \
+        (Current).last_column = YYRHSLOC(Rhs, 1).last_column; \
+    } else {                                                  \
+      (Current).filename = nullptr;                           \
+      (Current).line = YYRHSLOC(Rhs, 0).line;                 \
+      (Current).first_column = (Current).last_column =        \
+          YYRHSLOC(Rhs, 0).last_column;                       \
+    }                                                         \
+  while (0)
+
+#define CHECK_END_LABEL(loc, begin_label, end_label)                       \
+  do {                                                                     \
+    if (!string_slice_is_empty(&(end_label))) {                            \
+      if (string_slice_is_empty(&(begin_label))) {                         \
+        wast_parser_error(&loc, lexer, parser,                             \
+                          "unexpected label \"" PRIstringslice "\"",       \
+                          WABT_PRINTF_STRING_SLICE_ARG(end_label));        \
+      } else if (!string_slices_are_equal(&(begin_label), &(end_label))) { \
+        wast_parser_error(&loc, lexer, parser,                             \
+                          "mismatching label \"" PRIstringslice            \
+                          "\" != \"" PRIstringslice "\"",                  \
+                          WABT_PRINTF_STRING_SLICE_ARG(begin_label),       \
+                          WABT_PRINTF_STRING_SLICE_ARG(end_label));        \
+      }                                                                    \
+      destroy_string_slice(&(end_label));                                  \
+    }                                                                      \
+  } while (0)
+
+#define CHECK_ALLOW_EXCEPTIONS(loc, opcode_name)                      \
+  do {                                                                \
+    if (!parser->options->allow_exceptions) {                         \
+      wast_parser_error(loc, lexer, parser, "opcode not allowed: %s", \
+                        opcode_name);                                 \
+    }                                                                 \
+ } while (0)
+
+#define YYMALLOC(size) new char [size]
+#define YYFREE(p) delete [] (p)
+
+#define USE_NATURAL_ALIGNMENT (~0)
+
+namespace wabt {
+
+static bool is_power_of_two(uint32_t x) {
+  return x && ((x & (x - 1)) == 0);
+}
+
+static ExprList join_exprs1(Location* loc, Expr* expr1);
+static ExprList join_exprs2(Location* loc, ExprList* expr1, Expr* expr2);
+static ExprList join_expr_lists(ExprList* expr1, ExprList* expr2);
+
+static Result parse_const(Type type,
+                          LiteralType literal_type,
+                          const char* s,
+                          const char* end,
+                          Const* out);
+static void dup_text_list(TextList* text_list,
+                          char** out_data,
+                          size_t* out_size);
+
+static void reverse_bindings(TypeVector*, BindingHash*);
+
+static bool is_empty_signature(const FuncSignature* sig);
+
+static void check_import_ordering(Location* loc,
+                                  WastLexer* lexer,
+                                  WastParser* parser,
+                                  Module* module,
+                                  ModuleField* first);
+static void append_module_fields(Module*, ModuleField*);
+
+class BinaryErrorHandlerModule : public BinaryErrorHandler {
+ public:
+  BinaryErrorHandlerModule(Location* loc, WastLexer* lexer, WastParser* parser);
+  bool OnError(Offset offset, const std::string& error) override;
+
+ private:
+  Location* loc_;
+  WastLexer* lexer_;
+  WastParser* parser_;
+};
+
+#define wabt_wast_parser_lex(...) lexer->GetToken(__VA_ARGS__, parser)
+#define wabt_wast_parser_error wast_parser_error
+
+%}
+
+%define api.prefix {wabt_wast_parser_}
+%define api.pure true
+%define api.value.type {::wabt::Token}
+%define api.token.prefix {WABT_TOKEN_TYPE_}
+%define parse.error verbose
+%parse-param {::wabt::WastLexer* lexer} {::wabt::WastParser* parser}
+%locations
+
+%token LPAR "("
+%token RPAR ")"
+%token NAT INT FLOAT TEXT VAR VALUE_TYPE ANYFUNC MUT
+%token NOP DROP BLOCK END IF THEN ELSE LOOP BR BR_IF BR_TABLE
+%token TRY CATCH CATCH_ALL THROW RETHROW
+%token CALL CALL_INDIRECT RETURN
+%token GET_LOCAL SET_LOCAL TEE_LOCAL GET_GLOBAL SET_GLOBAL
+%token LOAD STORE OFFSET_EQ_NAT ALIGN_EQ_NAT
+%token CONST UNARY BINARY COMPARE CONVERT SELECT
+%token UNREACHABLE CURRENT_MEMORY GROW_MEMORY
+%token FUNC START TYPE PARAM RESULT LOCAL GLOBAL
+%token TABLE ELEM MEMORY DATA OFFSET IMPORT EXPORT EXCEPT
+%token MODULE BIN QUOTE
+%token REGISTER INVOKE GET
+%token ASSERT_MALFORMED ASSERT_INVALID ASSERT_UNLINKABLE
+%token ASSERT_RETURN ASSERT_RETURN_CANONICAL_NAN ASSERT_RETURN_ARITHMETIC_NAN
+%token ASSERT_TRAP ASSERT_EXHAUSTION
+%token EOF 0 "EOF"
+
+%type<opcode> BINARY COMPARE CONVERT LOAD STORE UNARY
+%type<text> ALIGN_EQ_NAT OFFSET_EQ_NAT TEXT VAR
+%type<type> SELECT
+%type<type> CONST VALUE_TYPE
+%type<literal> NAT INT FLOAT
+
+%type<action> action
+%type<block> block
+%type<command> assertion cmd
+%type<commands> cmd_list
+%type<const_> const
+%type<consts> const_list
+%type<exception> exception
+%type<export_> export_desc inline_export
+%type<expr> plain_instr block_instr
+%type<expr> try_  try_instr_list
+%type<expr_list> catch_instr catch_list catch_instr_list
+%type<expr_list> instr instr_list expr expr1 expr_list if_ if_block const_expr offset
+%type<func> func_fields_body func_fields_body1 func_result_body func_body func_body1
+%type<func> func_fields_import func_fields_import1 func_fields_import_result
+%type<func_sig> func_sig func_sig_result func_type
+%type<global> global_type
+%type<import> import_desc inline_import
+%type<limits> limits
+%type<memory> memory_sig
+%type<module> module module_fields_opt module_fields inline_module
+%type<module_field> type_def start data elem import export exception_field
+%type<module_fields> func func_fields table table_fields memory memory_fields global global_fields module_field
+%type<script_module> script_module
+%type<literal> literal
+%type<script> script
+%type<table> table_sig
+%type<text> bind_var bind_var_opt labeling_opt quoted_text
+%type<text_list> text_list text_list_opt
+%type<types> block_sig value_type_list
+%type<u32> align_opt
+%type<u64> nat offset_opt
+%type<vars> var_list
+%type<var> type_use var script_var_opt
+
+/* These non-terminals use the types below that have destructors, but the
+ * memory is shared with the lexer, so should not be destroyed. */
+%destructor {} ALIGN_EQ_NAT OFFSET_EQ_NAT TEXT VAR NAT INT FLOAT
+%destructor { destroy_string_slice(&$$); } <text>
+%destructor { destroy_string_slice(&$$.text); } <literal>
+%destructor { delete $$; } <action>
+%destructor { delete $$; } <block>
+%destructor { delete $$; } <command>
+%destructor { delete $$; } <commands>
+%destructor { delete $$; } <consts>
+%destructor { delete $$; } <export_>
+%destructor { delete $$; } <expr>
+%destructor { DestroyExprList($$.first); } <expr_list>
+%destructor { destroy_module_field_list(&$$); } <module_fields>
+%destructor { delete $$; } <func>
+%destructor { delete $$; } <func_sig>
+%destructor { delete $$; } <global>
+%destructor { delete $$; } <import>
+%destructor { delete $$; } <memory>
+%destructor { delete $$; } <module>
+%destructor { delete $$; } <script_module>
+%destructor { delete $$; } <script>
+%destructor { destroy_text_list(&$$); } <text_list>
+%destructor { delete $$; } <types>
+%destructor { delete $$; } <var>
+%destructor { delete $$; } <vars>
+
+
+%nonassoc LOW
+%nonassoc VAR
+
+%start script_start
+
+%%
+
+/* Auxiliaries */
+
+text_list :
+    TEXT {
+      TextListNode* node = new TextListNode();
+      DUPTEXT(node->text, $1);
+      node->next = nullptr;
+      $$.first = $$.last = node;
+    }
+  | text_list TEXT {
+      $$ = $1;
+      TextListNode* node = new TextListNode();
+      DUPTEXT(node->text, $2);
+      node->next = nullptr;
+      $$.last->next = node;
+      $$.last = node;
+    }
+;
+text_list_opt :
+    /* empty */ { $$.first = $$.last = nullptr; }
+  | text_list
+;
+
+quoted_text :
+    TEXT {
+      TextListNode node;
+      node.text = $1;
+      node.next = nullptr;
+      TextList text_list;
+      text_list.first = &node;
+      text_list.last = &node;
+      char* data;
+      size_t size;
+      dup_text_list(&text_list, &data, &size);
+      $$.start = data;
+      $$.length = size;
+    }
+;
+
+/* Types */
+
+value_type_list :
+    /* empty */ { $$ = new TypeVector(); }
+  | value_type_list VALUE_TYPE {
+      $$ = $1;
+      $$->push_back($2);
+    }
+;
+elem_type :
+    ANYFUNC {}
+;
+global_type :
+    VALUE_TYPE {
+      $$ = new Global();
+      $$->type = $1;
+      $$->mutable_ = false;
+    }
+  | LPAR MUT VALUE_TYPE RPAR {
+      $$ = new Global();
+      $$->type = $3;
+      $$->mutable_ = true;
+    }
+;
+
+func_type :
+    LPAR FUNC func_sig RPAR { $$ = $3; }
+;
+
+func_sig :
+    func_sig_result
+  | LPAR PARAM value_type_list RPAR func_sig {
+      $$ = $5;
+      $$->param_types.insert($$->param_types.begin(), $3->begin(), $3->end());
+      delete $3;
+    }
+  | LPAR PARAM bind_var VALUE_TYPE RPAR func_sig {
+      $$ = $6;
+      $$->param_types.insert($$->param_types.begin(), $4);
+      // Ignore bind_var.
+      destroy_string_slice(&$3);
+    }
+;
+
+func_sig_result :
+    /* empty */ { $$ = new FuncSignature(); }
+  | LPAR RESULT value_type_list RPAR func_sig_result {
+      $$ = $5;
+      $$->result_types.insert($$->result_types.begin(), $3->begin(), $3->end());
+      delete $3;
+    }
+;
+
+table_sig :
+    limits elem_type {
+      $$ = new Table();
+      $$->elem_limits = $1;
+    }
+;
+memory_sig :
+    limits {
+      $$ = new Memory();
+      $$->page_limits = $1;
+    }
+;
+limits :
+    nat {
+      $$.has_max = false;
+      $$.initial = $1;
+      $$.max = 0;
+    }
+  | nat nat {
+      $$.has_max = true;
+      $$.initial = $1;
+      $$.max = $2;
+    }
+;
+type_use :
+    LPAR TYPE var RPAR { $$ = $3; }
+;
+
+/* Expressions */
+
+nat :
+    NAT {
+      if (WABT_FAILED(parse_uint64($1.text.start,
+                                        $1.text.start + $1.text.length, &$$))) {
+        wast_parser_error(&@1, lexer, parser,
+                          "invalid int " PRIstringslice "\"",
+                          WABT_PRINTF_STRING_SLICE_ARG($1.text));
+      }
+    }
+;
+
+literal :
+    NAT {
+      $$.type = $1.type;
+      DUPTEXT($$.text, $1.text);
+    }
+  | INT {
+      $$.type = $1.type;
+      DUPTEXT($$.text, $1.text);
+    }
+  | FLOAT {
+      $$.type = $1.type;
+      DUPTEXT($$.text, $1.text);
+    }
+;
+
+var :
+    nat {
+      $$ = new Var($1);
+      $$->loc = @1;
+    }
+  | VAR {
+      StringSlice name;
+      DUPTEXT(name, $1);
+      $$ = new Var(name);
+      $$->loc = @1;
+    }
+;
+var_list :
+    /* empty */ { $$ = new VarVector(); }
+  | var_list var {
+      $$ = $1;
+      $$->emplace_back(std::move(*$2));
+      delete $2;
+    }
+;
+bind_var_opt :
+    /* empty */ { WABT_ZERO_MEMORY($$); }
+  | bind_var
+;
+bind_var :
+    VAR { DUPTEXT($$, $1); }
+;
+
+labeling_opt :
+    /* empty */ %prec LOW { WABT_ZERO_MEMORY($$); }
+  | bind_var
+;
+
+offset_opt :
+    /* empty */ { $$ = 0; }
+  | OFFSET_EQ_NAT {
+      uint64_t offset64;
+      if (WABT_FAILED(parse_int64($1.start, $1.start + $1.length, &offset64,
+                                  ParseIntType::SignedAndUnsigned))) {
+        wast_parser_error(&@1, lexer, parser,
+                          "invalid offset \"" PRIstringslice "\"",
+                          WABT_PRINTF_STRING_SLICE_ARG($1));
+      }
+      if (offset64 > UINT32_MAX) {
+        wast_parser_error(&@1, lexer, parser,
+                          "offset must be less than or equal to 0xffffffff");
+      }
+      $$ = static_cast<uint32_t>(offset64);
+    }
+;
+align_opt :
+    /* empty */ { $$ = USE_NATURAL_ALIGNMENT; }
+  | ALIGN_EQ_NAT {
+      if (WABT_FAILED(parse_int32($1.start, $1.start + $1.length, &$$,
+                                  ParseIntType::UnsignedOnly))) {
+        wast_parser_error(&@1, lexer, parser,
+                          "invalid alignment \"" PRIstringslice "\"",
+                          WABT_PRINTF_STRING_SLICE_ARG($1));
+      }
+
+      if ($$ != WABT_USE_NATURAL_ALIGNMENT && !is_power_of_two($$)) {
+        wast_parser_error(&@1, lexer, parser, "alignment must be power-of-two");
+      }
+    }
+;
+
+instr :
+    plain_instr { $$ = join_exprs1(&@1, $1); }
+  | block_instr { $$ = join_exprs1(&@1, $1); }
+  | expr
+;
+
+plain_instr :
+    UNREACHABLE {
+      $$ = Expr::CreateUnreachable();
+    }
+  | NOP {
+      $$ = Expr::CreateNop();
+    }
+  | DROP {
+      $$ = Expr::CreateDrop();
+    }
+  | SELECT {
+      $$ = Expr::CreateSelect();
+    }
+  | BR var {
+      $$ = Expr::CreateBr(std::move(*$2));
+      delete $2;
+    }
+  | BR_IF var {
+      $$ = Expr::CreateBrIf(std::move(*$2));
+      delete $2;
+    }
+  | BR_TABLE var_list var {
+      $$ = Expr::CreateBrTable($2, std::move(*$3));
+      delete $3;
+    }
+  | RETURN {
+      $$ = Expr::CreateReturn();
+    }
+  | CALL var {
+      $$ = Expr::CreateCall(std::move(*$2));
+      delete $2;
+    }
+  | CALL_INDIRECT var {
+      $$ = Expr::CreateCallIndirect(std::move(*$2));
+      delete $2;
+    }
+  | GET_LOCAL var {
+      $$ = Expr::CreateGetLocal(std::move(*$2));
+      delete $2;
+    }
+  | SET_LOCAL var {
+      $$ = Expr::CreateSetLocal(std::move(*$2));
+      delete $2;
+    }
+  | TEE_LOCAL var {
+      $$ = Expr::CreateTeeLocal(std::move(*$2));
+      delete $2;
+    }
+  | GET_GLOBAL var {
+      $$ = Expr::CreateGetGlobal(std::move(*$2));
+      delete $2;
+    }
+  | SET_GLOBAL var {
+      $$ = Expr::CreateSetGlobal(std::move(*$2));
+      delete $2;
+    }
+  | LOAD offset_opt align_opt {
+      $$ = Expr::CreateLoad($1, $3, $2);
+    }
+  | STORE offset_opt align_opt {
+      $$ = Expr::CreateStore($1, $3, $2);
+    }
+  | CONST literal {
+      Const const_;
+      WABT_ZERO_MEMORY(const_);
+      const_.loc = @1;
+      if (WABT_FAILED(parse_const($1, $2.type, $2.text.start,
+                                  $2.text.start + $2.text.length, &const_))) {
+        wast_parser_error(&@2, lexer, parser,
+                          "invalid literal \"" PRIstringslice "\"",
+                          WABT_PRINTF_STRING_SLICE_ARG($2.text));
+      }
+      delete [] $2.text.start;
+      $$ = Expr::CreateConst(const_);
+    }
+  | UNARY {
+      $$ = Expr::CreateUnary($1);
+    }
+  | BINARY {
+      $$ = Expr::CreateBinary($1);
+    }
+  | COMPARE {
+      $$ = Expr::CreateCompare($1);
+    }
+  | CONVERT {
+      $$ = Expr::CreateConvert($1);
+    }
+  | CURRENT_MEMORY {
+      $$ = Expr::CreateCurrentMemory();
+    }
+  | GROW_MEMORY {
+      $$ = Expr::CreateGrowMemory();
+    }
+  | throw_check var {
+      $$ = Expr::CreateThrow(std::move(*$2));
+      delete $2;
+    }
+  | rethrow_check var {
+      $$ = Expr::CreateRethrow(std::move(*$2));
+      delete $2;
+    }
+;
+
+block_instr :
+    BLOCK labeling_opt block END labeling_opt {
+      $$ = Expr::CreateBlock($3);
+      $$->block->label = $2;
+      CHECK_END_LABEL(@5, $$->block->label, $5);
+    }
+  | LOOP labeling_opt block END labeling_opt {
+      $$ = Expr::CreateLoop($3);
+      $$->loop->label = $2;
+      CHECK_END_LABEL(@5, $$->loop->label, $5);
+    }
+  | IF labeling_opt block END labeling_opt {
+      $$ = Expr::CreateIf($3, nullptr);
+      $$->if_.true_->label = $2;
+      CHECK_END_LABEL(@5, $$->if_.true_->label, $5);
+    }
+  | IF labeling_opt block ELSE labeling_opt instr_list END labeling_opt {
+      $$ = Expr::CreateIf($3, $6.first);
+      $$->if_.true_->label = $2;
+      CHECK_END_LABEL(@5, $$->if_.true_->label, $5);
+      CHECK_END_LABEL(@8, $$->if_.true_->label, $8);
+    }
+  | try_check labeling_opt block catch_instr_list END labeling_opt {
+      $3->label = $2;
+      $$ = Expr::CreateTry($3, $4.first);
+      CHECK_END_LABEL(@6, $3->label, $6);
+    }
+;
+
+block_sig :
+    LPAR RESULT value_type_list RPAR { $$ = $3; }
+;
+block :
+    block_sig block {
+      $$ = $2;
+      $$->sig.insert($$->sig.end(), $1->begin(), $1->end());
+      delete $1;
+    }
+  | instr_list {
+      $$ = new Block();
+      $$->first = $1.first;
+    }
+;
+
+catch_instr :
+    CATCH var instr_list {
+      Expr* expr = Expr::CreateCatch(std::move(*$2), $3.first);
+      delete $2;
+      $$ = join_exprs1(&@1, expr);
+    }
+  | CATCH_ALL instr_list {
+      Expr* expr = Expr::CreateCatchAll($2.first);
+      $$ = join_exprs1(&@1, expr);
+    }
+  ;
+
+catch_instr_list :
+    catch_instr
+  | catch_instr catch_instr_list {
+      $$ = join_expr_lists(&$1, &$2);
+    }
+  ;
+
+expr :
+    LPAR expr1 RPAR { $$ = $2; }
+;
+
+expr1 :
+    plain_instr expr_list {
+      $$ = join_exprs2(&@1, &$2, $1);
+    }
+  | BLOCK labeling_opt block {
+      Expr* expr = Expr::CreateBlock($3);
+      expr->block->label = $2;
+      $$ = join_exprs1(&@1, expr);
+    }
+  | LOOP labeling_opt block {
+      Expr* expr = Expr::CreateLoop($3);
+      expr->loop->label = $2;
+      $$ = join_exprs1(&@1, expr);
+    }
+  | IF labeling_opt if_block {
+      $$ = $3;
+      Expr* if_ = $3.last;
+      assert(if_->type == ExprType::If);
+      if_->if_.true_->label = $2;
+    }
+  | try_check labeling_opt try_ {
+      Block* block = $3->try_block.block;
+      block->label = $2;
+      $$ = join_exprs1(&@1, $3);
+    }
+  ;
+
+try_ :
+    block_sig try_ {
+      $$ = $2;
+      Block* block = $$->try_block.block;
+      block->sig.insert(block->sig.end(), $1->begin(), $1->end());
+      delete $1;
+    }
+  | try_instr_list
+  ;
+
+try_instr_list :
+      catch_list {
+        Block* block = new Block();
+        $$ = Expr::CreateTry(block, $1.first);
+      }
+    | instr try_instr_list {
+        $$ = $2;
+        Block* block = $$->try_block.block;
+        if ($1.last) {
+          $1.last->next = block->first;
+        } else {
+          $1.first->next = block->first;
+        }
+        block->first = $1.first;
+      }
+    ;
+
+catch_list :
+    LPAR catch_instr RPAR {
+      $$ = $2;
+    }
+  | LPAR catch_instr RPAR catch_list {
+      $$ = join_expr_lists(&$2, &$4);
+    }
+  ;
+    
+if_block :
+    block_sig if_block {
+      Expr* if_ = $2.last;
+      assert(if_->type == ExprType::If);
+      $$ = $2;
+      Block* true_ = if_->if_.true_;
+      true_->sig.insert(true_->sig.end(), $1->begin(), $1->end());
+      delete $1;
+    }
+  | if_
+;
+if_ :
+    LPAR THEN instr_list RPAR LPAR ELSE instr_list RPAR {
+      Expr* expr = Expr::CreateIf(new Block($3.first), $7.first);
+      $$ = join_exprs1(&@1, expr);
+    }
+  | LPAR THEN instr_list RPAR {
+      Expr* expr = Expr::CreateIf(new Block($3.first), nullptr);
+      $$ = join_exprs1(&@1, expr);
+    }
+  | expr LPAR THEN instr_list RPAR LPAR ELSE instr_list RPAR {
+      Expr* expr = Expr::CreateIf(new Block($4.first), $8.first);
+      $$ = join_exprs2(&@1, &$1, expr);
+    }
+  | expr LPAR THEN instr_list RPAR {
+      Expr* expr = Expr::CreateIf(new Block($4.first), nullptr);
+      $$ = join_exprs2(&@1, &$1, expr);
+    }
+  | expr expr expr {
+      Expr* expr = Expr::CreateIf(new Block($2.first), $3.first);
+      $$ = join_exprs2(&@1, &$1, expr);
+    }
+  | expr expr {
+      Expr* expr = Expr::CreateIf(new Block($2.first), nullptr);
+      $$ = join_exprs2(&@1, &$1, expr);
+    }
+;
+
+rethrow_check :
+    RETHROW {
+     CHECK_ALLOW_EXCEPTIONS(&@1, "rethrow");
+    }
+  ;
+throw_check :
+    THROW {
+      CHECK_ALLOW_EXCEPTIONS(&@1, "throw");
+    }
+  ;
+
+try_check :
+    TRY {
+      CHECK_ALLOW_EXCEPTIONS(&@1, "try");      
+    }
+  ;
+
+instr_list :
+    /* empty */ { WABT_ZERO_MEMORY($$); }
+  | instr instr_list {
+      $$.first = $1.first;
+      $1.last->next = $2.first;
+      $$.last = $2.last ? $2.last : $1.last;
+      $$.size = $1.size + $2.size;
+    }
+;
+expr_list :
+    /* empty */ { WABT_ZERO_MEMORY($$); }
+  | expr expr_list {
+      $$.first = $1.first;
+      $1.last->next = $2.first;
+      $$.last = $2.last ? $2.last : $1.last;
+      $$.size = $1.size + $2.size;
+    }
+
+const_expr :
+    instr_list
+;
+
+/* Exceptions */
+exception :
+    LPAR EXCEPT bind_var_opt value_type_list RPAR {
+      $$ = new Exception();
+      $$->name = $3;
+      $$->sig = std::move(*$4);
+      delete $4;
+    }
+  ;
+exception_field :
+    exception {
+      $$ = new ModuleField(ModuleFieldType::Except);
+      $$->loc = @1;
+      $$->except = $1;
+    }
+  ;
+    
+/* Functions */
+func :
+    LPAR FUNC bind_var_opt func_fields RPAR {
+      $$ = $4;
+      ModuleField* main = $$.first;
+      main->loc = @2;
+      if (main->type == ModuleFieldType::Func) {
+        main->func->name = $3;
+      } else {
+        assert(main->type == ModuleFieldType::Import);
+        main->import->func->name = $3;
+      }
+    }
+;
+
+func_fields :
+    type_use func_fields_body {
+      ModuleField* field = new ModuleField(ModuleFieldType::Func);
+      field->func = $2;
+      field->func->decl.has_func_type = true;
+      field->func->decl.type_var = std::move(*$1);
+      delete $1;
+      $$.first = $$.last = field;
+    }
+  | func_fields_body {
+      ModuleField* field = new ModuleField(ModuleFieldType::Func);
+      field->func = $1;
+      $$.first = $$.last = field;
+    }
+  | inline_import type_use func_fields_import {
+      ModuleField* field = new ModuleField(ModuleFieldType::Import);
+      field->loc = @1;
+      field->import = $1;
+      field->import->kind = ExternalKind::Func;
+      field->import->func = $3;
+      field->import->func->decl.has_func_type = true;
+      field->import->func->decl.type_var = std::move(*$2);
+      delete $2;
+      $$.first = $$.last = field;
+    }
+  | inline_import func_fields_import {
+      ModuleField* field = new ModuleField(ModuleFieldType::Import);
+      field->loc = @1;
+      field->import = $1;
+      field->import->kind = ExternalKind::Func;
+      field->import->func = $2;
+      $$.first = $$.last = field;
+    }
+  | inline_export func_fields {
+      ModuleField* field = new ModuleField(ModuleFieldType::Export);
+      field->loc = @1;
+      field->export_ = $1;
+      field->export_->kind = ExternalKind::Func;
+      $$.first = $2.first;
+      $$.last = $2.last->next = field;
+    }
+;
+
+func_fields_import :
+    func_fields_import1 {
+      $$ = $1;
+      reverse_bindings(&$$->decl.sig.param_types, &$$->param_bindings);
+    }
+;
+
+func_fields_import1 :
+    func_fields_import_result
+  | LPAR PARAM value_type_list RPAR func_fields_import1 {
+      $$ = $5;
+      $$->decl.sig.param_types.insert($$->decl.sig.param_types.begin(),
+                                      $3->begin(), $3->end());
+      delete $3;
+    }
+  | LPAR PARAM bind_var VALUE_TYPE RPAR func_fields_import1 {
+      $$ = $6;
+      $$->param_bindings.emplace(string_slice_to_string($3),
+                                 Binding(@3, $$->decl.sig.param_types.size()));
+      destroy_string_slice(&$3);
+      $$->decl.sig.param_types.insert($$->decl.sig.param_types.begin(), $4);
+    }
+;
+
+func_fields_import_result :
+    /* empty */ { $$ = new Func(); }
+  | LPAR RESULT value_type_list RPAR func_fields_import_result {
+      $$ = $5;
+      $$->decl.sig.result_types.insert($$->decl.sig.result_types.begin(),
+                                       $3->begin(), $3->end());
+      delete $3;
+    }
+;
+
+func_fields_body :
+    func_fields_body1 {
+      $$ = $1;
+      reverse_bindings(&$$->decl.sig.param_types, &$$->param_bindings);
+    }
+;
+
+func_fields_body1 :
+    func_result_body
+  | LPAR PARAM value_type_list RPAR func_fields_body1 {
+      $$ = $5;
+      $$->decl.sig.param_types.insert($$->decl.sig.param_types.begin(),
+                                      $3->begin(), $3->end());
+      delete $3;
+    }
+  | LPAR PARAM bind_var VALUE_TYPE RPAR func_fields_body1 {
+      $$ = $6;
+      $$->param_bindings.emplace(string_slice_to_string($3),
+                                 Binding(@3, $$->decl.sig.param_types.size()));
+      destroy_string_slice(&$3);
+      $$->decl.sig.param_types.insert($$->decl.sig.param_types.begin(), $4);
+    }
+;
+
+func_result_body :
+    func_body
+  | LPAR RESULT value_type_list RPAR func_result_body {
+      $$ = $5;
+      $$->decl.sig.result_types.insert($$->decl.sig.result_types.begin(),
+                                       $3->begin(), $3->end());
+      delete $3;
+    }
+;
+
+func_body :
+    func_body1 {
+      $$ = $1;
+      reverse_bindings(&$$->local_types, &$$->local_bindings);
+    }
+;
+
+func_body1 :
+    instr_list {
+      $$ = new Func();
+      $$->first_expr = $1.first;
+    }
+  | LPAR LOCAL value_type_list RPAR func_body1 {
+      $$ = $5;
+      $$->local_types.insert($$->local_types.begin(), $3->begin(), $3->end());
+      delete $3;
+    }
+  | LPAR LOCAL bind_var VALUE_TYPE RPAR func_body1 {
+      $$ = $6;
+      $$->local_bindings.emplace(string_slice_to_string($3),
+                                 Binding(@3, $$->local_types.size()));
+      destroy_string_slice(&$3);
+      $$->local_types.insert($$->local_types.begin(), $4);
+    }
+;
+
+/* Tables & Memories */
+
+offset :
+    LPAR OFFSET const_expr RPAR {
+      $$ = $3;
+    }
+  | expr
+;
+
+elem :
+    LPAR ELEM var offset var_list RPAR {
+      $$ = new ModuleField(ModuleFieldType::ElemSegment);
+      $$->loc = @2;
+      $$->elem_segment = new ElemSegment();
+      $$->elem_segment->table_var = std::move(*$3);
+      delete $3;
+      $$->elem_segment->offset = $4.first;
+      $$->elem_segment->vars = std::move(*$5);
+      delete $5;
+    }
+  | LPAR ELEM offset var_list RPAR {
+      $$ = new ModuleField(ModuleFieldType::ElemSegment);
+      $$->loc = @2;
+      $$->elem_segment = new ElemSegment();
+      $$->elem_segment->table_var.loc = @2;
+      $$->elem_segment->table_var.type = VarType::Index;
+      $$->elem_segment->table_var.index = 0;
+      $$->elem_segment->offset = $3.first;
+      $$->elem_segment->vars = std::move(*$4);
+      delete $4;
+    }
+;
+
+table :
+    LPAR TABLE bind_var_opt table_fields RPAR {
+      $$ = $4;
+      ModuleField* main = $$.first;
+      main->loc = @2;
+      if (main->type == ModuleFieldType::Table) {
+        main->table->name = $3;
+      } else {
+        assert(main->type == ModuleFieldType::Import);
+        main->import->table->name = $3;
+      }
+    }
+;
+
+table_fields :
+    table_sig {
+      ModuleField* field = new ModuleField(ModuleFieldType::Table);
+      field->loc = @1;
+      field->table = $1;
+      $$.first = $$.last = field;
+    }
+  | inline_import table_sig {
+      ModuleField* field = new ModuleField(ModuleFieldType::Import);
+      field->loc = @1;
+      field->import = $1;
+      field->import->kind = ExternalKind::Table;
+      field->import->table = $2;
+      $$.first = $$.last = field;
+    }
+  | inline_export table_fields {
+      ModuleField* field = new ModuleField(ModuleFieldType::Export);
+      field->loc = @1;
+      field->export_ = $1;
+      field->export_->kind = ExternalKind::Table;
+      $$.first = $2.first;
+      $$.last = $2.last->next = field;
+    }
+  | elem_type LPAR ELEM var_list RPAR {
+      ModuleField* table_field = new ModuleField(ModuleFieldType::Table);
+      Table* table = table_field->table = new Table();
+      table->elem_limits.initial = $4->size();
+      table->elem_limits.max = $4->size();
+      table->elem_limits.has_max = true;
+      ModuleField* elem_field = new ModuleField(ModuleFieldType::ElemSegment);
+      elem_field->loc = @3;
+      ElemSegment* elem_segment = elem_field->elem_segment = new ElemSegment();
+      elem_segment->table_var = Var(kInvalidIndex);
+      elem_segment->offset = Expr::CreateConst(Const(Const::I32(), 0));
+      elem_segment->offset->loc = @3;
+      elem_segment->vars = std::move(*$4);
+      delete $4;
+      $$.first = table_field;
+      $$.last = table_field->next = elem_field;
+    }
+;
+
+data :
+    LPAR DATA var offset text_list_opt RPAR {
+      $$ = new ModuleField(ModuleFieldType::DataSegment);
+      $$->loc = @2;
+      $$->data_segment = new DataSegment();
+      $$->data_segment->memory_var = std::move(*$3);
+      delete $3;
+      $$->data_segment->offset = $4.first;
+      dup_text_list(&$5, &$$->data_segment->data, &$$->data_segment->size);
+      destroy_text_list(&$5);
+    }
+  | LPAR DATA offset text_list_opt RPAR {
+      $$ = new ModuleField(ModuleFieldType::DataSegment);
+      $$->loc = @2;
+      $$->data_segment = new DataSegment();
+      $$->data_segment->memory_var.loc = @2;
+      $$->data_segment->memory_var.type = VarType::Index;
+      $$->data_segment->memory_var.index = 0;
+      $$->data_segment->offset = $3.first;
+      dup_text_list(&$4, &$$->data_segment->data, &$$->data_segment->size);
+      destroy_text_list(&$4);
+    }
+;
+
+memory :
+    LPAR MEMORY bind_var_opt memory_fields RPAR {
+      $$ = $4;
+      ModuleField* main = $$.first;
+      main->loc = @2;
+      if (main->type == ModuleFieldType::Memory) {
+        main->memory->name = $3;
+      } else {
+        assert(main->type == ModuleFieldType::Import);
+        main->import->memory->name = $3;
+      }
+    }
+;
+
+memory_fields :
+    memory_sig {
+      ModuleField* field = new ModuleField(ModuleFieldType::Memory);
+      field->memory = $1;
+      $$.first = $$.last = field;
+    }
+  | inline_import memory_sig {
+      ModuleField* field = new ModuleField(ModuleFieldType::Import);
+      field->loc = @1;
+      field->import = $1;
+      field->import->kind = ExternalKind::Memory;
+      field->import->memory = $2;
+      $$.first = $$.last = field;
+    }
+  | inline_export memory_fields {
+      ModuleField* field = new ModuleField(ModuleFieldType::Export);
+      field->loc = @1;
+      field->export_ = $1;
+      field->export_->kind = ExternalKind::Memory;
+      $$.first = $2.first;
+      $$.last = $2.last->next = field;
+    }
+  | LPAR DATA text_list_opt RPAR {
+      ModuleField* data_field = new ModuleField(ModuleFieldType::DataSegment);
+      data_field->loc = @2;
+      DataSegment* data_segment = data_field->data_segment = new DataSegment();
+      data_segment->memory_var = Var(kInvalidIndex);
+      data_segment->offset = Expr::CreateConst(Const(Const::I32(), 0));
+      data_segment->offset->loc = @2;
+      dup_text_list(&$3, &data_segment->data, &data_segment->size);
+      destroy_text_list(&$3);
+      uint32_t byte_size = WABT_ALIGN_UP_TO_PAGE(data_segment->size);
+      uint32_t page_size = WABT_BYTES_TO_PAGES(byte_size);
+
+      ModuleField* memory_field = new ModuleField(ModuleFieldType::Memory);
+      memory_field->loc = @2;
+      Memory* memory = memory_field->memory = new Memory();
+      memory->page_limits.initial = page_size;
+      memory->page_limits.max = page_size;
+      memory->page_limits.has_max = true;
+      $$.first = memory_field;
+      $$.last = memory_field->next = data_field;
+    }
+;
+
+global :
+    LPAR GLOBAL bind_var_opt global_fields RPAR {
+      $$ = $4;
+      ModuleField* main = $$.first;
+      main->loc = @2;
+      if (main->type == ModuleFieldType::Global) {
+        main->global->name = $3;
+      } else {
+        assert(main->type == ModuleFieldType::Import);
+        main->import->global->name = $3;
+      }
+    }
+;
+
+global_fields :
+    global_type const_expr {
+      ModuleField* field = new ModuleField(ModuleFieldType::Global);
+      field->global = $1;
+      field->global->init_expr = $2.first;
+      $$.first = $$.last = field;
+    }
+  | inline_import global_type {
+      ModuleField* field = new ModuleField(ModuleFieldType::Import);
+      field->loc = @1;
+      field->import = $1;
+      field->import->kind = ExternalKind::Global;
+      field->import->global = $2;
+      $$.first = $$.last = field;
+    }
+  | inline_export global_fields {
+      ModuleField* field = new ModuleField(ModuleFieldType::Export);
+      field->loc = @1;
+      field->export_ = $1;
+      field->export_->kind = ExternalKind::Global;
+      $$.first = $2.first;
+      $$.last = $2.last->next = field;
+    }
+;
+
+/* Imports & Exports */
+
+import_desc :
+    LPAR FUNC bind_var_opt type_use RPAR {
+      $$ = new Import();
+      $$->kind = ExternalKind::Func;
+      $$->func = new Func();
+      $$->func->name = $3;
+      $$->func->decl.has_func_type = true;
+      $$->func->decl.type_var = std::move(*$4);
+      delete $4;
+    }
+  | LPAR FUNC bind_var_opt func_sig RPAR {
+      $$ = new Import();
+      $$->kind = ExternalKind::Func;
+      $$->func = new Func();
+      $$->func->name = $3;
+      $$->func->decl.sig = std::move(*$4);
+      delete $4;
+    }
+  | LPAR TABLE bind_var_opt table_sig RPAR {
+      $$ = new Import();
+      $$->kind = ExternalKind::Table;
+      $$->table = $4;
+      $$->table->name = $3;
+    }
+  | LPAR MEMORY bind_var_opt memory_sig RPAR {
+      $$ = new Import();
+      $$->kind = ExternalKind::Memory;
+      $$->memory = $4;
+      $$->memory->name = $3;
+    }
+  | LPAR GLOBAL bind_var_opt global_type RPAR {
+      $$ = new Import();
+      $$->kind = ExternalKind::Global;
+      $$->global = $4;
+      $$->global->name = $3;
+    }
+  | exception {
+      $$ = new Import();
+      $$->kind = ExternalKind::Except;
+      $$->except = $1;
+    }
+;
+
+import :
+    LPAR IMPORT quoted_text quoted_text import_desc RPAR {
+      $$ = new ModuleField(ModuleFieldType::Import);
+      $$->loc = @2;
+      $$->import = $5;
+      $$->import->module_name = $3;
+      $$->import->field_name = $4;
+    }
+;
+
+inline_import :
+    LPAR IMPORT quoted_text quoted_text RPAR {
+      $$ = new Import();
+      $$->module_name = $3;
+      $$->field_name = $4;
+    }
+;
+
+export_desc :
+    LPAR FUNC var RPAR {
+      $$ = new Export();
+      $$->kind = ExternalKind::Func;
+      $$->var = std::move(*$3);
+      delete $3;
+    }
+  | LPAR TABLE var RPAR {
+      $$ = new Export();
+      $$->kind = ExternalKind::Table;
+      $$->var = std::move(*$3);
+      delete $3;
+    }
+  | LPAR MEMORY var RPAR {
+      $$ = new Export();
+      $$->kind = ExternalKind::Memory;
+      $$->var = std::move(*$3);
+      delete $3;
+    }
+  | LPAR GLOBAL var RPAR {
+      $$ = new Export();
+      $$->kind = ExternalKind::Global;
+      $$->var = std::move(*$3);
+      delete $3;
+    }
+  | LPAR EXCEPT var RPAR {
+      $$ = new Export();
+      $$->kind = ExternalKind::Except;
+      $$->var = std::move(*$3);
+      delete $3;
+    }
+;
+export :
+    LPAR EXPORT quoted_text export_desc RPAR {
+      $$ = new ModuleField(ModuleFieldType::Export);
+      $$->loc = @2;
+      $$->export_ = $4;
+      $$->export_->name = $3;
+    }
+;
+
+inline_export :
+    LPAR EXPORT quoted_text RPAR {
+      $$ = new Export();
+      $$->name = $3;
+    }
+;
+
+
+/* Modules */
+
+type_def :
+    LPAR TYPE func_type RPAR {
+      $$ = new ModuleField(ModuleFieldType::FuncType);
+      $$->loc = @2;
+      $$->func_type = new FuncType();
+      $$->func_type->sig = std::move(*$3);
+      delete $3;
+    }
+  | LPAR TYPE bind_var func_type RPAR {
+      $$ = new ModuleField(ModuleFieldType::FuncType);
+      $$->loc = @2;
+      $$->func_type = new FuncType();
+      $$->func_type->name = $3;
+      $$->func_type->sig = std::move(*$4);
+      delete $4;
+    }
+;
+
+start :
+    LPAR START var RPAR {
+      $$ = new ModuleField(ModuleFieldType::Start);
+      $$->loc = @2;
+      $$->start = std::move(*$3);
+      delete $3;
+    }
+;
+
+module_field :
+    type_def { $$.first = $$.last = $1; }
+  | global
+  | table
+  | memory
+  | func
+  | elem { $$.first = $$.last = $1; }
+  | data { $$.first = $$.last = $1; }
+  | start { $$.first = $$.last = $1; }
+  | import { $$.first = $$.last = $1; }
+  | export { $$.first = $$.last = $1; }
+  | exception_field { $$.first = $$.last = $1; }
+;
+
+module_fields_opt :
+    /* empty */ { $$ = new Module(); }
+  | module_fields
+;
+
+module_fields :
+    module_field {
+      $$ = new Module();
+      check_import_ordering(&@1, lexer, parser, $$, $1.first);
+      append_module_fields($$, $1.first);
+    }
+  | module_fields module_field {
+      $$ = $1;
+      check_import_ordering(&@2, lexer, parser, $$, $2.first);
+      append_module_fields($$, $2.first);
+    }
+;
+
+module :
+    script_module {
+      if ($1->type == ScriptModule::Type::Text) {
+        $$ = $1->text;
+        $1->text = nullptr;
+      } else {
+        assert($1->type == ScriptModule::Type::Binary);
+        $$ = new Module();
+        ReadBinaryOptions options = WABT_READ_BINARY_OPTIONS_DEFAULT;
+        BinaryErrorHandlerModule error_handler(&$1->binary.loc, lexer, parser);
+        read_binary_ir($1->binary.data, $1->binary.size, &options,
+                       &error_handler, $$);
+        $$->name = $1->binary.name;
+        $$->loc = $1->binary.loc;
+        WABT_ZERO_MEMORY($1->binary.name);
+      }
+      delete $1;
+    }
+;
+
+inline_module :
+    module_fields
+;
+
+
+/* Scripts */
+
+script_var_opt :
+    /* empty */ {
+      $$ = new Var(kInvalidIndex);
+    }
+  | VAR {
+      StringSlice name;
+      DUPTEXT(name, $1);
+      $$ = new Var(name);
+    }
+;
+
+script_module :
+    LPAR MODULE bind_var_opt module_fields_opt RPAR {
+      $$ = new ScriptModule();
+      $$->type = ScriptModule::Type::Text;
+      $$->text = $4;
+      $$->text->name = $3;
+      $$->text->loc = @2;
+
+      // Resolve func type variables where the signature was not specified
+      // explicitly.
+      for (Func* func: $4->funcs) {
+        if (func->decl.has_func_type && is_empty_signature(&func->decl.sig)) {
+          FuncType* func_type = $4->GetFuncType(func->decl.type_var);
+          if (func_type) {
+            func->decl.sig = func_type->sig;
+          }
+        }
+      }
+    }
+  | LPAR MODULE bind_var_opt BIN text_list RPAR {
+      $$ = new ScriptModule();
+      $$->type = ScriptModule::Type::Binary;
+      $$->binary.name = $3;
+      $$->binary.loc = @2;
+      dup_text_list(&$5, &$$->binary.data, &$$->binary.size);
+      destroy_text_list(&$5);
+    }
+  | LPAR MODULE bind_var_opt QUOTE text_list RPAR {
+      $$ = new ScriptModule();
+      $$->type = ScriptModule::Type::Quoted;
+      $$->quoted.name = $3;
+      $$->quoted.loc = @2;
+      dup_text_list(&$5, &$$->quoted.data, &$$->quoted.size);
+      destroy_text_list(&$5);
+    }
+;
+
+action :
+    LPAR INVOKE script_var_opt quoted_text const_list RPAR {
+      $$ = new Action();
+      $$->loc = @2;
+      $$->module_var = std::move(*$3);
+      delete $3;
+      $$->type = ActionType::Invoke;
+      $$->name = $4;
+      $$->invoke = new ActionInvoke();
+      $$->invoke->args = std::move(*$5);
+      delete $5;
+    }
+  | LPAR GET script_var_opt quoted_text RPAR {
+      $$ = new Action();
+      $$->loc = @2;
+      $$->module_var = std::move(*$3);
+      delete $3;
+      $$->type = ActionType::Get;
+      $$->name = $4;
+    }
+;
+
+assertion :
+    LPAR ASSERT_MALFORMED script_module quoted_text RPAR {
+      $$ = new Command();
+      $$->type = CommandType::AssertMalformed;
+      $$->assert_malformed.module = $3;
+      $$->assert_malformed.text = $4;
+    }
+  | LPAR ASSERT_INVALID script_module quoted_text RPAR {
+      $$ = new Command();
+      $$->type = CommandType::AssertInvalid;
+      $$->assert_invalid.module = $3;
+      $$->assert_invalid.text = $4;
+    }
+  | LPAR ASSERT_UNLINKABLE script_module quoted_text RPAR {
+      $$ = new Command();
+      $$->type = CommandType::AssertUnlinkable;
+      $$->assert_unlinkable.module = $3;
+      $$->assert_unlinkable.text = $4;
+    }
+  | LPAR ASSERT_TRAP script_module quoted_text RPAR {
+      $$ = new Command();
+      $$->type = CommandType::AssertUninstantiable;
+      $$->assert_uninstantiable.module = $3;
+      $$->assert_uninstantiable.text = $4;
+    }
+  | LPAR ASSERT_RETURN action const_list RPAR {
+      $$ = new Command();
+      $$->type = CommandType::AssertReturn;
+      $$->assert_return.action = $3;
+      $$->assert_return.expected = $4;
+    }
+  | LPAR ASSERT_RETURN_CANONICAL_NAN action RPAR {
+      $$ = new Command();
+      $$->type = CommandType::AssertReturnCanonicalNan;
+      $$->assert_return_canonical_nan.action = $3;
+    }
+  | LPAR ASSERT_RETURN_ARITHMETIC_NAN action RPAR {
+      $$ = new Command();
+      $$->type = CommandType::AssertReturnArithmeticNan;
+      $$->assert_return_arithmetic_nan.action = $3;
+    }
+  | LPAR ASSERT_TRAP action quoted_text RPAR {
+      $$ = new Command();
+      $$->type = CommandType::AssertTrap;
+      $$->assert_trap.action = $3;
+      $$->assert_trap.text = $4;
+    }
+  | LPAR ASSERT_EXHAUSTION action quoted_text RPAR {
+      $$ = new Command();
+      $$->type = CommandType::AssertExhaustion;
+      $$->assert_trap.action = $3;
+      $$->assert_trap.text = $4;
+    }
+;
+
+cmd :
+    action {
+      $$ = new Command();
+      $$->type = CommandType::Action;
+      $$->action = $1;
+    }
+  | assertion
+  | module {
+      $$ = new Command();
+      $$->type = CommandType::Module;
+      $$->module = $1;
+    }
+  | LPAR REGISTER quoted_text script_var_opt RPAR {
+      $$ = new Command();
+      $$->type = CommandType::Register;
+      $$->register_.module_name = $3;
+      $$->register_.var = std::move(*$4);
+      delete $4;
+      $$->register_.var.loc = @4;
+    }
+;
+cmd_list :
+    cmd {
+      $$ = new CommandPtrVector();
+      $$->emplace_back($1);
+    }
+  | cmd_list cmd {
+      $$ = $1;
+      $$->emplace_back($2);
+    }
+;
+
+const :
+    LPAR CONST literal RPAR {
+      $$.loc = @2;
+      if (WABT_FAILED(parse_const($2, $3.type, $3.text.start,
+                                  $3.text.start + $3.text.length, &$$))) {
+        wast_parser_error(&@3, lexer, parser,
+                          "invalid literal \"" PRIstringslice "\"",
+                          WABT_PRINTF_STRING_SLICE_ARG($3.text));
+      }
+      delete [] $3.text.start;
+    }
+;
+const_list :
+    /* empty */ { $$ = new ConstVector(); }
+  | const_list const {
+      $$ = $1;
+      $$->push_back($2);
+    }
+;
+
+script :
+    /* empty */ {
+      $$ = new Script();
+    }
+  | cmd_list {
+      $$ = new Script();
+      $$->commands = std::move(*$1);
+      delete $1;
+
+      int last_module_index = -1;
+      for (size_t i = 0; i < $$->commands.size(); ++i) {
+        Command& command = *$$->commands[i].get();
+        Var* module_var = nullptr;
+        switch (command.type) {
+          case CommandType::Module: {
+            last_module_index = i;
+
+            /* Wire up module name bindings. */
+            Module* module = command.module;
+            if (module->name.length == 0)
+              continue;
+
+            $$->module_bindings.emplace(string_slice_to_string(module->name),
+                                        Binding(module->loc, i));
+            break;
+          }
+
+          case CommandType::AssertReturn:
+            module_var = &command.assert_return.action->module_var;
+            goto has_module_var;
+          case CommandType::AssertReturnCanonicalNan:
+            module_var =
+                &command.assert_return_canonical_nan.action->module_var;
+            goto has_module_var;
+          case CommandType::AssertReturnArithmeticNan:
+            module_var =
+                &command.assert_return_arithmetic_nan.action->module_var;
+            goto has_module_var;
+          case CommandType::AssertTrap:
+          case CommandType::AssertExhaustion:
+            module_var = &command.assert_trap.action->module_var;
+            goto has_module_var;
+          case CommandType::Action:
+            module_var = &command.action->module_var;
+            goto has_module_var;
+          case CommandType::Register:
+            module_var = &command.register_.var;
+            goto has_module_var;
+
+          has_module_var: {
+            /* Resolve actions with an invalid index to use the preceding
+             * module. */
+            if (module_var->type == VarType::Index &&
+                module_var->index == kInvalidIndex) {
+              module_var->index = last_module_index;
+            }
+            break;
+          }
+
+          default:
+            break;
+        }
+      }
+    }
+  | inline_module {
+      $$ = new Script();
+      Command* command = new Command();
+      command->type = CommandType::Module;
+      command->module = $1;
+      $$->commands.emplace_back(command);
+    }
+;
+
+/* bison destroys the start symbol even on a successful parse. We want to keep
+ script from being destroyed, so create a dummy start symbol. */
+script_start :
+    script { parser->script = $1; }
+;
+
+%%
+
+void append_expr_list(ExprList* expr_list, ExprList* expr) {
+  if (!expr->first)
+    return;
+  if (expr_list->last)
+    expr_list->last->next = expr->first;
+  else
+    expr_list->first = expr->first;
+  expr_list->last = expr->last;
+  expr_list->size += expr->size;
+}
+
+void append_expr(ExprList* expr_list, Expr* expr) {
+  if (expr_list->last)
+    expr_list->last->next = expr;
+  else
+    expr_list->first = expr;
+  expr_list->last = expr;
+  expr_list->size++;
+}
+
+ExprList join_exprs1(Location* loc, Expr* expr1) {
+  ExprList result;
+  WABT_ZERO_MEMORY(result);
+  append_expr(&result, expr1);
+  expr1->loc = *loc;
+  return result;
+}
+
+ExprList join_exprs2(Location* loc, ExprList* expr1, Expr* expr2) {
+  ExprList result;
+  WABT_ZERO_MEMORY(result);
+  append_expr_list(&result, expr1);
+  append_expr(&result, expr2);
+  expr2->loc = *loc;
+  return result;
+}
+
+ExprList join_expr_lists(ExprList* expr1, ExprList* expr2) {
+  ExprList result;
+  WABT_ZERO_MEMORY(result);
+  append_expr_list(&result, expr1);
+  append_expr_list(&result, expr2);
+  return result;
+}
+
+Result parse_const(Type type,
+                   LiteralType literal_type,
+                   const char* s,
+                   const char* end,
+                   Const* out) {
+  out->type = type;
+  switch (type) {
+    case Type::I32:
+      return parse_int32(s, end, &out->u32, ParseIntType::SignedAndUnsigned);
+    case Type::I64:
+      return parse_int64(s, end, &out->u64, ParseIntType::SignedAndUnsigned);
+    case Type::F32:
+      return parse_float(literal_type, s, end, &out->f32_bits);
+    case Type::F64:
+      return parse_double(literal_type, s, end, &out->f64_bits);
+    default:
+      assert(0);
+      break;
+  }
+  return Result::Error;
+}
+
+size_t copy_string_contents(StringSlice* text, char* dest) {
+  const char* src = text->start + 1;
+  const char* end = text->start + text->length - 1;
+
+  char* dest_start = dest;
+
+  while (src < end) {
+    if (*src == '\\') {
+      src++;
+      switch (*src) {
+        case 'n':
+          *dest++ = '\n';
+          break;
+        case 'r':
+          *dest++ = '\r';
+          break;
+        case 't':
+          *dest++ = '\t';
+          break;
+        case '\\':
+          *dest++ = '\\';
+          break;
+        case '\'':
+          *dest++ = '\'';
+          break;
+        case '\"':
+          *dest++ = '\"';
+          break;
+        default: {
+          // The string should be validated already, so we know this is a hex
+          // sequence.
+          uint32_t hi;
+          uint32_t lo;
+          if (WABT_SUCCEEDED(parse_hexdigit(src[0], &hi)) &&
+              WABT_SUCCEEDED(parse_hexdigit(src[1], &lo))) {
+            *dest++ = (hi << 4) | lo;
+          } else {
+            assert(0);
+          }
+          src++;
+          break;
+        }
+      }
+      src++;
+    } else {
+      *dest++ = *src++;
+    }
+  }
+  /* return the data length */
+  return dest - dest_start;
+}
+
+void dup_text_list(TextList* text_list, char** out_data, size_t* out_size) {
+  /* walk the linked list to see how much total space is needed */
+  size_t total_size = 0;
+  for (TextListNode* node = text_list->first; node; node = node->next) {
+    /* Always allocate enough space for the entire string including the escape
+     * characters. It will only get shorter, and this way we only have to
+     * iterate through the string once. */
+    const char* src = node->text.start + 1;
+    const char* end = node->text.start + node->text.length - 1;
+    size_t size = (end > src) ? (end - src) : 0;
+    total_size += size;
+  }
+  char* result = new char [total_size];
+  char* dest = result;
+  for (TextListNode* node = text_list->first; node; node = node->next) {
+    size_t actual_size = copy_string_contents(&node->text, dest);
+    dest += actual_size;
+  }
+  *out_data = result;
+  *out_size = dest - result;
+}
+
+void reverse_bindings(TypeVector* types, BindingHash* bindings) {
+  for (auto& pair : *bindings) {
+    pair.second.index = types->size() - pair.second.index - 1;
+  }
+}
+
+bool is_empty_signature(const FuncSignature* sig) {
+  return sig->result_types.empty() && sig->param_types.empty();
+}
+
+void append_implicit_func_declaration(Location* loc,
+                                      Module* module,
+                                      FuncDeclaration* decl) {
+  if (decl->has_func_type)
+    return;
+
+  int sig_index = module->GetFuncTypeIndex(*decl);
+  if (sig_index == -1) {
+    module->AppendImplicitFuncType(*loc, decl->sig);
+  } else {
+    decl->sig = module->func_types[sig_index]->sig;
+  }
+}
+
+void check_import_ordering(Location* loc, WastLexer* lexer, WastParser* parser,
+                           Module* module, ModuleField* first) {
+  for (ModuleField* field = first; field; field = field->next) {
+    if (field->type == ModuleFieldType::Import) {
+      if (module->funcs.size() != module->num_func_imports ||
+          module->tables.size() != module->num_table_imports ||
+          module->memories.size() != module->num_memory_imports ||
+          module->globals.size() != module->num_global_imports ||
+          module->excepts.size() != module->num_except_imports) {
+        wast_parser_error(
+            loc, lexer, parser,
+            "imports must occur before all non-import definitions");
+      }
+    }
+  }
+}
+
+void append_module_fields(Module* module, ModuleField* first) {
+  ModuleField* main_field = first;
+  Index main_index = kInvalidIndex;
+
+  for (ModuleField* field = first; field; field = field->next) {
+    StringSlice* name = nullptr;
+    BindingHash* bindings = nullptr;
+    Index index = kInvalidIndex;
+
+    switch (field->type) {
+      case ModuleFieldType::Func:
+        append_implicit_func_declaration(&field->loc, module,
+                                         &field->func->decl);
+        name = &field->func->name;
+        bindings = &module->func_bindings;
+        index = module->funcs.size();
+        module->funcs.push_back(field->func);
+        break;
+
+      case ModuleFieldType::Global:
+        name = &field->global->name;
+        bindings = &module->global_bindings;
+        index = module->globals.size();
+        module->globals.push_back(field->global);
+        break;
+
+      case ModuleFieldType::Import:
+        switch (field->import->kind) {
+          case ExternalKind::Func:
+            append_implicit_func_declaration(&field->loc, module,
+                                             &field->import->func->decl);
+            name = &field->import->func->name;
+            bindings = &module->func_bindings;
+            index = module->funcs.size();
+            module->funcs.push_back(field->import->func);
+            ++module->num_func_imports;
+            break;
+          case ExternalKind::Table:
+            name = &field->import->table->name;
+            bindings = &module->table_bindings;
+            index = module->tables.size();
+            module->tables.push_back(field->import->table);
+            ++module->num_table_imports;
+            break;
+          case ExternalKind::Memory:
+            name = &field->import->memory->name;
+            bindings = &module->memory_bindings;
+            index = module->memories.size();
+            module->memories.push_back(field->import->memory);
+            ++module->num_memory_imports;
+            break;
+          case ExternalKind::Global:
+            name = &field->import->global->name;
+            bindings = &module->global_bindings;
+            index = module->globals.size();
+            module->globals.push_back(field->import->global);
+            ++module->num_global_imports;
+            break;
+          case ExternalKind::Except:
+            name = &field->import->except->name;
+            bindings = &module->except_bindings;
+            index = module->excepts.size();
+            module->excepts.push_back(field->except);
+            ++module->num_except_imports;
+            break;
+        }
+        module->imports.push_back(field->import);
+        break;
+
+      case ModuleFieldType::Export:
+        if (field != main_field) {
+          // If this is not the main field, it must be an inline export.
+          field->export_->var.type = VarType::Index;
+          field->export_->var.index = main_index;
+        }
+        name = &field->export_->name;
+        bindings = &module->export_bindings;
+        index = module->exports.size();
+        module->exports.push_back(field->export_);
+        break;
+
+      case ModuleFieldType::FuncType:
+        name = &field->func_type->name;
+        bindings = &module->func_type_bindings;
+        index = module->func_types.size();
+        module->func_types.push_back(field->func_type);
+        break;
+
+      case ModuleFieldType::Table:
+        name = &field->table->name;
+        bindings = &module->table_bindings;
+        index = module->tables.size();
+        module->tables.push_back(field->table);
+        break;
+
+      case ModuleFieldType::ElemSegment:
+        if (field != main_field) {
+          // If this is not the main field, it must be an inline elem segment.
+          field->elem_segment->table_var.type = VarType::Index;
+          field->elem_segment->table_var.index = main_index;
+        }
+        module->elem_segments.push_back(field->elem_segment);
+        break;
+
+      case ModuleFieldType::Memory:
+        name = &field->memory->name;
+        bindings = &module->memory_bindings;
+        index = module->memories.size();
+        module->memories.push_back(field->memory);
+        break;
+
+      case ModuleFieldType::DataSegment:
+        if (field != main_field) {
+          // If this is not the main field, it must be an inline data segment.
+          field->data_segment->memory_var.type = VarType::Index;
+          field->data_segment->memory_var.index = main_index;
+        }
+        module->data_segments.push_back(field->data_segment);
+        break;
+
+      case ModuleFieldType::Except:
+        name = &field->except->name;        
+        bindings = &module->except_bindings;
+        index = module->excepts.size();
+        module->excepts.push_back(field->except);
+        break;
+
+      case ModuleFieldType::Start:
+        module->start = &field->start;
+        break;
+    }
+
+    if (field == main_field)
+      main_index = index;
+
+    if (module->last_field)
+      module->last_field->next = field;
+    else
+      module->first_field = field;
+    module->last_field = field;
+
+    if (name && bindings) {
+      // Exported names are allowed to be empty; other names aren't.
+      if (bindings == &module->export_bindings ||
+          !string_slice_is_empty(name)) {
+        bindings->emplace(string_slice_to_string(*name),
+                          Binding(field->loc, index));
+      }
+    }
+  }
+}
+
+Result parse_wast(WastLexer* lexer, Script** out_script,
+                  SourceErrorHandler* error_handler,
+                  WastParseOptions* options) {
+  WastParser parser;
+  WABT_ZERO_MEMORY(parser);
+  static WastParseOptions default_options;
+  if (options == nullptr)
+    options = &default_options;
+  parser.options = options;
+  parser.error_handler = error_handler;
+  wabt_wast_parser_debug = int(options->debug_parsing);
+  int result = wabt_wast_parser_parse(lexer, &parser);
+  delete [] parser.yyssa;
+  delete [] parser.yyvsa;
+  delete [] parser.yylsa;
+  if (out_script) {
+    *out_script = parser.script;
+  } else {
+    delete parser.script;
+  }
+  return result == 0 && parser.errors == 0 ? Result::Ok : Result::Error;
+}
+
+BinaryErrorHandlerModule::BinaryErrorHandlerModule(
+    Location* loc, WastLexer* lexer, WastParser* parser)
+  : loc_(loc), lexer_(lexer), parser_(parser) {}
+
+bool BinaryErrorHandlerModule::OnError(Offset offset,
+                                       const std::string& error) {
+  if (offset == kInvalidOffset) {
+    wast_parser_error(loc_, lexer_, parser_, "error in binary module: %s",
+                      error.c_str());
+  } else {
+    wast_parser_error(loc_, lexer_, parser_,
+                      "error in binary module: @0x%08" PRIzx ": %s", offset,
+                      error.c_str());
+  }
+  return true;
+}
+
+}  // namespace wabt
diff --git a/lib/wabt/src/wat-writer.cc b/lib/wabt/src/wat-writer.cc
new file mode 100644
index 0000000..d383206
--- /dev/null
+++ b/lib/wabt/src/wat-writer.cc
@@ -0,0 +1,1134 @@
+/*
+ * Copyright 2016 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "wat-writer.h"
+
+#include <algorithm>
+#include <cassert>
+#include <cinttypes>
+#include <cstdarg>
+#include <cstdio>
+#include <map>
+#include <iterator>
+#include <string>
+#include <vector>
+
+#include "common.h"
+#include "ir.h"
+#include "literal.h"
+#include "stream.h"
+#include "writer.h"
+
+#define INDENT_SIZE 2
+#define NO_FORCE_NEWLINE 0
+#define FORCE_NEWLINE 1
+
+namespace wabt {
+
+namespace {
+
+static const uint8_t s_is_char_escaped[] = {
+    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, 1, 1, 1, 1, 1, 1, 0, 0, 1, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    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, 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, 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, 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, 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};
+
+enum class NextChar {
+  None,
+  Space,
+  Newline,
+  ForceNewline,
+};
+
+struct ExprTree {
+  explicit ExprTree(const Expr* expr) : expr(expr) {}
+
+  const Expr* expr;
+  std::vector<ExprTree> children;
+};
+
+struct Label {
+  Label(LabelType label_type, StringSlice name, const BlockSignature& sig)
+      : name(name), label_type(label_type), sig(sig) {}
+
+  StringSlice name;
+  LabelType label_type;
+  const BlockSignature& sig;  // Share with Expr.
+};
+
+class WatWriter {
+ public:
+  WatWriter(Writer* writer, const WriteWatOptions* options)
+      : options_(options), stream_(writer) {}
+
+  Result WriteModule(const Module* module);
+
+ private:
+  void Indent();
+  void Dedent();
+  void WriteIndent();
+  void WriteNextChar();
+  void WriteDataWithNextChar(const void* src, size_t size);
+  void Writef(const char* format, ...);
+  void WritePutc(char c);
+  void WritePuts(const char* s, NextChar next_char);
+  void WritePutsSpace(const char* s);
+  void WritePutsNewline(const char* s);
+  void WriteNewline(bool force);
+  void WriteOpen(const char* name, NextChar next_char);
+  void WriteOpenNewline(const char* name);
+  void WriteOpenSpace(const char* name);
+  void WriteClose(NextChar next_char);
+  void WriteCloseNewline();
+  void WriteCloseSpace();
+  void WriteString(const std::string& str, NextChar next_char);
+  void WriteStringSlice(const StringSlice* str, NextChar next_char);
+  bool WriteStringSliceOpt(const StringSlice* str, NextChar next_char);
+  void WriteName(const StringSlice* str, NextChar next_char);
+  void WriteNameOrIndex(const StringSlice* str,
+                        Index index,
+                        NextChar next_char);
+  void WriteQuotedData(const void* data, size_t length);
+  void WriteQuotedStringSlice(const StringSlice* str, NextChar next_char);
+  void WriteVar(const Var* var, NextChar next_char);
+  void WriteBrVar(const Var* var, NextChar next_char);
+  void WriteType(Type type, NextChar next_char);
+  void WriteTypes(const TypeVector& types, const char* name);
+  void WriteFuncSigSpace(const FuncSignature* func_sig);
+  void WriteBeginBlock(LabelType label_type,
+                       const Block* block,
+                       const char* text);
+  void WriteEndBlock();
+  void WriteBlock(LabelType label_type,
+                  const Block* block,
+                  const char* start_text);
+  void WriteConst(const Const* const_);
+  void WriteExpr(const Expr* expr);
+  void WriteExprList(const Expr* first);
+  void WriteInitExpr(const Expr* expr);
+  void WriteTypeBindings(const char* prefix,
+                         const Func* func,
+                         const TypeVector& types,
+                         const BindingHash& bindings);
+  void WriteFunc(const Module* module, const Func* func);
+  void WriteBeginGlobal(const Global* global);
+  void WriteGlobal(const Global* global);
+  void WriteLimits(const Limits* limits);
+  void WriteTable(const Table* table);
+  void WriteElemSegment(const ElemSegment* segment);
+  void WriteMemory(const Memory* memory);
+  void WriteDataSegment(const DataSegment* segment);
+  void WriteImport(const Import* import);
+  void WriteExport(const Export* export_);
+  void WriteFuncType(const FuncType* func_type);
+  void WriteStartFunction(const Var* start);
+
+  Index GetLabelStackSize() { return label_stack_.size(); }
+  Label* GetLabel(const Var* var);
+  Index GetLabelArity(const Var* var);
+  Index GetFuncParamCount(const Var* var);
+  Index GetFuncResultCount(const Var* var);
+  Index GetFuncSigParamCount(const Var* var);
+  Index GetFuncSigResultCount(const Var* var);
+  void PushExpr(const Expr* expr, Index operand_count, Index result_count);
+  void FlushExprTree(const ExprTree& expr_tree);
+  void FlushExprTreeVector(const std::vector<ExprTree>&);
+  void FlushExprTreeStack();
+  void WriteFoldedExpr(const Expr* first);
+  void WriteFoldedExprList(const Expr* first);
+
+  void BuildExportMaps();
+  void WriteInlineExport(const Export* export_);
+
+  const WriteWatOptions* options_ = nullptr;
+  const Module* module_ = nullptr;
+  const Func* current_func_ = nullptr;
+  Stream stream_;
+  Result result_ = Result::Ok;
+  int indent_ = 0;
+  NextChar next_char_ = NextChar::None;
+  std::vector<std::string> index_to_name_;
+  std::vector<Label> label_stack_;
+  std::vector<ExprTree> expr_tree_stack_;
+  std::vector<const Export*> func_to_export_map_;
+  std::vector<const Export*> global_to_export_map_;
+  std::vector<const Export*> table_to_export_map_;
+  std::vector<const Export*> memory_to_export_map_;
+
+  Index func_index_ = 0;
+  Index global_index_ = 0;
+  Index table_index_ = 0;
+  Index memory_index_ = 0;
+  Index func_type_index_ = 0;
+};
+
+void WatWriter::Indent() {
+  indent_ += INDENT_SIZE;
+}
+
+void WatWriter::Dedent() {
+  indent_ -= INDENT_SIZE;
+  assert(indent_ >= 0);
+}
+
+void WatWriter::WriteIndent() {
+  static char s_indent[] =
+      "                                                                       "
+      "                                                                       ";
+  static size_t s_indent_len = sizeof(s_indent) - 1;
+  size_t indent = indent_;
+  while (static_cast<size_t>(indent_) > s_indent_len) {
+    stream_.WriteData(s_indent, s_indent_len);
+    indent -= s_indent_len;
+  }
+  if (indent > 0) {
+    stream_.WriteData(s_indent, indent);
+  }
+}
+
+void WatWriter::WriteNextChar() {
+  switch (next_char_) {
+    case NextChar::Space:
+      stream_.WriteChar(' ');
+      break;
+    case NextChar::Newline:
+    case NextChar::ForceNewline:
+      stream_.WriteChar('\n');
+      WriteIndent();
+      break;
+
+    default:
+    case NextChar::None:
+      break;
+  }
+  next_char_ = NextChar::None;
+}
+
+void WatWriter::WriteDataWithNextChar(const void* src, size_t size) {
+  WriteNextChar();
+  stream_.WriteData(src, size);
+}
+
+void WABT_PRINTF_FORMAT(2, 3) WatWriter::Writef(const char* format, ...) {
+  WABT_SNPRINTF_ALLOCA(buffer, length, format);
+  /* default to following space */
+  WriteDataWithNextChar(buffer, length);
+  next_char_ = NextChar::Space;
+}
+
+void WatWriter::WritePutc(char c) {
+  stream_.WriteChar(c);
+}
+
+void WatWriter::WritePuts(const char* s, NextChar next_char) {
+  size_t len = strlen(s);
+  WriteDataWithNextChar(s, len);
+  next_char_ = next_char;
+}
+
+void WatWriter::WritePutsSpace(const char* s) {
+  WritePuts(s, NextChar::Space);
+}
+
+void WatWriter::WritePutsNewline(const char* s) {
+  WritePuts(s, NextChar::Newline);
+}
+
+void WatWriter::WriteNewline(bool force) {
+  if (next_char_ == NextChar::ForceNewline)
+    WriteNextChar();
+  next_char_ = force ? NextChar::ForceNewline : NextChar::Newline;
+}
+
+void WatWriter::WriteOpen(const char* name, NextChar next_char) {
+  WritePuts("(", NextChar::None);
+  WritePuts(name, next_char);
+  Indent();
+}
+
+void WatWriter::WriteOpenNewline(const char* name) {
+  WriteOpen(name, NextChar::Newline);
+}
+
+void WatWriter::WriteOpenSpace(const char* name) {
+  WriteOpen(name, NextChar::Space);
+}
+
+void WatWriter::WriteClose(NextChar next_char) {
+  if (next_char_ != NextChar::ForceNewline)
+    next_char_ = NextChar::None;
+  Dedent();
+  WritePuts(")", next_char);
+}
+
+void WatWriter::WriteCloseNewline() {
+  WriteClose(NextChar::Newline);
+}
+
+void WatWriter::WriteCloseSpace() {
+  WriteClose(NextChar::Space);
+}
+
+void WatWriter::WriteString(const std::string& str, NextChar next_char) {
+  WritePuts(str.c_str(), next_char);
+}
+
+void WatWriter::WriteStringSlice(const StringSlice* str, NextChar next_char) {
+  Writef(PRIstringslice, WABT_PRINTF_STRING_SLICE_ARG(*str));
+  next_char_ = next_char;
+}
+
+bool WatWriter::WriteStringSliceOpt(const StringSlice* str,
+                                    NextChar next_char) {
+  if (str->start)
+    WriteStringSlice(str, next_char);
+  return !!str->start;
+}
+
+void WatWriter::WriteName(const StringSlice* str, NextChar next_char) {
+  // Debug names must begin with a $ for for wast file to be valid
+  assert(str->length > 0 && str->start[0] == '$');
+  WriteStringSlice(str, next_char);
+}
+
+void WatWriter::WriteNameOrIndex(const StringSlice* str,
+                                 Index index,
+                                 NextChar next_char) {
+  if (str->start)
+    WriteName(str, next_char);
+  else
+    Writef("(;%u;)", index);
+}
+
+void WatWriter::WriteQuotedData(const void* data, size_t length) {
+  const uint8_t* u8_data = static_cast<const uint8_t*>(data);
+  static const char s_hexdigits[] = "0123456789abcdef";
+  WriteNextChar();
+  WritePutc('\"');
+  for (size_t i = 0; i < length; ++i) {
+    uint8_t c = u8_data[i];
+    if (s_is_char_escaped[c]) {
+      WritePutc('\\');
+      WritePutc(s_hexdigits[c >> 4]);
+      WritePutc(s_hexdigits[c & 0xf]);
+    } else {
+      WritePutc(c);
+    }
+  }
+  WritePutc('\"');
+  next_char_ = NextChar::Space;
+}
+
+void WatWriter::WriteQuotedStringSlice(const StringSlice* str,
+                                       NextChar next_char) {
+  WriteQuotedData(str->start, str->length);
+  next_char_ = next_char;
+}
+
+void WatWriter::WriteVar(const Var* var, NextChar next_char) {
+  if (var->type == VarType::Index) {
+    Writef("%" PRIindex, var->index);
+    next_char_ = next_char;
+  } else {
+    WriteName(&var->name, next_char);
+  }
+}
+
+void WatWriter::WriteBrVar(const Var* var, NextChar next_char) {
+  if (var->type == VarType::Index) {
+    if (var->index < GetLabelStackSize()) {
+      Writef("%" PRIindex " (;@%" PRIindex ";)", var->index,
+             GetLabelStackSize() - var->index - 1);
+    } else {
+      Writef("%" PRIindex " (; INVALID ;)", var->index);
+    }
+    next_char_ = next_char;
+  } else {
+    WriteStringSlice(&var->name, next_char);
+  }
+}
+
+void WatWriter::WriteType(Type type, NextChar next_char) {
+  const char* type_name = get_type_name(type);
+  assert(type_name);
+  WritePuts(type_name, next_char);
+}
+
+void WatWriter::WriteTypes(const TypeVector& types, const char* name) {
+  if (types.size()) {
+    if (name)
+      WriteOpenSpace(name);
+    for (Type type : types)
+      WriteType(type, NextChar::Space);
+    if (name)
+      WriteCloseSpace();
+  }
+}
+
+void WatWriter::WriteFuncSigSpace(const FuncSignature* func_sig) {
+  WriteTypes(func_sig->param_types, "param");
+  WriteTypes(func_sig->result_types, "result");
+}
+
+void WatWriter::WriteBeginBlock(LabelType label_type,
+                                const Block* block,
+                                const char* text) {
+  WritePutsSpace(text);
+  bool has_label = WriteStringSliceOpt(&block->label, NextChar::Space);
+  WriteTypes(block->sig, "result");
+  if (!has_label)
+    Writef(" ;; label = @%" PRIindex, GetLabelStackSize());
+  WriteNewline(FORCE_NEWLINE);
+  label_stack_.emplace_back(label_type, block->label, block->sig);
+  Indent();
+}
+
+void WatWriter::WriteEndBlock() {
+  Dedent();
+  label_stack_.pop_back();
+  WritePutsNewline(get_opcode_name(Opcode::End));
+}
+
+void WatWriter::WriteBlock(LabelType label_type,
+                           const Block* block,
+                           const char* start_text) {
+  WriteBeginBlock(label_type, block, start_text);
+  WriteExprList(block->first);
+  WriteEndBlock();
+}
+
+void WatWriter::WriteConst(const Const* const_) {
+  switch (const_->type) {
+    case Type::I32:
+      WritePutsSpace(get_opcode_name(Opcode::I32Const));
+      Writef("%d", static_cast<int32_t>(const_->u32));
+      WriteNewline(NO_FORCE_NEWLINE);
+      break;
+
+    case Type::I64:
+      WritePutsSpace(get_opcode_name(Opcode::I64Const));
+      Writef("%" PRId64, static_cast<int64_t>(const_->u64));
+      WriteNewline(NO_FORCE_NEWLINE);
+      break;
+
+    case Type::F32: {
+      WritePutsSpace(get_opcode_name(Opcode::F32Const));
+      char buffer[128];
+      write_float_hex(buffer, 128, const_->f32_bits);
+      WritePutsSpace(buffer);
+      float f32;
+      memcpy(&f32, &const_->f32_bits, sizeof(f32));
+      Writef("(;=%g;)", f32);
+      WriteNewline(NO_FORCE_NEWLINE);
+      break;
+    }
+
+    case Type::F64: {
+      WritePutsSpace(get_opcode_name(Opcode::F64Const));
+      char buffer[128];
+      write_double_hex(buffer, 128, const_->f64_bits);
+      WritePutsSpace(buffer);
+      double f64;
+      memcpy(&f64, &const_->f64_bits, sizeof(f64));
+      Writef("(;=%g;)", f64);
+      WriteNewline(NO_FORCE_NEWLINE);
+      break;
+    }
+
+    default:
+      assert(0);
+      break;
+  }
+}
+
+void WatWriter::WriteExpr(const Expr* expr) {
+  switch (expr->type) {
+    case ExprType::Binary:
+      WritePutsNewline(get_opcode_name(expr->binary.opcode));
+      break;
+
+    case ExprType::Block:
+      WriteBlock(LabelType::Block, expr->block, get_opcode_name(Opcode::Block));
+      break;
+
+    case ExprType::Br:
+      WritePutsSpace(get_opcode_name(Opcode::Br));
+      WriteBrVar(&expr->br.var, NextChar::Newline);
+      break;
+
+    case ExprType::BrIf:
+      WritePutsSpace(get_opcode_name(Opcode::BrIf));
+      WriteBrVar(&expr->br_if.var, NextChar::Newline);
+      break;
+
+    case ExprType::BrTable: {
+      WritePutsSpace(get_opcode_name(Opcode::BrTable));
+      for (const Var& var : *expr->br_table.targets)
+        WriteBrVar(&var, NextChar::Space);
+      WriteBrVar(&expr->br_table.default_target, NextChar::Newline);
+      break;
+    }
+
+    case ExprType::Call:
+      WritePutsSpace(get_opcode_name(Opcode::Call));
+      WriteVar(&expr->call.var, NextChar::Newline);
+      break;
+
+    case ExprType::CallIndirect:
+      WritePutsSpace(get_opcode_name(Opcode::CallIndirect));
+      WriteVar(&expr->call_indirect.var, NextChar::Newline);
+      break;
+
+    case ExprType::Compare:
+      WritePutsNewline(get_opcode_name(expr->compare.opcode));
+      break;
+
+    case ExprType::Const:
+      WriteConst(&expr->const_);
+      break;
+
+    case ExprType::Convert:
+      WritePutsNewline(get_opcode_name(expr->convert.opcode));
+      break;
+
+    case ExprType::Drop:
+      WritePutsNewline(get_opcode_name(Opcode::Drop));
+      break;
+
+    case ExprType::GetGlobal:
+      WritePutsSpace(get_opcode_name(Opcode::GetGlobal));
+      WriteVar(&expr->get_global.var, NextChar::Newline);
+      break;
+
+    case ExprType::GetLocal:
+      WritePutsSpace(get_opcode_name(Opcode::GetLocal));
+      WriteVar(&expr->get_local.var, NextChar::Newline);
+      break;
+
+    case ExprType::GrowMemory:
+      WritePutsNewline(get_opcode_name(Opcode::GrowMemory));
+      break;
+
+    case ExprType::If:
+      WriteBeginBlock(LabelType::If, expr->if_.true_,
+                      get_opcode_name(Opcode::If));
+      WriteExprList(expr->if_.true_->first);
+      if (expr->if_.false_) {
+        Dedent();
+        WritePutsSpace(get_opcode_name(Opcode::Else));
+        Indent();
+        WriteNewline(FORCE_NEWLINE);
+        WriteExprList(expr->if_.false_);
+      }
+      WriteEndBlock();
+      break;
+
+    case ExprType::Load:
+      WritePutsSpace(get_opcode_name(expr->load.opcode));
+      if (expr->load.offset)
+        Writef("offset=%u", expr->load.offset);
+      if (!is_naturally_aligned(expr->load.opcode, expr->load.align))
+        Writef("align=%u", expr->load.align);
+      WriteNewline(NO_FORCE_NEWLINE);
+      break;
+
+    case ExprType::Loop:
+      WriteBlock(LabelType::Loop, expr->loop, get_opcode_name(Opcode::Loop));
+      break;
+
+    case ExprType::CurrentMemory:
+      WritePutsNewline(get_opcode_name(Opcode::CurrentMemory));
+      break;
+
+    case ExprType::Nop:
+      WritePutsNewline(get_opcode_name(Opcode::Nop));
+      break;
+
+    case ExprType::Return:
+      WritePutsNewline(get_opcode_name(Opcode::Return));
+      break;
+
+    case ExprType::Select:
+      WritePutsNewline(get_opcode_name(Opcode::Select));
+      break;
+
+    case ExprType::SetGlobal:
+      WritePutsSpace(get_opcode_name(Opcode::SetGlobal));
+      WriteVar(&expr->set_global.var, NextChar::Newline);
+      break;
+
+    case ExprType::SetLocal:
+      WritePutsSpace(get_opcode_name(Opcode::SetLocal));
+      WriteVar(&expr->set_local.var, NextChar::Newline);
+      break;
+
+    case ExprType::Store:
+      WritePutsSpace(get_opcode_name(expr->store.opcode));
+      if (expr->store.offset)
+        Writef("offset=%u", expr->store.offset);
+      if (!is_naturally_aligned(expr->store.opcode, expr->store.align))
+        Writef("align=%u", expr->store.align);
+      WriteNewline(NO_FORCE_NEWLINE);
+      break;
+
+    case ExprType::TeeLocal:
+      WritePutsSpace(get_opcode_name(Opcode::TeeLocal));
+      WriteVar(&expr->tee_local.var, NextChar::Newline);
+      break;
+
+    case ExprType::Unary:
+      WritePutsNewline(get_opcode_name(expr->unary.opcode));
+      break;
+
+    case ExprType::Unreachable:
+      WritePutsNewline(get_opcode_name(Opcode::Unreachable));
+      break;
+
+    default:
+      fprintf(stderr, "bad expr type: %d\n", static_cast<int>(expr->type));
+      assert(0);
+      break;
+  }
+}
+
+void WatWriter::WriteExprList(const Expr* first) {
+  for (const Expr* expr = first; expr; expr = expr->next)
+    WriteExpr(expr);
+}
+
+Label* WatWriter::GetLabel(const Var* var) {
+  if (var->type == VarType::Name) {
+    for (Index i = GetLabelStackSize(); i > 0; --i) {
+      Label* label = &label_stack_[i - 1];
+      if (string_slices_are_equal(&label->name, &var->name))
+        return label;
+    }
+  } else if (var->index < GetLabelStackSize()) {
+    Label* label = &label_stack_[GetLabelStackSize() - var->index - 1];
+    return label;
+  }
+  return nullptr;
+}
+
+
+Index WatWriter::GetLabelArity(const Var* var) {
+  Label* label = GetLabel(var);
+  return label && label->label_type != LabelType::Loop ? label->sig.size() : 0;
+}
+
+Index WatWriter::GetFuncParamCount(const Var* var) {
+  const Func* func = module_->GetFunc(*var);
+  return func ? func->GetNumParams() : 0;
+}
+
+Index WatWriter::GetFuncResultCount(const Var* var) {
+  const Func* func = module_->GetFunc(*var);
+  return func ? func->GetNumResults() : 0;
+}
+
+Index WatWriter::GetFuncSigParamCount(const Var* var) {
+  const FuncType* func_type = module_->GetFuncType(*var);
+  return func_type ? func_type->GetNumParams() : 0;
+}
+
+Index WatWriter::GetFuncSigResultCount(const Var* var) {
+  const FuncType* func_type = module_->GetFuncType(*var);
+  return func_type ? func_type->GetNumResults() : 0;
+}
+
+void WatWriter::WriteFoldedExpr(const Expr* expr) {
+  switch (expr->type) {
+    case ExprType::Binary:
+    case ExprType::Compare:
+    case ExprType::Store:
+      PushExpr(expr, 2, 1);
+      break;
+
+    case ExprType::Block:
+      PushExpr(expr, 0, expr->block->sig.size());
+      break;
+
+    case ExprType::Br:
+      PushExpr(expr, GetLabelArity(&expr->br.var), 1);
+      break;
+
+    case ExprType::BrIf: {
+      Index arity = GetLabelArity(&expr->br_if.var);
+      PushExpr(expr, arity + 1, arity);
+      break;
+    }
+
+    case ExprType::BrTable:
+      PushExpr(expr, GetLabelArity(&expr->br_table.default_target) + 1, 1);
+      break;
+
+    case ExprType::Call:
+      PushExpr(expr, GetFuncParamCount(&expr->call.var),
+               GetFuncResultCount(&expr->call.var));
+      break;
+
+    case ExprType::CallIndirect:
+      PushExpr(expr, GetFuncSigParamCount(&expr->call_indirect.var) + 1,
+               GetFuncSigResultCount(&expr->call_indirect.var));
+      break;
+
+    case ExprType::Const:
+    case ExprType::CurrentMemory:
+    case ExprType::GetGlobal:
+    case ExprType::GetLocal:
+    case ExprType::Unreachable:
+      PushExpr(expr, 0, 1);
+      break;
+
+    case ExprType::Convert:
+    case ExprType::GrowMemory:
+    case ExprType::Load:
+    case ExprType::TeeLocal:
+    case ExprType::Unary:
+      PushExpr(expr, 1, 1);
+      break;
+
+    case ExprType::Drop:
+    case ExprType::SetGlobal:
+    case ExprType::SetLocal:
+      PushExpr(expr, 1, 0);
+      break;
+
+    case ExprType::If:
+      PushExpr(expr, 1, expr->if_.true_->sig.size());
+      break;
+
+    case ExprType::Loop:
+      PushExpr(expr, 0, expr->loop->sig.size());
+      break;
+
+    case ExprType::Nop:
+      PushExpr(expr, 0, 0);
+      break;
+
+    case ExprType::Return:
+      PushExpr(expr, current_func_->decl.sig.result_types.size(), 1);
+      break;
+
+    case ExprType::Select:
+      PushExpr(expr, 3, 1);
+      break;
+
+    default:
+      fprintf(stderr, "bad expr type: %d\n", static_cast<int>(expr->type));
+      assert(0);
+      break;
+  }
+}
+
+void WatWriter::WriteFoldedExprList(const Expr* first) {
+  for (const Expr* expr = first; expr; expr = expr->next)
+    WriteFoldedExpr(expr);
+}
+
+void WatWriter::PushExpr(const Expr* expr,
+                         Index operand_count,
+                         Index result_count) {
+  if (operand_count <= expr_tree_stack_.size()) {
+    auto last_operand = expr_tree_stack_.end();
+    auto first_operand = last_operand - operand_count;
+    ExprTree tree(expr);
+    std::move(first_operand, last_operand, std::back_inserter(tree.children));
+    expr_tree_stack_.erase(first_operand, last_operand);
+    expr_tree_stack_.push_back(std::move(tree));
+    if (result_count == 0)
+      FlushExprTreeStack();
+  } else {
+    expr_tree_stack_.emplace_back(expr);
+    FlushExprTreeStack();
+  }
+}
+
+void WatWriter::FlushExprTree(const ExprTree& expr_tree) {
+  switch (expr_tree.expr->type) {
+    case ExprType::Block:
+      WritePuts("(", NextChar::None);
+      WriteBeginBlock(LabelType::Block, expr_tree.expr->block,
+                      get_opcode_name(Opcode::Block));
+      WriteFoldedExprList(expr_tree.expr->block->first);
+      FlushExprTreeStack();
+      WriteCloseNewline();
+      break;
+
+    case ExprType::Loop:
+      WritePuts("(", NextChar::None);
+      WriteBeginBlock(LabelType::Loop, expr_tree.expr->loop,
+                      get_opcode_name(Opcode::Loop));
+      WriteFoldedExprList(expr_tree.expr->loop->first);
+      FlushExprTreeStack();
+      WriteCloseNewline();
+      break;
+
+    case ExprType::If:
+      WritePuts("(", NextChar::None);
+      WriteBeginBlock(LabelType::If, expr_tree.expr->if_.true_,
+                      get_opcode_name(Opcode::If));
+      FlushExprTreeVector(expr_tree.children);
+      WriteOpenNewline("then");
+      WriteFoldedExprList(expr_tree.expr->if_.true_->first);
+      FlushExprTreeStack();
+      WriteCloseNewline();
+      if (expr_tree.expr->if_.false_) {
+        WriteOpenNewline("else");
+        WriteFoldedExprList(expr_tree.expr->if_.false_);
+        FlushExprTreeStack();
+        WriteCloseNewline();
+      }
+      WriteCloseNewline();
+      break;
+
+    default: {
+      WritePuts("(", NextChar::None);
+      WriteExpr(expr_tree.expr);
+      Indent();
+      FlushExprTreeVector(expr_tree.children);
+      WriteCloseNewline();
+      break;
+    }
+  }
+}
+
+void WatWriter::FlushExprTreeVector(const std::vector<ExprTree>& expr_trees) {
+  for (auto expr_tree : expr_trees)
+    FlushExprTree(expr_tree);
+}
+
+void WatWriter::FlushExprTreeStack() {
+  std::vector<ExprTree> stack_copy(std::move(expr_tree_stack_));
+  expr_tree_stack_.clear();
+  FlushExprTreeVector(stack_copy);
+}
+
+void WatWriter::WriteInitExpr(const Expr* expr) {
+  if (expr) {
+    WritePuts("(", NextChar::None);
+    WriteExpr(expr);
+    /* clear the next char, so we don't write a newline after the expr */
+    next_char_ = NextChar::None;
+    WritePuts(")", NextChar::Space);
+  }
+}
+
+void WatWriter::WriteTypeBindings(const char* prefix,
+                                  const Func* func,
+                                  const TypeVector& types,
+                                  const BindingHash& bindings) {
+  MakeTypeBindingReverseMapping(types, bindings, &index_to_name_);
+
+  /* named params/locals must be specified by themselves, but nameless
+   * params/locals can be compressed, e.g.:
+   *   (param $foo i32)
+   *   (param i32 i64 f32)
+   */
+  bool is_open = false;
+  for (size_t i = 0; i < types.size(); ++i) {
+    if (!is_open) {
+      WriteOpenSpace(prefix);
+      is_open = true;
+    }
+
+    const std::string& name = index_to_name_[i];
+    if (!name.empty())
+      WriteString(name, NextChar::Space);
+    WriteType(types[i], NextChar::Space);
+    if (!name.empty()) {
+      WriteCloseSpace();
+      is_open = false;
+    }
+  }
+  if (is_open)
+    WriteCloseSpace();
+}
+
+void WatWriter::WriteFunc(const Module* module, const Func* func) {
+  WriteOpenSpace("func");
+  WriteNameOrIndex(&func->name, func_index_, NextChar::Space);
+  WriteInlineExport(func_to_export_map_[func_index_]);
+  if (func->decl.has_func_type) {
+    WriteOpenSpace("type");
+    WriteVar(&func->decl.type_var, NextChar::None);
+    WriteCloseSpace();
+  }
+  WriteTypeBindings("param", func, func->decl.sig.param_types,
+                    func->param_bindings);
+  WriteTypes(func->decl.sig.result_types, "result");
+  WriteNewline(NO_FORCE_NEWLINE);
+  if (func->local_types.size()) {
+    WriteTypeBindings("local", func, func->local_types, func->local_bindings);
+  }
+  WriteNewline(NO_FORCE_NEWLINE);
+  label_stack_.clear();
+  label_stack_.emplace_back(LabelType::Func, empty_string_slice(),
+                            func->decl.sig.result_types);
+  current_func_ = func;
+  if (options_->fold_exprs) {
+    WriteFoldedExprList(func->first_expr);
+    FlushExprTreeStack();
+  } else {
+    WriteExprList(func->first_expr);
+  }
+  current_func_ = nullptr;
+  WriteCloseNewline();
+  func_index_++;
+}
+
+void WatWriter::WriteBeginGlobal(const Global* global) {
+  WriteOpenSpace("global");
+  WriteNameOrIndex(&global->name, global_index_, NextChar::Space);
+  WriteInlineExport(global_to_export_map_[global_index_]);
+  if (global->mutable_) {
+    WriteOpenSpace("mut");
+    WriteType(global->type, NextChar::Space);
+    WriteCloseSpace();
+  } else {
+    WriteType(global->type, NextChar::Space);
+  }
+  global_index_++;
+}
+
+void WatWriter::WriteGlobal(const Global* global) {
+  WriteBeginGlobal(global);
+  WriteInitExpr(global->init_expr);
+  WriteCloseNewline();
+}
+
+void WatWriter::WriteLimits(const Limits* limits) {
+  Writef("%" PRIu64, limits->initial);
+  if (limits->has_max)
+    Writef("%" PRIu64, limits->max);
+}
+
+void WatWriter::WriteTable(const Table* table) {
+  WriteOpenSpace("table");
+  WriteNameOrIndex(&table->name, table_index_, NextChar::Space);
+  WriteInlineExport(table_to_export_map_[table_index_]);
+  WriteLimits(&table->elem_limits);
+  WritePutsSpace("anyfunc");
+  WriteCloseNewline();
+  table_index_++;
+}
+
+void WatWriter::WriteElemSegment(const ElemSegment* segment) {
+  WriteOpenSpace("elem");
+  WriteInitExpr(segment->offset);
+  for (const Var& var : segment->vars)
+    WriteVar(&var, NextChar::Space);
+  WriteCloseNewline();
+}
+
+void WatWriter::WriteMemory(const Memory* memory) {
+  WriteOpenSpace("memory");
+  WriteNameOrIndex(&memory->name, memory_index_, NextChar::Space);
+  WriteInlineExport(memory_to_export_map_[memory_index_]);
+  WriteLimits(&memory->page_limits);
+  WriteCloseNewline();
+  memory_index_++;
+}
+
+void WatWriter::WriteDataSegment(const DataSegment* segment) {
+  WriteOpenSpace("data");
+  WriteInitExpr(segment->offset);
+  WriteQuotedData(segment->data, segment->size);
+  WriteCloseNewline();
+}
+
+void WatWriter::WriteImport(const Import* import) {
+  WriteOpenSpace("import");
+  WriteQuotedStringSlice(&import->module_name, NextChar::Space);
+  WriteQuotedStringSlice(&import->field_name, NextChar::Space);
+  switch (import->kind) {
+    case ExternalKind::Func:
+      WriteOpenSpace("func");
+      WriteNameOrIndex(&import->func->name, func_index_++, NextChar::Space);
+      if (import->func->decl.has_func_type) {
+        WriteOpenSpace("type");
+        WriteVar(&import->func->decl.type_var, NextChar::None);
+        WriteCloseSpace();
+      } else {
+        WriteFuncSigSpace(&import->func->decl.sig);
+      }
+      WriteCloseSpace();
+      break;
+
+    case ExternalKind::Table:
+      WriteTable(import->table);
+      break;
+
+    case ExternalKind::Memory:
+      WriteMemory(import->memory);
+      break;
+
+    case ExternalKind::Global:
+      WriteBeginGlobal(import->global);
+      WriteCloseSpace();
+      break;
+
+    case ExternalKind::Except:
+      // TODO(karlschimpf) Define
+      WABT_FATAL("WriteImport(except) not implemented");
+      break;
+  }
+  WriteCloseNewline();
+}
+
+void WatWriter::WriteExport(const Export* export_) {
+  if (options_->inline_export)
+    return;
+  WriteOpenSpace("export");
+  WriteQuotedStringSlice(&export_->name, NextChar::Space);
+  WriteOpenSpace(get_kind_name(export_->kind));
+  WriteVar(&export_->var, NextChar::Space);
+  WriteCloseSpace();
+  WriteCloseNewline();
+}
+
+void WatWriter::WriteFuncType(const FuncType* func_type) {
+  WriteOpenSpace("type");
+  WriteNameOrIndex(&func_type->name, func_type_index_++, NextChar::Space);
+  WriteOpenSpace("func");
+  WriteFuncSigSpace(&func_type->sig);
+  WriteCloseSpace();
+  WriteCloseNewline();
+}
+
+void WatWriter::WriteStartFunction(const Var* start) {
+  WriteOpenSpace("start");
+  WriteVar(start, NextChar::None);
+  WriteCloseNewline();
+}
+
+Result WatWriter::WriteModule(const Module* module) {
+  module_ = module;
+  BuildExportMaps();
+  WriteOpenNewline("module");
+  for (const ModuleField* field = module->first_field; field;
+       field = field->next) {
+    switch (field->type) {
+      case ModuleFieldType::Func:
+        WriteFunc(module, field->func);
+        break;
+      case ModuleFieldType::Global:
+        WriteGlobal(field->global);
+        break;
+      case ModuleFieldType::Import:
+        WriteImport(field->import);
+        break;
+      case ModuleFieldType::Except:
+        // TODO(karlschimpf) Define
+        WABT_FATAL("WriteModule(except) not implemented");
+        break;
+      case ModuleFieldType::Export:
+        WriteExport(field->export_);
+        break;
+      case ModuleFieldType::Table:
+        WriteTable(field->table);
+        break;
+      case ModuleFieldType::ElemSegment:
+        WriteElemSegment(field->elem_segment);
+        break;
+      case ModuleFieldType::Memory:
+        WriteMemory(field->memory);
+        break;
+      case ModuleFieldType::DataSegment:
+        WriteDataSegment(field->data_segment);
+        break;
+      case ModuleFieldType::FuncType:
+        WriteFuncType(field->func_type);
+        break;
+      case ModuleFieldType::Start:
+        WriteStartFunction(&field->start);
+        break;
+    }
+  }
+  WriteCloseNewline();
+  /* force the newline to be written */
+  WriteNextChar();
+  return result_;
+}
+
+void WatWriter::BuildExportMaps() {
+  assert(module_);
+  func_to_export_map_.resize(module_->funcs.size());
+  global_to_export_map_.resize(module_->globals.size());
+  table_to_export_map_.resize(module_->tables.size());
+  memory_to_export_map_.resize(module_->memories.size());
+  for (Export* export_ : module_->exports) {
+    switch (export_->kind) {
+      case ExternalKind::Func: {
+        Index func_index = module_->GetFuncIndex(export_->var);
+        if (func_index != kInvalidIndex)
+          func_to_export_map_[func_index] = export_;
+        break;
+      }
+
+      case ExternalKind::Table: {
+        Index table_index = module_->GetTableIndex(export_->var);
+        if (table_index != kInvalidIndex)
+          table_to_export_map_[table_index] = export_;
+        break;
+      }
+
+      case ExternalKind::Memory: {
+        Index memory_index = module_->GetMemoryIndex(export_->var);
+        if (memory_index != kInvalidIndex)
+          memory_to_export_map_[memory_index] = export_;
+        break;
+      }
+
+      case ExternalKind::Global: {
+        Index global_index = module_->GetGlobalIndex(export_->var);
+        if (global_index != kInvalidIndex)
+          global_to_export_map_[global_index] = export_;
+        break;
+      }
+
+      case ExternalKind::Except:
+        WABT_FATAL("BuildExportMaps(except) not implemented");
+        break;
+    }
+  }
+}
+
+void WatWriter::WriteInlineExport(const Export* export_) {
+  if (export_ && options_->inline_export) {
+    WriteOpenSpace("export");
+    WriteQuotedStringSlice(&export_->name, NextChar::None);
+    WriteCloseSpace();
+  }
+}
+
+}  // namespace
+
+Result write_wat(Writer* writer,
+                 const Module* module,
+                 const WriteWatOptions* options) {
+  WatWriter wat_writer(writer, options);
+  return wat_writer.WriteModule(module);
+}
+
+}  // namespace wabt
diff --git a/lib/wabt/src/ast-writer.h b/lib/wabt/src/wat-writer.h
similarity index 71%
rename from lib/wabt/src/ast-writer.h
rename to lib/wabt/src/wat-writer.h
index 950e640..ec685fb 100644
--- a/lib/wabt/src/ast-writer.h
+++ b/lib/wabt/src/wat-writer.h
@@ -14,18 +14,23 @@
  * limitations under the License.
  */
 
-#ifndef WABT_AST_WRITER_H_
-#define WABT_AST_WRITER_H_
+#ifndef WABT_WAT_WRITER_H_
+#define WABT_WAT_WRITER_H_
 
 #include "common.h"
 
 namespace wabt {
 
 struct Module;
-struct Writer;
+class Writer;
 
-Result write_ast(struct Writer*, const struct Module*);
+struct WriteWatOptions {
+  bool fold_exprs = false;  // Write folded expressions.
+  bool inline_export = false;
+};
+
+Result write_wat(Writer*, const Module*, const WriteWatOptions*);
 
 }  // namespace wabt
 
-#endif /* WABT_AST_WRITER_H_ */
+#endif /* WABT_WAT_WRITER_H_ */
diff --git a/lib/wabt/src/writer.cc b/lib/wabt/src/writer.cc
index 8e24abc..1e25fe2 100644
--- a/lib/wabt/src/writer.cc
+++ b/lib/wabt/src/writer.cc
@@ -16,174 +16,32 @@
 
 #include "writer.h"
 
-#include <assert.h>
-#include <errno.h>
-#include <memory.h>
-#include <stdio.h>
-#include <stdlib.h>
+#include <cassert>
+#include <cerrno>
+#include <cstdio>
+#include <cstdlib>
+#include <utility>
 
 #define ERROR0(msg) fprintf(stderr, "%s:%d: " msg, __FILE__, __LINE__)
 #define ERROR(fmt, ...) \
   fprintf(stderr, "%s:%d: " fmt, __FILE__, __LINE__, __VA_ARGS__)
 
-#define INITIAL_OUTPUT_BUFFER_CAPACITY (64 * 1024)
-
 namespace wabt {
 
-static Result write_data_to_file(size_t offset,
-                                 const void* data,
-                                 size_t size,
-                                 void* user_data) {
-  if (size == 0)
-    return Result::Ok;
-  FileWriter* writer = static_cast<FileWriter*>(user_data);
-  if (offset != writer->offset) {
-    if (fseek(writer->file, offset, SEEK_SET) != 0) {
-      ERROR("fseek offset=%" PRIzd " failed, errno=%d\n", size, errno);
-      return Result::Error;
-    }
-    writer->offset = offset;
-  }
-  if (fwrite(data, size, 1, writer->file) != 1) {
-    ERROR("fwrite size=%" PRIzd " failed, errno=%d\n", size, errno);
-    return Result::Error;
-  }
-  writer->offset += size;
-  return Result::Ok;
-}
-
-static Result move_data_in_file(size_t dst_offset,
-                                size_t src_offset,
-                                size_t size,
-                                void* user_data) {
-  if (size == 0)
-    return Result::Ok;
-  /* TODO(binji): implement if needed. */
-  ERROR0("move_data_in_file not implemented!\n");
-  return Result::Error;
-}
-
-void init_file_writer_existing(FileWriter* writer, FILE* file) {
-  WABT_ZERO_MEMORY(*writer);
-  writer->file = file;
-  writer->offset = 0;
-  writer->base.user_data = writer;
-  writer->base.write_data = write_data_to_file;
-  writer->base.move_data = move_data_in_file;
-}
-
-Result init_file_writer(FileWriter* writer, const char* filename) {
-  FILE* file = fopen(filename, "wb");
-  if (!file) {
-    ERROR("fopen name=\"%s\" failed, errno=%d\n", filename, errno);
-    return Result::Error;
-  }
-
-  init_file_writer_existing(writer, file);
-  return Result::Ok;
-}
-
-void close_file_writer(FileWriter* writer) {
-  fclose(writer->file);
-}
-
-void init_output_buffer(OutputBuffer* buf, size_t initial_capacity) {
-  assert(initial_capacity != 0);
-  buf->start = new char[initial_capacity]();
-  buf->size = 0;
-  buf->capacity = initial_capacity;
-}
-
-static void ensure_output_buffer_capacity(OutputBuffer* buf,
-                                          size_t ensure_capacity) {
-  if (ensure_capacity > buf->capacity) {
-    assert(buf->capacity != 0);
-    size_t new_capacity = buf->capacity * 2;
-    while (new_capacity < ensure_capacity)
-      new_capacity *= 2;
-    char* new_data = new char [new_capacity];
-    memcpy(new_data, buf->start, buf->capacity);
-    memset(new_data + buf->capacity, 0, new_capacity - buf->capacity);
-    delete [] buf->start;
-    buf->start = new_data;
-    buf->capacity = new_capacity;
-  }
-}
-
-static Result write_data_to_output_buffer(size_t offset,
-                                          const void* data,
-                                          size_t size,
-                                          void* user_data) {
-  MemoryWriter* writer = static_cast<MemoryWriter*>(user_data);
-  size_t end = offset + size;
-  ensure_output_buffer_capacity(&writer->buf, end);
-  memcpy(writer->buf.start + offset, data, size);
-  if (end > writer->buf.size)
-    writer->buf.size = end;
-  return Result::Ok;
-}
-
-static Result move_data_in_output_buffer(size_t dst_offset,
-                                         size_t src_offset,
-                                         size_t size,
-                                         void* user_data) {
-  MemoryWriter* writer = static_cast<MemoryWriter*>(user_data);
-  size_t src_end = src_offset + size;
-  size_t dst_end = dst_offset + size;
-  size_t end = src_end > dst_end ? src_end : dst_end;
-  ensure_output_buffer_capacity(&writer->buf, end);
-  void* dst = reinterpret_cast<void*>(
-      reinterpret_cast<size_t>(writer->buf.start) + dst_offset);
-  void* src = reinterpret_cast<void*>(
-      reinterpret_cast<size_t>(writer->buf.start) + src_offset);
-  memmove(dst, src, size);
-  if (end > writer->buf.size)
-    writer->buf.size = end;
-  return Result::Ok;
-}
-
-Result init_mem_writer(MemoryWriter* writer) {
-  WABT_ZERO_MEMORY(*writer);
-  writer->base.user_data = writer;
-  writer->base.write_data = write_data_to_output_buffer;
-  writer->base.move_data = move_data_in_output_buffer;
-  init_output_buffer(&writer->buf, INITIAL_OUTPUT_BUFFER_CAPACITY);
-  return Result::Ok;
-}
-
-Result init_mem_writer_existing(MemoryWriter* writer, OutputBuffer* buf) {
-  WABT_ZERO_MEMORY(*writer);
-  writer->base.user_data = writer;
-  writer->base.write_data = write_data_to_output_buffer;
-  writer->base.move_data = move_data_in_output_buffer;
-  writer->buf = *buf;
-  /* Clear buffer, since ownership has passed to the writer. */
-  WABT_ZERO_MEMORY(*buf);
-  return Result::Ok;
-}
-
-void steal_mem_writer_output_buffer(MemoryWriter* writer,
-                                    OutputBuffer* out_buf) {
-  *out_buf = writer->buf;
-  writer->buf.start = nullptr;
-  writer->buf.size = 0;
-  writer->buf.capacity = 0;
-}
-
-void close_mem_writer(MemoryWriter* writer) {
-  destroy_output_buffer(&writer->buf);
-}
-
-Result write_output_buffer_to_file(OutputBuffer* buf, const char* filename) {
+Result OutputBuffer::WriteToFile(const char* filename) const {
   FILE* file = fopen(filename, "wb");
   if (!file) {
     ERROR("unable to open %s for writing\n", filename);
     return Result::Error;
   }
 
-  ssize_t bytes = fwrite(buf->start, 1, buf->size, file);
-  if (bytes < 0 || static_cast<size_t>(bytes) != buf->size) {
-    ERROR("failed to write %" PRIzd " bytes to %s\n", buf->size, filename);
+  if (data.empty()) {
+    return Result::Ok;
+  }
+
+  ssize_t bytes = fwrite(data.data(), 1, data.size(), file);
+  if (bytes < 0 || static_cast<size_t>(bytes) != data.size()) {
+    ERROR("failed to write %" PRIzd " bytes to %s\n", data.size(), filename);
     return Result::Error;
   }
 
@@ -191,8 +49,111 @@
   return Result::Ok;
 }
 
-void destroy_output_buffer(OutputBuffer* buf) {
-  delete[] buf->start;
+MemoryWriter::MemoryWriter() : buf_(new OutputBuffer()) {}
+
+MemoryWriter::MemoryWriter(std::unique_ptr<OutputBuffer> buf)
+    : buf_(std::move(buf)) {}
+
+std::unique_ptr<OutputBuffer> MemoryWriter::ReleaseOutputBuffer() {
+  return std::move(buf_);
+}
+
+Result MemoryWriter::WriteData(size_t dst_offset,
+                               const void* src,
+                               size_t size) {
+  if (size == 0)
+    return Result::Ok;
+  size_t end = dst_offset + size;
+  if (end > buf_->data.size()) {
+    buf_->data.resize(end);
+  }
+  uint8_t* dst = &buf_->data[dst_offset];
+  memcpy(dst, src, size);
+  return Result::Ok;
+}
+
+Result MemoryWriter::MoveData(size_t dst_offset,
+                              size_t src_offset,
+                              size_t size) {
+  if (size == 0)
+    return Result::Ok;
+  size_t src_end = src_offset + size;
+  size_t dst_end = dst_offset + size;
+  size_t end = src_end > dst_end ? src_end : dst_end;
+  if (end > buf_->data.size()) {
+    buf_->data.resize(end);
+  }
+
+  uint8_t* dst = &buf_->data[dst_offset];
+  uint8_t* src = &buf_->data[src_offset];
+  memmove(dst, src, size);
+  return Result::Ok;
+}
+
+FileWriter::FileWriter(FILE* file)
+    : file_(file), offset_(0), should_close_(false) {}
+
+FileWriter::FileWriter(const char* filename)
+    : file_(nullptr), offset_(0), should_close_(false) {
+  file_ = fopen(filename, "wb");
+
+  // TODO(binji): this is pretty cheesy, should come up with a better API.
+  if (file_) {
+    should_close_ = true;
+  } else {
+    ERROR("fopen name=\"%s\" failed, errno=%d\n", filename, errno);
+  }
+}
+
+FileWriter::FileWriter(FileWriter&& other) {
+  *this = std::move(other);
+}
+
+FileWriter& FileWriter::operator=(FileWriter&& other) {
+  file_ = other.file_;
+  offset_ = other.offset_;
+  should_close_ = other.should_close_;
+  other.file_ = nullptr;
+  other.offset_ = 0;
+  other.should_close_ = false;
+  return *this;
+}
+
+FileWriter::~FileWriter() {
+  // We don't want to close existing files (stdout/sterr, for example).
+  if (should_close_) {
+    fclose(file_);
+  }
+}
+
+Result FileWriter::WriteData(size_t at, const void* data, size_t size) {
+  if (!file_)
+    return Result::Error;
+  if (size == 0)
+    return Result::Ok;
+  if (at != offset_) {
+    if (fseek(file_, at, SEEK_SET) != 0) {
+      ERROR("fseek offset=%" PRIzd " failed, errno=%d\n", size, errno);
+      return Result::Error;
+    }
+    offset_ = at;
+  }
+  if (fwrite(data, size, 1, file_) != 1) {
+    ERROR("fwrite size=%" PRIzd " failed, errno=%d\n", size, errno);
+    return Result::Error;
+  }
+  offset_ += size;
+  return Result::Ok;
+}
+
+Result FileWriter::MoveData(size_t dst_offset, size_t src_offset, size_t size) {
+  if (!file_)
+    return Result::Error;
+  if (size == 0)
+    return Result::Ok;
+  // TODO(binji): implement if needed.
+  ERROR0("FileWriter::MoveData not implemented!\n");
+  return Result::Error;
 }
 
 }  // namespace wabt
diff --git a/lib/wabt/src/writer.h b/lib/wabt/src/writer.h
index 19d7094..555820b 100644
--- a/lib/wabt/src/writer.h
+++ b/lib/wabt/src/writer.h
@@ -21,54 +21,63 @@
 
 #include "common.h"
 
+#include <memory>
+#include <vector>
+
 namespace wabt {
 
-struct Writer {
-  void* user_data;
-  Result (*write_data)(size_t offset,
-                       const void* data,
-                       size_t size,
-                       void* user_data);
-  Result (*move_data)(size_t dst_offset,
-                      size_t src_offset,
-                      size_t size,
-                      void* user_data);
-};
-
 struct OutputBuffer {
-  char* start;
-  size_t size;
-  size_t capacity;
+  Result WriteToFile(const char* filename) const;
+
+  size_t size() const { return data.size(); }
+
+  std::vector<uint8_t> data;
 };
 
-struct MemoryWriter {
-  Writer base;
-  OutputBuffer buf;
+class Writer {
+ public:
+  virtual ~Writer() {}
+  virtual Result WriteData(size_t offset, const void* data, size_t size) = 0;
+  virtual Result MoveData(size_t dst_offset,
+                          size_t src_offset,
+                          size_t size) = 0;
 };
 
-struct FileWriter {
-  Writer base;
-  FILE* file;
-  size_t offset;
+class MemoryWriter : public Writer {
+ public:
+  MemoryWriter();
+  explicit MemoryWriter(std::unique_ptr<OutputBuffer>);
+
+  OutputBuffer& output_buffer() { return *buf_; }
+  std::unique_ptr<OutputBuffer> ReleaseOutputBuffer();
+
+  virtual Result WriteData(size_t offset, const void* data, size_t size);
+  virtual Result MoveData(size_t dst_offset, size_t src_offset, size_t size);
+
+ private:
+  std::unique_ptr<OutputBuffer> buf_;
 };
 
-/* FileWriter */
-Result init_file_writer(FileWriter* writer, const char* filename);
-void init_file_writer_existing(FileWriter* writer, FILE* file);
-void close_file_writer(FileWriter* writer);
+class FileWriter : public Writer {
+  WABT_DISALLOW_COPY_AND_ASSIGN(FileWriter);
 
-/* MemoryWriter */
-Result init_mem_writer(MemoryWriter* writer);
-/* Passes ownership of the buffer to writer */
-Result init_mem_writer_existing(MemoryWriter* writer, OutputBuffer* buf);
-void steal_mem_writer_output_buffer(MemoryWriter* writer,
-                                    OutputBuffer* out_buf);
-void close_mem_writer(MemoryWriter* writer);
+ public:
+  explicit FileWriter(const char* filename);
+  explicit FileWriter(FILE* file);
+  FileWriter(FileWriter&&);
+  FileWriter& operator=(FileWriter&&);
+  ~FileWriter();
 
-/* OutputBuffer */
-void init_output_buffer(OutputBuffer* buf, size_t initial_capacity);
-Result write_output_buffer_to_file(OutputBuffer* buf, const char* filename);
-void destroy_output_buffer(OutputBuffer* buf);
+  bool is_open() const { return file_ != nullptr; }
+
+  virtual Result WriteData(size_t offset, const void* data, size_t size);
+  virtual Result MoveData(size_t dst_offset, size_t src_offset, size_t size);
+
+ private:
+  FILE* file_;
+  size_t offset_;
+  bool should_close_;
+};
 
 }  // namespace wabt
 
diff --git a/lib/wabt/wabt.vcxproj b/lib/wabt/wabt.vcxproj
index 9987295..cd07154 100644
--- a/lib/wabt/wabt.vcxproj
+++ b/lib/wabt/wabt.vcxproj
@@ -29,6 +29,9 @@
       </AdditionalIncludeDirectories>
       <WarningLevel>TurnOffAllWarnings</WarningLevel>
       <TreatWarningAsError>false</TreatWarningAsError>
+      <DisableSpecificWarnings>
+        %(DisableSpecificWarnings);
+        4996; <!-- Call to 'std::move' with parameters that may be unsafe; could also disable with -D_SCL_SECURE_NO_WARNINGS --></DisableSpecificWarnings>
     </ClCompile>
   </ItemDefinitionGroup>
   <!-- Do not build wabt with old toolset -->
@@ -36,44 +39,50 @@
     <ClCompile Include="$(MSBuildThisFileDirectory)chakra\wabtapi.cc">
       <WarningLevel>Level4</WarningLevel>
     </ClCompile>
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\ast.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\ast-parser-lexer-shared.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\prebuilt\ast-lexer-gen.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\prebuilt\ast-parser-gen.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\type-checker.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\validator.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\binary-reader.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\binary-writer.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\binary-writer-spec.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\binary-reader-ast.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\binding-hash.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\ast-writer.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\binary-reader-interpreter.cc" />
     <ClCompile Include="$(MSBuildThisFileDirectory)src\apply-names.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\generate-names.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\resolve-names.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\binary-error-handler.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\binary-reader-ir.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\binary-reader-logging.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\binary-reader-objdump.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\binary-reader-opcnt.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\binary-reader.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\binary-writer-spec.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\binary-writer.cc" />
     <ClCompile Include="$(MSBuildThisFileDirectory)src\binary.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\binding-hash.cc" />
     <ClCompile Include="$(MSBuildThisFileDirectory)src\common.cc" />
     <ClCompile Include="$(MSBuildThisFileDirectory)src\config.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\literal.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\stream.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\writer.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\emscripten-helpers.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\expr-visitor.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\generate-names.cc" />
     <ClCompile Include="$(MSBuildThisFileDirectory)src\hash-util.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\ir.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\lexer-source-line-finder.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\lexer-source.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\literal.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\opcode.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\option-parser.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\prebuilt\wast-lexer-gen.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\prebuilt\wast-parser-gen.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\resolve-names.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\source-error-handler.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\stream.cc" />
     <ClCompile Include="$(MSBuildThisFileDirectory)src\string-view.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\type-checker.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\utf8.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\validator.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\wast-parser-lexer-shared.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\wat-writer.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\writer.cc" />
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="chakra\wabtapi.h" />
     <ClInclude Include="chakra\windows\config.h" />
     <ClInclude Include="src\apply-names.h" />
-    <ClInclude Include="src\hash-util.h" />
-    <ClInclude Include="src\ast-lexer.h" />
-    <ClInclude Include="src\ast-parser-lexer-shared.h" />
-    <ClInclude Include="src\ast-parser.h" />
-    <ClInclude Include="src\ast-writer.h" />
-    <ClInclude Include="src\ast.h" />
-    <ClInclude Include="src\binary-reader-ast.h" />
-    <ClInclude Include="src\binary-reader-interpreter.h" />
-    <ClInclude Include="src\binary-reader-linker.h" />
+    <ClInclude Include="src\binary-error-handler.h" />
+    <ClInclude Include="src\binary-reader-ir.h" />
+    <ClInclude Include="src\binary-reader-logging.h" />
+    <ClInclude Include="src\binary-reader-nop.h" />
     <ClInclude Include="src\binary-reader-objdump.h" />
     <ClInclude Include="src\binary-reader-opcnt.h" />
     <ClInclude Include="src\binary-reader.h" />
@@ -82,14 +91,30 @@
     <ClInclude Include="src\binary.h" />
     <ClInclude Include="src\binding-hash.h" />
     <ClInclude Include="src\common.h" />
+    <ClInclude Include="src\expr-visitor.h" />
     <ClInclude Include="src\generate-names.h" />
+    <ClInclude Include="src\hash-util.h" />
+    <ClInclude Include="src\ir.h" />
+    <ClInclude Include="src\lexer-source-line-finder.h" />
+    <ClInclude Include="src\lexer-source.h" />
     <ClInclude Include="src\literal.h" />
+    <ClInclude Include="src\opcode.def" />
+    <ClInclude Include="src\opcode.h" />
+    <ClInclude Include="src\option-parser.h" />
+    <ClInclude Include="src\prebuilt\wast-parser-gen.hh" />
+    <ClInclude Include="src\range.h" />
     <ClInclude Include="src\resolve-names.h" />
+    <ClInclude Include="src\source-error-handler.h" />
     <ClInclude Include="src\stream.h" />
     <ClInclude Include="src\string-view.h" />
     <ClInclude Include="src\type-checker.h" />
+    <ClInclude Include="src\utf8.h" />
     <ClInclude Include="src\validator.h" />
     <ClInclude Include="src\wasm-link.h" />
+    <ClInclude Include="src\wast-lexer.h" />
+    <ClInclude Include="src\wast-parser-lexer-shared.h" />
+    <ClInclude Include="src\wast-parser.h" />
+    <ClInclude Include="src\wat-writer.h" />
     <ClInclude Include="src\writer.h" />
   </ItemGroup>
   <Import Project="$(BuildConfigPropsPath)Chakra.Build.targets" Condition="exists('$(BuildConfigPropsPath)Chakra.Build.targets')" />
diff --git a/lib/wabt/wabt.vcxproj.filters b/lib/wabt/wabt.vcxproj.filters
index 97d6204..f51bb34 100644
--- a/lib/wabt/wabt.vcxproj.filters
+++ b/lib/wabt/wabt.vcxproj.filters
@@ -2,44 +2,50 @@
 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup>
     <ClCompile Include="$(MSBuildThisFileDirectory)chakra\wabtapi.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\ast.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\ast-parser-lexer-shared.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\prebuilt\ast-lexer-gen.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\prebuilt\ast-parser-gen.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\type-checker.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\validator.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\binary-reader.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\binary-writer.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\binary-writer-spec.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\binary-reader-ast.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\binding-hash.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\ast-writer.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\binary-reader-interpreter.cc" />
     <ClCompile Include="$(MSBuildThisFileDirectory)src\apply-names.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\generate-names.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\resolve-names.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\binary-error-handler.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\binary-reader-ir.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\binary-reader-logging.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\binary-reader-objdump.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\binary-reader-opcnt.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\binary-reader.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\binary-writer-spec.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\binary-writer.cc" />
     <ClCompile Include="$(MSBuildThisFileDirectory)src\binary.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\binding-hash.cc" />
     <ClCompile Include="$(MSBuildThisFileDirectory)src\common.cc" />
     <ClCompile Include="$(MSBuildThisFileDirectory)src\config.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\literal.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\stream.cc" />
-    <ClCompile Include="$(MSBuildThisFileDirectory)src\writer.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\emscripten-helpers.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\expr-visitor.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\generate-names.cc" />
     <ClCompile Include="$(MSBuildThisFileDirectory)src\hash-util.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\ir.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\lexer-source-line-finder.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\lexer-source.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\literal.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\opcode.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\option-parser.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\prebuilt\wast-lexer-gen.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\prebuilt\wast-parser-gen.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\resolve-names.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\source-error-handler.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\stream.cc" />
     <ClCompile Include="$(MSBuildThisFileDirectory)src\string-view.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\type-checker.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\utf8.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\validator.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\wast-parser-lexer-shared.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\wat-writer.cc" />
+    <ClCompile Include="$(MSBuildThisFileDirectory)src\writer.cc" />
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="chakra\wabtapi.h" />
     <ClInclude Include="chakra\windows\config.h" />
     <ClInclude Include="src\apply-names.h" />
-    <ClInclude Include="src\hash-util.h" />
-    <ClInclude Include="src\ast-lexer.h" />
-    <ClInclude Include="src\ast-parser-lexer-shared.h" />
-    <ClInclude Include="src\ast-parser.h" />
-    <ClInclude Include="src\ast-writer.h" />
-    <ClInclude Include="src\ast.h" />
-    <ClInclude Include="src\binary-reader-ast.h" />
-    <ClInclude Include="src\binary-reader-interpreter.h" />
-    <ClInclude Include="src\binary-reader-linker.h" />
+    <ClInclude Include="src\binary-error-handler.h" />
+    <ClInclude Include="src\binary-reader-ir.h" />
+    <ClInclude Include="src\binary-reader-logging.h" />
+    <ClInclude Include="src\binary-reader-nop.h" />
     <ClInclude Include="src\binary-reader-objdump.h" />
     <ClInclude Include="src\binary-reader-opcnt.h" />
     <ClInclude Include="src\binary-reader.h" />
@@ -48,14 +54,30 @@
     <ClInclude Include="src\binary.h" />
     <ClInclude Include="src\binding-hash.h" />
     <ClInclude Include="src\common.h" />
+    <ClInclude Include="src\expr-visitor.h" />
     <ClInclude Include="src\generate-names.h" />
+    <ClInclude Include="src\hash-util.h" />
+    <ClInclude Include="src\ir.h" />
+    <ClInclude Include="src\lexer-source-line-finder.h" />
+    <ClInclude Include="src\lexer-source.h" />
     <ClInclude Include="src\literal.h" />
+    <ClInclude Include="src\opcode.def" />
+    <ClInclude Include="src\opcode.h" />
+    <ClInclude Include="src\option-parser.h" />
+    <ClInclude Include="src\prebuilt\wast-parser-gen.hh" />
+    <ClInclude Include="src\range.h" />
     <ClInclude Include="src\resolve-names.h" />
+    <ClInclude Include="src\source-error-handler.h" />
     <ClInclude Include="src\stream.h" />
     <ClInclude Include="src\string-view.h" />
     <ClInclude Include="src\type-checker.h" />
+    <ClInclude Include="src\utf8.h" />
     <ClInclude Include="src\validator.h" />
     <ClInclude Include="src\wasm-link.h" />
+    <ClInclude Include="src\wast-lexer.h" />
+    <ClInclude Include="src\wast-parser-lexer-shared.h" />
+    <ClInclude Include="src\wast-parser.h" />
+    <ClInclude Include="src\wat-writer.h" />
     <ClInclude Include="src\writer.h" />
   </ItemGroup>
 </Project>
\ No newline at end of file
diff --git a/manifests/Microsoft-Scripting-Chakra-Instrumentation.man b/manifests/Microsoft-Scripting-Chakra-Instrumentation.man
index 007d041..6749330 100644
--- a/manifests/Microsoft-Scripting-Chakra-Instrumentation.man
+++ b/manifests/Microsoft-Scripting-Chakra-Instrumentation.man
@@ -136,6 +136,11 @@
                     name="MemProtectHeapSize"
                     symbol="MEMPROTECT_HEAP_SIZE_KEYWORD"
                     />
+                <keyword
+                    mask="0x1000000"
+                    name="Internal"
+                    symbol="INTERNAL_KEYWORD"
+                    />
             </keywords>
             <tasks>
                 <task
@@ -928,6 +933,11 @@
                     name="Memprotect_GC_Heap_Size"
                     value="107"
                     />
+                <task
+                    eventGUID="{7aabacec-6052-4f52-9aae-10fd5b5bfc0c}"
+                    name="Jscript_Internal_Generic_Event"
+                    value="108"
+                    />
             </tasks>
             <maps>
                 <valueMap name="MethodAddressRangeMap">
@@ -1888,6 +1898,12 @@
                     name="FromGC"
                     />
                 </template>
+                <template tid="InternalGenericEvent">
+                <data
+                    inType="win:UnicodeString"
+                    name="eventData"
+                    />
+                </template>
             </templates>
             <events>
                 <event
@@ -3841,6 +3857,14 @@
                     template="MemprotectHeap"
                     value="241"
                     />
+                <event
+                    keywords="Internal"
+                    opcode="win:Info"
+                    symbol="JSCRIPT_INTERNAL_GENERIC_EVENT"
+                    task="Jscript_Internal_Generic_Event"
+                    template="InternalGenericEvent"
+                    value="242"
+                    />
             </events>
             </provider>
         </events>
diff --git a/pal/pal.vcxproj b/pal/pal.vcxproj
index 14cafdc..17631cf 100644
--- a/pal/pal.vcxproj
+++ b/pal/pal.vcxproj
@@ -1,23 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Debug|x64">
-      <Configuration>Debug</Configuration>
-      <Platform>x64</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|x64">
-      <Configuration>Release</Configuration>
-      <Platform>x64</Platform>
-    </ProjectConfiguration>
-  </ItemGroup>
+  <Import Condition="'$(ChakraBuildPathImported)'!='true'" Project="$(SolutionDir)Chakra.Build.Paths.props"/>
+  <Import Project="$(BuildConfigPropsPath)Chakra.Build.ProjectConfiguration.props" />
   <ItemGroup>
     <None Include="inc\debugmacrosext.h" />
     <None Include="inc\mbusafecrt.h" />
@@ -213,55 +197,17 @@
   <PropertyGroup Label="Globals">
     <ProjectGuid>{02D4FD92-AD34-40CA-85DF-4D6C7E3A1F22}</ProjectGuid>
     <RootNamespace>pal</RootNamespace>
-    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
   </PropertyGroup>
+  <PropertyGroup Label="Configuration">
+    <ConfigurationType>Utility</ConfigurationType>
+  </PropertyGroup>
+  <Import Project="$(BuildConfigPropsPath)Chakra.Build.Default.props" />
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <ConfigurationType>Utility</ConfigurationType>
-    <UseDebugLibraries>true</UseDebugLibraries>
-    <PlatformToolset>v140</PlatformToolset>
-    <CharacterSet>MultiByte</CharacterSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <ConfigurationType>Utility</ConfigurationType>
-    <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>v140</PlatformToolset>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
-    <CharacterSet>MultiByte</CharacterSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
-    <ConfigurationType>Utility</ConfigurationType>
-    <UseDebugLibraries>true</UseDebugLibraries>
-    <PlatformToolset>v140</PlatformToolset>
-    <CharacterSet>MultiByte</CharacterSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
-    <ConfigurationType>Utility</ConfigurationType>
-    <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>v140</PlatformToolset>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
-    <CharacterSet>MultiByte</CharacterSet>
-  </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-  <ImportGroup Label="ExtensionSettings">
-  </ImportGroup>
-  <ImportGroup Label="Shared">
-  </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+  <Import Project="$(BuildConfigPropsPath)Chakra.Build.Props" />
+  <ImportGroup Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
   </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <PropertyGroup Label="UserMacros" />
-  <PropertyGroup />
+  <Import Project="$(BuildConfigPropsPath)Chakra.Build.targets" Condition="exists('$(BuildConfigPropsPath)Chakra.Build.targets')"/>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-  <ImportGroup Label="ExtensionTargets">
-  </ImportGroup>
 </Project>
diff --git a/pal/pal.vcxproj.filters b/pal/pal.vcxproj.filters
index 78f2f20..07720ad 100644
--- a/pal/pal.vcxproj.filters
+++ b/pal/pal.vcxproj.filters
@@ -191,5 +191,11 @@
     <None Include="src\thread\pal_thread.cpp" />
     <None Include="src\thread\process.cpp" />
     <None Include="src\thread\threadsusp.cpp" />
+    <None Include="src\locale\UnicodeData.txt" />
+    <None Include="src\arch\arm\asmconstants.h" />
+    <None Include="src\arch\arm\processor.cpp" />
+    <None Include="src\cruntime\runtime_proxy.cpp" />
+    <None Include="src\cruntime\runtime_proxy.h" />
+    <None Include="inc\unixasmmacrosarm.inc" />
   </ItemGroup>
-</Project>
+</Project>
\ No newline at end of file
diff --git a/pal/src/cruntime/misc.cpp b/pal/src/cruntime/misc.cpp
index 0de9f02..f4e78ea 100644
--- a/pal/src/cruntime/misc.cpp
+++ b/pal/src/cruntime/misc.cpp
@@ -378,6 +378,10 @@
     }
 done:
     InternalLeaveCriticalSection(pthrCurrent, &gcsEnvironment);
+    if (pRet == NULL)
+    {
+        return getenv(name);
+    }
     return pRet;
 }
 
diff --git a/pal/src/cruntime/printf.cpp b/pal/src/cruntime/printf.cpp
index c276638..0b18d4f 100644
--- a/pal/src/cruntime/printf.cpp
+++ b/pal/src/cruntime/printf.cpp
@@ -1186,23 +1186,23 @@
 
                 if (Store)
                 {
-                    // sscanf_s requires that if we are trying to read "%s" or "%c" or “%[“, then
+                    // sscanf_s requires that if we are trying to read "%s" or "%c" or "%[", then
                     // the size of the buffer must follow the buffer we are trying to read into.
                     voidPtr = va_arg(ap, LPVOID);
                     unsigned typeLen = 0;
                     if ((Type == SCANF_TYPE_STRING) || (Type == SCANF_TYPE_BRACKETS))
                     {
-                        // Since this is not a Safe CRT API we don’t really know the size of the destination
+                        // Since this is not a Safe CRT API we don't really know the size of the destination
                         // buffer provided by the caller. So we have to assume that the caller has allocated
                         // enough space to hold either the width specified in the format or the entire input
-                        // string plus ‘\0’.
+                        // string plus '\0'.
                         typeLen = ((Width > 0) ? Width : strlen(Buffer)) + 1;
                     }
                     else if (Type == SCANF_TYPE_CHAR)
                     {
                         // Check whether the format string contains number of characters
                         // that should be read from the input string.
-                        // Note: ‘\0’ does not get appended in the “%c” case.
+                        // Note: '\0' does not get appended in the "%c" case.
                         typeLen = (Width > 0) ? Width : 1;
                     }
 
@@ -1431,17 +1431,17 @@
                         unsigned typeLen = 0;
                         if (Type == SCANF_TYPE_STRING)
                         {
-                            // We don’t really know the size of the destination buffer provided by the
+                            // We don't really know the size of the destination buffer provided by the
                             // caller. So we have to assume that the caller has allocated enough space
                             // to hold either the width specified in the format or the entire input
-                            // string plus ‘\0’.
+                            // string plus '\0'.
                             typeLen = ((Width > 0) ? Width : PAL_wcslen(Buffer)) + 1;
                         }
                         else if (Type == SCANF_TYPE_CHAR)
                         {
                             // Check whether the format string contains number of characters
                             // that should be read from the input string.
-                            // Note: ‘\0’ does not get appended in the “%c” case.
+                            // Note: '\0' does not get appended in the "%c" case.
                             typeLen = (Width > 0) ? Width : 1;
                         }
 
diff --git a/pal/src/cruntime/wchar.cpp b/pal/src/cruntime/wchar.cpp
index efc20a4..f186f20 100644
--- a/pal/src/cruntime/wchar.cpp
+++ b/pal/src/cruntime/wchar.cpp
@@ -1230,7 +1230,7 @@
         const char16_t *string2,
         size_t count)
 {
-    size_t i;
+    size_t i, wi = 0;
     int diff = 0;
 
     PERF_ENTRY(wmemcmp);
@@ -1241,7 +1241,13 @@
 
     if (string1 == string2) return diff;
 
-    for (i = 0; i < count; i++)
+    constexpr size_t blockSize = sizeof(size_t) / sizeof(char16_t);
+    const     size_t *num1     = (const size_t*)(string1);
+    const     size_t *num2     = (const size_t*)(string2);
+
+    while( (count > blockSize * (wi + 1)) && num1[wi] == num2[wi] ) ++wi;
+
+    for (i = blockSize * wi; i < count; ++i)
     {
         diff = string1[i] - string2[i];
         if (diff != 0)
@@ -1249,6 +1255,7 @@
             break;
         }
     }
+
     LOGEXIT("wmemcmp returning int %d\n", diff);
     PERF_EXIT(wmemcmp);
     return diff;
diff --git a/pal/src/include/pal/thread.hpp b/pal/src/include/pal/thread.hpp
index 24aa3ae..ec0e456 100644
--- a/pal/src/include/pal/thread.hpp
+++ b/pal/src/include/pal/thread.hpp
@@ -802,24 +802,29 @@
   It is useful for tracing functions to display the thread ID
   without generating any new traces.
 
-  TODO: how does the perf of pthread_self compare to
-  InternalGetCurrentThread when we find the thread in the
-  cache?
-
-  If the perf of pthread_self is comparable to that of the stack
-  bounds based lookaside system, why aren't we using it in the
-  cache?
-
   In order to match the thread ids that debuggers use at least for
   linux we need to use gettid().
 
 --*/
+#ifndef __APPLE__
+#define THREAD_LOCAL thread_local
+#else
+#define THREAD_LOCAL _Thread_local
+#endif
+
 #if defined(__LINUX__)
 #define THREADSilentGetCurrentThreadId() (SIZE_T)syscall(SYS_gettid)
 #elif defined(__APPLE__)
 inline SIZE_T THREADSilentGetCurrentThreadId() {
+#ifndef __IOS__
+    static THREAD_LOCAL SIZE_T threadIdSelf = -1;
+    if (threadIdSelf != -1) return threadIdSelf;
+#endif
     uint64_t tid;
     pthread_threadid_np(pthread_self(), &tid);
+#ifndef __IOS__
+    threadIdSelf = (SIZE_T)tid;
+#endif
     return (SIZE_T)tid;
 }
 #else
diff --git a/pal/src/init/pal.cpp b/pal/src/init/pal.cpp
index dd8d636..49be532 100644
--- a/pal/src/init/pal.cpp
+++ b/pal/src/init/pal.cpp
@@ -130,6 +130,26 @@
     /*Firstly initiate a lastError */
     SetLastError(ERROR_GEN_FAILURE);
 
+    // prevent un-reasonable stack limits. (otherwise affects mmap calls later)
+#if !defined(__IOS__) && !defined(__ANDROID__)
+#ifdef _AMD64_
+    const rlim_t maxStackSize = 8 * 1024 * 1024;   // CC Max stack size
+#else
+    const rlim_t maxStackSize = 2 * 1024 * 1024;   // CC Max stack size
+#endif
+    struct rlimit rl;
+    int err = getrlimit(RLIMIT_STACK, &rl);
+    if (!err)
+    {
+        if (rl.rlim_cur > maxStackSize)
+        {
+            rl.rlim_cur = maxStackSize;
+            err = setrlimit(RLIMIT_STACK, &rl);
+            _ASSERTE(err == 0 && "Well, the environment has a strange stack limit \
+              and setrlimit call failed to fix that");
+        }
+    }
+#endif // !__IOS__ && !__ANDROID__
     CriticalSectionSubSysInitialize();
 
     if(NULL == init_critsec)
diff --git a/pal/src/thread/pal_thread.cpp b/pal/src/thread/pal_thread.cpp
index 792bfd9..2378345 100644
--- a/pal/src/thread/pal_thread.cpp
+++ b/pal/src/thread/pal_thread.cpp
@@ -311,60 +311,6 @@
 
 /*++
 Function:
-  THREADGetThreadProcessId
-
-returns the process owner ID of the indicated hThread
---*/
-DWORD
-THREADGetThreadProcessId(
-    HANDLE hThread
-    // UNIXTODO Should take pThread parameter here (modify callers)
-    )
-{
-    CPalThread *pThread;
-    CPalThread *pTargetThread;
-    IPalObject *pobjThread = NULL;
-    PAL_ERROR palError = NO_ERROR;
-
-    DWORD dwProcessId = 0;
-
-    pThread = InternalGetCurrentThread();
-
-    palError = InternalGetThreadDataFromHandle(
-        pThread,
-        hThread,
-        0,
-        &pTargetThread,
-        &pobjThread
-        );
-
-    if (NO_ERROR != palError)
-    {
-        if (!pThread->IsDummy())
-        {
-            dwProcessId = GetCurrentProcessId();
-        }
-        else
-        {
-            ASSERT("Dummy thread passed to THREADGetProcessId\n");
-        }
-
-        if (NULL != pobjThread)
-        {
-           pobjThread->ReleaseReference(pThread);
-        }
-    }
-    else
-    {
-        ERROR("Couldn't retreive the hThread:%p pid owner !\n", hThread);
-    }
-
-
-    return dwProcessId;
-}
-
-/*++
-Function:
   GetThreadId
 
 See MSDN doc.
@@ -411,6 +357,7 @@
     return dwThreadId;
 }
 
+static THREAD_LOCAL DWORD cachedCurrentThreadId = 0;
 /*++
 Function:
   GetCurrentThreadId
@@ -422,22 +369,18 @@
 GetCurrentThreadId(
             VOID)
 {
+    if (cachedCurrentThreadId != 0) return cachedCurrentThreadId;
     DWORD dwThreadId;
 
     PERF_ENTRY(GetCurrentThreadId);
     ENTRY("GetCurrentThreadId()\n");
 
-    //
-    // TODO: should do perf test to see how this compares
-    // with calling InternalGetCurrentThread (i.e., is our lookaside
-    // cache faster on average than pthread_self?)
-    //
-
     dwThreadId = (DWORD)THREADSilentGetCurrentThreadId();
 
     LOGEXIT("GetCurrentThreadId returns DWORD %#x\n", dwThreadId);
     PERF_EXIT(GetCurrentThreadId);
 
+    cachedCurrentThreadId = dwThreadId;
     return dwThreadId;
 }
 
@@ -2834,12 +2777,6 @@
 
 #endif // HAVE_MACH_EXCEPTIONS
 
-#ifndef __APPLE__
-#define THREAD_LOCAL thread_local
-#else
-#define THREAD_LOCAL _Thread_local
-#endif
-
 #ifndef __IOS__
 static THREAD_LOCAL ULONG_PTR s_cachedHighLimit = 0;
 static THREAD_LOCAL ULONG_PTR s_cachedLowLimit = 0;
diff --git a/test/$262/$262test.js b/test/$262/$262test.js
new file mode 100644
index 0000000..e460360
--- /dev/null
+++ b/test/$262/$262test.js
@@ -0,0 +1,164 @@
+"use strict";
+var $ = {  global: this,  createRealm(options) {    options = options || {};    options.globals = options.globals || {};    var realm = WScript.LoadScript(this.source, 'samethread');    realm.$.source = this.source;    realm.$.destroy = function () {      if (options.destroy) {        options.destroy();      }    };    for(var glob in options.globals) {      realm.$.global[glob] = options.globals[glob];    }    return realm.$;  },  evalScript(code) {    try {      WScript.LoadScript(code);      return { type: 'normal', value: undefined };    } catch (e) {      return { type: 'throw', value: e };    }  },  getGlobal(name) {    return this.global[name];  },  setGlobal(name, value) {    this.global[name] = value;  },  destroy() { /* noop */ },  source: "var $ = {  global: this,  createRealm(options) {    options = options || {};    options.globals = options.globals || {};    var realm = WScript.LoadScript(this.source, 'samethread');    realm.$.source = this.source;    realm.$.destroy = function () {      if (options.destroy) {        options.destroy();      }    };    for(var glob in options.globals) {      realm.$.global[glob] = options.globals[glob];    }    return realm.$;  },  evalScript(code) {    try {      WScript.LoadScript(code);      return { type: 'normal', value: undefined };    } catch (e) {      return { type: 'throw', value: e };    }  },  getGlobal(name) {    return this.global[name];  },  setGlobal(name, value) {    this.global[name] = value;  },  destroy() { /* noop */ },  source: \"\"};"};function Test262Error(message) {
+    if (message) this.message = message;
+}
+
+Test262Error.prototype.name = "Test262Error";
+
+Test262Error.prototype.toString = function () {
+    return "Test262Error: " + this.message;
+};
+
+function $ERROR(err) {
+  if(typeof err === "object" && err !== null && "name" in err) {
+    print('test262/error ' + err.name + ': ' + err.message);
+  } else {
+    print('test262/error Test262Error: ' + err);
+  }
+}
+
+function $DONE(err) {
+  if (err) {
+    $ERROR(err);
+  }
+  print('pass');
+  $.destroy();
+}
+
+function $LOG(str) {
+  print(str);
+}
+
+
+function assert(mustBeTrue, message) {
+  if (mustBeTrue === true) {
+    return;
+  }
+
+  if (message === undefined) {
+    message = 'Expected true but got ' + String(mustBeTrue);
+  }
+  $ERROR(message);
+}
+
+assert._isSameValue = function (a, b) {
+  if (a === b) {
+    // Handle +/-0 vs. -/+0
+    return a !== 0 || 1 / a === 1 / b;
+  }
+
+  // Handle NaN vs. NaN
+  return a !== a && b !== b;
+};
+
+assert.sameValue = function (actual, expected, message) {
+  if (assert._isSameValue(actual, expected)) {
+    return;
+  }
+
+  if (message === undefined) {
+    message = '';
+  } else {
+    message += ' ';
+  }
+
+  message += 'Expected SameValue(«' + String(actual) + '», «' + String(expected) + '») to be true';
+
+  $ERROR(message);
+};
+
+assert.notSameValue = function (actual, unexpected, message) {
+  if (!assert._isSameValue(actual, unexpected)) {
+    return;
+  }
+
+  if (message === undefined) {
+    message = '';
+  } else {
+    message += ' ';
+  }
+
+  message += 'Expected SameValue(«' + String(actual) + '», «' + String(unexpected) + '») to be false';
+
+  $ERROR(message);
+};
+
+assert.throws = function (expectedErrorConstructor, func, message) {
+  if (typeof func !== "function") {
+    $ERROR('assert.throws requires two arguments: the error constructor ' +
+      'and a function to run');
+    return;
+  }
+  if (message === undefined) {
+    message = '';
+  } else {
+    message += ' ';
+  }
+
+  try {
+    func();
+  } catch (thrown) {
+    if (typeof thrown !== 'object' || thrown === null) {
+      message += 'Thrown value was not an object!';
+      $ERROR(message);
+    } else if (thrown.constructor !== expectedErrorConstructor) {
+      message += 'Expected a ' + expectedErrorConstructor.name + ' but got a ' + thrown.constructor.name;
+      $ERROR(message);
+    }
+    return;
+  }
+
+  message += 'Expected a ' + expectedErrorConstructor.name + ' to be thrown but no exception was thrown at all';
+  $ERROR(message);
+};
+
+assert.throws.early = function(err, code) {
+  let wrappedCode = `function wrapperFn() { ${code} }`;
+  let ieval = eval;
+
+  assert.throws(err, () => { Function(wrappedCode); }, `Function: ${code}`);
+};
+
+
+// Create workers and start them all spinning.  We set atomic slots to make
+// them go into a wait, thus controlling the waiting order.  Then we wake them
+// one by one and observe the wakeup order.
+
+for ( var i=0 ; i < 3 ; i++ ) {
+$262.agent.start(
+`
+$262.agent.receiveBroadcast(function (sab) {
+  var ia = new Int32Array(sab);
+  while (Atomics.load(ia, ${i+1}) == 0);
+  $262.agent.report(${i} + Atomics.wait(ia, 0, 0));
+  $262.agent.leaving();
+})
+`);
+}
+
+var ia = new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT*4));
+$262.agent.broadcast(ia.buffer);
+
+// Make them sleep in order 0 1 2 on ia[0]
+for ( var i=0 ; i < 3 ; i++ ) {
+  Atomics.store(ia, i+1, 1);
+  $262.agent.sleep(500);
+}
+
+// Wake them up one at a time and check the order is 0 1 2
+for ( var i=0 ; i < 3 ; i++ ) {
+  assert.sameValue(Atomics.wake(ia, 0, 1), 1);
+  assert.sameValue(getReport(), i + "ok");
+}
+
+function getReport() {
+    var r;
+    while ((r = $262.agent.getReport()) == null)
+        $262.agent.sleep(100);
+    return r;
+}
+
+
+
+;$DONE();
+;$.destroy();
\ No newline at end of file
diff --git a/test/$262/rlexe.xml b/test/$262/rlexe.xml
new file mode 100644
index 0000000..04712a5
--- /dev/null
+++ b/test/$262/rlexe.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<regress-exe>
+  <test>
+    <default>
+      <compile-flags>-$262</compile-flags>
+      <tags>exclude_xplat</tags>
+      <files>$262test.js</files>
+    </default>
+  </test>
+</regress-exe>
diff --git a/test/ASMJSParser/rlexe.xml b/test/ASMJSParser/rlexe.xml
index 4197845..1a51882 100644
--- a/test/ASMJSParser/rlexe.xml
+++ b/test/ASMJSParser/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
diff --git a/test/Array/bug_12044876.js b/test/Array/bug_12044876.js
new file mode 100644
index 0000000..cce7a59
--- /dev/null
+++ b/test/Array/bug_12044876.js
@@ -0,0 +1,38 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+//switches: -forcearraybtree
+
+// x86debug: lib\runtime\Library/JavascriptArray.inl, current->left >= lastindex
+function test0() {
+    var arr = [4294967296];
+    arr[9] = 19;
+    arr.unshift(1, 2, {}, 4, 5, 6, 7, 8, 9, 10, 11, 12);
+}
+
+// x64debug: lib\Runtime\Library\SparseArraySegment.cpp, length <= size
+function test1() {
+    function makeArrayLength() {
+      return 100;
+    }
+    var obj0 = {};
+    var protoObj0 = {};
+    var obj1 = {};
+    var arrObj0 = {};
+    var func0 = function () {
+    };
+    var func1 = function () {
+    };
+    obj0.method1 = func0;
+    var ary = Array();
+    var IntArr1 = new Array();
+    IntArr1[15] = ~obj1.prop0;
+    arrObj0.length = makeArrayLength();
+    IntArr1[10] = arrObj0.length;
+    makeArrayLength(IntArr1.unshift(func1(), ary, obj0.method1(), protoObj0, Object(), arrObj0, -1877547837));
+}
+
+test0();
+test1();
+console.log("Pass");
diff --git a/test/Array/rlexe.xml b/test/Array/rlexe.xml
index f559025..2066c09 100644
--- a/test/Array/rlexe.xml
+++ b/test/Array/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
@@ -162,21 +162,19 @@
     <default>
       <files>bug612012.js</files>
       <compile-flags>-maxinterpretcount:1 -loopinterpretcount:1 -force:fieldhoist -ForceArrayBTree -oopjit-</compile-flags>
-      <tags>exclude_ship,exclude_serialized</tags>
+      <tags>exclude_serialized</tags>
     </default>
   </test>
   <test>
     <default>
       <files>SegmentMapFlagResetInJSArrayConstructor.js</files>
       <compile-flags> -maxinterpretcount:1 -maxsimplejitruncount:2  -ForceArrayBTree</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
     <default>
       <files>LastUsedSegmentHasNULLElement.js</files>
       <compile-flags> -maxinterpretcount:1 -maxsimplejitruncount:2  -ForceArrayBTree</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -638,49 +636,51 @@
     </default>
   </test>
   <test>
-     <default>
-        <files>memset.js</files>
-        <compile-flags>-mic:1 -off:simplejit -off:JITLoopBody -off:inline -mmoc:0</compile-flags>
-     </default>
+    <default>
+      <files>memset.js</files>
+      <compile-flags>-mic:1 -off:simplejit -off:JITLoopBody -off:inline -mmoc:0</compile-flags>
+    </default>
   </test>
   <test>
-     <default>
-        <files>memset_invariant.js</files>
-        <tags>Slow</tags>
-        <compile-flags>-mic:1 -off:simplejit -mmoc:0 -off:JITLoopBody</compile-flags>
-     </default>
+    <default>
+      <files>memset_invariant.js</files>
+      <tags>Slow</tags>
+      <compile-flags>-mic:1 -off:simplejit -mmoc:0 -off:JITLoopBody</compile-flags>
+    </default>
   </test>
   <!--
-   <test>
-     <default>
-        <files>memset_simd.js</files>
-        <compile-flags>-mic:1 -off:simplejit -mmoc:0 -off:JITLoopBody -simdjs -simd128typespec</compile-flags>
-     </default>
-  </test>
--->
+  TODO fix and re-enable, or remove this test (disabled in 91e0e9128)
+  Microsoft/ChakraCore#2977
   <test>
-     <default>
-        <files>memset2.js</files>
-        <compile-flags>-mic:1 -off:simplejit -off:JITLoopBody -mmoc:0</compile-flags>
-     </default>
+    <default>
+      <files>memset_simd.js</files>
+      <compile-flags>-mic:1 -off:simplejit -mmoc:0 -off:JITLoopBody -simdjs -simd128typespec</compile-flags>
+    </default>
+  </test>
+  -->
+  <test>
+    <default>
+      <files>memset2.js</files>
+      <compile-flags>-mic:1 -off:simplejit -off:JITLoopBody -mmoc:0</compile-flags>
+    </default>
   </test>
   <test>
-     <default>
-        <files>memcopy.js</files>
-        <compile-flags>-mic:1 -off:simplejit -off:JITLoopBody -off:inline -off:globopt:1.18-1.30 -mmoc:0</compile-flags>
-     </default>
+    <default>
+      <files>memcopy.js</files>
+      <compile-flags>-mic:1 -off:simplejit -off:JITLoopBody -off:inline -off:globopt:1.18-1.30 -mmoc:0</compile-flags>
+    </default>
   </test>
   <test>
-     <default>
-        <files>memcopy.js</files>
-        <compile-flags>-mic:1 -off:simplejit -off:JITLoopBody -off:inline -off:globopt:1.18-1.30 -mmoc:0 -args float -endargs</compile-flags>
-     </default>
+    <default>
+      <files>memcopy.js</files>
+      <compile-flags>-mic:1 -off:simplejit -off:JITLoopBody -off:inline -off:globopt:1.18-1.30 -mmoc:0 -args float -endargs</compile-flags>
+    </default>
   </test>
   <test>
-     <default>
-        <files>memcopy_length_bug.js</files>
-        <compile-flags>-bgjit- -lic:0</compile-flags>
-     </default>
+    <default>
+      <files>memcopy_length_bug.js</files>
+      <compile-flags>-bgjit- -lic:0</compile-flags>
+    </default>
   </test>
   <test>
     <default>
@@ -690,40 +690,40 @@
     </default>
   </test>
   <test>
-     <default>
-        <files>memop_alias.js</files>
-        <compile-flags>-mic:1 -off:simplejit -off:jitloopbody -mmoc:0</compile-flags>
-     </default>
+    <default>
+      <files>memop_alias.js</files>
+      <compile-flags>-mic:1 -off:simplejit -off:jitloopbody -mmoc:0</compile-flags>
+    </default>
   </test>
   <test>
-     <default>
-        <files>memop_field.js</files>
-        <compile-flags>-mic:1 -off:simplejit -mmoc:0</compile-flags>
-     </default>
+    <default>
+      <files>memop_field.js</files>
+      <compile-flags>-mic:1 -off:simplejit -mmoc:0</compile-flags>
+    </default>
   </test>
   <test>
-     <default>
-        <files>memop_slot.js</files>
-        <compile-flags>-mic:1 -off:simplejit -mmoc:0</compile-flags>
-     </default>
+    <default>
+      <files>memop_slot.js</files>
+      <compile-flags>-mic:1 -off:simplejit -mmoc:0</compile-flags>
+    </default>
   </test>
   <test>
-     <default>
-        <files>memop_bounds_check.js</files>
-        <compile-flags>-mic:1 -off:simplejit -mmoc:0</compile-flags>
-     </default>
+    <default>
+      <files>memop_bounds_check.js</files>
+      <compile-flags>-mic:1 -off:simplejit -mmoc:0</compile-flags>
+    </default>
   </test>
   <test>
-     <default>
-        <files>bug4587739.js</files>
-        <compile-flags>-mic:1 -off:simplejit</compile-flags>
-     </default>
+    <default>
+      <files>bug4587739.js</files>
+      <compile-flags>-mic:1 -off:simplejit</compile-flags>
+    </default>
   </test>
   <test>
-     <default>
-        <files>bug8159763.js</files>
-        <compile-flags>-mic:1 -off:simplejit -mmoc:0 -off:bailonnoprofile</compile-flags>
-     </default>
+    <default>
+      <files>bug8159763.js</files>
+      <compile-flags>-mic:1 -off:simplejit -mmoc:0 -off:bailonnoprofile</compile-flags>
+    </default>
   </test>
   <test>
     <default>
@@ -738,8 +738,15 @@
     </default>
   </test>
   <test>
-     <default>
-        <files>array_conv_src.js</files>
-     </default>
+    <default>
+      <files>bug_12044876.js</files>
+        <compile-flags>-forcearraybtree</compile-flags>
+        <tags>BugFix</tags>
+    </default>
+  </test>
+  <test>
+    <default>
+      <files>array_conv_src.js</files>
+    </default>
   </test>
 </regress-exe>
diff --git a/test/AsmJSFloat/rlexe.xml b/test/AsmJSFloat/rlexe.xml
index 8746cca..e95799a 100644
--- a/test/AsmJSFloat/rlexe.xml
+++ b/test/AsmJSFloat/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
diff --git a/test/AsmJs/bug9883547.js b/test/AsmJs/bug9883547.js
new file mode 100644
index 0000000..042dc4c
--- /dev/null
+++ b/test/AsmJs/bug9883547.js
@@ -0,0 +1,20 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+function AsmModule() {
+  "use asm";
+  function f() {
+    var a = 0, b = 0.0;
+    while((b) == 0.0) {
+      b = +(a>>>0); // First use of a in the loop as a uint32
+      a = 5|0; // def of a in the loop as an int32
+    }
+    return +b;
+  }
+  return f;
+}
+
+var f = AsmModule();
+console.log("PASSED");
diff --git a/test/AsmJs/exports.baseline b/test/AsmJs/exports.baseline
new file mode 100644
index 0000000..36ad23d
--- /dev/null
+++ b/test/AsmJs/exports.baseline
@@ -0,0 +1,137 @@
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Warning: redefining export
+Successfully compiled asm.js code
+10
diff --git a/test/AsmJs/exports.js b/test/AsmJs/exports.js
new file mode 100644
index 0000000..e7dd4e9
--- /dev/null
+++ b/test/AsmJs/exports.js
@@ -0,0 +1,57 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+function m() {
+    "use asm";
+
+    function f(a)
+    {
+        a = a|0;
+        return a|0;
+    }
+    
+    function g()
+    {
+        return 10;
+    }
+    // have more than 128 values
+    return {
+        f:f, f:g, f:f, f:g,
+        f:f, f:g, f:f, f:g,
+        f:f, f:g, f:f, f:g,
+        f:f, f:g, f:f, f:g,
+        f:f, f:g, f:f, f:g,
+        f:f, f:g, f:f, f:g,
+        f:f, f:g, f:f, f:g,
+        f:f, f:g, f:f, f:g,
+        f:f, f:g, f:f, f:g,
+        f:f, f:g, f:f, f:g,
+        f:f, f:g, f:f, f:g,
+        f:f, f:g, f:f, f:g,
+        f:f, f:g, f:f, f:g,
+        f:f, f:g, f:f, f:g,
+        f:f, f:g, f:f, f:g,
+        f:f, f:g, f:f, f:g,
+        f:f, f:g, f:f, f:g,
+        f:f, f:g, f:f, f:g,
+        f:f, f:g, f:f, f:g,
+        f:f, f:g, f:f, f:g,
+        f:f, f:g, f:f, f:g,
+        f:f, f:g, f:f, f:g,
+        f:f, f:g, f:f, f:g,
+        f:f, f:g, f:f, f:g,
+        f:f, f:g, f:f, f:g,
+        f:f, f:g, f:f, f:g,
+        f:f, f:g, f:f, f:g,
+        f:f, f:g, f:f, f:g,
+        f:f, f:g, f:f, f:g,
+        f:f, f:g, f:f, f:g,
+        f:f, f:g, f:f, f:g,
+        f:f, f:g, f:f, f:g,
+        f:f, f:g, f:f, f:g,
+        f:f, f:g, f:f, f:g,
+    };
+}
+print(m().f());
\ No newline at end of file
diff --git a/test/AsmJs/lambda.baseline b/test/AsmJs/lambda.baseline
new file mode 100644
index 0000000..84f5b0d
--- /dev/null
+++ b/test/AsmJs/lambda.baseline
@@ -0,0 +1,2 @@
+Lambda functions are not supported.
+Asm.js compilation failed.
diff --git a/test/AsmJs/lambda.js b/test/AsmJs/lambda.js
new file mode 100644
index 0000000..37aa962
--- /dev/null
+++ b/test/AsmJs/lambda.js
@@ -0,0 +1,9 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+(function() {
+    "use asm";
+    m => 0;
+})();
diff --git a/test/AsmJs/relink.baseline b/test/AsmJs/relink.baseline
index a13b969..b51e4e5 100644
--- a/test/AsmJs/relink.baseline
+++ b/test/AsmJs/relink.baseline
@@ -8,46 +8,28 @@
 1

 import func, val 64

 0

-true

-import func, val 128

-0

 testFunc

 import2 func, val 8

 0

 import2 func, val 16

 1

-true

-import2 func, val 32

-0

 testFunc

 import3 func, val 8

 -1

 import3 func, val 16

 1

-true

-import3 func, val 32

-0

 testFunc

+import func, val 128

+-1

 import func, val 256

-0

-import func, val 512

-1

-true

-import func, val 1024

-0

+2

 testFunc

+import2 func, val 32

+-1

 import2 func, val 64

-0

-import2 func, val 128

-1

-true

-import2 func, val 256

-0

+2

 testFunc

+import3 func, val 32

+-1

 import3 func, val 64

-0

-import3 func, val 128

 1

-true

-import3 func, val 256

-0

diff --git a/test/AsmJs/relink.js b/test/AsmJs/relink.js
index 84f9121..9e49bed 100644
--- a/test/AsmJs/relink.js
+++ b/test/AsmJs/relink.js
@@ -23,18 +23,7 @@
     var impb = imports.d|0;

     var U8 =stdlib.Uint8Array;

     var HEAPU8 =new stdlib.Uint8Array(heap);

-    

-    function ch(b2)

-    {

-        if(len(b2) & 0xffffff || len(b2) <= 0xffffff || len(b2) > 0x80000000)

-            return false;

-        HEAP32=new I32(b2);

-        i8=new I8(b2);

-        HEAPU8=new U8(b2);

-        heap=b2;

-        return true

-    }

-    

+

     function f(param)

     {

         param = param|0;

@@ -57,7 +46,7 @@
         return +impa;

     }

     var table1 = [f, g, f, g];

-    return {fExp:f, gExp:g, ch:ch};

+    return {fExp:f, gExp:g};

 }

 this['byteLength'] = Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, 'byteLength').get);

 var buffer = new ArrayBuffer(1<<24);

@@ -70,8 +59,6 @@
     print("testFunc");

     print(Math.round(m.fExp(1)));

     print(Math.round(m.gExp(2)));

-    print(m.ch(new ArrayBuffer(1<<25)));

-    print(Math.round(m.gExp(2)));

 }

 testFunc(module1);

 var module3 = foo(this, {bar: function f(c){print("import3 func, val " + c)}, c: 6.5, d: 14}, new ArrayBuffer(1<<25));

diff --git a/test/AsmJs/rlexe.xml b/test/AsmJs/rlexe.xml
index e8a1662..00837c9 100644
--- a/test/AsmJs/rlexe.xml
+++ b/test/AsmJs/rlexe.xml
@@ -101,6 +101,13 @@
   </test>
   <test>
     <default>
+      <files>FunctionCalls.js</files>
+      <baseline>FunctionCalls.baseline</baseline>
+      <compile-flags>-ForceStaticInterpreterThunk -testtrace:asmjs -simdjs</compile-flags>
+    </default>
+  </test>
+  <test>
+    <default>
       <files>functiontablecalls.js</files>
       <baseline>functiontablecalls.baseline</baseline>
       <compile-flags>-testtrace:asmjs -simdjs</compile-flags>
@@ -807,6 +814,11 @@
   </test>
   <test>
     <default>
+      <files>unsigned.js</files>
+    </default>
+  </test>
+  <test>
+    <default>
       <files>asmjscctx.js</files>
       <baseline>asmjscctx.baseline</baseline>
       <compile-flags>-testtrace:asmjs</compile-flags>
@@ -833,6 +845,11 @@
   </test>
   <test>
     <default>
+      <files>bug9883547.js</files>
+    </default>
+  </test>
+  <test>
+    <default>
       <files>constFoldTests.js</files>
       <compile-flags>-asmjs -maic:0</compile-flags>
     </default>
@@ -851,4 +868,18 @@
       <compile-flags>-testtrace:asmjs -maic:0</compile-flags>
     </default>
   </test>
+  <test>
+    <default>
+      <files>lambda.js</files>
+      <baseline>lambda.baseline</baseline>
+      <compile-flags>-testtrace:asmjs</compile-flags>
+    </default>
+  </test>
+  <test>
+    <default>
+      <files>exports.js</files>
+      <baseline>exports.baseline</baseline>
+      <compile-flags>-testtrace:asmjs</compile-flags>
+    </default>
+  </test>
 </regress-exe>
diff --git a/test/AsmJs/unsigned.js b/test/AsmJs/unsigned.js
new file mode 100644
index 0000000..3bf1b17
--- /dev/null
+++ b/test/AsmJs/unsigned.js
@@ -0,0 +1,85 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+const ops = ["/", "%", "<", "<=", ">", ">=", "==", "!="];
+
+const makeFunc = (name, op1, op2) => `
+  function ${name}(x, y) {
+    x = x|0;
+    y = y|0;
+    var a1 = 0, a2 = 0;
+    a1 = ${op1};
+    a2 = ${op2};
+    multiReturn(a1|0, a2|0);
+  }`;
+
+const info = ops.reduce((all, op, i) => {
+  const unsignedOp = `((x>>>0)${op}(y>>>0))|0`;
+  const signedOp = `((x|0)${op}(y|0))|0`;
+  const n1 = `f${i}_u_s`;
+  const n2 = `f${i}_s_u`;
+  all.module += makeFunc(n1, unsignedOp, signedOp);
+  all.module += makeFunc(n2, unsignedOp, signedOp);
+  all.funcs.push({op, name: n1}, {op, name: n2});
+  return all;
+}, {module: "", funcs: []});
+
+const moduleCore = `
+  var multiReturn = imports.multiReturn;
+  var multiReturnDouble = imports.multiReturnDouble;
+  ${info.module}
+  return {
+    ${info.funcs.map(({name}) => `${name}: ${name},`).join("\n    ")}
+  }
+`;
+const asmModuleTxt = `return function(stdlib, imports) { "use asm" ${moduleCore} }`;
+const nonAsmModuleTxt = `return function(stdlib, imports) { ${moduleCore} }`;
+const asmImp = (new Function(asmModuleTxt))()({}, {multiReturn, multiReturnDouble: multiReturn});
+const nonAsmImp = (new Function(nonAsmModuleTxt))()({}, {multiReturn, multiReturnDouble: multiReturn});
+
+
+let results;
+function multiReturn(a, b) {
+  results.push([a, b]);
+}
+
+function test(a, b) {
+  for (const fnInfo of info.funcs) {
+    const {op, name: fn} = fnInfo;
+    results = [];
+    nonAsmImp[fn](a, b);
+    asmImp[fn](a, b);
+    if (results.length !== 2) {
+      print("Bad length of results " + results);
+    } else if (
+      results[0][0] !== results[1][0] ||
+      results[0][1] !== results[1][1]
+    ) {
+      print(`Failed. Expected ${fn}(${a} ${op} ${b}) to be [${results[0].join(", ")}]. Got [${results[1].join(", ")}]`);
+    }
+  }
+}
+function foo() {}
+var all = [ undefined, null,
+            true, false, new Boolean(true), new Boolean(false),
+            NaN, +0, -0, 0, 1, 10.0, 10.1, -1, -5, 5,
+            124, 248, 654, 987, -1026, +98768.2546, -88754.15478,
+            1<<32, -(1<<32), (1<<32)-1, 1<<31, -(1<<31), 1<<25, -1<<25,
+            Number.MAX_VALUE, Number.MIN_VALUE, Number.NaN, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY,
+            new Number(NaN), new Number(+0), new Number( -0), new Number(0), new Number(1),
+            new Number(10.0), new Number(10.1),
+            new Number(Number.MAX_VALUE), new Number(Number.MIN_VALUE), new Number(Number.NaN),
+            new Number(Number.POSITIVE_INFINITY), new Number(Number.NEGATIVE_INFINITY),
+            "", "hello", "hel" + "lo", "+0", "-0", "0", "1", "10.0", "10.1",
+            new String(""), new String("hello"), new String("he" + "llo"),
+            new Object(), [1,2,3], new Object(), [1,2,3] , foo
+          ];
+
+for (const a1 of all) {
+  for (const a2 of all) {
+    test(a1, a2);
+  }
+}
+print("PASSED");
diff --git a/test/Basics/ScriptFunctionToStrings.js b/test/Basics/ScriptFunctionToStrings.js
new file mode 100644
index 0000000..18a93dd
--- /dev/null
+++ b/test/Basics/ScriptFunctionToStrings.js
@@ -0,0 +1,130 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+if (this.WScript && this.WScript.LoadScriptFile) { // Check for running in ch
+    this.WScript.LoadScriptFile("..\\UnitTestFramework\\UnitTestFramework.js");
+}
+var tests = [
+    {
+        name: "function declaration test",
+        body: function ()
+        {
+            eval("function \n\t\r foo() {var a = 5;}");
+            assert.areEqual("function foo() {var a = 5;}", foo.toString(), "toString should remove all extra whitespace, new lines, tabs and carriage return before the open (");
+        }
+    },
+    {
+        name: "function assignment test",
+        body: function ()
+        {
+            eval("var a = function \t\n\r\t foo() {var a = 5;}");
+            assert.areEqual("function foo() {var a = 5;}", a.toString(), "toString should remove all extra whitespace, new lines, tabs and carriage return before the open (");
+            a = function (i) { i++; }
+            assert.areEqual("function (i) { i++; }", a.toString(), "toString should add a space if one does not exist");
+        }
+    },
+    {
+        name: "generator function declaration test",
+        body: function ()
+        {
+            eval("function* \t\r\n  foo() {var a = 5;}");
+            assert.areEqual("function* foo() {var a = 5;}", foo.toString(), "toString should remove all extra whitespace, new lines, tabs and carriage return before the open (");
+            eval("function \t\r\n*\n\r\n \t foo() {var a = 5;}");
+            assert.areEqual("function* foo() {var a = 5;}", foo.toString(), "toString should remove all extra whitespace,  new lines, tabs and carriage return before the open (");
+        }
+    },
+    {
+        name: "generator function assignment test",
+        body: function ()
+        {
+            eval("var a = function* \t\n\r  \t foo() {var a = 5;}");
+            assert.areEqual("function* foo() {var a = 5;}", a.toString(), "toString should remove all extra whitespace, new lines, tabs and carriage return before the open (");
+            eval("var a = function \t\n\r  *  \t\n foo() {var a = 5;}");
+            assert.areEqual("function* foo() {var a = 5;}", a.toString(), "toString should remove all extra whitespace, new lines, tabs and carriage return before the open (");
+        }
+    },
+    {
+        name: "Named function expression tests",
+        body: function ()
+        {
+            eval("var o = { foo : function \n\t bar \t () {}}");
+            eval("o.e = function \t qui \t () {}");
+            assert.areEqual("function bar() {}", o.foo.toString(), "confirm that the foo identifier does not override the name bar ");
+            assert.areEqual("function qui() {}", o.e.toString(), "confirm that the foo identifier does not override the name qui");
+        }
+    },
+    {
+        name: "function expression tests without names",
+        body: function ()
+        {
+            eval("var o = { foo : function \n\t  \t () {}}");
+            eval("o.e = function \t  \t () {}");
+            assert.areEqual("function () {}", o.foo.toString(), "confirm that the foo identifier does not override the name bar ");
+            assert.areEqual("function () {}", o.e.toString(), "confirm that the foo identifier does not override the name qui");
+        }
+    },
+    {
+        name: "internal function test",
+        body: function ()
+        {
+            eval("function foo() { return foo.toString(); }");
+            var a = foo;
+            assert.areEqual("function foo() { return foo.toString(); }", a(), "confirm that even if we call toString internally it has no effect on the name")
+        }
+    },
+    {
+        name: "class method test",
+        body: function ()
+        {
+            eval("var qux = class { constructor(){} static func(){} method(){} get getter(){} set setter(v){}}");
+            var quxObj = new qux();
+            assert.areEqual("func(){}", qux.func.toString(), "the name should be func")
+            assert.areEqual("method(){}", quxObj.method.toString(), "the name should be method")
+
+            var oGet = Object.getOwnPropertyDescriptor(qux.prototype, "getter");
+            var oSet = Object.getOwnPropertyDescriptor(qux.prototype, "setter");
+            assert.areEqual("getter(){}", oGet.get.toString(), "the name should be getter");
+            assert.areEqual("setter(v){}", oSet.set.toString(), "the name should be setter");
+        }
+    },
+    /* TODO fix and re-enable this test case (Microsoft/ChakraCore#3008)
+    {
+        name: "class constructor test",
+        body: function ()
+        {
+            eval("var qux = class { constructor(){} static func(){} method(){} get getter(){} set setter(v){}}");
+            var quxObj = new qux();
+            // FIXME Test threw exception: assert.areEqual failed: expected: constructor(){} actual: class { constructor(){} static func(){} method(){} get getter(){} set setter(v){}}
+            assert.areEqual("constructor(){}", quxObj.constructor.toString(), "The constructor should have the toString  with name constructor");
+
+            var qux = class { };
+            var quxObj = new qux();
+            // I left a space between closing ellipse ) and the opening bracket { because that's how all browsers do toString on runtime functions
+            // Should this not be how other browsers do default constructor go to RuntimeCommon.h and change JS_DEFAULT_CTOR_DISPLAY_STRING
+            // FIXME Test threw exception: assert.areEqual failed: expected: constructor() {} actual: class { }
+            assert.areEqual("constructor() {}", quxObj.constructor.toString(), "The constructor should have the toString with name constructor")
+        }
+    },
+    */
+    {
+        name: "shorthand method function test",
+        body: function ()
+        {
+            // TODO update this test after fixing output (see Microsoft/ChakraCore#2914: Incorrect Function toString for methods declared with string in brackets)
+            var o = { ['f']() { }, g() { } };
+            assert.areEqual("f() { }", o.f.toString());
+        }
+    },
+    {
+        name: "arrow function Test",
+        body: function ()
+        {
+            var arrowDecl = () => { };
+            assert.areEqual("() => { }", arrowDecl.toString(), "Make sure arrow functions remain unaffected by ie12 formatting");
+        }
+    }
+];
+
+testRunner.runTests(tests, { verbose: WScript.Arguments[0] != "summary" });
diff --git a/test/Basics/ie12ScriptFunctionToStrings.js b/test/Basics/ie12ScriptFunctionToStrings.js
deleted file mode 100644
index de3f5dc..0000000
--- a/test/Basics/ie12ScriptFunctionToStrings.js
+++ /dev/null
@@ -1,116 +0,0 @@
-//-------------------------------------------------------------------------------------------------------

-// Copyright (C) Microsoft. All rights reserved.

-// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.

-//-------------------------------------------------------------------------------------------------------

-

-if (this.WScript && this.WScript.LoadScriptFile) { // Check for running in ch

-    this.WScript.LoadScriptFile("..\\UnitTestFramework\\UnitTestFramework.js");

-}

-var tests = [

-    {

-        name: "function declaration test",

-        body: function ()

-        {

-            eval("function \n\t\r foo() {var a = 5;}");

-            assert.areEqual("function foo() {var a = 5;}", foo.toString(), "toString should remove all extra whitespace, new lines, tabs and carriage return before the open (");

-        }

-    },

-    {

-        name: "function assignment test",

-        body: function ()

-        {

-            eval("var a = function \t\n\r\t foo() {var a = 5;}");

-            assert.areEqual("function foo() {var a = 5;}", a.toString(), "toString should remove all extra whitespace, new lines, tabs and carriage return before the open (");

-            a = function(i) {i++;}

-            assert.areEqual("function (i) {i++;}", a.toString(), "toString should add a space if one does not exist");

-

-        }

-    },

-    {

-        name: "generator function declaration test",

-        body: function ()

-        {

-            eval("function* \t\r\n  foo() {var a = 5;}");

-            assert.areEqual("function* foo() {var a = 5;}", foo.toString(), "toString should remove all extra whitespace, new lines, tabs and carriage return before the open (");

-            eval("function \t\r\n*\n\r\n \t foo() {var a = 5;}");

-            assert.areEqual("function* foo() {var a = 5;}", foo.toString(), "toString should remove all extra whitespace,  new lines, tabs and carriage return before the open (");

-        }

-    },

-    {

-        name: "generator function assignment test",

-        body: function ()

-        {

-            eval("var a = function* \t\n\r  \t foo() {var a = 5;}");

-            assert.areEqual("function* foo() {var a = 5;}", a.toString(), "toString should remove all extra whitespace, new lines, tabs and carriage return before the open (");

-            eval("var a = function \t\n\r  *  \t\n foo() {var a = 5;}");

-            assert.areEqual("function* foo() {var a = 5;}", a.toString(), "toString should remove all extra whitespace, new lines, tabs and carriage return before the open (");

-        }

-    },

-    {

-        name: "Named function expression tests",

-        body: function ()

-        {

-             eval("var o = { foo : function \n\t bar \t () {}}");

-             eval("o.e = function \t qui \t () {}");

-             assert.areEqual("function bar() {}",o.foo.toString(),"confirm that the foo identifier does not override the name bar ");

-             assert.areEqual("function qui() {}",o.e.toString(),"confirm that the foo identifier does not override the name qui");

-        }

-   },

-   {

-        name: "function expression tests without names",

-        body: function ()

-        {

-             eval("var o = { foo : function \n\t  \t () {}}");

-             eval("o.e = function \t  \t () {}");

-             assert.areEqual("function () {}",o.foo.toString(),"confirm that the foo identifier does not override the name bar ");

-             assert.areEqual("function () {}",o.e.toString(),"confirm that the foo identifier does not override the name qui");

-        }

-   },

-   {

-        name: "internal function test",

-        body: function ()

-        {

-             eval("function foo() { return foo.toString(); }");

-             var a = foo;

-             assert.areEqual("function foo() { return foo.toString(); }", a(),"confirm that even if we call toString internally it has no effect on the name")

-        }

-   },

-   {

-        name: "class method test",

-        body: function ()

-        {

-             eval("var qux = class { constructor(){} static func(){} method(){} get getter(){} set setter(v){}}");

-             var quxObj = new qux();

-             assert.areEqual("constructor(){}",quxObj.constructor.toString(),"The constructor should have the toString  with name constructor");

-             assert.areEqual("func(){}",qux.func.toString(),"the name should be func")

-             assert.areEqual("method(){}",quxObj.method.toString(),"the name should be method")

-

-             var oGet = Object.getOwnPropertyDescriptor(qux.prototype,"getter");

-             var oSet = Object.getOwnPropertyDescriptor(qux.prototype,"setter");

-             assert.areEqual("getter(){}",  oGet.get.toString(), "the name should be getter");

-             assert.areEqual("setter(v){}", oSet.set.toString(), "the name should be setter");

-             var qux = class {};

-             var quxObj = new qux();

-             // I left a space between closing ellipse ) and the opening bracket { because that's how all browsers do toString on runtime functions

-             // Should this not be how other browsers do default constructor go to RuntimeCommon.h and change JS_DEFAULT_CTOR_DISPLAY_STRING

-             assert.areEqual("constructor() {}",quxObj.constructor.toString(),"The constructor should have the toString with name constructor")

-        }

-   },

-   {

-        name: "shorthand method function test",

-        body: function ()

-        {

-             var o = {['f']() {},g () {}};

-             assert.areEqual("f() {}",o.f.toString());

-        }

-   },

-   {

-        name: "arrow function Test",

-        body: function ()

-        {

-             var arrowDecl = () => {};

-             assert.areEqual("() => {}",arrowDecl.toString(),"Make sure arrow functions remain unaffected by ie12 formatting");

-        }

-   }

-];

-testRunner.runTests(tests, { verbose: WScript.Arguments[0] != "summary" });

diff --git a/test/Basics/rlexe.xml b/test/Basics/rlexe.xml
index 8714f88..60d9bc1 100644
--- a/test/Basics/rlexe.xml
+++ b/test/Basics/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
@@ -7,13 +7,12 @@
       <compile-flags>-Intl-</compile-flags>
     </default>
   </test>
-  <!--
   <test>
     <default>
-      <files>ie12ScriptFunctionToStrings.js</files>
-      <compile-flags>-ES6Generators -ES6Classes -args summary -endargs</compile-flags>
+      <files>ScriptFunctionToStrings.js</files>
+      <compile-flags>-args summary -endargs</compile-flags>
     </default>
-  </test>-->
+  </test>
   <test>
     <default>
       <files>DomProperties.js</files>
@@ -80,7 +79,6 @@
     <default>
       <files>label1.js</files>
       <compile-flags>-Force:Deferparse -Intl-</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -96,7 +94,7 @@
       <files>label2.js</files>
       <baseline>label2.baseline</baseline>
       <compile-flags>-Force:Deferparse -Intl-</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -112,7 +110,7 @@
       <files>label3.js</files>
       <baseline>label3.baseline</baseline>
       <compile-flags>-Force:Deferparse -Intl-</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -128,7 +126,7 @@
       <files>label4.js</files>
       <baseline>label4.baseline</baseline>
       <compile-flags>-Force:Deferparse -Intl-</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -144,7 +142,7 @@
       <files>label5.js</files>
       <baseline>label5.baseline</baseline>
       <compile-flags>-Force:Deferparse -Intl-</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -160,7 +158,7 @@
       <files>label6.js</files>
       <baseline>label6.baseline</baseline>
       <compile-flags>-Force:Deferparse -Intl-</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -369,6 +367,7 @@
     </default>
   </test>
   <!--
+  Microsoft/ChakraCore#3009
   <test>
     <default>
       <compile-flags>-hostType:2</compile-flags>
@@ -376,12 +375,12 @@
       <baseline>Enumerator-deprecated.baseline</baseline>
     </default>
   </test>
-
   <test>
     <default>
       <compile-flags>-hostType:3</compile-flags>
       <files>Enumerator-WebViewHost.js</files>
       <baseline>Enumerator-WebViewHost.baseline</baseline>
+      TODO remove this tag, as it appears to be unused now
       <tags>exclude_inprocdebug</tags>
     </default>
   </test>
diff --git a/test/Boolean/rlexe.xml b/test/Boolean/rlexe.xml
index ad41d69..64740cf 100644
--- a/test/Boolean/rlexe.xml
+++ b/test/Boolean/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
diff --git a/test/Bugs/randombug.baseline b/test/Bugs/randombug.baseline
index 23eb956..2cf0c2e 100644
--- a/test/Bugs/randombug.baseline
+++ b/test/Bugs/randombug.baseline
@@ -63,10 +63,10 @@
 Passed

 Test case 31

 Error

-	at func2 (randombug.js:285:9)

-	at testlinenumber (randombug.js:291:6)

-	at test31 (randombug.js:295:5)

-	at Global code (randombug.js:281:2)

+   at func2 (randombug.js:285:9)

+   at testlinenumber (randombug.js:291:6)

+   at test31 (randombug.js:295:5)

+   at Global code (randombug.js:281:2)

 Passed

 Test case 32

 arrObj0.length setter

@@ -92,10 +92,10 @@
 passed

 Test case 40

 ReferenceError: 'undefinedFunction' is not defined

-	at eval code (eval code:1:22)

-	at testRuntimeError (randombug.js:456:9)

-	at test31 (randombug.js:460:5)

-	at Global code (randombug.js:452:2)

+   at eval code (eval code:1:22)

+   at testRuntimeError (randombug.js:456:9)

+   at test31 (randombug.js:460:5)

+   at Global code (randombug.js:452:2)

 Passed

 Test case 41

 Passed

diff --git a/test/Bugs/rlexe.xml b/test/Bugs/rlexe.xml
index ba323d2..29fec10 100644
--- a/test/Bugs/rlexe.xml
+++ b/test/Bugs/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
@@ -211,7 +211,7 @@
     <default>
       <files>SIMDExtendArgCSE.js</files>
       <baseline>SIMDExtendArgCSE.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship,require_backend,require_simd</tags>
+      <tags>exclude_dynapogo,require_backend,require_simd</tags>
       <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -309,7 +309,7 @@
     <default>
       <files>b208_asmjs.js</files>
       <baseline>b208_asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship,require_backend,require_simd</tags>
+      <tags>exclude_dynapogo,require_backend,require_simd</tags>
       <compile-flags>-simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -317,7 +317,7 @@
     <default>
       <files>b208_asmjs.js</files>
       <baseline>b208_asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship,require_backend,require_simd</tags>
+      <tags>exclude_dynapogo,require_backend,require_simd</tags>
       <compile-flags> -bgjit- -simdjs -simd128typespec -asmjs- -mic:1 -lic:1 -off:simplejit</compile-flags>
     </default>
   </test>
@@ -325,7 +325,7 @@
     <default>
       <files>testSimdManyVars.js</files>
       <baseline>testSimdManyVars.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship,require_backend,require_simd</tags>
+      <tags>exclude_dynapogo,require_backend,require_simd</tags>
       <compile-flags> -simdjs -asmjs -off:backend -testtrace:asmjs</compile-flags>
     </default>
   </test>
@@ -333,7 +333,7 @@
     <default>
       <files>b95.js</files>
       <baseline>b95.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship,require_backend,require_simd</tags>
+      <tags>exclude_dynapogo,require_backend,require_simd</tags>
       <compile-flags>-simdjs -testtrace:asmjs  -asmjs</compile-flags>
     </default>
   </test>
@@ -341,7 +341,7 @@
     <default>
       <files>b108.js</files>
       <baseline>b108.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship,require_backend,require_simd</tags>
+      <tags>exclude_dynapogo,require_backend,require_simd</tags>
       <compile-flags>-simdjs  -asmjs -testtrace:asmjs -asmjsstoponerror</compile-flags>
     </default>
   </test>
diff --git a/test/Closures/rlexe.xml b/test/Closures/rlexe.xml
index 0cc8354..0123de5 100644
--- a/test/Closures/rlexe.xml
+++ b/test/Closures/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
diff --git a/test/ControlFlow/rlexe.xml b/test/ControlFlow/rlexe.xml
index 4ff0eb5..f3f50fc 100644
--- a/test/ControlFlow/rlexe.xml
+++ b/test/ControlFlow/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
diff --git a/test/Conversions/rlexe.xml b/test/Conversions/rlexe.xml
index f17d384..aa96bca 100644
--- a/test/Conversions/rlexe.xml
+++ b/test/Conversions/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
diff --git a/test/Date/rlexe.xml b/test/Date/rlexe.xml
index cd52bb5..578224f 100644
--- a/test/Date/rlexe.xml
+++ b/test/Date/rlexe.xml
@@ -4,7 +4,7 @@
     <default>
       <files>DateCtr.js</files>
       <baseline>DateCtr.baseline</baseline>
-      <!-- test is timezone-sensitive; remove exclude_jenkins after fix -->
+      <!-- test is timezone-sensitive; remove exclude_jenkins after fix (Microsoft/ChakraCore#319) -->
       <tags>exclude_jenkins</tags>
     </default>
   </test>
@@ -12,7 +12,7 @@
     <default>
       <files>DateGetSet.js</files>
       <baseline>DateGetSet.baseline</baseline>
-      <!-- test is timezone-sensitive; remove exclude_jenkins after fix -->
+      <!-- test is timezone-sensitive; remove exclude_jenkins after fix (Microsoft/ChakraCore#319) -->
       <!-- OSX doesn't provide expected DST info for year 35816 -->
       <tags>exclude_jenkins,exclude_mac</tags>
     </default>
@@ -21,7 +21,7 @@
     <default>
       <files>DateParse.js</files>
       <baseline>DateParse_es5.baseline</baseline>
-      <!-- test is timezone-sensitive; remove exclude_jenkins after fix -->
+      <!-- test is timezone-sensitive; remove exclude_jenkins after fix (Microsoft/ChakraCore#319) -->
       <tags>exclude_jenkins</tags>
     </default>
   </test>
@@ -29,7 +29,7 @@
     <default>
       <files>DateParse2.js</files>
       <baseline>DateParse2.v5.baseline</baseline>
-      <!-- test is timezone-sensitive; remove exclude_jenkins after fix -->
+      <!-- test is timezone-sensitive; remove exclude_jenkins after fix (Microsoft/ChakraCore#319) -->
       <tags>exclude_jenkins</tags>
     </default>
   </test>
@@ -43,7 +43,7 @@
     <default>
       <files>parseISO.js</files>
       <baseline>parseISO.baseline</baseline>
-      <!-- test is timezone-sensitive; remove exclude_jenkins after fix -->
+      <!-- test is timezone-sensitive; remove exclude_jenkins after fix (Microsoft/ChakraCore#319) -->
       <!-- OSX doesn't provide expected DST for minus years -->
       <tags>exclude_jenkins,exclude_mac,Slow</tags>
     </default>
@@ -65,7 +65,7 @@
       <files>Conversions.js</files>
       <baseline>Conversions.win8.baseline</baseline>
       <compile-flags>-Intl-</compile-flags>
-      <!-- test is timezone-sensitive; remove exclude_jenkins after fix -->
+      <!-- test is timezone-sensitive; remove exclude_jenkins after fix (Microsoft/ChakraCore#319) -->
       <tags>exclude_win7,exclude_winBlue,exclude_snap,exclude_jenkins,exclude_xplat</tags>
     </default>
   </test>
@@ -74,7 +74,7 @@
       <files>Conversions.js</files>
       <baseline>Conversions.baseline</baseline>
       <compile-flags>-Intl-</compile-flags>
-      <!-- test is timezone-sensitive; remove exclude_jenkins after fix -->
+      <!-- test is timezone-sensitive; remove exclude_jenkins after fix (Microsoft/ChakraCore#319) -->
       <tags>exclude_win7,exclude_win8,exclude_snap,exclude_jenkins,exclude_xplat</tags>
     </default>
   </test>
@@ -87,6 +87,7 @@
   <test>
     <default>
       <files>formatting_xplat.js</files>
+      <!-- test is timezone-sensitive; remove exclude_jenkins after fix (Microsoft/ChakraCore#319) -->
       <tags>exclude_jenkins</tags>
     </default>
   </test>
@@ -95,7 +96,7 @@
       <files>formatting.js</files>
       <baseline>formatting.baseline</baseline>
       <compile-flags>-ForceOldDateAPI</compile-flags>
-      <!-- test is timezone-sensitive; remove exclude_jenkins after fix -->
+      <!-- test is timezone-sensitive; remove exclude_jenkins after fix (Microsoft/ChakraCore#319) -->
       <!-- on DST pass Win OldDateAPI jumps back to 01:00 after 01:59 -->
       <!-- todo: Do not force OLDDateAPI ? -->
       <tags>exclude_jenkins,exclude_xplat</tags>
@@ -119,6 +120,7 @@
   <test>
     <default>
       <files>xplatInterval.js</files>
+      <!-- Fix or add explanation for exclude_jenkins (Microsoft/ChakraCore#3010) -->
       <tags>exclude_jenkins,Slow</tags>
     </default>
   </test>
diff --git a/test/Debugger/JsDiagGetFunctionPosition.js b/test/Debugger/JsDiagGetFunctionPosition.js
index 4675821..9462c99 100644
--- a/test/Debugger/JsDiagGetFunctionPosition.js
+++ b/test/Debugger/JsDiagGetFunctionPosition.js
@@ -34,6 +34,4 @@
 WScript.DumpFunctionPosition(JSON.stringify);

 WScript.DumpFunctionPosition(eval);

 

-// Shouldn't get functionPosition of library code

-WScript.DumpFunctionPosition(Intl.DateTimeFormat);

 WScript.Echo("pass");

diff --git a/test/Debugger/JsDiagGetFunctionPosition.js.dbg.baseline b/test/Debugger/JsDiagGetFunctionPosition.js.dbg.baseline
index c39beed..aa54cb9 100644
--- a/test/Debugger/JsDiagGetFunctionPosition.js.dbg.baseline
+++ b/test/Debugger/JsDiagGetFunctionPosition.js.dbg.baseline
@@ -56,8 +56,5 @@
   },

   {

     "functionPosition": {}

-  },

-  {

-    "functionPosition": {}

   }

 ]
\ No newline at end of file
diff --git a/test/Debugger/JsDiagGetFunctionPositionIntl.js b/test/Debugger/JsDiagGetFunctionPositionIntl.js
new file mode 100644
index 0000000..b2f57c0
--- /dev/null
+++ b/test/Debugger/JsDiagGetFunctionPositionIntl.js
@@ -0,0 +1,8 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// Shouldn't get functionPosition of library code
+WScript.DumpFunctionPosition(Intl.DateTimeFormat);
+WScript.Echo("pass");
diff --git a/test/Debugger/JsDiagGetFunctionPositionIntl.js.dbg.baseline b/test/Debugger/JsDiagGetFunctionPositionIntl.js.dbg.baseline
new file mode 100644
index 0000000..db93338
--- /dev/null
+++ b/test/Debugger/JsDiagGetFunctionPositionIntl.js.dbg.baseline
@@ -0,0 +1,5 @@
+[
+  {
+    "functionPosition": {}
+  }
+]
\ No newline at end of file
diff --git a/test/Debugger/rlexe.xml b/test/Debugger/rlexe.xml
index 18e8830..20e46c6 100644
--- a/test/Debugger/rlexe.xml
+++ b/test/Debugger/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
@@ -22,8 +22,14 @@
     <default>
       <compile-flags>-debuglaunch -dbgbaseline:JsDiagGetFunctionPosition.js.dbg.baseline</compile-flags>
       <files>JsDiagGetFunctionPosition.js</files>
-      <!-- xplat-todo: enable back [not supported] Intl -->
-      <tags>exclude_xplat</tags>
+    </default>
+  </test>
+  <test>
+    <default>
+      <compile-flags>-debuglaunch -dbgbaseline:JsDiagGetFunctionPositionIntl.js.dbg.baseline</compile-flags>
+      <files>JsDiagGetFunctionPositionIntl.js</files>
+      <!-- xplat-todo: enable on xplat when Intl is supported on xplat (Microsoft/ChakraCore#2919) -->
+      <tags>exclude_xplat,Intl</tags>
     </default>
   </test>
   <test>
diff --git a/test/DebuggerCommon/ES6_intl_stepinto.js b/test/DebuggerCommon/ES6_intl_stepinto.js
index 4eddb9e..d9bea13 100644
--- a/test/DebuggerCommon/ES6_intl_stepinto.js
+++ b/test/DebuggerCommon/ES6_intl_stepinto.js
@@ -10,7 +10,7 @@
 function Run() {

     var intl = new Intl.Collator();

     intl.compare('a','b');/**bp:resume('step_into');locals()**/

-    WScript.Echo('PASSED');

+    WScript.Echo('PASS');

 }

 

 WScript.Attach(Run);

diff --git a/test/DebuggerCommon/ES6_intl_stepinto.js.baseline b/test/DebuggerCommon/ES6_intl_stepinto.js.baseline
deleted file mode 100644
index 8d1a338..0000000
--- a/test/DebuggerCommon/ES6_intl_stepinto.js.baseline
+++ /dev/null
@@ -1 +0,0 @@
-PASSED

diff --git a/test/DebuggerCommon/rlexe.xml b/test/DebuggerCommon/rlexe.xml
index 2b89375..6508d2c 100644
--- a/test/DebuggerCommon/rlexe.xml
+++ b/test/DebuggerCommon/rlexe.xml
@@ -32,9 +32,8 @@
     <default>
       <files>ES6_intl_stepinto.js</files>
       <compile-flags>-dbgbaseline:ES6_intl_stepinto.js.dbg.baseline -Intl</compile-flags>
-      <baseline>ES6_intl_stepinto.js.baseline</baseline>
-      <!-- xplat-todo: enable back [intl support] -->
-      <tags>exclude_winglob,exclude_xplat</tags>
+      <!-- xplat-todo: enable on xplat when Intl is supported on xplat (Microsoft/ChakraCore#2919) -->
+      <tags>exclude_winglob,exclude_xplat,Intl</tags>
     </default>
   </test>
   <test>
@@ -213,7 +212,7 @@
       <files>ES6_intl_simple_attach.js</files>
       <compile-flags>-dbgbaseline:ES6_intl_simple_attach.js.dbg.baseline -Intl</compile-flags>
       <baseline>ES6_intl_simple_attach.js.baseline</baseline>
-      <!-- xplat-todo: enable back [intl support] -->
+      <!-- xplat-todo: enable on xplat when Intl is supported on xplat (Microsoft/ChakraCore#2919) -->
       <tags>exclude_winglob,exclude_xplat</tags>
     </default>
   </test>
@@ -286,7 +285,7 @@
     <default>
       <files>ES6_intl_stepinto_libexpandos.js</files>
       <compile-flags>-debuglaunch -dbgbaseline:ES6_intl_stepinto_libexpandos.js.dbg.baseline -Intl</compile-flags>
-      <!-- xplat-todo: enable back [intl support] -->
+      <!-- xplat-todo: enable on xplat when Intl is supported on xplat (Microsoft/ChakraCore#2919) -->
       <tags>exclude_winglob,exclude_xplat</tags>
     </default>
   </test>
@@ -506,7 +505,7 @@
     <default>
       <files>attachdetach-delaycapture.js</files>
       <compile-flags>-dbgbaseline:attachdetach-delaycapture.js.dbg.baseline</compile-flags>
-      <!-- xplat-todo: enable back - investigate [background job thread fails] -->
+      <!-- xplat-todo: enable back - investigate [background job thread fails] (Microsoft/ChakraCore#3012) -->
       <tags>BugFix,exclude_xplat</tags>
     </default>
   </test>
@@ -904,6 +903,13 @@
   </test>
   <test>
     <default>
+      <files>promise_deferNestedAttach.js</files>
+      <compile-flags>-ForceStaticInterpreterThunk -es6functionnamefull -dbgbaseline:promise_deferNestedAttach.js.dbg.baseline</compile-flags>
+      <tags>exclude_dynapogo</tags>
+    </default>
+  </test>
+  <test>
+    <default>
       <files>bug_222633.js</files>
       <compile-flags> -debuglaunch -dbgbaseline:emptyJson.dbg.baseline</compile-flags>
       <tags>exclude_dynapogo</tags>
@@ -1153,7 +1159,7 @@
     <default>
       <files>returnedvaluetests1.js</files>
       <compile-flags>-dbgbaseline:returnedvaluetests1.js.dbg.baseline</compile-flags>
-      <!-- xplat-todo: enable back [intl support] -->
+      <!-- xplat-todo: enable on xplat when Intl is supported on xplat (Microsoft/ChakraCore#2919) -->
       <tags>exclude_dynapogo,exclude_serialized,exclude_xplat</tags>
     </default>
   </test>
@@ -1161,7 +1167,7 @@
     <default>
       <files>returnedvaluetests2.js</files>
       <compile-flags>-debugLaunch -dbgbaseline:returnedvaluetests2.js.dbg.baseline</compile-flags>
-      <!-- xplat-todo: enable back [intl support] -->
+      <!-- xplat-todo: enable on xplat when Intl is supported on xplat (Microsoft/ChakraCore#2919) -->
       <tags>exclude_dynapogo,exclude_serialized,exclude_xplat</tags>
     </default>
   </test>
@@ -1255,7 +1261,7 @@
     <default>
       <files>TypedArray.js</files>
       <compile-flags>-ES6Species -debuglaunch -dbgbaseline:typedarray.js.dbg.baseline -InspectMaxStringLength:200</compile-flags>
-      <!-- xplat-todo: G.H #2064 -->
+      <!-- xplat-todo: Microsoft/ChakraCore#2064 -->
       <tags>exclude_xplat</tags>
     </default>
   </test>
diff --git a/test/DynamicCode/rlexe.xml b/test/DynamicCode/rlexe.xml
index 652c87e..b2b9d4b 100644
--- a/test/DynamicCode/rlexe.xml
+++ b/test/DynamicCode/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
diff --git a/test/EH/rlexe.xml b/test/EH/rlexe.xml
index 1738b32..f52eda0 100644
--- a/test/EH/rlexe.xml
+++ b/test/EH/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
@@ -87,7 +87,6 @@
       <files>alignment.js</files>
       <compile-flags>-off:inline -checkalignment</compile-flags>
       <baseline />
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
diff --git a/test/Error/NativeErrors_v4.baseline b/test/Error/NativeErrors_v4.baseline
index da014ce..762207b 100644
--- a/test/Error/NativeErrors_v4.baseline
+++ b/test/Error/NativeErrors_v4.baseline
@@ -2,54 +2,54 @@
 description    = (undefined)undefined

 number         = (undefined)undefined

 stack          = (string)  EvalError

-	at eval code (eval code:1:1)

-	at Test(string) (nativeerrors.js:49:5)

-	at Global code (nativeerrors.js:68:1)

+   at eval code (eval code:1:1)

+   at Test(string) (nativeerrors.js:49:5)

+   at Global code (nativeerrors.js:68:1)

 toString()     = EvalError

 

 RangeError('This is a range error')

 description    = (undefined)undefined

 number         = (undefined)undefined

 stack          = (string)  RangeError: This is a range error

-	at eval code (eval code:1:1)

-	at Test(string) (nativeerrors.js:49:5)

-	at Global code (nativeerrors.js:69:1)

+   at eval code (eval code:1:1)

+   at Test(string) (nativeerrors.js:49:5)

+   at Global code (nativeerrors.js:69:1)

 toString()     = RangeError: This is a range error

 

 ReferenceError

 description    = (undefined)undefined

 number         = (undefined)undefined

 stack          = (string)  ReferenceError

-	at eval code (eval code:1:1)

-	at Test(string) (nativeerrors.js:49:5)

-	at Global code (nativeerrors.js:70:1)

+   at eval code (eval code:1:1)

+   at Test(string) (nativeerrors.js:49:5)

+   at Global code (nativeerrors.js:70:1)

 toString()     = ReferenceError

 

 SyntaxError

 description    = (undefined)undefined

 number         = (undefined)undefined

 stack          = (string)  SyntaxError

-	at eval code (eval code:1:1)

-	at Test(string) (nativeerrors.js:49:5)

-	at Global code (nativeerrors.js:71:1)

+   at eval code (eval code:1:1)

+   at Test(string) (nativeerrors.js:49:5)

+   at Global code (nativeerrors.js:71:1)

 toString()     = SyntaxError

 

 TypeError('This is a type error')

 description    = (undefined)undefined

 number         = (undefined)undefined

 stack          = (string)  TypeError: This is a type error

-	at eval code (eval code:1:1)

-	at Test(string) (nativeerrors.js:49:5)

-	at Global code (nativeerrors.js:72:1)

+   at eval code (eval code:1:1)

+   at Test(string) (nativeerrors.js:49:5)

+   at Global code (nativeerrors.js:72:1)

 toString()     = TypeError: This is a type error

 

 URIError

 description    = (undefined)undefined

 number         = (undefined)undefined

 stack          = (string)  URIError

-	at eval code (eval code:1:1)

-	at Test(string) (nativeerrors.js:49:5)

-	at Global code (nativeerrors.js:73:1)

+   at eval code (eval code:1:1)

+   at Test(string) (nativeerrors.js:49:5)

+   at Global code (nativeerrors.js:73:1)

 toString()     = URIError

 

 RegExpError

diff --git a/test/Error/errorCtor_v4.baseline b/test/Error/errorCtor_v4.baseline
index d027510..8a1cade 100644
--- a/test/Error/errorCtor_v4.baseline
+++ b/test/Error/errorCtor_v4.baseline
Binary files differ
diff --git a/test/Error/rlexe.xml b/test/Error/rlexe.xml
index 4a2b9c8..9731ae8 100644
--- a/test/Error/rlexe.xml
+++ b/test/Error/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
@@ -55,7 +55,7 @@
       <files>CallNonFunction.js</files>
       <baseline>CallNonFunction_3.baseline</baseline>
       <tags>exclude_native,exclude_dynapogo</tags>
-      <!-- one of the error is different in JIT'ed code -->
+      <!-- one of the error is different in JIT'ed code (Microsoft/ChakraCore#3011) -->
     </default>
   </test>
   <test>
diff --git a/test/FixedFields/rlexe.xml b/test/FixedFields/rlexe.xml
index 4c65e27..05db4c7 100644
--- a/test/FixedFields/rlexe.xml
+++ b/test/FixedFields/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
diff --git a/test/Function/rlexe.xml b/test/Function/rlexe.xml
index 7372e68..343b7c1 100644
--- a/test/Function/rlexe.xml
+++ b/test/Function/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
@@ -63,8 +63,9 @@
     <default>
       <files>argumentsLimits.js</files>
       <baseline>argumentsLimits.baseline</baseline>
-      <!-- this test takes a long time with dynapogo on chk build -->
-      <tags>exclude_chk</tags>
+      <!-- this test takes a long time with dynapogo on chk build-->
+      <!-- it's pretty slow on test builds too though-->
+      <tags>exclude_chk,Slow</tags>
     </default>
   </test>
   <test>
@@ -119,7 +120,6 @@
       <files>newsideeffect.js</files>
       <baseline>newsideeffect.baseline</baseline>
       <compile-flags>-Force:Deferparse</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -139,7 +139,6 @@
       <files>defernested.js</files>
       <compile-flags>-Force:Deferparse -DeferNested</compile-flags>
       <baseline>defernested.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -147,7 +146,6 @@
       <files>jitLoopBody.js</files>
       <baseline>jitLoopBody.baseline</baseline>
       <compile-flags>-force:jitLoopBody</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -186,7 +184,7 @@
       <files>deferredBadContinue.js</files>
       <baseline>deferredBadContinue.baseline</baseline>
       <compile-flags>-Force:Deferparse</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -372,7 +370,7 @@
     <default>
       <files>StackArgsWithFormals.js</files>
       <compile-flags>-mic:1 -off:simpleJit -trace:stackargformalsopt</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship,exclude_fre,exclude_nonative,require_backend,exclude_forceserialized</tags>
+      <tags>exclude_dynapogo,exclude_fre,exclude_nonative,require_backend,exclude_forceserialized</tags>
       <baseline>StackArgsWithFormals.baseline</baseline>
     </default>
   </test>
@@ -380,7 +378,7 @@
     <default>
       <files>StackArgs_MaxInterpret.js</files>
       <compile-flags>-minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
diff --git a/test/GlobalFunctions/rlexe.xml b/test/GlobalFunctions/rlexe.xml
index b6c475b..e2bed77 100644
--- a/test/GlobalFunctions/rlexe.xml
+++ b/test/GlobalFunctions/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
@@ -29,7 +29,6 @@
       <files>evalDeferred.js</files>
       <baseline>evalDeferred.baseline</baseline>
       <compile-flags>-Force:Deferparse</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -61,7 +60,7 @@
     <default>
       <files>InternalToString.js</files>
       <baseline>InternalToString.baseline</baseline>
-      <!-- test is timezone-sensitive; remove exclude_jenkins after fix -->
+      <!-- test is timezone-sensitive; remove exclude_jenkins after fix (Microsoft/ChakraCore#319) -->
       <tags>exclude_jenkins</tags>
     </default>
   </test>
diff --git a/test/InlineCaches/rlexe.xml b/test/InlineCaches/rlexe.xml
index 2f315f9..2eb10cf 100644
--- a/test/InlineCaches/rlexe.xml
+++ b/test/InlineCaches/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
diff --git a/test/Intl/rlexe.xml b/test/Intl/rlexe.xml
index ffc1f9d..a856f22 100644
--- a/test/Intl/rlexe.xml
+++ b/test/Intl/rlexe.xml
@@ -21,12 +21,14 @@
     </default>
   </test>
   <test>
+    <!-- Make NumberFormat.js expected output more general to support different implementations. (Microsoft/ChakraCore#3014) -->
     <default>
       <files>NumberFormat.js</files>
       <baseline>NumberFormat.baseline</baseline>
       <tags>Intl,exclude_winglob</tags>
     </default>
   </test>
+  <!-- Combine NumberFormatOptions*.js by making expected output more general. (Microsoft/ChakraCore#3014) -->
   <test>
     <default>
       <files>NumberFormatOptions.js</files>
@@ -96,7 +98,7 @@
 
   <test>
     <default>
-      <!-- TODO (doilij) investigate why -ExtendedErrorStackForTestHost inserts tabs at the beginning of some frames -->
+      <!-- TODO investigate why -ExtendedErrorStackForTestHost inserts tabs at the beginning of some frames (Microsoft/ChakraCore#3130) -->
       <files>IntlInternalsHiddenFromExceptionStackTest.js</files>
       <baseline>IntlInternalsHiddenFromExceptionStackTest.baseline</baseline>
       <compile-flags>-ExtendedErrorStackForTestHost-</compile-flags>
@@ -105,7 +107,7 @@
   </test>
   <test>
     <default>
-      <!-- TODO (doilij) investigate why -ExtendedErrorStackForTestHost inserts tabs at the beginning of some frames -->
+      <!-- TODO investigate why -ExtendedErrorStackForTestHost inserts tabs at the beginning of some frames (Microsoft/ChakraCore#3130) -->
       <files>IntlInternalsHiddenFromFirstChanceExceptionStackTest.js</files>
       <baseline>IntlInternalsHiddenFromFirstChanceExceptionStackTest.baseline</baseline>
       <compile-flags>-ExtendedErrorStackForTestHost-</compile-flags>
diff --git a/test/JSON/rlexe.xml b/test/JSON/rlexe.xml
index bc89ff8..8177bcd 100644
--- a/test/JSON/rlexe.xml
+++ b/test/JSON/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
@@ -10,7 +10,7 @@
     <default>
       <files>jx2.js</files>
       <baseline>jx2.baseline</baseline>
-      <!-- test is timezone-sensitive; remove exclude_jenkins after fix -->
+      <!-- test is timezone-sensitive; remove exclude_jenkins after fix (Microsoft/ChakraCore#319) -->
       <tags>exclude_jenkins</tags>
     </default>
   </test>
diff --git a/test/LetConst/rlexe.xml b/test/LetConst/rlexe.xml
index cf2430f..ea126dc 100644
--- a/test/LetConst/rlexe.xml
+++ b/test/LetConst/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
@@ -379,4 +379,9 @@
       <compile-flags>-args summary -endargs</compile-flags>
     </default>
   </test>
+  <test>
+    <default>
+      <files>shadowedsetter.js</files>
+    </default>
+  </test>
 </regress-exe>
diff --git a/test/LetConst/shadowedsetter.js b/test/LetConst/shadowedsetter.js
new file mode 100644
index 0000000..34259e2
--- /dev/null
+++ b/test/LetConst/shadowedsetter.js
@@ -0,0 +1,18 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+evaluate = WScript.LoadScript;
+
+__defineSetter__("x", function () { });
+
+evaluate(`
+  let x = 'let';
+  Object.defineProperty(this, "x", { value:
+          0xdec0  })
+  if (x === 'let' && this.x === 57024)
+  {
+    WScript.Echo('pass');
+  }
+`);
diff --git a/test/Lib/rlexe.xml b/test/Lib/rlexe.xml
index f80bbd3..3b8d591 100644
--- a/test/Lib/rlexe.xml
+++ b/test/Lib/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
@@ -58,7 +58,6 @@
     <default>
       <files>workingset.js</files>
       <baseline />
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <!--
@@ -67,7 +66,7 @@
    <default>
       <files>profiledataobject.js</files>
       <baseline>profiledataobject.baseline</baseline>
-      <tags>exclude_default,exclude_dynapogo,exclude_amd64,exclude_arm,exclude_ship,require_backend</tags>
+      <tags>exclude_default,exclude_dynapogo,exclude_amd64,exclude_arm,require_backend</tags>
           <compile-flags>-nonative -dynamicprofilecache:profile.dpl.profiledataobject.js</compile-flags>
    </default>
 </test>
@@ -78,7 +77,7 @@
    <default>
       <files>profiledataobject.js</files>
       <baseline>profiledataobject.dynapogo.baseline</baseline>
-      <tags>exclude_default,exclude_interpreted,exclude_amd64,exclude_arm,exclude_ship,require_backend</tags>
+      <tags>exclude_default,exclude_interpreted,exclude_amd64,exclude_arm,require_backend</tags>
           <compile-flags>-nonative -dynamicprofileinput:profile.dpl.profiledataobject.js</compile-flags>
    </default>
 </test>
@@ -89,7 +88,7 @@
    <default>
       <files>profiledataobject.js</files>
       <baseline>profiledataobject.amd64.baseline</baseline>
-      <tags>exclude_default,exclude_dynapogo,exclude_x86,exclude_arm,exclude_ship,require_backend</tags>
+      <tags>exclude_default,exclude_dynapogo,exclude_x86,exclude_arm,require_backend</tags>
           <compile-flags>-nonative -dynamicprofilecache:profile.dpl.profiledataobject.js</compile-flags>
    </default>
 </test>
@@ -100,7 +99,7 @@
    <default>
       <files>profiledataobject.js</files>
       <baseline>profiledataobject.dynapogo.amd64.baseline</baseline>
-      <tags>exclude_default,exclude_interpreted,exclude_x86,exclude_arm,exclude_ship,require_backend</tags>
+      <tags>exclude_default,exclude_interpreted,exclude_x86,exclude_arm,require_backend</tags>
           <compile-flags>-nonative -dynamicprofileinput:profile.dpl.profiledataobject.js</compile-flags>
    </default>
 </test>
@@ -111,7 +110,7 @@
    <default>
       <files>profiledataobject.js</files>
       <baseline>profiledataobject.arm.baseline</baseline>
-      <tags>exclude_default,exclude_dynapogo,exclude_x86,exclude_amd64,exclude_ship,require_backend</tags>
+      <tags>exclude_default,exclude_dynapogo,exclude_x86,exclude_amd64,require_backend</tags>
           <compile-flags>-nonative -dynamicprofilecache:profile.dpl.profiledataobject.js</compile-flags>
    </default>
 </test>
@@ -122,7 +121,7 @@
    <default>
       <files>profiledataobject.js</files>
       <baseline>profiledataobject.dynapogo.arm.baseline</baseline>
-      <tags>exclude_default,exclude_interpreted,exclude_x86,exclude_amd64,exclude_ship,require_backend</tags>
+      <tags>exclude_default,exclude_interpreted,exclude_x86,exclude_amd64,require_backend</tags>
           <compile-flags>-nonative -dynamicprofileinput:profile.dpl.profiledataobject.js</compile-flags>
    </default>
 </test>
diff --git a/test/Math/rlexe.xml b/test/Math/rlexe.xml
index 3a58edc..57775e6 100644
--- a/test/Math/rlexe.xml
+++ b/test/Math/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
diff --git a/test/Miscellaneous/rlexe.xml b/test/Miscellaneous/rlexe.xml
index 5ce3bb2..2346e4c 100644
--- a/test/Miscellaneous/rlexe.xml
+++ b/test/Miscellaneous/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
@@ -23,6 +23,9 @@
     <default>
       <files>oom.js</files>
       <baseline>oom.baseline</baseline>
+      <!-- TODO fix and re-enable (Microsoft/ChakraCore#3119) -->
+      <!-- Investigate: adding -bgjit makes this test pass -->
+      <!-- <compile-flags>-forcefragmentaddressspace:8000000 -bgjit</compile-flags> -->
       <compile-flags>-forcefragmentaddressspace:8000000</compile-flags>
       <tags>exclude_amd64,fail</tags>
     </default>
diff --git a/test/Number/rlexe.xml b/test/Number/rlexe.xml
index c27d9a9..d7e8e02 100644
--- a/test/Number/rlexe.xml
+++ b/test/Number/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
@@ -39,7 +39,6 @@
       <files>NoSse.js</files>
       <baseline>NoSse.baseline</baseline>
       <compile-flags>-sse:0</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
diff --git a/test/Object/rlexe.xml b/test/Object/rlexe.xml
index 1fe2054..8d9cb02 100644
--- a/test/Object/rlexe.xml
+++ b/test/Object/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
@@ -74,7 +74,7 @@
         <compile-flags>-args summary -endargs</compile-flags>
     </default>
   </test>
-  <!-- Disabled until we can resolve failures on Windows Server 2012 R2
+  <!-- Disabled until we can resolve failures on Windows Server 2012 R2 (Microsoft/ChakraCore#3030)
 <test>
     <default>
         <files>toLocaleString.js</files>
@@ -171,7 +171,7 @@
   <test>
     <default>
       <files>Slow.js</files>
-      <tags>exclude_chk</tags>
+      <tags>exclude_chk,Slow</tags>
     </default>
   </test>
   <test>
@@ -298,7 +298,6 @@
       <files>stackobject_dependency.js</files>
       <baseline />
       <compile-flags>-off:inline</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -379,7 +378,6 @@
       <files>stackobject_dependency.js</files>
       <baseline />
       <compile-flags>-off:inline</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -387,7 +385,6 @@
       <files>stackobject_dependency.js</files>
       <baseline />
       <compile-flags>-off:inline</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
diff --git a/test/Operators/rlexe.xml b/test/Operators/rlexe.xml
index e71f799..34a7b02 100644
--- a/test/Operators/rlexe.xml
+++ b/test/Operators/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
@@ -22,7 +22,7 @@
     <default>
       <files>biops.js</files>
       <baseline>biops.baseline</baseline>
-      <!-- fails due to baseline diff apparently; remove exclude_jenkins when fixed -->
+      <!-- fails due to baseline diff apparently; remove exclude_jenkins after fix (Microsoft/ChakraCore#319) -->
       <tags>Slow,exclude_jenkins</tags>
     </default>
   </test>
@@ -60,7 +60,7 @@
     <default>
       <files>equals.js</files>
       <baseline>equals.baseline</baseline>
-      <!-- test is timezone-sensitive; remove exclude_jenkins after fix -->
+      <!-- test is timezone-sensitive; remove exclude_jenkins after fix (Microsoft/ChakraCore#319) -->
       <tags>exclude_jenkins</tags>
     </default>
   </test>
diff --git a/test/Optimizer/isarrbug.js b/test/Optimizer/isarrbug.js
new file mode 100644
index 0000000..14648cd
--- /dev/null
+++ b/test/Optimizer/isarrbug.js
@@ -0,0 +1,13 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+function foo(){
+    return Array.isArray(1);
+};
+
+let failed = foo();
+failed |= foo();
+failed |= foo();
+failed ? print("Fail") : print("Pass");
diff --git a/test/Optimizer/nonequivpoly.js b/test/Optimizer/nonequivpoly.js
new file mode 100644
index 0000000..907d33a
--- /dev/null
+++ b/test/Optimizer/nonequivpoly.js
@@ -0,0 +1,30 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+var protoObj1 = {
+method0: function () {
+}};
+var v3 = {
+v4: function () {
+  return function bar() {
+    this.method0.apply({});
+  };
+}
+};
+protoObj1.v6 = v3.v4();
+protoObj1.v6.prototype = {
+method0: function () {
+}
+};
+protoObj1.v48 = v3.v4();
+protoObj1.v48.prototype = {
+method0: function () {
+  new protoObj1.v6();
+}
+};
+var v67 = new protoObj1.v48();
+var v68 = protoObj1.v48();
+
+print("Pass");
\ No newline at end of file
diff --git a/test/Optimizer/rlexe.xml b/test/Optimizer/rlexe.xml
index d6acac0..ee4566d 100644
--- a/test/Optimizer/rlexe.xml
+++ b/test/Optimizer/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
@@ -27,6 +27,11 @@
   </test>
   <test>
     <default>
+      <files>isarrbug.js</files>
+    </default>
+  </test>
+  <test>
+    <default>
       <files>bug469.js</files>
       <compile-flags>-maxinterpretcount:1 -bgjit- -loopinterpretcount:1 -force:fixdataprops -off:aggressiveinttypespec -off:bailonnoprofile</compile-flags>
     </default>
@@ -713,7 +718,7 @@
     <default>
       <files>test102.js</files>
       <compile-flags>-minInterpretCount:4 -maxInterpretCount:4 -off:simpleJit</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -721,7 +726,7 @@
       <files>test103.js</files>
       <baseline>test103.baseline</baseline>
       <compile-flags>-minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit -off:objTypeSpec</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -729,7 +734,7 @@
       <files>test104.js</files>
       <baseline>test104.baseline</baseline>
       <compile-flags>-minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit -force:jitLoopBody</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -737,7 +742,7 @@
       <files>test105.js</files>
       <baseline>test105.baseline</baseline>
       <compile-flags>-minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit -off:aggressiveIntTypeSpec -off:fieldHoist</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -749,63 +754,63 @@
     <default>
       <files>test107.js</files>
       <compile-flags>-minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit -off:lossyIntTypeSpec -force:jitLoopBody</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
     <default>
       <files>test108.js</files>
       <compile-flags>-minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
     <default>
       <files>test109.js</files>
       <compile-flags>-minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit -off:aggressiveIntTypeSpec -off:lossyIntTypeSpec</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
     <default>
       <files>test110.js</files>
       <compile-flags>-bgJit- -minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit -loopInterpretCount:0 -off:aggressiveIntTypeSpec -off:lossyIntTypeSpec</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
     <default>
       <files>test111.js</files>
       <compile-flags>-minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit -force:rejit -force:deferparse</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
     <default>
       <files>test112.js</files>
       <compile-flags>-minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit -off:typedArrayTypeSpec</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
     <default>
       <files>test113.js</files>
       <compile-flags>-minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit -off:arrayMissingValueCheckHoist</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
     <default>
       <files>test115.js</files>
       <compile-flags>-args bailout -endArgs</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
     <default>
       <files>test116.js</files>
       <compile-flags>-minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -813,7 +818,7 @@
       <files>test117.js</files>
       <baseline>test117.baseline</baseline>
       <compile-flags>-minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit -off:eliminateArrayAccessHelperCall</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -821,7 +826,7 @@
       <files>test118.js</files>
       <baseline>test118.baseline</baseline>
       <compile-flags>-minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -829,28 +834,28 @@
       <files>test119.js</files>
       <baseline>test119.baseline</baseline>
       <compile-flags>-minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
     <default>
       <files>test120.js</files>
       <compile-flags>-minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
     <default>
       <files>test121.js</files>
       <compile-flags>-bgJit- -loopInterpretCount:1</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
     <default>
       <files>test122.js</files>
       <compile-flags>-bgJit- -maxInterpretCount:2 -loopInterpretCount:1</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -858,28 +863,28 @@
       <files>test123.js</files>
       <baseline>test123.baseline</baseline>
       <compile-flags>-bgJit- -loopInterpretCount:1</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
     <default>
       <files>test124.js</files>
       <compile-flags>-bgJit- -loopInterpretCount:1 -maxInterpretCount:2 -maxSimpleJitRunCount:0 -forceSerialized</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
     <default>
       <files>test125.js</files>
       <compile-flags>-forceNative -off:fullJit</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
     <default>
       <files>test126.js</files>
       <compile-flags>-bgJit- -fullJitAfter:1</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -892,35 +897,35 @@
       <files>test128.js</files>
       <baseline>test128.baseline</baseline>
       <compile-flags>-noNative</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
     <default>
       <files>test129.js</files>
       <compile-flags>-bgJit- -loopInterpretCount:1</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
     <default>
       <files>test130.js</files>
       <compile-flags>-bgJit- -fullJitAfter:1 -off:fieldHoist -force:deferParse</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
     <default>
       <files>test131.js</files>
       <compile-flags>-bgJit- -fullJitAfter:1 -off:fieldCopyProp</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
     <default>
       <files>test132.js</files>
       <compile-flags>-bgJit- -fullJitAfter:1 -off:eliminateArrayAccessHelperCall</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -928,7 +933,7 @@
       <files>test133.js</files>
       <baseline>test133.baseline</baseline>
       <compile-flags>-bgJit- -fullJitAfter:1 -loopInterpretCount:1</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -936,7 +941,7 @@
       <files>test134.js</files>
       <baseline>test134.baseline</baseline>
       <compile-flags>-bgJit- -fullJitAfter:1</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -949,28 +954,28 @@
       <files>test136.js</files>
       <baseline>test136.baseline</baseline>
       <compile-flags>-bgJit- -off:simpleJit -loopInterpretCount:1 -off:nativeArray -off:jsArraySegmentHoist -off:arrayMissingValueCheckHoist</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
     <default>
       <files>test137.js</files>
       <compile-flags>-bgJit- -simpleJitAfter:1 -fullJitAfter:3 -loopInterpretCount:1</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
     <default>
       <files>test138.js</files>
       <compile-flags>-bgJit- -bgJitDelay:0 -loopInterpretCount:50</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
     <default>
       <files>test138.js</files>
       <compile-flags>-bgJit- -bgJitDelay:0</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -978,28 +983,28 @@
       <files>test139.js</files>
       <baseline>test139.baseline</baseline>
       <compile-flags>-bgJit- -off:simpleJit -fullJitAfter:2</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
     <default>
       <files>test140.js</files>
       <compile-flags>-bgJit- -off:simpleJit -fullJitAfter:1</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
     <default>
       <files>test141.js</files>
       <compile-flags>-bgJit- -off:simpleJit -fullJitAfter:2 -on:simulatePolyCacheWithOneTypeForFunction:1 -simulatePolyCacheWithOneTypeForInlineCacheIndex:3</compile-flags>
-      <tags>exclude_dynapogo,exclude_fre,exclude_ship</tags>
+      <tags>exclude_dynapogo,exclude_fre</tags>
     </default>
   </test>
   <test>
     <default>
       <files>test142.js</files>
       <compile-flags>-bgJit- -off:simpleJit -fullJitAfter:2</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -1008,21 +1013,21 @@
       <baseline>test143.baseline</baseline>
       <compile-flags>-bgJit- -off:simpleJit -loopInterpretCount:1 -testTrace:arrayCheckHoist</compile-flags>
       <!-- ch.exe doesn't output entire baseline before exiting; -testTrace flush issue? -->
-      <tags>exclude_dynapogo,exclude_ship,exclude_forceserialized</tags>
+      <tags>exclude_dynapogo,exclude_forceserialized</tags>
     </default>
   </test>
   <test>
     <default>
       <files>test144.js</files>
       <compile-flags>-bgJit- -off:simpleJit -fullJitAfter:1 -off:arrayCheckHoist</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
     <default>
       <files>test145.js</files>
       <compile-flags>-bgJit- -off:simpleJit -fullJitAfter:1 -force:deferParse</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -1053,7 +1058,7 @@
       <files>marktempnumberontempobjects.js</files>
       <baseline>marktempnumberontempobjects.baseline</baseline>
       <compile-flags>-fja:2 -off:simplejit</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -1081,7 +1086,7 @@
       <files>Overflow_MaxInterpret.js</files>
       <baseline>Overflow_MaxInterpret.baseline</baseline>
       <compile-flags>-minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -1095,7 +1100,6 @@
       <files>LossyLosslessInt32.js</files>
       <baseline>LossyLosslessInt32.baseline</baseline>
       <compile-flags>-off:aggressiveIntTypeSpec</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -1116,7 +1120,6 @@
       <files>AggressiveIntTypeSpec.js</files>
       <baseline>AggressiveIntTypeSpec.baseline</baseline>
       <compile-flags>-off:inline</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -1124,7 +1127,7 @@
       <files>AggressiveIntTypeSpec_Off_MaxInterpret.js</files>
       <baseline>AggressiveIntTypeSpec_Off_MaxInterpret.baseline</baseline>
       <compile-flags>-minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit -off:aggressiveIntTypeSpec</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -1132,7 +1135,7 @@
       <files>FloatTypeSpec_MaxInterpret.js</files>
       <baseline>FloatTypeSpec_MaxInterpret.baseline</baseline>
       <compile-flags>-minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit -off:copyProp -off:inline</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -1140,7 +1143,7 @@
       <files>NativeArray_MaxInterpret_OffArrayMissingValueCheckHoist.js</files>
       <baseline>NativeArray_MaxInterpret_OffArrayMissingValueCheckHoist.baseline</baseline>
       <compile-flags>-minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit -off:arrayMissingValueCheckHoist</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -1165,7 +1168,6 @@
       <files>copyprop.js</files>
       <compile-flags>-maxinterpretcount:1 -off:simpleJit</compile-flags>
       <baseline>copyprop.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -1173,7 +1175,6 @@
       <files>dead.js</files>
       <compile-flags>-force:inlinecandidate</compile-flags>
       <baseline>dead.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -1198,7 +1199,7 @@
       <files>ArrayCheckHoist.js</files>
       <baseline>ArrayCheckHoist_NoBailout.baseline</baseline>
       <compile-flags>-noNative -dynamicprofilecache:profile.dpl.ArrayCheckHoist.js</compile-flags>
-      <tags>exclude_dynapogo,exclude_serialized,exclude_default,exclude_ship,Slow</tags>
+      <tags>exclude_dynapogo,exclude_serialized,exclude_default,Slow</tags>
       <timeout>300</timeout>
     </default>
   </test>
@@ -1207,7 +1208,7 @@
       <files>ArrayCheckHoist.js</files>
       <baseline>ArrayCheckHoist_Bailout.baseline</baseline>
       <compile-flags>-off:arrayCheckHoist -args bailout -endArgs -dynamicprofileinput:profile.dpl.ArrayCheckHoist.js</compile-flags>
-      <tags>exclude_interpreted,exclude_ship,exclude_serialized,Slow</tags>
+      <tags>exclude_interpreted,exclude_serialized,Slow</tags>
       <timeout>300</timeout>
     </default>
   </test>
@@ -1216,7 +1217,7 @@
       <files>ArrayCheckHoist.js</files>
       <baseline>ArrayCheckHoist_Bailout.baseline</baseline>
       <compile-flags>-args bailout -endArgs -off:fieldHoist -off:fieldCopyProp -off:objTypeSpec -dynamicprofileinput:profile.dpl.ArrayCheckHoist.js</compile-flags>
-      <tags>exclude_interpreted,exclude_ship,exclude_serialized,Slow</tags>
+      <tags>exclude_interpreted,exclude_serialized,Slow</tags>
       <timeout>300</timeout>
     </default>
   </test>
@@ -1225,7 +1226,7 @@
       <files>ArrayCheckHoist.js</files>
       <baseline>ArrayCheckHoist_Bailout.baseline</baseline>
       <compile-flags>-args bailout -endArgs -dynamicprofileinput:profile.dpl.ArrayCheckHoist.js</compile-flags>
-      <tags>exclude_interpreted,exclude_ship,exclude_serialized,Slow</tags>
+      <tags>exclude_interpreted,exclude_serialized,Slow</tags>
       <timeout>300</timeout>
     </default>
   </test>
@@ -1234,7 +1235,7 @@
       <files>BoundCheckElimination.js</files>
       <baseline>BoundCheckElimination.baseline</baseline>
       <compile-flags>-bgJit- -minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit -off:bailOnNoProfile -testTrace:boundCheckElimination -testTrace:boundCheckHoist</compile-flags>
-      <tags>exclude_dynapogo,exclude_serialized,exclude_default,exclude_ship</tags>
+      <tags>exclude_dynapogo,exclude_serialized,exclude_default</tags>
     </default>
   </test>
   <test>
@@ -1242,7 +1243,7 @@
       <files>Miscellaneous_MaxInterpret.js</files>
       <baseline>Miscellaneous_MaxInterpret.baseline</baseline>
       <compile-flags>-bgJit- -minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -1250,14 +1251,14 @@
       <files>Miscellaneous_LoopInterpret.js</files>
       <baseline>Miscellaneous_LoopInterpret.baseline</baseline>
       <compile-flags>-bgJit- -loopInterpretCount:1</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
     <default>
       <files>Miscellaneous_ForceJitLoopBody.js</files>
       <compile-flags>-bgJit- -force:jitLoopBody</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -1289,7 +1290,7 @@
     <default>
       <files>bailonnoprofile_objtypespecstore.js</files>
       <compile-flags>-recyclerverify:run -off:simplejit -maxinterpretcount:2</compile-flags>
-      <tags>exclude_ship,exclude_fre,exclude_dynapogo</tags>
+      <tags>exclude_fre,exclude_dynapogo</tags>
       <baseline />
     </default>
   </test>
@@ -1360,6 +1361,11 @@
   </test>
   <test>
     <default>
+      <files>nonequivpoly.js</files>
+    </default>
+  </test>
+  <test>
+    <default>
       <files>memop-upperbound.js</files>
       <baseline>memop-upperbound.baseline</baseline>
       <compile-flags>-lic:1 -off:nativearray</compile-flags>
diff --git a/test/PerfHint/rlexe.xml b/test/PerfHint/rlexe.xml
index 5beb9a8..4fdca5c 100644
--- a/test/PerfHint/rlexe.xml
+++ b/test/PerfHint/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
diff --git a/test/Prototypes/rlexe.xml b/test/Prototypes/rlexe.xml
index 7ce78ca..36464fb 100644
--- a/test/Prototypes/rlexe.xml
+++ b/test/Prototypes/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
diff --git a/test/RWC/rlexe.xml b/test/RWC/rlexe.xml
index ab48142..e4034ac 100644
--- a/test/RWC/rlexe.xml
+++ b/test/RWC/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
diff --git a/test/Regex/rlexe.xml b/test/Regex/rlexe.xml
index ecd4d03..1e38c5c 100644
--- a/test/Regex/rlexe.xml
+++ b/test/Regex/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
diff --git a/test/SIMD.TypeSpec/rlexe.xml b/test/SIMD.TypeSpec/rlexe.xml
index e5f5b2a..c751805 100644
--- a/test/SIMD.TypeSpec/rlexe.xml
+++ b/test/SIMD.TypeSpec/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
diff --git a/test/SIMD.bool16x8.asmjs/rlexe.xml b/test/SIMD.bool16x8.asmjs/rlexe.xml
index 203b1a7..fc55c82 100644
--- a/test/SIMD.bool16x8.asmjs/rlexe.xml
+++ b/test/SIMD.bool16x8.asmjs/rlexe.xml
@@ -1,25 +1,25 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <!--__Constructor__-->
   <test>
     <default>
       <files>testConstructor.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConstructor.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConstructor.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -27,38 +27,38 @@
   <test>
     <default>
       <files>testBitwise.js</files>
-      <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <baseline>testBitwise.baseline</baseline>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testBitwise.js</files>
-      <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <baseline>testBitwise.baseline</baseline>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testBitwise.js</files>
-      <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <baseline>testBitwise.baseline</baseline>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testBitwise.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testBitwise.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -67,7 +67,7 @@
     <default>
       <files>testTrue.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -75,7 +75,7 @@
     <default>
       <files>testTrue.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -83,21 +83,21 @@
     <default>
       <files>testTrue.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testTrue.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testTrue.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -105,7 +105,7 @@
      <default>
         <files>testBug1.js</files>
         <baseline>testBug1.baseline</baseline>
-        <tags>exclude_dynapogo,exclude_ship</tags>
+        <tags>exclude_dynapogo</tags>
         <compile-flags>-off:deferparse -testtrace:asmjs -simdjs -bgjit- -maic:1</compile-flags>
      </default>
    </test>
diff --git a/test/SIMD.bool16x8.asmjs/testBitwise.baseline b/test/SIMD.bool16x8.asmjs/testBitwise.baseline
new file mode 100644
index 0000000..753bc00
--- /dev/null
+++ b/test/SIMD.bool16x8.asmjs/testBitwise.baseline
@@ -0,0 +1,3 @@
+Warning: redefining export
+Successfully compiled asm.js code
+PASS
diff --git a/test/SIMD.bool32x4.asmjs/rlexe.xml b/test/SIMD.bool32x4.asmjs/rlexe.xml
index 203b1a7..fc55c82 100644
--- a/test/SIMD.bool32x4.asmjs/rlexe.xml
+++ b/test/SIMD.bool32x4.asmjs/rlexe.xml
@@ -1,25 +1,25 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <!--__Constructor__-->
   <test>
     <default>
       <files>testConstructor.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConstructor.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConstructor.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -27,38 +27,38 @@
   <test>
     <default>
       <files>testBitwise.js</files>
-      <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <baseline>testBitwise.baseline</baseline>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testBitwise.js</files>
-      <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <baseline>testBitwise.baseline</baseline>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testBitwise.js</files>
-      <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <baseline>testBitwise.baseline</baseline>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testBitwise.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testBitwise.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -67,7 +67,7 @@
     <default>
       <files>testTrue.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -75,7 +75,7 @@
     <default>
       <files>testTrue.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -83,21 +83,21 @@
     <default>
       <files>testTrue.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testTrue.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testTrue.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -105,7 +105,7 @@
      <default>
         <files>testBug1.js</files>
         <baseline>testBug1.baseline</baseline>
-        <tags>exclude_dynapogo,exclude_ship</tags>
+        <tags>exclude_dynapogo</tags>
         <compile-flags>-off:deferparse -testtrace:asmjs -simdjs -bgjit- -maic:1</compile-flags>
      </default>
    </test>
diff --git a/test/SIMD.bool32x4.asmjs/testBitwise.baseline b/test/SIMD.bool32x4.asmjs/testBitwise.baseline
new file mode 100644
index 0000000..753bc00
--- /dev/null
+++ b/test/SIMD.bool32x4.asmjs/testBitwise.baseline
@@ -0,0 +1,3 @@
+Warning: redefining export
+Successfully compiled asm.js code
+PASS
diff --git a/test/SIMD.bool8x16.asmjs/rlexe.xml b/test/SIMD.bool8x16.asmjs/rlexe.xml
index b4b51f1..6649af8 100644
--- a/test/SIMD.bool8x16.asmjs/rlexe.xml
+++ b/test/SIMD.bool8x16.asmjs/rlexe.xml
@@ -1,25 +1,25 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <!--__Constructor__-->
   <test>
     <default>
       <files>testConstructor.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConstructor.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConstructor.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -27,7 +27,7 @@
     <default>
       <files>testConstructor.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -off:simplejit -mic:0 -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -35,7 +35,7 @@
     <default>
       <files>testConstructor.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -off:simplejit -mic:0 -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -43,38 +43,38 @@
   <test>
     <default>
       <files>testBitwise.js</files>
-      <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <baseline>testBitwise.baseline</baseline>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testBitwise.js</files>
-      <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <baseline>testBitwise.baseline</baseline>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testBitwise.js</files>
-      <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <baseline>testBitwise.baseline</baseline>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testBitwise.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testBitwise.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -83,7 +83,7 @@
     <default>
       <files>testTrue.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -91,7 +91,7 @@
     <default>
       <files>testTrue.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -99,21 +99,21 @@
     <default>
       <files>testTrue.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testTrue.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testTrue.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -122,7 +122,7 @@
     <default>
       <files>bug824.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -mic:0</compile-flags>
     </default>
   </test>
@@ -130,7 +130,7 @@
      <default>
         <files>testBug1.js</files>
         <baseline>testBug1.baseline</baseline>
-        <tags>exclude_dynapogo,exclude_ship</tags>
+        <tags>exclude_dynapogo</tags>
         <compile-flags>-off:deferparse -testtrace:asmjs -simdjs -bgjit- -maic:1</compile-flags>
      </default>
    </test>
diff --git a/test/SIMD.bool8x16.asmjs/testBitwise.baseline b/test/SIMD.bool8x16.asmjs/testBitwise.baseline
new file mode 100644
index 0000000..753bc00
--- /dev/null
+++ b/test/SIMD.bool8x16.asmjs/testBitwise.baseline
@@ -0,0 +1,3 @@
+Warning: redefining export
+Successfully compiled asm.js code
+PASS
diff --git a/test/SIMD.float32x4.asmjs/rlexe.xml b/test/SIMD.float32x4.asmjs/rlexe.xml
index 0f9e7dc..06f860c 100644
--- a/test/SIMD.float32x4.asmjs/rlexe.xml
+++ b/test/SIMD.float32x4.asmjs/rlexe.xml
@@ -4,7 +4,7 @@
     <default>
       <files>testAbsNeg.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -12,7 +12,7 @@
     <default>
       <files>testAbsNeg.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -20,21 +20,21 @@
     <default>
       <files>testAbsNeg.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:asmjs -testtrace:asmjsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testAbsNeg.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testAbsNeg.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
@@ -43,7 +43,7 @@
     <default>
       <files>testAddSub.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -51,7 +51,7 @@
     <default>
       <files>testAddSub.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -59,21 +59,21 @@
     <default>
       <files>testAddSub.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:asmjs -testtrace:asmjsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
     <test>
     <default>
       <files>testAddSub.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
     <test>
     <default>
       <files>testAddSub.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
@@ -82,7 +82,7 @@
     <default>
       <files>testCalls.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -90,7 +90,7 @@
     <default>
       <files>testCalls.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -98,21 +98,21 @@
     <default>
       <files>testCalls.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:asmjs -testtrace:asmjsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
     <test>
     <default>
       <files>testCalls.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
     <test>
     <default>
       <files>testCalls.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
@@ -121,7 +121,7 @@
     <default>
       <files>testComparison.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -129,7 +129,7 @@
     <default>
       <files>testComparison.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -137,21 +137,21 @@
     <default>
       <files>testComparison.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:asmjs -testtrace:asmjsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
     <test>
     <default>
       <files>testComparison.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
     <test>
     <default>
       <files>testComparison.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
@@ -160,7 +160,7 @@
       <files>testConversion.js</files>
       <baseline>asmjs.baseline</baseline>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -168,28 +168,28 @@
       <files>testConversion.js</files>
       <baseline>asmjs.baseline</baseline>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
     <default>
       <files>testConversion.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:asmjs -testtrace:asmjsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConversion.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
     <test>
     <default>
       <files>testConversion.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
@@ -198,7 +198,7 @@
     <default>
       <files>testFields.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -206,7 +206,7 @@
     <default>
       <files>testFields.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -214,21 +214,21 @@
     <default>
       <files>testFields.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:asmjs -testtrace:asmjsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
     <test>
     <default>
       <files>testFields.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
     <test>
     <default>
       <files>testFields.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
@@ -237,7 +237,7 @@
     <default>
       <files>testInit.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -245,7 +245,7 @@
     <default>
       <files>testInit.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -253,21 +253,21 @@
     <default>
       <files>testInit.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:asmjs -testtrace:asmjsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testInit.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testInit.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
@@ -276,7 +276,7 @@
     <default>
       <files>testMinMax.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -284,7 +284,7 @@
     <default>
       <files>testMinMax.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -292,21 +292,21 @@
     <default>
       <files>testMinMax.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:asmjs -testtrace:asmjsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testMinMax.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testMinMax.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
@@ -317,7 +317,7 @@
       <files>testMulDiv.js</files>
       <baseline>asmjs.baseline</baseline>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -325,28 +325,28 @@
       <files>testMulDiv.js</files>
       <baseline>asmjs.baseline</baseline>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
     <default>
       <files>testMulDiv.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:asmjs -testtrace:asmjsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testMulDiv.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testMulDiv.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
@@ -355,7 +355,7 @@
     <default>
       <files>testRcpSqrt.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -363,7 +363,7 @@
     <default>
       <files>testRcpSqrt.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -371,21 +371,21 @@
     <default>
       <files>testRcpSqrt.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:asmjs -testtrace:asmjsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testRcpSqrt.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testRcpSqrt.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
@@ -394,7 +394,7 @@
     <default>
       <files>testSelect.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -402,7 +402,7 @@
     <default>
       <files>testSelect.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -410,21 +410,21 @@
     <default>
       <files>testSelect.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:asmjs -testtrace:asmjsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testSelect.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testSelect.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
@@ -432,7 +432,7 @@
     <default>
       <files>testSplat.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -440,7 +440,7 @@
     <default>
       <files>testSplat.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -448,21 +448,21 @@
     <default>
       <files>testSplat.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:asmjs -testtrace:asmjsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testSplat.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testSplat.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
@@ -471,7 +471,7 @@
     <default>
       <files>testSqrt.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -479,7 +479,7 @@
     <default>
       <files>testSqrt.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -487,21 +487,21 @@
     <default>
       <files>testSqrt.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:asmjs -testtrace:asmjsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testSqrt.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testSqrt.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
@@ -509,7 +509,7 @@
       <default>
       <files>testWithLane.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
   </default>
   </test>
@@ -517,7 +517,7 @@
   <default>
       <files>testWithLane.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
   </default>
   </test>
@@ -525,21 +525,21 @@
   <default>
       <files>testWithLane.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:asmjs -testtrace:asmjsInterpreter -off:fulljit -off:backend</compile-flags>
   </default>
   </test>
   <test>
       <default>
       <files>testWithLane.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
   </default>
   </test>
   <test>
       <default>
       <files>testWithLane.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
   </default>
   </test>
@@ -548,7 +548,7 @@
   <default>
           <files>testLoadStore-2.js</files>
           <baseline>testLoadStore-2.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError</compile-flags>
       </default>
   </test>
@@ -556,52 +556,7 @@
       <default>
           <files>testLoadStore-2.js</files>
           <baseline>testLoadStore-2.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
-          <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError -lic:1</compile-flags>
-      </default>
-  </test>
-  <!-- too slow to run in interpreter
-  <test>
-      <default>
-          <files>testLoadStore-2.js</files>
-          <baseline>testLoadStore-2.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
-          <compile-flags>-on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
-      </default>
-  </test>
-  -->
-
-  <!-- currently too slow. Enable with globOpt support.
-  <test>
-  <default>
-          <files>testLoadStore-2.js</files>
-          <baseline>testLoadStore-2.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
-          <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError</compile-flags>
-      </default>
-  </test>
-  <test>
-  <default>
-          <files>testLoadStore-2.js</files>
-          <baseline>testLoadStore-2.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
-          <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError</compile-flags>
-      </default>
-  </test>
-  -->
-  <test>
-      <default>
-          <files>testLoadStore.js</files>
-          <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
-          <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError</compile-flags>
-      </default>
-  </test>
-  <test>
-      <default>
-          <files>testLoadStore.js</files>
-          <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError -lic:1</compile-flags>
       </default>
   </test>
@@ -609,105 +564,37 @@
       <default>
           <files>testLoadStore.js</files>
           <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
+          <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError</compile-flags>
+      </default>
+  </test>
+  <test>
+      <default>
+          <files>testLoadStore.js</files>
+          <baseline>asmjs.baseline</baseline>
+          <tags>exclude_dynapogo</tags>
+          <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError -lic:1</compile-flags>
+      </default>
+  </test>
+  <test>
+      <default>
+          <files>testLoadStore.js</files>
+          <baseline>asmjs.baseline</baseline>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
       </default>
   </test>
   <test>
       <default>
           <files>testLoadStore.js</files>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
       </default>
   </test>
   <test>
       <default>
           <files>testLoadStore.js</files>
-          <tags>exclude_dynapogo,exclude_ship</tags>
-          <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
-      </default>
-  </test>
-
-  <test>
-      <default>
-          <files>testResizeLoadStore-2.js</files>
-          <baseline>testResizeLoadStore-2.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
-          <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError</compile-flags>
-      </default>
-  </test>
-
-  <test>
-      <default>
-          <files>testResizeLoadStore-2.js</files>
-          <baseline>testResizeLoadStore-2.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
-          <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError -lic:1</compile-flags>
-      </default>
-  </test>
-  <!-- too slow to run in interpreter
-  <test>
-      <default>
-          <files>testResizeLoadStore-2.js</files>
-          <baseline>testResizeLoadStore-2.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
-          <compile-flags>-on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
-      </default>
-  </test>
-  -->
-  <test>
-          <default>
-              <files>testResizeLoadStore-2.js</files>
-              <baseline>testResizeLoadStore-2-noAsmJs.baseline</baseline>
-              <tags>exclude_dynapogo,exclude_ship</tags>
-              <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
-          </default>
-  </test>
-  <!-- Disabled due to bug in TypeSpec
-  <test>
-          <default>
-              <files>testResizeLoadStore-2.js</files>
-              <baseline>testResizeLoadStore-2-noAsmJs.baseline</baseline>
-              <tags>exclude_dynapogo,exclude_ship</tags>
-              <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
-          </default>
-  </test>
-  -->
-  <test>
-      <default>
-          <files>testResizeLoadStore.js</files>
-          <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
-          <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError</compile-flags>
-      </default>
-  </test>
-  <test>
-      <default>
-          <files>testResizeLoadStore.js</files>
-          <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
-          <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
-      </default>
-  </test>
-  <test>
-      <default>
-          <files>testResizeLoadStore.js</files>
-          <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
-          <compile-flags>-on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
-      </default>
-  </test>
-  <test>
-      <default>
-          <files>testResizeLoadStore.js</files>
-          <tags>exclude_dynapogo,exclude_ship</tags>
-          <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
-      </default>
-  </test>
-  <test>
-      <default>
-          <files>testResizeLoadStore.js</files>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
       </default>
   </test>
@@ -715,7 +602,7 @@
       <default>
           <files>testShuffle.js</files>
           <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError</compile-flags>
       </default>
   </test>
@@ -723,7 +610,7 @@
       <default>
           <files>testShuffle.js</files>
           <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError -lic:1</compile-flags>
       </default>
   </test>
@@ -731,21 +618,21 @@
       <default>
           <files>testShuffle.js</files>
           <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
       </default>
   </test>
   <test>
       <default>
           <files>testShuffle.js</files>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
       </default>
   </test>
   <test>
       <default>
           <files>testShuffle.js</files>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
       </default>
   </test>
@@ -754,7 +641,7 @@
       <default>
           <files>testSwizzle.js</files>
           <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError</compile-flags>
       </default>
   </test>
@@ -762,7 +649,7 @@
       <default>
           <files>testSwizzle.js</files>
           <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError -lic:1</compile-flags>
       </default>
   </test>
@@ -770,21 +657,21 @@
       <default>
           <files>testSwizzle.js</files>
           <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
       </default>
   </test>
   <test>
       <default>
           <files>testSwizzle.js</files>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
       </default>
   </test>
   <test>
       <default>
           <files>testSwizzle.js</files>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
       </default>
   </test>
@@ -793,7 +680,7 @@
     <default>
       <files>testSIMDLink-1.js</files>
       <baseline>SIMDLink.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -801,7 +688,7 @@
     <default>
       <files>testSIMDLink-1.js</files>
       <baseline>SIMDLink.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -809,7 +696,7 @@
     <default>
       <files>testSIMDLink-1.js</files>
       <baseline>SIMDLink.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:asmjs -testtrace:asmjsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
@@ -818,7 +705,7 @@
     <default>
       <files>testSIMDLink-2.js</files>
       <baseline>SIMDLink.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -826,7 +713,7 @@
     <default>
       <files>testSIMDLink-2.js</files>
       <baseline>SIMDLink.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -834,7 +721,7 @@
     <default>
       <files>testSIMDLink-2.js</files>
       <baseline>SIMDLink.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:asmjs -testtrace:asmjsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
@@ -842,7 +729,7 @@
     <default>
       <files>testSIMDLink-3.js</files>
       <baseline>SIMDLink.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -851,7 +738,7 @@
     <default>
       <files>testSIMDLink-3.js</files>
       <baseline>SIMDLink.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -859,7 +746,7 @@
     <default>
       <files>testSIMDLink-3.js</files>
       <baseline>SIMDLink.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:asmjs -testtrace:asmjsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
    </test>
@@ -868,7 +755,7 @@
     <default>
       <files>testMisc.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -876,7 +763,7 @@
     <default>
       <files>testMisc.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -884,22 +771,21 @@
     <default>
       <files>testMisc.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:asmjs -testtrace:asmjsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
    </test>
-
     <test>
         <default>
             <files>testMisc.js</files>
-            <tags>exclude_dynapogo,exclude_ship</tags>
+            <tags>exclude_dynapogo</tags>
             <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
         </default>
     </test>
     <test>
         <default>
             <files>testMisc.js</files>
-            <tags>exclude_dynapogo,exclude_ship</tags>
+            <tags>exclude_dynapogo</tags>
             <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
         </default>
     </test>
@@ -907,7 +793,7 @@
      <default>
         <files>testBug1.js</files>
         <baseline>testBug1.baseline</baseline>
-        <tags>exclude_dynapogo,exclude_ship</tags>
+        <tags>exclude_dynapogo</tags>
         <compile-flags>-off:deferparse -testtrace:asmjs -simdjs -bgjit- -maic:1</compile-flags>
      </default>
    </test>
diff --git a/test/SIMD.float32x4.asmjs/testResizeLoadStore-2-noAsmJs.baseline b/test/SIMD.float32x4.asmjs/testResizeLoadStore-2-noAsmJs.baseline
deleted file mode 100644
index b3f9693..0000000
--- a/test/SIMD.float32x4.asmjs/testResizeLoadStore-2-noAsmJs.baseline
+++ /dev/null
@@ -1,149 +0,0 @@
-4194304

-Stores:

-Test1

-Test2

-Test3

-Test4

-Test5

-Test6

-Test7

-Test8

-Test9

-Test10

-Test12

-Test13

-Test14

-Loads

-Test1

-Test2

-Test3

-Test4

-Test5

-Test6

-Test7

-Test8

-Test9

-Test10

-Test11

-Test12

-BoundCheck

-Test1

-Correct

-Test2

-Correct

-Test3

-Correct

-Test4

-Correct

-Test5

-Correct

-Test6

-Correct

-Test7

-Correct

-Test8

-Correct

-Test9

-Correct

-Test10

-Correct

-Test11

-Correct

-Correct

-Correct

-Correct

-Correct

-Correct

-Correct

-Correct

-Test12

-Correct

-Test13

-Correct

-Test14

-Correct

-Test15

-Correct

-Test16

-Correct

-Test17

-Correct

-Test18

-Correct

-Test19

-Correct

-true

->>> ChangeHeap 

-Stores:

-Test1

-Test2

-Test3

-Test4

-Test5

-Test6

-Test7

-Test8

-Test9

-Test10

-Test12

-Test13

-Test14

-Loads

-Test1

-Test2

-Test3

-Test4

-Test5

-Test6

-Test7

-Test8

-Test9

-Test10

-Test11

-Test12

-BoundCheck

-Test1

-Correct

-Test2

-Correct

-Test3

-Correct

-Test4

-Correct

-Test5

-Correct

-Test6

-Correct

-Test7

-Correct

-Test8

-Correct

-Test9

-Correct

-Test10

-Correct

-Test11

-Correct

-Correct

-Correct

-Correct

-Correct

-Correct

-Correct

-Correct

-Test12

-Correct

-Test13

-Correct

-Test14

-Correct

-Test15

-Correct

-Test16

-Correct

-Test17

-Correct

-Test18

-Correct

-Test19

-Correct

diff --git a/test/SIMD.float32x4.asmjs/testResizeLoadStore-2.baseline b/test/SIMD.float32x4.asmjs/testResizeLoadStore-2.baseline
deleted file mode 100644
index c6f43ae..0000000
--- a/test/SIMD.float32x4.asmjs/testResizeLoadStore-2.baseline
+++ /dev/null
@@ -1,150 +0,0 @@
-Successfully compiled asm.js code

-4194304

-Stores:

-Test1

-Test2

-Test3

-Test4

-Test5

-Test6

-Test7

-Test8

-Test9

-Test10

-Test12

-Test13

-Test14

-Loads

-Test1

-Test2

-Test3

-Test4

-Test5

-Test6

-Test7

-Test8

-Test9

-Test10

-Test11

-Test12

-BoundCheck

-Test1

-Correct

-Test2

-Correct

-Test3

-Correct

-Test4

-Correct

-Test5

-Correct

-Test6

-Correct

-Test7

-Correct

-Test8

-Correct

-Test9

-Correct

-Test10

-Correct

-Test11

-Correct

-Correct

-Correct

-Correct

-Correct

-Correct

-Correct

-Correct

-Test12

-Correct

-Test13

-Correct

-Test14

-Correct

-Test15

-Correct

-Test16

-Correct

-Test17

-Correct

-Test18

-Correct

-Test19

-Correct

-true

->>> ChangeHeap 

-Stores:

-Test1

-Test2

-Test3

-Test4

-Test5

-Test6

-Test7

-Test8

-Test9

-Test10

-Test12

-Test13

-Test14

-Loads

-Test1

-Test2

-Test3

-Test4

-Test5

-Test6

-Test7

-Test8

-Test9

-Test10

-Test11

-Test12

-BoundCheck

-Test1

-Correct

-Test2

-Correct

-Test3

-Correct

-Test4

-Correct

-Test5

-Correct

-Test6

-Correct

-Test7

-Correct

-Test8

-Correct

-Test9

-Correct

-Test10

-Correct

-Test11

-Correct

-Correct

-Correct

-Correct

-Correct

-Correct

-Correct

-Correct

-Test12

-Correct

-Test13

-Correct

-Test14

-Correct

-Test15

-Correct

-Test16

-Correct

-Test17

-Correct

-Test18

-Correct

-Test19

-Correct

diff --git a/test/SIMD.float32x4.asmjs/testResizeLoadStore-2.js b/test/SIMD.float32x4.asmjs/testResizeLoadStore-2.js
deleted file mode 100644
index 580c032..0000000
--- a/test/SIMD.float32x4.asmjs/testResizeLoadStore-2.js
+++ /dev/null
@@ -1,1133 +0,0 @@
-//-------------------------------------------------------------------------------------------------------

-// Copyright (C) Microsoft Corporation and contributors. All rights reserved.

-// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.

-//-------------------------------------------------------------------------------------------------------

-

-this.WScript.LoadScriptFile("..\\UnitTestFramework\\SimdJsHelpers.js");

-function asmModule(stdlib, imports, buffer) {

-    "use asm";

-    

-    var i4 = stdlib.SIMD.Int32x4;

-    var i4check = i4.check;

-    var i4splat = i4.splat;

-    

-    var i4fromFloat32x4 = i4.fromFloat32x4;

-    var i4fromFloat32x4Bits = i4.fromFloat32x4Bits;

-    //var i4abs = i4.abs;

-    var i4neg = i4.neg;

-    var i4add = i4.add;

-    var i4sub = i4.sub;

-    var i4mul = i4.mul;

-    var i4swizzle = i4.swizzle;

-    var i4shuffle = i4.shuffle;

-    var i4lessThan = i4.lessThan;

-    var i4equal = i4.equal;

-    var i4greaterThan = i4.greaterThan;

-    var i4select = i4.select;

-    var i4and = i4.and;

-    var i4or = i4.or;

-    var i4xor = i4.xor;

-    var i4not = i4.not;

-    var i4shiftLeftByScalar = i4.shiftLeftByScalar;

-    var i4shiftRightByScalar = i4.shiftRightByScalar;

-    

-

-    var f4 = stdlib.SIMD.Float32x4;  

-    var f4check = f4.check;

-    var f4splat = f4.splat;

-    var f4fromInt32x4 = f4.fromInt32x4;

-    var f4fromInt32x4Bits = f4.fromInt32x4Bits;

-    var f4abs = f4.abs;

-    var f4neg = f4.neg;

-    var f4add = f4.add;

-    var f4sub = f4.sub;

-    var f4mul = f4.mul;

-    var f4div = f4.div;

-    

-    var f4min = f4.min;

-    var f4max = f4.max;

-    

-    var f4sqrt = f4.sqrt;

-    var f4swizzle = f4.swizzle;

-    var f4shuffle = f4.shuffle;

-    var f4lessThan = f4.lessThan;

-    var f4lessThanOrEqual = f4.lessThanOrEqual;

-    var f4equal = f4.equal;

-    var f4notEqual = f4.notEqual;

-    var f4greaterThan = f4.greaterThan;

-    var f4greaterThanOrEqual = f4.greaterThanOrEqual;

-    

-    var f4load = f4.load;

-    var f4load1 = f4.load1;

-    var f4load2 = f4.load2;

-    var f4load3 = f4.load3;

-

-    var f4store  = f4.store;

-    var f4store1 = f4.store1;

-    var f4store2 = f4.store2;

-    var f4store3 = f4.store3;

-    

-    var f4select = f4.select;

-

-    

-    var fround = stdlib.Math.fround;

-

-    var globImportF4 = f4check(imports.g1);       // global var import

-    var globImportI4 = i4check(imports.g2);       // global var import

-    

-    var g1 = f4(-5033.2,-3401.0,665.34,32234.1);          // global var initialized

-    var g2 = i4(1065353216, -1073741824, -1077936128, 1082130432);          // global var initialized

-    

-    var gval = 1234;

-    var gval2 = 1234.0;

-

-    var loopCOUNT = 3;

-    

-    var Int8Array = stdlib.Int8Array;

-    var Uint8Array = stdlib.Uint8Array;

-    var Int16Array = stdlib.Int16Array;

-    var Uint16Array = stdlib.Uint16Array;

-    var Int32Array = stdlib.Int32Array;

-    var Uint32Array = stdlib.Uint32Array;

-    var Float32Array = stdlib.Float32Array;

-    

-    var Int8Heap = new stdlib.Int8Array (buffer);    

-    var Uint8Heap = new stdlib.Uint8Array (buffer);   

-    var Int16Heap = new stdlib.Int16Array(buffer);

-    var Uint16Heap = new stdlib.Uint16Array(buffer);

-    var Int32Heap = new stdlib.Int32Array(buffer);

-    var Uint32Heap = new stdlib.Uint32Array(buffer);

-    var Float32Heap = new stdlib.Float32Array(buffer);    

-

-    var len=stdlib.byteLength;

-    

-    function ch(newBuffer) 

-    { 

-        if(len(newBuffer) & 0xffffff || len(newBuffer) <= 0xffffff || len(newBuffer) > 0x80000000) 

-            return false; 

-        

-        Int8Heap = new Int8Array(newBuffer);

-        Uint8Heap = new Uint8Array(newBuffer);

-        Int16Heap = new Int16Array(newBuffer);

-        Uint16Heap = new Uint16Array(newBuffer);

-        Int32Heap = new Int32Array(newBuffer);

-        Uint32Heap = new Uint32Array(newBuffer);

-        Float32Heap = new Float32Array(newBuffer);

-        

-        buffer=newBuffer; 

-        return true;

-    }

-    

-    function storeF32(value, idx) 

-    {

-        value= f4check(value);

-        idx = idx|0;

-        idx = idx<<2;

-        f4store(Float32Heap, (idx>>2), value);

-    }

-    function loadF32(idx) 

-    {

-        idx = idx|0;

-        idx = idx<<2;

-        return f4load(Float32Heap, (idx>>2));

-    }

-    

-    function storeUI32(value, idx) 

-    { value= f4check(value); idx = idx|0; idx = idx<<2; 

-    f4store(Uint32Heap, (idx>>2), value);}

-    function loadUI32(idx) 

-    { idx = idx|0; idx = idx<<2; return f4load(Uint32Heap, (idx>>2)); }

-    

-    function storeI32(value, idx) 

-    { value= f4check(value); idx = idx|0; idx = idx<<2; 

-    f4store(Int32Heap, (idx>>2), value);}

-    function loadI32(idx) 

-    { idx = idx|0; idx = idx<<2; return f4load(Int32Heap, (idx>>2)); }

-    

-    function storeI16(value, idx) 

-    { value= f4check(value); idx = idx|0; idx = idx<<1; 

-    f4store(Int16Heap, (idx>>1), value);}

-    function loadI16(idx) 

-    { idx = idx|0; idx = idx<<1; return f4load(Int16Heap, (idx>>1)); }

-

-    function storeUI16(value, idx) 

-    { value= f4check(value); idx = idx|0; idx = idx<<1; 

-    f4store(Uint16Heap, (idx>>1), value);}

-    function loadUI16(idx) 

-    { idx = idx|0; idx = idx<<1; return f4load(Uint16Heap, (idx>>1)); }

-

-    function storeI8(value, idx) 

-    { value= f4check(value); idx = idx|0; idx = idx<<0; 

-    f4store(Int8Heap, (idx>>0), value);}

-    function loadI8(idx) 

-    { idx = idx|0; idx = idx<<0; return f4load(Int8Heap, (idx>>0)); }

-

-    function storeUI8(value, idx) 

-    { value= f4check(value); idx = idx|0; idx = idx<<0; 

-    f4store(Uint8Heap, (idx>>0), value);}

-    function loadUI8(idx) 

-    { idx = idx|0; idx = idx<<0; return f4load(Uint8Heap, (idx>>0)); }

-    

-    

-    function loadStoreIndex1()

-    {

-        f4store(Float32Heap, 0, f4(-1.0,-2.0,3.1,-4.0)); 

-        return f4load(Float32Heap, 0);

-    }

-    

-    

-    function store_1(functionPicker) //Function picker to pick store1/store2/store3/store

-    {

-        functionPicker = functionPicker|0;

-        var v0 = f4(0.0,0.0,0.0,0.0);

-        var loopIndex = 0, idx = 0, end = 256;		

-        while((loopIndex|0) < (loopCOUNT|0)) 

-        {

-            idx = 0;

-            v0 = f4(5.1,-12.3,-0.0,0.0);

-            for(idx = idx << 2; (idx|0) < (end|0 << 2); idx = (idx + 16)|0)

-            {

-                switch(functionPicker|0)

-                {

-                    case 5:

-                        f4store(Float32Heap, idx>>2, v0); 

-                        break;

-                    case 6:

-                        f4store1(Float32Heap, idx>>2, v0);

-                        break;

-                    case 7:

-                        f4store2(Float32Heap, idx>>2, v0);

-                        break;

-                    case 8:

-                        f4store3(Float32Heap, idx>>2, v0);

-                        break;

-                    default:

-                        break;

-                }

-                v0 = f4add(v0, f4(1.0,1.0,1.0,1.0));

-            }

-            loopIndex = (loopIndex + 1)|0;

-        }

-        //Expects the heap to be: 0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3...15,15,15,15,0,0,0,0...

-        return f4load(Float32Heap, 0);

-        //Alternate validation

-        // for(idx = 0; idx << 2 < end << 2; idx = (idx + 4 << 2)|0)

-        // {

-            // verify buffer view is as expected. 

-            // 0,0,0,0,1,1,1,1,2,2,2,2... 

-        // }

-    }		

-    function store_2(functionPicker)

-    {

-        functionPicker = functionPicker|0;

-        var v0 = f4(0.0,0.0,0.0,0.0);

-        var loopIndex = 0, idx = 0, end = 256;		

-        for (loopIndex = 0; (loopIndex | 0) < (loopCOUNT | 0) ; loopIndex = (loopIndex + 1) | 0)

-        {

-            idx = 0;

-            v0 = f4(0.0,0.0,0.0,0.0);

-            for(idx = idx << 2; (idx|0) < (end|0 << 2); idx = (idx + 16)|0)

-            {

-                switch(functionPicker|0)

-                {

-                    case 5:

-                        f4store(Float32Heap, idx>>2, v0); 

-                        break;

-                    case 6:

-                        f4store1(Float32Heap, idx>>2, v0);

-                        break;

-                    case 7:

-                        f4store2(Float32Heap, idx>>2, v0);

-                        break;

-                    case 8:

-                        f4store3(Float32Heap, idx>>2, v0);

-                        break;

-                    default:

-                        break;

-                }

-                v0 = f4add(v0, f4(1.0,1.0,1.0,1.0));

-            }

-        }

-        return f4load(Float32Heap, 8);

-    } 

-    function store_3(functionPicker)

-    {

-        functionPicker = functionPicker|0;

-        var v0 = f4(0.0,0.0,0.0,0.0);

-        var loopIndex = 0, idx = 0, end = 256;	

-

-        loopIndex = loopCOUNT | 0;

-        do {

-            idx = 0;

-            v0 = f4(0.0,0.0,0.0,0.0);

-            for(idx = idx << 2; (idx|0) < (end|0 << 2); idx = (idx + 16)|0)

-            {

-                switch(functionPicker|0)

-                {

-                    case 5:

-                        f4store(Float32Heap, idx>>2, v0); 

-                        break;

-                    case 6:

-                        f4store1(Float32Heap, idx>>2, v0);

-                        break;

-                    case 7:

-                        f4store2(Float32Heap, idx>>2, v0);

-                        break;

-                    case 8:

-                        f4store3(Float32Heap, idx>>2, v0);

-                        break;

-                    default:

-                        break;

-                }

-                v0 = f4add(v0, f4(1.0,1.0,1.0,1.0));

-            }

-            loopIndex = (loopIndex - 1) | 0;

-        }

-        while ( (loopIndex | 0) > 0);

-        return f4load(Float32Heap, 8);

-    } 

-    function store_1_Int8(length) 

-    {

-        length = length|0;

-        var v0 = f4(0.0,0.0,0.0,0.0);

-        var loopIndex = 0, idx = 0, end = 0;

-        end = (length * 4)|0; 

-        while((loopIndex|0) < (loopCOUNT|0)) 

-        {

-            idx = (end - 4096) | 0;

-            v0 = f4(0.0,0.0,0.0,0.0);

-            for(idx = idx << 0; (idx|0) < (end|0 << 0); idx = (idx + 16)|0)

-            {

-                f4store(Int8Heap, idx>>0, v0); 

-                v0 = f4add(v0, f4(1.0,1.0,1.0,1.0));

-            }

-            loopIndex = (loopIndex + 1)|0;

-        }

-        //Expects the heap to be: 0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3...15,15,15,15,0,0,0,0...

-        return f4load(Float32Heap, 2);

-    }

-    function store_1_Uint8(length) 

-    {

-        length = length|0;

-        var v0 = f4(0.0,0.0,0.0,0.0);

-        var loopIndex = 0, idx = 0, end = 0;

-        end = (length * 4)|0; 

-        while((loopIndex|0) < (loopCOUNT|0)) 

-        {

-            idx = (end - 4096) | 0;

-            v0 = f4(0.0,0.0,0.0,0.0);

-            for(idx = idx << 0; (idx|0) < (end|0 << 0); idx = (idx + 16)|0)

-            {

-                f4store(Uint8Heap, idx>>0, v0); 

-                v0 = f4add(v0, f4(1.0,1.0,1.0,1.0));

-            }

-            loopIndex = (loopIndex + 1)|0;

-        }

-        //Expects the heap to be: 0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3...15,15,15,15,0,0,0,0...

-        return f4load(Float32Heap, 2);

-    }

-    function store_1_Int16(length) 

-    {

-        length = length|0;

-        var v0 = f4(0.0,0.0,0.0,0.0);

-        var loopIndex = 0, idx = 0, end = 0;

-        end = (length * 4)|0; 

-        while((loopIndex|0) < (loopCOUNT|0)) 

-        {

-            idx = (end - 4096) | 0;

-            v0 = f4(0.0,0.0,0.0,0.0);

-            for(idx = idx << 1; (idx|0) < (end|0 << 1); idx = (idx + 16)|0)

-            {

-                f4store(Int16Heap, idx>>1, v0); 

-                v0 = f4add(v0, f4(1.0,1.0,1.0,1.0));

-            }

-            loopIndex = (loopIndex + 1)|0;

-        }

-        //Expects the heap to be: 0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3...15,15,15,15,0,0,0,0...

-        return f4load(Float32Heap, 2);

-    }	

-    function store_1_Uint16(length) 

-    {

-        length = length|0;

-        var v0 = f4(0.0,0.0,0.0,0.0);

-        var loopIndex = 0, idx = 0, end = 0;

-        end = (length * 4)|0; 

-        while((loopIndex|0) < (loopCOUNT|0)) 

-        {

-            idx = (end - 4096) | 0;

-            v0 = f4(0.0,0.0,0.0,0.0);

-            for(idx = idx << 1; (idx|0) < (end|0 << 1); idx = (idx + 16)|0)

-            {

-                f4store(Uint16Heap, idx>>1, v0); 

-                v0 = f4add(v0, f4(1.0,1.0,1.0,1.0));

-            }

-            loopIndex = (loopIndex + 1)|0;

-        }

-        //Expects the heap to be: 0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3...15,15,15,15,0,0,0,0...

-        return f4load(Float32Heap, 2);

-    }	

-    function store_1_Int32(length) 

-    {

-        length = length|0;

-        var v0 = f4(0.0,0.0,0.0,0.0);

-        var loopIndex = 0, idx = 0, end = 0;

-        end = (length * 4)|0; 

-        while((loopIndex|0) < (loopCOUNT|0)) 

-        {

-            idx = (end - 4096) | 0;

-            v0 = f4(0.0,0.0,0.0,0.0);

-            for(idx = idx << 2; (idx|0) < (end|0 << 2); idx = (idx + 16)|0)

-            {

-                f4store(Int32Heap, idx>>2, v0); 

-                v0 = f4add(v0, f4(1.0,1.0,1.0,1.0));

-            }

-            loopIndex = (loopIndex + 1)|0;

-        }

-        //Expects the heap to be: 0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3...15,15,15,15,0,0,0,0...

-        return f4load(Float32Heap, 2);

-    }	

-    function store_1_Uint32(length) 

-    {

-        length = length|0;

-        var v0 = f4(0.0,0.0,0.0,0.0);

-        var loopIndex = 0, idx = 0, end = 0;

-        end = (length * 4)|0; 

-        while((loopIndex|0) < (loopCOUNT|0)) 

-        {

-            idx = (end - 4096) | 0;

-            v0 = f4(0.0,0.0,0.0,0.0);

-            for(idx = idx << 2; (idx|0) < (end|0 << 2); idx = (idx + 16)|0)

-            {

-                f4store(Uint32Heap, idx>>2, v0); 

-                v0 = f4add(v0, f4(1.0,1.0,1.0,1.0));

-            }

-            loopIndex = (loopIndex + 1)|0;

-        }

-        //Expects the heap to be: 0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3...15,15,15,15,0,0,0,0...

-        return f4load(Float32Heap, 2);

-    }

-    

-    ////////////////////////////Load////////////////////////////

-    function load_1(functionPicker)

-    {

-        //length = length|0;

-        functionPicker = functionPicker|0;

-        

-        var idx=0,end=16;//(length-4)|0;;

-        var loopIndex = 0;

-        var v = f4(0.0,0.0,0.0,0.0);

-

-        while ( (loopIndex|0) < (loopCOUNT|0)) {

-            

-            idx=0;

-            

-            for(idx = idx<<2; (idx|0) <= (end<<2); idx = (idx + 1)|0)

-            {		

-                switch(functionPicker|0)

-                {

-                    case 1:

-                        v = f4load(Float32Heap, idx>>2); 

-                        break;

-                     case 2:

-                        v = f4load1(Float32Heap, idx>>2);

-                        break;

-                    case 3:

-                        v = f4load2(Float32Heap, idx>>2);

-                        break;

-                    case 4:

-                        v = f4load3(Float32Heap, idx>>2);

-                        break;

-                    default:

-                        break;

-                }

-            }

-            loopIndex = (loopIndex + 1) | 0;

-        }

-        return v;

-    }

-     

-    function load_2(functionPicker)

-    {

-        //length = length|0;

-        functionPicker = functionPicker|0;

-        

-        var idx=0,end=16;//(length-4)|0;;

-        var loopIndex = 0;

-        var v = f4(0.0,0.0,0.0,0.0);

-        

-        for (loopIndex = 0; (loopIndex | 0) < (loopCOUNT | 0) ; loopIndex = (loopIndex + 1) | 0)

-        {

-             idx=0;

-            

-            for(idx = idx<<2; (idx|0) <= (end<<2); idx = (idx + 1)|0)

-            {		

-                switch(functionPicker|0)

-                {

-                    case 1:

-                        v = f4load(Float32Heap, idx>>2); 

-                        break;

-                     case 2:

-                        v = f4load1(Float32Heap, idx>>2);

-                        break;

-                    case 3:

-                        v = f4load2(Float32Heap, idx>>2);

-                        break;

-                    case 4:

-                        v = f4load3(Float32Heap, idx>>2);

-                        break;

-                    default:

-                        break;

-                }

-            }

-        }

-        return v;

-    }

-

-    function load_3(functionPicker)

-    {

-        //length = length|0;

-        functionPicker = functionPicker|0;

-        

-        var idx=0,end=16;//(length-4)|0;;

-        var loopIndex = 0;

-        var v = f4(0.0,0.0,0.0,0.0);

-

-        loopIndex = loopCOUNT | 0;

-        do {

-            idx = 0;

-            for(idx = idx<<2; (idx|0) <= (end<<2); idx = (idx + 1)|0)

-            {		

-                switch(functionPicker|0)

-                {

-                    case 1:

-                        v = f4load(Float32Heap, idx>>2); 

-                        break;

-                     case 2:

-                        v = f4load1(Float32Heap, idx>>2);

-                        break;

-                    case 3:

-                        v = f4load2(Float32Heap, idx>>2);

-                        break;

-                    case 4:

-                        v = f4load3(Float32Heap, idx>>2);

-                        break;

-                    default:

-                        break;

-                }

-            }

-            loopIndex = (loopIndex - 1) | 0;

-        }

-        while ( (loopIndex | 0) > 0);

-        return v;

-    } 

-    function load_1_Int8(length)

-    {

-        length = length|0;

-        var idx=0,end=0;

-        var loopIndex = 0;

-        var v = f4(0.0,0.0,0.0,0.0);

-        end = (((length * 4)|0) - 16)|0; 

-        while ( (loopIndex|0) < (loopCOUNT|0)) {

-            idx= (end - 4096) | 0;

-            for(idx = idx<<0; (idx|0) <= (end<<0); idx = (idx + 1)|0)

-            {		

-                v = f4load(Int8Heap, idx>>0); 

-            }

-            loopIndex = (loopIndex + 1) | 0;

-        }

-        return v;

-    }

-    function load_1_Uint8(length)

-    {

-        length = length|0;

-        var idx=0,end=0;

-        var loopIndex = 0;

-        var v = f4(0.0,0.0,0.0,0.0);

-        end = (((length * 4)|0) - 16)|0; 

-        while ( (loopIndex|0) < (loopCOUNT|0)) {

-            idx= (((length * 4)|0) - 4096) | 0;

-            for(idx = idx<<0; (idx|0) <= (end<<0); idx = (idx + 1)|0)

-            {		

-                v = f4load(Uint8Heap, idx>>0); 

-            }

-            loopIndex = (loopIndex + 1) | 0;

-        }

-        return v;

-    }

-    function load_1_Int16(length)

-    {

-        length = length|0;

-        var idx=0,end=0;

-        var loopIndex = 0;

-        var v = f4(0.0,0.0,0.0,0.0);

-        end = (((length * 2)|0) - 8)|0; 

-        while ( (loopIndex|0) < (loopCOUNT|0)) {

-            idx= (end - 4096) | 0;

-            for(idx = idx<<1; (idx|0) <= (end<<1); idx = (idx + 1)|0)

-            {		

-                v = f4load(Int16Heap, idx>>1); 

-            }

-            loopIndex = (loopIndex + 1) | 0;

-        }

-        return v;

-    }

-    function load_1_Uint16(length)

-    {

-        length = length|0;

-        var idx=0,end=120;

-        var loopIndex = 0;

-        var v = f4(0.0,0.0,0.0,0.0);

-        end = (((length * 2)|0) - 8)|0; 

-        while ( (loopIndex|0) < (loopCOUNT|0)) {

-            idx= (end - 4096) | 0;

-            for(idx = idx<<1; (idx|0) <= (end<<1); idx = (idx + 1)|0)

-            {		

-                v = f4load(Uint16Heap, idx>>1); 

-            }

-            loopIndex = (loopIndex + 1) | 0;

-        }

-        return v;

-    }

-    function load_1_Int32(length)

-    {

-        length = length|0;

-        var idx=0,end=60;

-        var loopIndex = 0;

-        var v = f4(0.0,0.0,0.0,0.0);

-        end = (((length * 1)|0) - 4)|0; 

-        while ( (loopIndex|0) < (loopCOUNT|0)) {

-            idx= (end - 4096) | 0;

-            for(idx = idx<<2; (idx|0) <= (end<<2); idx = (idx + 1)|0)

-            {		

-                v = f4load(Int32Heap, idx>>2); 

-            }

-            loopIndex = (loopIndex + 1) | 0;

-        }

-        return v;

-    }

-    function load_1_Uint32(length)

-    {

-        length = length|0;

-        var idx=0,end=60;

-        var loopIndex = 0;

-        var v = f4(0.0,0.0,0.0,0.0);

-        end = (((length * 1)|0) - 4)|0; 

-        while ( (loopIndex|0) < (loopCOUNT|0)) {

-            idx= (end - 4096) | 0;

-            for(idx = idx<<2; (idx|0) <= (end<<2); idx = (idx + 1)|0)

-            {		

-                v = f4load(Uint32Heap, idx>>2); 

-            }

-            loopIndex = (loopIndex + 1) | 0;

-        }

-        return v;

-    }	

-    

-    return {

-            changeHeap:ch

-           ,store1:store_1

-           ,store2:store_2

-           ,store3:store_3

-           ,store1Int8:store_1_Int8

-           ,store1Uint8:store_1_Uint8

-           ,store1Int16:store_1_Int16

-           ,store1Uint16:store_1_Uint16

-           ,store1Int32:store_1_Int32

-           ,store1Uint32:store_1_Uint32

-           ,load1:load_1

-           ,load2:load_2

-           ,load3:load_3

-           ,load1Int8:load_1_Int8

-           ,load1Uint8:load_1_Uint8

-           ,load1Int16:load_1_Int16

-           ,load1Uint16:load_1_Uint16

-           ,load1Int32:load_1_Int32

-           ,load1Uint32:load_1_Uint32

-           ,loadF32:loadF32

-           ,storeF32:storeF32

-           ,storeUI32:storeUI32

-           ,loadUI32:loadUI32

-           ,storeI32:storeI32

-           ,loadI32:loadI32		   

-           ,storeI16:storeI16

-           ,loadI16:loadI16

-           ,storeUI16:storeUI16

-           ,loadUI16:loadUI16

-           ,storeI8:storeI8

-           ,loadI8:loadI8	

-           ,storeUI8:storeUI8

-           ,loadUI8:loadUI8		   

-           ,loadStoreIndex1:loadStoreIndex1};

-}

-

-var buffer = new ArrayBuffer(0x1000000); //16mb min 2^12

-

-//Reset or flush the buffer

-function initF32(buffer) {

-    var values = new Float32Array( buffer );

-    for( var i=0; i < values.length ; ++i ) {

-        values[i] = i * 10;

-    }

-    return values.length;

-}

-function printBuffer(buffer, count)

-{

-    var f4;

-    for (var i = 0; i < count/* * 16*/; i += 16)

-    {

-        f4 = SIMD.Float32x4.load(buffer, i);

-        print(f4.toString());

-    }

-}

-

-function printResults(res)

-{

-    print(typeof(res));

-    print(res.toString());

-}

-

-inputLength = initF32(buffer);

-print(inputLength);

-//Enumerating SIMD loads to test. 

-SIMDLoad = 1;

-SIMDLoad1 = 2;

-SIMDLoad2 = 3;

-SIMDLoad3 = 4;

-

-SIMDStore = 5;

-SIMDStore1 = 6;

-SIMDStore2 = 7;

-SIMDStore3 = 8;

-

-//Module initialization

-this['byteLength'] =

-  Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, 'byteLength').get);

-var m = asmModule(this, {g0:initF32(buffer),g1:SIMD.Float32x4(9,9,9,9), g2:SIMD.Int32x4(1, 2, 3, 4)}, buffer);

-var values = new Float32Array(buffer);

-

-

-

-print("Stores:");

-

-print("Test1");

-inputLength = initF32(buffer); 

-var ret = m.store1(SIMDStore1);//Lane1 store

-equalSimd([5.099999904632568, 10, 20, 30], ret, SIMD.Float32x4, "ResizeLoadStore");

-

-print("Test2");;

-inputLength = initF32(buffer); 

-var ret = m.store1(SIMDStore2);//Lane 1,2 store

-equalSimd([5.099999904632568, -12.300000190734863, 20, 30], ret, SIMD.Float32x4, "ResizeLoadStore");

-

-print("Test3");

-inputLength = initF32(buffer); 

-var ret = m.store1(SIMDStore3);//Lane 1,2,3 store

-equalSimd([5.099999904632568, -12.300000190734863, 0, 30], ret, SIMD.Float32x4, "ResizeLoadStore");

-

-print("Test4");

-inputLength = initF32(buffer); 

-var ret = m.store1(SIMDStore);//Generic Store

-equalSimd([5.099999904632568, -12.300000190734863, 0, 0], ret, SIMD.Float32x4, "ResizeLoadStore");

-

-print("Test5");

-inputLength = initF32(buffer);  

-var ret = m.store2(SIMDStore);//Generic store 

-equalSimd([2, 2, 2, 2], ret, SIMD.Float32x4, "ResizeLoadStore");

-

-print("Test6");

-inputLength = initF32(buffer); 

-var ret = m.store3(SIMDStore);//Generic store

-equalSimd([2,2,2,2], ret, SIMD.Float32x4, "ResizeLoadStore");

-

-

-print("Test7");

-inputLength = initF32(buffer); 

-var ret = m.store1Int8(inputLength);//Int8Heap store

-equalSimd([20, 30, 40, 50], ret, SIMD.Float32x4, "ResizeLoadStore");

-

-

-print("Test8");

-inputLength = initF32(buffer); 

-var ret = m.store1Uint8(inputLength);//Uint8Heap store

-equalSimd([20, 30, 40, 50], ret, SIMD.Float32x4, "ResizeLoadStore");

-

-

-print("Test9");

-inputLength = initF32(buffer); 

-var ret = m.store1Int16(inputLength);//Int16Heap store

-equalSimd([20, 30, 40, 50], ret, SIMD.Float32x4, "ResizeLoadStore");

-

-

-print("Test10");

-inputLength = initF32(buffer); 

-var ret = m.store1Uint16(inputLength);//Uint16Heap store

-equalSimd([20, 30, 40, 50], ret, SIMD.Float32x4, "ResizeLoadStore");

-

-

-print("Test12");

-inputLength = initF32(buffer); 

-var ret = m.store1Int32(inputLength);//Int32Heap store

-equalSimd([20, 30, 40, 50], ret, SIMD.Float32x4, "ResizeLoadStore");

-

-

-print("Test13");

-inputLength = initF32(buffer); 

-var ret = m.store1Uint32(inputLength);//Uint32Heap store

-equalSimd([20, 30, 40, 50], ret, SIMD.Float32x4, "ResizeLoadStore");

-

-

-print("Test14");

-inputLength = initF32(buffer); 

-var ret = m.loadStoreIndex1();//Uint32Heap store

-equalSimd([-1, -2, 3.0999999046325683, -4], ret, SIMD.Float32x4, "ResizeLoadStore");

-

-

-

-print("Loads");

-print("Test1");

-var ret = m.load1(SIMDLoad1);

-equalSimd([160, 0, 0, 0], ret, SIMD.Float32x4, "Resize Loads");

-

-print("Test2");

-var ret = m.load1(SIMDLoad2);

-equalSimd([160, 170, 0, 0], ret, SIMD.Float32x4, "Resize Loads");

-

-print("Test3");

-var ret = m.load1(SIMDLoad3);

-equalSimd([160, 170, 180, 0], ret, SIMD.Float32x4, "Resize Loads");

-

-

-print("Test4");

-var ret = m.load1(SIMDLoad);

-equalSimd([160, 170, 180, 190	], ret, SIMD.Float32x4, "Resize Loads");

-

-

-print("Test5");

-var ret = m.load2(SIMDLoad);

-equalSimd([160, 170, 180, 190], ret, SIMD.Float32x4, "Resize Loads");

-

-

-print("Test6");

-var ret = m.load3(SIMDLoad);

-equalSimd([160, 170, 180, 190], ret, SIMD.Float32x4, "Resize Loads");

-

-

-print("Test7");

-var ret = m.load1Int8(inputLength); //Int8Heap load

-equalSimd([41943000, 41943008, 41943020, 41943032], ret, SIMD.Float32x4, "Resize Loads");

-

-

-print("Test8");

-var ret = m.load1Uint8(inputLength); //Int8Heap load

-equalSimd([41943000, 41943008, 41943020, 41943032], ret, SIMD.Float32x4, "Resize Loads");

-

-

-print("Test9");

-var ret = m.load1Int16(inputLength); //Int16Heap load

-equalSimd([41943000, 41943008, 41943020, 41943032], ret, SIMD.Float32x4, "Resize Loads");

-

-

-print("Test10");

-var ret = m.load1Uint16(inputLength); //Int16Heap load

-equalSimd([41943000, 41943008, 41943020, 41943032], ret, SIMD.Float32x4, "Resize Loads");

-

-

-print("Test11");

-var ret = m.load1Int32(inputLength); //Int32Heap load

-equalSimd([41943000, 41943008, 41943020, 41943032], ret, SIMD.Float32x4, "Resize Loads");

-

-

-print("Test12");

-var ret = m.load1Uint32(inputLength); //Int32Heap load

-equalSimd([41943000, 41943008, 41943020, 41943032], ret, SIMD.Float32x4, "Resize Loads");

-

-

-print("BoundCheck");

-var value = SIMD.Float32x4(9.9,1.2,3.4,5.6);

-

-print("Test1");

-try {m.storeF32(value, inputLength); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test2");

-try {m.loadF32(inputLength); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test3");

-try {m.storeF32(value, inputLength-1); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test4");

-try {m.loadF32(inputLength-1); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test5");

-try {m.storeF32(value, inputLength-4);print("Correct");} catch(err) {print("Wrong");}

-

-print("Test6");

-try {var v = m.loadF32(inputLength-4);print("Correct");} catch(err) {print("Wrong");}

-

-print("Test7");

-try {m.storeUI32(value, inputLength+1);print("Wrong");} catch(err) {print("Correct");}

-

-print("Test8");

-try { m.loadUI32(inputLength+1); print("Wrong"); } catch(err) { print("Correct"); }

-

-print("Test9");

-try {m.storeI32(value, inputLength+1); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test10");

-try {m.loadI32(inputLength+1);print("Wrong");} catch(err) {print("Correct");}

-

-print("Test11");

-try{

-    m.storeI16(value, inputLength*2-8);

-    print("Correct");

-    m.storeUI16(value, inputLength*2-8);

-    print("Correct");

-    m.storeI8(value, inputLength*4-16);

-    print("Correct");

-    m.storeUI8(value, inputLength*4-16);

-    print("Correct");

-    m.loadI16(inputLength*2-8);

-    print("Correct");

-    m.loadUI16(inputLength*2-8);

-    print("Correct");

-    m.loadI8(inputLength*4-16);

-    print("Correct");

-    m.loadUI8(inputLength*4-16);

-    print("Correct");

-} catch(err){ print("Wrong"); }

-

-print("Test12");

-try {m.storeUI16(value, inputLength*2);print("Wrong");} catch(err) {print("Correct");}

-

-print("Test13");

-try {m.loadUI16(inputLength*2-7); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test14");

-try {m.storeI16(value, inputLength*2-7); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test15");

-try {m.loadI16(inputLength*2-7); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test16");

-try {m.storeUI8(value, inputLength*4-15); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test17");

-try {m.loadUI8(inputLength*4-15); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test18");

-try {m.storeI8(value, inputLength*4-15); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test19");

-try {m.loadI8(inputLength*4+15); print("Wrong");} catch(err) {print("Correct");}

-

-// change buffer

-var buffer = new ArrayBuffer(0x2000000);

-print(m.changeHeap(buffer));

-

-print(">>> ChangeHeap ");

-

-print("Stores:");

-

-print("Test1");

-inputLength = initF32(buffer); 

-var ret = m.store1(SIMDStore1);//Lane1 store

-equalSimd([5.099999904632568, 10, 20, 30], ret, SIMD.Float32x4, "Resize Stores");

-

-

-print("Test2");;

-inputLength = initF32(buffer); 

-var ret = m.store1(SIMDStore2);//Lane 1,2 store

-equalSimd([5.099999904632568, -12.300000190734863, 20, 30], ret, SIMD.Float32x4, "Resize Stores");

-

-

-print("Test3");

-inputLength = initF32(buffer); 

-var ret = m.store1(SIMDStore3);//Lane 1,2,3 store

-equalSimd([5.099999904632568, -12.300000190734863, 0, 30], ret, SIMD.Float32x4, "Resize Stores");

-

-

-print("Test4");

-inputLength = initF32(buffer); 

-//Should change the buffer to  0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3...15,15,15,15,0,0,0,0...

-var ret = m.store1(SIMDStore);//Generic Store

-equalSimd([5.099999904632568, -12.300000190734863, 0, 0], ret, SIMD.Float32x4, "Resize Stores");

-

-

-print("Test5");

-inputLength = initF32(buffer);  

-var ret = m.store2(SIMDStore);//Generic store 

-equalSimd([2, 2, 2, 2], ret, SIMD.Float32x4, "Resize Stores");

-

-

-print("Test6");

-inputLength = initF32(buffer); 

-var ret = m.store3(SIMDStore);//Generic store

-equalSimd([2, 2, 2, 2], ret, SIMD.Float32x4, "Resize Stores");

-

-

-print("Test7");

-inputLength = initF32(buffer); 

-var ret = m.store1Int8(inputLength);//Int8Heap store

-equalSimd([20, 30, 40, 50], ret, SIMD.Float32x4, "Resize Stores");

-

-

-print("Test8");

-inputLength = initF32(buffer); 

-var ret = m.store1Uint8(inputLength);//Uint8Heap store

-equalSimd([20, 30, 40, 50], ret, SIMD.Float32x4, "Resize Stores");

-

-

-print("Test9");

-inputLength = initF32(buffer); 

-var ret = m.store1Int16(inputLength);//Int16Heap store

-equalSimd([20, 30, 40, 50], ret, SIMD.Float32x4, "Resize Stores");

-

-

-print("Test10");

-inputLength = initF32(buffer); 

-var ret = m.store1Uint16(inputLength);//Uint16Heap store

-equalSimd([20, 30, 40, 50], ret, SIMD.Float32x4, "Resize Stores");

-

-

-print("Test12");

-inputLength = initF32(buffer); 

-var ret = m.store1Int32(inputLength);//Int32Heap store

-equalSimd([20, 30, 40, 50], ret, SIMD.Float32x4, "Resize Stores");

-

-

-print("Test13");

-inputLength = initF32(buffer); 

-var ret = m.store1Uint32(inputLength);//Uint32Heap store

-equalSimd([20, 30, 40, 50], ret, SIMD.Float32x4, "Resize Stores");

-

-

-print("Test14");

-inputLength = initF32(buffer); 

-var ret = m.loadStoreIndex1();//Uint32Heap store

-equalSimd([-1, -2, 3.0999999046325683, -4], ret, SIMD.Float32x4, "Resize Stores");

-

-

-

-print("Loads");

-print("Test1");

-var ret = m.load1(SIMDLoad1);

-equalSimd([160, 0, 0, 0], ret, SIMD.Float32x4, "Resize Loads");

-

-print("Test2");

-var ret = m.load1(SIMDLoad2);

-equalSimd([160, 170, 0, 0], ret, SIMD.Float32x4, "Resize Loads");

-

-print("Test3");

-var ret = m.load1(SIMDLoad3);

-equalSimd([160, 170, 180, 0], ret, SIMD.Float32x4, "Resize Loads");

-

-print("Test4");

-var ret = m.load1(SIMDLoad);

-equalSimd([160, 170, 180, 190], ret, SIMD.Float32x4, "Resize Loads");

-

-print("Test5");

-var ret = m.load2(SIMDLoad);

-equalSimd([160, 170, 180, 190], ret, SIMD.Float32x4, "Resize Loads");

-

-print("Test6");

-var ret = m.load3(SIMDLoad);

-equalSimd([160, 170, 180, 190], ret, SIMD.Float32x4, "Resize Loads");

-

-print("Test7");

-var ret = m.load1Int8(inputLength); //Int8Heap load

-equalSimd([83886040, 83886048, 83886064, 83886072], ret, SIMD.Float32x4, "Resize Loads");

-

-print("Test8");

-var ret = m.load1Uint8(inputLength); //Int8Heap load

-equalSimd([83886040, 83886048, 83886064, 83886072], ret, SIMD.Float32x4, "Resize Loads");

-

-print("Test9");

-var ret = m.load1Int16(inputLength); //Int16Heap load

-equalSimd([83886040, 83886048, 83886064, 83886072], ret, SIMD.Float32x4, "Resize Loads");

-

-print("Test10");

-var ret = m.load1Uint16(inputLength); //Int16Heap load

-equalSimd([83886040, 83886048, 83886064, 83886072], ret, SIMD.Float32x4, "Resize Loads");

-

-print("Test11");

-var ret = m.load1Int32(inputLength); //Int32Heap load

-equalSimd([83886040, 83886048, 83886064, 83886072], ret, SIMD.Float32x4, "Resize Loads");

-

-print("Test12");

-var ret = m.load1Uint32(inputLength); //Int32Heap load

-equalSimd([83886040, 83886048, 83886064, 83886072], ret, SIMD.Float32x4, "Resize Loads");

-print("BoundCheck");

-var value = SIMD.Float32x4(9.9,1.2,3.4,5.6);

-

-print("Test1");

-try {m.storeF32(value, inputLength); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test2");

-try {m.loadF32(inputLength); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test3");

-try {m.storeF32(value, inputLength-1); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test4");

-try {m.loadF32(inputLength-1); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test5");

-try {m.storeF32(value, inputLength-4);print("Correct");} catch(err) {print("Wrong");}

-

-print("Test6");

-try {var v = m.loadF32(inputLength-4);print("Correct");} catch(err) {print("Wrong");}

-

-print("Test7");

-try {m.storeUI32(value, inputLength+1);print("Wrong");} catch(err) {print("Correct");}

-

-print("Test8");

-try { m.loadUI32(inputLength+1); print("Wrong"); } catch(err) { print("Correct"); }

-

-print("Test9");

-try {m.storeI32(value, inputLength+1); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test10");

-try {m.loadI32(inputLength+1);print("Wrong");} catch(err) {print("Correct");}

-

-print("Test11");

-try{

-    m.storeI16(value, inputLength*2-8);

-    print("Correct");

-    m.storeUI16(value, inputLength*2-8);

-    print("Correct");

-    m.storeI8(value, inputLength*4-16);

-    print("Correct");

-    m.storeUI8(value, inputLength*4-16);

-    print("Correct");

-    m.loadI16(inputLength*2-8);

-    print("Correct");

-    m.loadUI16(inputLength*2-8);

-    print("Correct");

-    m.loadI8(inputLength*4-16);

-    print("Correct");

-    m.loadUI8(inputLength*4-16);

-    print("Correct");

-} catch(err){ print("Wrong"); }

-

-print("Test12");

-try {m.storeUI16(value, inputLength*2);print("Wrong");} catch(err) {print("Correct");}

-

-print("Test13");

-try {m.loadUI16(inputLength*2-7); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test14");

-try {m.storeI16(value, inputLength*2-7); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test15");

-try {m.loadI16(inputLength*2-7); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test16");

-try {m.storeUI8(value, inputLength*4-15); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test17");

-try {m.loadUI8(inputLength*4-15); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test18");

-try {m.storeI8(value, inputLength*4-15); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test19");

-try {m.loadI8(inputLength*4+15); print("Wrong");} catch(err) {print("Correct");}
\ No newline at end of file
diff --git a/test/SIMD.float32x4.asmjs/testResizeLoadStore.js b/test/SIMD.float32x4.asmjs/testResizeLoadStore.js
deleted file mode 100644
index 8dbaabf..0000000
--- a/test/SIMD.float32x4.asmjs/testResizeLoadStore.js
+++ /dev/null
@@ -1,56 +0,0 @@
-//-------------------------------------------------------------------------------------------------------

-// Copyright (C) Microsoft Corporation and contributors. All rights reserved.

-// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.

-//-------------------------------------------------------------------------------------------------------

-

-this.WScript.LoadScriptFile("..\\UnitTestFramework\\SimdJsHelpers.js");

-var m = function(stdlib,imports,buffer){

-    "use asm";

-    //var F32=stdlib.Int32Array; 

-    var F32=stdlib.Float32Array; 

-    var f32=new F32(buffer);

-    var len=stdlib.byteLength;

-    var f4 = stdlib.SIMD.Float32x4;

-    var f4load = f4.load;

-    var f4store = f4.store;

-    var f4check = f4.check; 

-    function ch(newBuffer) 

-    { 

-        if(len(newBuffer) & 0xffffff || len(newBuffer) <= 0xffffff || len(newBuffer) > 0x80000000) 

-            return false; 

-        f32=new F32(newBuffer);

-        buffer=newBuffer; 

-        return true 

-    }

-    function store(value, loc) { value=f4check(value); loc = loc|0; loc = loc<<2; f4store(f32, loc>>2, value);  }

-    function load(loc) {loc = loc|0; loc = loc<<2; return f4load(f32, loc>>2);  }

-    

-    return { load:load

-            ,store:store

-            ,changeHeap:ch}

-    };

-var buf1 = new ArrayBuffer(0x1000000);

-var f32 = new Float32Array(buf1);

-

-this['byteLength'] =

-  Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, 'byteLength').get);

-var o = m(this,{},buf1);

-

-o.store(SIMD.Float32x4(5.1,6.1,-0.0,0.0),4);

-

-var ret = o.load(4);

-equalSimd([5.099999904632568, 6.099999904632568, 0, 0], ret, SIMD.Float32x4, "TestResizeLoadStore");

-

-o.store(SIMD.Float32x4(5.1,6.1,7.1,8.1), f32.length-4);

-var ret = o.load(f32.length-4);

-equalSimd([5.099999904632568, 6.099999904632568, 7.099999904632568, 8.100000381469726], ret, SIMD.Float32x4, "TestResizeLoadStore");

-try {o.store(SIMD.Float32x4(5.1,6.1,7.1,8.1), f32.length);print("Wrong");} catch(err) { }

-

-var buf2 = new ArrayBuffer(0x2000000);

-o.changeHeap(buf2);

-

-o.store(SIMD.Float32x4(5.1,6.1,7.1,8.1), f32.length);

-var ret = o.load(f32.length);

-equalSimd([5.099999904632568, 6.099999904632568, 7.099999904632568, 8.100000381469726], ret, SIMD.Float32x4, "TestResizeLoadStore");

-o.store(SIMD.Float32x4(5.1,6.1,7.1,8.1), f32.length * 2 - 4);

-print("PASS");
\ No newline at end of file
diff --git a/test/SIMD.int16x8.asmjs/rlexe.xml b/test/SIMD.int16x8.asmjs/rlexe.xml
index a31a96a..aef6c17 100644
--- a/test/SIMD.int16x8.asmjs/rlexe.xml
+++ b/test/SIMD.int16x8.asmjs/rlexe.xml
@@ -4,7 +4,7 @@
     <default>
       <files>testCalls.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -12,7 +12,7 @@
     <default>
       <files>testCalls.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -20,7 +20,7 @@
     <default>
       <files>testCalls.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
@@ -28,14 +28,14 @@
   <test>
     <default>
       <files>testCalls.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testCalls.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -43,7 +43,7 @@
     <default>
       <files>testComparison.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -51,7 +51,7 @@
     <default>
       <files>testComparison.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -59,21 +59,21 @@
     <default>
       <files>testComparison.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testComparison.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testComparison.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -82,7 +82,7 @@
     <default>
       <files>testConversion.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -90,7 +90,7 @@
     <default>
       <files>testConversion.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -98,21 +98,21 @@
     <default>
       <files>testConversion.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConversion.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConversion.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -120,7 +120,7 @@
       <default>
           <files>testMisc.js</files>
           <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError</compile-flags>
       </default>
   </test>
@@ -128,7 +128,7 @@
       <default>
       <files>testMisc.js</files>
       <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError -lic:1</compile-flags>
       </default>
   </test>
@@ -136,7 +136,7 @@
       <default>
       <files>testMisc.js</files>
       <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
       </default>
   </test>
@@ -144,14 +144,14 @@
   <test>
       <default>
       <files>testMisc.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
       </default>
   </test>
   <test>
       <default>
       <files>testMisc.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
       </default>
   </test>
@@ -160,7 +160,7 @@
       <default>
           <files>testMisc2.js</files>
           <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError</compile-flags>
       </default>
   </test>
@@ -168,7 +168,7 @@
       <default>
       <files>testMisc2.js</files>
       <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError -lic:1</compile-flags>
       </default>
   </test>
@@ -177,7 +177,7 @@
       <default>
       <files>testMisc2.js</files>
       <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
       </default>
   </test>
@@ -185,14 +185,14 @@
   <test>
       <default>
       <files>testMisc2.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
       </default>
   </test>
   <test>
       <default>
       <files>testMisc2.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
       </default>
   </test>
@@ -201,7 +201,7 @@
     <default>
       <files>testAddSub.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -209,7 +209,7 @@
     <default>
       <files>testAddSub.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -217,21 +217,21 @@
     <default>
       <files>testAddSub.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testAddSub.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testAddSub.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -240,7 +240,7 @@
     <default>
       <files>testAddSubSaturate.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -248,7 +248,7 @@
     <default>
       <files>testAddSubSaturate.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -256,21 +256,21 @@
     <default>
       <files>testAddSubSaturate.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testAddSubSaturate.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testAddSubSaturate.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -279,7 +279,7 @@
     <default>
       <files>testBitwise.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -287,7 +287,7 @@
     <default>
       <files>testBitwise.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -295,21 +295,21 @@
     <default>
       <files>testBitwise.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testBitwise.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testBitwise.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -318,7 +318,7 @@
     <default>
       <files>testComparisonSelect.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -326,7 +326,7 @@
     <default>
       <files>testComparisonSelect.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -334,21 +334,21 @@
     <default>
       <files>testComparisonSelect.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testComparisonSelect.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testComparisonSelect.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -357,7 +357,7 @@
     <default>
       <files>testConstructorLanes.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -365,7 +365,7 @@
     <default>
       <files>testConstructorLanes.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -373,21 +373,21 @@
     <default>
       <files>testConstructorLanes.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConstructorLanes.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConstructorLanes.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -396,7 +396,7 @@
     <default>
       <files>testConversion-2.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -404,7 +404,7 @@
     <default>
       <files>testConversion-2.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -412,21 +412,21 @@
     <default>
       <files>testConversion-2.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConversion-2.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConversion-2.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -435,7 +435,7 @@
     <default>
       <files>testLoadStore.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -443,7 +443,7 @@
     <default>
       <files>testLoadStore.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -451,21 +451,21 @@
     <default>
       <files>testLoadStore.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testLoadStore.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testLoadStore.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -474,7 +474,7 @@
     <default>
       <files>testMul.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -482,7 +482,7 @@
     <default>
       <files>testMul.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -490,21 +490,21 @@
     <default>
       <files>testMul.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testMul.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testMul.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -513,7 +513,7 @@
     <default>
       <files>testNeg.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -521,7 +521,7 @@
     <default>
       <files>testNeg.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -529,21 +529,21 @@
     <default>
       <files>testNeg.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testNeg.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testNeg.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -552,7 +552,7 @@
     <default>
       <files>testShift.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -560,7 +560,7 @@
     <default>
       <files>testShift.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -568,21 +568,21 @@
     <default>
       <files>testShift.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testShift.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testShift.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -591,7 +591,7 @@
     <default>
       <files>testShuffle.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -599,7 +599,7 @@
     <default>
       <files>testShuffle.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -607,21 +607,21 @@
     <default>
       <files>testShuffle.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testShuffle.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testShuffle.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -630,7 +630,7 @@
     <default>
       <files>testSplat.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -638,7 +638,7 @@
     <default>
       <files>testSplat.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -646,21 +646,21 @@
     <default>
       <files>testSplat.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testSplat.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testSplat.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -669,7 +669,7 @@
       <default>
       <files>testSwizzle.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
       </default>
   </test>
@@ -677,7 +677,7 @@
   <default>
       <files>testSwizzle.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
   </default>
   </test>
@@ -685,21 +685,21 @@
   <default>
       <files>testSwizzle.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
   </default>
   </test>
   <test>
   <default>
       <files>testSwizzle.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
   </default>
   </test>
   <test>
   <default>
       <files>testSwizzle.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
   </default>
   </test>
@@ -707,7 +707,7 @@
      <default>
         <files>testBug1.js</files>
         <baseline>testBug1.baseline</baseline>
-        <tags>exclude_dynapogo,exclude_ship</tags>
+        <tags>exclude_dynapogo</tags>
         <compile-flags>-off:deferparse -testtrace:asmjs -simdjs -bgjit- -maic:1</compile-flags>
      </default>
    </test>
diff --git a/test/SIMD.int32x4.asmjs/rlexe.xml b/test/SIMD.int32x4.asmjs/rlexe.xml
index 95c14a7..daf8ed2 100644
--- a/test/SIMD.int32x4.asmjs/rlexe.xml
+++ b/test/SIMD.int32x4.asmjs/rlexe.xml
@@ -4,7 +4,7 @@
     <default>
       <files>testAddSub.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -12,7 +12,7 @@
     <default>
       <files>testAddSub.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -20,21 +20,21 @@
     <default>
       <files>testAddSub.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testAddSub.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testAddSub.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
@@ -43,7 +43,7 @@
     <default>
       <files>testBitwise.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -51,7 +51,7 @@
     <default>
       <files>testBitwise.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -59,21 +59,21 @@
     <default>
       <files>testBitwise.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testBitwise.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testBitwise.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
@@ -82,7 +82,7 @@
     <default>
       <files>testCalls.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -90,7 +90,7 @@
     <default>
       <files>testCalls.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -98,21 +98,21 @@
     <default>
       <files>testCalls.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testCalls.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testCalls.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
@@ -120,7 +120,7 @@
     <default>
       <files>testComparison.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -128,7 +128,7 @@
     <default>
       <files>testComparison.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -136,7 +136,7 @@
     <default>
       <files>testComparison.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
@@ -144,14 +144,14 @@
   <test>
     <default>
       <files>testComparison.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testComparison.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
@@ -160,7 +160,7 @@
     <default>
       <files>testConversion.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -168,7 +168,7 @@
     <default>
       <files>testConversion.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -176,21 +176,21 @@
     <default>
       <files>testConversion.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConversion.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConversion.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
@@ -199,7 +199,7 @@
     <default>
       <files>testFields.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -207,7 +207,7 @@
     <default>
       <files>testFields.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -215,21 +215,21 @@
     <default>
       <files>testFields.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testFields.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testFields.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
@@ -237,7 +237,7 @@
     <default>
       <files>testMul.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -245,7 +245,7 @@
     <default>
       <files>testMul.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -253,21 +253,21 @@
     <default>
       <files>testMul.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testMul.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testMul.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
@@ -275,7 +275,7 @@
     <default>
       <files>testNeg.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -283,7 +283,7 @@
     <default>
       <files>testNeg.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -291,21 +291,21 @@
     <default>
       <files>testNeg.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testNeg.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testNeg.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
@@ -314,7 +314,7 @@
     <default>
       <files>testSelect.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -322,7 +322,7 @@
     <default>
       <files>testSelect.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -330,21 +330,21 @@
     <default>
       <files>testSelect.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testSelect.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testSelect.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
@@ -352,7 +352,7 @@
     <default>
       <files>testSplat.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -360,7 +360,7 @@
     <default>
       <files>testSplat.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -368,21 +368,21 @@
     <default>
       <files>testSplat.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testSplat.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testSplat.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
@@ -391,7 +391,7 @@
       <default>
       <files>testWithLane.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
       </default>
   </test>
@@ -399,7 +399,7 @@
   <default>
       <files>testWithLane.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
   </default>
   </test>
@@ -407,21 +407,21 @@
   <default>
       <files>testWithLane.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
   </default>
   </test>
   <test>
   <default>
       <files>testWithLane.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
   </default>
   </test>
   <test>
   <default>
       <files>testWithLane.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
   </default>
   </test>
@@ -430,7 +430,7 @@
   <default>
       <files>testLoadStore-2.js</files>
       <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError</compile-flags>
       </default>
   </test>
@@ -438,21 +438,21 @@
       <default>
           <files>testLoadStore-2.js</files>
           <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError -lic:1</compile-flags>
       </default>
   </test>
     <test>
       <default>
           <files>testLoadStore-2.js</files>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
       </default>
   </test>
     <test>
       <default>
           <files>testLoadStore-2.js</files>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
       </default>
   </test>
@@ -461,7 +461,7 @@
       <default>
           <files>testLoadStore.js</files>
           <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError</compile-flags>
       </default>
   </test>
@@ -469,7 +469,7 @@
       <default>
           <files>testLoadStore.js</files>
           <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError -lic:1</compile-flags>
       </default>
   </test>
@@ -477,106 +477,29 @@
       <default>
           <files>testLoadStore.js</files>
           <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
       </default>
   </test>
   <test>
       <default>
           <files>testLoadStore.js</files>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
       </default>
   </test>
   <test>
       <default>
           <files>testLoadStore.js</files>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
       </default>
   </test>
-
-  <test>
-      <default>
-          <files>testResizeLoadStore-2.js</files>
-          <baseline>testResizeLoadStore-2.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
-          <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError</compile-flags>
-      </default>
-  </test>
-  <test>
-      <default>
-          <files>testResizeLoadStore-2.js</files>
-          <baseline>testResizeLoadStore-2.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
-          <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError -lic:1</compile-flags>
-      </default>
-  </test>
-  <test>
-      <default>
-          <files>testResizeLoadStore-2.js</files>
-          <baseline>testResizeLoadStore-2-noAsmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
-          <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
-      </default>
-  </test>
-  <!-- too slow
-  <test>
-      <default>
-          <files>testResizeLoadStore-2.js</files>
-          <baseline>testResizeLoadStore-2-noAsmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
-          <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
-      </default>
-  </test>
-  -->
-
-  <test>
-      <default>
-          <files>testResizeLoadStore.js</files>
-          <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
-          <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError</compile-flags>
-      </default>
-  </test>
-  <test>
-      <default>
-          <files>testResizeLoadStore.js</files>
-          <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
-          <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError -lic:1</compile-flags>
-      </default>
-  </test>
-  <test>
-      <default>
-          <files>testResizeLoadStore.js</files>
-          <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
-          <compile-flags>-on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
-      </default>
-  </test>
-  <test>
-      <default>
-          <files>testResizeLoadStore.js</files>
-          <tags>exclude_dynapogo,exclude_ship</tags>
-          <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
-      </default>
-  </test>
-  <!-- too slow
-  <test>
-      <default>
-          <files>testResizeLoadStore.js</files>
-          <tags>exclude_dynapogo,exclude_ship</tags>
-          <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
-      </default>
-  </test>
-  -->
-
   <test>
       <default>
           <files>testShuffle.js</files>
           <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError</compile-flags>
       </default>
   </test>
@@ -584,7 +507,7 @@
       <default>
           <files>testShuffle.js</files>
           <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError -lic:1</compile-flags>
       </default>
   </test>
@@ -592,21 +515,21 @@
       <default>
           <files>testShuffle.js</files>
           <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
       </default>
   </test>
   <test>
       <default>
           <files>testShuffle.js</files>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
       </default>
   </test>
   <test>
       <default>
           <files>testShuffle.js</files>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
       </default>
   </test>
@@ -615,7 +538,7 @@
       <default>
           <files>testSwizzle.js</files>
           <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError</compile-flags>
       </default>
   </test>
@@ -623,7 +546,7 @@
       <default>
       <files>testSwizzle.js</files>
       <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError -lic:1</compile-flags>
       </default>
   </test>
@@ -631,21 +554,21 @@
       <default>
       <files>testSwizzle.js</files>
       <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
       </default>
   </test>
   <test>
       <default>
           <files>testSwizzle.js</files>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
       </default>
   </test>
   <test>
       <default>
           <files>testSwizzle.js</files>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
       </default>
   </test>
@@ -653,7 +576,7 @@
       <default>
           <files>testBool.js</files>
           <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError</compile-flags>
       </default>
   </test>
@@ -661,7 +584,7 @@
       <default>
       <files>testBool.js</files>
       <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError -lic:1</compile-flags>
       </default>
   </test>
@@ -669,21 +592,21 @@
       <default>
       <files>testBool.js</files>
       <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
       </default>
   </test>
   <test>
       <default>
       <files>testBool.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -on:simplejit -mic:1</compile-flags>
       </default>
   </test>
   <test>
       <default>
       <files>testBool.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -off:simplejit -mic:1</compile-flags>
       </default>
   </test>
@@ -692,7 +615,7 @@
       <default>
           <files>testBoolCalls.js</files>
           <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError</compile-flags>
       </default>
   </test>
@@ -700,7 +623,7 @@
       <default>
       <files>testBoolCalls.js</files>
       <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError -lic:1</compile-flags>
       </default>
   </test>
@@ -709,21 +632,21 @@
       <default>
       <files>testBoolCalls.js</files>
       <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
       </default>
   </test>
   <test>
       <default>
       <files>testBoolCalls.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -on:simplejit -mic:1</compile-flags>
       </default>
   </test>
   <test>
       <default>
       <files>testBoolCalls.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -off:simplejit -mic:1</compile-flags>
       </default>
   </test>
@@ -731,7 +654,7 @@
      <default>
         <files>testBug1.js</files>
         <baseline>testBug1.baseline</baseline>
-        <tags>exclude_dynapogo,exclude_ship</tags>
+        <tags>exclude_dynapogo</tags>
         <compile-flags>-off:deferparse -testtrace:asmjs -simdjs -bgjit- -maic:1</compile-flags>
      </default>
    </test>
diff --git a/test/SIMD.int32x4.asmjs/testResizeLoadStore-2-noAsmjs.baseline b/test/SIMD.int32x4.asmjs/testResizeLoadStore-2-noAsmjs.baseline
deleted file mode 100644
index 7dc650a..0000000
--- a/test/SIMD.int32x4.asmjs/testResizeLoadStore-2-noAsmjs.baseline
+++ /dev/null
@@ -1,150 +0,0 @@
-4194304

-Stores:

-Test1

-Test2

-Test3

-Test4

-Test5

-Test6

-Test7

-Test8

-Test9

-Test10

-Test12

-Test13

-Test14

-Loads

-Test1

-Test2

-Test3

-Test4

-Test5

-Test6

-Test7

-Test8

-Test9

-Test10

-Test11

-Test12

-BoundCheck

-Test1

-Correct

-Test2

-Correct

-Test3

-Correct

-Test4

-Correct

-Test5

-Correct

-Test6

-Correct

-Test7

-Correct

-Test8

-Correct

-Test9

-Correct

-Test10

-Correct

-Test11

-Correct

-Correct

-Correct

-Correct

-Correct

-Correct

-Correct

-Correct

-Test12

-Correct

-Test13

-Correct

-Test14

-Correct

-Test15

-Correct

-Test16

-Correct

-Test17

-Correct

-Test18

-Correct

-Test19

-Correct

-true

->>> ChangeHeap 

-Stores:

-Test1

-Test2

-Test3

-Test4

-Test5

-Test6

-Test7

-Test8

-Test9

-Test10

-Test12

-Test13

-Test14

-Loads

-Test1

-Test2

-Test3

-Test4

-Test5

-Test6

-Test7

-Test8

-Test9

-Test10

-Test11

-Test12

-BoundCheck

-Test1

-Correct

-Test2

-Correct

-Test3

-Correct

-Test4

-Correct

-Test5

-Correct

-Test6

-Correct

-Test7

-Correct

-Test8

-Correct

-Test9

-Correct

-Test10

-Correct

-Test11

-Correct

-Correct

-Correct

-Correct

-Correct

-Correct

-Correct

-Correct

-Test12

-Correct

-Test13

-Correct

-Test14

-Correct

-Test15

-Correct

-Test16

-Correct

-Test17

-Correct

-Test18

-Correct

-Test19

-Correct

-PASS

diff --git a/test/SIMD.int32x4.asmjs/testResizeLoadStore-2.baseline b/test/SIMD.int32x4.asmjs/testResizeLoadStore-2.baseline
deleted file mode 100644
index 3b1ee96..0000000
--- a/test/SIMD.int32x4.asmjs/testResizeLoadStore-2.baseline
+++ /dev/null
@@ -1,151 +0,0 @@
-Successfully compiled asm.js code

-4194304

-Stores:

-Test1

-Test2

-Test3

-Test4

-Test5

-Test6

-Test7

-Test8

-Test9

-Test10

-Test12

-Test13

-Test14

-Loads

-Test1

-Test2

-Test3

-Test4

-Test5

-Test6

-Test7

-Test8

-Test9

-Test10

-Test11

-Test12

-BoundCheck

-Test1

-Correct

-Test2

-Correct

-Test3

-Correct

-Test4

-Correct

-Test5

-Correct

-Test6

-Correct

-Test7

-Correct

-Test8

-Correct

-Test9

-Correct

-Test10

-Correct

-Test11

-Correct

-Correct

-Correct

-Correct

-Correct

-Correct

-Correct

-Correct

-Test12

-Correct

-Test13

-Correct

-Test14

-Correct

-Test15

-Correct

-Test16

-Correct

-Test17

-Correct

-Test18

-Correct

-Test19

-Correct

-true

->>> ChangeHeap 

-Stores:

-Test1

-Test2

-Test3

-Test4

-Test5

-Test6

-Test7

-Test8

-Test9

-Test10

-Test12

-Test13

-Test14

-Loads

-Test1

-Test2

-Test3

-Test4

-Test5

-Test6

-Test7

-Test8

-Test9

-Test10

-Test11

-Test12

-BoundCheck

-Test1

-Correct

-Test2

-Correct

-Test3

-Correct

-Test4

-Correct

-Test5

-Correct

-Test6

-Correct

-Test7

-Correct

-Test8

-Correct

-Test9

-Correct

-Test10

-Correct

-Test11

-Correct

-Correct

-Correct

-Correct

-Correct

-Correct

-Correct

-Correct

-Test12

-Correct

-Test13

-Correct

-Test14

-Correct

-Test15

-Correct

-Test16

-Correct

-Test17

-Correct

-Test18

-Correct

-Test19

-Correct

-PASS

diff --git a/test/SIMD.int32x4.asmjs/testResizeLoadStore-2.js b/test/SIMD.int32x4.asmjs/testResizeLoadStore-2.js
deleted file mode 100644
index 314fa46..0000000
--- a/test/SIMD.int32x4.asmjs/testResizeLoadStore-2.js
+++ /dev/null
@@ -1,1113 +0,0 @@
-//-------------------------------------------------------------------------------------------------------

-// Copyright (C) Microsoft Corporation and contributors. All rights reserved.

-// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.

-//-------------------------------------------------------------------------------------------------------

-

-this.WScript.LoadScriptFile("..\\UnitTestFramework\\SimdJsHelpers.js");

-function asmModule(stdlib, imports, buffer) {

-    "use asm";

-    

-    var i4 = stdlib.SIMD.Int32x4;

-    var i4check = i4.check;

-    var i4splat = i4.splat;

-    

-    var i4fromFloat32x4 = i4.fromFloat32x4;

-    var i4fromFloat32x4Bits = i4.fromFloat32x4Bits;

-    //var i4abs = i4.abs;

-    var i4neg = i4.neg;

-    var i4add = i4.add;

-    var i4sub = i4.sub;

-    var i4mul = i4.mul;

-    var i4swizzle = i4.swizzle;

-    var i4shuffle = i4.shuffle;

-    var i4lessThan = i4.lessThan;

-    var i4equal = i4.equal;

-    var i4greaterThan = i4.greaterThan;

-    var i4select = i4.select;

-    var i4and = i4.and;

-    var i4or = i4.or;

-    var i4xor = i4.xor;

-    var i4not = i4.not;

-    var i4load  = i4.load;

-    var i4load1 = i4.load1;

-    var i4load2 = i4.load2;

-    var i4load3 = i4.load3;

-    

-    var i4store  = i4.store

-    var i4store1 = i4.store1;

-    var i4store2 = i4.store2;

-    var i4store3 = i4.store3;

-    

-    //var i4shiftLeftByScalar = i4.shiftLeftByScalar;

-    //var i4shiftRightByScalar = i4.shiftRightByScalar;

-    //var i4shiftRightArithmeticByScalar = i4.shiftRightArithmeticByScalar;

-    var f4 = stdlib.SIMD.Float32x4; 

-    var f4check = f4.check;    

-    var f4splat = f4.splat;

-    

-    var f4fromInt32x4 = f4.fromInt32x4;

-    var f4fromInt32x4Bits = f4.fromInt32x4Bits;

-    var f4abs = f4.abs;

-    var f4neg = f4.neg;

-    var f4add = f4.add;

-    var f4sub = f4.sub;

-    var f4mul = f4.mul;

-    var f4div = f4.div;

-    

-    var f4min = f4.min;

-    var f4max = f4.max;

-

-

-    var f4sqrt = f4.sqrt;

-    var f4swizzle = f4.swizzle;

-    var f4shuffle = f4.shuffle;

-    var f4lessThan = f4.lessThan;

-    var f4lessThanOrEqual = f4.lessThanOrEqual;

-    var f4equal = f4.equal;

-    var f4notEqual = f4.notEqual;

-    var f4greaterThan = f4.greaterThan;

-    var f4greaterThanOrEqual = f4.greaterThanOrEqual;

-

-    var f4select = f4.select;

-    

-    var f4load = f4.load;

-    var f4load1 = f4.load1;

-    var f4load2 = f4.load2;

-    var f4load3 = f4.load3;

-    

-    var f4store  = f4.store;

-    var f4store1 = f4.store1;

-    var f4store2 = f4.store2;

-    var f4store3 = f4.store3;

-    

-    

-    

-    var fround = stdlib.Math.fround;

-

-    var globImportF4 = f4check(imports.g1);       // global var import

-    var globImportI4 = i4check(imports.g2);       // global var import

-    

-    var g1 = f4(-5033.2,-3401.0,665.34,32234.1);          // global var initialized

-    var g2 = i4(1065353216, -1073741824, -1077936128, 1082130432);          // global var initialized

-    

-    var gval = 1234;

-    var gval2 = 1234.0;

-

-    var loopCOUNT = 3;

-    

-    var Int8Array = stdlib.Int8Array;

-    var Uint8Array = stdlib.Uint8Array;

-    var Int16Array = stdlib.Int16Array;

-    var Uint16Array = stdlib.Uint16Array;

-    var Int32Array = stdlib.Int32Array;

-    var Uint32Array = stdlib.Uint32Array;

-    var Float32Array = stdlib.Float32Array;

-    

-    var Int8Heap = new stdlib.Int8Array (buffer);    

-    var Uint8Heap = new stdlib.Uint8Array (buffer);   

-    var Int16Heap = new stdlib.Int16Array(buffer);

-    var Uint16Heap = new stdlib.Uint16Array(buffer);

-    var Int32Heap = new stdlib.Int32Array(buffer);

-    var Uint32Heap = new stdlib.Uint32Array(buffer);

-    var Float32Heap = new stdlib.Float32Array(buffer);    

-

-    var len=stdlib.byteLength;

-    

-    function ch(newBuffer) 

-    { 

-        if(len(newBuffer) & 0xffffff || len(newBuffer) <= 0xffffff || len(newBuffer) > 0x80000000) 

-            return false; 

-        

-        Int8Heap = new Int8Array(newBuffer);

-        Uint8Heap = new Uint8Array(newBuffer);

-        Int16Heap = new Int16Array(newBuffer);

-        Uint16Heap = new Uint16Array(newBuffer);

-        Int32Heap = new Int32Array(newBuffer);

-        Uint32Heap = new Uint32Array(newBuffer);

-        Float32Heap = new Float32Array(newBuffer);

-        

-        buffer=newBuffer; 

-        return true;

-    }

-    

-     function storeF32(value, idx) 

-    {

-        value= i4check(value);

-        idx = idx|0;

-        idx = idx<<2;

-        i4store(Float32Heap, (idx>>2), value);

-    }

-    function loadF32(idx) 

-    {

-        idx = idx|0;

-        idx = idx<<2;

-        return i4load(Float32Heap, (idx>>2));

-    }

-    

-    function storeUI32(value, idx) 

-    { value= i4check(value); idx = idx|0; idx = idx<<2; 

-    i4store(Uint32Heap, (idx>>2), value);}

-    function loadUI32(idx) 

-    { idx = idx|0; idx = idx<<2; return i4load(Uint32Heap, (idx>>2)); }

-    

-    function storeI32(value, idx) 

-    { value= i4check(value); idx = idx|0; idx = idx<<2; 

-    i4store(Int32Heap, (idx>>2), value);}

-    function loadI32(idx) 

-    { idx = idx|0; idx = idx<<2; return i4load(Int32Heap, (idx>>2)); }

-    

-    function storeI16(value, idx) 

-    { value= i4check(value); idx = idx|0; idx = idx<<1; 

-    i4store(Int16Heap, (idx>>1), value);}

-    function loadI16(idx) 

-    { idx = idx|0; idx = idx<<1; return i4load(Int16Heap, (idx>>1)); }

-

-    function storeUI16(value, idx) 

-    { value= i4check(value); idx = idx|0; idx = idx<<1; 

-    i4store(Uint16Heap, (idx>>1), value);}

-    function loadUI16(idx) 

-    { idx = idx|0; idx = idx<<1; return i4load(Uint16Heap, (idx>>1)); }

-

-    function storeI8(value, idx) 

-    { value= i4check(value); idx = idx|0; idx = idx<<0; 

-    i4store(Int8Heap, (idx>>0), value);}

-    function loadI8(idx) 

-    { idx = idx|0; idx = idx<<0; return i4load(Int8Heap, (idx>>0)); }

-

-    function storeUI8(value, idx) 

-    { value= i4check(value); idx = idx|0; idx = idx<<0; 

-    i4store(Uint8Heap, (idx>>0), value);}

-    function loadUI8(idx) 

-    { idx = idx|0; idx = idx<<0; return i4load(Uint8Heap, (idx>>0)); }

-    

-    

-    function loadStoreIndex1()

-    {

-        i4store(Float32Heap, 0, i4(-1,-2,3,-4)); 

-        return i4load(Float32Heap, 0);

-    }

-    

-    

-    function store_1(functionPicker) //Function picker to pick store1/store2/store3/store

-    {

-        functionPicker = functionPicker|0;

-        var v0 = i4(0,0,0,0);

-        var loopIndex = 0, idx = 0, end = 256;        

-        while((loopIndex|0) < (loopCOUNT|0)) 

-        {

-            idx = 0;

-            v0 = i4(5,-12,0,2220);

-            for(idx = idx << 2; (idx|0) < (end|0 << 2); idx = (idx + 16)|0)

-            {

-                switch(functionPicker|0)

-                {

-                    case 5:

-                        i4store(Float32Heap, idx>>2, v0); 

-                        break;

-                    case 6:

-                        i4store1(Float32Heap, idx>>2, v0);

-                        break;

-                    case 7:

-                        i4store2(Float32Heap, idx>>2, v0);

-                        break;

-                    case 8:

-                        i4store3(Float32Heap, idx>>2, v0);

-                        break;

-                    default:

-                        break;

-                }

-                v0 = i4add(v0, i4(1,1,1,1));

-            }

-            loopIndex = (loopIndex + 1)|0;

-        }

-        //Expects the heap to be: 0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3...15,15,15,15,0,0,0,0...

-        return i4load(Float32Heap, 0);

-        //Alternate validation

-        // for(idx = 0; idx << 2 < end << 2; idx = (idx + 4 << 2)|0)

-        // {

-            // verify buffer view is as expected. 

-            // 0,0,0,0,1,1,1,1,2,2,2,2... 

-        // }

-    }        

-     function store_2(functionPicker)

-    {

-        functionPicker = functionPicker|0;

-        var v0 = i4(0,0,0,0);

-        var loopIndex = 0, idx = 0, end = 256;        

-        for (loopIndex = 0; (loopIndex | 0) < (loopCOUNT | 0) ; loopIndex = (loopIndex + 1) | 0)

-        {

-            idx = 0;

-            v0 = i4(0,0,0,0);

-            for(idx = idx << 2; (idx|0) < (end|0 << 2); idx = (idx + 16)|0)

-            {

-                switch(functionPicker|0)

-                {

-                    case 5:

-                        i4store(Float32Heap, idx>>2, v0); 

-                        break;

-                    case 6:

-                        i4store1(Float32Heap, idx>>2, v0);

-                        break;

-                    case 7:

-                        i4store2(Float32Heap, idx>>2, v0);

-                        break;

-                    case 8:

-                        i4store3(Float32Heap, idx>>2, v0);

-                        break;

-                    default:

-                        break;

-                }

-                v0 = i4add(v0, i4(1,1,1,1));

-            }

-        }

-        return i4load(Float32Heap, 8);

-    } 

-    function store_3(functionPicker)

-    {

-        functionPicker = functionPicker|0;

-        var v0 = i4(0,0,0,0);

-        var loopIndex = 0, idx = 0, end = 256;    

-

-        loopIndex = loopCOUNT | 0;

-        do {

-            idx = 0;

-            v0 = i4(0,0,0,0);

-            for(idx = idx << 2; (idx|0) < (end|0 << 2); idx = (idx + 16)|0)

-            {

-                switch(functionPicker|0)

-                {

-                    case 5:

-                        i4store(Float32Heap, idx>>2, v0); 

-                        break;

-                    case 6:

-                        i4store1(Float32Heap, idx>>2, v0);

-                        break;

-                    case 7:

-                        i4store2(Float32Heap, idx>>2, v0);

-                        break;

-                    case 8:

-                        i4store3(Float32Heap, idx>>2, v0);

-                        break;

-                    default:

-                        break;

-                }

-                v0 = i4add(v0, i4(1,1,1,1));

-            }

-            loopIndex = (loopIndex - 1) | 0;

-        }

-        while ( (loopIndex | 0) > 0);

-        return i4load(Float32Heap, 8);

-    } 

-    function store_1_Int8(length) 

-    {

-        length = length|0;

-        var v0 = i4(0,0,0,0);

-        var loopIndex = 0, idx = 0, end = 0;

-        end = (length * 4)|0; 

-        while((loopIndex|0) < (loopCOUNT|0)) 

-        {

-            idx = (end - 4096) | 0;

-            v0 = i4(0,0,0,0);

-            for(idx = idx << 0; (idx|0) < (end|0 << 0); idx = (idx + 16)|0)

-            {

-                i4store(Int8Heap, idx>>0, v0); 

-                v0 = i4add(v0, i4(1,1,1,1));

-            }

-            loopIndex = (loopIndex + 1)|0;

-        }

-        //Expects the heap to be: 0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3...15,15,15,15,0,0,0,0...

-        return i4load(Float32Heap, 2);

-    }

-    function store_1_Uint8(length) 

-    {

-        length = length|0;

-        var v0 = i4(0,0,0,0);

-        var loopIndex = 0, idx = 0, end = 0;

-        end = (length * 4)|0; 

-        while((loopIndex|0) < (loopCOUNT|0)) 

-        {

-            idx = (end - 4096) | 0;

-            v0 = i4(0,0,0,0);

-            for(idx = idx << 0; (idx|0) < (end|0 << 0); idx = (idx + 16)|0)

-            {

-                i4store(Uint8Heap, idx>>0, v0); 

-                v0 = i4add(v0, i4(1,1,1,1));

-            }

-            loopIndex = (loopIndex + 1)|0;

-        }

-        //Expects the heap to be: 0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3...15,15,15,15,0,0,0,0...

-        return i4load(Float32Heap, 2);

-    }

-    function store_1_Int16(length) 

-    {

-        length = length|0;

-        var v0 = i4(0,0,0,0);

-        var loopIndex = 0, idx = 0, end = 0;

-        end = (length * 4)|0; 

-        while((loopIndex|0) < (loopCOUNT|0)) 

-        {

-            idx = (end - 4096) | 0;

-            v0 = i4(0,0,0,0);

-            for(idx = idx << 1; (idx|0) < (end|0 << 1); idx = (idx + 16)|0)

-            {

-                i4store(Int16Heap, idx>>1, v0); 

-                v0 = i4add(v0, i4(1,1,1,1));

-            }

-            loopIndex = (loopIndex + 1)|0;

-        }

-        //Expects the heap to be: 0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3...15,15,15,15,0,0,0,0...

-        return i4load(Float32Heap, 2);

-    }    

-    function store_1_Uint16(length) 

-    {

-        length = length|0;

-        var v0 = i4(0,0,0,0);

-        var loopIndex = 0, idx = 0, end = 0;

-        end = (length * 4)|0; 

-        while((loopIndex|0) < (loopCOUNT|0)) 

-        {

-            idx = (end - 4096) | 0;

-            v0 = i4(0,0,0,0);

-            for(idx = idx << 1; (idx|0) < (end|0 << 1); idx = (idx + 16)|0)

-            {

-                i4store(Uint16Heap, idx>>1, v0); 

-                v0 = i4add(v0, i4(1,1,1,1));

-            }

-            loopIndex = (loopIndex + 1)|0;

-        }

-        //Expects the heap to be: 0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3...15,15,15,15,0,0,0,0...

-        return i4load(Float32Heap, 2);

-    }    

-    function store_1_Int32(length) 

-    {

-        length = length|0;

-        var v0 = i4(0,0,0,0);

-        var loopIndex = 0, idx = 0, end = 0;

-        end = (length * 4)|0; 

-        while((loopIndex|0) < (loopCOUNT|0)) 

-        {

-            idx = (end - 4096) | 0;

-            v0 = i4(0,0,0,0);

-            for(idx = idx << 2; (idx|0) < (end|0 << 2); idx = (idx + 16)|0)

-            {

-                i4store(Int32Heap, idx>>2, v0); 

-                v0 = i4add(v0, i4(1,1,1,1));

-            }

-            loopIndex = (loopIndex + 1)|0;

-        }

-        //Expects the heap to be: 0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3...15,15,15,15,0,0,0,0...

-        return i4load(Float32Heap, 2);

-    }    

-    function store_1_Uint32(length) 

-    {

-        length = length|0;

-        var v0 = i4(0,0,0,0);

-        var loopIndex = 0, idx = 0, end = 0;

-        end = (length * 4)|0; 

-        while((loopIndex|0) < (loopCOUNT|0)) 

-        {

-            idx = (end - 4096) | 0;

-            v0 = i4(0,0,0,0);

-            for(idx = idx << 2; (idx|0) < (end|0 << 2); idx = (idx + 16)|0)

-            {

-                i4store(Uint32Heap, idx>>2, v0); 

-                v0 = i4add(v0, i4(1,1,1,1));

-            }

-            loopIndex = (loopIndex + 1)|0;

-        }

-        //Expects the heap to be: 0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3...15,15,15,15,0,0,0,0...

-        return i4load(Float32Heap, 2);

-    }

-    

-    ////////////////////////////Load////////////////////////////

-    function load_1(functionPicker)

-    {

-        //length = length|0;

-        functionPicker = functionPicker|0;

-        

-        var idx=0,end=16;//(length-4)|0;;

-        var loopIndex = 0;

-        var v = i4(0,0,0,0);

-

-        while ( (loopIndex|0) < (loopCOUNT|0)) {

-            

-            idx=0;

-            

-            for(idx = idx<<2; (idx|0) <= (end<<2); idx = (idx + 1)|0)

-            {        

-                switch(functionPicker|0)

-                {

-                    case 1:

-                        v = i4load(Float32Heap, idx>>2); 

-                        break;

-                     case 2:

-                        v = i4load1(Float32Heap, idx>>2);

-                        break;

-                    case 3:

-                        v = i4load2(Float32Heap, idx>>2);

-                        break;

-                    case 4:

-                        v = i4load3(Float32Heap, idx>>2);

-                        break;

-                    default:

-                        break;

-                }

-            }

-            loopIndex = (loopIndex + 1) | 0;

-        }

-        return v;

-    }

-     

-    function load_2(functionPicker)

-    {

-        //length = length|0;

-        functionPicker = functionPicker|0;

-        

-        var idx=0,end=16;//(length-4)|0;;

-        var loopIndex = 0;

-        var v = i4(0,0,0,0);

-        

-        for (loopIndex = 0; (loopIndex | 0) < (loopCOUNT | 0) ; loopIndex = (loopIndex + 1) | 0)

-        {

-             idx=0;

-            

-            for(idx = idx<<2; (idx|0) <= (end<<2); idx = (idx + 1)|0)

-            {        

-                switch(functionPicker|0)

-                {

-                    case 1:

-                        v = i4load(Float32Heap, idx>>2); 

-                        break;

-                     case 2:

-                        v = i4load1(Float32Heap, idx>>2);

-                        break;

-                    case 3:

-                        v = i4load2(Float32Heap, idx>>2);

-                        break;

-                    case 4:

-                        v = i4load3(Float32Heap, idx>>2);

-                        break;

-                    default:

-                        break;

-                }

-            }

-        }

-        return v;

-    }

-

-    function load_3(functionPicker)

-    {

-        //length = length|0;

-        functionPicker = functionPicker|0;

-        

-        var idx=0,end=16;//(length-4)|0;;

-        var loopIndex = 0;

-        var v = i4(0,0,0,0);

-

-        loopIndex = loopCOUNT | 0;

-        do {

-            idx = 0;

-            for(idx = idx<<2; (idx|0) <= (end<<2); idx = (idx + 1)|0)

-            {        

-                switch(functionPicker|0)

-                {

-                    case 1:

-                        v = i4load(Float32Heap, idx>>2); 

-                        break;

-                     case 2:

-                        v = i4load1(Float32Heap, idx>>2);

-                        break;

-                    case 3:

-                        v = i4load2(Float32Heap, idx>>2);

-                        break;

-                    case 4:

-                        v = i4load3(Float32Heap, idx>>2);

-                        break;

-                    default:

-                        break;

-                }

-            }

-            loopIndex = (loopIndex - 1) | 0;

-        }

-        while ( (loopIndex | 0) > 0);

-        return v;

-    } 

-    function load_1_Int8(length)

-    {

-        length = length|0;

-        var idx=0,end=0;

-        var loopIndex = 0;

-        var v = i4(0,0,0,0);

-        end = (((length * 4)|0) - 16)|0; 

-        while ( (loopIndex|0) < (loopCOUNT|0)) {

-            idx= (end - 4096) | 0;

-            for(idx = idx<<0; (idx|0) <= (end<<0); idx = (idx + 1)|0)

-            {        

-                v = i4load(Int8Heap, idx>>0); 

-            }

-            loopIndex = (loopIndex + 1) | 0;

-        }

-        return v;

-    }

-    function load_1_Uint8(length)

-    {

-        length = length|0;

-        var idx=0,end=0;

-        var loopIndex = 0;

-        var v = i4(0,0,0,0);

-        end = (((length * 4)|0) - 16)|0; 

-        while ( (loopIndex|0) < (loopCOUNT|0)) {

-            idx= (((length * 4)|0) - 4096) | 0;

-            for(idx = idx<<0; (idx|0) <= (end<<0); idx = (idx + 1)|0)

-            {        

-                v = i4load(Uint8Heap, idx>>0); 

-            }

-            loopIndex = (loopIndex + 1) | 0;

-        }

-        return v;

-    }

-    function load_1_Int16(length)

-    {

-        length = length|0;

-        var idx=0,end=0;

-        var loopIndex = 0;

-        var v = i4(0,0,0,0);

-        end = (((length * 2)|0) - 8)|0; 

-        while ( (loopIndex|0) < (loopCOUNT|0)) {

-            idx= (end - 4096) | 0;

-            for(idx = idx<<1; (idx|0) <= (end<<1); idx = (idx + 1)|0)

-            {        

-                v = i4load(Int16Heap, idx>>1); 

-            }

-            loopIndex = (loopIndex + 1) | 0;

-        }

-        return v;

-    }

-    function load_1_Uint16(length)

-    {

-        length = length|0;

-        var idx=0,end=120;

-        var loopIndex = 0;

-        var v = i4(0,0,0,0);

-        end = (((length * 2)|0) - 8)|0; 

-        while ( (loopIndex|0) < (loopCOUNT|0)) {

-            idx= (end - 4096) | 0;

-            for(idx = idx<<1; (idx|0) <= (end<<1); idx = (idx + 1)|0)

-            {        

-                v = i4load(Uint16Heap, idx>>1); 

-            }

-            loopIndex = (loopIndex + 1) | 0;

-        }

-        return v;

-    }

-    function load_1_Int32(length)

-    {

-        length = length|0;

-        var idx=0,end=60;

-        var loopIndex = 0;

-        var v = i4(0,0,0,0);

-        end = (((length * 1)|0) - 4)|0; 

-        while ( (loopIndex|0) < (loopCOUNT|0)) {

-            idx= (end - 4096) | 0;

-            for(idx = idx<<2; (idx|0) <= (end<<2); idx = (idx + 1)|0)

-            {        

-                v = i4load(Int32Heap, idx>>2); 

-            }

-            loopIndex = (loopIndex + 1) | 0;

-        }

-        return v;

-    }

-    function load_1_Uint32(length)

-    {

-        length = length|0;

-        var idx=0,end=60;

-        var loopIndex = 0;

-        var v = i4(0,0,0,0);

-        end = (((length * 1)|0) - 4)|0; 

-        while ( (loopIndex|0) < (loopCOUNT|0)) {

-            idx= (end - 4096) | 0;

-            for(idx = idx<<2; (idx|0) <= (end<<2); idx = (idx + 1)|0)

-            {        

-                v = i4load(Uint32Heap, idx>>2); 

-            }

-            loopIndex = (loopIndex + 1) | 0;

-        }

-        return v;

-    }    

-    

-    return {

-            changeHeap:ch

-           ,store1:store_1

-           ,store2:store_2

-           ,store3:store_3

-           ,store1Int8:store_1_Int8

-           ,store1Uint8:store_1_Uint8

-           ,store1Int16:store_1_Int16

-           ,store1Uint16:store_1_Uint16

-           ,store1Int32:store_1_Int32

-           ,store1Uint32:store_1_Uint32

-           ,load1:load_1

-           ,load2:load_2

-           ,load3:load_3

-           ,load1Int8:load_1_Int8

-           ,load1Uint8:load_1_Uint8

-           ,load1Int16:load_1_Int16

-           ,load1Uint16:load_1_Uint16

-           ,load1Int32:load_1_Int32

-           ,load1Uint32:load_1_Uint32

-           ,loadF32:loadF32

-           ,storeF32:storeF32

-           ,storeUI32:storeUI32

-           ,loadUI32:loadUI32

-           ,storeI32:storeI32

-           ,loadI32:loadI32           

-           ,storeI16:storeI16

-           ,loadI16:loadI16

-           ,storeUI16:storeUI16

-           ,loadUI16:loadUI16

-           ,storeI8:storeI8

-           ,loadI8:loadI8    

-           ,storeUI8:storeUI8

-           ,loadUI8:loadUI8           

-           ,loadStoreIndex1:loadStoreIndex1};

-}

-

-var buffer = new ArrayBuffer(0x1000000); //16mb min 2^12

-

-//Reset or flush the buffer

-function initF32(buffer) {

-    var values = new Float32Array( buffer );

-    for( var i=0; i < values.length ; ++i ) {

-        values[i] = i * 10;

-    }

-    return values.length;

-}

-function printBuffer(buffer, count)

-{

-    var i4;

-    for (var i = 0; i < count/* * 16*/; i += 16)

-    {

-        i4 = SIMD.Int32x4.load(buffer, i);

-        print(i4.toString());

-    }

-}

-

-function printResults(res)

-{

-    print(typeof(res));

-    print(res.toString());

-}

-

-inputLength = initF32(buffer);

-print(inputLength);

-//Enumerating SIMD loads to test. 

-SIMDLoad = 1;

-SIMDLoad1 = 2;

-SIMDLoad2 = 3;

-SIMDLoad3 = 4;

-

-SIMDStore = 5;

-SIMDStore1 = 6;

-SIMDStore2 = 7;

-SIMDStore3 = 8;

-

-//Module initialization

-this['byteLength'] =

-  Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, 'byteLength').get);

-var m = asmModule(this, {g0:initF32(buffer),g1:SIMD.Float32x4(9,9,9,9), g2:SIMD.Int32x4(1, 2, 3, 4)}, buffer);

-var values = new Float32Array(buffer);

-

-print("Stores:");

-

-print("Test1");

-inputLength = initF32(buffer); 

-var ret = m.store1(SIMDStore1);//Lane1 store

-equalSimd([5, 1092616192, 1101004800, 1106247680], ret, SIMD.Int32x4, "");

-

-print("Test2");;

-inputLength = initF32(buffer); 

-var ret = m.store1(SIMDStore2);//Lane 1,2 store

-equalSimd([5, -12, 1101004800, 1106247680], ret, SIMD.Int32x4, "");

-

-print("Test3");

-inputLength = initF32(buffer); 

-var ret = m.store1(SIMDStore3);//Lane 1,2,3 store

-equalSimd([5, -12, 0, 1106247680], ret, SIMD.Int32x4, "");

-

-print("Test4");

-inputLength = initF32(buffer); 

-var ret = m.store1(SIMDStore);//Generic Store

-equalSimd([5, -12, 0, 2220], ret, SIMD.Int32x4, "");

-

-print("Test5");

-inputLength = initF32(buffer);  

-var ret = m.store2(SIMDStore);//Generic store 

-equalSimd([2, 2, 2, 2], ret, SIMD.Int32x4, "");

-

-print("Test6");

-inputLength = initF32(buffer); 

-var ret = m.store3(SIMDStore);//Generic store

-equalSimd([2, 2, 2, 2], ret, SIMD.Int32x4, "");

-

-print("Test7");

-inputLength = initF32(buffer); 

-var ret = m.store1Int8(inputLength);//Int8Heap store

-equalSimd([1101004800, 1106247680, 1109393408, 1112014848], ret, SIMD.Int32x4, "");

-

-print("Test8");

-inputLength = initF32(buffer); 

-var ret = m.store1Uint8(inputLength);//Uint8Heap store

-equalSimd([1101004800, 1106247680, 1109393408, 1112014848], ret, SIMD.Int32x4, "");

-

-print("Test9");

-inputLength = initF32(buffer); 

-var ret = m.store1Int16(inputLength);//Int16Heap store

-equalSimd([1101004800, 1106247680, 1109393408, 1112014848], ret, SIMD.Int32x4, "");

-

-print("Test10");

-inputLength = initF32(buffer); 

-var ret = m.store1Uint16(inputLength);//Uint16Heap store

-equalSimd([1101004800, 1106247680, 1109393408, 1112014848], ret, SIMD.Int32x4, "");

-

-print("Test12");

-inputLength = initF32(buffer); 

-var ret = m.store1Int32(inputLength);//Int32Heap store

-equalSimd([1101004800, 1106247680, 1109393408, 1112014848], ret, SIMD.Int32x4, "");

-

-print("Test13");

-inputLength = initF32(buffer); 

-var ret = m.store1Uint32(inputLength);//Uint32Heap store

-equalSimd([1101004800, 1106247680, 1109393408, 1112014848], ret, SIMD.Int32x4, "");

-

-print("Test14");

-inputLength = initF32(buffer); 

-var ret = m.loadStoreIndex1();//Uint32Heap store

-equalSimd([-1, -2, 3, -4], ret, SIMD.Int32x4, "");

-

-print("Loads");

-print("Test1");

-var ret = m.load1(SIMDLoad1);

-equalSimd([1126170624, 0, 0, 0], ret, SIMD.Int32x4, "");

-

-print("Test2");

-var ret = m.load1(SIMDLoad2);

-equalSimd([1126170624, 1126825984, 0, 0], ret, SIMD.Int32x4, "");

-

-print("Test3");

-var ret = m.load1(SIMDLoad3);

-equalSimd([1126170624, 1126825984, 1127481344, 0], ret, SIMD.Int32x4, "");

-

-print("Test4");

-var ret = m.load1(SIMDLoad);

-equalSimd([1126170624, 1126825984, 1127481344, 1128136704], ret, SIMD.Int32x4, "");

-

-print("Test5");

-var ret = m.load2(SIMDLoad);

-equalSimd([1126170624, 1126825984, 1127481344, 1128136704], ret, SIMD.Int32x4, "");

-

-print("Test6");

-var ret = m.load3(SIMDLoad);

-equalSimd([1126170624, 1126825984, 1127481344, 1128136704], ret, SIMD.Int32x4, "");

-

-print("Test7");

-var ret = m.load1Int8(inputLength); //Int8Heap load

-equalSimd([1277165558, 1277165560, 1277165563, 1277165566], ret, SIMD.Int32x4, "");

-

-print("Test8");

-var ret = m.load1Uint8(inputLength); //Int8Heap load

-equalSimd([1277165558, 1277165560, 1277165563, 1277165566], ret, SIMD.Int32x4, "");

-

-print("Test9");

-var ret = m.load1Int16(inputLength); //Int16Heap load

-equalSimd([1277165558, 1277165560, 1277165563, 1277165566], ret, SIMD.Int32x4, "");

-

-print("Test10");

-var ret = m.load1Uint16(inputLength); //Int16Heap load

-equalSimd([1277165558, 1277165560, 1277165563, 1277165566], ret, SIMD.Int32x4, "");

-

-print("Test11");

-var ret = m.load1Int32(inputLength); //Int32Heap load

-equalSimd([1277165558, 1277165560, 1277165563, 1277165566], ret, SIMD.Int32x4, "");

-

-print("Test12");

-var ret = m.load1Uint32(inputLength); //Int32Heap load

-equalSimd([1277165558, 1277165560, 1277165563, 1277165566], ret, SIMD.Int32x4, "");

-

-print("BoundCheck");

-var value = SIMD.Int32x4(9.9,1.2,3.4,5.6);

-

-print("Test1");

-try {m.storeF32(value, inputLength); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test2");

-try {m.loadF32(inputLength); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test3");

-try {m.storeF32(value, inputLength-1); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test4");

-try {m.loadF32(inputLength-1); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test5");

-try {m.storeF32(value, inputLength-4);print("Correct");} catch(err) {print("Wrong");}

-

-print("Test6");

-try {var v = m.loadF32(inputLength-4);print("Correct");} catch(err) {print("Wrong");}

-

-print("Test7");

-try {m.storeUI32(value, inputLength+1);print("Wrong");} catch(err) {print("Correct");}

-

-print("Test8");

-try { m.loadUI32(inputLength+1); print("Wrong"); } catch(err) { print("Correct"); }

-

-print("Test9");

-try {m.storeI32(value, inputLength+1); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test10");

-try {m.loadI32(inputLength+1);print("Wrong");} catch(err) {print("Correct");}

-

-print("Test11");

-try{

-    m.storeI16(value, inputLength*2-8);

-    print("Correct");

-    m.storeUI16(value, inputLength*2-8);

-    print("Correct");

-    m.storeI8(value, inputLength*4-16);

-    print("Correct");

-    m.storeUI8(value, inputLength*4-16);

-    print("Correct");

-    m.loadI16(inputLength*2-8);

-    print("Correct");

-    m.loadUI16(inputLength*2-8);

-    print("Correct");

-    m.loadI8(inputLength*4-16);

-    print("Correct");

-    m.loadUI8(inputLength*4-16);

-    print("Correct");

-} catch(err){ print("Wrong"); }

-

-print("Test12");

-try {m.storeUI16(value, inputLength*2);print("Wrong");} catch(err) {print("Correct");}

-

-print("Test13");

-try {m.loadUI16(inputLength*2-7); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test14");

-try {m.storeI16(value, inputLength*2-7); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test15");

-try {m.loadI16(inputLength*2-7); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test16");

-try {m.storeUI8(value, inputLength*4-15); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test17");

-try {m.loadUI8(inputLength*4-15); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test18");

-try {m.storeI8(value, inputLength*4-15); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test19");

-try {m.loadI8(inputLength*4+15); print("Wrong");} catch(err) {print("Correct");}

-

-// change buffer

-var buffer = new ArrayBuffer(0x2000000);

-print(m.changeHeap(buffer));

-

-print(">>> ChangeHeap ");

-

-print("Stores:");

-

-print("Test1");

-inputLength = initF32(buffer); 

-var ret = m.store1(SIMDStore1);//Lane1 store

-equalSimd([5, 1092616192, 1101004800, 1106247680], ret, SIMD.Int32x4, "");

-

-print("Test2");;

-inputLength = initF32(buffer); 

-var ret = m.store1(SIMDStore2);//Lane 1,2 store

-equalSimd([5, -12, 1101004800, 1106247680], ret, SIMD.Int32x4, "");

-

-print("Test3");

-inputLength = initF32(buffer); 

-var ret = m.store1(SIMDStore3);//Lane 1,2,3 store

-equalSimd([5, -12, 0, 1106247680], ret, SIMD.Int32x4, "");

-

-print("Test4");

-inputLength = initF32(buffer); 

-//Should change the buffer to  0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3...15,15,15,15,0,0,0,0...

-var ret = m.store1(SIMDStore);//Generic Store

-equalSimd([5, -12, 0, 2220], ret, SIMD.Int32x4, "");

-

-print("Test5");

-inputLength = initF32(buffer);  

-var ret = m.store2(SIMDStore);//Generic store 

-equalSimd([2, 2, 2, 2], ret, SIMD.Int32x4, "");

-

-print("Test6");

-inputLength = initF32(buffer); 

-var ret = m.store3(SIMDStore);//Generic store

-equalSimd([2, 2, 2, 2], ret, SIMD.Int32x4, "");

-

-print("Test7");

-inputLength = initF32(buffer); 

-var ret = m.store1Int8(inputLength);//Int8Heap store

-equalSimd([1101004800, 1106247680, 1109393408, 1112014848], ret, SIMD.Int32x4, "");

-

-print("Test8");

-inputLength = initF32(buffer); 

-var ret = m.store1Uint8(inputLength);//Uint8Heap store

-equalSimd([1101004800, 1106247680, 1109393408, 1112014848], ret, SIMD.Int32x4, "");

-

-print("Test9");

-inputLength = initF32(buffer); 

-var ret = m.store1Int16(inputLength);//Int16Heap store

-equalSimd([1101004800, 1106247680, 1109393408, 1112014848], ret, SIMD.Int32x4, "");

-

-print("Test10");

-inputLength = initF32(buffer); 

-var ret = m.store1Uint16(inputLength);//Uint16Heap store

-equalSimd([1101004800, 1106247680, 1109393408, 1112014848], ret, SIMD.Int32x4, "");

-

-print("Test12");

-inputLength = initF32(buffer); 

-var ret = m.store1Int32(inputLength);//Int32Heap store

-equalSimd([1101004800, 1106247680, 1109393408, 1112014848], ret, SIMD.Int32x4, "");

-

-print("Test13");

-inputLength = initF32(buffer); 

-var ret = m.store1Uint32(inputLength);//Uint32Heap store

-equalSimd([1101004800, 1106247680, 1109393408, 1112014848], ret, SIMD.Int32x4, "");

-

-print("Test14");

-inputLength = initF32(buffer); 

-var ret = m.loadStoreIndex1();//Uint32Heap store

-equalSimd([-1, -2, 3, -4], ret, SIMD.Int32x4, "");

-

-

-print("Loads");

-print("Test1");

-var ret = m.load1(SIMDLoad1);

-equalSimd([1126170624, 0, 0, 0], ret, SIMD.Int32x4, "");

-

-print("Test2");

-var ret = m.load1(SIMDLoad2);

-equalSimd([1126170624, 1126825984, 0, 0], ret, SIMD.Int32x4, "");

-

-print("Test3");

-var ret = m.load1(SIMDLoad3);

-equalSimd([1126170624, 1126825984, 1127481344, 0], ret, SIMD.Int32x4, "");

-

-print("Test4");

-var ret = m.load1(SIMDLoad);

-equalSimd([1126170624, 1126825984, 1127481344, 1128136704], ret, SIMD.Int32x4, "");

-

-print("Test5");

-var ret = m.load2(SIMDLoad);

-equalSimd([1126170624, 1126825984, 1127481344, 1128136704], ret, SIMD.Int32x4, "");

-

-print("Test6");

-var ret = m.load3(SIMDLoad);

-equalSimd([1126170624, 1126825984, 1127481344, 1128136704], ret, SIMD.Int32x4, "");

-

-print("Test7");

-var ret = m.load1Int8(inputLength); //Int8Heap load

-equalSimd([1285554171, 1285554172, 1285554174, 1285554175], ret, SIMD.Int32x4, "");

-

-print("Test8");

-var ret = m.load1Uint8(inputLength); //Int8Heap load

-equalSimd([1285554171, 1285554172, 1285554174, 1285554175], ret, SIMD.Int32x4, "");

-

-print("Test9");

-var ret = m.load1Int16(inputLength); //Int16Heap load

-equalSimd([1285554171, 1285554172, 1285554174, 1285554175], ret, SIMD.Int32x4, "");

-

-print("Test10");

-var ret = m.load1Uint16(inputLength); //Int16Heap load

-equalSimd([1285554171, 1285554172, 1285554174, 1285554175], ret, SIMD.Int32x4, "");

-

-print("Test11");

-var ret = m.load1Int32(inputLength); //Int32Heap load

-equalSimd([1285554171, 1285554172, 1285554174, 1285554175], ret, SIMD.Int32x4, "");

-

-print("Test12");

-var ret = m.load1Uint32(inputLength); //Int32Heap load

-equalSimd([1285554171, 1285554172, 1285554174, 1285554175], ret, SIMD.Int32x4, "");

-

-print("BoundCheck");

-var value = SIMD.Int32x4(9.9,1.2,3.4,5.6);

-

-print("Test1");

-try {m.storeF32(value, inputLength); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test2");

-try {m.loadF32(inputLength); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test3");

-try {m.storeF32(value, inputLength-1); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test4");

-try {m.loadF32(inputLength-1); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test5");

-try {m.storeF32(value, inputLength-4);print("Correct");} catch(err) {print("Wrong");}

-

-print("Test6");

-try {var v = m.loadF32(inputLength-4);print("Correct");} catch(err) {print("Wrong");}

-

-print("Test7");

-try {m.storeUI32(value, inputLength+1);print("Wrong");} catch(err) {print("Correct");}

-

-print("Test8");

-try { m.loadUI32(inputLength+1); print("Wrong"); } catch(err) { print("Correct"); }

-

-print("Test9");

-try {m.storeI32(value, inputLength+1); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test10");

-try {m.loadI32(inputLength+1);print("Wrong");} catch(err) {print("Correct");}

-

-print("Test11");

-try{

-    m.storeI16(value, inputLength*2-8);

-    print("Correct");

-    m.storeUI16(value, inputLength*2-8);

-    print("Correct");

-    m.storeI8(value, inputLength*4-16);

-    print("Correct");

-    m.storeUI8(value, inputLength*4-16);

-    print("Correct");

-    m.loadI16(inputLength*2-8);

-    print("Correct");

-    m.loadUI16(inputLength*2-8);

-    print("Correct");

-    m.loadI8(inputLength*4-16);

-    print("Correct");

-    m.loadUI8(inputLength*4-16);

-    print("Correct");

-} catch(err){ print("Wrong"); }

-

-print("Test12");

-try {m.storeUI16(value, inputLength*2);print("Wrong");} catch(err) {print("Correct");}

-

-print("Test13");

-try {m.loadUI16(inputLength*2-7); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test14");

-try {m.storeI16(value, inputLength*2-7); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test15");

-try {m.loadI16(inputLength*2-7); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test16");

-try {m.storeUI8(value, inputLength*4-15); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test17");

-try {m.loadUI8(inputLength*4-15); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test18");

-try {m.storeI8(value, inputLength*4-15); print("Wrong");} catch(err) {print("Correct");}

-

-print("Test19");

-try {m.loadI8(inputLength*4+15); print("Wrong");} catch(err) {print("Correct");}

-print("PASS");
\ No newline at end of file
diff --git a/test/SIMD.int32x4.asmjs/testResizeLoadStore.js b/test/SIMD.int32x4.asmjs/testResizeLoadStore.js
deleted file mode 100644
index fa6d9ff..0000000
--- a/test/SIMD.int32x4.asmjs/testResizeLoadStore.js
+++ /dev/null
@@ -1,60 +0,0 @@
-//-------------------------------------------------------------------------------------------------------

-// Copyright (C) Microsoft Corporation and contributors. All rights reserved.

-// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.

-//-------------------------------------------------------------------------------------------------------

-

-this.WScript.LoadScriptFile("..\\UnitTestFramework\\SimdJsHelpers.js");

-var m = function(stdlib,imports,buffer){

-    "use asm";

-    //var F32=stdlib.Int32Array; 

-    var F32=stdlib.Float32Array; 

-    var I32=stdlib.Int32Array; 

-    var f32=new F32(buffer);

-    var i32=new I32(buffer);

-    var len=stdlib.byteLength;

-    var i4 = stdlib.SIMD.Int32x4;

-    var i4load = i4.load;

-    var i4store = i4.store;

-    var i4check = i4.check; 

-    function ch(newBuffer) 

-    { 

-        if(len(newBuffer) & 0xffffff || len(newBuffer) <= 0xffffff || len(newBuffer) > 0x80000000) 

-            return false; 

-        f32=new F32(newBuffer);

-        i32=new I32(newBuffer);

-        buffer=newBuffer; 

-        return true 

-    }

-    function store(value, loc) { value=i4check(value); loc = loc|0; loc = loc<<2; i4store(i32, loc>>2, value);  }

-    function load(loc) {loc = loc|0; loc = loc<<2; return i4load(i32, loc>>2);  }

-    

-    return { load:load

-            ,store:store

-            ,changeHeap:ch}

-    };

-var buf1 = new ArrayBuffer(0x1000000);

-var f32 = new Float32Array(buf1);

-var i32 = new Int32Array(buf1);

-

-this['byteLength'] =

-  Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, 'byteLength').get);

-var o = m(this,{},buf1);

-

-o.store(SIMD.Int32x4(-5,6,17,8000),4);

-var ret = o.load(4);

-equalSimd([-5, 6, 17, 8000],ret, SIMD.Int32x4, "");

-

-o.store(SIMD.Int32x4(-5,6,17,8000), i32.length-4);

-var ret = o.load(i32.length-4);

-equalSimd([-5, 6, 17, 8000],ret, SIMD.Int32x4, "");

-try {o.store(SIMD.Int32x4(11, 304, -22239, 34010), f32.length); print("Wrong")} catch(err) { }

-

-var buf2 = new ArrayBuffer(0x2000000);

-o.changeHeap(buf2);

-

-// heap doubled, no OOB

-o.store(SIMD.Int32x4(511, 304, -22239, 34010), i32.length);

-var ret = o.load(i32.length);

-equalSimd([511, 304, -22239, 34010],ret, SIMD.Int32x4, "");

-o.store(SIMD.Int32x4(511, 304, -22239, 34010), i32.length * 2 - 4);

-print("PASS");

diff --git a/test/SIMD.int32x4/rlexe.xml b/test/SIMD.int32x4/rlexe.xml
index 959e57f..703bfe7 100644
--- a/test/SIMD.int32x4/rlexe.xml
+++ b/test/SIMD.int32x4/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
@@ -37,7 +37,6 @@
     </default>
   </test>
 
-
   <test>
     <default>
       <files>testAndOrXor.js</files>
@@ -253,24 +252,6 @@
       <compile-flags>-Simdjs</compile-flags>
     </default>
   </test>
-  <!-->
-  <test>
-    <default>
-      <files>testShuffle.js</files>
-      <baseline>testShuffle.baseline</baseline>
-      <compile-flags>-bgjit- -simdjs -simd128typespec -off:simplejit -mic:1 -lic:1</compile-flags>
-    </default>
-  </test>
-  <test>
-    <default>
-      <files>testShuffle.js</files>
-      <baseline>testShuffle.baseline</baseline>
-      <compile-flags>-bgjit- -simdjs -simd128typespec -off:simplejit -mic:1 -lic:1</compile-flags>
-    </default>
-  </test>
--->
-
-
   <test>
     <default>
       <files>testWithLane.js</files>
@@ -292,7 +273,7 @@
       <compile-flags>-bgjit- -simdjs -simd128typespec -off:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
-  
+
   <test>
     <default>
       <files>testStore.js</files>
diff --git a/test/SIMD.int8x16.asmjs/rlexe.xml b/test/SIMD.int8x16.asmjs/rlexe.xml
index d482e1a..ef2be63 100644
--- a/test/SIMD.int8x16.asmjs/rlexe.xml
+++ b/test/SIMD.int8x16.asmjs/rlexe.xml
@@ -4,7 +4,7 @@
     <default>
       <files>testCalls.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -12,7 +12,7 @@
     <default>
       <files>testCalls.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -20,7 +20,7 @@
     <default>
       <files>testCalls.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
@@ -28,14 +28,14 @@
   <test>
     <default>
       <files>testCalls.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testCalls.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -43,7 +43,7 @@
     <default>
       <files>testComparison.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -51,7 +51,7 @@
     <default>
       <files>testComparison.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -59,21 +59,21 @@
     <default>
       <files>testComparison.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testComparison.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testComparison.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -82,7 +82,7 @@
     <default>
       <files>testConversion.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -90,7 +90,7 @@
     <default>
       <files>testConversion.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -98,21 +98,21 @@
     <default>
       <files>testConversion.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConversion.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConversion.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -120,7 +120,7 @@
       <default>
           <files>testMisc.js</files>
           <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError</compile-flags>
       </default>
   </test>
@@ -128,7 +128,7 @@
       <default>
       <files>testMisc.js</files>
       <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-bgjit- -on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError -lic:1</compile-flags>
       </default>
   </test>
@@ -137,7 +137,7 @@
       <default>
       <files>testMisc.js</files>
       <baseline>asmjs.baseline</baseline>
-          <tags>exclude_dynapogo,exclude_ship</tags>
+          <tags>exclude_dynapogo</tags>
           <compile-flags>-on:asmjs -simdjs -testtrace:asmjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
       </default>
   </test>
@@ -145,14 +145,14 @@
   <test>
       <default>
       <files>testMisc.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
       </default>
   </test>
   <test>
       <default>
       <files>testMisc.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
       </default>
   </test>
@@ -161,7 +161,7 @@
     <default>
       <files>testAddSub.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -169,7 +169,7 @@
     <default>
       <files>testAddSub.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -177,21 +177,21 @@
     <default>
       <files>testAddSub.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testAddSub.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testAddSub.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -200,7 +200,7 @@
     <default>
       <files>testAddSubSaturate.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -208,7 +208,7 @@
     <default>
       <files>testAddSubSaturate.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -216,21 +216,21 @@
     <default>
       <files>testAddSubSaturate.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testAddSubSaturate.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testAddSubSaturate.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -239,7 +239,7 @@
     <default>
       <files>testBitwise.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -247,7 +247,7 @@
     <default>
       <files>testBitwise.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -255,21 +255,21 @@
     <default>
       <files>testBitwise.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testBitwise.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testBitwise.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -278,7 +278,7 @@
     <default>
       <files>testComparisonSelect.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -286,7 +286,7 @@
     <default>
       <files>testComparisonSelect.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -294,21 +294,21 @@
     <default>
       <files>testComparisonSelect.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testComparisonSelect.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testComparisonSelect.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -317,7 +317,7 @@
     <default>
       <files>testConstructorLanes.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -325,7 +325,7 @@
     <default>
       <files>testConstructorLanes.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -333,21 +333,21 @@
     <default>
       <files>testConstructorLanes.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConstructorLanes.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConstructorLanes.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -356,7 +356,7 @@
     <default>
       <files>testConversion-2.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -364,7 +364,7 @@
     <default>
       <files>testConversion-2.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -372,21 +372,21 @@
     <default>
       <files>testConversion-2.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConversion-2.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConversion-2.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -395,7 +395,7 @@
     <default>
       <files>testLoadStore.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -403,7 +403,7 @@
     <default>
       <files>testLoadStore.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -411,21 +411,21 @@
     <default>
       <files>testLoadStore.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testLoadStore.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testLoadStore.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -434,7 +434,7 @@
     <default>
       <files>testMul.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -442,7 +442,7 @@
     <default>
       <files>testMul.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -450,21 +450,21 @@
     <default>
       <files>testMul.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testMul.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testMul.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -473,7 +473,7 @@
     <default>
       <files>testNeg.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -481,7 +481,7 @@
     <default>
       <files>testNeg.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -489,21 +489,21 @@
     <default>
       <files>testNeg.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testNeg.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testNeg.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -512,7 +512,7 @@
     <default>
       <files>testShift.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -520,7 +520,7 @@
     <default>
       <files>testShift.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -528,21 +528,21 @@
     <default>
       <files>testShift.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testShift.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testShift.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -551,7 +551,7 @@
     <default>
       <files>testShuffle.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -559,7 +559,7 @@
     <default>
       <files>testShuffle.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -567,21 +567,21 @@
     <default>
       <files>testShuffle.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testShuffle.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testShuffle.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -590,7 +590,7 @@
     <default>
       <files>testSplat.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -598,7 +598,7 @@
     <default>
       <files>testSplat.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -606,21 +606,21 @@
     <default>
       <files>testSplat.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testSplat.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testSplat.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -629,7 +629,7 @@
       <default>
       <files>testSwizzle.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
       </default>
   </test>
@@ -637,7 +637,7 @@
   <default>
       <files>testSwizzle.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
   </default>
   </test>
@@ -645,21 +645,21 @@
   <default>
       <files>testSwizzle.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
   </default>
   </test>
   <test>
   <default>
       <files>testSwizzle.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
   </default>
   </test>
   <test>
   <default>
       <files>testSwizzle.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
   </default>
   </test>
diff --git a/test/SIMD.int8x16/rlexe.xml b/test/SIMD.int8x16/rlexe.xml
index 7ac03e1..926323d 100644
--- a/test/SIMD.int8x16/rlexe.xml
+++ b/test/SIMD.int8x16/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
diff --git a/test/SIMD.uint16x8.asmjs/rlexe.xml b/test/SIMD.uint16x8.asmjs/rlexe.xml
index 5be74c6..aeabf46 100644
--- a/test/SIMD.uint16x8.asmjs/rlexe.xml
+++ b/test/SIMD.uint16x8.asmjs/rlexe.xml
@@ -4,7 +4,7 @@
     <default>
       <files>testCalls.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -12,7 +12,7 @@
     <default>
       <files>testCalls.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -20,7 +20,7 @@
     <default>
       <files>testCalls.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
@@ -28,14 +28,14 @@
   <test>
     <default>
       <files>testCalls.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testCalls.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -43,7 +43,7 @@
     <default>
       <files>testFail.js</files>
       <baseline>testFail.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-off:deferparse -testtrace:asmjs -simdjs -bgjit- -maic:1</compile-flags>
     </default>
   </test>
@@ -51,7 +51,7 @@
     <default>
       <files>testFail_1.js</files>
       <baseline>testFail_1.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-off:deferparse -testtrace:asmjs -simdjs -bgjit- -maic:1</compile-flags>
     </default>
   </test>
@@ -59,7 +59,7 @@
     <default>
       <files>testComparison.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -67,7 +67,7 @@
     <default>
       <files>testComparison.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -75,21 +75,21 @@
     <default>
       <files>testComparison.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testComparison.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testComparison.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -98,7 +98,7 @@
     <default>
       <files>testConversion.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -106,7 +106,7 @@
     <default>
       <files>testConversion.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -114,21 +114,21 @@
     <default>
       <files>testConversion.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConversion.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConversion.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -137,7 +137,7 @@
     <default>
       <files>testAddSub.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -145,7 +145,7 @@
     <default>
       <files>testAddSub.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -153,21 +153,21 @@
     <default>
       <files>testAddSub.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testAddSub.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testAddSub.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -176,7 +176,7 @@
     <default>
       <files>testAddSubSaturate.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -184,7 +184,7 @@
     <default>
       <files>testAddSubSaturate.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -192,21 +192,21 @@
     <default>
       <files>testAddSubSaturate.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testAddSubSaturate.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testAddSubSaturate.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -215,7 +215,7 @@
     <default>
       <files>testBitwise.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -223,7 +223,7 @@
     <default>
       <files>testBitwise.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -231,21 +231,21 @@
     <default>
       <files>testBitwise.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testBitwise.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testBitwise.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -254,7 +254,7 @@
     <default>
       <files>testComparisonSelect.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -262,7 +262,7 @@
     <default>
       <files>testComparisonSelect.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -270,21 +270,21 @@
     <default>
       <files>testComparisonSelect.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testComparisonSelect.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testComparisonSelect.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -293,7 +293,7 @@
     <default>
       <files>testConstructorLanes.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -301,7 +301,7 @@
     <default>
       <files>testConstructorLanes.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -309,21 +309,21 @@
     <default>
       <files>testConstructorLanes.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConstructorLanes.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConstructorLanes.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -332,7 +332,7 @@
     <default>
       <files>testConversion-2.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -340,7 +340,7 @@
     <default>
       <files>testConversion-2.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -348,21 +348,21 @@
     <default>
       <files>testConversion-2.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConversion-2.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConversion-2.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -371,7 +371,7 @@
     <default>
       <files>testLoadStore.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -379,7 +379,7 @@
     <default>
       <files>testLoadStore.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -387,21 +387,21 @@
     <default>
       <files>testLoadStore.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testLoadStore.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testLoadStore.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -410,7 +410,7 @@
     <default>
       <files>testMul.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -418,7 +418,7 @@
     <default>
       <files>testMul.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -426,21 +426,21 @@
     <default>
       <files>testMul.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testMul.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testMul.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -449,7 +449,7 @@
     <default>
       <files>testShift.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -457,7 +457,7 @@
     <default>
       <files>testShift.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -465,21 +465,21 @@
     <default>
       <files>testShift.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testShift.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testShift.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -488,7 +488,7 @@
     <default>
       <files>testShuffle.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -496,7 +496,7 @@
     <default>
       <files>testShuffle.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -504,21 +504,21 @@
     <default>
       <files>testShuffle.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testShuffle.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testShuffle.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -527,7 +527,7 @@
     <default>
       <files>testSplat.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -535,7 +535,7 @@
     <default>
       <files>testSplat.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -543,21 +543,21 @@
     <default>
       <files>testSplat.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testSplat.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testSplat.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -566,7 +566,7 @@
       <default>
       <files>testSwizzle.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
       </default>
   </test>
@@ -574,7 +574,7 @@
   <default>
       <files>testSwizzle.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
   </default>
   </test>
@@ -582,21 +582,21 @@
   <default>
       <files>testSwizzle.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
   </default>
   </test>
   <test>
   <default>
       <files>testSwizzle.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
   </default>
   </test>
   <test>
   <default>
       <files>testSwizzle.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
   </default>
   </test>
@@ -604,7 +604,7 @@
      <default>
         <files>testBug1.js</files>
         <baseline>testBug1.baseline</baseline>
-        <tags>exclude_dynapogo,exclude_ship</tags>
+        <tags>exclude_dynapogo</tags>
         <compile-flags>-off:deferparse -testtrace:asmjs -simdjs -bgjit- -maic:1</compile-flags>
      </default>
    </test>
diff --git a/test/SIMD.uint32x4.asmjs/rlexe.xml b/test/SIMD.uint32x4.asmjs/rlexe.xml
index bdba7a8..0f672f5 100644
--- a/test/SIMD.uint32x4.asmjs/rlexe.xml
+++ b/test/SIMD.uint32x4.asmjs/rlexe.xml
@@ -4,7 +4,7 @@
     <default>
       <files>testCalls.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -12,7 +12,7 @@
     <default>
       <files>testCalls.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -20,7 +20,7 @@
     <default>
       <files>testCalls.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
@@ -28,14 +28,14 @@
   <test>
     <default>
       <files>testCalls.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testCalls.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -43,7 +43,7 @@
     <default>
       <files>testComparison.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -51,7 +51,7 @@
     <default>
       <files>testFail.js</files>
       <baseline>testFail.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-off:deferparse -testtrace:asmjs -simdjs -bgjit- -maic:1</compile-flags>
     </default>
   </test>
@@ -59,7 +59,7 @@
      <default>
         <files>testBug1.js</files>
         <baseline>testBug1.baseline</baseline>
-        <tags>exclude_dynapogo,exclude_ship</tags>
+        <tags>exclude_dynapogo</tags>
         <compile-flags>-off:deferparse -testtrace:asmjs -simdjs -bgjit- -maic:1</compile-flags>
      </default>
    </test>
@@ -67,7 +67,7 @@
     <default>
       <files>testFail_1.js</files>
       <baseline>testFail_1.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-off:deferparse -testtrace:asmjs -simdjs -bgjit- -maic:1</compile-flags>
     </default>
   </test>
@@ -75,7 +75,7 @@
     <default>
       <files>testComparison.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -83,21 +83,21 @@
     <default>
       <files>testComparison.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testComparison.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testComparison.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -105,7 +105,7 @@
     <default>
       <files>testConversion.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -113,7 +113,7 @@
     <default>
       <files>testConversion.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -121,21 +121,21 @@
     <default>
       <files>testConversion.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConversion.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConversion.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -144,7 +144,7 @@
     <default>
       <files>testAddSub.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -152,7 +152,7 @@
     <default>
       <files>testAddSub.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -160,21 +160,21 @@
     <default>
       <files>testAddSub.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testAddSub.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testAddSub.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -183,7 +183,7 @@
     <default>
       <files>testBitwise.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -191,7 +191,7 @@
     <default>
       <files>testBitwise.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -199,21 +199,21 @@
     <default>
       <files>testBitwise.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testBitwise.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testBitwise.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -222,7 +222,7 @@
     <default>
       <files>testComparisonSelect.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -230,7 +230,7 @@
     <default>
       <files>testComparisonSelect.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -238,21 +238,21 @@
     <default>
       <files>testComparisonSelect.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testComparisonSelect.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testComparisonSelect.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -261,7 +261,7 @@
     <default>
       <files>testConstructorLanes.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -269,7 +269,7 @@
     <default>
       <files>testConstructorLanes.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -277,21 +277,21 @@
     <default>
       <files>testConstructorLanes.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConstructorLanes.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConstructorLanes.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -300,7 +300,7 @@
     <default>
       <files>testConversion-2.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -308,7 +308,7 @@
     <default>
       <files>testConversion-2.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -316,21 +316,21 @@
     <default>
       <files>testConversion-2.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConversion-2.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConversion-2.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -339,7 +339,7 @@
     <default>
       <files>testLoadStore.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -347,7 +347,7 @@
     <default>
       <files>testLoadStore.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -355,21 +355,21 @@
     <default>
       <files>testLoadStore.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testLoadStore.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testLoadStore.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -378,7 +378,7 @@
     <default>
       <files>testMul.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -386,7 +386,7 @@
     <default>
       <files>testMul.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -394,21 +394,21 @@
     <default>
       <files>testMul.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testMul.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testMul.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -417,7 +417,7 @@
     <default>
       <files>testShift.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -425,7 +425,7 @@
     <default>
       <files>testShift.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -433,21 +433,21 @@
     <default>
       <files>testShift.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testShift.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testShift.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -456,7 +456,7 @@
     <default>
       <files>testShuffle.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -464,7 +464,7 @@
     <default>
       <files>testShuffle.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -472,21 +472,21 @@
     <default>
       <files>testShuffle.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testShuffle.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testShuffle.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -495,7 +495,7 @@
     <default>
       <files>testSplat.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -503,7 +503,7 @@
     <default>
       <files>testSplat.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -511,21 +511,21 @@
     <default>
       <files>testSplat.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testSplat.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testSplat.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -534,7 +534,7 @@
       <default>
       <files>testSwizzle.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
       </default>
   </test>
@@ -542,7 +542,7 @@
   <default>
       <files>testSwizzle.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
   </default>
   </test>
@@ -550,21 +550,21 @@
   <default>
       <files>testSwizzle.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
   </default>
   </test>
   <test>
   <default>
       <files>testSwizzle.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
   </default>
   </test>
   <test>
   <default>
       <files>testSwizzle.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
   </default>
   </test>
diff --git a/test/SIMD.uint8x16.asmjs/rlexe.xml b/test/SIMD.uint8x16.asmjs/rlexe.xml
index 2268426..821eafc 100644
--- a/test/SIMD.uint8x16.asmjs/rlexe.xml
+++ b/test/SIMD.uint8x16.asmjs/rlexe.xml
@@ -4,7 +4,7 @@
     <default>
       <files>testCalls.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -12,7 +12,7 @@
     <default>
       <files>testCalls.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -20,7 +20,7 @@
     <default>
       <files>testCalls.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
@@ -28,7 +28,7 @@
     <default>
       <files>testFail.js</files>
       <baseline>testFail.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-off:deferparse -testtrace:asmjs -simdjs -bgjit- -maic:1</compile-flags>
     </default>
   </test>
@@ -36,7 +36,7 @@
     <default>
       <files>testFail_1.js</files>
       <baseline>testFail_1.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-off:deferparse -testtrace:asmjs -simdjs -bgjit- -maic:1</compile-flags>
     </default>
   </test>
@@ -44,21 +44,21 @@
      <default>
         <files>testBug1.js</files>
         <baseline>testBug1.baseline</baseline>
-        <tags>exclude_dynapogo,exclude_ship</tags>
+        <tags>exclude_dynapogo</tags>
         <compile-flags>-off:deferparse -testtrace:asmjs -simdjs -bgjit- -maic:1</compile-flags>
      </default>
    </test>
   <test>
     <default>
       <files>testCalls.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testCalls.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -66,7 +66,7 @@
     <default>
       <files>testComparison.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -74,7 +74,7 @@
     <default>
       <files>testComparison.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -82,21 +82,21 @@
     <default>
       <files>testComparison.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testComparison.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testComparison.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -104,7 +104,7 @@
     <default>
       <files>testConversion.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -112,7 +112,7 @@
     <default>
       <files>testConversion.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -120,21 +120,21 @@
     <default>
       <files>testConversion.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConversion.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConversion.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -143,7 +143,7 @@
     <default>
       <files>testAddSub.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -151,7 +151,7 @@
     <default>
       <files>testAddSub.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -159,21 +159,21 @@
     <default>
       <files>testAddSub.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testAddSub.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testAddSub.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -182,7 +182,7 @@
     <default>
       <files>testAddSubSaturate.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -190,7 +190,7 @@
     <default>
       <files>testAddSubSaturate.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -198,21 +198,21 @@
     <default>
       <files>testAddSubSaturate.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testAddSubSaturate.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testAddSubSaturate.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -221,7 +221,7 @@
     <default>
       <files>testBitwise.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -229,7 +229,7 @@
     <default>
       <files>testBitwise.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -237,21 +237,21 @@
     <default>
       <files>testBitwise.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testBitwise.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testBitwise.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -260,7 +260,7 @@
     <default>
       <files>testComparisonSelect.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -268,7 +268,7 @@
     <default>
       <files>testComparisonSelect.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -276,21 +276,21 @@
     <default>
       <files>testComparisonSelect.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testComparisonSelect.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testComparisonSelect.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -299,7 +299,7 @@
     <default>
       <files>testConstructorLanes.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -307,7 +307,7 @@
     <default>
       <files>testConstructorLanes.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -315,21 +315,21 @@
     <default>
       <files>testConstructorLanes.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConstructorLanes.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConstructorLanes.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -338,7 +338,7 @@
     <default>
       <files>testConversion-2.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -346,7 +346,7 @@
     <default>
       <files>testConversion-2.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -354,21 +354,21 @@
     <default>
       <files>testConversion-2.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConversion-2.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testConversion-2.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -377,7 +377,7 @@
     <default>
       <files>testLoadStore.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -385,7 +385,7 @@
     <default>
       <files>testLoadStore.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -393,21 +393,21 @@
     <default>
       <files>testLoadStore.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testLoadStore.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testLoadStore.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -416,7 +416,7 @@
     <default>
       <files>testMul.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -424,7 +424,7 @@
     <default>
       <files>testMul.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -432,21 +432,21 @@
     <default>
       <files>testMul.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testMul.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testMul.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -455,7 +455,7 @@
     <default>
       <files>testShift.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -463,7 +463,7 @@
     <default>
       <files>testShift.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -471,21 +471,21 @@
     <default>
       <files>testShift.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testShift.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testShift.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -494,7 +494,7 @@
     <default>
       <files>testShuffle.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -502,7 +502,7 @@
     <default>
       <files>testShuffle.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -510,21 +510,21 @@
     <default>
       <files>testShuffle.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testShuffle.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testShuffle.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -533,7 +533,7 @@
     <default>
       <files>testSplat.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -541,7 +541,7 @@
     <default>
       <files>testSplat.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -549,21 +549,21 @@
     <default>
       <files>testSplat.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testSplat.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testSplat.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
     </default>
   </test>
@@ -572,7 +572,7 @@
       <default>
       <files>testSwizzle.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
       </default>
   </test>
@@ -580,7 +580,7 @@
   <default>
       <files>testSwizzle.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
   </default>
   </test>
@@ -588,21 +588,21 @@
   <default>
       <files>testSwizzle.js</files>
       <baseline>asmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:AsmJsInterpreter -off:fulljit -off:backend</compile-flags>
   </default>
   </test>
   <test>
   <default>
       <files>testSwizzle.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -on:simplejit -mic:1</compile-flags>
   </default>
   </test>
   <test>
   <default>
       <files>testSwizzle.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -simd128typespec -asmjs- -off:simplejit -mic:1</compile-flags>
   </default>
   </test>
diff --git a/test/SIMD.workloads.asmjs/rlexe.xml b/test/SIMD.workloads.asmjs/rlexe.xml
index c2fa517..405b37e 100644
--- a/test/SIMD.workloads.asmjs/rlexe.xml
+++ b/test/SIMD.workloads.asmjs/rlexe.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
       <files>testReverseHeap.js</files>
       <baseline>testReverseHeap.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -12,7 +12,7 @@
     <default>
       <files>testReverseHeap.js</files>
       <baseline>testReverseHeap.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -20,21 +20,21 @@
     <default>
       <files>testReverseHeap.js</files>
       <baseline>testReverseHeap.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:asmjs -testtrace:asmjsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testReverseHeap.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testReverseHeap.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
@@ -44,7 +44,7 @@
       <files>testMerge.js</files>
       <baseline>testMerge.baseline</baseline>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -52,28 +52,28 @@
       <files>testMerge.js</files>
       <baseline>testMerge.baseline</baseline>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
     <default>
       <files>testMerge.js</files>
       <baseline>testMerge.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:asmjs -testtrace:asmjsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testMerge.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testMerge.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
@@ -83,7 +83,7 @@
       <files>testScale.js</files>
       <baseline>testScale.baseline</baseline>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -91,28 +91,28 @@
       <files>testScale.js</files>
       <baseline>testScale.baseline</baseline>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
     <default>
       <files>testScale.js</files>
       <baseline>testScale.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:asmjs -testtrace:asmjsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testScale.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>testScale.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
@@ -120,7 +120,7 @@
     <default>
       <files>testLinearSearch.js</files>
       <baseline>testLinearSearch.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -128,7 +128,7 @@
     <default>
       <files>testLinearSearch.js</files>
       <baseline>testLinearSearch.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -136,7 +136,7 @@
     <default>
       <files>testLinearSearch.js</files>
       <baseline>testLinearSearch.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:asmjs -testtrace:asmjsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
@@ -145,7 +145,7 @@
     <default>
       <files>testLinearSearch.js</files>
       <baseline>testLinearSearch-noAsmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
@@ -153,7 +153,7 @@
     <default>
       <files>testLinearSearch.js</files>
       <baseline>testLinearSearch-noAsmjs.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
@@ -161,7 +161,7 @@
     <default>
       <files>test2DMatrixAddition.js</files>
       <baseline>test2DMatrixAddition.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -169,7 +169,7 @@
     <default>
       <files>test2DMatrixAddition.js</files>
       <baseline>test2DMatrixAddition.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -177,21 +177,21 @@
     <default>
       <files>test2DMatrixAddition.js</files>
       <baseline>test2DMatrixAddition.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:asmjs -testtrace:asmjsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>test2DMatrixAddition.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>test2DMatrixAddition.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
@@ -200,7 +200,7 @@
     <default>
       <files>test2DMatrixSubtraction.js</files>
       <baseline>test2DMatrixSubtraction.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -208,7 +208,7 @@
     <default>
       <files>test2DMatrixSubtraction.js</files>
       <baseline>test2DMatrixSubtraction.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -216,21 +216,21 @@
     <default>
       <files>test2DMatrixSubtraction.js</files>
       <baseline>test2DMatrixSubtraction.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:asmjs -testtrace:asmjsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>test2DMatrixSubtraction.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>test2DMatrixSubtraction.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
@@ -239,7 +239,7 @@
     <default>
       <files>test2DMatrixMultiplication.js</files>
       <baseline>test2DMatrixMultiplication.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError</compile-flags>
     </default>
   </test>
@@ -247,7 +247,7 @@
     <default>
       <files>test2DMatrixMultiplication.js</files>
       <baseline>test2DMatrixMultiplication.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -lic:1</compile-flags>
     </default>
   </test>
@@ -255,21 +255,21 @@
     <default>
       <files>test2DMatrixMultiplication.js</files>
       <baseline>test2DMatrixMultiplication.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-on:asmjs -testtrace:asmjs -simdjs -AsmJsStopOnError -on:asmjs -testtrace:asmjsInterpreter -off:fulljit -off:backend</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>test2DMatrixMultiplication.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -on:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>test2DMatrixMultiplication.js</files>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
       <compile-flags>-bgjit- -simdjs -asmjs- -simd128typespec  -off:simplejit -mic:1 -lic:1</compile-flags>
     </default>
   </test>
diff --git a/test/SIMD.wrappers/rlexe.xml b/test/SIMD.wrappers/rlexe.xml
index ce6cb7f..f41e54a 100644
--- a/test/SIMD.wrappers/rlexe.xml
+++ b/test/SIMD.wrappers/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
diff --git a/test/StackTrace/ErrorPrototype.baseline b/test/StackTrace/ErrorPrototype.baseline
index e716ee8..0153ddd 100644
--- a/test/StackTrace/ErrorPrototype.baseline
+++ b/test/StackTrace/ErrorPrototype.baseline
@@ -1,66 +1,66 @@
 Prototype is new Error()

 Error: Prototype is new Error()

-	at testErrorStack (errorprototype.js:21:9)

-	at testErrorPrototype (errorprototype.js:34:5)

-	at testErrorPrototypeChain (errorprototype.js:41:5)

-	at runtest (errorprototype.js:46:5)

-	at Global code (errorprototype.js:62:1)

+   at testErrorStack (errorprototype.js:21:9)

+   at testErrorPrototype (errorprototype.js:34:5)

+   at testErrorPrototypeChain (errorprototype.js:41:5)

+   at runtest (errorprototype.js:46:5)

+   at Global code (errorprototype.js:62:1)

 

 Prototype has new Error()

 Error: Prototype has new Error()

-	at testErrorStack (errorprototype.js:21:9)

-	at testErrorPrototype (errorprototype.js:34:5)

-	at testErrorPrototypeChain (errorprototype.js:42:5)

-	at runtest (errorprototype.js:46:5)

-	at Global code (errorprototype.js:62:1)

+   at testErrorStack (errorprototype.js:21:9)

+   at testErrorPrototype (errorprototype.js:34:5)

+   at testErrorPrototypeChain (errorprototype.js:42:5)

+   at runtest (errorprototype.js:46:5)

+   at Global code (errorprototype.js:62:1)

 

 Prototype is Error.prototype

 Error: Prototype is Error.prototype

-	at testErrorStack (errorprototype.js:21:9)

-	at testErrorPrototype (errorprototype.js:34:5)

-	at testErrorPrototypeChain (errorprototype.js:41:5)

-	at runtest (errorprototype.js:47:5)

-	at Global code (errorprototype.js:62:1)

+   at testErrorStack (errorprototype.js:21:9)

+   at testErrorPrototype (errorprototype.js:34:5)

+   at testErrorPrototypeChain (errorprototype.js:41:5)

+   at runtest (errorprototype.js:47:5)

+   at Global code (errorprototype.js:62:1)

 

 Prototype has Error.prototype

 Error: Prototype has Error.prototype

-	at testErrorStack (errorprototype.js:21:9)

-	at testErrorPrototype (errorprototype.js:34:5)

-	at testErrorPrototypeChain (errorprototype.js:42:5)

-	at runtest (errorprototype.js:47:5)

-	at Global code (errorprototype.js:62:1)

+   at testErrorStack (errorprototype.js:21:9)

+   at testErrorPrototype (errorprototype.js:34:5)

+   at testErrorPrototypeChain (errorprototype.js:42:5)

+   at runtest (errorprototype.js:47:5)

+   at Global code (errorprototype.js:62:1)

 

 Prototype is new RangeError()

 RangeError: Prototype is new RangeError()

-	at testErrorStack (errorprototype.js:21:9)

-	at testErrorPrototype (errorprototype.js:34:5)

-	at testErrorPrototypeChain (errorprototype.js:41:5)

-	at runtest (errorprototype.js:48:5)

-	at Global code (errorprototype.js:62:1)

+   at testErrorStack (errorprototype.js:21:9)

+   at testErrorPrototype (errorprototype.js:34:5)

+   at testErrorPrototypeChain (errorprototype.js:41:5)

+   at runtest (errorprototype.js:48:5)

+   at Global code (errorprototype.js:62:1)

 

 Prototype has new RangeError()

 RangeError: Prototype has new RangeError()

-	at testErrorStack (errorprototype.js:21:9)

-	at testErrorPrototype (errorprototype.js:34:5)

-	at testErrorPrototypeChain (errorprototype.js:42:5)

-	at runtest (errorprototype.js:48:5)

-	at Global code (errorprototype.js:62:1)

+   at testErrorStack (errorprototype.js:21:9)

+   at testErrorPrototype (errorprototype.js:34:5)

+   at testErrorPrototypeChain (errorprototype.js:42:5)

+   at runtest (errorprototype.js:48:5)

+   at Global code (errorprototype.js:62:1)

 

 Prototype is RangeError.prototype

 RangeError: Prototype is RangeError.prototype

-	at testErrorStack (errorprototype.js:21:9)

-	at testErrorPrototype (errorprototype.js:34:5)

-	at testErrorPrototypeChain (errorprototype.js:41:5)

-	at runtest (errorprototype.js:49:5)

-	at Global code (errorprototype.js:62:1)

+   at testErrorStack (errorprototype.js:21:9)

+   at testErrorPrototype (errorprototype.js:34:5)

+   at testErrorPrototypeChain (errorprototype.js:41:5)

+   at runtest (errorprototype.js:49:5)

+   at Global code (errorprototype.js:62:1)

 

 Prototype has RangeError.prototype

 RangeError: Prototype has RangeError.prototype

-	at testErrorStack (errorprototype.js:21:9)

-	at testErrorPrototype (errorprototype.js:34:5)

-	at testErrorPrototypeChain (errorprototype.js:42:5)

-	at runtest (errorprototype.js:49:5)

-	at Global code (errorprototype.js:62:1)

+   at testErrorStack (errorprototype.js:21:9)

+   at testErrorPrototype (errorprototype.js:34:5)

+   at testErrorPrototypeChain (errorprototype.js:42:5)

+   at runtest (errorprototype.js:49:5)

+   at Global code (errorprototype.js:62:1)

 

 Prototype is 123

 undefined

diff --git a/test/StackTrace/FunctionName.js.baseline b/test/StackTrace/FunctionName.js.baseline
index be3e4fc..c1ab984 100644
--- a/test/StackTrace/FunctionName.js.baseline
+++ b/test/StackTrace/FunctionName.js.baseline
@@ -1,8 +1,8 @@
 Error: My Error!

-	at foo (functionname.js:24:9)

-	at func (functionname.js:28:9)

-	at Function code (Function code:1:4)

-	at eval code (eval code:1:1)

-	at Anonymous function (functionname.js:35:13)

-	at bar (functionname.js:34:10)

-	at Global code (functionname.js:39:5)

+   at foo (functionname.js:24:9)

+   at func (functionname.js:28:9)

+   at Function code (Function code:1:4)

+   at eval code (eval code:1:1)

+   at Anonymous function (functionname.js:35:13)

+   at bar (functionname.js:34:10)

+   at Global code (functionname.js:39:5)

diff --git a/test/StackTrace/LongCallStackThrow.js.Args30.baseline b/test/StackTrace/LongCallStackThrow.js.Args30.baseline
index 40ce62e..7802a66 100644
--- a/test/StackTrace/LongCallStackThrow.js.Args30.baseline
+++ b/test/StackTrace/LongCallStackThrow.js.Args30.baseline
@@ -1,11 +1,11 @@
 Error: this is my error

-	at throwException (longcallstackthrow.js:34:5)

-	at throwExceptionWithCatch (longcallstackthrow.js:22:9)

-	at Anonymous function (longcallstackthrow.js:45:17)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

+   at throwException (longcallstackthrow.js:34:5)

+   at throwExceptionWithCatch (longcallstackthrow.js:22:9)

+   at Anonymous function (longcallstackthrow.js:45:17)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

diff --git a/test/StackTrace/LongCallStackThrow.js.Args5.baseline b/test/StackTrace/LongCallStackThrow.js.Args5.baseline
index 95af361..93bb692 100644
--- a/test/StackTrace/LongCallStackThrow.js.Args5.baseline
+++ b/test/StackTrace/LongCallStackThrow.js.Args5.baseline
@@ -1,10 +1,10 @@
 Error: this is my error

-	at throwException (longcallstackthrow.js:34:5)

-	at throwExceptionWithCatch (longcallstackthrow.js:22:9)

-	at Anonymous function (longcallstackthrow.js:45:17)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at runtest (longcallstackthrow.js:56:5)

-	at Global code (longcallstackthrow.js:63:9)

+   at throwException (longcallstackthrow.js:34:5)

+   at throwExceptionWithCatch (longcallstackthrow.js:22:9)

+   at Anonymous function (longcallstackthrow.js:45:17)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at runtest (longcallstackthrow.js:56:5)

+   at Global code (longcallstackthrow.js:63:9)

diff --git a/test/StackTrace/LongCallStackThrow.js.Args6.baseline b/test/StackTrace/LongCallStackThrow.js.Args6.baseline
index f159d62..f909033 100644
--- a/test/StackTrace/LongCallStackThrow.js.Args6.baseline
+++ b/test/StackTrace/LongCallStackThrow.js.Args6.baseline
@@ -1,11 +1,11 @@
 Error: this is my error

-	at throwException (longcallstackthrow.js:34:5)

-	at throwExceptionWithCatch (longcallstackthrow.js:22:9)

-	at Anonymous function (longcallstackthrow.js:45:17)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at runtest (longcallstackthrow.js:56:5)

-	at Global code (longcallstackthrow.js:63:9)

+   at throwException (longcallstackthrow.js:34:5)

+   at throwExceptionWithCatch (longcallstackthrow.js:22:9)

+   at Anonymous function (longcallstackthrow.js:45:17)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at runtest (longcallstackthrow.js:56:5)

+   at Global code (longcallstackthrow.js:63:9)

diff --git a/test/StackTrace/LongCallStackThrow.js.Args7.baseline b/test/StackTrace/LongCallStackThrow.js.Args7.baseline
index c924b36..fb77796 100644
--- a/test/StackTrace/LongCallStackThrow.js.Args7.baseline
+++ b/test/StackTrace/LongCallStackThrow.js.Args7.baseline
@@ -1,11 +1,11 @@
 Error: this is my error

-	at throwException (longcallstackthrow.js:34:5)

-	at throwExceptionWithCatch (longcallstackthrow.js:22:9)

-	at Anonymous function (longcallstackthrow.js:45:17)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at runtest (longcallstackthrow.js:56:5)

+   at throwException (longcallstackthrow.js:34:5)

+   at throwExceptionWithCatch (longcallstackthrow.js:22:9)

+   at Anonymous function (longcallstackthrow.js:45:17)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at runtest (longcallstackthrow.js:56:5)

diff --git a/test/StackTrace/PropertyValidation.nostrict.baseline b/test/StackTrace/PropertyValidation.nostrict.baseline
index bbfccda..e72c766 100644
--- a/test/StackTrace/PropertyValidation.nostrict.baseline
+++ b/test/StackTrace/PropertyValidation.nostrict.baseline
@@ -2,10 +2,10 @@
 

 e.number: -2146823279

 e.stack: ReferenceError: 'BadType' is not defined

-	at throwException (propertyvalidation.js:65:9)

-	at bar (propertyvalidation.js:85:5)

-	at foo (propertyvalidation.js:90:5)

-	at Global code (propertyvalidation.js:93:1)

+   at throwException (propertyvalidation.js:65:9)

+   at bar (propertyvalidation.js:85:5)

+   at foo (propertyvalidation.js:90:5)

+   at Global code (propertyvalidation.js:93:1)

 

 

 Deleting e.stack ...

@@ -16,10 +16,10 @@
 

 e.number: -2146823279

 e.stack: ReferenceError: 'BadType' is not defined

-	at throwException (propertyvalidation.js:74:9)

-	at bar (propertyvalidation.js:85:5)

-	at foo (propertyvalidation.js:90:5)

-	at Global code (propertyvalidation.js:93:1)

+   at throwException (propertyvalidation.js:74:9)

+   at bar (propertyvalidation.js:85:5)

+   at foo (propertyvalidation.js:90:5)

+   at Global code (propertyvalidation.js:93:1)

 

 

 Updating e.stack ...

diff --git a/test/StackTrace/SimpleThrow.js.baseline b/test/StackTrace/SimpleThrow.js.baseline
index 925d2a1..d5e0145 100644
--- a/test/StackTrace/SimpleThrow.js.baseline
+++ b/test/StackTrace/SimpleThrow.js.baseline
@@ -1,21 +1,21 @@
 ReferenceError: 'BadType' is not defined

-	at throwException (simplethrow.js:22:9)

-	at bar (simplethrow.js:69:5)

-	at foo (simplethrow.js:76:5)

-	at runtest (simplethrow.js:81:5)

-	at Global code (simplethrow.js:88:9)

+   at throwException (simplethrow.js:22:9)

+   at bar (simplethrow.js:69:5)

+   at foo (simplethrow.js:76:5)

+   at runtest (simplethrow.js:81:5)

+   at Global code (simplethrow.js:88:9)

 

 ReferenceError: 'BadTypeWithFinally' is not defined

-	at throwExceptionWithFinally (simplethrow.js:35:9)

-	at bar (simplethrow.js:70:5)

-	at foo (simplethrow.js:76:5)

-	at runtest (simplethrow.js:81:5)

-	at Global code (simplethrow.js:88:9)

+   at throwExceptionWithFinally (simplethrow.js:35:9)

+   at bar (simplethrow.js:70:5)

+   at foo (simplethrow.js:76:5)

+   at runtest (simplethrow.js:81:5)

+   at Global code (simplethrow.js:88:9)

 

 TypeError: Unable to set property 'nonExistentProperty' of undefined or null reference

-	at StricModeFunction (simplethrow.js:60:5)

-	at throwExceptionLineNumber (simplethrow.js:49:9)

-	at bar (simplethrow.js:71:5)

-	at foo (simplethrow.js:76:5)

-	at runtest (simplethrow.js:81:5)

-	at Global code (simplethrow.js:88:9)

+   at StricModeFunction (simplethrow.js:60:5)

+   at throwExceptionLineNumber (simplethrow.js:49:9)

+   at bar (simplethrow.js:71:5)

+   at foo (simplethrow.js:76:5)

+   at runtest (simplethrow.js:81:5)

+   at Global code (simplethrow.js:88:9)

diff --git a/test/StackTrace/StackTraceLimit.baseline b/test/StackTrace/StackTraceLimit.baseline
index 8d81397..7f340f7 100644
--- a/test/StackTrace/StackTraceLimit.baseline
+++ b/test/StackTrace/StackTraceLimit.baseline
@@ -6,210 +6,210 @@
 

 -- Error.stackTraceLimit: 10

 Error: this is my error

-	at throwException (longcallstackthrow.js:34:5)

-	at throwExceptionWithCatch (longcallstackthrow.js:22:9)

-	at Anonymous function (longcallstackthrow.js:45:17)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

+   at throwException (longcallstackthrow.js:34:5)

+   at throwExceptionWithCatch (longcallstackthrow.js:22:9)

+   at Anonymous function (longcallstackthrow.js:45:17)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

 

 -- Error.stackTraceLimit: 4

 Error: this is my error

-	at throwException (longcallstackthrow.js:34:5)

-	at throwExceptionWithCatch (longcallstackthrow.js:22:9)

-	at Anonymous function (longcallstackthrow.js:45:17)

-	at Anonymous function (longcallstackthrow.js:47:13)

+   at throwException (longcallstackthrow.js:34:5)

+   at throwExceptionWithCatch (longcallstackthrow.js:22:9)

+   at Anonymous function (longcallstackthrow.js:45:17)

+   at Anonymous function (longcallstackthrow.js:47:13)

 

 -- Error.stackTraceLimit: Infinity

 Error: this is my error

-	at throwException (longcallstackthrow.js:34:5)

-	at throwExceptionWithCatch (longcallstackthrow.js:22:9)

-	at Anonymous function (longcallstackthrow.js:45:17)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at runtest (longcallstackthrow.js:56:5)

-	at testLongCallStack (stacktracelimit.js:23:5)

-	at Global code (stacktracelimit.js:29:1)

+   at throwException (longcallstackthrow.js:34:5)

+   at throwExceptionWithCatch (longcallstackthrow.js:22:9)

+   at Anonymous function (longcallstackthrow.js:45:17)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at runtest (longcallstackthrow.js:56:5)

+   at testLongCallStack (stacktracelimit.js:23:5)

+   at Global code (stacktracelimit.js:29:1)

 

 -- Error.stackTraceLimit: 1

 Error: this is my error

-	at throwException (longcallstackthrow.js:34:5)

+   at throwException (longcallstackthrow.js:34:5)

 

 -- Error.stackTraceLimit: 20

 Error: this is my error

-	at throwException (longcallstackthrow.js:34:5)

-	at throwExceptionWithCatch (longcallstackthrow.js:22:9)

-	at Anonymous function (longcallstackthrow.js:45:17)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

+   at throwException (longcallstackthrow.js:34:5)

+   at throwExceptionWithCatch (longcallstackthrow.js:22:9)

+   at Anonymous function (longcallstackthrow.js:45:17)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

 

 -- Error.stackTraceLimit: 5.1

 Error: this is my error

-	at throwException (longcallstackthrow.js:34:5)

-	at throwExceptionWithCatch (longcallstackthrow.js:22:9)

-	at Anonymous function (longcallstackthrow.js:45:17)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

+   at throwException (longcallstackthrow.js:34:5)

+   at throwExceptionWithCatch (longcallstackthrow.js:22:9)

+   at Anonymous function (longcallstackthrow.js:45:17)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

 

 -- Error.stackTraceLimit: -1

 Error: this is my error

-	at throwException (longcallstackthrow.js:34:5)

-	at throwExceptionWithCatch (longcallstackthrow.js:22:9)

-	at Anonymous function (longcallstackthrow.js:45:17)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at runtest (longcallstackthrow.js:56:5)

-	at testLongCallStack (stacktracelimit.js:23:5)

-	at Global code (stacktracelimit.js:33:1)

+   at throwException (longcallstackthrow.js:34:5)

+   at throwExceptionWithCatch (longcallstackthrow.js:22:9)

+   at Anonymous function (longcallstackthrow.js:45:17)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at runtest (longcallstackthrow.js:56:5)

+   at testLongCallStack (stacktracelimit.js:23:5)

+   at Global code (stacktracelimit.js:33:1)

 

 -- Error.stackTraceLimit: -3.2

 Error: this is my error

-	at throwException (longcallstackthrow.js:34:5)

-	at throwExceptionWithCatch (longcallstackthrow.js:22:9)

-	at Anonymous function (longcallstackthrow.js:45:17)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at runtest (longcallstackthrow.js:56:5)

-	at testLongCallStack (stacktracelimit.js:23:5)

-	at Global code (stacktracelimit.js:34:1)

+   at throwException (longcallstackthrow.js:34:5)

+   at throwExceptionWithCatch (longcallstackthrow.js:22:9)

+   at Anonymous function (longcallstackthrow.js:45:17)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at runtest (longcallstackthrow.js:56:5)

+   at testLongCallStack (stacktracelimit.js:23:5)

+   at Global code (stacktracelimit.js:34:1)

 

 -- Error.stackTraceLimit: -Infinity

 Error: this is my error

-	at throwException (longcallstackthrow.js:34:5)

-	at throwExceptionWithCatch (longcallstackthrow.js:22:9)

-	at Anonymous function (longcallstackthrow.js:45:17)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at runtest (longcallstackthrow.js:56:5)

-	at testLongCallStack (stacktracelimit.js:23:5)

-	at Global code (stacktracelimit.js:35:1)

+   at throwException (longcallstackthrow.js:34:5)

+   at throwExceptionWithCatch (longcallstackthrow.js:22:9)

+   at Anonymous function (longcallstackthrow.js:45:17)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at runtest (longcallstackthrow.js:56:5)

+   at testLongCallStack (stacktracelimit.js:23:5)

+   at Global code (stacktracelimit.js:35:1)

 

 -- Error.stackTraceLimit: 0

 Error: this is my error

@@ -235,9 +235,9 @@
 ** Custom stackTraceLimit getter Called, return 3

 ** Custom stackTraceLimit getter Called, return 3

 Error: this is my error

-	at throwException (longcallstackthrow.js:34:5)

-	at throwExceptionWithCatch (longcallstackthrow.js:22:9)

-	at Anonymous function (longcallstackthrow.js:45:17)

+   at throwException (longcallstackthrow.js:34:5)

+   at throwExceptionWithCatch (longcallstackthrow.js:22:9)

+   at Anonymous function (longcallstackthrow.js:45:17)

 

 --Delete it

 -- Error.stackTraceLimit: undefined

@@ -246,17 +246,17 @@
 --Available on prototype

 -- Error.stackTraceLimit: 2

 Error: this is my error

-	at throwException (longcallstackthrow.js:34:5)

-	at throwExceptionWithCatch (longcallstackthrow.js:22:9)

+   at throwException (longcallstackthrow.js:34:5)

+   at throwExceptionWithCatch (longcallstackthrow.js:22:9)

 

 --Set to data property again

 -- Error.stackTraceLimit: 5

 Error: this is my error

-	at throwException (longcallstackthrow.js:34:5)

-	at throwExceptionWithCatch (longcallstackthrow.js:22:9)

-	at Anonymous function (longcallstackthrow.js:45:17)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

+   at throwException (longcallstackthrow.js:34:5)

+   at throwExceptionWithCatch (longcallstackthrow.js:22:9)

+   at Anonymous function (longcallstackthrow.js:45:17)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

 

 --Throw in getter

 ** Custom stackTraceLimit getter Called, throw

@@ -267,45 +267,45 @@
 

 --Throw new Error() in getter for a number of times

 Error: My error in custom stackTraceLimit getter

-	at stackTraceLimit.get (stacktracelimit.js:94:13)

-	at stackTraceLimit.get (stacktracelimit.js:94:13)

-	at stackTraceLimit.get (stacktracelimit.js:94:13)

-	at stackTraceLimit.get (stacktracelimit.js:94:13)

-	at throwException (longcallstackthrow.js:33:5)

-	at throwExceptionWithCatch (longcallstackthrow.js:22:9)

-	at Anonymous function (longcallstackthrow.js:45:17)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at Anonymous function (longcallstackthrow.js:47:13)

-	at runtest (longcallstackthrow.js:56:5)

-	at testLongCallStack (stacktracelimit.js:23:5)

-	at Global code (stacktracelimit.js:101:1)

+   at stackTraceLimit.get (stacktracelimit.js:94:13)

+   at stackTraceLimit.get (stacktracelimit.js:94:13)

+   at stackTraceLimit.get (stacktracelimit.js:94:13)

+   at stackTraceLimit.get (stacktracelimit.js:94:13)

+   at throwException (longcallstackthrow.js:33:5)

+   at throwExceptionWithCatch (longcallstackthrow.js:22:9)

+   at Anonymous function (longcallstackthrow.js:45:17)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at Anonymous function (longcallstackthrow.js:47:13)

+   at runtest (longcallstackthrow.js:56:5)

+   at testLongCallStack (stacktracelimit.js:23:5)

+   at Global code (stacktracelimit.js:101:1)

 

 -- Error.stackTraceLimit: null

 Error: this is my error

diff --git a/test/StackTrace/StackTraceLimitOOS.baseline b/test/StackTrace/StackTraceLimitOOS.baseline
index cf3cfc9..815a965 100644
--- a/test/StackTrace/StackTraceLimitOOS.baseline
+++ b/test/StackTrace/StackTraceLimitOOS.baseline
@@ -1,23 +1,23 @@
 Error.stackTraceLimit: Infinity

 Error: Out of stack space

    ...

-	at bar (stacktracelimitoos.js:82:9)

-	at foo (stacktracelimitoos.js:79:9)

-	at bar (stacktracelimitoos.js:82:9)

-	at foo (stacktracelimitoos.js:79:9)

-	at bar (stacktracelimitoos.js:82:9)

-	at foo (stacktracelimitoos.js:79:9)

-	at bar (stacktracelimitoos.js:82:9)

-	at foo (stacktracelimitoos.js:79:9)

-	at bar (stacktracelimitoos.js:82:9)

-	at foo (stacktracelimitoos.js:79:9)

-	at bar (stacktracelimitoos.js:82:9)

-	at foo (stacktracelimitoos.js:79:9)

-	at bar (stacktracelimitoos.js:82:9)

-	at foo (stacktracelimitoos.js:79:9)

-	at throwException (stacktracelimitoos.js:84:5)

-	at throwExceptionWithCatch (stacktracelimitoos.js:68:9)

-	at runtest (stacktracelimitoos.js:89:5)

-	at capture (stacktracelimitoos.js:42:13)

-	at Global code (stacktracelimitoos.js:98:1)

+   at bar (stacktracelimitoos.js:82:9)

+   at foo (stacktracelimitoos.js:79:9)

+   at bar (stacktracelimitoos.js:82:9)

+   at foo (stacktracelimitoos.js:79:9)

+   at bar (stacktracelimitoos.js:82:9)

+   at foo (stacktracelimitoos.js:79:9)

+   at bar (stacktracelimitoos.js:82:9)

+   at foo (stacktracelimitoos.js:79:9)

+   at bar (stacktracelimitoos.js:82:9)

+   at foo (stacktracelimitoos.js:79:9)

+   at bar (stacktracelimitoos.js:82:9)

+   at foo (stacktracelimitoos.js:79:9)

+   at bar (stacktracelimitoos.js:82:9)

+   at foo (stacktracelimitoos.js:79:9)

+   at throwException (stacktracelimitoos.js:84:5)

+   at throwExceptionWithCatch (stacktracelimitoos.js:68:9)

+   at runtest (stacktracelimitoos.js:89:5)

+   at capture (stacktracelimitoos.js:42:13)

+   at Global code (stacktracelimitoos.js:98:1)

 

diff --git a/test/StackTrace/dynamic.js.baseline b/test/StackTrace/dynamic.js.baseline
index db0cfc5..c8fde32 100644
--- a/test/StackTrace/dynamic.js.baseline
+++ b/test/StackTrace/dynamic.js.baseline
@@ -1,6 +1,6 @@
 Error: This is my error

-	at foo (Function code:1:20)

-	at Function code (Function code:1:59)

-	at Anonymous function (dynamic.js:27:13)

-	at runtest (dynamic.js:25:10)

-	at Global code (dynamic.js:38:1)

+   at foo (Function code:1:20)

+   at Function code (Function code:1:59)

+   at Anonymous function (dynamic.js:27:13)

+   at runtest (dynamic.js:25:10)

+   at Global code (dynamic.js:38:1)

diff --git a/test/StackTrace/rlexe.xml b/test/StackTrace/rlexe.xml
index 6604e37..fa0fa5f 100644
--- a/test/StackTrace/rlexe.xml
+++ b/test/StackTrace/rlexe.xml
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
-      <tags>StackTrace,exclude_ship</tags>
+      <tags>StackTrace</tags>
       <files>SimpleThrow.js</files>
       <compile-flags>-ExtendedErrorStackForTestHost -errorStackTrace- -args runTest -endargs</compile-flags>
       <baseline>simpleThrow.js.stackTraceDisabled.baseline</baseline>
@@ -18,7 +18,7 @@
   </test>
   <test>
     <default>
-      <tags>StackTrace,exclude_ship</tags>
+      <tags>StackTrace</tags>
       <files>PropertyValidation.js</files>
       <compile-flags>-ExtendedErrorStackForTestHost -forceStrictMode</compile-flags>
       <baseline>PropertyValidation.nostrict.baseline</baseline>
@@ -26,7 +26,7 @@
   </test>
   <test>
     <default>
-      <tags>StackTrace,exclude_ship</tags>
+      <tags>StackTrace</tags>
       <files>SimpleThrow.js</files>
       <compile-flags>-ExtendedErrorStackForTestHost -args runTest -endargs</compile-flags>
       <baseline>SimpleThrow.js.baseline</baseline>
@@ -34,7 +34,7 @@
   </test>
   <test>
     <default>
-      <tags>StackTrace,exclude_ship</tags>
+      <tags>StackTrace</tags>
       <files>LongCallStackThrow.js</files>
       <compile-flags>-ExtendedErrorStackForTestHost -args runTest 5 -endargs</compile-flags>
       <baseline>LongCallStackThrow.js.Args5.baseline</baseline>
@@ -42,7 +42,7 @@
   </test>
   <test>
     <default>
-      <tags>StackTrace,exclude_ship</tags>
+      <tags>StackTrace</tags>
       <files>LongCallStackThrow.js</files>
       <compile-flags>-ExtendedErrorStackForTestHost -args runTest 6 -endargs</compile-flags>
       <baseline>LongCallStackThrow.js.Args6.baseline</baseline>
@@ -50,7 +50,7 @@
   </test>
   <test>
     <default>
-      <tags>StackTrace,exclude_ship</tags>
+      <tags>StackTrace</tags>
       <files>LongCallStackThrow.js</files>
       <compile-flags>-ExtendedErrorStackForTestHost -args runTest 7 -endargs</compile-flags>
       <baseline>LongCallStackThrow.js.Args7.baseline</baseline>
@@ -58,7 +58,7 @@
   </test>
   <test>
     <default>
-      <tags>StackTrace,exclude_ship</tags>
+      <tags>StackTrace</tags>
       <files>LongCallStackThrow.js</files>
       <compile-flags>-ExtendedErrorStackForTestHost -args runTest 30 -endargs</compile-flags>
       <baseline>LongCallStackThrow.js.Args30.baseline</baseline>
@@ -82,7 +82,7 @@
   </test>
   <test>
     <default>
-      <tags>StackTrace,xplat_verifymark_slow,exclude_ship</tags>
+      <tags>StackTrace,xplat_verifymark_slow</tags>
       <files>StackTraceLimitOOS.js</files>
       <baseline>StackTraceLimitOOS.baseline</baseline>
       <compile-flags>-ExtendedErrorStackForTestHost -on:interruptprobe</compile-flags>
diff --git a/test/StackTrace/x64StackWalk.baseline b/test/StackTrace/x64StackWalk.baseline
index be82959..c92d342 100644
--- a/test/StackTrace/x64StackWalk.baseline
+++ b/test/StackTrace/x64StackWalk.baseline
@@ -1,18 +1,18 @@
 ReferenceError: 'baz' is not defined

-	at foo (x64stackwalk.js:13:9)

-	at Global code (x64stackwalk.js:23:1)

+   at foo (x64stackwalk.js:13:9)

+   at Global code (x64stackwalk.js:23:1)

 ReferenceError: 'baz' is not defined

-	at foo (x64stackwalk.js:18:9)

-	at Global code (x64stackwalk.js:23:1)

+   at foo (x64stackwalk.js:18:9)

+   at Global code (x64stackwalk.js:23:1)

 ReferenceError: 'baz' is not defined

-	at foo (x64stackwalk.js:13:9)

-	at Global code (x64stackwalk.js:24:1)

+   at foo (x64stackwalk.js:13:9)

+   at Global code (x64stackwalk.js:24:1)

 ReferenceError: 'baz' is not defined

-	at foo (x64stackwalk.js:18:9)

-	at Global code (x64stackwalk.js:24:1)

+   at foo (x64stackwalk.js:18:9)

+   at Global code (x64stackwalk.js:24:1)

 ReferenceError: 'baz' is not defined

-	at foo (x64stackwalk.js:13:9)

-	at Global code (x64stackwalk.js:25:1)

+   at foo (x64stackwalk.js:13:9)

+   at Global code (x64stackwalk.js:25:1)

 ReferenceError: 'baz' is not defined

-	at foo (x64stackwalk.js:18:9)

-	at Global code (x64stackwalk.js:25:1)

+   at foo (x64stackwalk.js:18:9)

+   at Global code (x64stackwalk.js:25:1)

diff --git a/test/StackTrace/x64StackWalkLoopBody.baseline b/test/StackTrace/x64StackWalkLoopBody.baseline
index 2951eb0..0d76b21 100644
--- a/test/StackTrace/x64StackWalkLoopBody.baseline
+++ b/test/StackTrace/x64StackWalkLoopBody.baseline
@@ -1,48 +1,48 @@
 ReferenceError: 'baz' is not defined

-	at bar (x64stackwalkloopbody.js:18:17)

-	at Global code (x64stackwalkloopbody.js:27:1)

+   at bar (x64stackwalkloopbody.js:18:17)

+   at Global code (x64stackwalkloopbody.js:27:1)

 ReferenceError: 'baz' is not defined

-	at bar (x64stackwalkloopbody.js:18:17)

-	at Global code (x64stackwalkloopbody.js:27:1)

+   at bar (x64stackwalkloopbody.js:18:17)

+   at Global code (x64stackwalkloopbody.js:27:1)

 ReferenceError: 'baz' is not defined

-	at bar (x64stackwalkloopbody.js:18:17)

-	at Global code (x64stackwalkloopbody.js:27:1)

+   at bar (x64stackwalkloopbody.js:18:17)

+   at Global code (x64stackwalkloopbody.js:27:1)

 ReferenceError: 'baz' is not defined

-	at bar (x64stackwalkloopbody.js:18:17)

-	at Global code (x64stackwalkloopbody.js:27:1)

+   at bar (x64stackwalkloopbody.js:18:17)

+   at Global code (x64stackwalkloopbody.js:27:1)

 ReferenceError: 'baz' is not defined

-	at bar (x64stackwalkloopbody.js:18:17)

-	at Global code (x64stackwalkloopbody.js:27:1)

+   at bar (x64stackwalkloopbody.js:18:17)

+   at Global code (x64stackwalkloopbody.js:27:1)

 ReferenceError: 'baz' is not defined

-	at bar (x64stackwalkloopbody.js:18:17)

-	at Global code (x64stackwalkloopbody.js:27:1)

+   at bar (x64stackwalkloopbody.js:18:17)

+   at Global code (x64stackwalkloopbody.js:27:1)

 ReferenceError: 'baz' is not defined

-	at bar (x64stackwalkloopbody.js:18:17)

-	at Global code (x64stackwalkloopbody.js:27:1)

+   at bar (x64stackwalkloopbody.js:18:17)

+   at Global code (x64stackwalkloopbody.js:27:1)

 ReferenceError: 'baz' is not defined

-	at bar (x64stackwalkloopbody.js:18:17)

-	at Global code (x64stackwalkloopbody.js:27:1)

+   at bar (x64stackwalkloopbody.js:18:17)

+   at Global code (x64stackwalkloopbody.js:27:1)

 ReferenceError: 'baz' is not defined

-	at bar (x64stackwalkloopbody.js:18:17)

-	at Global code (x64stackwalkloopbody.js:27:1)

+   at bar (x64stackwalkloopbody.js:18:17)

+   at Global code (x64stackwalkloopbody.js:27:1)

 ReferenceError: 'baz' is not defined

-	at bar (x64stackwalkloopbody.js:18:17)

-	at Global code (x64stackwalkloopbody.js:27:1)

+   at bar (x64stackwalkloopbody.js:18:17)

+   at Global code (x64stackwalkloopbody.js:27:1)

 ReferenceError: 'baz' is not defined

-	at bar (x64stackwalkloopbody.js:18:17)

-	at Global code (x64stackwalkloopbody.js:27:1)

+   at bar (x64stackwalkloopbody.js:18:17)

+   at Global code (x64stackwalkloopbody.js:27:1)

 ReferenceError: 'baz' is not defined

-	at bar (x64stackwalkloopbody.js:18:17)

-	at Global code (x64stackwalkloopbody.js:27:1)

+   at bar (x64stackwalkloopbody.js:18:17)

+   at Global code (x64stackwalkloopbody.js:27:1)

 ReferenceError: 'baz' is not defined

-	at bar (x64stackwalkloopbody.js:18:17)

-	at Global code (x64stackwalkloopbody.js:27:1)

+   at bar (x64stackwalkloopbody.js:18:17)

+   at Global code (x64stackwalkloopbody.js:27:1)

 ReferenceError: 'baz' is not defined

-	at bar (x64stackwalkloopbody.js:18:17)

-	at Global code (x64stackwalkloopbody.js:27:1)

+   at bar (x64stackwalkloopbody.js:18:17)

+   at Global code (x64stackwalkloopbody.js:27:1)

 ReferenceError: 'baz' is not defined

-	at bar (x64stackwalkloopbody.js:18:17)

-	at Global code (x64stackwalkloopbody.js:27:1)

+   at bar (x64stackwalkloopbody.js:18:17)

+   at Global code (x64stackwalkloopbody.js:27:1)

 ReferenceError: 'baz' is not defined

-	at bar (x64stackwalkloopbody.js:18:17)

-	at Global code (x64stackwalkloopbody.js:27:1)

+   at bar (x64stackwalkloopbody.js:18:17)

+   at Global code (x64stackwalkloopbody.js:27:1)

diff --git a/test/Strings/rlexe.xml b/test/Strings/rlexe.xml
index ee0dc04..c936b71 100644
--- a/test/Strings/rlexe.xml
+++ b/test/Strings/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
@@ -183,7 +183,7 @@
       <files>CompoundString.js</files>
       <baseline>CompoundString.baseline</baseline>
       <compile-flags>-minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit -Intl-</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship,Slow</tags>
+      <tags>exclude_dynapogo,Slow</tags>
     </default>
   </test>
   <test>
@@ -251,7 +251,7 @@
   <test>
     <default>
       <files>repeatBug.js</files>
-      <tags>exclude_chk, Slow</tags>
+      <tags>exclude_chk,Slow</tags>
     </default>
-  </test> 
+  </test>
 </regress-exe>
diff --git a/test/TaggedFloats/rlexe.xml b/test/TaggedFloats/rlexe.xml
index 6dea0c1..e77c4f9 100644
--- a/test/TaggedFloats/rlexe.xml
+++ b/test/TaggedFloats/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
diff --git a/test/TaggedIntegers/rlexe.xml b/test/TaggedIntegers/rlexe.xml
index 58d858f..877eb2e 100644
--- a/test/TaggedIntegers/rlexe.xml
+++ b/test/TaggedIntegers/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
@@ -270,7 +270,7 @@
     <default>
       <files>arrays.js</files>
       <baseline>arrays.baseline</baseline>
-      <tags>exclude_interpreted,exclude_serialized,exclude_ship,require_backend</tags>
+      <tags>exclude_interpreted,exclude_serialized,require_backend</tags>
       <compile-flags>-dynamicprofileinput:profile.dpl.arrays.js -off:constprop -off:copyprop -off:constfold -off:typespec</compile-flags>
     </default>
   </test>
diff --git a/test/UnifiedRegex/rlexe.xml b/test/UnifiedRegex/rlexe.xml
index a127efe..25e7647 100644
--- a/test/UnifiedRegex/rlexe.xml
+++ b/test/UnifiedRegex/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
@@ -24,7 +24,7 @@
       <files>bugFixRegression.js</files>
       <baseline>bugFixRegression.baseline</baseline>
       <compile-flags>-forceSerialized</compile-flags>
-      <tags>exclude_ship,exclude_serialized,Slow</tags>
+      <tags>exclude_serialized,Slow</tags>
     </default>
   </test>
   <test>
diff --git a/test/UnitTestFramework/TrimStackTracePath.js b/test/UnitTestFramework/TrimStackTracePath.js
index 5498f14..4b9889a 100644
--- a/test/UnitTestFramework/TrimStackTracePath.js
+++ b/test/UnitTestFramework/TrimStackTracePath.js
@@ -4,5 +4,10 @@
 //-------------------------------------------------------------------------------------------------------
 
 function TrimStackTracePath(line) {
-    return line && line.replace(/\(.+(\\test\\|\\unittest\\).[^\\/]*./ig, "(");
+    if (line) {
+        line = line.replace(/ \(.+([\\\/]test[\\\/]|[\\\/]unittest[\\\/]).[^\\\/]*./ig, " (");
+        // normalize output by replacing leading whitespace (\s+) of each stack line (starting with 'at ') with 3 spaces (to preserve current baselines)
+        line = line.replace(/^\s+at /gm, '   at ');
+    }
+    return line;
 }
diff --git a/test/UnitTestFramework/UnitTestFramework.js b/test/UnitTestFramework/UnitTestFramework.js
index 520fc29..5d25fb2 100644
--- a/test/UnitTestFramework/UnitTestFramework.js
+++ b/test/UnitTestFramework/UnitTestFramework.js
@@ -10,6 +10,7 @@
 //     if (this.WScript && this.WScript.LoadScriptFile) { // Check for running in ch

 //         this.WScript.LoadScriptFile("..\\UnitTestFramework\\UnitTestFramework.js");

 //     }

+//

 //   How to define and run tests:

 //     var tests = [ { name: "test name 1", body: function () {} }, ...];

 //     testRunner.run(tests);

@@ -25,11 +26,16 @@
 //     example: testRunner.LoadModule(source, 'samethread', false);

 //

 //   How to use assert:

-//     assert.areEqual(expected, actual, "those two should be equal");

+//     assert.areEqual(expected, actual, "those two should be equal (i.e. deep equality of objects using ===)");

 //     assert.areNotEqual(expected, actual, "those two should NOT be equal");

-//     assert.fail("error");

-//     assert.throws(function, SyntaxError);

+//     assert.areAlmostEqual(expected, actual, "those two should be almost equal, numerically (allows difference by epsilon)");

+//     assert.isTrue(actual, "actual should be true");

+//     assert.isFalse(actual, "actual should be false");

+//     assert.isUndefined(actual, "actual should be undefined");

+//     assert.isNotUndefined(actual, "actual should not be undefined");

+//     assert.throws(function, SyntaxError, "function should throw (in this case, specifically a SyntaxError with fooMessage", "fooMessage");

 //     assert.doesNotThrow(function, "this function should not throw anything");

+//     assert.fail("error");

 //

 //   Some useful helpers:

 //     helpers.writeln("works in both", "console", "and", "browser);

diff --git a/test/UnitTestFramework/rlexe.xml b/test/UnitTestFramework/rlexe.xml
index 06ed5b4..605afe3 100644
--- a/test/UnitTestFramework/rlexe.xml
+++ b/test/UnitTestFramework/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
diff --git a/test/UnitTestFramework/yargs.js b/test/UnitTestFramework/yargs.js
new file mode 100644
index 0000000..a1aa7f7
--- /dev/null
+++ b/test/UnitTestFramework/yargs.js
@@ -0,0 +1,898 @@
+'use strict';
+let dest;
+if (typeof WScript !== "undefined") {
+  dest = this;
+} else if (typeof require !== "undefined") {
+  dest = module.exports;
+}
+
+(function() {
+dest.yargsParse = parse;
+
+//The MIT License (MIT)
+//
+//Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+//
+//Permission is hereby granted, free of charge, to any person obtaining a copy
+//of this software and associated documentation files (the "Software"), to deal
+//in the Software without restriction, including without limitation the rights
+//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+//copies of the Software, and to permit persons to whom the Software is
+//furnished to do so, subject to the following conditions:
+//
+//The above copyright notice and this permission notice shall be included in
+//all copies or substantial portions of the Software.
+//
+//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+//THE SOFTWARE.
+
+function preserveCamelCase(str) {
+  let isLastCharLower = false;
+  let isLastCharUpper = false;
+  let isLastLastCharUpper = false;
+
+  for (let i = 0; i < str.length; i++) {
+    const c = str[i];
+
+    if (isLastCharLower && /[a-zA-Z]/.test(c) && c.toUpperCase() === c) {
+      str = str.substr(0, i) + '-' + str.substr(i);
+      isLastCharLower = false;
+      isLastLastCharUpper = isLastCharUpper;
+      isLastCharUpper = true;
+      i++;
+    } else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(c) && c.toLowerCase() === c) {
+      str = str.substr(0, i - 1) + '-' + str.substr(i - 1);
+      isLastLastCharUpper = isLastCharUpper;
+      isLastCharUpper = false;
+      isLastCharLower = true;
+    } else {
+      isLastCharLower = c.toLowerCase() === c;
+      isLastLastCharUpper = isLastCharUpper;
+      isLastCharUpper = c.toUpperCase() === c;
+    }
+  }
+
+  return str;
+}
+
+function camelCase(str) {
+  if (arguments.length > 1) {
+    str = Array.from(arguments)
+      .map(x => x.trim())
+      .filter(x => x.length)
+      .join('-');
+  } else {
+    str = str.trim();
+  }
+
+  if (str.length === 0) {
+    return '';
+  }
+
+  if (str.length === 1) {
+    return str.toLowerCase();
+  }
+
+  if (/^[a-z0-9]+$/.test(str)) {
+    return str;
+  }
+
+  const hasUpperCase = str !== str.toLowerCase();
+
+  if (hasUpperCase) {
+    str = preserveCamelCase(str);
+  }
+
+  return str
+    .replace(/^[_.\- ]+/, '')
+    .toLowerCase()
+    .replace(/[_.\- ]+(\w|$)/g, (m, p1) => p1.toUpperCase());
+};
+
+//Copyright (c) 2016, Contributors
+//
+//Permission to use, copy, modify, and/or distribute this software
+//for any purpose with or without fee is hereby granted, provided
+//that the above copyright notice and this permission notice
+//appear in all copies.
+//
+//THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+//WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
+//OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE
+//LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+//OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+//WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+//ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+// take an un-split argv string and tokenize it.
+function tokenizeArgString(argString) {
+  if (Array.isArray(argString)) return argString
+
+  var i = 0
+  var c = null
+  var opening = null
+  var args = []
+
+  for (var ii = 0; ii < argString.length; ii++) {
+    c = argString.charAt(ii)
+
+    // split on spaces unless we're in quotes.
+    if (c === ' ' && !opening) {
+      i++
+      continue
+    }
+
+    // don't split the string if we're in matching
+    // opening or closing single and double quotes.
+    if (c === opening) {
+      opening = null
+      continue
+    } else if ((c === "'" || c === '"') && !opening) {
+      opening = c
+      continue
+    }
+
+    if (!args[i]) args[i] = ''
+    args[i] += c
+  }
+
+  return args
+}
+
+function parse (args, opts) {
+  if (!opts) opts = {}
+  // allow a string argument to be passed in rather
+  // than an argv array.
+  args = tokenizeArgString(args)
+  // aliases might have transitive relationships, normalize this.
+  var aliases = combineAliases(opts.alias || {})
+  var configuration = assign({
+    'short-option-groups': true,
+    'camel-case-expansion': true,
+    'dot-notation': true,
+    'parse-numbers': true,
+    'boolean-negation': true,
+    'duplicate-arguments-array': true,
+    'flatten-duplicate-arrays': true,
+    'populate--': false
+  }, opts.configuration)
+  var defaults = opts.default || {}
+  var configObjects = opts.configObjects || []
+  var envPrefix = opts.envPrefix
+  var notFlagsOption = configuration['populate--']
+  var notFlagsArgv = notFlagsOption ? '--' : '_'
+  var newAliases = {}
+  // allow a i18n handler to be passed in, default to a fake one (util.format).
+  var __ = opts.__ || function (str) {
+    return str;
+  }
+  var error = null
+  var flags = {
+    aliases: {},
+    arrays: {},
+    bools: {},
+    strings: {},
+    numbers: {},
+    counts: {},
+    normalize: {},
+    configs: {},
+    defaulted: {},
+    nargs: {},
+    coercions: {}
+  }
+  var negative = /^-[0-9]+(\.[0-9]+)?/
+
+  ;[].concat(opts.array).filter(Boolean).forEach(function (key) {
+    flags.arrays[key] = true
+  })
+
+  ;[].concat(opts.boolean).filter(Boolean).forEach(function (key) {
+    flags.bools[key] = true
+  })
+
+  ;[].concat(opts.string).filter(Boolean).forEach(function (key) {
+    flags.strings[key] = true
+  })
+
+  ;[].concat(opts.number).filter(Boolean).forEach(function (key) {
+    flags.numbers[key] = true
+  })
+
+  ;[].concat(opts.count).filter(Boolean).forEach(function (key) {
+    flags.counts[key] = true
+  })
+
+  ;[].concat(opts.normalize).filter(Boolean).forEach(function (key) {
+    flags.normalize[key] = true
+  })
+
+  Object.keys(opts.narg || {}).forEach(function (k) {
+    flags.nargs[k] = opts.narg[k]
+  })
+
+  Object.keys(opts.coerce || {}).forEach(function (k) {
+    flags.coercions[k] = opts.coerce[k]
+  })
+
+  if (Array.isArray(opts.config) || typeof opts.config === 'string') {
+    ;[].concat(opts.config).filter(Boolean).forEach(function (key) {
+      flags.configs[key] = true
+    })
+  } else {
+    Object.keys(opts.config || {}).forEach(function (k) {
+      flags.configs[k] = opts.config[k]
+    })
+  }
+
+  // create a lookup table that takes into account all
+  // combinations of aliases: {f: ['foo'], foo: ['f']}
+  extendAliases(opts.key, aliases, opts.default, flags.arrays)
+
+  // apply default values to all aliases.
+  Object.keys(defaults).forEach(function (key) {
+    (flags.aliases[key] || []).forEach(function (alias) {
+      defaults[alias] = defaults[key]
+    })
+  })
+
+  var argv = { _: [] }
+
+  Object.keys(flags.bools).forEach(function (key) {
+    setArg(key, !(key in defaults) ? false : defaults[key])
+    setDefaulted(key)
+  })
+
+  var notFlags = []
+  if (args.indexOf('--') !== -1) {
+    notFlags = args.slice(args.indexOf('--') + 1)
+    args = args.slice(0, args.indexOf('--'))
+  }
+
+  for (var i = 0; i < args.length; i++) {
+    var arg = args[i]
+    var broken
+    var key
+    var letters
+    var m
+    var next
+    var value
+
+    // -- seperated by =
+    if (arg.match(/^--.+=/) || (
+      !configuration['short-option-groups'] && arg.match(/^-.+=/)
+    )) {
+      // Using [\s\S] instead of . because js doesn't support the
+      // 'dotall' regex modifier. See:
+      // http://stackoverflow.com/a/1068308/13216
+      m = arg.match(/^--?([^=]+)=([\s\S]*)$/)
+
+      // nargs format = '--f=monkey washing cat'
+      if (checkAllAliases(m[1], flags.nargs)) {
+        args.splice(i + 1, 0, m[2])
+        i = eatNargs(i, m[1], args)
+      // arrays format = '--f=a b c'
+      } else if (checkAllAliases(m[1], flags.arrays) && args.length > i + 1) {
+        args.splice(i + 1, 0, m[2])
+        i = eatArray(i, m[1], args)
+      } else {
+        setArg(m[1], m[2])
+      }
+    } else if (arg.match(/^--no-.+/) && configuration['boolean-negation']) {
+      key = arg.match(/^--no-(.+)/)[1]
+      setArg(key, false)
+
+    // -- seperated by space.
+    } else if (arg.match(/^--.+/) || (
+      !configuration['short-option-groups'] && arg.match(/^-.+/)
+    )) {
+      key = arg.match(/^--?(.+)/)[1]
+
+      // nargs format = '--foo a b c'
+      if (checkAllAliases(key, flags.nargs)) {
+        i = eatNargs(i, key, args)
+      // array format = '--foo a b c'
+      } else if (checkAllAliases(key, flags.arrays) && args.length > i + 1) {
+        i = eatArray(i, key, args)
+      } else {
+        next = args[i + 1]
+
+        if (next !== undefined && (!next.match(/^-/) ||
+          next.match(negative)) &&
+          !checkAllAliases(key, flags.bools) &&
+          !checkAllAliases(key, flags.counts)) {
+          setArg(key, next)
+          i++
+        } else if (/^(true|false)$/.test(next)) {
+          setArg(key, next)
+          i++
+        } else {
+          setArg(key, defaultForType(guessType(key, flags)))
+        }
+      }
+
+    // dot-notation flag seperated by '='.
+    } else if (arg.match(/^-.\..+=/)) {
+      m = arg.match(/^-([^=]+)=([\s\S]*)$/)
+      setArg(m[1], m[2])
+
+    // dot-notation flag seperated by space.
+    } else if (arg.match(/^-.\..+/)) {
+      next = args[i + 1]
+      key = arg.match(/^-(.\..+)/)[1]
+
+      if (next !== undefined && !next.match(/^-/) &&
+        !checkAllAliases(key, flags.bools) &&
+        !checkAllAliases(key, flags.counts)) {
+        setArg(key, next)
+        i++
+      } else {
+        setArg(key, defaultForType(guessType(key, flags)))
+      }
+    } else if (arg.match(/^-[^-]+/) && !arg.match(negative)) {
+      letters = arg.slice(1, -1).split('')
+      broken = false
+
+      for (var j = 0; j < letters.length; j++) {
+        next = arg.slice(j + 2)
+
+        if (letters[j + 1] && letters[j + 1] === '=') {
+          value = arg.slice(j + 3)
+          key = letters[j]
+
+          // nargs format = '-f=monkey washing cat'
+          if (checkAllAliases(key, flags.nargs)) {
+            args.splice(i + 1, 0, value)
+            i = eatNargs(i, key, args)
+          // array format = '-f=a b c'
+          } else if (checkAllAliases(key, flags.arrays) && args.length > i + 1) {
+            args.splice(i + 1, 0, value)
+            i = eatArray(i, key, args)
+          } else {
+            setArg(key, value)
+          }
+
+          broken = true
+          break
+        }
+
+        if (next === '-') {
+          setArg(letters[j], next)
+          continue
+        }
+
+        // current letter is an alphabetic character and next value is a number
+        if (/[A-Za-z]/.test(letters[j]) &&
+          /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) {
+          setArg(letters[j], next)
+          broken = true
+          break
+        }
+
+        if (letters[j + 1] && letters[j + 1].match(/\W/)) {
+          setArg(letters[j], next)
+          broken = true
+          break
+        } else {
+          setArg(letters[j], defaultForType(guessType(letters[j], flags)))
+        }
+      }
+
+      key = arg.slice(-1)[0]
+
+      if (!broken && key !== '-') {
+        // nargs format = '-f a b c'
+        if (checkAllAliases(key, flags.nargs)) {
+          i = eatNargs(i, key, args)
+        // array format = '-f a b c'
+        } else if (checkAllAliases(key, flags.arrays) && args.length > i + 1) {
+          i = eatArray(i, key, args)
+        } else {
+          next = args[i + 1]
+
+          if (next !== undefined && (!/^(-|--)[^-]/.test(next) ||
+            next.match(negative)) &&
+            !checkAllAliases(key, flags.bools) &&
+            !checkAllAliases(key, flags.counts)) {
+            setArg(key, next)
+            i++
+          } else if (/^(true|false)$/.test(next)) {
+            setArg(key, next)
+            i++
+          } else {
+            setArg(key, defaultForType(guessType(key, flags)))
+          }
+        }
+      }
+    } else {
+      argv._.push(
+        flags.strings['_'] || !isNumber(arg) ? arg : Number(arg)
+      )
+    }
+  }
+
+  // order of precedence:
+  // 1. command line arg
+  // 2. value from env var
+  // 3. value from config file
+  // 4. value from config objects
+  // 5. configured default value
+  applyEnvVars(argv, true) // special case: check env vars that point to config file
+  applyEnvVars(argv, false)
+  setConfig(argv)
+  setConfigObjects()
+  applyDefaultsAndAliases(argv, flags.aliases, defaults)
+  applyCoercions(argv)
+
+  // for any counts either not in args or without an explicit default, set to 0
+  Object.keys(flags.counts).forEach(function (key) {
+    if (!hasKey(argv, key.split('.'))) setArg(key, 0)
+  })
+
+  // '--' defaults to undefined.
+  if (notFlagsOption && notFlags.length) argv[notFlagsArgv] = []
+  notFlags.forEach(function (key) {
+    argv[notFlagsArgv].push(key)
+  })
+
+  // how many arguments should we consume, based
+  // on the nargs option?
+  function eatNargs (i, key, args) {
+    var toEat = checkAllAliases(key, flags.nargs)
+
+    if (args.length - (i + 1) < toEat) error = Error(__(`Not enough arguments following: ${key}`))
+
+    for (var ii = i + 1; ii < (toEat + i + 1); ii++) {
+      setArg(key, args[ii])
+    }
+
+    return (i + toEat)
+  }
+
+  // if an option is an array, eat all non-hyphenated arguments
+  // following it... YUM!
+  // e.g., --foo apple banana cat becomes ["apple", "banana", "cat"]
+  function eatArray (i, key, args) {
+    var start = i + 1
+    var argsToSet = []
+    var multipleArrayFlag = i > 0
+    for (var ii = i + 1; ii < args.length; ii++) {
+      if (/^-/.test(args[ii]) && !negative.test(args[ii])) {
+        if (ii === start) {
+          setArg(key, defaultForType('array'))
+        }
+        multipleArrayFlag = true
+        break
+      }
+      i = ii
+      argsToSet.push(args[ii])
+    }
+    if (multipleArrayFlag) {
+      setArg(key, argsToSet.map(function (arg) {
+        return processValue(key, arg)
+      }))
+    } else {
+      argsToSet.forEach(function (arg) {
+        setArg(key, arg)
+      })
+    }
+
+    return i
+  }
+
+  function setArg (key, val) {
+    unsetDefaulted(key)
+
+    if (/-/.test(key) && !(flags.aliases[key] && flags.aliases[key].length) && configuration['camel-case-expansion']) {
+      var c = camelCase(key)
+      flags.aliases[key] = [c]
+      newAliases[c] = true
+    }
+
+    var value = processValue(key, val)
+
+    var splitKey = key.split('.')
+    setKey(argv, splitKey, value)
+
+    // handle populating aliases of the full key
+    if (flags.aliases[key]) {
+      flags.aliases[key].forEach(function (x) {
+        x = x.split('.')
+        setKey(argv, x, value)
+      })
+    }
+
+    // handle populating aliases of the first element of the dot-notation key
+    if (splitKey.length > 1 && configuration['dot-notation']) {
+      ;(flags.aliases[splitKey[0]] || []).forEach(function (x) {
+        x = x.split('.')
+
+        // expand alias with nested objects in key
+        var a = [].concat(splitKey)
+        a.shift() // nuke the old key.
+        x = x.concat(a)
+
+        setKey(argv, x, value)
+      })
+    }
+
+    // Set normalize getter and setter when key is in 'normalize' but isn't an array
+    if (checkAllAliases(key, flags.normalize) && !checkAllAliases(key, flags.arrays)) {
+      var keys = [key].concat(flags.aliases[key] || [])
+      /*
+      keys.forEach(function (key) {
+        argv.__defineSetter__(key, function (v) {
+          val = v
+        })
+
+        argv.__defineGetter__(key, function () {
+          return typeof val === 'string' ? path.normalize(val) : val
+        })
+      })
+      */
+    }
+  }
+
+  function processValue (key, val) {
+    // handle parsing boolean arguments --foo=true --bar false.
+    if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) {
+      if (typeof val === 'string') val = val === 'true'
+    }
+
+    var value = val
+    if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.coercions)) {
+      if (isNumber(val)) value = Number(val)
+      if (!isUndefined(val) && !isNumber(val) && checkAllAliases(key, flags.numbers)) value = NaN
+    }
+
+    // increment a count given as arg (either no value or value parsed as boolean)
+    if (checkAllAliases(key, flags.counts) && (isUndefined(value) || typeof value === 'boolean')) {
+      value = increment
+    }
+
+    /*
+    // Set normalized value when key is in 'normalize' and in 'arrays'
+    if (checkAllAliases(key, flags.normalize) && checkAllAliases(key, flags.arrays)) {
+      if (Array.isArray(val)) value = val.map(path.normalize)
+      else value = path.normalize(val)
+    }
+    */
+    return value
+  }
+
+  // set args from config.json file, this should be
+  // applied last so that defaults can be applied.
+  function setConfig (argv) {
+    var configLookup = {}
+
+    // expand defaults/aliases, in-case any happen to reference
+    // the config.json file.
+    applyDefaultsAndAliases(configLookup, flags.aliases, defaults)
+
+    Object.keys(flags.configs).forEach(function (configKey) {
+      var configPath = argv[configKey] || configLookup[configKey]
+      if (configPath) {
+        throw new Error("Not Supported in Chakra Host");
+        try {
+          var config = null
+          var resolvedConfigPath = path.resolve(process.cwd(), configPath)
+
+          if (typeof flags.configs[configKey] === 'function') {
+            try {
+              config = flags.configs[configKey](resolvedConfigPath)
+            } catch (e) {
+              config = e
+            }
+            if (config instanceof Error) {
+              error = config
+              return
+            }
+          } else {
+            config = require(resolvedConfigPath)
+          }
+
+          setConfigObject(config)
+        } catch (ex) {
+          if (argv[configKey]) error = Error(__(`Invalid JSON config file: ${configPath}`))
+        }
+      }
+    })
+  }
+
+  // set args from config object.
+  // it recursively checks nested objects.
+  function setConfigObject (config, prev) {
+    Object.keys(config).forEach(function (key) {
+      var value = config[key]
+      var fullKey = prev ? prev + '.' + key : key
+
+      // if the value is an inner object and we have dot-notation
+      // enabled, treat inner objects in config the same as
+      // heavily nested dot notations (foo.bar.apple).
+      if (typeof value === 'object' && !Array.isArray(value) && configuration['dot-notation']) {
+        // if the value is an object but not an array, check nested object
+        setConfigObject(value, fullKey)
+      } else {
+        // setting arguments via CLI takes precedence over
+        // values within the config file.
+        if (!hasKey(argv, fullKey.split('.')) || (flags.defaulted[fullKey])) {
+          setArg(fullKey, value)
+        }
+      }
+    })
+  }
+
+  // set all config objects passed in opts
+  function setConfigObjects () {
+    if (typeof configObjects === 'undefined') return
+    configObjects.forEach(function (configObject) {
+      setConfigObject(configObject)
+    })
+  }
+
+  function applyEnvVars (argv, configOnly) {
+    if (typeof envPrefix === 'undefined') return
+
+    var prefix = typeof envPrefix === 'string' ? envPrefix : ''
+    Object.keys(process.env).forEach(function (envVar) {
+      if (prefix === '' || envVar.lastIndexOf(prefix, 0) === 0) {
+        // get array of nested keys and convert them to camel case
+        var keys = envVar.split('__').map(function (key, i) {
+          if (i === 0) {
+            key = key.substring(prefix.length)
+          }
+          return camelCase(key)
+        })
+
+        if (((configOnly && flags.configs[keys.join('.')]) || !configOnly) && (!hasKey(argv, keys) || flags.defaulted[keys.join('.')])) {
+          setArg(keys.join('.'), process.env[envVar])
+        }
+      }
+    })
+  }
+
+  function applyCoercions (argv) {
+    var coerce
+    Object.keys(argv).forEach(function (key) {
+      coerce = checkAllAliases(key, flags.coercions)
+      if (typeof coerce === 'function') {
+        try {
+          argv[key] = coerce(argv[key])
+        } catch (err) {
+          error = err
+        }
+      }
+    })
+  }
+
+  function applyDefaultsAndAliases (obj, aliases, defaults) {
+    Object.keys(defaults).forEach(function (key) {
+      if (!hasKey(obj, key.split('.'))) {
+        setKey(obj, key.split('.'), defaults[key])
+
+        ;(aliases[key] || []).forEach(function (x) {
+          if (hasKey(obj, x.split('.'))) return
+          setKey(obj, x.split('.'), defaults[key])
+        })
+      }
+    })
+  }
+
+  function hasKey (obj, keys) {
+    var o = obj
+
+    if (!configuration['dot-notation']) keys = [keys.join('.')]
+
+    keys.slice(0, -1).forEach(function (key) {
+      o = (o[key] || {})
+    })
+
+    var key = keys[keys.length - 1]
+
+    if (typeof o !== 'object') return false
+    else return key in o
+  }
+
+  function setKey (obj, keys, value) {
+    var o = obj
+
+    if (!configuration['dot-notation']) keys = [keys.join('.')]
+
+    keys.slice(0, -1).forEach(function (key) {
+      if (o[key] === undefined) o[key] = {}
+      o = o[key]
+    })
+
+    var key = keys[keys.length - 1]
+
+    var isTypeArray = checkAllAliases(keys.join('.'), flags.arrays)
+    var isValueArray = Array.isArray(value)
+    var duplicate = configuration['duplicate-arguments-array']
+
+    if (value === increment) {
+      o[key] = increment(o[key])
+    } else if (Array.isArray(o[key])) {
+      if (duplicate && isTypeArray && isValueArray) {
+        o[key] = configuration['flatten-duplicate-arrays'] ? o[key].concat(value) : [o[key]].concat([value])
+      } else if (!duplicate && Boolean(isTypeArray) === Boolean(isValueArray)) {
+        o[key] = value
+      } else {
+        o[key] = o[key].concat([value])
+      }
+    } else if (o[key] === undefined && isTypeArray) {
+      o[key] = isValueArray ? value : [value]
+    } else if (duplicate && !(o[key] === undefined || checkAllAliases(key, flags.bools) || checkAllAliases(keys.join('.'), flags.bools) || checkAllAliases(key, flags.counts))) {
+      o[key] = [ o[key], value ]
+    } else {
+      o[key] = value
+    }
+  }
+
+  // extend the aliases list with inferred aliases.
+  function extendAliases () {
+    Array.prototype.slice.call(arguments).forEach(function (obj) {
+      Object.keys(obj || {}).forEach(function (key) {
+        // short-circuit if we've already added a key
+        // to the aliases array, for example it might
+        // exist in both 'opts.default' and 'opts.key'.
+        if (flags.aliases[key]) return
+
+        flags.aliases[key] = [].concat(aliases[key] || [])
+        // For "--option-name", also set argv.optionName
+        flags.aliases[key].concat(key).forEach(function (x) {
+          if (/-/.test(x) && configuration['camel-case-expansion']) {
+            var c = camelCase(x)
+            flags.aliases[key].push(c)
+            newAliases[c] = true
+          }
+        })
+        flags.aliases[key].forEach(function (x) {
+          flags.aliases[x] = [key].concat(flags.aliases[key].filter(function (y) {
+            return x !== y
+          }))
+        })
+      })
+    })
+  }
+
+  // check if a flag is set for any of a key's aliases.
+  function checkAllAliases (key, flag) {
+    var isSet = false
+    var toCheck = [].concat(flags.aliases[key] || [], key)
+
+    toCheck.forEach(function (key) {
+      if (flag[key]) isSet = flag[key]
+    })
+
+    return isSet
+  }
+
+  function setDefaulted (key) {
+    [].concat(flags.aliases[key] || [], key).forEach(function (k) {
+      flags.defaulted[k] = true
+    })
+  }
+
+  function unsetDefaulted (key) {
+    [].concat(flags.aliases[key] || [], key).forEach(function (k) {
+      delete flags.defaulted[k]
+    })
+  }
+
+  // return a default value, given the type of a flag.,
+  // e.g., key of type 'string' will default to '', rather than 'true'.
+  function defaultForType (type) {
+    var def = {
+      boolean: true,
+      string: '',
+      number: undefined,
+      array: []
+    }
+
+    return def[type]
+  }
+
+  // given a flag, enforce a default type.
+  function guessType (key, flags) {
+    var type = 'boolean'
+
+    if (checkAllAliases(key, flags.strings)) type = 'string'
+    else if (checkAllAliases(key, flags.numbers)) type = 'number'
+    else if (checkAllAliases(key, flags.arrays)) type = 'array'
+
+    return type
+  }
+
+  function isNumber (x) {
+    if (!configuration['parse-numbers']) return false
+    if (typeof x === 'number') return true
+    if (/^0x[0-9a-f]+$/i.test(x)) return true
+    return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x)
+  }
+
+  function isUndefined (num) {
+    return num === undefined
+  }
+
+  return {
+    argv: argv,
+    error: error,
+    aliases: flags.aliases,
+    newAliases: newAliases,
+    configuration: configuration
+  }
+}
+
+// if any aliases reference each other, we should
+// merge them together.
+function combineAliases (aliases) {
+  var aliasArrays = []
+  var change = true
+  var combined = {}
+
+  // turn alias lookup hash {key: ['alias1', 'alias2']} into
+  // a simple array ['key', 'alias1', 'alias2']
+  Object.keys(aliases).forEach(function (key) {
+    aliasArrays.push(
+      [].concat(aliases[key], key)
+    )
+  })
+
+  // combine arrays until zero changes are
+  // made in an iteration.
+  while (change) {
+    change = false
+    for (var i = 0; i < aliasArrays.length; i++) {
+      for (var ii = i + 1; ii < aliasArrays.length; ii++) {
+        var intersect = aliasArrays[i].filter(function (v) {
+          return aliasArrays[ii].indexOf(v) !== -1
+        })
+
+        if (intersect.length) {
+          aliasArrays[i] = aliasArrays[i].concat(aliasArrays[ii])
+          aliasArrays.splice(ii, 1)
+          change = true
+          break
+        }
+      }
+    }
+  }
+
+  // map arrays back to the hash-lookup (de-dupe while
+  // we're at it).
+  aliasArrays.forEach(function (aliasArray) {
+    aliasArray = aliasArray.filter(function (v, i, self) {
+      return self.indexOf(v) === i
+    })
+    combined[aliasArray.pop()] = aliasArray
+  })
+
+  return combined
+}
+
+function assign (defaults, configuration) {
+  var o = {}
+  configuration = configuration || {}
+
+  Object.keys(defaults).forEach(function (k) {
+    o[k] = defaults[k]
+  })
+  Object.keys(configuration).forEach(function (k) {
+    o[k] = configuration[k]
+  })
+
+  return o
+}
+
+// this function should only be called when a count is given as an arg
+// it is NOT called to set a default value
+// thus we can start the count at 1 instead of 0
+function increment (orig) {
+  return orig !== undefined ? orig + 1 : 1
+}
+
+})();
diff --git a/test/VT_DATE/rlexe.xml b/test/VT_DATE/rlexe.xml
index d981292..832f558 100644
--- a/test/VT_DATE/rlexe.xml
+++ b/test/VT_DATE/rlexe.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
       <files>getvardate.js</files>
       <baseline>getVarDate.baseline</baseline>
-      <!-- test is timezone-sensitive; remove exclude_jenkins after fix -->
+      <!-- test is timezone-sensitive; remove exclude_jenkins after fix (Microsoft/ChakraCore#319) -->
       <tags>exclude_jenkins</tags>
     </default>
   </test>
diff --git a/test/WasmSpec/baselines/address.baseline b/test/WasmSpec/baselines/address.baseline
index 87bef92..64c9de6 100644
--- a/test/WasmSpec/baselines/address.baseline
+++ b/test/WasmSpec/baselines/address.baseline
@@ -1,39 +1,39 @@
-97

-98

-99

-122

-25185

-25185

-25442

-25699

-122

-1684234849

-1701077858

-1717920867

-122

-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

-6/6 tests passed.

+97
+98
+99
+122
+25185
+25185
+25442
+25699
+122
+1684234849
+1701077858
+1717920867
+122
+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
+7/7 tests passed.
diff --git a/test/WasmSpec/baselines/align.baseline b/test/WasmSpec/baselines/align.baseline
new file mode 100644
index 0000000..063c42f
--- /dev/null
+++ b/test/WasmSpec/baselines/align.baseline
@@ -0,0 +1 @@
+6/6 tests passed.
diff --git a/test/WasmSpec/baselines/binary.baseline b/test/WasmSpec/baselines/binary.baseline
index c179193..1878328 100644
--- a/test/WasmSpec/baselines/binary.baseline
+++ b/test/WasmSpec/baselines/binary.baseline
@@ -1,2 +1,2 @@
-(15) testsuite/core/binary.wast:17: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected

-16/17 tests passed.

+(28) testsuite/core/binary.wast:40: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+31/32 tests passed.
diff --git a/test/WasmSpec/baselines/block.baseline b/test/WasmSpec/baselines/block.baseline
index a474a8f..085f5be 100644
--- a/test/WasmSpec/baselines/block.baseline
+++ b/test/WasmSpec/baselines/block.baseline
@@ -1 +1 @@
-37/37 tests passed.

+39/39 tests passed.
diff --git a/test/WasmSpec/baselines/br.baseline b/test/WasmSpec/baselines/br.baseline
index bf761b2..ef675bc 100644
--- a/test/WasmSpec/baselines/br.baseline
+++ b/test/WasmSpec/baselines/br.baseline
@@ -1 +1 @@
-69/69 tests passed.

+69/69 tests passed.
diff --git a/test/WasmSpec/baselines/br_if.baseline b/test/WasmSpec/baselines/br_if.baseline
index 31bdb84..715d760 100644
--- a/test/WasmSpec/baselines/br_if.baseline
+++ b/test/WasmSpec/baselines/br_if.baseline
@@ -1 +1 @@
-59/59 tests passed.

+59/59 tests passed.
diff --git a/test/WasmSpec/baselines/br_table.baseline b/test/WasmSpec/baselines/br_table.baseline
index b5671e3..076fc7c 100644
--- a/test/WasmSpec/baselines/br_table.baseline
+++ b/test/WasmSpec/baselines/br_table.baseline
@@ -1 +1 @@
-159/159 tests passed.

+160/160 tests passed.
diff --git a/test/WasmSpec/baselines/break-drop.baseline b/test/WasmSpec/baselines/break-drop.baseline
index 4e65f75..93c8c21 100644
--- a/test/WasmSpec/baselines/break-drop.baseline
+++ b/test/WasmSpec/baselines/break-drop.baseline
@@ -1 +1 @@
-4/4 tests passed.

+4/4 tests passed.
diff --git a/test/WasmSpec/baselines/call.baseline b/test/WasmSpec/baselines/call.baseline
index 7aa7870..3074075 100644
--- a/test/WasmSpec/baselines/call.baseline
+++ b/test/WasmSpec/baselines/call.baseline
@@ -1 +1 @@
-48/48 tests passed.

+48/48 tests passed.
diff --git a/test/WasmSpec/baselines/call_indirect.baseline b/test/WasmSpec/baselines/call_indirect.baseline
index 8e1a3d7..73c5ac2 100644
--- a/test/WasmSpec/baselines/call_indirect.baseline
+++ b/test/WasmSpec/baselines/call_indirect.baseline
@@ -1 +1 @@
-68/68 tests passed.

+68/68 tests passed.
diff --git a/test/WasmSpec/baselines/chakra_i32.baseline b/test/WasmSpec/baselines/chakra_i32.baseline
index 3db9124..051c654 100644
--- a/test/WasmSpec/baselines/chakra_i32.baseline
+++ b/test/WasmSpec/baselines/chakra_i32.baseline
@@ -1 +1 @@
-975/975 tests passed.
+1024/1024 tests passed.
diff --git a/test/WasmSpec/baselines/chakra_i64.baseline b/test/WasmSpec/baselines/chakra_i64.baseline
index 135f82f..051c654 100644
--- a/test/WasmSpec/baselines/chakra_i64.baseline
+++ b/test/WasmSpec/baselines/chakra_i64.baseline
@@ -1 +1 @@
-981/981 tests passed.

+1024/1024 tests passed.
diff --git a/test/WasmSpec/baselines/comments.baseline b/test/WasmSpec/baselines/comments.baseline
deleted file mode 100644
index 4e65f75..0000000
--- a/test/WasmSpec/baselines/comments.baseline
+++ /dev/null
@@ -1 +0,0 @@
-4/4 tests passed.

diff --git a/test/WasmSpec/baselines/const.baseline b/test/WasmSpec/baselines/const.baseline
new file mode 100644
index 0000000..55b9739
--- /dev/null
+++ b/test/WasmSpec/baselines/const.baseline
@@ -0,0 +1 @@
+52/52 tests passed.
diff --git a/test/WasmSpec/baselines/conversions.baseline b/test/WasmSpec/baselines/conversions.baseline
index cf134a8..84da093 100644
--- a/test/WasmSpec/baselines/conversions.baseline
+++ b/test/WasmSpec/baselines/conversions.baseline
@@ -1 +1 @@
-366/366 tests passed.

+396/396 tests passed.
diff --git a/test/WasmSpec/baselines/custom_section.baseline b/test/WasmSpec/baselines/custom_section.baseline
index b507845..2e3c656 100644
--- a/test/WasmSpec/baselines/custom_section.baseline
+++ b/test/WasmSpec/baselines/custom_section.baseline
@@ -1 +1 @@
-7/7 tests passed.

+9/9 tests passed.
diff --git a/test/WasmSpec/baselines/endianness.baseline b/test/WasmSpec/baselines/endianness.baseline
index bf761b2..ef675bc 100644
--- a/test/WasmSpec/baselines/endianness.baseline
+++ b/test/WasmSpec/baselines/endianness.baseline
@@ -1 +1 @@
-69/69 tests passed.

+69/69 tests passed.
diff --git a/test/WasmSpec/baselines/exports.baseline b/test/WasmSpec/baselines/exports.baseline
index 0198061..4984eda 100644
--- a/test/WasmSpec/baselines/exports.baseline
+++ b/test/WasmSpec/baselines/exports.baseline
@@ -1 +1 @@
-80/80 tests passed.

+82/82 tests passed.
diff --git a/test/WasmSpec/baselines/f32.baseline b/test/WasmSpec/baselines/f32.baseline
index 1fdb04e..e57d05e 100644
--- a/test/WasmSpec/baselines/f32.baseline
+++ b/test/WasmSpec/baselines/f32.baseline
@@ -1 +1 @@
-2447/2447 tests passed.

+2501/2501 tests passed.
diff --git a/test/WasmSpec/baselines/f32_bitwise.baseline b/test/WasmSpec/baselines/f32_bitwise.baseline
new file mode 100644
index 0000000..c8bd3fa
--- /dev/null
+++ b/test/WasmSpec/baselines/f32_bitwise.baseline
@@ -0,0 +1 @@
+361/361 tests passed.
diff --git a/test/WasmSpec/baselines/f32_cmp.baseline b/test/WasmSpec/baselines/f32_cmp.baseline
index 5aa0e1b..6af5eab 100644
--- a/test/WasmSpec/baselines/f32_cmp.baseline
+++ b/test/WasmSpec/baselines/f32_cmp.baseline
@@ -1 +1 @@
-1945/1945 tests passed.

+2401/2401 tests passed.
diff --git a/test/WasmSpec/baselines/f64.baseline b/test/WasmSpec/baselines/f64.baseline
index 68d2d0c..e57d05e 100644
--- a/test/WasmSpec/baselines/f64.baseline
+++ b/test/WasmSpec/baselines/f64.baseline
@@ -1 +1 @@
-2463/2463 tests passed.

+2501/2501 tests passed.
diff --git a/test/WasmSpec/baselines/f64_bitwise.baseline b/test/WasmSpec/baselines/f64_bitwise.baseline
new file mode 100644
index 0000000..c8bd3fa
--- /dev/null
+++ b/test/WasmSpec/baselines/f64_bitwise.baseline
@@ -0,0 +1 @@
+361/361 tests passed.
diff --git a/test/WasmSpec/baselines/f64_cmp.baseline b/test/WasmSpec/baselines/f64_cmp.baseline
index 5aa0e1b..6af5eab 100644
--- a/test/WasmSpec/baselines/f64_cmp.baseline
+++ b/test/WasmSpec/baselines/f64_cmp.baseline
@@ -1 +1 @@
-1945/1945 tests passed.

+2401/2401 tests passed.
diff --git a/test/WasmSpec/baselines/fac.baseline b/test/WasmSpec/baselines/fac.baseline
index b507845..e0cd476 100644
--- a/test/WasmSpec/baselines/fac.baseline
+++ b/test/WasmSpec/baselines/fac.baseline
@@ -1 +1 @@
-7/7 tests passed.

+7/7 tests passed.
diff --git a/test/WasmSpec/baselines/float_exprs.baseline b/test/WasmSpec/baselines/float_exprs.baseline
index 1753fac..9ac0031 100644
--- a/test/WasmSpec/baselines/float_exprs.baseline
+++ b/test/WasmSpec/baselines/float_exprs.baseline
@@ -1 +1 @@
-802/802 tests passed.

+896/896 tests passed.
diff --git a/test/WasmSpec/baselines/float_literals.baseline b/test/WasmSpec/baselines/float_literals.baseline
index 8e8793d..728a693 100644
--- a/test/WasmSpec/baselines/float_literals.baseline
+++ b/test/WasmSpec/baselines/float_literals.baseline
@@ -1 +1 @@
-54/54 tests passed.

+54/54 tests passed.
diff --git a/test/WasmSpec/baselines/float_memory.baseline b/test/WasmSpec/baselines/float_memory.baseline
index ce605aa..f768734 100644
--- a/test/WasmSpec/baselines/float_memory.baseline
+++ b/test/WasmSpec/baselines/float_memory.baseline
@@ -1 +1 @@
-86/86 tests passed.

+86/86 tests passed.
diff --git a/test/WasmSpec/baselines/float_misc.baseline b/test/WasmSpec/baselines/float_misc.baseline
index e405a02..3dcfa81 100644
--- a/test/WasmSpec/baselines/float_misc.baseline
+++ b/test/WasmSpec/baselines/float_misc.baseline
@@ -1 +1 @@
-418/418 tests passed.

+441/441 tests passed.
diff --git a/test/WasmSpec/baselines/forward.baseline b/test/WasmSpec/baselines/forward.baseline
index db4ae9a..0be947f 100644
--- a/test/WasmSpec/baselines/forward.baseline
+++ b/test/WasmSpec/baselines/forward.baseline
@@ -1 +1 @@
-5/5 tests passed.

+5/5 tests passed.
diff --git a/test/WasmSpec/baselines/func.baseline b/test/WasmSpec/baselines/func.baseline
index 827dcfb..65e61b9 100644
--- a/test/WasmSpec/baselines/func.baseline
+++ b/test/WasmSpec/baselines/func.baseline
@@ -1 +1 @@
-97/97 tests passed.

+103/103 tests passed.
diff --git a/test/WasmSpec/baselines/func_ptrs.baseline b/test/WasmSpec/baselines/func_ptrs.baseline
index fe24418..0775bf2 100644
--- a/test/WasmSpec/baselines/func_ptrs.baseline
+++ b/test/WasmSpec/baselines/func_ptrs.baseline
@@ -1,2 +1,2 @@
-83

-36/36 tests passed.

+83
+36/36 tests passed.
diff --git a/test/WasmSpec/baselines/get_local.baseline b/test/WasmSpec/baselines/get_local.baseline
index dabc18b..d83b67b 100644
--- a/test/WasmSpec/baselines/get_local.baseline
+++ b/test/WasmSpec/baselines/get_local.baseline
@@ -1 +1 @@
-23/23 tests passed.

+23/23 tests passed.
diff --git a/test/WasmSpec/baselines/globals.baseline b/test/WasmSpec/baselines/globals.baseline
index 7156c50..50653a7 100644
--- a/test/WasmSpec/baselines/globals.baseline
+++ b/test/WasmSpec/baselines/globals.baseline
@@ -1 +1 @@
-33/33 tests passed.

+38/38 tests passed.
diff --git a/test/WasmSpec/baselines/i32.baseline b/test/WasmSpec/baselines/i32.baseline
index 1dc9a26..87c1219 100644
--- a/test/WasmSpec/baselines/i32.baseline
+++ b/test/WasmSpec/baselines/i32.baseline
@@ -1 +1 @@
-343/343 tests passed.

+360/360 tests passed.
diff --git a/test/WasmSpec/baselines/i64.baseline b/test/WasmSpec/baselines/i64.baseline
index 0f921a2..87c1219 100644
--- a/test/WasmSpec/baselines/i64.baseline
+++ b/test/WasmSpec/baselines/i64.baseline
@@ -1 +1 @@
-345/345 tests passed.

+360/360 tests passed.
diff --git a/test/WasmSpec/baselines/if.baseline b/test/WasmSpec/baselines/if.baseline
index fa0c584..4118578 100644
--- a/test/WasmSpec/baselines/if.baseline
+++ b/test/WasmSpec/baselines/if.baseline
@@ -1,3 +1,3 @@
-(53) testsuite/core/if.wast:248: assert_invalid module failed. Had a linking error, expected a compile error: TypeError: Object expected

-(55) testsuite/core/if.wast:260: assert_invalid module failed. Had a linking error, expected a compile error: TypeError: Object expected

-71/73 tests passed.

+(53) testsuite/core/if.wast:248: assert_invalid module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(55) testsuite/core/if.wast:260: assert_invalid module failed. Had a linking error, expected a compile error: TypeError: Object expected
+81/83 tests passed.
diff --git a/test/WasmSpec/baselines/imports.baseline b/test/WasmSpec/baselines/imports.baseline
index 439db7c..d12072e 100644
--- a/test/WasmSpec/baselines/imports.baseline
+++ b/test/WasmSpec/baselines/imports.baseline
@@ -1,11 +1,11 @@
-13

-14 42

-13

-13

-13

-13

-25 53

-24

-24

-24

-128/128 tests passed.

+13
+14 42
+13
+13
+13
+13
+25 53
+24
+24
+24
+144/144 tests passed.
diff --git a/test/WasmSpec/baselines/inline-module.baseline b/test/WasmSpec/baselines/inline-module.baseline
new file mode 100644
index 0000000..672952b
--- /dev/null
+++ b/test/WasmSpec/baselines/inline-module.baseline
@@ -0,0 +1 @@
+1/1 tests passed.
diff --git a/test/WasmSpec/baselines/int_exprs.baseline b/test/WasmSpec/baselines/int_exprs.baseline
index b39338c..c4be48c 100644
--- a/test/WasmSpec/baselines/int_exprs.baseline
+++ b/test/WasmSpec/baselines/int_exprs.baseline
@@ -1 +1 @@
-95/95 tests passed.

+108/108 tests passed.
diff --git a/test/WasmSpec/baselines/int_literals.baseline b/test/WasmSpec/baselines/int_literals.baseline
index dabc18b..d83b67b 100644
--- a/test/WasmSpec/baselines/int_literals.baseline
+++ b/test/WasmSpec/baselines/int_literals.baseline
@@ -1 +1 @@
-23/23 tests passed.

+23/23 tests passed.
diff --git a/test/WasmSpec/baselines/jsapi.baseline b/test/WasmSpec/baselines/jsapi.baseline
index 1c3bda6..ae1ec8b 100644
--- a/test/WasmSpec/baselines/jsapi.baseline
+++ b/test/WasmSpec/baselines/jsapi.baseline
@@ -1,91 +1,89 @@
-Harness Status: OK

-Found 89 tests: Pass = 67 Fail = 22

-Pass 'WebAssembly' data property on global object  

-Fail 'WebAssembly' object  assert_equals: expected "[object WebAssembly]" but got "[object Object]"

-Pass 'WebAssembly.(Compile|Link|Runtime)Error' data property  

-Fail 'WebAssembly.(Compile|Runtime)Error' constructor function  assert_equals: expected "CompileError" but got "WebAssemblyCompileError"

-Pass 'WebAssembly.(Compile|Runtime)Error' instance objects  

-Pass 'WebAssembly.Module' data property  

-Fail 'WebAssembly.Module' constructor function  assert_equals: expected "Module" but got "WebAssemblyModule"

-Pass 'WebAssembly.Module.prototype' data property  

-Fail 'WebAssembly.Module.prototype' object  assert_equals: expected "[object WebAssembly.Module]" but got "[object WebAssemblyModule]"

-Fail 'WebAssembly.Module' instance objects  assert_equals: expected "[object WebAssembly.Module]" but got "[object WebAssemblyModule]"

-Pass 'WebAssembly.Module.imports' data property  

-Fail 'WebAssembly.Module.imports' method  assert_equals: expected 1 but got 2

-Pass 'WebAssembly.Module.exports' data property  

-Fail 'WebAssembly.Module.exports' method  assert_equals: expected 1 but got 2

-Pass 'WebAssembly.Module.customSections' data property  

-Fail 'WebAssembly.Module.customSections' method  'sectionName' is not a string

-Pass 'WebAssembly.Instance' data property  

-Fail 'WebAssembly.Instance' constructor function  assert_equals: expected "Instance" but got "WebAssemblyInstance"

-Pass 'WebAssembly.Instance.prototype' data property  

-Fail 'WebAssembly.Instance.prototype' object  assert_equals: expected "[object WebAssembly.Instance]" but got "[object WebAssemblyInstance]"

-Fail 'WebAssembly.Instance' instance objects  assert_equals: expected "[object WebAssembly.Instance]" but got "[object WebAssemblyInstance]"

-Pass 'WebAssembly.Instance' 'exports' data property  

-Fail 'WebAssembly.Instance' 'exports' object  assert_equals: expected false but got true

-Fail Exported WebAssembly functions  assert_equals: expected 0 but got -1

-Pass 'WebAssembly.Memory' data property  

-Fail 'WebAssembly.Memory' constructor function  assert_equals: expected "Memory" but got "WebAssemblyMemory"

-Pass 'WebAssembly.Memory.prototype' data property  

-Fail 'WebAssembly.Memory.prototype' object  assert_equals: expected "[object WebAssembly.Memory]" but got "[object WebAssemblyMemory]"

-Fail 'WebAssembly.Memory' instance objects  assert_equals: expected "[object WebAssembly.Memory]" but got "[object WebAssemblyMemory]"

-Pass 'WebAssembly.Memory.prototype.buffer' accessor property  

-Pass 'WebAssembly.Memory.prototype.buffer' getter  

-Pass 'WebAssembly.Memory.prototype.grow' data property  

-Fail 'WebAssembly.Memory.prototype.grow' method  assert_equals: expected true but got false

-Pass 'WebAssembly.Table' data property  

-Fail 'WebAssembly.Table' constructor function  assert_equals: expected "Table" but got "WebAssemblyTable"

-Pass 'WebAssembly.Table.prototype' data property  

-Fail 'WebAssembly.Table.prototype' object  assert_equals: expected "[object WebAssembly.Table]" but got "[object WebAssemblyTable]"

-Fail 'WebAssembly.Table' instance objects  assert_equals: expected "[object WebAssembly.Table]" but got "[object WebAssemblyTable]"

-Pass 'WebAssembly.Table.prototype.length' accessor data property  

-Pass 'WebAssembly.Table.prototype.length' getter  

-Pass 'WebAssembly.Table.prototype.get' data property  

-Pass 'WebAssembly.Table.prototype.get' method  

-Pass 'WebAssembly.Table.prototype.set' data property  

-Fail 'WebAssembly.Table.prototype.set' method  assert_equals: expected 2 but got 1

-Pass 'WebAssembly.Table.prototype.grow' data property  

-Fail 'WebAssembly.Table.prototype.grow' method  assert_equals: expected (number) 1 but got (undefined) undefined

-Pass 'WebAssembly.validate' method  

-Pass 'WebAssembly.compile' data property  

-Pass 'WebAssembly.compile' function  

-Pass assertCompileError 1  

-Pass assertCompileError 2  

-Pass assertCompileError 3  

-Pass assertCompileError 4  

-Pass assertCompileError 5  

-Pass assertCompileError 6  

-Pass assertCompileError 7  

-Pass assertCompileError 8  

-Pass assertCompileSuccess 1  

-Pass assertCompileSuccess 2  

-Pass 'WebAssembly.instantiate' data property  

-Pass 'WebAssembly.instantiate' function  

-Pass unexpected success in assertInstantiateError  

-Pass unexpected success in assertInstantiateError  

-Pass unexpected success in assertInstantiateError  

-Pass unexpected success in assertInstantiateError  

-Pass unexpected success in assertInstantiateError  

-Pass unexpected success in assertInstantiateError  

-Pass unexpected success in assertInstantiateError  

-Pass unexpected success in assertInstantiateError  

-Pass unexpected success in assertInstantiateError  

-Pass unexpected success in assertInstantiateError  

-Pass unexpected success in assertInstantiateError  

-Pass unexpected success in assertInstantiateError  

-Pass unexpected success in assertInstantiateError  

-Pass unexpected success in assertInstantiateError  

-Pass unexpected success in assertInstantiateError  

-Pass unexpected success in assertInstantiateError  

-Pass unexpected success in assertInstantiateError  

-Pass unexpected success in assertInstantiateError  

-Pass unexpected success in assertInstantiateError  

-Pass unexpected success in assertInstantiateError  

-Pass unexpected success in assertInstantiateError  

-Pass unexpected failure in assertInstantiateSuccess  

-Pass unexpected failure in assertInstantiateSuccess  

-Pass unexpected failure in assertInstantiateSuccess  

-Pass unexpected failure in assertInstantiateSuccess  

-Pass unexpected failure in assertInstantiateSuccess  

-Pass unexpected failure in assertInstantiateSuccess  

-Pass unexpected failure in assertInstantiateSuccess  

+Harness Status: OK
+Found 87 tests: Pass = 86 Fail = 1
+Pass 'WebAssembly' data property on global object  
+Pass 'WebAssembly' object  
+Pass 'WebAssembly.(Compile|Link|Runtime)Error' data property  
+Pass 'WebAssembly.(Compile|Runtime)Error' constructor function  
+Pass 'WebAssembly.(Compile|Runtime)Error' instance objects  
+Pass 'WebAssembly.Module' data property  
+Pass 'WebAssembly.Module' constructor function  
+Pass 'WebAssembly.Module.prototype' data property  
+Pass 'WebAssembly.Module.prototype' object  
+Pass 'WebAssembly.Module' instance objects  
+Pass 'WebAssembly.Module.imports' data property  
+Pass 'WebAssembly.Module.imports' method  
+Pass 'WebAssembly.Module.exports' data property  
+Pass 'WebAssembly.Module.exports' method  
+Pass 'WebAssembly.Module.customSections' data property  
+Pass 'WebAssembly.Module.customSections' method  
+Pass 'WebAssembly.Instance' data property  
+Pass 'WebAssembly.Instance' constructor function  
+Pass 'WebAssembly.Instance.prototype' data property  
+Pass 'WebAssembly.Instance.prototype' object  
+Pass 'WebAssembly.Instance' instance objects  
+Pass 'WebAssembly.Instance.prototype.exports' accessor property  
+Pass exports object  
+Fail Exported WebAssembly functions  assert_equals: expected 0 but got -1
+Pass 'WebAssembly.Memory' data property  
+Pass 'WebAssembly.Memory' constructor function  
+Pass 'WebAssembly.Memory.prototype' data property  
+Pass 'WebAssembly.Memory.prototype' object  
+Pass 'WebAssembly.Memory' instance objects  
+Pass 'WebAssembly.Memory.prototype.buffer' accessor property  
+Pass 'WebAssembly.Memory.prototype.buffer' getter  
+Pass 'WebAssembly.Memory.prototype.grow' data property  
+Pass 'WebAssembly.Memory.prototype.grow' method  
+Pass 'WebAssembly.Table' data property  
+Pass 'WebAssembly.Table' constructor function  
+Pass 'WebAssembly.Table.prototype' data property  
+Pass 'WebAssembly.Table.prototype' object  
+Pass 'WebAssembly.Table' instance objects  
+Pass 'WebAssembly.Table.prototype.length' accessor data property  
+Pass 'WebAssembly.Table.prototype.length' getter  
+Pass 'WebAssembly.Table.prototype.get' data property  
+Pass 'WebAssembly.Table.prototype.get' method  
+Pass 'WebAssembly.Table.prototype.set' data property  
+Pass 'WebAssembly.Table.prototype.set' method  
+Pass 'WebAssembly.Table.prototype.grow' data property  
+Pass 'WebAssembly.Table.prototype.grow' method  
+Pass 'WebAssembly.validate' method  
+Pass 'WebAssembly.compile' data property  
+Pass 'WebAssembly.compile' function  
+Pass assertCompileError 1  
+Pass assertCompileError 2  
+Pass assertCompileError 3  
+Pass assertCompileError 4  
+Pass assertCompileError 5  
+Pass assertCompileError 6  
+Pass assertCompileError 7  
+Pass assertCompileSuccess 1  
+Pass assertCompileSuccess 2  
+Pass 'WebAssembly.instantiate' data property  
+Pass 'WebAssembly.instantiate' function  
+Pass unexpected success in assertInstantiateError  
+Pass unexpected success in assertInstantiateError  
+Pass unexpected success in assertInstantiateError  
+Pass unexpected success in assertInstantiateError  
+Pass unexpected success in assertInstantiateError  
+Pass unexpected success in assertInstantiateError  
+Pass unexpected success in assertInstantiateError  
+Pass unexpected success in assertInstantiateError  
+Pass unexpected success in assertInstantiateError  
+Pass unexpected success in assertInstantiateError  
+Pass unexpected success in assertInstantiateError  
+Pass unexpected success in assertInstantiateError  
+Pass unexpected success in assertInstantiateError  
+Pass unexpected success in assertInstantiateError  
+Pass unexpected success in assertInstantiateError  
+Pass unexpected success in assertInstantiateError  
+Pass unexpected success in assertInstantiateError  
+Pass unexpected success in assertInstantiateError  
+Pass unexpected success in assertInstantiateError  
+Pass unexpected success in assertInstantiateError  
+Pass unexpected failure in assertInstantiateSuccess  
+Pass unexpected failure in assertInstantiateSuccess  
+Pass unexpected failure in assertInstantiateSuccess  
+Pass unexpected failure in assertInstantiateSuccess  
+Pass unexpected failure in assertInstantiateSuccess  
+Pass unexpected failure in assertInstantiateSuccess  
+Pass unexpected failure in assertInstantiateSuccess  
diff --git a/test/WasmSpec/baselines/labels.baseline b/test/WasmSpec/baselines/labels.baseline
index 3e40205..3ec9639 100644
--- a/test/WasmSpec/baselines/labels.baseline
+++ b/test/WasmSpec/baselines/labels.baseline
@@ -1 +1 @@
-28/28 tests passed.

+28/28 tests passed.
diff --git a/test/WasmSpec/baselines/left-to-right.baseline b/test/WasmSpec/baselines/left-to-right.baseline
index 0c925a0..30bc2dc 100644
--- a/test/WasmSpec/baselines/left-to-right.baseline
+++ b/test/WasmSpec/baselines/left-to-right.baseline
@@ -1 +1 @@
-96/96 tests passed.

+96/96 tests passed.
diff --git a/test/WasmSpec/baselines/linking.baseline b/test/WasmSpec/baselines/linking.baseline
index 151edca..9c78147 100644
--- a/test/WasmSpec/baselines/linking.baseline
+++ b/test/WasmSpec/baselines/linking.baseline
@@ -1 +1 @@
-93/93 tests passed.

+93/93 tests passed.
diff --git a/test/WasmSpec/baselines/loop.baseline b/test/WasmSpec/baselines/loop.baseline
index 3824daa..728a693 100644
--- a/test/WasmSpec/baselines/loop.baseline
+++ b/test/WasmSpec/baselines/loop.baseline
@@ -1 +1 @@
-52/52 tests passed.

+54/54 tests passed.
diff --git a/test/WasmSpec/baselines/memory.baseline b/test/WasmSpec/baselines/memory.baseline
index 5defa22..9830d3c 100644
--- a/test/WasmSpec/baselines/memory.baseline
+++ b/test/WasmSpec/baselines/memory.baseline
@@ -1 +1 @@
-90/90 tests passed.

+130/130 tests passed.
diff --git a/test/WasmSpec/baselines/memory_redundancy.baseline b/test/WasmSpec/baselines/memory_redundancy.baseline
index 1e27b47..e4f2fb5 100644
--- a/test/WasmSpec/baselines/memory_redundancy.baseline
+++ b/test/WasmSpec/baselines/memory_redundancy.baseline
@@ -1 +1 @@
-6/6 tests passed.

+8/8 tests passed.
diff --git a/test/WasmSpec/baselines/memory_trap.baseline b/test/WasmSpec/baselines/memory_trap.baseline
index b9c25a5..2610d59 100644
--- a/test/WasmSpec/baselines/memory_trap.baseline
+++ b/test/WasmSpec/baselines/memory_trap.baseline
@@ -1 +1 @@
-41/41 tests passed.

+173/173 tests passed.
diff --git a/test/WasmSpec/baselines/names.baseline b/test/WasmSpec/baselines/names.baseline
index e34ed56..4f175d1 100644
--- a/test/WasmSpec/baselines/names.baseline
+++ b/test/WasmSpec/baselines/names.baseline
Binary files differ
diff --git a/test/WasmSpec/baselines/nop.baseline b/test/WasmSpec/baselines/nop.baseline
index 177d34e..181a7d7 100644
--- a/test/WasmSpec/baselines/nop.baseline
+++ b/test/WasmSpec/baselines/nop.baseline
@@ -1 +1 @@
-55/55 tests passed.

+55/55 tests passed.
diff --git a/test/WasmSpec/baselines/resizing.baseline b/test/WasmSpec/baselines/resizing.baseline
index 8d58a85..d0265c6 100644
--- a/test/WasmSpec/baselines/resizing.baseline
+++ b/test/WasmSpec/baselines/resizing.baseline
@@ -1 +1 @@
-35/35 tests passed.

+37/37 tests passed.
diff --git a/test/WasmSpec/baselines/return.baseline b/test/WasmSpec/baselines/return.baseline
index 5dfa13f..98039e7 100644
--- a/test/WasmSpec/baselines/return.baseline
+++ b/test/WasmSpec/baselines/return.baseline
@@ -1 +1 @@
-61/61 tests passed.

+61/61 tests passed.
diff --git a/test/WasmSpec/baselines/token.baseline b/test/WasmSpec/baselines/token.baseline
new file mode 100644
index 0000000..af1b345
--- /dev/null
+++ b/test/WasmSpec/baselines/token.baseline
@@ -0,0 +1 @@
+2/2 tests passed.
diff --git a/test/WasmSpec/baselines/traps.baseline b/test/WasmSpec/baselines/traps.baseline
deleted file mode 100644
index 8072d72..0000000
--- a/test/WasmSpec/baselines/traps.baseline
+++ /dev/null
@@ -1 +0,0 @@
-24/24 tests passed.

diff --git a/test/WasmSpec/baselines/type.baseline b/test/WasmSpec/baselines/type.baseline
new file mode 100644
index 0000000..0be947f
--- /dev/null
+++ b/test/WasmSpec/baselines/type.baseline
@@ -0,0 +1 @@
+5/5 tests passed.
diff --git a/test/WasmSpec/baselines/utf8-custom-section-id.baseline b/test/WasmSpec/baselines/utf8-custom-section-id.baseline
new file mode 100644
index 0000000..6a9c260
--- /dev/null
+++ b/test/WasmSpec/baselines/utf8-custom-section-id.baseline
@@ -0,0 +1,177 @@
+(1) testsuite/core/utf8-custom-section-id.wast:7: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(2) testsuite/core/utf8-custom-section-id.wast:17: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(3) testsuite/core/utf8-custom-section-id.wast:27: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(4) testsuite/core/utf8-custom-section-id.wast:37: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(5) testsuite/core/utf8-custom-section-id.wast:47: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(6) testsuite/core/utf8-custom-section-id.wast:57: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(7) testsuite/core/utf8-custom-section-id.wast:69: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(8) testsuite/core/utf8-custom-section-id.wast:79: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(9) testsuite/core/utf8-custom-section-id.wast:89: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(10) testsuite/core/utf8-custom-section-id.wast:101: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(11) testsuite/core/utf8-custom-section-id.wast:111: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(12) testsuite/core/utf8-custom-section-id.wast:121: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(13) testsuite/core/utf8-custom-section-id.wast:131: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(14) testsuite/core/utf8-custom-section-id.wast:141: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(15) testsuite/core/utf8-custom-section-id.wast:151: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(16) testsuite/core/utf8-custom-section-id.wast:161: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(17) testsuite/core/utf8-custom-section-id.wast:171: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(18) testsuite/core/utf8-custom-section-id.wast:181: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(19) testsuite/core/utf8-custom-section-id.wast:191: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(20) testsuite/core/utf8-custom-section-id.wast:201: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(21) testsuite/core/utf8-custom-section-id.wast:211: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(22) testsuite/core/utf8-custom-section-id.wast:223: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(23) testsuite/core/utf8-custom-section-id.wast:233: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(24) testsuite/core/utf8-custom-section-id.wast:243: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(25) testsuite/core/utf8-custom-section-id.wast:253: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(26) testsuite/core/utf8-custom-section-id.wast:263: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(27) testsuite/core/utf8-custom-section-id.wast:275: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(28) testsuite/core/utf8-custom-section-id.wast:285: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(29) testsuite/core/utf8-custom-section-id.wast:295: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(30) testsuite/core/utf8-custom-section-id.wast:305: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(31) testsuite/core/utf8-custom-section-id.wast:315: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(32) testsuite/core/utf8-custom-section-id.wast:325: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(33) testsuite/core/utf8-custom-section-id.wast:335: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(34) testsuite/core/utf8-custom-section-id.wast:345: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(35) testsuite/core/utf8-custom-section-id.wast:355: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(36) testsuite/core/utf8-custom-section-id.wast:365: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(37) testsuite/core/utf8-custom-section-id.wast:375: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(38) testsuite/core/utf8-custom-section-id.wast:385: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(39) testsuite/core/utf8-custom-section-id.wast:395: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(40) testsuite/core/utf8-custom-section-id.wast:405: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(41) testsuite/core/utf8-custom-section-id.wast:415: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(42) testsuite/core/utf8-custom-section-id.wast:425: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(43) testsuite/core/utf8-custom-section-id.wast:435: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(44) testsuite/core/utf8-custom-section-id.wast:445: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(45) testsuite/core/utf8-custom-section-id.wast:455: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(46) testsuite/core/utf8-custom-section-id.wast:465: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(47) testsuite/core/utf8-custom-section-id.wast:475: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(48) testsuite/core/utf8-custom-section-id.wast:485: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(49) testsuite/core/utf8-custom-section-id.wast:495: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(50) testsuite/core/utf8-custom-section-id.wast:505: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(51) testsuite/core/utf8-custom-section-id.wast:515: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(52) testsuite/core/utf8-custom-section-id.wast:525: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(53) testsuite/core/utf8-custom-section-id.wast:535: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(54) testsuite/core/utf8-custom-section-id.wast:545: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(55) testsuite/core/utf8-custom-section-id.wast:555: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(56) testsuite/core/utf8-custom-section-id.wast:565: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(57) testsuite/core/utf8-custom-section-id.wast:575: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(58) testsuite/core/utf8-custom-section-id.wast:585: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(59) testsuite/core/utf8-custom-section-id.wast:597: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(60) testsuite/core/utf8-custom-section-id.wast:607: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(61) testsuite/core/utf8-custom-section-id.wast:617: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(62) testsuite/core/utf8-custom-section-id.wast:627: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(63) testsuite/core/utf8-custom-section-id.wast:637: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(64) testsuite/core/utf8-custom-section-id.wast:647: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(65) testsuite/core/utf8-custom-section-id.wast:657: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(66) testsuite/core/utf8-custom-section-id.wast:667: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(67) testsuite/core/utf8-custom-section-id.wast:677: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(68) testsuite/core/utf8-custom-section-id.wast:687: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(69) testsuite/core/utf8-custom-section-id.wast:697: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(70) testsuite/core/utf8-custom-section-id.wast:707: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(71) testsuite/core/utf8-custom-section-id.wast:717: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(72) testsuite/core/utf8-custom-section-id.wast:727: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(73) testsuite/core/utf8-custom-section-id.wast:737: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(74) testsuite/core/utf8-custom-section-id.wast:747: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(75) testsuite/core/utf8-custom-section-id.wast:757: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(76) testsuite/core/utf8-custom-section-id.wast:767: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(77) testsuite/core/utf8-custom-section-id.wast:777: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(78) testsuite/core/utf8-custom-section-id.wast:787: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(79) testsuite/core/utf8-custom-section-id.wast:797: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(80) testsuite/core/utf8-custom-section-id.wast:807: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(81) testsuite/core/utf8-custom-section-id.wast:817: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(82) testsuite/core/utf8-custom-section-id.wast:827: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(83) testsuite/core/utf8-custom-section-id.wast:839: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(84) testsuite/core/utf8-custom-section-id.wast:849: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(85) testsuite/core/utf8-custom-section-id.wast:859: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(86) testsuite/core/utf8-custom-section-id.wast:869: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(87) testsuite/core/utf8-custom-section-id.wast:879: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(88) testsuite/core/utf8-custom-section-id.wast:889: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(89) testsuite/core/utf8-custom-section-id.wast:899: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(90) testsuite/core/utf8-custom-section-id.wast:911: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(91) testsuite/core/utf8-custom-section-id.wast:921: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(92) testsuite/core/utf8-custom-section-id.wast:931: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(93) testsuite/core/utf8-custom-section-id.wast:941: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(94) testsuite/core/utf8-custom-section-id.wast:951: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(95) testsuite/core/utf8-custom-section-id.wast:961: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(96) testsuite/core/utf8-custom-section-id.wast:971: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(97) testsuite/core/utf8-custom-section-id.wast:981: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(98) testsuite/core/utf8-custom-section-id.wast:991: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(99) testsuite/core/utf8-custom-section-id.wast:1001: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(100) testsuite/core/utf8-custom-section-id.wast:1011: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(101) testsuite/core/utf8-custom-section-id.wast:1021: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(102) testsuite/core/utf8-custom-section-id.wast:1031: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(103) testsuite/core/utf8-custom-section-id.wast:1041: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(104) testsuite/core/utf8-custom-section-id.wast:1051: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(105) testsuite/core/utf8-custom-section-id.wast:1061: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(106) testsuite/core/utf8-custom-section-id.wast:1071: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(107) testsuite/core/utf8-custom-section-id.wast:1081: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(108) testsuite/core/utf8-custom-section-id.wast:1091: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(109) testsuite/core/utf8-custom-section-id.wast:1101: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(110) testsuite/core/utf8-custom-section-id.wast:1111: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(111) testsuite/core/utf8-custom-section-id.wast:1121: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(112) testsuite/core/utf8-custom-section-id.wast:1131: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(113) testsuite/core/utf8-custom-section-id.wast:1141: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(114) testsuite/core/utf8-custom-section-id.wast:1151: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(115) testsuite/core/utf8-custom-section-id.wast:1163: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(116) testsuite/core/utf8-custom-section-id.wast:1173: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(117) testsuite/core/utf8-custom-section-id.wast:1183: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(118) testsuite/core/utf8-custom-section-id.wast:1193: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(119) testsuite/core/utf8-custom-section-id.wast:1203: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(120) testsuite/core/utf8-custom-section-id.wast:1213: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(121) testsuite/core/utf8-custom-section-id.wast:1223: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(122) testsuite/core/utf8-custom-section-id.wast:1233: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(123) testsuite/core/utf8-custom-section-id.wast:1243: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(124) testsuite/core/utf8-custom-section-id.wast:1253: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(125) testsuite/core/utf8-custom-section-id.wast:1263: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(126) testsuite/core/utf8-custom-section-id.wast:1273: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(127) testsuite/core/utf8-custom-section-id.wast:1283: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(128) testsuite/core/utf8-custom-section-id.wast:1293: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(129) testsuite/core/utf8-custom-section-id.wast:1303: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(130) testsuite/core/utf8-custom-section-id.wast:1313: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(131) testsuite/core/utf8-custom-section-id.wast:1325: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(132) testsuite/core/utf8-custom-section-id.wast:1335: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(133) testsuite/core/utf8-custom-section-id.wast:1345: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(134) testsuite/core/utf8-custom-section-id.wast:1355: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(135) testsuite/core/utf8-custom-section-id.wast:1365: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(136) testsuite/core/utf8-custom-section-id.wast:1375: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(137) testsuite/core/utf8-custom-section-id.wast:1385: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(138) testsuite/core/utf8-custom-section-id.wast:1395: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(139) testsuite/core/utf8-custom-section-id.wast:1405: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(140) testsuite/core/utf8-custom-section-id.wast:1415: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(141) testsuite/core/utf8-custom-section-id.wast:1425: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(142) testsuite/core/utf8-custom-section-id.wast:1435: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(143) testsuite/core/utf8-custom-section-id.wast:1445: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(144) testsuite/core/utf8-custom-section-id.wast:1455: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(145) testsuite/core/utf8-custom-section-id.wast:1465: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(146) testsuite/core/utf8-custom-section-id.wast:1475: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(147) testsuite/core/utf8-custom-section-id.wast:1487: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(148) testsuite/core/utf8-custom-section-id.wast:1497: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(149) testsuite/core/utf8-custom-section-id.wast:1507: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(150) testsuite/core/utf8-custom-section-id.wast:1517: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(151) testsuite/core/utf8-custom-section-id.wast:1527: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(152) testsuite/core/utf8-custom-section-id.wast:1537: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(153) testsuite/core/utf8-custom-section-id.wast:1547: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(154) testsuite/core/utf8-custom-section-id.wast:1557: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(155) testsuite/core/utf8-custom-section-id.wast:1567: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(156) testsuite/core/utf8-custom-section-id.wast:1579: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(157) testsuite/core/utf8-custom-section-id.wast:1589: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(158) testsuite/core/utf8-custom-section-id.wast:1601: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(159) testsuite/core/utf8-custom-section-id.wast:1611: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(160) testsuite/core/utf8-custom-section-id.wast:1621: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(161) testsuite/core/utf8-custom-section-id.wast:1631: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(162) testsuite/core/utf8-custom-section-id.wast:1641: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(163) testsuite/core/utf8-custom-section-id.wast:1651: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(164) testsuite/core/utf8-custom-section-id.wast:1661: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(165) testsuite/core/utf8-custom-section-id.wast:1671: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(166) testsuite/core/utf8-custom-section-id.wast:1681: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(167) testsuite/core/utf8-custom-section-id.wast:1691: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(168) testsuite/core/utf8-custom-section-id.wast:1701: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(169) testsuite/core/utf8-custom-section-id.wast:1713: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(170) testsuite/core/utf8-custom-section-id.wast:1723: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(171) testsuite/core/utf8-custom-section-id.wast:1735: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(172) testsuite/core/utf8-custom-section-id.wast:1745: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(173) testsuite/core/utf8-custom-section-id.wast:1755: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(174) testsuite/core/utf8-custom-section-id.wast:1765: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(175) testsuite/core/utf8-custom-section-id.wast:1775: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(176) testsuite/core/utf8-custom-section-id.wast:1785: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+0/176 tests passed.
diff --git a/test/WasmSpec/baselines/utf8-import-field.baseline b/test/WasmSpec/baselines/utf8-import-field.baseline
new file mode 100644
index 0000000..71d45ff
--- /dev/null
+++ b/test/WasmSpec/baselines/utf8-import-field.baseline
@@ -0,0 +1,177 @@
+(1) testsuite/core/utf8-import-field.wast:7: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(2) testsuite/core/utf8-import-field.wast:22: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(3) testsuite/core/utf8-import-field.wast:37: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(4) testsuite/core/utf8-import-field.wast:52: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(5) testsuite/core/utf8-import-field.wast:67: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(6) testsuite/core/utf8-import-field.wast:82: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(7) testsuite/core/utf8-import-field.wast:99: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(8) testsuite/core/utf8-import-field.wast:114: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(9) testsuite/core/utf8-import-field.wast:129: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(10) testsuite/core/utf8-import-field.wast:146: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(11) testsuite/core/utf8-import-field.wast:161: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(12) testsuite/core/utf8-import-field.wast:176: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(13) testsuite/core/utf8-import-field.wast:191: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(14) testsuite/core/utf8-import-field.wast:206: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(15) testsuite/core/utf8-import-field.wast:221: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(16) testsuite/core/utf8-import-field.wast:236: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(17) testsuite/core/utf8-import-field.wast:251: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(18) testsuite/core/utf8-import-field.wast:266: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(19) testsuite/core/utf8-import-field.wast:281: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(20) testsuite/core/utf8-import-field.wast:296: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(21) testsuite/core/utf8-import-field.wast:311: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(22) testsuite/core/utf8-import-field.wast:328: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(23) testsuite/core/utf8-import-field.wast:343: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(24) testsuite/core/utf8-import-field.wast:358: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(25) testsuite/core/utf8-import-field.wast:373: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(26) testsuite/core/utf8-import-field.wast:388: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(27) testsuite/core/utf8-import-field.wast:405: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(28) testsuite/core/utf8-import-field.wast:420: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(29) testsuite/core/utf8-import-field.wast:435: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(30) testsuite/core/utf8-import-field.wast:450: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(31) testsuite/core/utf8-import-field.wast:465: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(32) testsuite/core/utf8-import-field.wast:480: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(33) testsuite/core/utf8-import-field.wast:495: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(34) testsuite/core/utf8-import-field.wast:510: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(35) testsuite/core/utf8-import-field.wast:525: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(36) testsuite/core/utf8-import-field.wast:540: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(37) testsuite/core/utf8-import-field.wast:555: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(38) testsuite/core/utf8-import-field.wast:570: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(39) testsuite/core/utf8-import-field.wast:585: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(40) testsuite/core/utf8-import-field.wast:600: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(41) testsuite/core/utf8-import-field.wast:615: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(42) testsuite/core/utf8-import-field.wast:630: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(43) testsuite/core/utf8-import-field.wast:645: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(44) testsuite/core/utf8-import-field.wast:660: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(45) testsuite/core/utf8-import-field.wast:675: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(46) testsuite/core/utf8-import-field.wast:690: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(47) testsuite/core/utf8-import-field.wast:705: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(48) testsuite/core/utf8-import-field.wast:720: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(49) testsuite/core/utf8-import-field.wast:735: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(50) testsuite/core/utf8-import-field.wast:750: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(51) testsuite/core/utf8-import-field.wast:765: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(52) testsuite/core/utf8-import-field.wast:780: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(53) testsuite/core/utf8-import-field.wast:795: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(54) testsuite/core/utf8-import-field.wast:810: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(55) testsuite/core/utf8-import-field.wast:825: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(56) testsuite/core/utf8-import-field.wast:840: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(57) testsuite/core/utf8-import-field.wast:855: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(58) testsuite/core/utf8-import-field.wast:870: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(59) testsuite/core/utf8-import-field.wast:887: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(60) testsuite/core/utf8-import-field.wast:902: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(61) testsuite/core/utf8-import-field.wast:917: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(62) testsuite/core/utf8-import-field.wast:932: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(63) testsuite/core/utf8-import-field.wast:947: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(64) testsuite/core/utf8-import-field.wast:962: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(65) testsuite/core/utf8-import-field.wast:977: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(66) testsuite/core/utf8-import-field.wast:992: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(67) testsuite/core/utf8-import-field.wast:1007: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(68) testsuite/core/utf8-import-field.wast:1022: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(69) testsuite/core/utf8-import-field.wast:1037: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(70) testsuite/core/utf8-import-field.wast:1052: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(71) testsuite/core/utf8-import-field.wast:1067: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(72) testsuite/core/utf8-import-field.wast:1082: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(73) testsuite/core/utf8-import-field.wast:1097: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(74) testsuite/core/utf8-import-field.wast:1112: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(75) testsuite/core/utf8-import-field.wast:1127: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(76) testsuite/core/utf8-import-field.wast:1142: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(77) testsuite/core/utf8-import-field.wast:1157: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(78) testsuite/core/utf8-import-field.wast:1172: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(79) testsuite/core/utf8-import-field.wast:1187: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(80) testsuite/core/utf8-import-field.wast:1202: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(81) testsuite/core/utf8-import-field.wast:1217: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(82) testsuite/core/utf8-import-field.wast:1232: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(83) testsuite/core/utf8-import-field.wast:1249: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(84) testsuite/core/utf8-import-field.wast:1264: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(85) testsuite/core/utf8-import-field.wast:1279: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(86) testsuite/core/utf8-import-field.wast:1294: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(87) testsuite/core/utf8-import-field.wast:1309: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(88) testsuite/core/utf8-import-field.wast:1324: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(89) testsuite/core/utf8-import-field.wast:1339: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(90) testsuite/core/utf8-import-field.wast:1356: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(91) testsuite/core/utf8-import-field.wast:1371: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(92) testsuite/core/utf8-import-field.wast:1386: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(93) testsuite/core/utf8-import-field.wast:1401: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(94) testsuite/core/utf8-import-field.wast:1416: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(95) testsuite/core/utf8-import-field.wast:1431: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(96) testsuite/core/utf8-import-field.wast:1446: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(97) testsuite/core/utf8-import-field.wast:1461: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(98) testsuite/core/utf8-import-field.wast:1476: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(99) testsuite/core/utf8-import-field.wast:1491: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(100) testsuite/core/utf8-import-field.wast:1506: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(101) testsuite/core/utf8-import-field.wast:1521: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(102) testsuite/core/utf8-import-field.wast:1536: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(103) testsuite/core/utf8-import-field.wast:1551: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(104) testsuite/core/utf8-import-field.wast:1566: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(105) testsuite/core/utf8-import-field.wast:1581: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(106) testsuite/core/utf8-import-field.wast:1596: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(107) testsuite/core/utf8-import-field.wast:1611: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(108) testsuite/core/utf8-import-field.wast:1626: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(109) testsuite/core/utf8-import-field.wast:1641: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(110) testsuite/core/utf8-import-field.wast:1656: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(111) testsuite/core/utf8-import-field.wast:1671: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(112) testsuite/core/utf8-import-field.wast:1686: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(113) testsuite/core/utf8-import-field.wast:1701: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(114) testsuite/core/utf8-import-field.wast:1716: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(115) testsuite/core/utf8-import-field.wast:1733: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(116) testsuite/core/utf8-import-field.wast:1748: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(117) testsuite/core/utf8-import-field.wast:1763: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(118) testsuite/core/utf8-import-field.wast:1778: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(119) testsuite/core/utf8-import-field.wast:1793: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(120) testsuite/core/utf8-import-field.wast:1808: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(121) testsuite/core/utf8-import-field.wast:1823: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(122) testsuite/core/utf8-import-field.wast:1838: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(123) testsuite/core/utf8-import-field.wast:1853: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(124) testsuite/core/utf8-import-field.wast:1868: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(125) testsuite/core/utf8-import-field.wast:1883: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(126) testsuite/core/utf8-import-field.wast:1898: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(127) testsuite/core/utf8-import-field.wast:1913: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(128) testsuite/core/utf8-import-field.wast:1928: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(129) testsuite/core/utf8-import-field.wast:1943: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(130) testsuite/core/utf8-import-field.wast:1958: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(131) testsuite/core/utf8-import-field.wast:1975: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(132) testsuite/core/utf8-import-field.wast:1990: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(133) testsuite/core/utf8-import-field.wast:2005: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(134) testsuite/core/utf8-import-field.wast:2020: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(135) testsuite/core/utf8-import-field.wast:2035: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(136) testsuite/core/utf8-import-field.wast:2050: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(137) testsuite/core/utf8-import-field.wast:2065: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(138) testsuite/core/utf8-import-field.wast:2080: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(139) testsuite/core/utf8-import-field.wast:2095: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(140) testsuite/core/utf8-import-field.wast:2110: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(141) testsuite/core/utf8-import-field.wast:2125: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(142) testsuite/core/utf8-import-field.wast:2140: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(143) testsuite/core/utf8-import-field.wast:2155: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(144) testsuite/core/utf8-import-field.wast:2170: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(145) testsuite/core/utf8-import-field.wast:2185: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(146) testsuite/core/utf8-import-field.wast:2200: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(147) testsuite/core/utf8-import-field.wast:2217: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(148) testsuite/core/utf8-import-field.wast:2232: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(149) testsuite/core/utf8-import-field.wast:2247: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(150) testsuite/core/utf8-import-field.wast:2262: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(151) testsuite/core/utf8-import-field.wast:2277: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(152) testsuite/core/utf8-import-field.wast:2292: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(153) testsuite/core/utf8-import-field.wast:2307: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(154) testsuite/core/utf8-import-field.wast:2322: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(155) testsuite/core/utf8-import-field.wast:2337: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(156) testsuite/core/utf8-import-field.wast:2354: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(157) testsuite/core/utf8-import-field.wast:2369: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(158) testsuite/core/utf8-import-field.wast:2386: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(159) testsuite/core/utf8-import-field.wast:2401: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(160) testsuite/core/utf8-import-field.wast:2416: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(161) testsuite/core/utf8-import-field.wast:2431: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(162) testsuite/core/utf8-import-field.wast:2446: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(163) testsuite/core/utf8-import-field.wast:2461: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(164) testsuite/core/utf8-import-field.wast:2476: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(165) testsuite/core/utf8-import-field.wast:2491: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(166) testsuite/core/utf8-import-field.wast:2506: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(167) testsuite/core/utf8-import-field.wast:2521: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(168) testsuite/core/utf8-import-field.wast:2536: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(169) testsuite/core/utf8-import-field.wast:2553: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(170) testsuite/core/utf8-import-field.wast:2568: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(171) testsuite/core/utf8-import-field.wast:2585: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(172) testsuite/core/utf8-import-field.wast:2600: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(173) testsuite/core/utf8-import-field.wast:2615: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(174) testsuite/core/utf8-import-field.wast:2630: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(175) testsuite/core/utf8-import-field.wast:2645: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(176) testsuite/core/utf8-import-field.wast:2660: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+0/176 tests passed.
diff --git a/test/WasmSpec/baselines/utf8-import-module.baseline b/test/WasmSpec/baselines/utf8-import-module.baseline
new file mode 100644
index 0000000..5a69181
--- /dev/null
+++ b/test/WasmSpec/baselines/utf8-import-module.baseline
@@ -0,0 +1,177 @@
+(1) testsuite/core/utf8-import-module.wast:7: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(2) testsuite/core/utf8-import-module.wast:22: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(3) testsuite/core/utf8-import-module.wast:37: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(4) testsuite/core/utf8-import-module.wast:52: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(5) testsuite/core/utf8-import-module.wast:67: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(6) testsuite/core/utf8-import-module.wast:82: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(7) testsuite/core/utf8-import-module.wast:99: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(8) testsuite/core/utf8-import-module.wast:114: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(9) testsuite/core/utf8-import-module.wast:129: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(10) testsuite/core/utf8-import-module.wast:146: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(11) testsuite/core/utf8-import-module.wast:161: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(12) testsuite/core/utf8-import-module.wast:176: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(13) testsuite/core/utf8-import-module.wast:191: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(14) testsuite/core/utf8-import-module.wast:206: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(15) testsuite/core/utf8-import-module.wast:221: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(16) testsuite/core/utf8-import-module.wast:236: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(17) testsuite/core/utf8-import-module.wast:251: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(18) testsuite/core/utf8-import-module.wast:266: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(19) testsuite/core/utf8-import-module.wast:281: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(20) testsuite/core/utf8-import-module.wast:296: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(21) testsuite/core/utf8-import-module.wast:311: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(22) testsuite/core/utf8-import-module.wast:328: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(23) testsuite/core/utf8-import-module.wast:343: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(24) testsuite/core/utf8-import-module.wast:358: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(25) testsuite/core/utf8-import-module.wast:373: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(26) testsuite/core/utf8-import-module.wast:388: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(27) testsuite/core/utf8-import-module.wast:405: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(28) testsuite/core/utf8-import-module.wast:420: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(29) testsuite/core/utf8-import-module.wast:435: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(30) testsuite/core/utf8-import-module.wast:450: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(31) testsuite/core/utf8-import-module.wast:465: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(32) testsuite/core/utf8-import-module.wast:480: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(33) testsuite/core/utf8-import-module.wast:495: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(34) testsuite/core/utf8-import-module.wast:510: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(35) testsuite/core/utf8-import-module.wast:525: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(36) testsuite/core/utf8-import-module.wast:540: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(37) testsuite/core/utf8-import-module.wast:555: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(38) testsuite/core/utf8-import-module.wast:570: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(39) testsuite/core/utf8-import-module.wast:585: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(40) testsuite/core/utf8-import-module.wast:600: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(41) testsuite/core/utf8-import-module.wast:615: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(42) testsuite/core/utf8-import-module.wast:630: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(43) testsuite/core/utf8-import-module.wast:645: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(44) testsuite/core/utf8-import-module.wast:660: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(45) testsuite/core/utf8-import-module.wast:675: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(46) testsuite/core/utf8-import-module.wast:690: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(47) testsuite/core/utf8-import-module.wast:705: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(48) testsuite/core/utf8-import-module.wast:720: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(49) testsuite/core/utf8-import-module.wast:735: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(50) testsuite/core/utf8-import-module.wast:750: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(51) testsuite/core/utf8-import-module.wast:765: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(52) testsuite/core/utf8-import-module.wast:780: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(53) testsuite/core/utf8-import-module.wast:795: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(54) testsuite/core/utf8-import-module.wast:810: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(55) testsuite/core/utf8-import-module.wast:825: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(56) testsuite/core/utf8-import-module.wast:840: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(57) testsuite/core/utf8-import-module.wast:855: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(58) testsuite/core/utf8-import-module.wast:870: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(59) testsuite/core/utf8-import-module.wast:887: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(60) testsuite/core/utf8-import-module.wast:902: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(61) testsuite/core/utf8-import-module.wast:917: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(62) testsuite/core/utf8-import-module.wast:932: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(63) testsuite/core/utf8-import-module.wast:947: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(64) testsuite/core/utf8-import-module.wast:962: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(65) testsuite/core/utf8-import-module.wast:977: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(66) testsuite/core/utf8-import-module.wast:992: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(67) testsuite/core/utf8-import-module.wast:1007: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(68) testsuite/core/utf8-import-module.wast:1022: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(69) testsuite/core/utf8-import-module.wast:1037: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(70) testsuite/core/utf8-import-module.wast:1052: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(71) testsuite/core/utf8-import-module.wast:1067: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(72) testsuite/core/utf8-import-module.wast:1082: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(73) testsuite/core/utf8-import-module.wast:1097: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(74) testsuite/core/utf8-import-module.wast:1112: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(75) testsuite/core/utf8-import-module.wast:1127: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(76) testsuite/core/utf8-import-module.wast:1142: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(77) testsuite/core/utf8-import-module.wast:1157: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(78) testsuite/core/utf8-import-module.wast:1172: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(79) testsuite/core/utf8-import-module.wast:1187: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(80) testsuite/core/utf8-import-module.wast:1202: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(81) testsuite/core/utf8-import-module.wast:1217: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(82) testsuite/core/utf8-import-module.wast:1232: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(83) testsuite/core/utf8-import-module.wast:1249: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(84) testsuite/core/utf8-import-module.wast:1264: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(85) testsuite/core/utf8-import-module.wast:1279: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(86) testsuite/core/utf8-import-module.wast:1294: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(87) testsuite/core/utf8-import-module.wast:1309: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(88) testsuite/core/utf8-import-module.wast:1324: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(89) testsuite/core/utf8-import-module.wast:1339: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(90) testsuite/core/utf8-import-module.wast:1356: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(91) testsuite/core/utf8-import-module.wast:1371: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(92) testsuite/core/utf8-import-module.wast:1386: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(93) testsuite/core/utf8-import-module.wast:1401: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(94) testsuite/core/utf8-import-module.wast:1416: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(95) testsuite/core/utf8-import-module.wast:1431: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(96) testsuite/core/utf8-import-module.wast:1446: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(97) testsuite/core/utf8-import-module.wast:1461: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(98) testsuite/core/utf8-import-module.wast:1476: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(99) testsuite/core/utf8-import-module.wast:1491: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(100) testsuite/core/utf8-import-module.wast:1506: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(101) testsuite/core/utf8-import-module.wast:1521: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(102) testsuite/core/utf8-import-module.wast:1536: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(103) testsuite/core/utf8-import-module.wast:1551: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(104) testsuite/core/utf8-import-module.wast:1566: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(105) testsuite/core/utf8-import-module.wast:1581: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(106) testsuite/core/utf8-import-module.wast:1596: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(107) testsuite/core/utf8-import-module.wast:1611: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(108) testsuite/core/utf8-import-module.wast:1626: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(109) testsuite/core/utf8-import-module.wast:1641: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(110) testsuite/core/utf8-import-module.wast:1656: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(111) testsuite/core/utf8-import-module.wast:1671: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(112) testsuite/core/utf8-import-module.wast:1686: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(113) testsuite/core/utf8-import-module.wast:1701: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(114) testsuite/core/utf8-import-module.wast:1716: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(115) testsuite/core/utf8-import-module.wast:1733: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(116) testsuite/core/utf8-import-module.wast:1748: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(117) testsuite/core/utf8-import-module.wast:1763: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(118) testsuite/core/utf8-import-module.wast:1778: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(119) testsuite/core/utf8-import-module.wast:1793: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(120) testsuite/core/utf8-import-module.wast:1808: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(121) testsuite/core/utf8-import-module.wast:1823: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(122) testsuite/core/utf8-import-module.wast:1838: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(123) testsuite/core/utf8-import-module.wast:1853: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(124) testsuite/core/utf8-import-module.wast:1868: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(125) testsuite/core/utf8-import-module.wast:1883: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(126) testsuite/core/utf8-import-module.wast:1898: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(127) testsuite/core/utf8-import-module.wast:1913: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(128) testsuite/core/utf8-import-module.wast:1928: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(129) testsuite/core/utf8-import-module.wast:1943: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(130) testsuite/core/utf8-import-module.wast:1958: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(131) testsuite/core/utf8-import-module.wast:1975: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(132) testsuite/core/utf8-import-module.wast:1990: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(133) testsuite/core/utf8-import-module.wast:2005: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(134) testsuite/core/utf8-import-module.wast:2020: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(135) testsuite/core/utf8-import-module.wast:2035: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(136) testsuite/core/utf8-import-module.wast:2050: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(137) testsuite/core/utf8-import-module.wast:2065: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(138) testsuite/core/utf8-import-module.wast:2080: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(139) testsuite/core/utf8-import-module.wast:2095: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(140) testsuite/core/utf8-import-module.wast:2110: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(141) testsuite/core/utf8-import-module.wast:2125: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(142) testsuite/core/utf8-import-module.wast:2140: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(143) testsuite/core/utf8-import-module.wast:2155: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(144) testsuite/core/utf8-import-module.wast:2170: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(145) testsuite/core/utf8-import-module.wast:2185: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(146) testsuite/core/utf8-import-module.wast:2200: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(147) testsuite/core/utf8-import-module.wast:2217: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(148) testsuite/core/utf8-import-module.wast:2232: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(149) testsuite/core/utf8-import-module.wast:2247: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(150) testsuite/core/utf8-import-module.wast:2262: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(151) testsuite/core/utf8-import-module.wast:2277: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(152) testsuite/core/utf8-import-module.wast:2292: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(153) testsuite/core/utf8-import-module.wast:2307: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(154) testsuite/core/utf8-import-module.wast:2322: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(155) testsuite/core/utf8-import-module.wast:2337: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(156) testsuite/core/utf8-import-module.wast:2354: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(157) testsuite/core/utf8-import-module.wast:2369: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(158) testsuite/core/utf8-import-module.wast:2386: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(159) testsuite/core/utf8-import-module.wast:2401: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(160) testsuite/core/utf8-import-module.wast:2416: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(161) testsuite/core/utf8-import-module.wast:2431: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(162) testsuite/core/utf8-import-module.wast:2446: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(163) testsuite/core/utf8-import-module.wast:2461: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(164) testsuite/core/utf8-import-module.wast:2476: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(165) testsuite/core/utf8-import-module.wast:2491: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(166) testsuite/core/utf8-import-module.wast:2506: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(167) testsuite/core/utf8-import-module.wast:2521: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(168) testsuite/core/utf8-import-module.wast:2536: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(169) testsuite/core/utf8-import-module.wast:2553: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(170) testsuite/core/utf8-import-module.wast:2568: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(171) testsuite/core/utf8-import-module.wast:2585: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(172) testsuite/core/utf8-import-module.wast:2600: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(173) testsuite/core/utf8-import-module.wast:2615: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(174) testsuite/core/utf8-import-module.wast:2630: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(175) testsuite/core/utf8-import-module.wast:2645: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+(176) testsuite/core/utf8-import-module.wast:2660: assert_malformed module failed. Had a linking error, expected a compile error: TypeError: Object expected
+0/176 tests passed.
diff --git a/test/WasmSpec/convert-test-suite/index.js b/test/WasmSpec/convert-test-suite/index.js
index 6ba90c0..bd65e30 100644
--- a/test/WasmSpec/convert-test-suite/index.js
+++ b/test/WasmSpec/convert-test-suite/index.js
@@ -27,7 +27,9 @@
       array: true,

       alias: "e",

       description: "Spec tests to exclude from the conversion (use for known failures)",

-      default: []

+      default: [

+        "traps",

+      ]

     },

     "xplat-excludes": {

       array: true,

@@ -51,6 +53,7 @@
         "left-to-right",

         "linking",

         "memory_trap",

+        "names",

         "page",

         "resizing",

         "select",

@@ -187,27 +190,33 @@
 </regress-exe>

 `);

     return new Promise((resolve, reject) => {

-      fs.writeFile(path.join(__dirname, "..", "rlexe.xml"), rlexe, err => err ? reject(err) : resolve(specFiles));

+      fs.writeFile(path.join(__dirname, "..", "rlexe.xml"), rlexe, err => err ? reject(err) : resolve(runs));

     });

-  }).then(specFiles => {

+  }).then(runs => {

     if (!argv.rebase) {

       return;

     }

     fs.removeSync(baselineDir);

     fs.ensureDirSync(baselineDir);

-    return Promise.all(specFiles.map(specFile => new Promise((resolve, reject) => {

-      const baseline = fs.createWriteStream(getBaselinePath(specFile));

-      const args = [path.resolve(rlRoot, "spec.js"), "-nonative"].concat(stringArgv(hostFlags(specFile)));

-      console.log(argv.rebase, args.join(" "));

-      const engine = spawn(

-        argv.rebase,

-        args,

-        {cwd: rlRoot}

-      );

-      engine.stdout.pipe(baseline);

-      engine.stderr.pipe(baseline);

-      engine.on("error", reject);

-      engine.on("close", resolve);

+    return Promise.all(runs.map(run => new Promise((resolve, reject) => {

+      const test = run[0];

+      const baseline = fs.createWriteStream(test.baseline);

+      baseline.on("open", () => {

+        const args = [path.resolve(rlRoot, test.runner)].concat(test.flags);

+        console.log(argv.rebase, args.join(" "));

+        const engine = spawn(

+          argv.rebase,

+          args,

+          {

+            cwd: rlRoot,

+            stdio: [baseline, baseline, baseline],

+            shell: true

+          }

+        );

+        engine.on("error", reject);

+        engine.on("close", resolve);

+      });

+      baseline.on("error", reject);

     })));

   });

 }

diff --git a/test/WasmSpec/jsapi.js b/test/WasmSpec/jsapi.js
index e129c51..400855c 100644
--- a/test/WasmSpec/jsapi.js
+++ b/test/WasmSpec/jsapi.js
@@ -12,6 +12,9 @@
 const self = this;

 const setTimeout = WScript.SetTimeout;

 const clearTimeout = WScript.ClearTimeout;

+

+WScript.Flag(`-wasmMaxTableSize:${(Math.pow(2,32)-1)|0}`);

+

 self.addEventListener = function() {};

 

 class ConsoleTestEnvironment {

@@ -82,7 +85,7 @@
   }

   const testsReport = tests.map(test => {

     const stack = verbose ? test.stack : "";

-    return `${status_text[test.status]} ${test.name} ${get_assertion(test)} ${test.message || ""}${stack}`;

+    return `${status_text[test.status]} ${test.name} ${get_assertion(test)} ${test.message || ""}${stack ? "\n" + stack : stack}`;

   });

   console.log(`Harness Status: ${status_text_harness[harness_status.status]}

 Found ${tests.length} tests: ${Object.keys(status_number).map(key => `${key} = ${status_number[key]}`).join(" ")}

diff --git a/test/WasmSpec/rlexe.xml b/test/WasmSpec/rlexe.xml
index f381573..012c015 100644
--- a/test/WasmSpec/rlexe.xml
+++ b/test/WasmSpec/rlexe.xml
@@ -52,6 +52,21 @@
   <test>
     <default>
       <files>spec.js</files>
+      <baseline>baselines/align.baseline</baseline>
+      <compile-flags>-wasm -args testsuite/core/align.wast -endargs</compile-flags>
+    </default>
+  </test>
+  <test>
+    <default>
+      <files>spec.js</files>
+      <baseline>baselines/align.baseline</baseline>
+      <compile-flags>-wasm -args testsuite/core/align.wast -endargs -nonative</compile-flags>
+      <tags>exclude_dynapogo</tags>
+    </default>
+  </test>
+  <test>
+    <default>
+      <files>spec.js</files>
       <baseline>baselines/binary.baseline</baseline>
       <compile-flags>-wasm -args testsuite/core/binary.wast -endargs</compile-flags>
       <tags>exclude_xplat</tags>
@@ -175,15 +190,15 @@
   <test>
     <default>
       <files>spec.js</files>
-      <baseline>baselines/comments.baseline</baseline>
-      <compile-flags>-wasm -args testsuite/core/comments.wast -endargs</compile-flags>
+      <baseline>baselines/const.baseline</baseline>
+      <compile-flags>-wasm -args testsuite/core/const.wast -endargs</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>spec.js</files>
-      <baseline>baselines/comments.baseline</baseline>
-      <compile-flags>-wasm -args testsuite/core/comments.wast -endargs -nonative</compile-flags>
+      <baseline>baselines/const.baseline</baseline>
+      <compile-flags>-wasm -args testsuite/core/const.wast -endargs -nonative</compile-flags>
       <tags>exclude_dynapogo</tags>
     </default>
   </test>
@@ -266,6 +281,21 @@
   <test>
     <default>
       <files>spec.js</files>
+      <baseline>baselines/f32_bitwise.baseline</baseline>
+      <compile-flags>-wasm -args testsuite/core/f32_bitwise.wast -endargs</compile-flags>
+    </default>
+  </test>
+  <test>
+    <default>
+      <files>spec.js</files>
+      <baseline>baselines/f32_bitwise.baseline</baseline>
+      <compile-flags>-wasm -args testsuite/core/f32_bitwise.wast -endargs -nonative</compile-flags>
+      <tags>exclude_dynapogo</tags>
+    </default>
+  </test>
+  <test>
+    <default>
+      <files>spec.js</files>
       <baseline>baselines/f32_cmp.baseline</baseline>
       <compile-flags>-wasm -args testsuite/core/f32_cmp.wast -endargs</compile-flags>
     </default>
@@ -296,6 +326,21 @@
   <test>
     <default>
       <files>spec.js</files>
+      <baseline>baselines/f64_bitwise.baseline</baseline>
+      <compile-flags>-wasm -args testsuite/core/f64_bitwise.wast -endargs</compile-flags>
+    </default>
+  </test>
+  <test>
+    <default>
+      <files>spec.js</files>
+      <baseline>baselines/f64_bitwise.baseline</baseline>
+      <compile-flags>-wasm -args testsuite/core/f64_bitwise.wast -endargs -nonative</compile-flags>
+      <tags>exclude_dynapogo</tags>
+    </default>
+  </test>
+  <test>
+    <default>
+      <files>spec.js</files>
       <baseline>baselines/f64_cmp.baseline</baseline>
       <compile-flags>-wasm -args testsuite/core/f64_cmp.wast -endargs</compile-flags>
     </default>
@@ -528,6 +573,21 @@
   <test>
     <default>
       <files>spec.js</files>
+      <baseline>baselines/inline-module.baseline</baseline>
+      <compile-flags>-wasm -args testsuite/core/inline-module.wast -endargs</compile-flags>
+    </default>
+  </test>
+  <test>
+    <default>
+      <files>spec.js</files>
+      <baseline>baselines/inline-module.baseline</baseline>
+      <compile-flags>-wasm -args testsuite/core/inline-module.wast -endargs -nonative</compile-flags>
+      <tags>exclude_dynapogo</tags>
+    </default>
+  </test>
+  <test>
+    <default>
+      <files>spec.js</files>
       <baseline>baselines/int_exprs.baseline</baseline>
       <compile-flags>-wasm -args testsuite/core/int_exprs.wast -endargs</compile-flags>
       <tags>exclude_xplat</tags>
@@ -669,6 +729,7 @@
       <files>spec.js</files>
       <baseline>baselines/names.baseline</baseline>
       <compile-flags>-wasm -args testsuite/core/names.wast -endargs</compile-flags>
+      <tags>exclude_xplat</tags>
     </default>
   </test>
   <test>
@@ -676,7 +737,7 @@
       <files>spec.js</files>
       <baseline>baselines/names.baseline</baseline>
       <compile-flags>-wasm -args testsuite/core/names.wast -endargs -nonative</compile-flags>
-      <tags>exclude_dynapogo</tags>
+      <tags>exclude_dynapogo,exclude_xplat</tags>
     </default>
   </test>
   <test>
@@ -851,17 +912,31 @@
   <test>
     <default>
       <files>spec.js</files>
-      <baseline>baselines/traps.baseline</baseline>
-      <compile-flags>-wasm -args testsuite/core/traps.wast -endargs</compile-flags>
-      <tags>exclude_xplat</tags>
+      <baseline>baselines/token.baseline</baseline>
+      <compile-flags>-wasm -args testsuite/core/token.wast -endargs</compile-flags>
     </default>
   </test>
   <test>
     <default>
       <files>spec.js</files>
-      <baseline>baselines/traps.baseline</baseline>
-      <compile-flags>-wasm -args testsuite/core/traps.wast -endargs -nonative</compile-flags>
-      <tags>exclude_dynapogo,exclude_xplat</tags>
+      <baseline>baselines/token.baseline</baseline>
+      <compile-flags>-wasm -args testsuite/core/token.wast -endargs -nonative</compile-flags>
+      <tags>exclude_dynapogo</tags>
+    </default>
+  </test>
+  <test>
+    <default>
+      <files>spec.js</files>
+      <baseline>baselines/type.baseline</baseline>
+      <compile-flags>-wasm -args testsuite/core/type.wast -endargs</compile-flags>
+    </default>
+  </test>
+  <test>
+    <default>
+      <files>spec.js</files>
+      <baseline>baselines/type.baseline</baseline>
+      <compile-flags>-wasm -args testsuite/core/type.wast -endargs -nonative</compile-flags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -928,6 +1003,51 @@
   </test>
   <test>
     <default>
+      <files>spec.js</files>
+      <baseline>baselines/utf8-custom-section-id.baseline</baseline>
+      <compile-flags>-wasm -args testsuite/core/utf8-custom-section-id.wast -endargs</compile-flags>
+    </default>
+  </test>
+  <test>
+    <default>
+      <files>spec.js</files>
+      <baseline>baselines/utf8-custom-section-id.baseline</baseline>
+      <compile-flags>-wasm -args testsuite/core/utf8-custom-section-id.wast -endargs -nonative</compile-flags>
+      <tags>exclude_dynapogo</tags>
+    </default>
+  </test>
+  <test>
+    <default>
+      <files>spec.js</files>
+      <baseline>baselines/utf8-import-field.baseline</baseline>
+      <compile-flags>-wasm -args testsuite/core/utf8-import-field.wast -endargs</compile-flags>
+    </default>
+  </test>
+  <test>
+    <default>
+      <files>spec.js</files>
+      <baseline>baselines/utf8-import-field.baseline</baseline>
+      <compile-flags>-wasm -args testsuite/core/utf8-import-field.wast -endargs -nonative</compile-flags>
+      <tags>exclude_dynapogo</tags>
+    </default>
+  </test>
+  <test>
+    <default>
+      <files>spec.js</files>
+      <baseline>baselines/utf8-import-module.baseline</baseline>
+      <compile-flags>-wasm -args testsuite/core/utf8-import-module.wast -endargs</compile-flags>
+    </default>
+  </test>
+  <test>
+    <default>
+      <files>spec.js</files>
+      <baseline>baselines/utf8-import-module.baseline</baseline>
+      <compile-flags>-wasm -args testsuite/core/utf8-import-module.wast -endargs -nonative</compile-flags>
+      <tags>exclude_dynapogo</tags>
+    </default>
+  </test>
+  <test>
+    <default>
       <files>jsapi.js</files>
       <baseline>baselines/jsapi.baseline</baseline>
       <compile-flags>-wasm -args testsuite/js-api/jsapi.js -endargs</compile-flags>
diff --git a/test/WasmSpec/spec.js b/test/WasmSpec/spec.js
index 8cad319..a083ec0 100644
--- a/test/WasmSpec/spec.js
+++ b/test/WasmSpec/spec.js
@@ -25,7 +25,7 @@
 

 if (cliArgs.length < 1) {

   print("usage: <exe> spec.js -args <filename.json> [start index] [end index] [-verbose] [-nt] -endargs");

-  WScript.quit(0);

+  WScript.Quit(0);

 }

 

 if (typeof IMPORTS_FROM_OTHER_SCRIPT === "undefined") {

@@ -361,7 +361,7 @@
 function assertReturn(moduleRegistry, command, {canonicalNan, arithmeticNan} = {}) {

   const {action, expected} = command;

   try {

-    const wrapper = arithmeticNan ? getArthimeticNanWrapper(action, expected) : null;

+    const wrapper = null; // arithmeticNan ? getArthimeticNanWrapper(action, expected) : null;

     const res = runAction(moduleRegistry, action, wrapper);

     let success = true;

     if (expected.length === 0) {

@@ -372,9 +372,8 @@
       const expectedResult = mapWasmArg(ex1);

       if (ex1.type === "i64") {

         success = expectedResult.low === res.low && expectedResult.high === res.high;

-      } else if (arithmeticNan) {

-        success = res === 1;

-      } else if (canonicalNan) {

+      } else if (arithmeticNan || canonicalNan || isNaN(expectedResult)) {

+        // todo:: do exact compare for nan once bug resolved

         success = isNaN(res);

       } else {

         success = res === expectedResult;

diff --git a/test/WasmSpec/testsuite.rev b/test/WasmSpec/testsuite.rev
index d5baba1..0c07b6b 100644
--- a/test/WasmSpec/testsuite.rev
+++ b/test/WasmSpec/testsuite.rev
@@ -1 +1 @@
-634f0d9009404f498ef8d8bd510bd6f0941219cc
+3725d1a51ece93c22b353c2a6fbdb7466e25c215
diff --git a/test/WasmSpec/testsuite/LICENSE b/test/WasmSpec/testsuite/LICENSE
new file mode 100644
index 0000000..8f71f43
--- /dev/null
+++ b/test/WasmSpec/testsuite/LICENSE
@@ -0,0 +1,202 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "{}"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright {yyyy} {name of copyright owner}
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
diff --git a/test/WasmSpec/testsuite/Todo.md b/test/WasmSpec/testsuite/Todo.md
index 96ccb16..b98f989 100644
--- a/test/WasmSpec/testsuite/Todo.md
+++ b/test/WasmSpec/testsuite/Todo.md
@@ -3,115 +3,25 @@
 have a link to an open issue/PR, or be obvious. Comments/corrections/additions
 welcome.
 
-Operator semantics:
- - ~~test that promote/demote is bit-preserving if not NaN~~
- - ~~test that clz/ctz handle zero~~
- - ~~test that numbers slightly outside of the int32 range round into the int32 range in floating-to-int32 conversion~~
- - ~~test that neg, abs, copysign, reinterpretcast, store+load, set+get, preserve the sign bit and significand bits of NaN and don't canonicalize~~
- - ~~test that shifts don't mask their shift count. 32 is particularly nice to test.~~
- - ~~test that `page_size` returns a power of 2~~
- - ~~test that arithmetic operands are evaluated left-to-right~~
- - ~~test that call and store operands are evaluated left-to-right too~~
- - ~~test that call and argument operands of call_indirect are evaluated left-to-right, too~~
- - ~~test that select arguments are evaluated left-to-right, too~~
- - ~~test that br_if arguments are evaluated left-to-right, too~~
- - ~~test that br_table arguments are evaluated left-to-right, too~~
- - ~~test that add/sub/mul/wrap/wrapping-store silently wrap on overflow~~
- - ~~test that sdiv/udiv/srem/urem trap on divide-by-zero~~
- - ~~test that sdiv traps on overflow~~
- - ~~test that srem doesn't trap when the corresponding sdiv would overflow~~
- - ~~test that float-to-integer conversion traps on overflow and invalid~~
- - ~~test that unsigned operations are properly unsigned~~
- - ~~test that signed integer div rounds toward zero~~
- - ~~test that signed integer mod has the sign of the dividend~~
- - ~~test that select preserves all NaN bits~~
-
-Floating point semantics:
- - ~~test for round-to-nearest rounding~~
- - ~~test for ties-to-even rounding~~
- - ~~test that all operations with floating point inputs correctly handle all their NaN, -0, 0, Infinity, and -Infinity special cases~~
- - ~~test that signaling NaN is indistinguishable from quiet NaN~~
- - ~~test that all operations that can overflow produce Infinity and with the correct sign~~
- - ~~test that all operations that can divide by zero produce Infinity with the correct sign~~
- - ~~test that all operations that can have an invalid produce NaN~~
- - ~~test that all operations that can have underflow behave correctly~~
- - ~~test that nearestint doesn't do JS-style Math.round or C-style round(3) rounding~~
- - ~~test that signalling NaN doesn't cause weirdness~~
- - ~~test that signalling/quiet NaNs can have sign bits and payloads in literals~~
- - ~~test that conversion from int32/int64 to float32 rounds correctly~~
- - ~~test that [relaxed optimizations](https://gcc.gnu.org/wiki/FloatingPointMath) are not done~~
-
 Linear memory semantics:
- - test that loading from null works
- - ~~test that loading from constant OOB traps and is not DCE'd or folded (pending [discussion](https://github.com/WebAssembly/design/blob/master/Semantics.md#out-of-bounds))~~
- - test that loading from "beyond the STACKPTR" succeeds
- - test that "stackptr + (linearmemptr - stackptr)" loads from linearmemptr.
- - test loading "uninitialized" things from aliased stack frames return what's there
- - test that loadwithoffset traps in overflow cases
  - test that newly allocated memory (program start and `grow_memory`) is zeroed
  - test that `grow_memory` does a full 32-bit unsigned check for page-size divisibility
  - test that load/store addreses are full int32 (or int64), and not OCaml int
  - test that when allocating 4GiB, accessing index -1 fails
- - ~~test that linear memory is little-endian for all integers and floats~~
- - test that unaligned and misaligned accesses work, even if slow
- - ~~test that runaway recursion traps~~
  - test that too-big `grow_memory` fails appropriately
  - test that too-big linear memory initial allocation fails
- - ~~test that non-pagesize `grow_memory` fails~~
  - test that one can clobber the entire contents of the linear memory without corrupting: call stack, local variables, program execution.
  - test that an i64 store with 4-byte alignment that's 4 bytes out of bounds traps without storing anything.
 
-Function pointer semantics:
- - test that function addresses are monotonic indices, and not actual addresses.
- - ~~test that function pointers work [correctly](https://github.com/WebAssembly/design/issues/89)~~
-
-Expression optimizer bait:
- - ~~test that `a+1<b+1` isn't folded to `a<b`~~
- - ~~test that that demote-promote, wrap+sext, wrap+zext, shl+ashr, shl+lshr, div+mul, mul+div aren't folded away~~
- - ~~test that converting int32 to float and back isn't folded away~~
- - ~~test that converting int64 to double and back isn't folded away~~
- - ~~test that `float(double(float(x))+double(y))` is not `float(x)+float(y)` (and so on for other operators)~~
- - ~~test that `x*0.0` is not folded to `0.0`~~
- - ~~test that `0.0/x` is not folded to `0.0`~~
- - ~~test that `x != x` is not folded to false, `x == x` is not folded to true, `x < x` is not folded to false, etc.~~
- - ~~test that signed integer div of negative by constant power of 2 is not ashr~~
- - ~~test unsigned and signed division by 3, 5, 7~~
- - ~~test that floating-point division by immediate 0 and -0 is defined~~
- - ~~test that floating-point (x*y)/y isn't folded to x~~
- - ~~test that floating-point (x+y)-y isn't folded to x~~
- - ~~test that ult/ugt/etc (formed with a not operator) aren't folded to oge/ole/etc.~~
- - ~~test that floating point add/mul aren't reassociated even when tempting~~
- - ~~test that floating point mul+add isn't folded to fma even when tempting~~
- - ~~test that floating point sqrt(x*x+y*y) isn't folded to hypot even when tempting~~
- - ~~test that 1/x isn't translated into reciprocal-approximate~~
- - ~~test that 1/sqrt(x) isn't approximated either~~
- - ~~test that fp division by non-power-2 constant gets full precision (isn't a multiply-by-reciprocal deal)?~~
- - ~~test that x<y?x:y is not folded to min, etc.~~
-
 Misc optimizer bait:
- - ~~test that the impl doesn't constant-fold away or DCE away or speculate operations that should trap, such as `1/0u`, `1/0`, `1%0u`, `1%0, convertToInt(NaN)`, `INT_MIN/-1` and so on.~~
- - test that likely constant folding uses the correct rounding mode
  - test that the scheduler doesn't move a trapping div past a call which may not return
- - ~~test that redundant-load elimination, dead-store elimination, and/or store+load forwarding correctly respect interfering stores of different types (aka no TBAA)~~
  - test that linearized multidimensional array accesses can have overindexing in interesting ways
  - test that 32-bit loop induction variables that wrap aren't promoted to 64-bit
- - test that functions with C standard library names aren't assumed to have C standarad library semantics
  - test that code after a non-obviously infinite loop is not executed
 
 Misc x86 optimizer bait:
  - test that oeq handles NaN right in if, if-else, and setcc cases
 
-Misc x87-isms:
- - ~~test for invalid Precision-Control-style x87 math~~
- - ~~test for invalid -ffloat-store-style x87 math~~
- - ~~test for evaluating intermediate results at greater precision~~
- - ~~test for loading and storing NaNs~~
-
-Validation errors:
- - ~~sign-extend load from int64 to int32 etc.~~
- - ~~fp-promote load and fp-demote store~~
- - alignment greater than the size of a load or store (https://github.com/WebAssembly/spec/issues/302)
-
 SIMD (post-MVP):
  - test that SIMD insert/extract don't canonicalize NaNs
  - test that SIMD lanes are in little-endian order
@@ -121,5 +31,11 @@
 
 Threads (post-MVP):
  - test that thread-local variables are actually thread-local
- - test that 8-bit, 16-bit, 32-bit, and 64-bit (on wasm64) atomic operations
-   are lock-free (is this possible?)
+ - test that atomic operations that isLockFree says are lock-free actually are
+   (is this possible?)
+ - test that isLockFree is true for datatypes that the spec says should
+   always be lock-free
+ - test that 16-bit and 8-bit cmpxchg does a wrapped 8-bit or 16-bit compare
+
+FMA (post-MVP):
+ - http://www.vinc17.org/software/fma-tests.c
diff --git a/test/WasmSpec/testsuite/build.py b/test/WasmSpec/testsuite/build.py
index e2b81c1..2448f2e 100644
--- a/test/WasmSpec/testsuite/build.py
+++ b/test/WasmSpec/testsuite/build.py
@@ -9,7 +9,8 @@
 import multiprocessing as mp
 
 SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
-WASM_EXEC = os.path.join(SCRIPT_DIR, '..', 'interpreter', 'wasm')
+INTERPRETER_DIR = os.path.join(SCRIPT_DIR, '..', 'interpreter')
+WASM_EXEC = os.path.join(INTERPRETER_DIR, 'wasm')
 
 WAST_TESTS_DIR = os.path.join(SCRIPT_DIR, 'core')
 JS_TESTS_DIR = os.path.join(SCRIPT_DIR, 'js-api')
@@ -35,6 +36,14 @@
     ensure_remove_dir(path)
     os.mkdir(path)
 
+def compile_wasm_interpreter():
+    print("Recompiling the wasm interpreter...")
+    result = run('make', '-C', INTERPRETER_DIR)
+    if result.returncode != 0:
+        print("Couldn't recompile wasm spec interpreter")
+        sys.exit(1)
+    print("Done!")
+
 def ensure_wasm_executable(path_to_wasm):
     """
     Ensure we have built the wasm spec interpreter.
@@ -44,7 +53,6 @@
         print('Unable to run the wasm executable')
         sys.exit(1)
 
-
 # JS harness.
 def convert_one_wast_file(inputs):
     wast_file, js_file = inputs
@@ -208,21 +216,32 @@
                         help="Relative path to the output directory for the front page.",
                         type=str)
 
-    return parser.parse_args()
+    parser.add_argument('--dont-recompile',
+                        action="store_const",
+                        dest="compile",
+                        help="Don't recompile the wasm spec interpreter (by default, it is)",
+                        const=False,
+                        default=True)
+
+    return parser.parse_args(), parser
 
 if __name__ == '__main__':
-    args = process_args()
+    args, parser = process_args()
 
     js_dir = args.js_dir
     html_dir = args.html_dir
     front_dir = args.front_dir
 
-    ensure_wasm_executable(WASM_EXEC)
-
     if front_dir is None and js_dir is None and html_dir is None:
-        print('At least one mode must be selected.')
+        print('At least one mode must be selected.\n')
+        parser.print_help()
         sys.exit(1)
 
+    if args.compile:
+        compile_wasm_interpreter()
+
+    ensure_wasm_executable(WASM_EXEC)
+
     if js_dir is not None:
         ensure_empty_dir(js_dir)
         build_js(js_dir)
diff --git a/test/WasmSpec/testsuite/chakra/chakra_i32.wast b/test/WasmSpec/testsuite/chakra/chakra_i32.wast
index af533a3..dd22991 100644
--- a/test/WasmSpec/testsuite/chakra/chakra_i32.wast
+++ b/test/WasmSpec/testsuite/chakra/chakra_i32.wast
@@ -74,911 +74,960 @@
   (func (export "mul66") (result i32) (i32.mul (i32.const 0x01234567) (i32.const 0x76543210)))
   (func (export "mul67") (param $x i32) (result i32) (i32.mul (get_local $x) (i32.const 0x76543210)))
   (func (export "mul68") (param $y i32) (result i32) (i32.mul (i32.const 0x01234567) (get_local $y)))
-  (func (export "div_s69") (result i32) (i32.div_s (i32.const 1) (i32.const 0)))
-  (func (export "div_s70") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const 0)))
-  (func (export "div_s71") (param $y i32) (result i32) (i32.div_s (i32.const 1) (get_local $y)))
-  (func (export "div_s72") (result i32) (i32.div_s (i32.const 0) (i32.const 0)))
+  (func (export "mul69") (result i32) (i32.mul (i32.const 0x7fffffff) (i32.const 0x7fffffff)))
+  (func (export "mul70") (param $x i32) (result i32) (i32.mul (get_local $x) (i32.const 0x7fffffff)))
+  (func (export "mul71") (param $y i32) (result i32) (i32.mul (i32.const 0x7fffffff) (get_local $y)))
+  (func (export "div_s72") (result i32) (i32.div_s (i32.const 1) (i32.const 0)))
   (func (export "div_s73") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const 0)))
-  (func (export "div_s74") (param $y i32) (result i32) (i32.div_s (i32.const 0) (get_local $y)))
-  (func (export "div_s75") (result i32) (i32.div_s (i32.const 0x80000000) (i32.const -1)))
-  (func (export "div_s76") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const -1)))
-  (func (export "div_s77") (param $y i32) (result i32) (i32.div_s (i32.const 0x80000000) (get_local $y)))
-  (func (export "div_s78") (result i32) (i32.div_s (i32.const 1) (i32.const 1)))
-  (func (export "div_s79") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const 1)))
-  (func (export "div_s80") (param $y i32) (result i32) (i32.div_s (i32.const 1) (get_local $y)))
-  (func (export "div_s81") (result i32) (i32.div_s (i32.const 0) (i32.const 1)))
+  (func (export "div_s74") (param $y i32) (result i32) (i32.div_s (i32.const 1) (get_local $y)))
+  (func (export "div_s75") (result i32) (i32.div_s (i32.const 0) (i32.const 0)))
+  (func (export "div_s76") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const 0)))
+  (func (export "div_s77") (param $y i32) (result i32) (i32.div_s (i32.const 0) (get_local $y)))
+  (func (export "div_s78") (result i32) (i32.div_s (i32.const 0x80000000) (i32.const -1)))
+  (func (export "div_s79") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const -1)))
+  (func (export "div_s80") (param $y i32) (result i32) (i32.div_s (i32.const 0x80000000) (get_local $y)))
+  (func (export "div_s81") (result i32) (i32.div_s (i32.const 1) (i32.const 1)))
   (func (export "div_s82") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const 1)))
-  (func (export "div_s83") (param $y i32) (result i32) (i32.div_s (i32.const 0) (get_local $y)))
-  (func (export "div_s84") (result i32) (i32.div_s (i32.const -1) (i32.const -1)))
-  (func (export "div_s85") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const -1)))
-  (func (export "div_s86") (param $y i32) (result i32) (i32.div_s (i32.const -1) (get_local $y)))
-  (func (export "div_s87") (result i32) (i32.div_s (i32.const 0x80000000) (i32.const 2)))
-  (func (export "div_s88") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const 2)))
-  (func (export "div_s89") (param $y i32) (result i32) (i32.div_s (i32.const 0x80000000) (get_local $y)))
-  (func (export "div_s90") (result i32) (i32.div_s (i32.const 0x80000001) (i32.const 1000)))
-  (func (export "div_s91") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const 1000)))
-  (func (export "div_s92") (param $y i32) (result i32) (i32.div_s (i32.const 0x80000001) (get_local $y)))
-  (func (export "div_s93") (result i32) (i32.div_s (i32.const 5) (i32.const 2)))
+  (func (export "div_s83") (param $y i32) (result i32) (i32.div_s (i32.const 1) (get_local $y)))
+  (func (export "div_s84") (result i32) (i32.div_s (i32.const 0) (i32.const 1)))
+  (func (export "div_s85") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const 1)))
+  (func (export "div_s86") (param $y i32) (result i32) (i32.div_s (i32.const 0) (get_local $y)))
+  (func (export "div_s87") (result i32) (i32.div_s (i32.const 0) (i32.const -1)))
+  (func (export "div_s88") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const -1)))
+  (func (export "div_s89") (param $y i32) (result i32) (i32.div_s (i32.const 0) (get_local $y)))
+  (func (export "div_s90") (result i32) (i32.div_s (i32.const -1) (i32.const -1)))
+  (func (export "div_s91") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const -1)))
+  (func (export "div_s92") (param $y i32) (result i32) (i32.div_s (i32.const -1) (get_local $y)))
+  (func (export "div_s93") (result i32) (i32.div_s (i32.const 0x80000000) (i32.const 2)))
   (func (export "div_s94") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const 2)))
-  (func (export "div_s95") (param $y i32) (result i32) (i32.div_s (i32.const 5) (get_local $y)))
-  (func (export "div_s96") (result i32) (i32.div_s (i32.const -5) (i32.const 2)))
-  (func (export "div_s97") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const 2)))
-  (func (export "div_s98") (param $y i32) (result i32) (i32.div_s (i32.const -5) (get_local $y)))
-  (func (export "div_s99") (result i32) (i32.div_s (i32.const 5) (i32.const -2)))
-  (func (export "div_s100") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const -2)))
+  (func (export "div_s95") (param $y i32) (result i32) (i32.div_s (i32.const 0x80000000) (get_local $y)))
+  (func (export "div_s96") (result i32) (i32.div_s (i32.const 0x80000001) (i32.const 1000)))
+  (func (export "div_s97") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const 1000)))
+  (func (export "div_s98") (param $y i32) (result i32) (i32.div_s (i32.const 0x80000001) (get_local $y)))
+  (func (export "div_s99") (result i32) (i32.div_s (i32.const 5) (i32.const 2)))
+  (func (export "div_s100") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const 2)))
   (func (export "div_s101") (param $y i32) (result i32) (i32.div_s (i32.const 5) (get_local $y)))
-  (func (export "div_s102") (result i32) (i32.div_s (i32.const -5) (i32.const -2)))
-  (func (export "div_s103") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const -2)))
+  (func (export "div_s102") (result i32) (i32.div_s (i32.const -5) (i32.const 2)))
+  (func (export "div_s103") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const 2)))
   (func (export "div_s104") (param $y i32) (result i32) (i32.div_s (i32.const -5) (get_local $y)))
-  (func (export "div_s105") (result i32) (i32.div_s (i32.const 7) (i32.const 3)))
-  (func (export "div_s106") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const 3)))
-  (func (export "div_s107") (param $y i32) (result i32) (i32.div_s (i32.const 7) (get_local $y)))
-  (func (export "div_s108") (result i32) (i32.div_s (i32.const -7) (i32.const 3)))
-  (func (export "div_s109") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const 3)))
-  (func (export "div_s110") (param $y i32) (result i32) (i32.div_s (i32.const -7) (get_local $y)))
-  (func (export "div_s111") (result i32) (i32.div_s (i32.const 7) (i32.const -3)))
-  (func (export "div_s112") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const -3)))
+  (func (export "div_s105") (result i32) (i32.div_s (i32.const 5) (i32.const -2)))
+  (func (export "div_s106") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const -2)))
+  (func (export "div_s107") (param $y i32) (result i32) (i32.div_s (i32.const 5) (get_local $y)))
+  (func (export "div_s108") (result i32) (i32.div_s (i32.const -5) (i32.const -2)))
+  (func (export "div_s109") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const -2)))
+  (func (export "div_s110") (param $y i32) (result i32) (i32.div_s (i32.const -5) (get_local $y)))
+  (func (export "div_s111") (result i32) (i32.div_s (i32.const 7) (i32.const 3)))
+  (func (export "div_s112") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const 3)))
   (func (export "div_s113") (param $y i32) (result i32) (i32.div_s (i32.const 7) (get_local $y)))
-  (func (export "div_s114") (result i32) (i32.div_s (i32.const -7) (i32.const -3)))
-  (func (export "div_s115") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const -3)))
+  (func (export "div_s114") (result i32) (i32.div_s (i32.const -7) (i32.const 3)))
+  (func (export "div_s115") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const 3)))
   (func (export "div_s116") (param $y i32) (result i32) (i32.div_s (i32.const -7) (get_local $y)))
-  (func (export "div_s117") (result i32) (i32.div_s (i32.const 11) (i32.const 5)))
-  (func (export "div_s118") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const 5)))
-  (func (export "div_s119") (param $y i32) (result i32) (i32.div_s (i32.const 11) (get_local $y)))
-  (func (export "div_s120") (result i32) (i32.div_s (i32.const 17) (i32.const 7)))
-  (func (export "div_s121") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const 7)))
-  (func (export "div_s122") (param $y i32) (result i32) (i32.div_s (i32.const 17) (get_local $y)))
-  (func (export "div_u123") (result i32) (i32.div_u (i32.const 1) (i32.const 0)))
-  (func (export "div_u124") (param $x i32) (result i32) (i32.div_u (get_local $x) (i32.const 0)))
-  (func (export "div_u125") (param $y i32) (result i32) (i32.div_u (i32.const 1) (get_local $y)))
-  (func (export "div_u126") (result i32) (i32.div_u (i32.const 0) (i32.const 0)))
-  (func (export "div_u127") (param $x i32) (result i32) (i32.div_u (get_local $x) (i32.const 0)))
-  (func (export "div_u128") (param $y i32) (result i32) (i32.div_u (i32.const 0) (get_local $y)))
-  (func (export "div_u129") (result i32) (i32.div_u (i32.const 1) (i32.const 1)))
-  (func (export "div_u130") (param $x i32) (result i32) (i32.div_u (get_local $x) (i32.const 1)))
+  (func (export "div_s117") (result i32) (i32.div_s (i32.const 7) (i32.const -3)))
+  (func (export "div_s118") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const -3)))
+  (func (export "div_s119") (param $y i32) (result i32) (i32.div_s (i32.const 7) (get_local $y)))
+  (func (export "div_s120") (result i32) (i32.div_s (i32.const -7) (i32.const -3)))
+  (func (export "div_s121") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const -3)))
+  (func (export "div_s122") (param $y i32) (result i32) (i32.div_s (i32.const -7) (get_local $y)))
+  (func (export "div_s123") (result i32) (i32.div_s (i32.const 11) (i32.const 5)))
+  (func (export "div_s124") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const 5)))
+  (func (export "div_s125") (param $y i32) (result i32) (i32.div_s (i32.const 11) (get_local $y)))
+  (func (export "div_s126") (result i32) (i32.div_s (i32.const 17) (i32.const 7)))
+  (func (export "div_s127") (param $x i32) (result i32) (i32.div_s (get_local $x) (i32.const 7)))
+  (func (export "div_s128") (param $y i32) (result i32) (i32.div_s (i32.const 17) (get_local $y)))
+  (func (export "div_u129") (result i32) (i32.div_u (i32.const 1) (i32.const 0)))
+  (func (export "div_u130") (param $x i32) (result i32) (i32.div_u (get_local $x) (i32.const 0)))
   (func (export "div_u131") (param $y i32) (result i32) (i32.div_u (i32.const 1) (get_local $y)))
-  (func (export "div_u132") (result i32) (i32.div_u (i32.const 0) (i32.const 1)))
-  (func (export "div_u133") (param $x i32) (result i32) (i32.div_u (get_local $x) (i32.const 1)))
+  (func (export "div_u132") (result i32) (i32.div_u (i32.const 0) (i32.const 0)))
+  (func (export "div_u133") (param $x i32) (result i32) (i32.div_u (get_local $x) (i32.const 0)))
   (func (export "div_u134") (param $y i32) (result i32) (i32.div_u (i32.const 0) (get_local $y)))
-  (func (export "div_u135") (result i32) (i32.div_u (i32.const -1) (i32.const -1)))
-  (func (export "div_u136") (param $x i32) (result i32) (i32.div_u (get_local $x) (i32.const -1)))
-  (func (export "div_u137") (param $y i32) (result i32) (i32.div_u (i32.const -1) (get_local $y)))
-  (func (export "div_u138") (result i32) (i32.div_u (i32.const 0x80000000) (i32.const -1)))
-  (func (export "div_u139") (param $x i32) (result i32) (i32.div_u (get_local $x) (i32.const -1)))
-  (func (export "div_u140") (param $y i32) (result i32) (i32.div_u (i32.const 0x80000000) (get_local $y)))
-  (func (export "div_u141") (result i32) (i32.div_u (i32.const 0x80000000) (i32.const 2)))
-  (func (export "div_u142") (param $x i32) (result i32) (i32.div_u (get_local $x) (i32.const 2)))
-  (func (export "div_u143") (param $y i32) (result i32) (i32.div_u (i32.const 0x80000000) (get_local $y)))
-  (func (export "div_u144") (result i32) (i32.div_u (i32.const 0x8ff00ff0) (i32.const 0x10001)))
-  (func (export "div_u145") (param $x i32) (result i32) (i32.div_u (get_local $x) (i32.const 0x10001)))
-  (func (export "div_u146") (param $y i32) (result i32) (i32.div_u (i32.const 0x8ff00ff0) (get_local $y)))
-  (func (export "div_u147") (result i32) (i32.div_u (i32.const 0x80000001) (i32.const 1000)))
-  (func (export "div_u148") (param $x i32) (result i32) (i32.div_u (get_local $x) (i32.const 1000)))
-  (func (export "div_u149") (param $y i32) (result i32) (i32.div_u (i32.const 0x80000001) (get_local $y)))
-  (func (export "div_u150") (result i32) (i32.div_u (i32.const 5) (i32.const 2)))
-  (func (export "div_u151") (param $x i32) (result i32) (i32.div_u (get_local $x) (i32.const 2)))
-  (func (export "div_u152") (param $y i32) (result i32) (i32.div_u (i32.const 5) (get_local $y)))
-  (func (export "div_u153") (result i32) (i32.div_u (i32.const -5) (i32.const 2)))
-  (func (export "div_u154") (param $x i32) (result i32) (i32.div_u (get_local $x) (i32.const 2)))
-  (func (export "div_u155") (param $y i32) (result i32) (i32.div_u (i32.const -5) (get_local $y)))
-  (func (export "div_u156") (result i32) (i32.div_u (i32.const 5) (i32.const -2)))
-  (func (export "div_u157") (param $x i32) (result i32) (i32.div_u (get_local $x) (i32.const -2)))
+  (func (export "div_u135") (result i32) (i32.div_u (i32.const 1) (i32.const 1)))
+  (func (export "div_u136") (param $x i32) (result i32) (i32.div_u (get_local $x) (i32.const 1)))
+  (func (export "div_u137") (param $y i32) (result i32) (i32.div_u (i32.const 1) (get_local $y)))
+  (func (export "div_u138") (result i32) (i32.div_u (i32.const 0) (i32.const 1)))
+  (func (export "div_u139") (param $x i32) (result i32) (i32.div_u (get_local $x) (i32.const 1)))
+  (func (export "div_u140") (param $y i32) (result i32) (i32.div_u (i32.const 0) (get_local $y)))
+  (func (export "div_u141") (result i32) (i32.div_u (i32.const -1) (i32.const -1)))
+  (func (export "div_u142") (param $x i32) (result i32) (i32.div_u (get_local $x) (i32.const -1)))
+  (func (export "div_u143") (param $y i32) (result i32) (i32.div_u (i32.const -1) (get_local $y)))
+  (func (export "div_u144") (result i32) (i32.div_u (i32.const 0x80000000) (i32.const -1)))
+  (func (export "div_u145") (param $x i32) (result i32) (i32.div_u (get_local $x) (i32.const -1)))
+  (func (export "div_u146") (param $y i32) (result i32) (i32.div_u (i32.const 0x80000000) (get_local $y)))
+  (func (export "div_u147") (result i32) (i32.div_u (i32.const 0x80000000) (i32.const 2)))
+  (func (export "div_u148") (param $x i32) (result i32) (i32.div_u (get_local $x) (i32.const 2)))
+  (func (export "div_u149") (param $y i32) (result i32) (i32.div_u (i32.const 0x80000000) (get_local $y)))
+  (func (export "div_u150") (result i32) (i32.div_u (i32.const 0x8ff00ff0) (i32.const 0x10001)))
+  (func (export "div_u151") (param $x i32) (result i32) (i32.div_u (get_local $x) (i32.const 0x10001)))
+  (func (export "div_u152") (param $y i32) (result i32) (i32.div_u (i32.const 0x8ff00ff0) (get_local $y)))
+  (func (export "div_u153") (result i32) (i32.div_u (i32.const 0x80000001) (i32.const 1000)))
+  (func (export "div_u154") (param $x i32) (result i32) (i32.div_u (get_local $x) (i32.const 1000)))
+  (func (export "div_u155") (param $y i32) (result i32) (i32.div_u (i32.const 0x80000001) (get_local $y)))
+  (func (export "div_u156") (result i32) (i32.div_u (i32.const 5) (i32.const 2)))
+  (func (export "div_u157") (param $x i32) (result i32) (i32.div_u (get_local $x) (i32.const 2)))
   (func (export "div_u158") (param $y i32) (result i32) (i32.div_u (i32.const 5) (get_local $y)))
-  (func (export "div_u159") (result i32) (i32.div_u (i32.const -5) (i32.const -2)))
-  (func (export "div_u160") (param $x i32) (result i32) (i32.div_u (get_local $x) (i32.const -2)))
+  (func (export "div_u159") (result i32) (i32.div_u (i32.const -5) (i32.const 2)))
+  (func (export "div_u160") (param $x i32) (result i32) (i32.div_u (get_local $x) (i32.const 2)))
   (func (export "div_u161") (param $y i32) (result i32) (i32.div_u (i32.const -5) (get_local $y)))
-  (func (export "div_u162") (result i32) (i32.div_u (i32.const 7) (i32.const 3)))
-  (func (export "div_u163") (param $x i32) (result i32) (i32.div_u (get_local $x) (i32.const 3)))
-  (func (export "div_u164") (param $y i32) (result i32) (i32.div_u (i32.const 7) (get_local $y)))
-  (func (export "div_u165") (result i32) (i32.div_u (i32.const 11) (i32.const 5)))
-  (func (export "div_u166") (param $x i32) (result i32) (i32.div_u (get_local $x) (i32.const 5)))
-  (func (export "div_u167") (param $y i32) (result i32) (i32.div_u (i32.const 11) (get_local $y)))
-  (func (export "div_u168") (result i32) (i32.div_u (i32.const 17) (i32.const 7)))
-  (func (export "div_u169") (param $x i32) (result i32) (i32.div_u (get_local $x) (i32.const 7)))
-  (func (export "div_u170") (param $y i32) (result i32) (i32.div_u (i32.const 17) (get_local $y)))
-  (func (export "rem_s171") (result i32) (i32.rem_s (i32.const 1) (i32.const 0)))
-  (func (export "rem_s172") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const 0)))
-  (func (export "rem_s173") (param $y i32) (result i32) (i32.rem_s (i32.const 1) (get_local $y)))
-  (func (export "rem_s174") (result i32) (i32.rem_s (i32.const 0) (i32.const 0)))
-  (func (export "rem_s175") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const 0)))
-  (func (export "rem_s176") (param $y i32) (result i32) (i32.rem_s (i32.const 0) (get_local $y)))
-  (func (export "rem_s177") (result i32) (i32.rem_s (i32.const 0x7fffffff) (i32.const -1)))
-  (func (export "rem_s178") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const -1)))
-  (func (export "rem_s179") (param $y i32) (result i32) (i32.rem_s (i32.const 0x7fffffff) (get_local $y)))
-  (func (export "rem_s180") (result i32) (i32.rem_s (i32.const 1) (i32.const 1)))
-  (func (export "rem_s181") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const 1)))
-  (func (export "rem_s182") (param $y i32) (result i32) (i32.rem_s (i32.const 1) (get_local $y)))
-  (func (export "rem_s183") (result i32) (i32.rem_s (i32.const 0) (i32.const 1)))
-  (func (export "rem_s184") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const 1)))
-  (func (export "rem_s185") (param $y i32) (result i32) (i32.rem_s (i32.const 0) (get_local $y)))
-  (func (export "rem_s186") (result i32) (i32.rem_s (i32.const -1) (i32.const -1)))
-  (func (export "rem_s187") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const -1)))
-  (func (export "rem_s188") (param $y i32) (result i32) (i32.rem_s (i32.const -1) (get_local $y)))
-  (func (export "rem_s189") (result i32) (i32.rem_s (i32.const 0x80000000) (i32.const -1)))
-  (func (export "rem_s190") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const -1)))
-  (func (export "rem_s191") (param $y i32) (result i32) (i32.rem_s (i32.const 0x80000000) (get_local $y)))
-  (func (export "rem_s192") (result i32) (i32.rem_s (i32.const 0x80000000) (i32.const 2)))
-  (func (export "rem_s193") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const 2)))
-  (func (export "rem_s194") (param $y i32) (result i32) (i32.rem_s (i32.const 0x80000000) (get_local $y)))
-  (func (export "rem_s195") (result i32) (i32.rem_s (i32.const 0x80000001) (i32.const 1000)))
-  (func (export "rem_s196") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const 1000)))
-  (func (export "rem_s197") (param $y i32) (result i32) (i32.rem_s (i32.const 0x80000001) (get_local $y)))
-  (func (export "rem_s198") (result i32) (i32.rem_s (i32.const 5) (i32.const 2)))
-  (func (export "rem_s199") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const 2)))
-  (func (export "rem_s200") (param $y i32) (result i32) (i32.rem_s (i32.const 5) (get_local $y)))
-  (func (export "rem_s201") (result i32) (i32.rem_s (i32.const -5) (i32.const 2)))
+  (func (export "div_u162") (result i32) (i32.div_u (i32.const 5) (i32.const -2)))
+  (func (export "div_u163") (param $x i32) (result i32) (i32.div_u (get_local $x) (i32.const -2)))
+  (func (export "div_u164") (param $y i32) (result i32) (i32.div_u (i32.const 5) (get_local $y)))
+  (func (export "div_u165") (result i32) (i32.div_u (i32.const -5) (i32.const -2)))
+  (func (export "div_u166") (param $x i32) (result i32) (i32.div_u (get_local $x) (i32.const -2)))
+  (func (export "div_u167") (param $y i32) (result i32) (i32.div_u (i32.const -5) (get_local $y)))
+  (func (export "div_u168") (result i32) (i32.div_u (i32.const 7) (i32.const 3)))
+  (func (export "div_u169") (param $x i32) (result i32) (i32.div_u (get_local $x) (i32.const 3)))
+  (func (export "div_u170") (param $y i32) (result i32) (i32.div_u (i32.const 7) (get_local $y)))
+  (func (export "div_u171") (result i32) (i32.div_u (i32.const 11) (i32.const 5)))
+  (func (export "div_u172") (param $x i32) (result i32) (i32.div_u (get_local $x) (i32.const 5)))
+  (func (export "div_u173") (param $y i32) (result i32) (i32.div_u (i32.const 11) (get_local $y)))
+  (func (export "div_u174") (result i32) (i32.div_u (i32.const 17) (i32.const 7)))
+  (func (export "div_u175") (param $x i32) (result i32) (i32.div_u (get_local $x) (i32.const 7)))
+  (func (export "div_u176") (param $y i32) (result i32) (i32.div_u (i32.const 17) (get_local $y)))
+  (func (export "rem_s177") (result i32) (i32.rem_s (i32.const 1) (i32.const 0)))
+  (func (export "rem_s178") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const 0)))
+  (func (export "rem_s179") (param $y i32) (result i32) (i32.rem_s (i32.const 1) (get_local $y)))
+  (func (export "rem_s180") (result i32) (i32.rem_s (i32.const 0) (i32.const 0)))
+  (func (export "rem_s181") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const 0)))
+  (func (export "rem_s182") (param $y i32) (result i32) (i32.rem_s (i32.const 0) (get_local $y)))
+  (func (export "rem_s183") (result i32) (i32.rem_s (i32.const 0x7fffffff) (i32.const -1)))
+  (func (export "rem_s184") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const -1)))
+  (func (export "rem_s185") (param $y i32) (result i32) (i32.rem_s (i32.const 0x7fffffff) (get_local $y)))
+  (func (export "rem_s186") (result i32) (i32.rem_s (i32.const 1) (i32.const 1)))
+  (func (export "rem_s187") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const 1)))
+  (func (export "rem_s188") (param $y i32) (result i32) (i32.rem_s (i32.const 1) (get_local $y)))
+  (func (export "rem_s189") (result i32) (i32.rem_s (i32.const 0) (i32.const 1)))
+  (func (export "rem_s190") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const 1)))
+  (func (export "rem_s191") (param $y i32) (result i32) (i32.rem_s (i32.const 0) (get_local $y)))
+  (func (export "rem_s192") (result i32) (i32.rem_s (i32.const 0) (i32.const -1)))
+  (func (export "rem_s193") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const -1)))
+  (func (export "rem_s194") (param $y i32) (result i32) (i32.rem_s (i32.const 0) (get_local $y)))
+  (func (export "rem_s195") (result i32) (i32.rem_s (i32.const -1) (i32.const -1)))
+  (func (export "rem_s196") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const -1)))
+  (func (export "rem_s197") (param $y i32) (result i32) (i32.rem_s (i32.const -1) (get_local $y)))
+  (func (export "rem_s198") (result i32) (i32.rem_s (i32.const 0x80000000) (i32.const -1)))
+  (func (export "rem_s199") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const -1)))
+  (func (export "rem_s200") (param $y i32) (result i32) (i32.rem_s (i32.const 0x80000000) (get_local $y)))
+  (func (export "rem_s201") (result i32) (i32.rem_s (i32.const 0x80000000) (i32.const 2)))
   (func (export "rem_s202") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const 2)))
-  (func (export "rem_s203") (param $y i32) (result i32) (i32.rem_s (i32.const -5) (get_local $y)))
-  (func (export "rem_s204") (result i32) (i32.rem_s (i32.const 5) (i32.const -2)))
-  (func (export "rem_s205") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const -2)))
-  (func (export "rem_s206") (param $y i32) (result i32) (i32.rem_s (i32.const 5) (get_local $y)))
-  (func (export "rem_s207") (result i32) (i32.rem_s (i32.const -5) (i32.const -2)))
-  (func (export "rem_s208") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const -2)))
-  (func (export "rem_s209") (param $y i32) (result i32) (i32.rem_s (i32.const -5) (get_local $y)))
-  (func (export "rem_s210") (result i32) (i32.rem_s (i32.const 7) (i32.const 3)))
-  (func (export "rem_s211") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const 3)))
-  (func (export "rem_s212") (param $y i32) (result i32) (i32.rem_s (i32.const 7) (get_local $y)))
-  (func (export "rem_s213") (result i32) (i32.rem_s (i32.const -7) (i32.const 3)))
-  (func (export "rem_s214") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const 3)))
-  (func (export "rem_s215") (param $y i32) (result i32) (i32.rem_s (i32.const -7) (get_local $y)))
-  (func (export "rem_s216") (result i32) (i32.rem_s (i32.const 7) (i32.const -3)))
-  (func (export "rem_s217") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const -3)))
-  (func (export "rem_s218") (param $y i32) (result i32) (i32.rem_s (i32.const 7) (get_local $y)))
-  (func (export "rem_s219") (result i32) (i32.rem_s (i32.const -7) (i32.const -3)))
-  (func (export "rem_s220") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const -3)))
-  (func (export "rem_s221") (param $y i32) (result i32) (i32.rem_s (i32.const -7) (get_local $y)))
-  (func (export "rem_s222") (result i32) (i32.rem_s (i32.const 11) (i32.const 5)))
-  (func (export "rem_s223") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const 5)))
-  (func (export "rem_s224") (param $y i32) (result i32) (i32.rem_s (i32.const 11) (get_local $y)))
-  (func (export "rem_s225") (result i32) (i32.rem_s (i32.const 17) (i32.const 7)))
-  (func (export "rem_s226") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const 7)))
-  (func (export "rem_s227") (param $y i32) (result i32) (i32.rem_s (i32.const 17) (get_local $y)))
-  (func (export "rem_u228") (result i32) (i32.rem_u (i32.const 1) (i32.const 0)))
-  (func (export "rem_u229") (param $x i32) (result i32) (i32.rem_u (get_local $x) (i32.const 0)))
-  (func (export "rem_u230") (param $y i32) (result i32) (i32.rem_u (i32.const 1) (get_local $y)))
-  (func (export "rem_u231") (result i32) (i32.rem_u (i32.const 0) (i32.const 0)))
-  (func (export "rem_u232") (param $x i32) (result i32) (i32.rem_u (get_local $x) (i32.const 0)))
-  (func (export "rem_u233") (param $y i32) (result i32) (i32.rem_u (i32.const 0) (get_local $y)))
-  (func (export "rem_u234") (result i32) (i32.rem_u (i32.const 1) (i32.const 1)))
-  (func (export "rem_u235") (param $x i32) (result i32) (i32.rem_u (get_local $x) (i32.const 1)))
-  (func (export "rem_u236") (param $y i32) (result i32) (i32.rem_u (i32.const 1) (get_local $y)))
-  (func (export "rem_u237") (result i32) (i32.rem_u (i32.const 0) (i32.const 1)))
-  (func (export "rem_u238") (param $x i32) (result i32) (i32.rem_u (get_local $x) (i32.const 1)))
-  (func (export "rem_u239") (param $y i32) (result i32) (i32.rem_u (i32.const 0) (get_local $y)))
-  (func (export "rem_u240") (result i32) (i32.rem_u (i32.const -1) (i32.const -1)))
-  (func (export "rem_u241") (param $x i32) (result i32) (i32.rem_u (get_local $x) (i32.const -1)))
-  (func (export "rem_u242") (param $y i32) (result i32) (i32.rem_u (i32.const -1) (get_local $y)))
-  (func (export "rem_u243") (result i32) (i32.rem_u (i32.const 0x80000000) (i32.const -1)))
-  (func (export "rem_u244") (param $x i32) (result i32) (i32.rem_u (get_local $x) (i32.const -1)))
-  (func (export "rem_u245") (param $y i32) (result i32) (i32.rem_u (i32.const 0x80000000) (get_local $y)))
-  (func (export "rem_u246") (result i32) (i32.rem_u (i32.const 0x80000000) (i32.const 2)))
-  (func (export "rem_u247") (param $x i32) (result i32) (i32.rem_u (get_local $x) (i32.const 2)))
-  (func (export "rem_u248") (param $y i32) (result i32) (i32.rem_u (i32.const 0x80000000) (get_local $y)))
-  (func (export "rem_u249") (result i32) (i32.rem_u (i32.const 0x8ff00ff0) (i32.const 0x10001)))
-  (func (export "rem_u250") (param $x i32) (result i32) (i32.rem_u (get_local $x) (i32.const 0x10001)))
-  (func (export "rem_u251") (param $y i32) (result i32) (i32.rem_u (i32.const 0x8ff00ff0) (get_local $y)))
-  (func (export "rem_u252") (result i32) (i32.rem_u (i32.const 0x80000001) (i32.const 1000)))
-  (func (export "rem_u253") (param $x i32) (result i32) (i32.rem_u (get_local $x) (i32.const 1000)))
-  (func (export "rem_u254") (param $y i32) (result i32) (i32.rem_u (i32.const 0x80000001) (get_local $y)))
-  (func (export "rem_u255") (result i32) (i32.rem_u (i32.const 5) (i32.const 2)))
+  (func (export "rem_s203") (param $y i32) (result i32) (i32.rem_s (i32.const 0x80000000) (get_local $y)))
+  (func (export "rem_s204") (result i32) (i32.rem_s (i32.const 0x80000001) (i32.const 1000)))
+  (func (export "rem_s205") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const 1000)))
+  (func (export "rem_s206") (param $y i32) (result i32) (i32.rem_s (i32.const 0x80000001) (get_local $y)))
+  (func (export "rem_s207") (result i32) (i32.rem_s (i32.const 5) (i32.const 2)))
+  (func (export "rem_s208") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const 2)))
+  (func (export "rem_s209") (param $y i32) (result i32) (i32.rem_s (i32.const 5) (get_local $y)))
+  (func (export "rem_s210") (result i32) (i32.rem_s (i32.const -5) (i32.const 2)))
+  (func (export "rem_s211") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const 2)))
+  (func (export "rem_s212") (param $y i32) (result i32) (i32.rem_s (i32.const -5) (get_local $y)))
+  (func (export "rem_s213") (result i32) (i32.rem_s (i32.const 5) (i32.const -2)))
+  (func (export "rem_s214") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const -2)))
+  (func (export "rem_s215") (param $y i32) (result i32) (i32.rem_s (i32.const 5) (get_local $y)))
+  (func (export "rem_s216") (result i32) (i32.rem_s (i32.const -5) (i32.const -2)))
+  (func (export "rem_s217") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const -2)))
+  (func (export "rem_s218") (param $y i32) (result i32) (i32.rem_s (i32.const -5) (get_local $y)))
+  (func (export "rem_s219") (result i32) (i32.rem_s (i32.const 7) (i32.const 3)))
+  (func (export "rem_s220") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const 3)))
+  (func (export "rem_s221") (param $y i32) (result i32) (i32.rem_s (i32.const 7) (get_local $y)))
+  (func (export "rem_s222") (result i32) (i32.rem_s (i32.const -7) (i32.const 3)))
+  (func (export "rem_s223") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const 3)))
+  (func (export "rem_s224") (param $y i32) (result i32) (i32.rem_s (i32.const -7) (get_local $y)))
+  (func (export "rem_s225") (result i32) (i32.rem_s (i32.const 7) (i32.const -3)))
+  (func (export "rem_s226") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const -3)))
+  (func (export "rem_s227") (param $y i32) (result i32) (i32.rem_s (i32.const 7) (get_local $y)))
+  (func (export "rem_s228") (result i32) (i32.rem_s (i32.const -7) (i32.const -3)))
+  (func (export "rem_s229") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const -3)))
+  (func (export "rem_s230") (param $y i32) (result i32) (i32.rem_s (i32.const -7) (get_local $y)))
+  (func (export "rem_s231") (result i32) (i32.rem_s (i32.const 11) (i32.const 5)))
+  (func (export "rem_s232") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const 5)))
+  (func (export "rem_s233") (param $y i32) (result i32) (i32.rem_s (i32.const 11) (get_local $y)))
+  (func (export "rem_s234") (result i32) (i32.rem_s (i32.const 17) (i32.const 7)))
+  (func (export "rem_s235") (param $x i32) (result i32) (i32.rem_s (get_local $x) (i32.const 7)))
+  (func (export "rem_s236") (param $y i32) (result i32) (i32.rem_s (i32.const 17) (get_local $y)))
+  (func (export "rem_u237") (result i32) (i32.rem_u (i32.const 1) (i32.const 0)))
+  (func (export "rem_u238") (param $x i32) (result i32) (i32.rem_u (get_local $x) (i32.const 0)))
+  (func (export "rem_u239") (param $y i32) (result i32) (i32.rem_u (i32.const 1) (get_local $y)))
+  (func (export "rem_u240") (result i32) (i32.rem_u (i32.const 0) (i32.const 0)))
+  (func (export "rem_u241") (param $x i32) (result i32) (i32.rem_u (get_local $x) (i32.const 0)))
+  (func (export "rem_u242") (param $y i32) (result i32) (i32.rem_u (i32.const 0) (get_local $y)))
+  (func (export "rem_u243") (result i32) (i32.rem_u (i32.const 1) (i32.const 1)))
+  (func (export "rem_u244") (param $x i32) (result i32) (i32.rem_u (get_local $x) (i32.const 1)))
+  (func (export "rem_u245") (param $y i32) (result i32) (i32.rem_u (i32.const 1) (get_local $y)))
+  (func (export "rem_u246") (result i32) (i32.rem_u (i32.const 0) (i32.const 1)))
+  (func (export "rem_u247") (param $x i32) (result i32) (i32.rem_u (get_local $x) (i32.const 1)))
+  (func (export "rem_u248") (param $y i32) (result i32) (i32.rem_u (i32.const 0) (get_local $y)))
+  (func (export "rem_u249") (result i32) (i32.rem_u (i32.const -1) (i32.const -1)))
+  (func (export "rem_u250") (param $x i32) (result i32) (i32.rem_u (get_local $x) (i32.const -1)))
+  (func (export "rem_u251") (param $y i32) (result i32) (i32.rem_u (i32.const -1) (get_local $y)))
+  (func (export "rem_u252") (result i32) (i32.rem_u (i32.const 0x80000000) (i32.const -1)))
+  (func (export "rem_u253") (param $x i32) (result i32) (i32.rem_u (get_local $x) (i32.const -1)))
+  (func (export "rem_u254") (param $y i32) (result i32) (i32.rem_u (i32.const 0x80000000) (get_local $y)))
+  (func (export "rem_u255") (result i32) (i32.rem_u (i32.const 0x80000000) (i32.const 2)))
   (func (export "rem_u256") (param $x i32) (result i32) (i32.rem_u (get_local $x) (i32.const 2)))
-  (func (export "rem_u257") (param $y i32) (result i32) (i32.rem_u (i32.const 5) (get_local $y)))
-  (func (export "rem_u258") (result i32) (i32.rem_u (i32.const -5) (i32.const 2)))
-  (func (export "rem_u259") (param $x i32) (result i32) (i32.rem_u (get_local $x) (i32.const 2)))
-  (func (export "rem_u260") (param $y i32) (result i32) (i32.rem_u (i32.const -5) (get_local $y)))
-  (func (export "rem_u261") (result i32) (i32.rem_u (i32.const 5) (i32.const -2)))
-  (func (export "rem_u262") (param $x i32) (result i32) (i32.rem_u (get_local $x) (i32.const -2)))
-  (func (export "rem_u263") (param $y i32) (result i32) (i32.rem_u (i32.const 5) (get_local $y)))
-  (func (export "rem_u264") (result i32) (i32.rem_u (i32.const -5) (i32.const -2)))
-  (func (export "rem_u265") (param $x i32) (result i32) (i32.rem_u (get_local $x) (i32.const -2)))
-  (func (export "rem_u266") (param $y i32) (result i32) (i32.rem_u (i32.const -5) (get_local $y)))
-  (func (export "rem_u267") (result i32) (i32.rem_u (i32.const 7) (i32.const 3)))
-  (func (export "rem_u268") (param $x i32) (result i32) (i32.rem_u (get_local $x) (i32.const 3)))
-  (func (export "rem_u269") (param $y i32) (result i32) (i32.rem_u (i32.const 7) (get_local $y)))
-  (func (export "rem_u270") (result i32) (i32.rem_u (i32.const 11) (i32.const 5)))
-  (func (export "rem_u271") (param $x i32) (result i32) (i32.rem_u (get_local $x) (i32.const 5)))
-  (func (export "rem_u272") (param $y i32) (result i32) (i32.rem_u (i32.const 11) (get_local $y)))
-  (func (export "rem_u273") (result i32) (i32.rem_u (i32.const 17) (i32.const 7)))
-  (func (export "rem_u274") (param $x i32) (result i32) (i32.rem_u (get_local $x) (i32.const 7)))
-  (func (export "rem_u275") (param $y i32) (result i32) (i32.rem_u (i32.const 17) (get_local $y)))
-  (func (export "and276") (result i32) (i32.and (i32.const 1) (i32.const 0)))
-  (func (export "and277") (param $x i32) (result i32) (i32.and (get_local $x) (i32.const 0)))
-  (func (export "and278") (param $y i32) (result i32) (i32.and (i32.const 1) (get_local $y)))
-  (func (export "and279") (result i32) (i32.and (i32.const 0) (i32.const 1)))
-  (func (export "and280") (param $x i32) (result i32) (i32.and (get_local $x) (i32.const 1)))
-  (func (export "and281") (param $y i32) (result i32) (i32.and (i32.const 0) (get_local $y)))
-  (func (export "and282") (result i32) (i32.and (i32.const 1) (i32.const 1)))
-  (func (export "and283") (param $x i32) (result i32) (i32.and (get_local $x) (i32.const 1)))
-  (func (export "and284") (param $y i32) (result i32) (i32.and (i32.const 1) (get_local $y)))
-  (func (export "and285") (result i32) (i32.and (i32.const 0) (i32.const 0)))
+  (func (export "rem_u257") (param $y i32) (result i32) (i32.rem_u (i32.const 0x80000000) (get_local $y)))
+  (func (export "rem_u258") (result i32) (i32.rem_u (i32.const 0x8ff00ff0) (i32.const 0x10001)))
+  (func (export "rem_u259") (param $x i32) (result i32) (i32.rem_u (get_local $x) (i32.const 0x10001)))
+  (func (export "rem_u260") (param $y i32) (result i32) (i32.rem_u (i32.const 0x8ff00ff0) (get_local $y)))
+  (func (export "rem_u261") (result i32) (i32.rem_u (i32.const 0x80000001) (i32.const 1000)))
+  (func (export "rem_u262") (param $x i32) (result i32) (i32.rem_u (get_local $x) (i32.const 1000)))
+  (func (export "rem_u263") (param $y i32) (result i32) (i32.rem_u (i32.const 0x80000001) (get_local $y)))
+  (func (export "rem_u264") (result i32) (i32.rem_u (i32.const 5) (i32.const 2)))
+  (func (export "rem_u265") (param $x i32) (result i32) (i32.rem_u (get_local $x) (i32.const 2)))
+  (func (export "rem_u266") (param $y i32) (result i32) (i32.rem_u (i32.const 5) (get_local $y)))
+  (func (export "rem_u267") (result i32) (i32.rem_u (i32.const -5) (i32.const 2)))
+  (func (export "rem_u268") (param $x i32) (result i32) (i32.rem_u (get_local $x) (i32.const 2)))
+  (func (export "rem_u269") (param $y i32) (result i32) (i32.rem_u (i32.const -5) (get_local $y)))
+  (func (export "rem_u270") (result i32) (i32.rem_u (i32.const 5) (i32.const -2)))
+  (func (export "rem_u271") (param $x i32) (result i32) (i32.rem_u (get_local $x) (i32.const -2)))
+  (func (export "rem_u272") (param $y i32) (result i32) (i32.rem_u (i32.const 5) (get_local $y)))
+  (func (export "rem_u273") (result i32) (i32.rem_u (i32.const -5) (i32.const -2)))
+  (func (export "rem_u274") (param $x i32) (result i32) (i32.rem_u (get_local $x) (i32.const -2)))
+  (func (export "rem_u275") (param $y i32) (result i32) (i32.rem_u (i32.const -5) (get_local $y)))
+  (func (export "rem_u276") (result i32) (i32.rem_u (i32.const 7) (i32.const 3)))
+  (func (export "rem_u277") (param $x i32) (result i32) (i32.rem_u (get_local $x) (i32.const 3)))
+  (func (export "rem_u278") (param $y i32) (result i32) (i32.rem_u (i32.const 7) (get_local $y)))
+  (func (export "rem_u279") (result i32) (i32.rem_u (i32.const 11) (i32.const 5)))
+  (func (export "rem_u280") (param $x i32) (result i32) (i32.rem_u (get_local $x) (i32.const 5)))
+  (func (export "rem_u281") (param $y i32) (result i32) (i32.rem_u (i32.const 11) (get_local $y)))
+  (func (export "rem_u282") (result i32) (i32.rem_u (i32.const 17) (i32.const 7)))
+  (func (export "rem_u283") (param $x i32) (result i32) (i32.rem_u (get_local $x) (i32.const 7)))
+  (func (export "rem_u284") (param $y i32) (result i32) (i32.rem_u (i32.const 17) (get_local $y)))
+  (func (export "and285") (result i32) (i32.and (i32.const 1) (i32.const 0)))
   (func (export "and286") (param $x i32) (result i32) (i32.and (get_local $x) (i32.const 0)))
-  (func (export "and287") (param $y i32) (result i32) (i32.and (i32.const 0) (get_local $y)))
-  (func (export "and288") (result i32) (i32.and (i32.const 0x7fffffff) (i32.const 0x80000000)))
-  (func (export "and289") (param $x i32) (result i32) (i32.and (get_local $x) (i32.const 0x80000000)))
-  (func (export "and290") (param $y i32) (result i32) (i32.and (i32.const 0x7fffffff) (get_local $y)))
-  (func (export "and291") (result i32) (i32.and (i32.const 0x7fffffff) (i32.const -1)))
-  (func (export "and292") (param $x i32) (result i32) (i32.and (get_local $x) (i32.const -1)))
-  (func (export "and293") (param $y i32) (result i32) (i32.and (i32.const 0x7fffffff) (get_local $y)))
-  (func (export "and294") (result i32) (i32.and (i32.const 0xf0f0ffff) (i32.const 0xfffff0f0)))
-  (func (export "and295") (param $x i32) (result i32) (i32.and (get_local $x) (i32.const 0xfffff0f0)))
-  (func (export "and296") (param $y i32) (result i32) (i32.and (i32.const 0xf0f0ffff) (get_local $y)))
-  (func (export "and297") (result i32) (i32.and (i32.const 0xffffffff) (i32.const 0xffffffff)))
-  (func (export "and298") (param $x i32) (result i32) (i32.and (get_local $x) (i32.const 0xffffffff)))
-  (func (export "and299") (param $y i32) (result i32) (i32.and (i32.const 0xffffffff) (get_local $y)))
-  (func (export "or300") (result i32) (i32.or (i32.const 1) (i32.const 0)))
-  (func (export "or301") (param $x i32) (result i32) (i32.or (get_local $x) (i32.const 0)))
-  (func (export "or302") (param $y i32) (result i32) (i32.or (i32.const 1) (get_local $y)))
-  (func (export "or303") (result i32) (i32.or (i32.const 0) (i32.const 1)))
-  (func (export "or304") (param $x i32) (result i32) (i32.or (get_local $x) (i32.const 1)))
-  (func (export "or305") (param $y i32) (result i32) (i32.or (i32.const 0) (get_local $y)))
-  (func (export "or306") (result i32) (i32.or (i32.const 1) (i32.const 1)))
-  (func (export "or307") (param $x i32) (result i32) (i32.or (get_local $x) (i32.const 1)))
-  (func (export "or308") (param $y i32) (result i32) (i32.or (i32.const 1) (get_local $y)))
-  (func (export "or309") (result i32) (i32.or (i32.const 0) (i32.const 0)))
+  (func (export "and287") (param $y i32) (result i32) (i32.and (i32.const 1) (get_local $y)))
+  (func (export "and288") (result i32) (i32.and (i32.const 0) (i32.const 1)))
+  (func (export "and289") (param $x i32) (result i32) (i32.and (get_local $x) (i32.const 1)))
+  (func (export "and290") (param $y i32) (result i32) (i32.and (i32.const 0) (get_local $y)))
+  (func (export "and291") (result i32) (i32.and (i32.const 1) (i32.const 1)))
+  (func (export "and292") (param $x i32) (result i32) (i32.and (get_local $x) (i32.const 1)))
+  (func (export "and293") (param $y i32) (result i32) (i32.and (i32.const 1) (get_local $y)))
+  (func (export "and294") (result i32) (i32.and (i32.const 0) (i32.const 0)))
+  (func (export "and295") (param $x i32) (result i32) (i32.and (get_local $x) (i32.const 0)))
+  (func (export "and296") (param $y i32) (result i32) (i32.and (i32.const 0) (get_local $y)))
+  (func (export "and297") (result i32) (i32.and (i32.const 0x7fffffff) (i32.const 0x80000000)))
+  (func (export "and298") (param $x i32) (result i32) (i32.and (get_local $x) (i32.const 0x80000000)))
+  (func (export "and299") (param $y i32) (result i32) (i32.and (i32.const 0x7fffffff) (get_local $y)))
+  (func (export "and300") (result i32) (i32.and (i32.const 0x7fffffff) (i32.const -1)))
+  (func (export "and301") (param $x i32) (result i32) (i32.and (get_local $x) (i32.const -1)))
+  (func (export "and302") (param $y i32) (result i32) (i32.and (i32.const 0x7fffffff) (get_local $y)))
+  (func (export "and303") (result i32) (i32.and (i32.const 0xf0f0ffff) (i32.const 0xfffff0f0)))
+  (func (export "and304") (param $x i32) (result i32) (i32.and (get_local $x) (i32.const 0xfffff0f0)))
+  (func (export "and305") (param $y i32) (result i32) (i32.and (i32.const 0xf0f0ffff) (get_local $y)))
+  (func (export "and306") (result i32) (i32.and (i32.const 0xffffffff) (i32.const 0xffffffff)))
+  (func (export "and307") (param $x i32) (result i32) (i32.and (get_local $x) (i32.const 0xffffffff)))
+  (func (export "and308") (param $y i32) (result i32) (i32.and (i32.const 0xffffffff) (get_local $y)))
+  (func (export "or309") (result i32) (i32.or (i32.const 1) (i32.const 0)))
   (func (export "or310") (param $x i32) (result i32) (i32.or (get_local $x) (i32.const 0)))
-  (func (export "or311") (param $y i32) (result i32) (i32.or (i32.const 0) (get_local $y)))
-  (func (export "or312") (result i32) (i32.or (i32.const 0x7fffffff) (i32.const 0x80000000)))
-  (func (export "or313") (param $x i32) (result i32) (i32.or (get_local $x) (i32.const 0x80000000)))
-  (func (export "or314") (param $y i32) (result i32) (i32.or (i32.const 0x7fffffff) (get_local $y)))
-  (func (export "or315") (result i32) (i32.or (i32.const 0x80000000) (i32.const 0)))
-  (func (export "or316") (param $x i32) (result i32) (i32.or (get_local $x) (i32.const 0)))
-  (func (export "or317") (param $y i32) (result i32) (i32.or (i32.const 0x80000000) (get_local $y)))
-  (func (export "or318") (result i32) (i32.or (i32.const 0xf0f0ffff) (i32.const 0xfffff0f0)))
-  (func (export "or319") (param $x i32) (result i32) (i32.or (get_local $x) (i32.const 0xfffff0f0)))
-  (func (export "or320") (param $y i32) (result i32) (i32.or (i32.const 0xf0f0ffff) (get_local $y)))
-  (func (export "or321") (result i32) (i32.or (i32.const 0xffffffff) (i32.const 0xffffffff)))
-  (func (export "or322") (param $x i32) (result i32) (i32.or (get_local $x) (i32.const 0xffffffff)))
-  (func (export "or323") (param $y i32) (result i32) (i32.or (i32.const 0xffffffff) (get_local $y)))
-  (func (export "xor324") (result i32) (i32.xor (i32.const 1) (i32.const 0)))
-  (func (export "xor325") (param $x i32) (result i32) (i32.xor (get_local $x) (i32.const 0)))
-  (func (export "xor326") (param $y i32) (result i32) (i32.xor (i32.const 1) (get_local $y)))
-  (func (export "xor327") (result i32) (i32.xor (i32.const 0) (i32.const 1)))
-  (func (export "xor328") (param $x i32) (result i32) (i32.xor (get_local $x) (i32.const 1)))
-  (func (export "xor329") (param $y i32) (result i32) (i32.xor (i32.const 0) (get_local $y)))
-  (func (export "xor330") (result i32) (i32.xor (i32.const 1) (i32.const 1)))
-  (func (export "xor331") (param $x i32) (result i32) (i32.xor (get_local $x) (i32.const 1)))
-  (func (export "xor332") (param $y i32) (result i32) (i32.xor (i32.const 1) (get_local $y)))
-  (func (export "xor333") (result i32) (i32.xor (i32.const 0) (i32.const 0)))
+  (func (export "or311") (param $y i32) (result i32) (i32.or (i32.const 1) (get_local $y)))
+  (func (export "or312") (result i32) (i32.or (i32.const 0) (i32.const 1)))
+  (func (export "or313") (param $x i32) (result i32) (i32.or (get_local $x) (i32.const 1)))
+  (func (export "or314") (param $y i32) (result i32) (i32.or (i32.const 0) (get_local $y)))
+  (func (export "or315") (result i32) (i32.or (i32.const 1) (i32.const 1)))
+  (func (export "or316") (param $x i32) (result i32) (i32.or (get_local $x) (i32.const 1)))
+  (func (export "or317") (param $y i32) (result i32) (i32.or (i32.const 1) (get_local $y)))
+  (func (export "or318") (result i32) (i32.or (i32.const 0) (i32.const 0)))
+  (func (export "or319") (param $x i32) (result i32) (i32.or (get_local $x) (i32.const 0)))
+  (func (export "or320") (param $y i32) (result i32) (i32.or (i32.const 0) (get_local $y)))
+  (func (export "or321") (result i32) (i32.or (i32.const 0x7fffffff) (i32.const 0x80000000)))
+  (func (export "or322") (param $x i32) (result i32) (i32.or (get_local $x) (i32.const 0x80000000)))
+  (func (export "or323") (param $y i32) (result i32) (i32.or (i32.const 0x7fffffff) (get_local $y)))
+  (func (export "or324") (result i32) (i32.or (i32.const 0x80000000) (i32.const 0)))
+  (func (export "or325") (param $x i32) (result i32) (i32.or (get_local $x) (i32.const 0)))
+  (func (export "or326") (param $y i32) (result i32) (i32.or (i32.const 0x80000000) (get_local $y)))
+  (func (export "or327") (result i32) (i32.or (i32.const 0xf0f0ffff) (i32.const 0xfffff0f0)))
+  (func (export "or328") (param $x i32) (result i32) (i32.or (get_local $x) (i32.const 0xfffff0f0)))
+  (func (export "or329") (param $y i32) (result i32) (i32.or (i32.const 0xf0f0ffff) (get_local $y)))
+  (func (export "or330") (result i32) (i32.or (i32.const 0xffffffff) (i32.const 0xffffffff)))
+  (func (export "or331") (param $x i32) (result i32) (i32.or (get_local $x) (i32.const 0xffffffff)))
+  (func (export "or332") (param $y i32) (result i32) (i32.or (i32.const 0xffffffff) (get_local $y)))
+  (func (export "xor333") (result i32) (i32.xor (i32.const 1) (i32.const 0)))
   (func (export "xor334") (param $x i32) (result i32) (i32.xor (get_local $x) (i32.const 0)))
-  (func (export "xor335") (param $y i32) (result i32) (i32.xor (i32.const 0) (get_local $y)))
-  (func (export "xor336") (result i32) (i32.xor (i32.const 0x7fffffff) (i32.const 0x80000000)))
-  (func (export "xor337") (param $x i32) (result i32) (i32.xor (get_local $x) (i32.const 0x80000000)))
-  (func (export "xor338") (param $y i32) (result i32) (i32.xor (i32.const 0x7fffffff) (get_local $y)))
-  (func (export "xor339") (result i32) (i32.xor (i32.const 0x80000000) (i32.const 0)))
-  (func (export "xor340") (param $x i32) (result i32) (i32.xor (get_local $x) (i32.const 0)))
-  (func (export "xor341") (param $y i32) (result i32) (i32.xor (i32.const 0x80000000) (get_local $y)))
-  (func (export "xor342") (result i32) (i32.xor (i32.const -1) (i32.const 0x80000000)))
-  (func (export "xor343") (param $x i32) (result i32) (i32.xor (get_local $x) (i32.const 0x80000000)))
-  (func (export "xor344") (param $y i32) (result i32) (i32.xor (i32.const -1) (get_local $y)))
-  (func (export "xor345") (result i32) (i32.xor (i32.const -1) (i32.const 0x7fffffff)))
-  (func (export "xor346") (param $x i32) (result i32) (i32.xor (get_local $x) (i32.const 0x7fffffff)))
-  (func (export "xor347") (param $y i32) (result i32) (i32.xor (i32.const -1) (get_local $y)))
-  (func (export "xor348") (result i32) (i32.xor (i32.const 0xf0f0ffff) (i32.const 0xfffff0f0)))
-  (func (export "xor349") (param $x i32) (result i32) (i32.xor (get_local $x) (i32.const 0xfffff0f0)))
-  (func (export "xor350") (param $y i32) (result i32) (i32.xor (i32.const 0xf0f0ffff) (get_local $y)))
-  (func (export "xor351") (result i32) (i32.xor (i32.const 0xffffffff) (i32.const 0xffffffff)))
-  (func (export "xor352") (param $x i32) (result i32) (i32.xor (get_local $x) (i32.const 0xffffffff)))
-  (func (export "xor353") (param $y i32) (result i32) (i32.xor (i32.const 0xffffffff) (get_local $y)))
-  (func (export "shl354") (result i32) (i32.shl (i32.const 1) (i32.const 1)))
-  (func (export "shl355") (param $x i32) (result i32) (i32.shl (get_local $x) (i32.const 1)))
-  (func (export "shl356") (param $y i32) (result i32) (i32.shl (i32.const 1) (get_local $y)))
-  (func (export "shl357") (result i32) (i32.shl (i32.const 1) (i32.const 0)))
-  (func (export "shl358") (param $x i32) (result i32) (i32.shl (get_local $x) (i32.const 0)))
-  (func (export "shl359") (param $y i32) (result i32) (i32.shl (i32.const 1) (get_local $y)))
-  (func (export "shl360") (result i32) (i32.shl (i32.const 0x7fffffff) (i32.const 1)))
-  (func (export "shl361") (param $x i32) (result i32) (i32.shl (get_local $x) (i32.const 1)))
-  (func (export "shl362") (param $y i32) (result i32) (i32.shl (i32.const 0x7fffffff) (get_local $y)))
-  (func (export "shl363") (result i32) (i32.shl (i32.const 0xffffffff) (i32.const 1)))
+  (func (export "xor335") (param $y i32) (result i32) (i32.xor (i32.const 1) (get_local $y)))
+  (func (export "xor336") (result i32) (i32.xor (i32.const 0) (i32.const 1)))
+  (func (export "xor337") (param $x i32) (result i32) (i32.xor (get_local $x) (i32.const 1)))
+  (func (export "xor338") (param $y i32) (result i32) (i32.xor (i32.const 0) (get_local $y)))
+  (func (export "xor339") (result i32) (i32.xor (i32.const 1) (i32.const 1)))
+  (func (export "xor340") (param $x i32) (result i32) (i32.xor (get_local $x) (i32.const 1)))
+  (func (export "xor341") (param $y i32) (result i32) (i32.xor (i32.const 1) (get_local $y)))
+  (func (export "xor342") (result i32) (i32.xor (i32.const 0) (i32.const 0)))
+  (func (export "xor343") (param $x i32) (result i32) (i32.xor (get_local $x) (i32.const 0)))
+  (func (export "xor344") (param $y i32) (result i32) (i32.xor (i32.const 0) (get_local $y)))
+  (func (export "xor345") (result i32) (i32.xor (i32.const 0x7fffffff) (i32.const 0x80000000)))
+  (func (export "xor346") (param $x i32) (result i32) (i32.xor (get_local $x) (i32.const 0x80000000)))
+  (func (export "xor347") (param $y i32) (result i32) (i32.xor (i32.const 0x7fffffff) (get_local $y)))
+  (func (export "xor348") (result i32) (i32.xor (i32.const 0x80000000) (i32.const 0)))
+  (func (export "xor349") (param $x i32) (result i32) (i32.xor (get_local $x) (i32.const 0)))
+  (func (export "xor350") (param $y i32) (result i32) (i32.xor (i32.const 0x80000000) (get_local $y)))
+  (func (export "xor351") (result i32) (i32.xor (i32.const -1) (i32.const 0x80000000)))
+  (func (export "xor352") (param $x i32) (result i32) (i32.xor (get_local $x) (i32.const 0x80000000)))
+  (func (export "xor353") (param $y i32) (result i32) (i32.xor (i32.const -1) (get_local $y)))
+  (func (export "xor354") (result i32) (i32.xor (i32.const -1) (i32.const 0x7fffffff)))
+  (func (export "xor355") (param $x i32) (result i32) (i32.xor (get_local $x) (i32.const 0x7fffffff)))
+  (func (export "xor356") (param $y i32) (result i32) (i32.xor (i32.const -1) (get_local $y)))
+  (func (export "xor357") (result i32) (i32.xor (i32.const 0xf0f0ffff) (i32.const 0xfffff0f0)))
+  (func (export "xor358") (param $x i32) (result i32) (i32.xor (get_local $x) (i32.const 0xfffff0f0)))
+  (func (export "xor359") (param $y i32) (result i32) (i32.xor (i32.const 0xf0f0ffff) (get_local $y)))
+  (func (export "xor360") (result i32) (i32.xor (i32.const 0xffffffff) (i32.const 0xffffffff)))
+  (func (export "xor361") (param $x i32) (result i32) (i32.xor (get_local $x) (i32.const 0xffffffff)))
+  (func (export "xor362") (param $y i32) (result i32) (i32.xor (i32.const 0xffffffff) (get_local $y)))
+  (func (export "shl363") (result i32) (i32.shl (i32.const 1) (i32.const 1)))
   (func (export "shl364") (param $x i32) (result i32) (i32.shl (get_local $x) (i32.const 1)))
-  (func (export "shl365") (param $y i32) (result i32) (i32.shl (i32.const 0xffffffff) (get_local $y)))
-  (func (export "shl366") (result i32) (i32.shl (i32.const 0x80000000) (i32.const 1)))
-  (func (export "shl367") (param $x i32) (result i32) (i32.shl (get_local $x) (i32.const 1)))
-  (func (export "shl368") (param $y i32) (result i32) (i32.shl (i32.const 0x80000000) (get_local $y)))
-  (func (export "shl369") (result i32) (i32.shl (i32.const 0x40000000) (i32.const 1)))
+  (func (export "shl365") (param $y i32) (result i32) (i32.shl (i32.const 1) (get_local $y)))
+  (func (export "shl366") (result i32) (i32.shl (i32.const 1) (i32.const 0)))
+  (func (export "shl367") (param $x i32) (result i32) (i32.shl (get_local $x) (i32.const 0)))
+  (func (export "shl368") (param $y i32) (result i32) (i32.shl (i32.const 1) (get_local $y)))
+  (func (export "shl369") (result i32) (i32.shl (i32.const 0x7fffffff) (i32.const 1)))
   (func (export "shl370") (param $x i32) (result i32) (i32.shl (get_local $x) (i32.const 1)))
-  (func (export "shl371") (param $y i32) (result i32) (i32.shl (i32.const 0x40000000) (get_local $y)))
-  (func (export "shl372") (result i32) (i32.shl (i32.const 1) (i32.const 31)))
-  (func (export "shl373") (param $x i32) (result i32) (i32.shl (get_local $x) (i32.const 31)))
-  (func (export "shl374") (param $y i32) (result i32) (i32.shl (i32.const 1) (get_local $y)))
-  (func (export "shl375") (result i32) (i32.shl (i32.const 1) (i32.const 32)))
-  (func (export "shl376") (param $x i32) (result i32) (i32.shl (get_local $x) (i32.const 32)))
-  (func (export "shl377") (param $y i32) (result i32) (i32.shl (i32.const 1) (get_local $y)))
-  (func (export "shl378") (result i32) (i32.shl (i32.const 1) (i32.const 33)))
-  (func (export "shl379") (param $x i32) (result i32) (i32.shl (get_local $x) (i32.const 33)))
-  (func (export "shl380") (param $y i32) (result i32) (i32.shl (i32.const 1) (get_local $y)))
-  (func (export "shl381") (result i32) (i32.shl (i32.const 1) (i32.const -1)))
-  (func (export "shl382") (param $x i32) (result i32) (i32.shl (get_local $x) (i32.const -1)))
+  (func (export "shl371") (param $y i32) (result i32) (i32.shl (i32.const 0x7fffffff) (get_local $y)))
+  (func (export "shl372") (result i32) (i32.shl (i32.const 0xffffffff) (i32.const 1)))
+  (func (export "shl373") (param $x i32) (result i32) (i32.shl (get_local $x) (i32.const 1)))
+  (func (export "shl374") (param $y i32) (result i32) (i32.shl (i32.const 0xffffffff) (get_local $y)))
+  (func (export "shl375") (result i32) (i32.shl (i32.const 0x80000000) (i32.const 1)))
+  (func (export "shl376") (param $x i32) (result i32) (i32.shl (get_local $x) (i32.const 1)))
+  (func (export "shl377") (param $y i32) (result i32) (i32.shl (i32.const 0x80000000) (get_local $y)))
+  (func (export "shl378") (result i32) (i32.shl (i32.const 0x40000000) (i32.const 1)))
+  (func (export "shl379") (param $x i32) (result i32) (i32.shl (get_local $x) (i32.const 1)))
+  (func (export "shl380") (param $y i32) (result i32) (i32.shl (i32.const 0x40000000) (get_local $y)))
+  (func (export "shl381") (result i32) (i32.shl (i32.const 1) (i32.const 31)))
+  (func (export "shl382") (param $x i32) (result i32) (i32.shl (get_local $x) (i32.const 31)))
   (func (export "shl383") (param $y i32) (result i32) (i32.shl (i32.const 1) (get_local $y)))
-  (func (export "shl384") (result i32) (i32.shl (i32.const 1) (i32.const 0x7fffffff)))
-  (func (export "shl385") (param $x i32) (result i32) (i32.shl (get_local $x) (i32.const 0x7fffffff)))
+  (func (export "shl384") (result i32) (i32.shl (i32.const 1) (i32.const 32)))
+  (func (export "shl385") (param $x i32) (result i32) (i32.shl (get_local $x) (i32.const 32)))
   (func (export "shl386") (param $y i32) (result i32) (i32.shl (i32.const 1) (get_local $y)))
-  (func (export "shr_s387") (result i32) (i32.shr_s (i32.const 1) (i32.const 1)))
-  (func (export "shr_s388") (param $x i32) (result i32) (i32.shr_s (get_local $x) (i32.const 1)))
-  (func (export "shr_s389") (param $y i32) (result i32) (i32.shr_s (i32.const 1) (get_local $y)))
-  (func (export "shr_s390") (result i32) (i32.shr_s (i32.const 1) (i32.const 0)))
-  (func (export "shr_s391") (param $x i32) (result i32) (i32.shr_s (get_local $x) (i32.const 0)))
-  (func (export "shr_s392") (param $y i32) (result i32) (i32.shr_s (i32.const 1) (get_local $y)))
-  (func (export "shr_s393") (result i32) (i32.shr_s (i32.const -1) (i32.const 1)))
-  (func (export "shr_s394") (param $x i32) (result i32) (i32.shr_s (get_local $x) (i32.const 1)))
-  (func (export "shr_s395") (param $y i32) (result i32) (i32.shr_s (i32.const -1) (get_local $y)))
-  (func (export "shr_s396") (result i32) (i32.shr_s (i32.const 0x7fffffff) (i32.const 1)))
+  (func (export "shl387") (result i32) (i32.shl (i32.const 1) (i32.const 33)))
+  (func (export "shl388") (param $x i32) (result i32) (i32.shl (get_local $x) (i32.const 33)))
+  (func (export "shl389") (param $y i32) (result i32) (i32.shl (i32.const 1) (get_local $y)))
+  (func (export "shl390") (result i32) (i32.shl (i32.const 1) (i32.const -1)))
+  (func (export "shl391") (param $x i32) (result i32) (i32.shl (get_local $x) (i32.const -1)))
+  (func (export "shl392") (param $y i32) (result i32) (i32.shl (i32.const 1) (get_local $y)))
+  (func (export "shl393") (result i32) (i32.shl (i32.const 1) (i32.const 0x7fffffff)))
+  (func (export "shl394") (param $x i32) (result i32) (i32.shl (get_local $x) (i32.const 0x7fffffff)))
+  (func (export "shl395") (param $y i32) (result i32) (i32.shl (i32.const 1) (get_local $y)))
+  (func (export "shr_s396") (result i32) (i32.shr_s (i32.const 1) (i32.const 1)))
   (func (export "shr_s397") (param $x i32) (result i32) (i32.shr_s (get_local $x) (i32.const 1)))
-  (func (export "shr_s398") (param $y i32) (result i32) (i32.shr_s (i32.const 0x7fffffff) (get_local $y)))
-  (func (export "shr_s399") (result i32) (i32.shr_s (i32.const 0x80000000) (i32.const 1)))
-  (func (export "shr_s400") (param $x i32) (result i32) (i32.shr_s (get_local $x) (i32.const 1)))
-  (func (export "shr_s401") (param $y i32) (result i32) (i32.shr_s (i32.const 0x80000000) (get_local $y)))
-  (func (export "shr_s402") (result i32) (i32.shr_s (i32.const 0x40000000) (i32.const 1)))
+  (func (export "shr_s398") (param $y i32) (result i32) (i32.shr_s (i32.const 1) (get_local $y)))
+  (func (export "shr_s399") (result i32) (i32.shr_s (i32.const 1) (i32.const 0)))
+  (func (export "shr_s400") (param $x i32) (result i32) (i32.shr_s (get_local $x) (i32.const 0)))
+  (func (export "shr_s401") (param $y i32) (result i32) (i32.shr_s (i32.const 1) (get_local $y)))
+  (func (export "shr_s402") (result i32) (i32.shr_s (i32.const -1) (i32.const 1)))
   (func (export "shr_s403") (param $x i32) (result i32) (i32.shr_s (get_local $x) (i32.const 1)))
-  (func (export "shr_s404") (param $y i32) (result i32) (i32.shr_s (i32.const 0x40000000) (get_local $y)))
-  (func (export "shr_s405") (result i32) (i32.shr_s (i32.const 1) (i32.const 32)))
-  (func (export "shr_s406") (param $x i32) (result i32) (i32.shr_s (get_local $x) (i32.const 32)))
-  (func (export "shr_s407") (param $y i32) (result i32) (i32.shr_s (i32.const 1) (get_local $y)))
-  (func (export "shr_s408") (result i32) (i32.shr_s (i32.const 1) (i32.const 33)))
-  (func (export "shr_s409") (param $x i32) (result i32) (i32.shr_s (get_local $x) (i32.const 33)))
-  (func (export "shr_s410") (param $y i32) (result i32) (i32.shr_s (i32.const 1) (get_local $y)))
-  (func (export "shr_s411") (result i32) (i32.shr_s (i32.const 1) (i32.const -1)))
-  (func (export "shr_s412") (param $x i32) (result i32) (i32.shr_s (get_local $x) (i32.const -1)))
-  (func (export "shr_s413") (param $y i32) (result i32) (i32.shr_s (i32.const 1) (get_local $y)))
-  (func (export "shr_s414") (result i32) (i32.shr_s (i32.const 1) (i32.const 0x7fffffff)))
-  (func (export "shr_s415") (param $x i32) (result i32) (i32.shr_s (get_local $x) (i32.const 0x7fffffff)))
+  (func (export "shr_s404") (param $y i32) (result i32) (i32.shr_s (i32.const -1) (get_local $y)))
+  (func (export "shr_s405") (result i32) (i32.shr_s (i32.const 0x7fffffff) (i32.const 1)))
+  (func (export "shr_s406") (param $x i32) (result i32) (i32.shr_s (get_local $x) (i32.const 1)))
+  (func (export "shr_s407") (param $y i32) (result i32) (i32.shr_s (i32.const 0x7fffffff) (get_local $y)))
+  (func (export "shr_s408") (result i32) (i32.shr_s (i32.const 0x80000000) (i32.const 1)))
+  (func (export "shr_s409") (param $x i32) (result i32) (i32.shr_s (get_local $x) (i32.const 1)))
+  (func (export "shr_s410") (param $y i32) (result i32) (i32.shr_s (i32.const 0x80000000) (get_local $y)))
+  (func (export "shr_s411") (result i32) (i32.shr_s (i32.const 0x40000000) (i32.const 1)))
+  (func (export "shr_s412") (param $x i32) (result i32) (i32.shr_s (get_local $x) (i32.const 1)))
+  (func (export "shr_s413") (param $y i32) (result i32) (i32.shr_s (i32.const 0x40000000) (get_local $y)))
+  (func (export "shr_s414") (result i32) (i32.shr_s (i32.const 1) (i32.const 32)))
+  (func (export "shr_s415") (param $x i32) (result i32) (i32.shr_s (get_local $x) (i32.const 32)))
   (func (export "shr_s416") (param $y i32) (result i32) (i32.shr_s (i32.const 1) (get_local $y)))
-  (func (export "shr_s417") (result i32) (i32.shr_s (i32.const 1) (i32.const 0x80000000)))
-  (func (export "shr_s418") (param $x i32) (result i32) (i32.shr_s (get_local $x) (i32.const 0x80000000)))
+  (func (export "shr_s417") (result i32) (i32.shr_s (i32.const 1) (i32.const 33)))
+  (func (export "shr_s418") (param $x i32) (result i32) (i32.shr_s (get_local $x) (i32.const 33)))
   (func (export "shr_s419") (param $y i32) (result i32) (i32.shr_s (i32.const 1) (get_local $y)))
-  (func (export "shr_s420") (result i32) (i32.shr_s (i32.const 0x80000000) (i32.const 31)))
-  (func (export "shr_s421") (param $x i32) (result i32) (i32.shr_s (get_local $x) (i32.const 31)))
-  (func (export "shr_s422") (param $y i32) (result i32) (i32.shr_s (i32.const 0x80000000) (get_local $y)))
-  (func (export "shr_s423") (result i32) (i32.shr_s (i32.const -1) (i32.const 32)))
-  (func (export "shr_s424") (param $x i32) (result i32) (i32.shr_s (get_local $x) (i32.const 32)))
-  (func (export "shr_s425") (param $y i32) (result i32) (i32.shr_s (i32.const -1) (get_local $y)))
-  (func (export "shr_s426") (result i32) (i32.shr_s (i32.const -1) (i32.const 33)))
-  (func (export "shr_s427") (param $x i32) (result i32) (i32.shr_s (get_local $x) (i32.const 33)))
-  (func (export "shr_s428") (param $y i32) (result i32) (i32.shr_s (i32.const -1) (get_local $y)))
-  (func (export "shr_s429") (result i32) (i32.shr_s (i32.const -1) (i32.const -1)))
-  (func (export "shr_s430") (param $x i32) (result i32) (i32.shr_s (get_local $x) (i32.const -1)))
-  (func (export "shr_s431") (param $y i32) (result i32) (i32.shr_s (i32.const -1) (get_local $y)))
-  (func (export "shr_s432") (result i32) (i32.shr_s (i32.const -1) (i32.const 0x7fffffff)))
-  (func (export "shr_s433") (param $x i32) (result i32) (i32.shr_s (get_local $x) (i32.const 0x7fffffff)))
+  (func (export "shr_s420") (result i32) (i32.shr_s (i32.const 1) (i32.const -1)))
+  (func (export "shr_s421") (param $x i32) (result i32) (i32.shr_s (get_local $x) (i32.const -1)))
+  (func (export "shr_s422") (param $y i32) (result i32) (i32.shr_s (i32.const 1) (get_local $y)))
+  (func (export "shr_s423") (result i32) (i32.shr_s (i32.const 1) (i32.const 0x7fffffff)))
+  (func (export "shr_s424") (param $x i32) (result i32) (i32.shr_s (get_local $x) (i32.const 0x7fffffff)))
+  (func (export "shr_s425") (param $y i32) (result i32) (i32.shr_s (i32.const 1) (get_local $y)))
+  (func (export "shr_s426") (result i32) (i32.shr_s (i32.const 1) (i32.const 0x80000000)))
+  (func (export "shr_s427") (param $x i32) (result i32) (i32.shr_s (get_local $x) (i32.const 0x80000000)))
+  (func (export "shr_s428") (param $y i32) (result i32) (i32.shr_s (i32.const 1) (get_local $y)))
+  (func (export "shr_s429") (result i32) (i32.shr_s (i32.const 0x80000000) (i32.const 31)))
+  (func (export "shr_s430") (param $x i32) (result i32) (i32.shr_s (get_local $x) (i32.const 31)))
+  (func (export "shr_s431") (param $y i32) (result i32) (i32.shr_s (i32.const 0x80000000) (get_local $y)))
+  (func (export "shr_s432") (result i32) (i32.shr_s (i32.const -1) (i32.const 32)))
+  (func (export "shr_s433") (param $x i32) (result i32) (i32.shr_s (get_local $x) (i32.const 32)))
   (func (export "shr_s434") (param $y i32) (result i32) (i32.shr_s (i32.const -1) (get_local $y)))
-  (func (export "shr_s435") (result i32) (i32.shr_s (i32.const -1) (i32.const 0x80000000)))
-  (func (export "shr_s436") (param $x i32) (result i32) (i32.shr_s (get_local $x) (i32.const 0x80000000)))
+  (func (export "shr_s435") (result i32) (i32.shr_s (i32.const -1) (i32.const 33)))
+  (func (export "shr_s436") (param $x i32) (result i32) (i32.shr_s (get_local $x) (i32.const 33)))
   (func (export "shr_s437") (param $y i32) (result i32) (i32.shr_s (i32.const -1) (get_local $y)))
-  (func (export "shr_u438") (result i32) (i32.shr_u (i32.const 1) (i32.const 1)))
-  (func (export "shr_u439") (param $x i32) (result i32) (i32.shr_u (get_local $x) (i32.const 1)))
-  (func (export "shr_u440") (param $y i32) (result i32) (i32.shr_u (i32.const 1) (get_local $y)))
-  (func (export "shr_u441") (result i32) (i32.shr_u (i32.const 1) (i32.const 0)))
-  (func (export "shr_u442") (param $x i32) (result i32) (i32.shr_u (get_local $x) (i32.const 0)))
-  (func (export "shr_u443") (param $y i32) (result i32) (i32.shr_u (i32.const 1) (get_local $y)))
-  (func (export "shr_u444") (result i32) (i32.shr_u (i32.const -1) (i32.const 1)))
-  (func (export "shr_u445") (param $x i32) (result i32) (i32.shr_u (get_local $x) (i32.const 1)))
-  (func (export "shr_u446") (param $y i32) (result i32) (i32.shr_u (i32.const -1) (get_local $y)))
-  (func (export "shr_u447") (result i32) (i32.shr_u (i32.const 0x7fffffff) (i32.const 1)))
+  (func (export "shr_s438") (result i32) (i32.shr_s (i32.const -1) (i32.const -1)))
+  (func (export "shr_s439") (param $x i32) (result i32) (i32.shr_s (get_local $x) (i32.const -1)))
+  (func (export "shr_s440") (param $y i32) (result i32) (i32.shr_s (i32.const -1) (get_local $y)))
+  (func (export "shr_s441") (result i32) (i32.shr_s (i32.const -1) (i32.const 0x7fffffff)))
+  (func (export "shr_s442") (param $x i32) (result i32) (i32.shr_s (get_local $x) (i32.const 0x7fffffff)))
+  (func (export "shr_s443") (param $y i32) (result i32) (i32.shr_s (i32.const -1) (get_local $y)))
+  (func (export "shr_s444") (result i32) (i32.shr_s (i32.const -1) (i32.const 0x80000000)))
+  (func (export "shr_s445") (param $x i32) (result i32) (i32.shr_s (get_local $x) (i32.const 0x80000000)))
+  (func (export "shr_s446") (param $y i32) (result i32) (i32.shr_s (i32.const -1) (get_local $y)))
+  (func (export "shr_u447") (result i32) (i32.shr_u (i32.const 1) (i32.const 1)))
   (func (export "shr_u448") (param $x i32) (result i32) (i32.shr_u (get_local $x) (i32.const 1)))
-  (func (export "shr_u449") (param $y i32) (result i32) (i32.shr_u (i32.const 0x7fffffff) (get_local $y)))
-  (func (export "shr_u450") (result i32) (i32.shr_u (i32.const 0x80000000) (i32.const 1)))
-  (func (export "shr_u451") (param $x i32) (result i32) (i32.shr_u (get_local $x) (i32.const 1)))
-  (func (export "shr_u452") (param $y i32) (result i32) (i32.shr_u (i32.const 0x80000000) (get_local $y)))
-  (func (export "shr_u453") (result i32) (i32.shr_u (i32.const 0x40000000) (i32.const 1)))
+  (func (export "shr_u449") (param $y i32) (result i32) (i32.shr_u (i32.const 1) (get_local $y)))
+  (func (export "shr_u450") (result i32) (i32.shr_u (i32.const 1) (i32.const 0)))
+  (func (export "shr_u451") (param $x i32) (result i32) (i32.shr_u (get_local $x) (i32.const 0)))
+  (func (export "shr_u452") (param $y i32) (result i32) (i32.shr_u (i32.const 1) (get_local $y)))
+  (func (export "shr_u453") (result i32) (i32.shr_u (i32.const -1) (i32.const 1)))
   (func (export "shr_u454") (param $x i32) (result i32) (i32.shr_u (get_local $x) (i32.const 1)))
-  (func (export "shr_u455") (param $y i32) (result i32) (i32.shr_u (i32.const 0x40000000) (get_local $y)))
-  (func (export "shr_u456") (result i32) (i32.shr_u (i32.const 1) (i32.const 32)))
-  (func (export "shr_u457") (param $x i32) (result i32) (i32.shr_u (get_local $x) (i32.const 32)))
-  (func (export "shr_u458") (param $y i32) (result i32) (i32.shr_u (i32.const 1) (get_local $y)))
-  (func (export "shr_u459") (result i32) (i32.shr_u (i32.const 1) (i32.const 33)))
-  (func (export "shr_u460") (param $x i32) (result i32) (i32.shr_u (get_local $x) (i32.const 33)))
-  (func (export "shr_u461") (param $y i32) (result i32) (i32.shr_u (i32.const 1) (get_local $y)))
-  (func (export "shr_u462") (result i32) (i32.shr_u (i32.const 1) (i32.const -1)))
-  (func (export "shr_u463") (param $x i32) (result i32) (i32.shr_u (get_local $x) (i32.const -1)))
-  (func (export "shr_u464") (param $y i32) (result i32) (i32.shr_u (i32.const 1) (get_local $y)))
-  (func (export "shr_u465") (result i32) (i32.shr_u (i32.const 1) (i32.const 0x7fffffff)))
-  (func (export "shr_u466") (param $x i32) (result i32) (i32.shr_u (get_local $x) (i32.const 0x7fffffff)))
+  (func (export "shr_u455") (param $y i32) (result i32) (i32.shr_u (i32.const -1) (get_local $y)))
+  (func (export "shr_u456") (result i32) (i32.shr_u (i32.const 0x7fffffff) (i32.const 1)))
+  (func (export "shr_u457") (param $x i32) (result i32) (i32.shr_u (get_local $x) (i32.const 1)))
+  (func (export "shr_u458") (param $y i32) (result i32) (i32.shr_u (i32.const 0x7fffffff) (get_local $y)))
+  (func (export "shr_u459") (result i32) (i32.shr_u (i32.const 0x80000000) (i32.const 1)))
+  (func (export "shr_u460") (param $x i32) (result i32) (i32.shr_u (get_local $x) (i32.const 1)))
+  (func (export "shr_u461") (param $y i32) (result i32) (i32.shr_u (i32.const 0x80000000) (get_local $y)))
+  (func (export "shr_u462") (result i32) (i32.shr_u (i32.const 0x40000000) (i32.const 1)))
+  (func (export "shr_u463") (param $x i32) (result i32) (i32.shr_u (get_local $x) (i32.const 1)))
+  (func (export "shr_u464") (param $y i32) (result i32) (i32.shr_u (i32.const 0x40000000) (get_local $y)))
+  (func (export "shr_u465") (result i32) (i32.shr_u (i32.const 1) (i32.const 32)))
+  (func (export "shr_u466") (param $x i32) (result i32) (i32.shr_u (get_local $x) (i32.const 32)))
   (func (export "shr_u467") (param $y i32) (result i32) (i32.shr_u (i32.const 1) (get_local $y)))
-  (func (export "shr_u468") (result i32) (i32.shr_u (i32.const 1) (i32.const 0x80000000)))
-  (func (export "shr_u469") (param $x i32) (result i32) (i32.shr_u (get_local $x) (i32.const 0x80000000)))
+  (func (export "shr_u468") (result i32) (i32.shr_u (i32.const 1) (i32.const 33)))
+  (func (export "shr_u469") (param $x i32) (result i32) (i32.shr_u (get_local $x) (i32.const 33)))
   (func (export "shr_u470") (param $y i32) (result i32) (i32.shr_u (i32.const 1) (get_local $y)))
-  (func (export "shr_u471") (result i32) (i32.shr_u (i32.const 0x80000000) (i32.const 31)))
-  (func (export "shr_u472") (param $x i32) (result i32) (i32.shr_u (get_local $x) (i32.const 31)))
-  (func (export "shr_u473") (param $y i32) (result i32) (i32.shr_u (i32.const 0x80000000) (get_local $y)))
-  (func (export "shr_u474") (result i32) (i32.shr_u (i32.const -1) (i32.const 32)))
-  (func (export "shr_u475") (param $x i32) (result i32) (i32.shr_u (get_local $x) (i32.const 32)))
-  (func (export "shr_u476") (param $y i32) (result i32) (i32.shr_u (i32.const -1) (get_local $y)))
-  (func (export "shr_u477") (result i32) (i32.shr_u (i32.const -1) (i32.const 33)))
-  (func (export "shr_u478") (param $x i32) (result i32) (i32.shr_u (get_local $x) (i32.const 33)))
-  (func (export "shr_u479") (param $y i32) (result i32) (i32.shr_u (i32.const -1) (get_local $y)))
-  (func (export "shr_u480") (result i32) (i32.shr_u (i32.const -1) (i32.const -1)))
-  (func (export "shr_u481") (param $x i32) (result i32) (i32.shr_u (get_local $x) (i32.const -1)))
-  (func (export "shr_u482") (param $y i32) (result i32) (i32.shr_u (i32.const -1) (get_local $y)))
-  (func (export "shr_u483") (result i32) (i32.shr_u (i32.const -1) (i32.const 0x7fffffff)))
-  (func (export "shr_u484") (param $x i32) (result i32) (i32.shr_u (get_local $x) (i32.const 0x7fffffff)))
+  (func (export "shr_u471") (result i32) (i32.shr_u (i32.const 1) (i32.const -1)))
+  (func (export "shr_u472") (param $x i32) (result i32) (i32.shr_u (get_local $x) (i32.const -1)))
+  (func (export "shr_u473") (param $y i32) (result i32) (i32.shr_u (i32.const 1) (get_local $y)))
+  (func (export "shr_u474") (result i32) (i32.shr_u (i32.const 1) (i32.const 0x7fffffff)))
+  (func (export "shr_u475") (param $x i32) (result i32) (i32.shr_u (get_local $x) (i32.const 0x7fffffff)))
+  (func (export "shr_u476") (param $y i32) (result i32) (i32.shr_u (i32.const 1) (get_local $y)))
+  (func (export "shr_u477") (result i32) (i32.shr_u (i32.const 1) (i32.const 0x80000000)))
+  (func (export "shr_u478") (param $x i32) (result i32) (i32.shr_u (get_local $x) (i32.const 0x80000000)))
+  (func (export "shr_u479") (param $y i32) (result i32) (i32.shr_u (i32.const 1) (get_local $y)))
+  (func (export "shr_u480") (result i32) (i32.shr_u (i32.const 0x80000000) (i32.const 31)))
+  (func (export "shr_u481") (param $x i32) (result i32) (i32.shr_u (get_local $x) (i32.const 31)))
+  (func (export "shr_u482") (param $y i32) (result i32) (i32.shr_u (i32.const 0x80000000) (get_local $y)))
+  (func (export "shr_u483") (result i32) (i32.shr_u (i32.const -1) (i32.const 32)))
+  (func (export "shr_u484") (param $x i32) (result i32) (i32.shr_u (get_local $x) (i32.const 32)))
   (func (export "shr_u485") (param $y i32) (result i32) (i32.shr_u (i32.const -1) (get_local $y)))
-  (func (export "shr_u486") (result i32) (i32.shr_u (i32.const -1) (i32.const 0x80000000)))
-  (func (export "shr_u487") (param $x i32) (result i32) (i32.shr_u (get_local $x) (i32.const 0x80000000)))
+  (func (export "shr_u486") (result i32) (i32.shr_u (i32.const -1) (i32.const 33)))
+  (func (export "shr_u487") (param $x i32) (result i32) (i32.shr_u (get_local $x) (i32.const 33)))
   (func (export "shr_u488") (param $y i32) (result i32) (i32.shr_u (i32.const -1) (get_local $y)))
-  (func (export "rotl489") (result i32) (i32.rotl (i32.const 0xfe00dc00) (i32.const 4)))
-  (func (export "rotl490") (param $x i32) (result i32) (i32.rotl (get_local $x) (i32.const 4)))
-  (func (export "rotl491") (param $y i32) (result i32) (i32.rotl (i32.const 0xfe00dc00) (get_local $y)))
-  (func (export "rotl492") (result i32) (i32.rotl (i32.const 0xabcd9876) (i32.const 1)))
-  (func (export "rotl493") (param $x i32) (result i32) (i32.rotl (get_local $x) (i32.const 1)))
-  (func (export "rotl494") (param $y i32) (result i32) (i32.rotl (i32.const 0xabcd9876) (get_local $y)))
-  (func (export "rotl495") (result i32) (i32.rotl (i32.const 0x00008000) (i32.const 37)))
-  (func (export "rotl496") (param $x i32) (result i32) (i32.rotl (get_local $x) (i32.const 37)))
-  (func (export "rotl497") (param $y i32) (result i32) (i32.rotl (i32.const 0x00008000) (get_local $y)))
-  (func (export "rotl498") (result i32) (i32.rotl (i32.const 0x769abcdf) (i32.const 0x8000000d)))
-  (func (export "rotl499") (param $x i32) (result i32) (i32.rotl (get_local $x) (i32.const 0x8000000d)))
-  (func (export "rotl500") (param $y i32) (result i32) (i32.rotl (i32.const 0x769abcdf) (get_local $y)))
-  (func (export "rotl501") (result i32) (i32.rotl (i32.const 1) (i32.const 31)))
-  (func (export "rotl502") (param $x i32) (result i32) (i32.rotl (get_local $x) (i32.const 31)))
+  (func (export "shr_u489") (result i32) (i32.shr_u (i32.const -1) (i32.const -1)))
+  (func (export "shr_u490") (param $x i32) (result i32) (i32.shr_u (get_local $x) (i32.const -1)))
+  (func (export "shr_u491") (param $y i32) (result i32) (i32.shr_u (i32.const -1) (get_local $y)))
+  (func (export "shr_u492") (result i32) (i32.shr_u (i32.const -1) (i32.const 0x7fffffff)))
+  (func (export "shr_u493") (param $x i32) (result i32) (i32.shr_u (get_local $x) (i32.const 0x7fffffff)))
+  (func (export "shr_u494") (param $y i32) (result i32) (i32.shr_u (i32.const -1) (get_local $y)))
+  (func (export "shr_u495") (result i32) (i32.shr_u (i32.const -1) (i32.const 0x80000000)))
+  (func (export "shr_u496") (param $x i32) (result i32) (i32.shr_u (get_local $x) (i32.const 0x80000000)))
+  (func (export "shr_u497") (param $y i32) (result i32) (i32.shr_u (i32.const -1) (get_local $y)))
+  (func (export "rotl498") (result i32) (i32.rotl (i32.const 1) (i32.const 1)))
+  (func (export "rotl499") (param $x i32) (result i32) (i32.rotl (get_local $x) (i32.const 1)))
+  (func (export "rotl500") (param $y i32) (result i32) (i32.rotl (i32.const 1) (get_local $y)))
+  (func (export "rotl501") (result i32) (i32.rotl (i32.const 1) (i32.const 0)))
+  (func (export "rotl502") (param $x i32) (result i32) (i32.rotl (get_local $x) (i32.const 0)))
   (func (export "rotl503") (param $y i32) (result i32) (i32.rotl (i32.const 1) (get_local $y)))
-  (func (export "rotl504") (result i32) (i32.rotl (i32.const 0x80000000) (i32.const 1)))
+  (func (export "rotl504") (result i32) (i32.rotl (i32.const -1) (i32.const 1)))
   (func (export "rotl505") (param $x i32) (result i32) (i32.rotl (get_local $x) (i32.const 1)))
-  (func (export "rotl506") (param $y i32) (result i32) (i32.rotl (i32.const 0x80000000) (get_local $y)))
-  (func (export "rotr507") (result i32) (i32.rotr (i32.const 0xb0c1d2e3) (i32.const 0x0005)))
-  (func (export "rotr508") (param $x i32) (result i32) (i32.rotr (get_local $x) (i32.const 0x0005)))
-  (func (export "rotr509") (param $y i32) (result i32) (i32.rotr (i32.const 0xb0c1d2e3) (get_local $y)))
-  (func (export "rotr510") (result i32) (i32.rotr (i32.const 0xb0c1d2e3) (i32.const 0xff05)))
-  (func (export "rotr511") (param $x i32) (result i32) (i32.rotr (get_local $x) (i32.const 0xff05)))
-  (func (export "rotr512") (param $y i32) (result i32) (i32.rotr (i32.const 0xb0c1d2e3) (get_local $y)))
-  (func (export "rotr513") (result i32) (i32.rotr (i32.const 0xff00cc00) (i32.const 1)))
-  (func (export "rotr514") (param $x i32) (result i32) (i32.rotr (get_local $x) (i32.const 1)))
-  (func (export "rotr515") (param $y i32) (result i32) (i32.rotr (i32.const 0xff00cc00) (get_local $y)))
-  (func (export "rotr516") (result i32) (i32.rotr (i32.const 0x00080000) (i32.const 4)))
-  (func (export "rotr517") (param $x i32) (result i32) (i32.rotr (get_local $x) (i32.const 4)))
-  (func (export "rotr518") (param $y i32) (result i32) (i32.rotr (i32.const 0x00080000) (get_local $y)))
-  (func (export "rotr519") (result i32) (i32.rotr (i32.const 0x769abcdf) (i32.const 0xffffffed)))
-  (func (export "rotr520") (param $x i32) (result i32) (i32.rotr (get_local $x) (i32.const 0xffffffed)))
-  (func (export "rotr521") (param $y i32) (result i32) (i32.rotr (i32.const 0x769abcdf) (get_local $y)))
-  (func (export "rotr522") (result i32) (i32.rotr (i32.const 1) (i32.const 1)))
-  (func (export "rotr523") (param $x i32) (result i32) (i32.rotr (get_local $x) (i32.const 1)))
-  (func (export "rotr524") (param $y i32) (result i32) (i32.rotr (i32.const 1) (get_local $y)))
-  (func (export "rotr525") (result i32) (i32.rotr (i32.const 0x80000000) (i32.const 31)))
-  (func (export "rotr526") (param $x i32) (result i32) (i32.rotr (get_local $x) (i32.const 31)))
-  (func (export "rotr527") (param $y i32) (result i32) (i32.rotr (i32.const 0x80000000) (get_local $y)))
-  (func (export "clz528") (result i32) (i32.clz (i32.const 0xffffffff)))
-  (func (export "clz529") (result i32) (i32.clz (i32.const 0)))
-  (func (export "clz530") (result i32) (i32.clz (i32.const 0x00008000)))
-  (func (export "clz531") (result i32) (i32.clz (i32.const 0xff)))
-  (func (export "clz532") (result i32) (i32.clz (i32.const 0x80000000)))
-  (func (export "clz533") (result i32) (i32.clz (i32.const 1)))
-  (func (export "clz534") (result i32) (i32.clz (i32.const 2)))
-  (func (export "clz535") (result i32) (i32.clz (i32.const 0x7fffffff)))
-  (func (export "ctz536") (result i32) (i32.ctz (i32.const -1)))
-  (func (export "ctz537") (result i32) (i32.ctz (i32.const 0)))
-  (func (export "ctz538") (result i32) (i32.ctz (i32.const 0x00008000)))
-  (func (export "ctz539") (result i32) (i32.ctz (i32.const 0x00010000)))
-  (func (export "ctz540") (result i32) (i32.ctz (i32.const 0x80000000)))
-  (func (export "ctz541") (result i32) (i32.ctz (i32.const 0x7fffffff)))
-  (func (export "popcnt542") (result i32) (i32.popcnt (i32.const -1)))
-  (func (export "popcnt543") (result i32) (i32.popcnt (i32.const 0)))
-  (func (export "popcnt544") (result i32) (i32.popcnt (i32.const 0x00008000)))
-  (func (export "popcnt545") (result i32) (i32.popcnt (i32.const 0x80008000)))
-  (func (export "popcnt546") (result i32) (i32.popcnt (i32.const 0x7fffffff)))
-  (func (export "popcnt547") (result i32) (i32.popcnt (i32.const 0xAAAAAAAA)))
-  (func (export "popcnt548") (result i32) (i32.popcnt (i32.const 0x55555555)))
-  (func (export "popcnt549") (result i32) (i32.popcnt (i32.const 0xDEADBEEF)))
-  (func (export "eqz550") (result i32) (i32.eqz (i32.const 0)))
-  (func (export "eqz551") (result i32) (i32.eqz (i32.const 1)))
-  (func (export "eqz552") (result i32) (i32.eqz (i32.const 0x80000000)))
-  (func (export "eqz553") (result i32) (i32.eqz (i32.const 0x7fffffff)))
-  (func (export "eq554") (result i32) (i32.eq (i32.const 0) (i32.const 0)))
-  (func (export "eq555") (param $x i32) (result i32) (i32.eq (get_local $x) (i32.const 0)))
-  (func (export "eq556") (param $y i32) (result i32) (i32.eq (i32.const 0) (get_local $y)))
-  (func (export "eq557") (result i32) (i32.eq (i32.const 1) (i32.const 1)))
-  (func (export "eq558") (param $x i32) (result i32) (i32.eq (get_local $x) (i32.const 1)))
-  (func (export "eq559") (param $y i32) (result i32) (i32.eq (i32.const 1) (get_local $y)))
-  (func (export "eq560") (result i32) (i32.eq (i32.const -1) (i32.const 1)))
-  (func (export "eq561") (param $x i32) (result i32) (i32.eq (get_local $x) (i32.const 1)))
-  (func (export "eq562") (param $y i32) (result i32) (i32.eq (i32.const -1) (get_local $y)))
-  (func (export "eq563") (result i32) (i32.eq (i32.const 0x80000000) (i32.const 0x80000000)))
-  (func (export "eq564") (param $x i32) (result i32) (i32.eq (get_local $x) (i32.const 0x80000000)))
-  (func (export "eq565") (param $y i32) (result i32) (i32.eq (i32.const 0x80000000) (get_local $y)))
-  (func (export "eq566") (result i32) (i32.eq (i32.const 0x7fffffff) (i32.const 0x7fffffff)))
-  (func (export "eq567") (param $x i32) (result i32) (i32.eq (get_local $x) (i32.const 0x7fffffff)))
-  (func (export "eq568") (param $y i32) (result i32) (i32.eq (i32.const 0x7fffffff) (get_local $y)))
-  (func (export "eq569") (result i32) (i32.eq (i32.const -1) (i32.const -1)))
-  (func (export "eq570") (param $x i32) (result i32) (i32.eq (get_local $x) (i32.const -1)))
-  (func (export "eq571") (param $y i32) (result i32) (i32.eq (i32.const -1) (get_local $y)))
-  (func (export "eq572") (result i32) (i32.eq (i32.const 1) (i32.const 0)))
-  (func (export "eq573") (param $x i32) (result i32) (i32.eq (get_local $x) (i32.const 0)))
-  (func (export "eq574") (param $y i32) (result i32) (i32.eq (i32.const 1) (get_local $y)))
-  (func (export "eq575") (result i32) (i32.eq (i32.const 0) (i32.const 1)))
-  (func (export "eq576") (param $x i32) (result i32) (i32.eq (get_local $x) (i32.const 1)))
-  (func (export "eq577") (param $y i32) (result i32) (i32.eq (i32.const 0) (get_local $y)))
-  (func (export "eq578") (result i32) (i32.eq (i32.const 0x80000000) (i32.const 0)))
-  (func (export "eq579") (param $x i32) (result i32) (i32.eq (get_local $x) (i32.const 0)))
-  (func (export "eq580") (param $y i32) (result i32) (i32.eq (i32.const 0x80000000) (get_local $y)))
-  (func (export "eq581") (result i32) (i32.eq (i32.const 0) (i32.const 0x80000000)))
-  (func (export "eq582") (param $x i32) (result i32) (i32.eq (get_local $x) (i32.const 0x80000000)))
-  (func (export "eq583") (param $y i32) (result i32) (i32.eq (i32.const 0) (get_local $y)))
-  (func (export "eq584") (result i32) (i32.eq (i32.const 0x80000000) (i32.const -1)))
-  (func (export "eq585") (param $x i32) (result i32) (i32.eq (get_local $x) (i32.const -1)))
-  (func (export "eq586") (param $y i32) (result i32) (i32.eq (i32.const 0x80000000) (get_local $y)))
-  (func (export "eq587") (result i32) (i32.eq (i32.const -1) (i32.const 0x80000000)))
-  (func (export "eq588") (param $x i32) (result i32) (i32.eq (get_local $x) (i32.const 0x80000000)))
-  (func (export "eq589") (param $y i32) (result i32) (i32.eq (i32.const -1) (get_local $y)))
-  (func (export "eq590") (result i32) (i32.eq (i32.const 0x80000000) (i32.const 0x7fffffff)))
-  (func (export "eq591") (param $x i32) (result i32) (i32.eq (get_local $x) (i32.const 0x7fffffff)))
-  (func (export "eq592") (param $y i32) (result i32) (i32.eq (i32.const 0x80000000) (get_local $y)))
-  (func (export "eq593") (result i32) (i32.eq (i32.const 0x7fffffff) (i32.const 0x80000000)))
-  (func (export "eq594") (param $x i32) (result i32) (i32.eq (get_local $x) (i32.const 0x80000000)))
-  (func (export "eq595") (param $y i32) (result i32) (i32.eq (i32.const 0x7fffffff) (get_local $y)))
-  (func (export "ne596") (result i32) (i32.ne (i32.const 0) (i32.const 0)))
-  (func (export "ne597") (param $x i32) (result i32) (i32.ne (get_local $x) (i32.const 0)))
-  (func (export "ne598") (param $y i32) (result i32) (i32.ne (i32.const 0) (get_local $y)))
-  (func (export "ne599") (result i32) (i32.ne (i32.const 1) (i32.const 1)))
-  (func (export "ne600") (param $x i32) (result i32) (i32.ne (get_local $x) (i32.const 1)))
-  (func (export "ne601") (param $y i32) (result i32) (i32.ne (i32.const 1) (get_local $y)))
-  (func (export "ne602") (result i32) (i32.ne (i32.const -1) (i32.const 1)))
-  (func (export "ne603") (param $x i32) (result i32) (i32.ne (get_local $x) (i32.const 1)))
-  (func (export "ne604") (param $y i32) (result i32) (i32.ne (i32.const -1) (get_local $y)))
-  (func (export "ne605") (result i32) (i32.ne (i32.const 0x80000000) (i32.const 0x80000000)))
-  (func (export "ne606") (param $x i32) (result i32) (i32.ne (get_local $x) (i32.const 0x80000000)))
-  (func (export "ne607") (param $y i32) (result i32) (i32.ne (i32.const 0x80000000) (get_local $y)))
-  (func (export "ne608") (result i32) (i32.ne (i32.const 0x7fffffff) (i32.const 0x7fffffff)))
-  (func (export "ne609") (param $x i32) (result i32) (i32.ne (get_local $x) (i32.const 0x7fffffff)))
-  (func (export "ne610") (param $y i32) (result i32) (i32.ne (i32.const 0x7fffffff) (get_local $y)))
-  (func (export "ne611") (result i32) (i32.ne (i32.const -1) (i32.const -1)))
-  (func (export "ne612") (param $x i32) (result i32) (i32.ne (get_local $x) (i32.const -1)))
-  (func (export "ne613") (param $y i32) (result i32) (i32.ne (i32.const -1) (get_local $y)))
-  (func (export "ne614") (result i32) (i32.ne (i32.const 1) (i32.const 0)))
-  (func (export "ne615") (param $x i32) (result i32) (i32.ne (get_local $x) (i32.const 0)))
-  (func (export "ne616") (param $y i32) (result i32) (i32.ne (i32.const 1) (get_local $y)))
-  (func (export "ne617") (result i32) (i32.ne (i32.const 0) (i32.const 1)))
-  (func (export "ne618") (param $x i32) (result i32) (i32.ne (get_local $x) (i32.const 1)))
-  (func (export "ne619") (param $y i32) (result i32) (i32.ne (i32.const 0) (get_local $y)))
-  (func (export "ne620") (result i32) (i32.ne (i32.const 0x80000000) (i32.const 0)))
-  (func (export "ne621") (param $x i32) (result i32) (i32.ne (get_local $x) (i32.const 0)))
-  (func (export "ne622") (param $y i32) (result i32) (i32.ne (i32.const 0x80000000) (get_local $y)))
-  (func (export "ne623") (result i32) (i32.ne (i32.const 0) (i32.const 0x80000000)))
-  (func (export "ne624") (param $x i32) (result i32) (i32.ne (get_local $x) (i32.const 0x80000000)))
-  (func (export "ne625") (param $y i32) (result i32) (i32.ne (i32.const 0) (get_local $y)))
-  (func (export "ne626") (result i32) (i32.ne (i32.const 0x80000000) (i32.const -1)))
-  (func (export "ne627") (param $x i32) (result i32) (i32.ne (get_local $x) (i32.const -1)))
-  (func (export "ne628") (param $y i32) (result i32) (i32.ne (i32.const 0x80000000) (get_local $y)))
-  (func (export "ne629") (result i32) (i32.ne (i32.const -1) (i32.const 0x80000000)))
-  (func (export "ne630") (param $x i32) (result i32) (i32.ne (get_local $x) (i32.const 0x80000000)))
-  (func (export "ne631") (param $y i32) (result i32) (i32.ne (i32.const -1) (get_local $y)))
-  (func (export "ne632") (result i32) (i32.ne (i32.const 0x80000000) (i32.const 0x7fffffff)))
-  (func (export "ne633") (param $x i32) (result i32) (i32.ne (get_local $x) (i32.const 0x7fffffff)))
-  (func (export "ne634") (param $y i32) (result i32) (i32.ne (i32.const 0x80000000) (get_local $y)))
-  (func (export "ne635") (result i32) (i32.ne (i32.const 0x7fffffff) (i32.const 0x80000000)))
-  (func (export "ne636") (param $x i32) (result i32) (i32.ne (get_local $x) (i32.const 0x80000000)))
-  (func (export "ne637") (param $y i32) (result i32) (i32.ne (i32.const 0x7fffffff) (get_local $y)))
-  (func (export "lt_s638") (result i32) (i32.lt_s (i32.const 0) (i32.const 0)))
-  (func (export "lt_s639") (param $x i32) (result i32) (i32.lt_s (get_local $x) (i32.const 0)))
-  (func (export "lt_s640") (param $y i32) (result i32) (i32.lt_s (i32.const 0) (get_local $y)))
-  (func (export "lt_s641") (result i32) (i32.lt_s (i32.const 1) (i32.const 1)))
-  (func (export "lt_s642") (param $x i32) (result i32) (i32.lt_s (get_local $x) (i32.const 1)))
-  (func (export "lt_s643") (param $y i32) (result i32) (i32.lt_s (i32.const 1) (get_local $y)))
-  (func (export "lt_s644") (result i32) (i32.lt_s (i32.const -1) (i32.const 1)))
-  (func (export "lt_s645") (param $x i32) (result i32) (i32.lt_s (get_local $x) (i32.const 1)))
-  (func (export "lt_s646") (param $y i32) (result i32) (i32.lt_s (i32.const -1) (get_local $y)))
-  (func (export "lt_s647") (result i32) (i32.lt_s (i32.const 0x80000000) (i32.const 0x80000000)))
-  (func (export "lt_s648") (param $x i32) (result i32) (i32.lt_s (get_local $x) (i32.const 0x80000000)))
-  (func (export "lt_s649") (param $y i32) (result i32) (i32.lt_s (i32.const 0x80000000) (get_local $y)))
-  (func (export "lt_s650") (result i32) (i32.lt_s (i32.const 0x7fffffff) (i32.const 0x7fffffff)))
-  (func (export "lt_s651") (param $x i32) (result i32) (i32.lt_s (get_local $x) (i32.const 0x7fffffff)))
-  (func (export "lt_s652") (param $y i32) (result i32) (i32.lt_s (i32.const 0x7fffffff) (get_local $y)))
-  (func (export "lt_s653") (result i32) (i32.lt_s (i32.const -1) (i32.const -1)))
-  (func (export "lt_s654") (param $x i32) (result i32) (i32.lt_s (get_local $x) (i32.const -1)))
-  (func (export "lt_s655") (param $y i32) (result i32) (i32.lt_s (i32.const -1) (get_local $y)))
-  (func (export "lt_s656") (result i32) (i32.lt_s (i32.const 1) (i32.const 0)))
-  (func (export "lt_s657") (param $x i32) (result i32) (i32.lt_s (get_local $x) (i32.const 0)))
-  (func (export "lt_s658") (param $y i32) (result i32) (i32.lt_s (i32.const 1) (get_local $y)))
-  (func (export "lt_s659") (result i32) (i32.lt_s (i32.const 0) (i32.const 1)))
-  (func (export "lt_s660") (param $x i32) (result i32) (i32.lt_s (get_local $x) (i32.const 1)))
-  (func (export "lt_s661") (param $y i32) (result i32) (i32.lt_s (i32.const 0) (get_local $y)))
-  (func (export "lt_s662") (result i32) (i32.lt_s (i32.const 0x80000000) (i32.const 0)))
-  (func (export "lt_s663") (param $x i32) (result i32) (i32.lt_s (get_local $x) (i32.const 0)))
-  (func (export "lt_s664") (param $y i32) (result i32) (i32.lt_s (i32.const 0x80000000) (get_local $y)))
-  (func (export "lt_s665") (result i32) (i32.lt_s (i32.const 0) (i32.const 0x80000000)))
-  (func (export "lt_s666") (param $x i32) (result i32) (i32.lt_s (get_local $x) (i32.const 0x80000000)))
-  (func (export "lt_s667") (param $y i32) (result i32) (i32.lt_s (i32.const 0) (get_local $y)))
-  (func (export "lt_s668") (result i32) (i32.lt_s (i32.const 0x80000000) (i32.const -1)))
-  (func (export "lt_s669") (param $x i32) (result i32) (i32.lt_s (get_local $x) (i32.const -1)))
-  (func (export "lt_s670") (param $y i32) (result i32) (i32.lt_s (i32.const 0x80000000) (get_local $y)))
-  (func (export "lt_s671") (result i32) (i32.lt_s (i32.const -1) (i32.const 0x80000000)))
-  (func (export "lt_s672") (param $x i32) (result i32) (i32.lt_s (get_local $x) (i32.const 0x80000000)))
-  (func (export "lt_s673") (param $y i32) (result i32) (i32.lt_s (i32.const -1) (get_local $y)))
-  (func (export "lt_s674") (result i32) (i32.lt_s (i32.const 0x80000000) (i32.const 0x7fffffff)))
-  (func (export "lt_s675") (param $x i32) (result i32) (i32.lt_s (get_local $x) (i32.const 0x7fffffff)))
-  (func (export "lt_s676") (param $y i32) (result i32) (i32.lt_s (i32.const 0x80000000) (get_local $y)))
-  (func (export "lt_s677") (result i32) (i32.lt_s (i32.const 0x7fffffff) (i32.const 0x80000000)))
-  (func (export "lt_s678") (param $x i32) (result i32) (i32.lt_s (get_local $x) (i32.const 0x80000000)))
-  (func (export "lt_s679") (param $y i32) (result i32) (i32.lt_s (i32.const 0x7fffffff) (get_local $y)))
-  (func (export "lt_u680") (result i32) (i32.lt_u (i32.const 0) (i32.const 0)))
-  (func (export "lt_u681") (param $x i32) (result i32) (i32.lt_u (get_local $x) (i32.const 0)))
-  (func (export "lt_u682") (param $y i32) (result i32) (i32.lt_u (i32.const 0) (get_local $y)))
-  (func (export "lt_u683") (result i32) (i32.lt_u (i32.const 1) (i32.const 1)))
-  (func (export "lt_u684") (param $x i32) (result i32) (i32.lt_u (get_local $x) (i32.const 1)))
-  (func (export "lt_u685") (param $y i32) (result i32) (i32.lt_u (i32.const 1) (get_local $y)))
-  (func (export "lt_u686") (result i32) (i32.lt_u (i32.const -1) (i32.const 1)))
-  (func (export "lt_u687") (param $x i32) (result i32) (i32.lt_u (get_local $x) (i32.const 1)))
-  (func (export "lt_u688") (param $y i32) (result i32) (i32.lt_u (i32.const -1) (get_local $y)))
-  (func (export "lt_u689") (result i32) (i32.lt_u (i32.const 0x80000000) (i32.const 0x80000000)))
-  (func (export "lt_u690") (param $x i32) (result i32) (i32.lt_u (get_local $x) (i32.const 0x80000000)))
-  (func (export "lt_u691") (param $y i32) (result i32) (i32.lt_u (i32.const 0x80000000) (get_local $y)))
-  (func (export "lt_u692") (result i32) (i32.lt_u (i32.const 0x7fffffff) (i32.const 0x7fffffff)))
-  (func (export "lt_u693") (param $x i32) (result i32) (i32.lt_u (get_local $x) (i32.const 0x7fffffff)))
-  (func (export "lt_u694") (param $y i32) (result i32) (i32.lt_u (i32.const 0x7fffffff) (get_local $y)))
-  (func (export "lt_u695") (result i32) (i32.lt_u (i32.const -1) (i32.const -1)))
-  (func (export "lt_u696") (param $x i32) (result i32) (i32.lt_u (get_local $x) (i32.const -1)))
-  (func (export "lt_u697") (param $y i32) (result i32) (i32.lt_u (i32.const -1) (get_local $y)))
-  (func (export "lt_u698") (result i32) (i32.lt_u (i32.const 1) (i32.const 0)))
-  (func (export "lt_u699") (param $x i32) (result i32) (i32.lt_u (get_local $x) (i32.const 0)))
-  (func (export "lt_u700") (param $y i32) (result i32) (i32.lt_u (i32.const 1) (get_local $y)))
-  (func (export "lt_u701") (result i32) (i32.lt_u (i32.const 0) (i32.const 1)))
-  (func (export "lt_u702") (param $x i32) (result i32) (i32.lt_u (get_local $x) (i32.const 1)))
-  (func (export "lt_u703") (param $y i32) (result i32) (i32.lt_u (i32.const 0) (get_local $y)))
-  (func (export "lt_u704") (result i32) (i32.lt_u (i32.const 0x80000000) (i32.const 0)))
-  (func (export "lt_u705") (param $x i32) (result i32) (i32.lt_u (get_local $x) (i32.const 0)))
-  (func (export "lt_u706") (param $y i32) (result i32) (i32.lt_u (i32.const 0x80000000) (get_local $y)))
-  (func (export "lt_u707") (result i32) (i32.lt_u (i32.const 0) (i32.const 0x80000000)))
-  (func (export "lt_u708") (param $x i32) (result i32) (i32.lt_u (get_local $x) (i32.const 0x80000000)))
-  (func (export "lt_u709") (param $y i32) (result i32) (i32.lt_u (i32.const 0) (get_local $y)))
-  (func (export "lt_u710") (result i32) (i32.lt_u (i32.const 0x80000000) (i32.const -1)))
-  (func (export "lt_u711") (param $x i32) (result i32) (i32.lt_u (get_local $x) (i32.const -1)))
-  (func (export "lt_u712") (param $y i32) (result i32) (i32.lt_u (i32.const 0x80000000) (get_local $y)))
-  (func (export "lt_u713") (result i32) (i32.lt_u (i32.const -1) (i32.const 0x80000000)))
-  (func (export "lt_u714") (param $x i32) (result i32) (i32.lt_u (get_local $x) (i32.const 0x80000000)))
-  (func (export "lt_u715") (param $y i32) (result i32) (i32.lt_u (i32.const -1) (get_local $y)))
-  (func (export "lt_u716") (result i32) (i32.lt_u (i32.const 0x80000000) (i32.const 0x7fffffff)))
-  (func (export "lt_u717") (param $x i32) (result i32) (i32.lt_u (get_local $x) (i32.const 0x7fffffff)))
-  (func (export "lt_u718") (param $y i32) (result i32) (i32.lt_u (i32.const 0x80000000) (get_local $y)))
-  (func (export "lt_u719") (result i32) (i32.lt_u (i32.const 0x7fffffff) (i32.const 0x80000000)))
-  (func (export "lt_u720") (param $x i32) (result i32) (i32.lt_u (get_local $x) (i32.const 0x80000000)))
-  (func (export "lt_u721") (param $y i32) (result i32) (i32.lt_u (i32.const 0x7fffffff) (get_local $y)))
-  (func (export "le_s722") (result i32) (i32.le_s (i32.const 0) (i32.const 0)))
-  (func (export "le_s723") (param $x i32) (result i32) (i32.le_s (get_local $x) (i32.const 0)))
-  (func (export "le_s724") (param $y i32) (result i32) (i32.le_s (i32.const 0) (get_local $y)))
-  (func (export "le_s725") (result i32) (i32.le_s (i32.const 1) (i32.const 1)))
-  (func (export "le_s726") (param $x i32) (result i32) (i32.le_s (get_local $x) (i32.const 1)))
-  (func (export "le_s727") (param $y i32) (result i32) (i32.le_s (i32.const 1) (get_local $y)))
-  (func (export "le_s728") (result i32) (i32.le_s (i32.const -1) (i32.const 1)))
-  (func (export "le_s729") (param $x i32) (result i32) (i32.le_s (get_local $x) (i32.const 1)))
-  (func (export "le_s730") (param $y i32) (result i32) (i32.le_s (i32.const -1) (get_local $y)))
-  (func (export "le_s731") (result i32) (i32.le_s (i32.const 0x80000000) (i32.const 0x80000000)))
-  (func (export "le_s732") (param $x i32) (result i32) (i32.le_s (get_local $x) (i32.const 0x80000000)))
-  (func (export "le_s733") (param $y i32) (result i32) (i32.le_s (i32.const 0x80000000) (get_local $y)))
-  (func (export "le_s734") (result i32) (i32.le_s (i32.const 0x7fffffff) (i32.const 0x7fffffff)))
-  (func (export "le_s735") (param $x i32) (result i32) (i32.le_s (get_local $x) (i32.const 0x7fffffff)))
-  (func (export "le_s736") (param $y i32) (result i32) (i32.le_s (i32.const 0x7fffffff) (get_local $y)))
-  (func (export "le_s737") (result i32) (i32.le_s (i32.const -1) (i32.const -1)))
-  (func (export "le_s738") (param $x i32) (result i32) (i32.le_s (get_local $x) (i32.const -1)))
-  (func (export "le_s739") (param $y i32) (result i32) (i32.le_s (i32.const -1) (get_local $y)))
-  (func (export "le_s740") (result i32) (i32.le_s (i32.const 1) (i32.const 0)))
-  (func (export "le_s741") (param $x i32) (result i32) (i32.le_s (get_local $x) (i32.const 0)))
-  (func (export "le_s742") (param $y i32) (result i32) (i32.le_s (i32.const 1) (get_local $y)))
-  (func (export "le_s743") (result i32) (i32.le_s (i32.const 0) (i32.const 1)))
-  (func (export "le_s744") (param $x i32) (result i32) (i32.le_s (get_local $x) (i32.const 1)))
-  (func (export "le_s745") (param $y i32) (result i32) (i32.le_s (i32.const 0) (get_local $y)))
-  (func (export "le_s746") (result i32) (i32.le_s (i32.const 0x80000000) (i32.const 0)))
-  (func (export "le_s747") (param $x i32) (result i32) (i32.le_s (get_local $x) (i32.const 0)))
-  (func (export "le_s748") (param $y i32) (result i32) (i32.le_s (i32.const 0x80000000) (get_local $y)))
-  (func (export "le_s749") (result i32) (i32.le_s (i32.const 0) (i32.const 0x80000000)))
-  (func (export "le_s750") (param $x i32) (result i32) (i32.le_s (get_local $x) (i32.const 0x80000000)))
-  (func (export "le_s751") (param $y i32) (result i32) (i32.le_s (i32.const 0) (get_local $y)))
-  (func (export "le_s752") (result i32) (i32.le_s (i32.const 0x80000000) (i32.const -1)))
-  (func (export "le_s753") (param $x i32) (result i32) (i32.le_s (get_local $x) (i32.const -1)))
-  (func (export "le_s754") (param $y i32) (result i32) (i32.le_s (i32.const 0x80000000) (get_local $y)))
-  (func (export "le_s755") (result i32) (i32.le_s (i32.const -1) (i32.const 0x80000000)))
-  (func (export "le_s756") (param $x i32) (result i32) (i32.le_s (get_local $x) (i32.const 0x80000000)))
-  (func (export "le_s757") (param $y i32) (result i32) (i32.le_s (i32.const -1) (get_local $y)))
-  (func (export "le_s758") (result i32) (i32.le_s (i32.const 0x80000000) (i32.const 0x7fffffff)))
-  (func (export "le_s759") (param $x i32) (result i32) (i32.le_s (get_local $x) (i32.const 0x7fffffff)))
-  (func (export "le_s760") (param $y i32) (result i32) (i32.le_s (i32.const 0x80000000) (get_local $y)))
-  (func (export "le_s761") (result i32) (i32.le_s (i32.const 0x7fffffff) (i32.const 0x80000000)))
-  (func (export "le_s762") (param $x i32) (result i32) (i32.le_s (get_local $x) (i32.const 0x80000000)))
-  (func (export "le_s763") (param $y i32) (result i32) (i32.le_s (i32.const 0x7fffffff) (get_local $y)))
-  (func (export "le_u764") (result i32) (i32.le_u (i32.const 0) (i32.const 0)))
-  (func (export "le_u765") (param $x i32) (result i32) (i32.le_u (get_local $x) (i32.const 0)))
-  (func (export "le_u766") (param $y i32) (result i32) (i32.le_u (i32.const 0) (get_local $y)))
-  (func (export "le_u767") (result i32) (i32.le_u (i32.const 1) (i32.const 1)))
-  (func (export "le_u768") (param $x i32) (result i32) (i32.le_u (get_local $x) (i32.const 1)))
-  (func (export "le_u769") (param $y i32) (result i32) (i32.le_u (i32.const 1) (get_local $y)))
-  (func (export "le_u770") (result i32) (i32.le_u (i32.const -1) (i32.const 1)))
-  (func (export "le_u771") (param $x i32) (result i32) (i32.le_u (get_local $x) (i32.const 1)))
-  (func (export "le_u772") (param $y i32) (result i32) (i32.le_u (i32.const -1) (get_local $y)))
-  (func (export "le_u773") (result i32) (i32.le_u (i32.const 0x80000000) (i32.const 0x80000000)))
-  (func (export "le_u774") (param $x i32) (result i32) (i32.le_u (get_local $x) (i32.const 0x80000000)))
-  (func (export "le_u775") (param $y i32) (result i32) (i32.le_u (i32.const 0x80000000) (get_local $y)))
-  (func (export "le_u776") (result i32) (i32.le_u (i32.const 0x7fffffff) (i32.const 0x7fffffff)))
-  (func (export "le_u777") (param $x i32) (result i32) (i32.le_u (get_local $x) (i32.const 0x7fffffff)))
-  (func (export "le_u778") (param $y i32) (result i32) (i32.le_u (i32.const 0x7fffffff) (get_local $y)))
-  (func (export "le_u779") (result i32) (i32.le_u (i32.const -1) (i32.const -1)))
-  (func (export "le_u780") (param $x i32) (result i32) (i32.le_u (get_local $x) (i32.const -1)))
-  (func (export "le_u781") (param $y i32) (result i32) (i32.le_u (i32.const -1) (get_local $y)))
-  (func (export "le_u782") (result i32) (i32.le_u (i32.const 1) (i32.const 0)))
-  (func (export "le_u783") (param $x i32) (result i32) (i32.le_u (get_local $x) (i32.const 0)))
-  (func (export "le_u784") (param $y i32) (result i32) (i32.le_u (i32.const 1) (get_local $y)))
-  (func (export "le_u785") (result i32) (i32.le_u (i32.const 0) (i32.const 1)))
-  (func (export "le_u786") (param $x i32) (result i32) (i32.le_u (get_local $x) (i32.const 1)))
-  (func (export "le_u787") (param $y i32) (result i32) (i32.le_u (i32.const 0) (get_local $y)))
-  (func (export "le_u788") (result i32) (i32.le_u (i32.const 0x80000000) (i32.const 0)))
-  (func (export "le_u789") (param $x i32) (result i32) (i32.le_u (get_local $x) (i32.const 0)))
-  (func (export "le_u790") (param $y i32) (result i32) (i32.le_u (i32.const 0x80000000) (get_local $y)))
-  (func (export "le_u791") (result i32) (i32.le_u (i32.const 0) (i32.const 0x80000000)))
-  (func (export "le_u792") (param $x i32) (result i32) (i32.le_u (get_local $x) (i32.const 0x80000000)))
-  (func (export "le_u793") (param $y i32) (result i32) (i32.le_u (i32.const 0) (get_local $y)))
-  (func (export "le_u794") (result i32) (i32.le_u (i32.const 0x80000000) (i32.const -1)))
-  (func (export "le_u795") (param $x i32) (result i32) (i32.le_u (get_local $x) (i32.const -1)))
-  (func (export "le_u796") (param $y i32) (result i32) (i32.le_u (i32.const 0x80000000) (get_local $y)))
-  (func (export "le_u797") (result i32) (i32.le_u (i32.const -1) (i32.const 0x80000000)))
-  (func (export "le_u798") (param $x i32) (result i32) (i32.le_u (get_local $x) (i32.const 0x80000000)))
-  (func (export "le_u799") (param $y i32) (result i32) (i32.le_u (i32.const -1) (get_local $y)))
-  (func (export "le_u800") (result i32) (i32.le_u (i32.const 0x80000000) (i32.const 0x7fffffff)))
-  (func (export "le_u801") (param $x i32) (result i32) (i32.le_u (get_local $x) (i32.const 0x7fffffff)))
-  (func (export "le_u802") (param $y i32) (result i32) (i32.le_u (i32.const 0x80000000) (get_local $y)))
-  (func (export "le_u803") (result i32) (i32.le_u (i32.const 0x7fffffff) (i32.const 0x80000000)))
-  (func (export "le_u804") (param $x i32) (result i32) (i32.le_u (get_local $x) (i32.const 0x80000000)))
-  (func (export "le_u805") (param $y i32) (result i32) (i32.le_u (i32.const 0x7fffffff) (get_local $y)))
-  (func (export "gt_s806") (result i32) (i32.gt_s (i32.const 0) (i32.const 0)))
-  (func (export "gt_s807") (param $x i32) (result i32) (i32.gt_s (get_local $x) (i32.const 0)))
-  (func (export "gt_s808") (param $y i32) (result i32) (i32.gt_s (i32.const 0) (get_local $y)))
-  (func (export "gt_s809") (result i32) (i32.gt_s (i32.const 1) (i32.const 1)))
-  (func (export "gt_s810") (param $x i32) (result i32) (i32.gt_s (get_local $x) (i32.const 1)))
-  (func (export "gt_s811") (param $y i32) (result i32) (i32.gt_s (i32.const 1) (get_local $y)))
-  (func (export "gt_s812") (result i32) (i32.gt_s (i32.const -1) (i32.const 1)))
-  (func (export "gt_s813") (param $x i32) (result i32) (i32.gt_s (get_local $x) (i32.const 1)))
-  (func (export "gt_s814") (param $y i32) (result i32) (i32.gt_s (i32.const -1) (get_local $y)))
-  (func (export "gt_s815") (result i32) (i32.gt_s (i32.const 0x80000000) (i32.const 0x80000000)))
-  (func (export "gt_s816") (param $x i32) (result i32) (i32.gt_s (get_local $x) (i32.const 0x80000000)))
-  (func (export "gt_s817") (param $y i32) (result i32) (i32.gt_s (i32.const 0x80000000) (get_local $y)))
-  (func (export "gt_s818") (result i32) (i32.gt_s (i32.const 0x7fffffff) (i32.const 0x7fffffff)))
-  (func (export "gt_s819") (param $x i32) (result i32) (i32.gt_s (get_local $x) (i32.const 0x7fffffff)))
-  (func (export "gt_s820") (param $y i32) (result i32) (i32.gt_s (i32.const 0x7fffffff) (get_local $y)))
-  (func (export "gt_s821") (result i32) (i32.gt_s (i32.const -1) (i32.const -1)))
-  (func (export "gt_s822") (param $x i32) (result i32) (i32.gt_s (get_local $x) (i32.const -1)))
-  (func (export "gt_s823") (param $y i32) (result i32) (i32.gt_s (i32.const -1) (get_local $y)))
-  (func (export "gt_s824") (result i32) (i32.gt_s (i32.const 1) (i32.const 0)))
-  (func (export "gt_s825") (param $x i32) (result i32) (i32.gt_s (get_local $x) (i32.const 0)))
-  (func (export "gt_s826") (param $y i32) (result i32) (i32.gt_s (i32.const 1) (get_local $y)))
-  (func (export "gt_s827") (result i32) (i32.gt_s (i32.const 0) (i32.const 1)))
-  (func (export "gt_s828") (param $x i32) (result i32) (i32.gt_s (get_local $x) (i32.const 1)))
-  (func (export "gt_s829") (param $y i32) (result i32) (i32.gt_s (i32.const 0) (get_local $y)))
-  (func (export "gt_s830") (result i32) (i32.gt_s (i32.const 0x80000000) (i32.const 0)))
-  (func (export "gt_s831") (param $x i32) (result i32) (i32.gt_s (get_local $x) (i32.const 0)))
-  (func (export "gt_s832") (param $y i32) (result i32) (i32.gt_s (i32.const 0x80000000) (get_local $y)))
-  (func (export "gt_s833") (result i32) (i32.gt_s (i32.const 0) (i32.const 0x80000000)))
-  (func (export "gt_s834") (param $x i32) (result i32) (i32.gt_s (get_local $x) (i32.const 0x80000000)))
-  (func (export "gt_s835") (param $y i32) (result i32) (i32.gt_s (i32.const 0) (get_local $y)))
-  (func (export "gt_s836") (result i32) (i32.gt_s (i32.const 0x80000000) (i32.const -1)))
-  (func (export "gt_s837") (param $x i32) (result i32) (i32.gt_s (get_local $x) (i32.const -1)))
-  (func (export "gt_s838") (param $y i32) (result i32) (i32.gt_s (i32.const 0x80000000) (get_local $y)))
-  (func (export "gt_s839") (result i32) (i32.gt_s (i32.const -1) (i32.const 0x80000000)))
-  (func (export "gt_s840") (param $x i32) (result i32) (i32.gt_s (get_local $x) (i32.const 0x80000000)))
-  (func (export "gt_s841") (param $y i32) (result i32) (i32.gt_s (i32.const -1) (get_local $y)))
-  (func (export "gt_s842") (result i32) (i32.gt_s (i32.const 0x80000000) (i32.const 0x7fffffff)))
-  (func (export "gt_s843") (param $x i32) (result i32) (i32.gt_s (get_local $x) (i32.const 0x7fffffff)))
-  (func (export "gt_s844") (param $y i32) (result i32) (i32.gt_s (i32.const 0x80000000) (get_local $y)))
-  (func (export "gt_s845") (result i32) (i32.gt_s (i32.const 0x7fffffff) (i32.const 0x80000000)))
-  (func (export "gt_s846") (param $x i32) (result i32) (i32.gt_s (get_local $x) (i32.const 0x80000000)))
-  (func (export "gt_s847") (param $y i32) (result i32) (i32.gt_s (i32.const 0x7fffffff) (get_local $y)))
-  (func (export "gt_u848") (result i32) (i32.gt_u (i32.const 0) (i32.const 0)))
-  (func (export "gt_u849") (param $x i32) (result i32) (i32.gt_u (get_local $x) (i32.const 0)))
-  (func (export "gt_u850") (param $y i32) (result i32) (i32.gt_u (i32.const 0) (get_local $y)))
-  (func (export "gt_u851") (result i32) (i32.gt_u (i32.const 1) (i32.const 1)))
-  (func (export "gt_u852") (param $x i32) (result i32) (i32.gt_u (get_local $x) (i32.const 1)))
-  (func (export "gt_u853") (param $y i32) (result i32) (i32.gt_u (i32.const 1) (get_local $y)))
-  (func (export "gt_u854") (result i32) (i32.gt_u (i32.const -1) (i32.const 1)))
-  (func (export "gt_u855") (param $x i32) (result i32) (i32.gt_u (get_local $x) (i32.const 1)))
-  (func (export "gt_u856") (param $y i32) (result i32) (i32.gt_u (i32.const -1) (get_local $y)))
-  (func (export "gt_u857") (result i32) (i32.gt_u (i32.const 0x80000000) (i32.const 0x80000000)))
-  (func (export "gt_u858") (param $x i32) (result i32) (i32.gt_u (get_local $x) (i32.const 0x80000000)))
-  (func (export "gt_u859") (param $y i32) (result i32) (i32.gt_u (i32.const 0x80000000) (get_local $y)))
-  (func (export "gt_u860") (result i32) (i32.gt_u (i32.const 0x7fffffff) (i32.const 0x7fffffff)))
-  (func (export "gt_u861") (param $x i32) (result i32) (i32.gt_u (get_local $x) (i32.const 0x7fffffff)))
-  (func (export "gt_u862") (param $y i32) (result i32) (i32.gt_u (i32.const 0x7fffffff) (get_local $y)))
-  (func (export "gt_u863") (result i32) (i32.gt_u (i32.const -1) (i32.const -1)))
-  (func (export "gt_u864") (param $x i32) (result i32) (i32.gt_u (get_local $x) (i32.const -1)))
-  (func (export "gt_u865") (param $y i32) (result i32) (i32.gt_u (i32.const -1) (get_local $y)))
-  (func (export "gt_u866") (result i32) (i32.gt_u (i32.const 1) (i32.const 0)))
-  (func (export "gt_u867") (param $x i32) (result i32) (i32.gt_u (get_local $x) (i32.const 0)))
-  (func (export "gt_u868") (param $y i32) (result i32) (i32.gt_u (i32.const 1) (get_local $y)))
-  (func (export "gt_u869") (result i32) (i32.gt_u (i32.const 0) (i32.const 1)))
-  (func (export "gt_u870") (param $x i32) (result i32) (i32.gt_u (get_local $x) (i32.const 1)))
-  (func (export "gt_u871") (param $y i32) (result i32) (i32.gt_u (i32.const 0) (get_local $y)))
-  (func (export "gt_u872") (result i32) (i32.gt_u (i32.const 0x80000000) (i32.const 0)))
-  (func (export "gt_u873") (param $x i32) (result i32) (i32.gt_u (get_local $x) (i32.const 0)))
-  (func (export "gt_u874") (param $y i32) (result i32) (i32.gt_u (i32.const 0x80000000) (get_local $y)))
-  (func (export "gt_u875") (result i32) (i32.gt_u (i32.const 0) (i32.const 0x80000000)))
-  (func (export "gt_u876") (param $x i32) (result i32) (i32.gt_u (get_local $x) (i32.const 0x80000000)))
-  (func (export "gt_u877") (param $y i32) (result i32) (i32.gt_u (i32.const 0) (get_local $y)))
-  (func (export "gt_u878") (result i32) (i32.gt_u (i32.const 0x80000000) (i32.const -1)))
-  (func (export "gt_u879") (param $x i32) (result i32) (i32.gt_u (get_local $x) (i32.const -1)))
-  (func (export "gt_u880") (param $y i32) (result i32) (i32.gt_u (i32.const 0x80000000) (get_local $y)))
-  (func (export "gt_u881") (result i32) (i32.gt_u (i32.const -1) (i32.const 0x80000000)))
-  (func (export "gt_u882") (param $x i32) (result i32) (i32.gt_u (get_local $x) (i32.const 0x80000000)))
-  (func (export "gt_u883") (param $y i32) (result i32) (i32.gt_u (i32.const -1) (get_local $y)))
-  (func (export "gt_u884") (result i32) (i32.gt_u (i32.const 0x80000000) (i32.const 0x7fffffff)))
-  (func (export "gt_u885") (param $x i32) (result i32) (i32.gt_u (get_local $x) (i32.const 0x7fffffff)))
-  (func (export "gt_u886") (param $y i32) (result i32) (i32.gt_u (i32.const 0x80000000) (get_local $y)))
-  (func (export "gt_u887") (result i32) (i32.gt_u (i32.const 0x7fffffff) (i32.const 0x80000000)))
-  (func (export "gt_u888") (param $x i32) (result i32) (i32.gt_u (get_local $x) (i32.const 0x80000000)))
-  (func (export "gt_u889") (param $y i32) (result i32) (i32.gt_u (i32.const 0x7fffffff) (get_local $y)))
-  (func (export "ge_s890") (result i32) (i32.ge_s (i32.const 0) (i32.const 0)))
-  (func (export "ge_s891") (param $x i32) (result i32) (i32.ge_s (get_local $x) (i32.const 0)))
-  (func (export "ge_s892") (param $y i32) (result i32) (i32.ge_s (i32.const 0) (get_local $y)))
-  (func (export "ge_s893") (result i32) (i32.ge_s (i32.const 1) (i32.const 1)))
-  (func (export "ge_s894") (param $x i32) (result i32) (i32.ge_s (get_local $x) (i32.const 1)))
-  (func (export "ge_s895") (param $y i32) (result i32) (i32.ge_s (i32.const 1) (get_local $y)))
-  (func (export "ge_s896") (result i32) (i32.ge_s (i32.const -1) (i32.const 1)))
-  (func (export "ge_s897") (param $x i32) (result i32) (i32.ge_s (get_local $x) (i32.const 1)))
-  (func (export "ge_s898") (param $y i32) (result i32) (i32.ge_s (i32.const -1) (get_local $y)))
-  (func (export "ge_s899") (result i32) (i32.ge_s (i32.const 0x80000000) (i32.const 0x80000000)))
-  (func (export "ge_s900") (param $x i32) (result i32) (i32.ge_s (get_local $x) (i32.const 0x80000000)))
-  (func (export "ge_s901") (param $y i32) (result i32) (i32.ge_s (i32.const 0x80000000) (get_local $y)))
-  (func (export "ge_s902") (result i32) (i32.ge_s (i32.const 0x7fffffff) (i32.const 0x7fffffff)))
-  (func (export "ge_s903") (param $x i32) (result i32) (i32.ge_s (get_local $x) (i32.const 0x7fffffff)))
-  (func (export "ge_s904") (param $y i32) (result i32) (i32.ge_s (i32.const 0x7fffffff) (get_local $y)))
-  (func (export "ge_s905") (result i32) (i32.ge_s (i32.const -1) (i32.const -1)))
-  (func (export "ge_s906") (param $x i32) (result i32) (i32.ge_s (get_local $x) (i32.const -1)))
-  (func (export "ge_s907") (param $y i32) (result i32) (i32.ge_s (i32.const -1) (get_local $y)))
-  (func (export "ge_s908") (result i32) (i32.ge_s (i32.const 1) (i32.const 0)))
-  (func (export "ge_s909") (param $x i32) (result i32) (i32.ge_s (get_local $x) (i32.const 0)))
-  (func (export "ge_s910") (param $y i32) (result i32) (i32.ge_s (i32.const 1) (get_local $y)))
-  (func (export "ge_s911") (result i32) (i32.ge_s (i32.const 0) (i32.const 1)))
-  (func (export "ge_s912") (param $x i32) (result i32) (i32.ge_s (get_local $x) (i32.const 1)))
-  (func (export "ge_s913") (param $y i32) (result i32) (i32.ge_s (i32.const 0) (get_local $y)))
-  (func (export "ge_s914") (result i32) (i32.ge_s (i32.const 0x80000000) (i32.const 0)))
-  (func (export "ge_s915") (param $x i32) (result i32) (i32.ge_s (get_local $x) (i32.const 0)))
-  (func (export "ge_s916") (param $y i32) (result i32) (i32.ge_s (i32.const 0x80000000) (get_local $y)))
-  (func (export "ge_s917") (result i32) (i32.ge_s (i32.const 0) (i32.const 0x80000000)))
-  (func (export "ge_s918") (param $x i32) (result i32) (i32.ge_s (get_local $x) (i32.const 0x80000000)))
-  (func (export "ge_s919") (param $y i32) (result i32) (i32.ge_s (i32.const 0) (get_local $y)))
-  (func (export "ge_s920") (result i32) (i32.ge_s (i32.const 0x80000000) (i32.const -1)))
-  (func (export "ge_s921") (param $x i32) (result i32) (i32.ge_s (get_local $x) (i32.const -1)))
-  (func (export "ge_s922") (param $y i32) (result i32) (i32.ge_s (i32.const 0x80000000) (get_local $y)))
-  (func (export "ge_s923") (result i32) (i32.ge_s (i32.const -1) (i32.const 0x80000000)))
-  (func (export "ge_s924") (param $x i32) (result i32) (i32.ge_s (get_local $x) (i32.const 0x80000000)))
-  (func (export "ge_s925") (param $y i32) (result i32) (i32.ge_s (i32.const -1) (get_local $y)))
-  (func (export "ge_s926") (result i32) (i32.ge_s (i32.const 0x80000000) (i32.const 0x7fffffff)))
-  (func (export "ge_s927") (param $x i32) (result i32) (i32.ge_s (get_local $x) (i32.const 0x7fffffff)))
-  (func (export "ge_s928") (param $y i32) (result i32) (i32.ge_s (i32.const 0x80000000) (get_local $y)))
-  (func (export "ge_s929") (result i32) (i32.ge_s (i32.const 0x7fffffff) (i32.const 0x80000000)))
-  (func (export "ge_s930") (param $x i32) (result i32) (i32.ge_s (get_local $x) (i32.const 0x80000000)))
-  (func (export "ge_s931") (param $y i32) (result i32) (i32.ge_s (i32.const 0x7fffffff) (get_local $y)))
-  (func (export "ge_u932") (result i32) (i32.ge_u (i32.const 0) (i32.const 0)))
-  (func (export "ge_u933") (param $x i32) (result i32) (i32.ge_u (get_local $x) (i32.const 0)))
-  (func (export "ge_u934") (param $y i32) (result i32) (i32.ge_u (i32.const 0) (get_local $y)))
-  (func (export "ge_u935") (result i32) (i32.ge_u (i32.const 1) (i32.const 1)))
-  (func (export "ge_u936") (param $x i32) (result i32) (i32.ge_u (get_local $x) (i32.const 1)))
-  (func (export "ge_u937") (param $y i32) (result i32) (i32.ge_u (i32.const 1) (get_local $y)))
-  (func (export "ge_u938") (result i32) (i32.ge_u (i32.const -1) (i32.const 1)))
-  (func (export "ge_u939") (param $x i32) (result i32) (i32.ge_u (get_local $x) (i32.const 1)))
-  (func (export "ge_u940") (param $y i32) (result i32) (i32.ge_u (i32.const -1) (get_local $y)))
-  (func (export "ge_u941") (result i32) (i32.ge_u (i32.const 0x80000000) (i32.const 0x80000000)))
-  (func (export "ge_u942") (param $x i32) (result i32) (i32.ge_u (get_local $x) (i32.const 0x80000000)))
-  (func (export "ge_u943") (param $y i32) (result i32) (i32.ge_u (i32.const 0x80000000) (get_local $y)))
-  (func (export "ge_u944") (result i32) (i32.ge_u (i32.const 0x7fffffff) (i32.const 0x7fffffff)))
-  (func (export "ge_u945") (param $x i32) (result i32) (i32.ge_u (get_local $x) (i32.const 0x7fffffff)))
-  (func (export "ge_u946") (param $y i32) (result i32) (i32.ge_u (i32.const 0x7fffffff) (get_local $y)))
-  (func (export "ge_u947") (result i32) (i32.ge_u (i32.const -1) (i32.const -1)))
-  (func (export "ge_u948") (param $x i32) (result i32) (i32.ge_u (get_local $x) (i32.const -1)))
-  (func (export "ge_u949") (param $y i32) (result i32) (i32.ge_u (i32.const -1) (get_local $y)))
-  (func (export "ge_u950") (result i32) (i32.ge_u (i32.const 1) (i32.const 0)))
-  (func (export "ge_u951") (param $x i32) (result i32) (i32.ge_u (get_local $x) (i32.const 0)))
-  (func (export "ge_u952") (param $y i32) (result i32) (i32.ge_u (i32.const 1) (get_local $y)))
-  (func (export "ge_u953") (result i32) (i32.ge_u (i32.const 0) (i32.const 1)))
-  (func (export "ge_u954") (param $x i32) (result i32) (i32.ge_u (get_local $x) (i32.const 1)))
-  (func (export "ge_u955") (param $y i32) (result i32) (i32.ge_u (i32.const 0) (get_local $y)))
-  (func (export "ge_u956") (result i32) (i32.ge_u (i32.const 0x80000000) (i32.const 0)))
-  (func (export "ge_u957") (param $x i32) (result i32) (i32.ge_u (get_local $x) (i32.const 0)))
-  (func (export "ge_u958") (param $y i32) (result i32) (i32.ge_u (i32.const 0x80000000) (get_local $y)))
-  (func (export "ge_u959") (result i32) (i32.ge_u (i32.const 0) (i32.const 0x80000000)))
-  (func (export "ge_u960") (param $x i32) (result i32) (i32.ge_u (get_local $x) (i32.const 0x80000000)))
-  (func (export "ge_u961") (param $y i32) (result i32) (i32.ge_u (i32.const 0) (get_local $y)))
-  (func (export "ge_u962") (result i32) (i32.ge_u (i32.const 0x80000000) (i32.const -1)))
-  (func (export "ge_u963") (param $x i32) (result i32) (i32.ge_u (get_local $x) (i32.const -1)))
-  (func (export "ge_u964") (param $y i32) (result i32) (i32.ge_u (i32.const 0x80000000) (get_local $y)))
-  (func (export "ge_u965") (result i32) (i32.ge_u (i32.const -1) (i32.const 0x80000000)))
-  (func (export "ge_u966") (param $x i32) (result i32) (i32.ge_u (get_local $x) (i32.const 0x80000000)))
-  (func (export "ge_u967") (param $y i32) (result i32) (i32.ge_u (i32.const -1) (get_local $y)))
-  (func (export "ge_u968") (result i32) (i32.ge_u (i32.const 0x80000000) (i32.const 0x7fffffff)))
-  (func (export "ge_u969") (param $x i32) (result i32) (i32.ge_u (get_local $x) (i32.const 0x7fffffff)))
-  (func (export "ge_u970") (param $y i32) (result i32) (i32.ge_u (i32.const 0x80000000) (get_local $y)))
-  (func (export "ge_u971") (result i32) (i32.ge_u (i32.const 0x7fffffff) (i32.const 0x80000000)))
-  (func (export "ge_u972") (param $x i32) (result i32) (i32.ge_u (get_local $x) (i32.const 0x80000000)))
-  (func (export "ge_u973") (param $y i32) (result i32) (i32.ge_u (i32.const 0x7fffffff) (get_local $y)))
+  (func (export "rotl506") (param $y i32) (result i32) (i32.rotl (i32.const -1) (get_local $y)))
+  (func (export "rotl507") (result i32) (i32.rotl (i32.const 1) (i32.const 32)))
+  (func (export "rotl508") (param $x i32) (result i32) (i32.rotl (get_local $x) (i32.const 32)))
+  (func (export "rotl509") (param $y i32) (result i32) (i32.rotl (i32.const 1) (get_local $y)))
+  (func (export "rotl510") (result i32) (i32.rotl (i32.const 0xabcd9876) (i32.const 1)))
+  (func (export "rotl511") (param $x i32) (result i32) (i32.rotl (get_local $x) (i32.const 1)))
+  (func (export "rotl512") (param $y i32) (result i32) (i32.rotl (i32.const 0xabcd9876) (get_local $y)))
+  (func (export "rotl513") (result i32) (i32.rotl (i32.const 0xfe00dc00) (i32.const 4)))
+  (func (export "rotl514") (param $x i32) (result i32) (i32.rotl (get_local $x) (i32.const 4)))
+  (func (export "rotl515") (param $y i32) (result i32) (i32.rotl (i32.const 0xfe00dc00) (get_local $y)))
+  (func (export "rotl516") (result i32) (i32.rotl (i32.const 0xb0c1d2e3) (i32.const 5)))
+  (func (export "rotl517") (param $x i32) (result i32) (i32.rotl (get_local $x) (i32.const 5)))
+  (func (export "rotl518") (param $y i32) (result i32) (i32.rotl (i32.const 0xb0c1d2e3) (get_local $y)))
+  (func (export "rotl519") (result i32) (i32.rotl (i32.const 0x00008000) (i32.const 37)))
+  (func (export "rotl520") (param $x i32) (result i32) (i32.rotl (get_local $x) (i32.const 37)))
+  (func (export "rotl521") (param $y i32) (result i32) (i32.rotl (i32.const 0x00008000) (get_local $y)))
+  (func (export "rotl522") (result i32) (i32.rotl (i32.const 0xb0c1d2e3) (i32.const 0xff05)))
+  (func (export "rotl523") (param $x i32) (result i32) (i32.rotl (get_local $x) (i32.const 0xff05)))
+  (func (export "rotl524") (param $y i32) (result i32) (i32.rotl (i32.const 0xb0c1d2e3) (get_local $y)))
+  (func (export "rotl525") (result i32) (i32.rotl (i32.const 0x769abcdf) (i32.const 0xffffffed)))
+  (func (export "rotl526") (param $x i32) (result i32) (i32.rotl (get_local $x) (i32.const 0xffffffed)))
+  (func (export "rotl527") (param $y i32) (result i32) (i32.rotl (i32.const 0x769abcdf) (get_local $y)))
+  (func (export "rotl528") (result i32) (i32.rotl (i32.const 0x769abcdf) (i32.const 0x8000000d)))
+  (func (export "rotl529") (param $x i32) (result i32) (i32.rotl (get_local $x) (i32.const 0x8000000d)))
+  (func (export "rotl530") (param $y i32) (result i32) (i32.rotl (i32.const 0x769abcdf) (get_local $y)))
+  (func (export "rotl531") (result i32) (i32.rotl (i32.const 1) (i32.const 31)))
+  (func (export "rotl532") (param $x i32) (result i32) (i32.rotl (get_local $x) (i32.const 31)))
+  (func (export "rotl533") (param $y i32) (result i32) (i32.rotl (i32.const 1) (get_local $y)))
+  (func (export "rotl534") (result i32) (i32.rotl (i32.const 0x80000000) (i32.const 1)))
+  (func (export "rotl535") (param $x i32) (result i32) (i32.rotl (get_local $x) (i32.const 1)))
+  (func (export "rotl536") (param $y i32) (result i32) (i32.rotl (i32.const 0x80000000) (get_local $y)))
+  (func (export "rotr537") (result i32) (i32.rotr (i32.const 1) (i32.const 1)))
+  (func (export "rotr538") (param $x i32) (result i32) (i32.rotr (get_local $x) (i32.const 1)))
+  (func (export "rotr539") (param $y i32) (result i32) (i32.rotr (i32.const 1) (get_local $y)))
+  (func (export "rotr540") (result i32) (i32.rotr (i32.const 1) (i32.const 0)))
+  (func (export "rotr541") (param $x i32) (result i32) (i32.rotr (get_local $x) (i32.const 0)))
+  (func (export "rotr542") (param $y i32) (result i32) (i32.rotr (i32.const 1) (get_local $y)))
+  (func (export "rotr543") (result i32) (i32.rotr (i32.const -1) (i32.const 1)))
+  (func (export "rotr544") (param $x i32) (result i32) (i32.rotr (get_local $x) (i32.const 1)))
+  (func (export "rotr545") (param $y i32) (result i32) (i32.rotr (i32.const -1) (get_local $y)))
+  (func (export "rotr546") (result i32) (i32.rotr (i32.const 1) (i32.const 32)))
+  (func (export "rotr547") (param $x i32) (result i32) (i32.rotr (get_local $x) (i32.const 32)))
+  (func (export "rotr548") (param $y i32) (result i32) (i32.rotr (i32.const 1) (get_local $y)))
+  (func (export "rotr549") (result i32) (i32.rotr (i32.const 0xff00cc00) (i32.const 1)))
+  (func (export "rotr550") (param $x i32) (result i32) (i32.rotr (get_local $x) (i32.const 1)))
+  (func (export "rotr551") (param $y i32) (result i32) (i32.rotr (i32.const 0xff00cc00) (get_local $y)))
+  (func (export "rotr552") (result i32) (i32.rotr (i32.const 0x00080000) (i32.const 4)))
+  (func (export "rotr553") (param $x i32) (result i32) (i32.rotr (get_local $x) (i32.const 4)))
+  (func (export "rotr554") (param $y i32) (result i32) (i32.rotr (i32.const 0x00080000) (get_local $y)))
+  (func (export "rotr555") (result i32) (i32.rotr (i32.const 0xb0c1d2e3) (i32.const 5)))
+  (func (export "rotr556") (param $x i32) (result i32) (i32.rotr (get_local $x) (i32.const 5)))
+  (func (export "rotr557") (param $y i32) (result i32) (i32.rotr (i32.const 0xb0c1d2e3) (get_local $y)))
+  (func (export "rotr558") (result i32) (i32.rotr (i32.const 0x00008000) (i32.const 37)))
+  (func (export "rotr559") (param $x i32) (result i32) (i32.rotr (get_local $x) (i32.const 37)))
+  (func (export "rotr560") (param $y i32) (result i32) (i32.rotr (i32.const 0x00008000) (get_local $y)))
+  (func (export "rotr561") (result i32) (i32.rotr (i32.const 0xb0c1d2e3) (i32.const 0xff05)))
+  (func (export "rotr562") (param $x i32) (result i32) (i32.rotr (get_local $x) (i32.const 0xff05)))
+  (func (export "rotr563") (param $y i32) (result i32) (i32.rotr (i32.const 0xb0c1d2e3) (get_local $y)))
+  (func (export "rotr564") (result i32) (i32.rotr (i32.const 0x769abcdf) (i32.const 0xffffffed)))
+  (func (export "rotr565") (param $x i32) (result i32) (i32.rotr (get_local $x) (i32.const 0xffffffed)))
+  (func (export "rotr566") (param $y i32) (result i32) (i32.rotr (i32.const 0x769abcdf) (get_local $y)))
+  (func (export "rotr567") (result i32) (i32.rotr (i32.const 0x769abcdf) (i32.const 0x8000000d)))
+  (func (export "rotr568") (param $x i32) (result i32) (i32.rotr (get_local $x) (i32.const 0x8000000d)))
+  (func (export "rotr569") (param $y i32) (result i32) (i32.rotr (i32.const 0x769abcdf) (get_local $y)))
+  (func (export "rotr570") (result i32) (i32.rotr (i32.const 1) (i32.const 31)))
+  (func (export "rotr571") (param $x i32) (result i32) (i32.rotr (get_local $x) (i32.const 31)))
+  (func (export "rotr572") (param $y i32) (result i32) (i32.rotr (i32.const 1) (get_local $y)))
+  (func (export "rotr573") (result i32) (i32.rotr (i32.const 0x80000000) (i32.const 31)))
+  (func (export "rotr574") (param $x i32) (result i32) (i32.rotr (get_local $x) (i32.const 31)))
+  (func (export "rotr575") (param $y i32) (result i32) (i32.rotr (i32.const 0x80000000) (get_local $y)))
+  (func (export "clz576") (result i32) (i32.clz (i32.const 0xffffffff)))
+  (func (export "clz577") (result i32) (i32.clz (i32.const 0)))
+  (func (export "clz578") (result i32) (i32.clz (i32.const 0x00008000)))
+  (func (export "clz579") (result i32) (i32.clz (i32.const 0xff)))
+  (func (export "clz580") (result i32) (i32.clz (i32.const 0x80000000)))
+  (func (export "clz581") (result i32) (i32.clz (i32.const 1)))
+  (func (export "clz582") (result i32) (i32.clz (i32.const 2)))
+  (func (export "clz583") (result i32) (i32.clz (i32.const 0x7fffffff)))
+  (func (export "ctz584") (result i32) (i32.ctz (i32.const -1)))
+  (func (export "ctz585") (result i32) (i32.ctz (i32.const 0)))
+  (func (export "ctz586") (result i32) (i32.ctz (i32.const 0x00008000)))
+  (func (export "ctz587") (result i32) (i32.ctz (i32.const 0x00010000)))
+  (func (export "ctz588") (result i32) (i32.ctz (i32.const 0x80000000)))
+  (func (export "ctz589") (result i32) (i32.ctz (i32.const 0x7fffffff)))
+  (func (export "popcnt590") (result i32) (i32.popcnt (i32.const -1)))
+  (func (export "popcnt591") (result i32) (i32.popcnt (i32.const 0)))
+  (func (export "popcnt592") (result i32) (i32.popcnt (i32.const 0x00008000)))
+  (func (export "popcnt593") (result i32) (i32.popcnt (i32.const 0x80008000)))
+  (func (export "popcnt594") (result i32) (i32.popcnt (i32.const 0x7fffffff)))
+  (func (export "popcnt595") (result i32) (i32.popcnt (i32.const 0xAAAAAAAA)))
+  (func (export "popcnt596") (result i32) (i32.popcnt (i32.const 0x55555555)))
+  (func (export "popcnt597") (result i32) (i32.popcnt (i32.const 0xDEADBEEF)))
+  (func (export "eqz598") (result i32) (i32.eqz (i32.const 0)))
+  (func (export "eqz599") (result i32) (i32.eqz (i32.const 1)))
+  (func (export "eqz600") (result i32) (i32.eqz (i32.const 0x80000000)))
+  (func (export "eqz601") (result i32) (i32.eqz (i32.const 0x7fffffff)))
+  (func (export "eqz602") (result i32) (i32.eqz (i32.const 0xffffffff)))
+  (func (export "eq603") (result i32) (i32.eq (i32.const 0) (i32.const 0)))
+  (func (export "eq604") (param $x i32) (result i32) (i32.eq (get_local $x) (i32.const 0)))
+  (func (export "eq605") (param $y i32) (result i32) (i32.eq (i32.const 0) (get_local $y)))
+  (func (export "eq606") (result i32) (i32.eq (i32.const 1) (i32.const 1)))
+  (func (export "eq607") (param $x i32) (result i32) (i32.eq (get_local $x) (i32.const 1)))
+  (func (export "eq608") (param $y i32) (result i32) (i32.eq (i32.const 1) (get_local $y)))
+  (func (export "eq609") (result i32) (i32.eq (i32.const -1) (i32.const 1)))
+  (func (export "eq610") (param $x i32) (result i32) (i32.eq (get_local $x) (i32.const 1)))
+  (func (export "eq611") (param $y i32) (result i32) (i32.eq (i32.const -1) (get_local $y)))
+  (func (export "eq612") (result i32) (i32.eq (i32.const 0x80000000) (i32.const 0x80000000)))
+  (func (export "eq613") (param $x i32) (result i32) (i32.eq (get_local $x) (i32.const 0x80000000)))
+  (func (export "eq614") (param $y i32) (result i32) (i32.eq (i32.const 0x80000000) (get_local $y)))
+  (func (export "eq615") (result i32) (i32.eq (i32.const 0x7fffffff) (i32.const 0x7fffffff)))
+  (func (export "eq616") (param $x i32) (result i32) (i32.eq (get_local $x) (i32.const 0x7fffffff)))
+  (func (export "eq617") (param $y i32) (result i32) (i32.eq (i32.const 0x7fffffff) (get_local $y)))
+  (func (export "eq618") (result i32) (i32.eq (i32.const -1) (i32.const -1)))
+  (func (export "eq619") (param $x i32) (result i32) (i32.eq (get_local $x) (i32.const -1)))
+  (func (export "eq620") (param $y i32) (result i32) (i32.eq (i32.const -1) (get_local $y)))
+  (func (export "eq621") (result i32) (i32.eq (i32.const 1) (i32.const 0)))
+  (func (export "eq622") (param $x i32) (result i32) (i32.eq (get_local $x) (i32.const 0)))
+  (func (export "eq623") (param $y i32) (result i32) (i32.eq (i32.const 1) (get_local $y)))
+  (func (export "eq624") (result i32) (i32.eq (i32.const 0) (i32.const 1)))
+  (func (export "eq625") (param $x i32) (result i32) (i32.eq (get_local $x) (i32.const 1)))
+  (func (export "eq626") (param $y i32) (result i32) (i32.eq (i32.const 0) (get_local $y)))
+  (func (export "eq627") (result i32) (i32.eq (i32.const 0x80000000) (i32.const 0)))
+  (func (export "eq628") (param $x i32) (result i32) (i32.eq (get_local $x) (i32.const 0)))
+  (func (export "eq629") (param $y i32) (result i32) (i32.eq (i32.const 0x80000000) (get_local $y)))
+  (func (export "eq630") (result i32) (i32.eq (i32.const 0) (i32.const 0x80000000)))
+  (func (export "eq631") (param $x i32) (result i32) (i32.eq (get_local $x) (i32.const 0x80000000)))
+  (func (export "eq632") (param $y i32) (result i32) (i32.eq (i32.const 0) (get_local $y)))
+  (func (export "eq633") (result i32) (i32.eq (i32.const 0x80000000) (i32.const -1)))
+  (func (export "eq634") (param $x i32) (result i32) (i32.eq (get_local $x) (i32.const -1)))
+  (func (export "eq635") (param $y i32) (result i32) (i32.eq (i32.const 0x80000000) (get_local $y)))
+  (func (export "eq636") (result i32) (i32.eq (i32.const -1) (i32.const 0x80000000)))
+  (func (export "eq637") (param $x i32) (result i32) (i32.eq (get_local $x) (i32.const 0x80000000)))
+  (func (export "eq638") (param $y i32) (result i32) (i32.eq (i32.const -1) (get_local $y)))
+  (func (export "eq639") (result i32) (i32.eq (i32.const 0x80000000) (i32.const 0x7fffffff)))
+  (func (export "eq640") (param $x i32) (result i32) (i32.eq (get_local $x) (i32.const 0x7fffffff)))
+  (func (export "eq641") (param $y i32) (result i32) (i32.eq (i32.const 0x80000000) (get_local $y)))
+  (func (export "eq642") (result i32) (i32.eq (i32.const 0x7fffffff) (i32.const 0x80000000)))
+  (func (export "eq643") (param $x i32) (result i32) (i32.eq (get_local $x) (i32.const 0x80000000)))
+  (func (export "eq644") (param $y i32) (result i32) (i32.eq (i32.const 0x7fffffff) (get_local $y)))
+  (func (export "ne645") (result i32) (i32.ne (i32.const 0) (i32.const 0)))
+  (func (export "ne646") (param $x i32) (result i32) (i32.ne (get_local $x) (i32.const 0)))
+  (func (export "ne647") (param $y i32) (result i32) (i32.ne (i32.const 0) (get_local $y)))
+  (func (export "ne648") (result i32) (i32.ne (i32.const 1) (i32.const 1)))
+  (func (export "ne649") (param $x i32) (result i32) (i32.ne (get_local $x) (i32.const 1)))
+  (func (export "ne650") (param $y i32) (result i32) (i32.ne (i32.const 1) (get_local $y)))
+  (func (export "ne651") (result i32) (i32.ne (i32.const -1) (i32.const 1)))
+  (func (export "ne652") (param $x i32) (result i32) (i32.ne (get_local $x) (i32.const 1)))
+  (func (export "ne653") (param $y i32) (result i32) (i32.ne (i32.const -1) (get_local $y)))
+  (func (export "ne654") (result i32) (i32.ne (i32.const 0x80000000) (i32.const 0x80000000)))
+  (func (export "ne655") (param $x i32) (result i32) (i32.ne (get_local $x) (i32.const 0x80000000)))
+  (func (export "ne656") (param $y i32) (result i32) (i32.ne (i32.const 0x80000000) (get_local $y)))
+  (func (export "ne657") (result i32) (i32.ne (i32.const 0x7fffffff) (i32.const 0x7fffffff)))
+  (func (export "ne658") (param $x i32) (result i32) (i32.ne (get_local $x) (i32.const 0x7fffffff)))
+  (func (export "ne659") (param $y i32) (result i32) (i32.ne (i32.const 0x7fffffff) (get_local $y)))
+  (func (export "ne660") (result i32) (i32.ne (i32.const -1) (i32.const -1)))
+  (func (export "ne661") (param $x i32) (result i32) (i32.ne (get_local $x) (i32.const -1)))
+  (func (export "ne662") (param $y i32) (result i32) (i32.ne (i32.const -1) (get_local $y)))
+  (func (export "ne663") (result i32) (i32.ne (i32.const 1) (i32.const 0)))
+  (func (export "ne664") (param $x i32) (result i32) (i32.ne (get_local $x) (i32.const 0)))
+  (func (export "ne665") (param $y i32) (result i32) (i32.ne (i32.const 1) (get_local $y)))
+  (func (export "ne666") (result i32) (i32.ne (i32.const 0) (i32.const 1)))
+  (func (export "ne667") (param $x i32) (result i32) (i32.ne (get_local $x) (i32.const 1)))
+  (func (export "ne668") (param $y i32) (result i32) (i32.ne (i32.const 0) (get_local $y)))
+  (func (export "ne669") (result i32) (i32.ne (i32.const 0x80000000) (i32.const 0)))
+  (func (export "ne670") (param $x i32) (result i32) (i32.ne (get_local $x) (i32.const 0)))
+  (func (export "ne671") (param $y i32) (result i32) (i32.ne (i32.const 0x80000000) (get_local $y)))
+  (func (export "ne672") (result i32) (i32.ne (i32.const 0) (i32.const 0x80000000)))
+  (func (export "ne673") (param $x i32) (result i32) (i32.ne (get_local $x) (i32.const 0x80000000)))
+  (func (export "ne674") (param $y i32) (result i32) (i32.ne (i32.const 0) (get_local $y)))
+  (func (export "ne675") (result i32) (i32.ne (i32.const 0x80000000) (i32.const -1)))
+  (func (export "ne676") (param $x i32) (result i32) (i32.ne (get_local $x) (i32.const -1)))
+  (func (export "ne677") (param $y i32) (result i32) (i32.ne (i32.const 0x80000000) (get_local $y)))
+  (func (export "ne678") (result i32) (i32.ne (i32.const -1) (i32.const 0x80000000)))
+  (func (export "ne679") (param $x i32) (result i32) (i32.ne (get_local $x) (i32.const 0x80000000)))
+  (func (export "ne680") (param $y i32) (result i32) (i32.ne (i32.const -1) (get_local $y)))
+  (func (export "ne681") (result i32) (i32.ne (i32.const 0x80000000) (i32.const 0x7fffffff)))
+  (func (export "ne682") (param $x i32) (result i32) (i32.ne (get_local $x) (i32.const 0x7fffffff)))
+  (func (export "ne683") (param $y i32) (result i32) (i32.ne (i32.const 0x80000000) (get_local $y)))
+  (func (export "ne684") (result i32) (i32.ne (i32.const 0x7fffffff) (i32.const 0x80000000)))
+  (func (export "ne685") (param $x i32) (result i32) (i32.ne (get_local $x) (i32.const 0x80000000)))
+  (func (export "ne686") (param $y i32) (result i32) (i32.ne (i32.const 0x7fffffff) (get_local $y)))
+  (func (export "lt_s687") (result i32) (i32.lt_s (i32.const 0) (i32.const 0)))
+  (func (export "lt_s688") (param $x i32) (result i32) (i32.lt_s (get_local $x) (i32.const 0)))
+  (func (export "lt_s689") (param $y i32) (result i32) (i32.lt_s (i32.const 0) (get_local $y)))
+  (func (export "lt_s690") (result i32) (i32.lt_s (i32.const 1) (i32.const 1)))
+  (func (export "lt_s691") (param $x i32) (result i32) (i32.lt_s (get_local $x) (i32.const 1)))
+  (func (export "lt_s692") (param $y i32) (result i32) (i32.lt_s (i32.const 1) (get_local $y)))
+  (func (export "lt_s693") (result i32) (i32.lt_s (i32.const -1) (i32.const 1)))
+  (func (export "lt_s694") (param $x i32) (result i32) (i32.lt_s (get_local $x) (i32.const 1)))
+  (func (export "lt_s695") (param $y i32) (result i32) (i32.lt_s (i32.const -1) (get_local $y)))
+  (func (export "lt_s696") (result i32) (i32.lt_s (i32.const 0x80000000) (i32.const 0x80000000)))
+  (func (export "lt_s697") (param $x i32) (result i32) (i32.lt_s (get_local $x) (i32.const 0x80000000)))
+  (func (export "lt_s698") (param $y i32) (result i32) (i32.lt_s (i32.const 0x80000000) (get_local $y)))
+  (func (export "lt_s699") (result i32) (i32.lt_s (i32.const 0x7fffffff) (i32.const 0x7fffffff)))
+  (func (export "lt_s700") (param $x i32) (result i32) (i32.lt_s (get_local $x) (i32.const 0x7fffffff)))
+  (func (export "lt_s701") (param $y i32) (result i32) (i32.lt_s (i32.const 0x7fffffff) (get_local $y)))
+  (func (export "lt_s702") (result i32) (i32.lt_s (i32.const -1) (i32.const -1)))
+  (func (export "lt_s703") (param $x i32) (result i32) (i32.lt_s (get_local $x) (i32.const -1)))
+  (func (export "lt_s704") (param $y i32) (result i32) (i32.lt_s (i32.const -1) (get_local $y)))
+  (func (export "lt_s705") (result i32) (i32.lt_s (i32.const 1) (i32.const 0)))
+  (func (export "lt_s706") (param $x i32) (result i32) (i32.lt_s (get_local $x) (i32.const 0)))
+  (func (export "lt_s707") (param $y i32) (result i32) (i32.lt_s (i32.const 1) (get_local $y)))
+  (func (export "lt_s708") (result i32) (i32.lt_s (i32.const 0) (i32.const 1)))
+  (func (export "lt_s709") (param $x i32) (result i32) (i32.lt_s (get_local $x) (i32.const 1)))
+  (func (export "lt_s710") (param $y i32) (result i32) (i32.lt_s (i32.const 0) (get_local $y)))
+  (func (export "lt_s711") (result i32) (i32.lt_s (i32.const 0x80000000) (i32.const 0)))
+  (func (export "lt_s712") (param $x i32) (result i32) (i32.lt_s (get_local $x) (i32.const 0)))
+  (func (export "lt_s713") (param $y i32) (result i32) (i32.lt_s (i32.const 0x80000000) (get_local $y)))
+  (func (export "lt_s714") (result i32) (i32.lt_s (i32.const 0) (i32.const 0x80000000)))
+  (func (export "lt_s715") (param $x i32) (result i32) (i32.lt_s (get_local $x) (i32.const 0x80000000)))
+  (func (export "lt_s716") (param $y i32) (result i32) (i32.lt_s (i32.const 0) (get_local $y)))
+  (func (export "lt_s717") (result i32) (i32.lt_s (i32.const 0x80000000) (i32.const -1)))
+  (func (export "lt_s718") (param $x i32) (result i32) (i32.lt_s (get_local $x) (i32.const -1)))
+  (func (export "lt_s719") (param $y i32) (result i32) (i32.lt_s (i32.const 0x80000000) (get_local $y)))
+  (func (export "lt_s720") (result i32) (i32.lt_s (i32.const -1) (i32.const 0x80000000)))
+  (func (export "lt_s721") (param $x i32) (result i32) (i32.lt_s (get_local $x) (i32.const 0x80000000)))
+  (func (export "lt_s722") (param $y i32) (result i32) (i32.lt_s (i32.const -1) (get_local $y)))
+  (func (export "lt_s723") (result i32) (i32.lt_s (i32.const 0x80000000) (i32.const 0x7fffffff)))
+  (func (export "lt_s724") (param $x i32) (result i32) (i32.lt_s (get_local $x) (i32.const 0x7fffffff)))
+  (func (export "lt_s725") (param $y i32) (result i32) (i32.lt_s (i32.const 0x80000000) (get_local $y)))
+  (func (export "lt_s726") (result i32) (i32.lt_s (i32.const 0x7fffffff) (i32.const 0x80000000)))
+  (func (export "lt_s727") (param $x i32) (result i32) (i32.lt_s (get_local $x) (i32.const 0x80000000)))
+  (func (export "lt_s728") (param $y i32) (result i32) (i32.lt_s (i32.const 0x7fffffff) (get_local $y)))
+  (func (export "lt_u729") (result i32) (i32.lt_u (i32.const 0) (i32.const 0)))
+  (func (export "lt_u730") (param $x i32) (result i32) (i32.lt_u (get_local $x) (i32.const 0)))
+  (func (export "lt_u731") (param $y i32) (result i32) (i32.lt_u (i32.const 0) (get_local $y)))
+  (func (export "lt_u732") (result i32) (i32.lt_u (i32.const 1) (i32.const 1)))
+  (func (export "lt_u733") (param $x i32) (result i32) (i32.lt_u (get_local $x) (i32.const 1)))
+  (func (export "lt_u734") (param $y i32) (result i32) (i32.lt_u (i32.const 1) (get_local $y)))
+  (func (export "lt_u735") (result i32) (i32.lt_u (i32.const -1) (i32.const 1)))
+  (func (export "lt_u736") (param $x i32) (result i32) (i32.lt_u (get_local $x) (i32.const 1)))
+  (func (export "lt_u737") (param $y i32) (result i32) (i32.lt_u (i32.const -1) (get_local $y)))
+  (func (export "lt_u738") (result i32) (i32.lt_u (i32.const 0x80000000) (i32.const 0x80000000)))
+  (func (export "lt_u739") (param $x i32) (result i32) (i32.lt_u (get_local $x) (i32.const 0x80000000)))
+  (func (export "lt_u740") (param $y i32) (result i32) (i32.lt_u (i32.const 0x80000000) (get_local $y)))
+  (func (export "lt_u741") (result i32) (i32.lt_u (i32.const 0x7fffffff) (i32.const 0x7fffffff)))
+  (func (export "lt_u742") (param $x i32) (result i32) (i32.lt_u (get_local $x) (i32.const 0x7fffffff)))
+  (func (export "lt_u743") (param $y i32) (result i32) (i32.lt_u (i32.const 0x7fffffff) (get_local $y)))
+  (func (export "lt_u744") (result i32) (i32.lt_u (i32.const -1) (i32.const -1)))
+  (func (export "lt_u745") (param $x i32) (result i32) (i32.lt_u (get_local $x) (i32.const -1)))
+  (func (export "lt_u746") (param $y i32) (result i32) (i32.lt_u (i32.const -1) (get_local $y)))
+  (func (export "lt_u747") (result i32) (i32.lt_u (i32.const 1) (i32.const 0)))
+  (func (export "lt_u748") (param $x i32) (result i32) (i32.lt_u (get_local $x) (i32.const 0)))
+  (func (export "lt_u749") (param $y i32) (result i32) (i32.lt_u (i32.const 1) (get_local $y)))
+  (func (export "lt_u750") (result i32) (i32.lt_u (i32.const 0) (i32.const 1)))
+  (func (export "lt_u751") (param $x i32) (result i32) (i32.lt_u (get_local $x) (i32.const 1)))
+  (func (export "lt_u752") (param $y i32) (result i32) (i32.lt_u (i32.const 0) (get_local $y)))
+  (func (export "lt_u753") (result i32) (i32.lt_u (i32.const 0x80000000) (i32.const 0)))
+  (func (export "lt_u754") (param $x i32) (result i32) (i32.lt_u (get_local $x) (i32.const 0)))
+  (func (export "lt_u755") (param $y i32) (result i32) (i32.lt_u (i32.const 0x80000000) (get_local $y)))
+  (func (export "lt_u756") (result i32) (i32.lt_u (i32.const 0) (i32.const 0x80000000)))
+  (func (export "lt_u757") (param $x i32) (result i32) (i32.lt_u (get_local $x) (i32.const 0x80000000)))
+  (func (export "lt_u758") (param $y i32) (result i32) (i32.lt_u (i32.const 0) (get_local $y)))
+  (func (export "lt_u759") (result i32) (i32.lt_u (i32.const 0x80000000) (i32.const -1)))
+  (func (export "lt_u760") (param $x i32) (result i32) (i32.lt_u (get_local $x) (i32.const -1)))
+  (func (export "lt_u761") (param $y i32) (result i32) (i32.lt_u (i32.const 0x80000000) (get_local $y)))
+  (func (export "lt_u762") (result i32) (i32.lt_u (i32.const -1) (i32.const 0x80000000)))
+  (func (export "lt_u763") (param $x i32) (result i32) (i32.lt_u (get_local $x) (i32.const 0x80000000)))
+  (func (export "lt_u764") (param $y i32) (result i32) (i32.lt_u (i32.const -1) (get_local $y)))
+  (func (export "lt_u765") (result i32) (i32.lt_u (i32.const 0x80000000) (i32.const 0x7fffffff)))
+  (func (export "lt_u766") (param $x i32) (result i32) (i32.lt_u (get_local $x) (i32.const 0x7fffffff)))
+  (func (export "lt_u767") (param $y i32) (result i32) (i32.lt_u (i32.const 0x80000000) (get_local $y)))
+  (func (export "lt_u768") (result i32) (i32.lt_u (i32.const 0x7fffffff) (i32.const 0x80000000)))
+  (func (export "lt_u769") (param $x i32) (result i32) (i32.lt_u (get_local $x) (i32.const 0x80000000)))
+  (func (export "lt_u770") (param $y i32) (result i32) (i32.lt_u (i32.const 0x7fffffff) (get_local $y)))
+  (func (export "le_s771") (result i32) (i32.le_s (i32.const 0) (i32.const 0)))
+  (func (export "le_s772") (param $x i32) (result i32) (i32.le_s (get_local $x) (i32.const 0)))
+  (func (export "le_s773") (param $y i32) (result i32) (i32.le_s (i32.const 0) (get_local $y)))
+  (func (export "le_s774") (result i32) (i32.le_s (i32.const 1) (i32.const 1)))
+  (func (export "le_s775") (param $x i32) (result i32) (i32.le_s (get_local $x) (i32.const 1)))
+  (func (export "le_s776") (param $y i32) (result i32) (i32.le_s (i32.const 1) (get_local $y)))
+  (func (export "le_s777") (result i32) (i32.le_s (i32.const -1) (i32.const 1)))
+  (func (export "le_s778") (param $x i32) (result i32) (i32.le_s (get_local $x) (i32.const 1)))
+  (func (export "le_s779") (param $y i32) (result i32) (i32.le_s (i32.const -1) (get_local $y)))
+  (func (export "le_s780") (result i32) (i32.le_s (i32.const 0x80000000) (i32.const 0x80000000)))
+  (func (export "le_s781") (param $x i32) (result i32) (i32.le_s (get_local $x) (i32.const 0x80000000)))
+  (func (export "le_s782") (param $y i32) (result i32) (i32.le_s (i32.const 0x80000000) (get_local $y)))
+  (func (export "le_s783") (result i32) (i32.le_s (i32.const 0x7fffffff) (i32.const 0x7fffffff)))
+  (func (export "le_s784") (param $x i32) (result i32) (i32.le_s (get_local $x) (i32.const 0x7fffffff)))
+  (func (export "le_s785") (param $y i32) (result i32) (i32.le_s (i32.const 0x7fffffff) (get_local $y)))
+  (func (export "le_s786") (result i32) (i32.le_s (i32.const -1) (i32.const -1)))
+  (func (export "le_s787") (param $x i32) (result i32) (i32.le_s (get_local $x) (i32.const -1)))
+  (func (export "le_s788") (param $y i32) (result i32) (i32.le_s (i32.const -1) (get_local $y)))
+  (func (export "le_s789") (result i32) (i32.le_s (i32.const 1) (i32.const 0)))
+  (func (export "le_s790") (param $x i32) (result i32) (i32.le_s (get_local $x) (i32.const 0)))
+  (func (export "le_s791") (param $y i32) (result i32) (i32.le_s (i32.const 1) (get_local $y)))
+  (func (export "le_s792") (result i32) (i32.le_s (i32.const 0) (i32.const 1)))
+  (func (export "le_s793") (param $x i32) (result i32) (i32.le_s (get_local $x) (i32.const 1)))
+  (func (export "le_s794") (param $y i32) (result i32) (i32.le_s (i32.const 0) (get_local $y)))
+  (func (export "le_s795") (result i32) (i32.le_s (i32.const 0x80000000) (i32.const 0)))
+  (func (export "le_s796") (param $x i32) (result i32) (i32.le_s (get_local $x) (i32.const 0)))
+  (func (export "le_s797") (param $y i32) (result i32) (i32.le_s (i32.const 0x80000000) (get_local $y)))
+  (func (export "le_s798") (result i32) (i32.le_s (i32.const 0) (i32.const 0x80000000)))
+  (func (export "le_s799") (param $x i32) (result i32) (i32.le_s (get_local $x) (i32.const 0x80000000)))
+  (func (export "le_s800") (param $y i32) (result i32) (i32.le_s (i32.const 0) (get_local $y)))
+  (func (export "le_s801") (result i32) (i32.le_s (i32.const 0x80000000) (i32.const -1)))
+  (func (export "le_s802") (param $x i32) (result i32) (i32.le_s (get_local $x) (i32.const -1)))
+  (func (export "le_s803") (param $y i32) (result i32) (i32.le_s (i32.const 0x80000000) (get_local $y)))
+  (func (export "le_s804") (result i32) (i32.le_s (i32.const -1) (i32.const 0x80000000)))
+  (func (export "le_s805") (param $x i32) (result i32) (i32.le_s (get_local $x) (i32.const 0x80000000)))
+  (func (export "le_s806") (param $y i32) (result i32) (i32.le_s (i32.const -1) (get_local $y)))
+  (func (export "le_s807") (result i32) (i32.le_s (i32.const 0x80000000) (i32.const 0x7fffffff)))
+  (func (export "le_s808") (param $x i32) (result i32) (i32.le_s (get_local $x) (i32.const 0x7fffffff)))
+  (func (export "le_s809") (param $y i32) (result i32) (i32.le_s (i32.const 0x80000000) (get_local $y)))
+  (func (export "le_s810") (result i32) (i32.le_s (i32.const 0x7fffffff) (i32.const 0x80000000)))
+  (func (export "le_s811") (param $x i32) (result i32) (i32.le_s (get_local $x) (i32.const 0x80000000)))
+  (func (export "le_s812") (param $y i32) (result i32) (i32.le_s (i32.const 0x7fffffff) (get_local $y)))
+  (func (export "le_u813") (result i32) (i32.le_u (i32.const 0) (i32.const 0)))
+  (func (export "le_u814") (param $x i32) (result i32) (i32.le_u (get_local $x) (i32.const 0)))
+  (func (export "le_u815") (param $y i32) (result i32) (i32.le_u (i32.const 0) (get_local $y)))
+  (func (export "le_u816") (result i32) (i32.le_u (i32.const 1) (i32.const 1)))
+  (func (export "le_u817") (param $x i32) (result i32) (i32.le_u (get_local $x) (i32.const 1)))
+  (func (export "le_u818") (param $y i32) (result i32) (i32.le_u (i32.const 1) (get_local $y)))
+  (func (export "le_u819") (result i32) (i32.le_u (i32.const -1) (i32.const 1)))
+  (func (export "le_u820") (param $x i32) (result i32) (i32.le_u (get_local $x) (i32.const 1)))
+  (func (export "le_u821") (param $y i32) (result i32) (i32.le_u (i32.const -1) (get_local $y)))
+  (func (export "le_u822") (result i32) (i32.le_u (i32.const 0x80000000) (i32.const 0x80000000)))
+  (func (export "le_u823") (param $x i32) (result i32) (i32.le_u (get_local $x) (i32.const 0x80000000)))
+  (func (export "le_u824") (param $y i32) (result i32) (i32.le_u (i32.const 0x80000000) (get_local $y)))
+  (func (export "le_u825") (result i32) (i32.le_u (i32.const 0x7fffffff) (i32.const 0x7fffffff)))
+  (func (export "le_u826") (param $x i32) (result i32) (i32.le_u (get_local $x) (i32.const 0x7fffffff)))
+  (func (export "le_u827") (param $y i32) (result i32) (i32.le_u (i32.const 0x7fffffff) (get_local $y)))
+  (func (export "le_u828") (result i32) (i32.le_u (i32.const -1) (i32.const -1)))
+  (func (export "le_u829") (param $x i32) (result i32) (i32.le_u (get_local $x) (i32.const -1)))
+  (func (export "le_u830") (param $y i32) (result i32) (i32.le_u (i32.const -1) (get_local $y)))
+  (func (export "le_u831") (result i32) (i32.le_u (i32.const 1) (i32.const 0)))
+  (func (export "le_u832") (param $x i32) (result i32) (i32.le_u (get_local $x) (i32.const 0)))
+  (func (export "le_u833") (param $y i32) (result i32) (i32.le_u (i32.const 1) (get_local $y)))
+  (func (export "le_u834") (result i32) (i32.le_u (i32.const 0) (i32.const 1)))
+  (func (export "le_u835") (param $x i32) (result i32) (i32.le_u (get_local $x) (i32.const 1)))
+  (func (export "le_u836") (param $y i32) (result i32) (i32.le_u (i32.const 0) (get_local $y)))
+  (func (export "le_u837") (result i32) (i32.le_u (i32.const 0x80000000) (i32.const 0)))
+  (func (export "le_u838") (param $x i32) (result i32) (i32.le_u (get_local $x) (i32.const 0)))
+  (func (export "le_u839") (param $y i32) (result i32) (i32.le_u (i32.const 0x80000000) (get_local $y)))
+  (func (export "le_u840") (result i32) (i32.le_u (i32.const 0) (i32.const 0x80000000)))
+  (func (export "le_u841") (param $x i32) (result i32) (i32.le_u (get_local $x) (i32.const 0x80000000)))
+  (func (export "le_u842") (param $y i32) (result i32) (i32.le_u (i32.const 0) (get_local $y)))
+  (func (export "le_u843") (result i32) (i32.le_u (i32.const 0x80000000) (i32.const -1)))
+  (func (export "le_u844") (param $x i32) (result i32) (i32.le_u (get_local $x) (i32.const -1)))
+  (func (export "le_u845") (param $y i32) (result i32) (i32.le_u (i32.const 0x80000000) (get_local $y)))
+  (func (export "le_u846") (result i32) (i32.le_u (i32.const -1) (i32.const 0x80000000)))
+  (func (export "le_u847") (param $x i32) (result i32) (i32.le_u (get_local $x) (i32.const 0x80000000)))
+  (func (export "le_u848") (param $y i32) (result i32) (i32.le_u (i32.const -1) (get_local $y)))
+  (func (export "le_u849") (result i32) (i32.le_u (i32.const 0x80000000) (i32.const 0x7fffffff)))
+  (func (export "le_u850") (param $x i32) (result i32) (i32.le_u (get_local $x) (i32.const 0x7fffffff)))
+  (func (export "le_u851") (param $y i32) (result i32) (i32.le_u (i32.const 0x80000000) (get_local $y)))
+  (func (export "le_u852") (result i32) (i32.le_u (i32.const 0x7fffffff) (i32.const 0x80000000)))
+  (func (export "le_u853") (param $x i32) (result i32) (i32.le_u (get_local $x) (i32.const 0x80000000)))
+  (func (export "le_u854") (param $y i32) (result i32) (i32.le_u (i32.const 0x7fffffff) (get_local $y)))
+  (func (export "gt_s855") (result i32) (i32.gt_s (i32.const 0) (i32.const 0)))
+  (func (export "gt_s856") (param $x i32) (result i32) (i32.gt_s (get_local $x) (i32.const 0)))
+  (func (export "gt_s857") (param $y i32) (result i32) (i32.gt_s (i32.const 0) (get_local $y)))
+  (func (export "gt_s858") (result i32) (i32.gt_s (i32.const 1) (i32.const 1)))
+  (func (export "gt_s859") (param $x i32) (result i32) (i32.gt_s (get_local $x) (i32.const 1)))
+  (func (export "gt_s860") (param $y i32) (result i32) (i32.gt_s (i32.const 1) (get_local $y)))
+  (func (export "gt_s861") (result i32) (i32.gt_s (i32.const -1) (i32.const 1)))
+  (func (export "gt_s862") (param $x i32) (result i32) (i32.gt_s (get_local $x) (i32.const 1)))
+  (func (export "gt_s863") (param $y i32) (result i32) (i32.gt_s (i32.const -1) (get_local $y)))
+  (func (export "gt_s864") (result i32) (i32.gt_s (i32.const 0x80000000) (i32.const 0x80000000)))
+  (func (export "gt_s865") (param $x i32) (result i32) (i32.gt_s (get_local $x) (i32.const 0x80000000)))
+  (func (export "gt_s866") (param $y i32) (result i32) (i32.gt_s (i32.const 0x80000000) (get_local $y)))
+  (func (export "gt_s867") (result i32) (i32.gt_s (i32.const 0x7fffffff) (i32.const 0x7fffffff)))
+  (func (export "gt_s868") (param $x i32) (result i32) (i32.gt_s (get_local $x) (i32.const 0x7fffffff)))
+  (func (export "gt_s869") (param $y i32) (result i32) (i32.gt_s (i32.const 0x7fffffff) (get_local $y)))
+  (func (export "gt_s870") (result i32) (i32.gt_s (i32.const -1) (i32.const -1)))
+  (func (export "gt_s871") (param $x i32) (result i32) (i32.gt_s (get_local $x) (i32.const -1)))
+  (func (export "gt_s872") (param $y i32) (result i32) (i32.gt_s (i32.const -1) (get_local $y)))
+  (func (export "gt_s873") (result i32) (i32.gt_s (i32.const 1) (i32.const 0)))
+  (func (export "gt_s874") (param $x i32) (result i32) (i32.gt_s (get_local $x) (i32.const 0)))
+  (func (export "gt_s875") (param $y i32) (result i32) (i32.gt_s (i32.const 1) (get_local $y)))
+  (func (export "gt_s876") (result i32) (i32.gt_s (i32.const 0) (i32.const 1)))
+  (func (export "gt_s877") (param $x i32) (result i32) (i32.gt_s (get_local $x) (i32.const 1)))
+  (func (export "gt_s878") (param $y i32) (result i32) (i32.gt_s (i32.const 0) (get_local $y)))
+  (func (export "gt_s879") (result i32) (i32.gt_s (i32.const 0x80000000) (i32.const 0)))
+  (func (export "gt_s880") (param $x i32) (result i32) (i32.gt_s (get_local $x) (i32.const 0)))
+  (func (export "gt_s881") (param $y i32) (result i32) (i32.gt_s (i32.const 0x80000000) (get_local $y)))
+  (func (export "gt_s882") (result i32) (i32.gt_s (i32.const 0) (i32.const 0x80000000)))
+  (func (export "gt_s883") (param $x i32) (result i32) (i32.gt_s (get_local $x) (i32.const 0x80000000)))
+  (func (export "gt_s884") (param $y i32) (result i32) (i32.gt_s (i32.const 0) (get_local $y)))
+  (func (export "gt_s885") (result i32) (i32.gt_s (i32.const 0x80000000) (i32.const -1)))
+  (func (export "gt_s886") (param $x i32) (result i32) (i32.gt_s (get_local $x) (i32.const -1)))
+  (func (export "gt_s887") (param $y i32) (result i32) (i32.gt_s (i32.const 0x80000000) (get_local $y)))
+  (func (export "gt_s888") (result i32) (i32.gt_s (i32.const -1) (i32.const 0x80000000)))
+  (func (export "gt_s889") (param $x i32) (result i32) (i32.gt_s (get_local $x) (i32.const 0x80000000)))
+  (func (export "gt_s890") (param $y i32) (result i32) (i32.gt_s (i32.const -1) (get_local $y)))
+  (func (export "gt_s891") (result i32) (i32.gt_s (i32.const 0x80000000) (i32.const 0x7fffffff)))
+  (func (export "gt_s892") (param $x i32) (result i32) (i32.gt_s (get_local $x) (i32.const 0x7fffffff)))
+  (func (export "gt_s893") (param $y i32) (result i32) (i32.gt_s (i32.const 0x80000000) (get_local $y)))
+  (func (export "gt_s894") (result i32) (i32.gt_s (i32.const 0x7fffffff) (i32.const 0x80000000)))
+  (func (export "gt_s895") (param $x i32) (result i32) (i32.gt_s (get_local $x) (i32.const 0x80000000)))
+  (func (export "gt_s896") (param $y i32) (result i32) (i32.gt_s (i32.const 0x7fffffff) (get_local $y)))
+  (func (export "gt_u897") (result i32) (i32.gt_u (i32.const 0) (i32.const 0)))
+  (func (export "gt_u898") (param $x i32) (result i32) (i32.gt_u (get_local $x) (i32.const 0)))
+  (func (export "gt_u899") (param $y i32) (result i32) (i32.gt_u (i32.const 0) (get_local $y)))
+  (func (export "gt_u900") (result i32) (i32.gt_u (i32.const 1) (i32.const 1)))
+  (func (export "gt_u901") (param $x i32) (result i32) (i32.gt_u (get_local $x) (i32.const 1)))
+  (func (export "gt_u902") (param $y i32) (result i32) (i32.gt_u (i32.const 1) (get_local $y)))
+  (func (export "gt_u903") (result i32) (i32.gt_u (i32.const -1) (i32.const 1)))
+  (func (export "gt_u904") (param $x i32) (result i32) (i32.gt_u (get_local $x) (i32.const 1)))
+  (func (export "gt_u905") (param $y i32) (result i32) (i32.gt_u (i32.const -1) (get_local $y)))
+  (func (export "gt_u906") (result i32) (i32.gt_u (i32.const 0x80000000) (i32.const 0x80000000)))
+  (func (export "gt_u907") (param $x i32) (result i32) (i32.gt_u (get_local $x) (i32.const 0x80000000)))
+  (func (export "gt_u908") (param $y i32) (result i32) (i32.gt_u (i32.const 0x80000000) (get_local $y)))
+  (func (export "gt_u909") (result i32) (i32.gt_u (i32.const 0x7fffffff) (i32.const 0x7fffffff)))
+  (func (export "gt_u910") (param $x i32) (result i32) (i32.gt_u (get_local $x) (i32.const 0x7fffffff)))
+  (func (export "gt_u911") (param $y i32) (result i32) (i32.gt_u (i32.const 0x7fffffff) (get_local $y)))
+  (func (export "gt_u912") (result i32) (i32.gt_u (i32.const -1) (i32.const -1)))
+  (func (export "gt_u913") (param $x i32) (result i32) (i32.gt_u (get_local $x) (i32.const -1)))
+  (func (export "gt_u914") (param $y i32) (result i32) (i32.gt_u (i32.const -1) (get_local $y)))
+  (func (export "gt_u915") (result i32) (i32.gt_u (i32.const 1) (i32.const 0)))
+  (func (export "gt_u916") (param $x i32) (result i32) (i32.gt_u (get_local $x) (i32.const 0)))
+  (func (export "gt_u917") (param $y i32) (result i32) (i32.gt_u (i32.const 1) (get_local $y)))
+  (func (export "gt_u918") (result i32) (i32.gt_u (i32.const 0) (i32.const 1)))
+  (func (export "gt_u919") (param $x i32) (result i32) (i32.gt_u (get_local $x) (i32.const 1)))
+  (func (export "gt_u920") (param $y i32) (result i32) (i32.gt_u (i32.const 0) (get_local $y)))
+  (func (export "gt_u921") (result i32) (i32.gt_u (i32.const 0x80000000) (i32.const 0)))
+  (func (export "gt_u922") (param $x i32) (result i32) (i32.gt_u (get_local $x) (i32.const 0)))
+  (func (export "gt_u923") (param $y i32) (result i32) (i32.gt_u (i32.const 0x80000000) (get_local $y)))
+  (func (export "gt_u924") (result i32) (i32.gt_u (i32.const 0) (i32.const 0x80000000)))
+  (func (export "gt_u925") (param $x i32) (result i32) (i32.gt_u (get_local $x) (i32.const 0x80000000)))
+  (func (export "gt_u926") (param $y i32) (result i32) (i32.gt_u (i32.const 0) (get_local $y)))
+  (func (export "gt_u927") (result i32) (i32.gt_u (i32.const 0x80000000) (i32.const -1)))
+  (func (export "gt_u928") (param $x i32) (result i32) (i32.gt_u (get_local $x) (i32.const -1)))
+  (func (export "gt_u929") (param $y i32) (result i32) (i32.gt_u (i32.const 0x80000000) (get_local $y)))
+  (func (export "gt_u930") (result i32) (i32.gt_u (i32.const -1) (i32.const 0x80000000)))
+  (func (export "gt_u931") (param $x i32) (result i32) (i32.gt_u (get_local $x) (i32.const 0x80000000)))
+  (func (export "gt_u932") (param $y i32) (result i32) (i32.gt_u (i32.const -1) (get_local $y)))
+  (func (export "gt_u933") (result i32) (i32.gt_u (i32.const 0x80000000) (i32.const 0x7fffffff)))
+  (func (export "gt_u934") (param $x i32) (result i32) (i32.gt_u (get_local $x) (i32.const 0x7fffffff)))
+  (func (export "gt_u935") (param $y i32) (result i32) (i32.gt_u (i32.const 0x80000000) (get_local $y)))
+  (func (export "gt_u936") (result i32) (i32.gt_u (i32.const 0x7fffffff) (i32.const 0x80000000)))
+  (func (export "gt_u937") (param $x i32) (result i32) (i32.gt_u (get_local $x) (i32.const 0x80000000)))
+  (func (export "gt_u938") (param $y i32) (result i32) (i32.gt_u (i32.const 0x7fffffff) (get_local $y)))
+  (func (export "ge_s939") (result i32) (i32.ge_s (i32.const 0) (i32.const 0)))
+  (func (export "ge_s940") (param $x i32) (result i32) (i32.ge_s (get_local $x) (i32.const 0)))
+  (func (export "ge_s941") (param $y i32) (result i32) (i32.ge_s (i32.const 0) (get_local $y)))
+  (func (export "ge_s942") (result i32) (i32.ge_s (i32.const 1) (i32.const 1)))
+  (func (export "ge_s943") (param $x i32) (result i32) (i32.ge_s (get_local $x) (i32.const 1)))
+  (func (export "ge_s944") (param $y i32) (result i32) (i32.ge_s (i32.const 1) (get_local $y)))
+  (func (export "ge_s945") (result i32) (i32.ge_s (i32.const -1) (i32.const 1)))
+  (func (export "ge_s946") (param $x i32) (result i32) (i32.ge_s (get_local $x) (i32.const 1)))
+  (func (export "ge_s947") (param $y i32) (result i32) (i32.ge_s (i32.const -1) (get_local $y)))
+  (func (export "ge_s948") (result i32) (i32.ge_s (i32.const 0x80000000) (i32.const 0x80000000)))
+  (func (export "ge_s949") (param $x i32) (result i32) (i32.ge_s (get_local $x) (i32.const 0x80000000)))
+  (func (export "ge_s950") (param $y i32) (result i32) (i32.ge_s (i32.const 0x80000000) (get_local $y)))
+  (func (export "ge_s951") (result i32) (i32.ge_s (i32.const 0x7fffffff) (i32.const 0x7fffffff)))
+  (func (export "ge_s952") (param $x i32) (result i32) (i32.ge_s (get_local $x) (i32.const 0x7fffffff)))
+  (func (export "ge_s953") (param $y i32) (result i32) (i32.ge_s (i32.const 0x7fffffff) (get_local $y)))
+  (func (export "ge_s954") (result i32) (i32.ge_s (i32.const -1) (i32.const -1)))
+  (func (export "ge_s955") (param $x i32) (result i32) (i32.ge_s (get_local $x) (i32.const -1)))
+  (func (export "ge_s956") (param $y i32) (result i32) (i32.ge_s (i32.const -1) (get_local $y)))
+  (func (export "ge_s957") (result i32) (i32.ge_s (i32.const 1) (i32.const 0)))
+  (func (export "ge_s958") (param $x i32) (result i32) (i32.ge_s (get_local $x) (i32.const 0)))
+  (func (export "ge_s959") (param $y i32) (result i32) (i32.ge_s (i32.const 1) (get_local $y)))
+  (func (export "ge_s960") (result i32) (i32.ge_s (i32.const 0) (i32.const 1)))
+  (func (export "ge_s961") (param $x i32) (result i32) (i32.ge_s (get_local $x) (i32.const 1)))
+  (func (export "ge_s962") (param $y i32) (result i32) (i32.ge_s (i32.const 0) (get_local $y)))
+  (func (export "ge_s963") (result i32) (i32.ge_s (i32.const 0x80000000) (i32.const 0)))
+  (func (export "ge_s964") (param $x i32) (result i32) (i32.ge_s (get_local $x) (i32.const 0)))
+  (func (export "ge_s965") (param $y i32) (result i32) (i32.ge_s (i32.const 0x80000000) (get_local $y)))
+  (func (export "ge_s966") (result i32) (i32.ge_s (i32.const 0) (i32.const 0x80000000)))
+  (func (export "ge_s967") (param $x i32) (result i32) (i32.ge_s (get_local $x) (i32.const 0x80000000)))
+  (func (export "ge_s968") (param $y i32) (result i32) (i32.ge_s (i32.const 0) (get_local $y)))
+  (func (export "ge_s969") (result i32) (i32.ge_s (i32.const 0x80000000) (i32.const -1)))
+  (func (export "ge_s970") (param $x i32) (result i32) (i32.ge_s (get_local $x) (i32.const -1)))
+  (func (export "ge_s971") (param $y i32) (result i32) (i32.ge_s (i32.const 0x80000000) (get_local $y)))
+  (func (export "ge_s972") (result i32) (i32.ge_s (i32.const -1) (i32.const 0x80000000)))
+  (func (export "ge_s973") (param $x i32) (result i32) (i32.ge_s (get_local $x) (i32.const 0x80000000)))
+  (func (export "ge_s974") (param $y i32) (result i32) (i32.ge_s (i32.const -1) (get_local $y)))
+  (func (export "ge_s975") (result i32) (i32.ge_s (i32.const 0x80000000) (i32.const 0x7fffffff)))
+  (func (export "ge_s976") (param $x i32) (result i32) (i32.ge_s (get_local $x) (i32.const 0x7fffffff)))
+  (func (export "ge_s977") (param $y i32) (result i32) (i32.ge_s (i32.const 0x80000000) (get_local $y)))
+  (func (export "ge_s978") (result i32) (i32.ge_s (i32.const 0x7fffffff) (i32.const 0x80000000)))
+  (func (export "ge_s979") (param $x i32) (result i32) (i32.ge_s (get_local $x) (i32.const 0x80000000)))
+  (func (export "ge_s980") (param $y i32) (result i32) (i32.ge_s (i32.const 0x7fffffff) (get_local $y)))
+  (func (export "ge_u981") (result i32) (i32.ge_u (i32.const 0) (i32.const 0)))
+  (func (export "ge_u982") (param $x i32) (result i32) (i32.ge_u (get_local $x) (i32.const 0)))
+  (func (export "ge_u983") (param $y i32) (result i32) (i32.ge_u (i32.const 0) (get_local $y)))
+  (func (export "ge_u984") (result i32) (i32.ge_u (i32.const 1) (i32.const 1)))
+  (func (export "ge_u985") (param $x i32) (result i32) (i32.ge_u (get_local $x) (i32.const 1)))
+  (func (export "ge_u986") (param $y i32) (result i32) (i32.ge_u (i32.const 1) (get_local $y)))
+  (func (export "ge_u987") (result i32) (i32.ge_u (i32.const -1) (i32.const 1)))
+  (func (export "ge_u988") (param $x i32) (result i32) (i32.ge_u (get_local $x) (i32.const 1)))
+  (func (export "ge_u989") (param $y i32) (result i32) (i32.ge_u (i32.const -1) (get_local $y)))
+  (func (export "ge_u990") (result i32) (i32.ge_u (i32.const 0x80000000) (i32.const 0x80000000)))
+  (func (export "ge_u991") (param $x i32) (result i32) (i32.ge_u (get_local $x) (i32.const 0x80000000)))
+  (func (export "ge_u992") (param $y i32) (result i32) (i32.ge_u (i32.const 0x80000000) (get_local $y)))
+  (func (export "ge_u993") (result i32) (i32.ge_u (i32.const 0x7fffffff) (i32.const 0x7fffffff)))
+  (func (export "ge_u994") (param $x i32) (result i32) (i32.ge_u (get_local $x) (i32.const 0x7fffffff)))
+  (func (export "ge_u995") (param $y i32) (result i32) (i32.ge_u (i32.const 0x7fffffff) (get_local $y)))
+  (func (export "ge_u996") (result i32) (i32.ge_u (i32.const -1) (i32.const -1)))
+  (func (export "ge_u997") (param $x i32) (result i32) (i32.ge_u (get_local $x) (i32.const -1)))
+  (func (export "ge_u998") (param $y i32) (result i32) (i32.ge_u (i32.const -1) (get_local $y)))
+  (func (export "ge_u999") (result i32) (i32.ge_u (i32.const 1) (i32.const 0)))
+  (func (export "ge_u1000") (param $x i32) (result i32) (i32.ge_u (get_local $x) (i32.const 0)))
+  (func (export "ge_u1001") (param $y i32) (result i32) (i32.ge_u (i32.const 1) (get_local $y)))
+  (func (export "ge_u1002") (result i32) (i32.ge_u (i32.const 0) (i32.const 1)))
+  (func (export "ge_u1003") (param $x i32) (result i32) (i32.ge_u (get_local $x) (i32.const 1)))
+  (func (export "ge_u1004") (param $y i32) (result i32) (i32.ge_u (i32.const 0) (get_local $y)))
+  (func (export "ge_u1005") (result i32) (i32.ge_u (i32.const 0x80000000) (i32.const 0)))
+  (func (export "ge_u1006") (param $x i32) (result i32) (i32.ge_u (get_local $x) (i32.const 0)))
+  (func (export "ge_u1007") (param $y i32) (result i32) (i32.ge_u (i32.const 0x80000000) (get_local $y)))
+  (func (export "ge_u1008") (result i32) (i32.ge_u (i32.const 0) (i32.const 0x80000000)))
+  (func (export "ge_u1009") (param $x i32) (result i32) (i32.ge_u (get_local $x) (i32.const 0x80000000)))
+  (func (export "ge_u1010") (param $y i32) (result i32) (i32.ge_u (i32.const 0) (get_local $y)))
+  (func (export "ge_u1011") (result i32) (i32.ge_u (i32.const 0x80000000) (i32.const -1)))
+  (func (export "ge_u1012") (param $x i32) (result i32) (i32.ge_u (get_local $x) (i32.const -1)))
+  (func (export "ge_u1013") (param $y i32) (result i32) (i32.ge_u (i32.const 0x80000000) (get_local $y)))
+  (func (export "ge_u1014") (result i32) (i32.ge_u (i32.const -1) (i32.const 0x80000000)))
+  (func (export "ge_u1015") (param $x i32) (result i32) (i32.ge_u (get_local $x) (i32.const 0x80000000)))
+  (func (export "ge_u1016") (param $y i32) (result i32) (i32.ge_u (i32.const -1) (get_local $y)))
+  (func (export "ge_u1017") (result i32) (i32.ge_u (i32.const 0x80000000) (i32.const 0x7fffffff)))
+  (func (export "ge_u1018") (param $x i32) (result i32) (i32.ge_u (get_local $x) (i32.const 0x7fffffff)))
+  (func (export "ge_u1019") (param $y i32) (result i32) (i32.ge_u (i32.const 0x80000000) (get_local $y)))
+  (func (export "ge_u1020") (result i32) (i32.ge_u (i32.const 0x7fffffff) (i32.const 0x80000000)))
+  (func (export "ge_u1021") (param $x i32) (result i32) (i32.ge_u (get_local $x) (i32.const 0x80000000)))
+  (func (export "ge_u1022") (param $y i32) (result i32) (i32.ge_u (i32.const 0x7fffffff) (get_local $y)))
 )
 
 (assert_return (invoke "add0") (i32.const 2))
@@ -1050,908 +1099,957 @@
 (assert_return (invoke "mul66") (i32.const 0x358e7470))
 (assert_return (invoke "mul67" (i32.const 0x01234567)) (i32.const 0x358e7470))
 (assert_return (invoke "mul68" (i32.const 0x76543210)) (i32.const 0x358e7470))
-(assert_trap (invoke "div_s69") "integer divide by zero")
-(assert_trap (invoke "div_s70" (i32.const 1)) "integer divide by zero")
-(assert_trap (invoke "div_s71" (i32.const 0)) "integer divide by zero")
+(assert_return (invoke "mul69") (i32.const 1))
+(assert_return (invoke "mul70" (i32.const 0x7fffffff)) (i32.const 1))
+(assert_return (invoke "mul71" (i32.const 0x7fffffff)) (i32.const 1))
 (assert_trap (invoke "div_s72") "integer divide by zero")
-(assert_trap (invoke "div_s73" (i32.const 0)) "integer divide by zero")
+(assert_trap (invoke "div_s73" (i32.const 1)) "integer divide by zero")
 (assert_trap (invoke "div_s74" (i32.const 0)) "integer divide by zero")
-(assert_trap (invoke "div_s75") "integer overflow")
-(assert_trap (invoke "div_s76" (i32.const 0x80000000)) "integer overflow")
-(assert_trap (invoke "div_s77" (i32.const -1)) "integer overflow")
-(assert_return (invoke "div_s78") (i32.const 1))
-(assert_return (invoke "div_s79" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "div_s80" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "div_s81") (i32.const 0))
-(assert_return (invoke "div_s82" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "div_s83" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "div_s84") (i32.const 1))
-(assert_return (invoke "div_s85" (i32.const -1)) (i32.const 1))
-(assert_return (invoke "div_s86" (i32.const -1)) (i32.const 1))
-(assert_return (invoke "div_s87") (i32.const 0xc0000000))
-(assert_return (invoke "div_s88" (i32.const 0x80000000)) (i32.const 0xc0000000))
-(assert_return (invoke "div_s89" (i32.const 2)) (i32.const 0xc0000000))
-(assert_return (invoke "div_s90") (i32.const 0xffdf3b65))
-(assert_return (invoke "div_s91" (i32.const 0x80000001)) (i32.const 0xffdf3b65))
-(assert_return (invoke "div_s92" (i32.const 1000)) (i32.const 0xffdf3b65))
-(assert_return (invoke "div_s93") (i32.const 2))
-(assert_return (invoke "div_s94" (i32.const 5)) (i32.const 2))
-(assert_return (invoke "div_s95" (i32.const 2)) (i32.const 2))
-(assert_return (invoke "div_s96") (i32.const -2))
-(assert_return (invoke "div_s97" (i32.const -5)) (i32.const -2))
-(assert_return (invoke "div_s98" (i32.const 2)) (i32.const -2))
-(assert_return (invoke "div_s99") (i32.const -2))
-(assert_return (invoke "div_s100" (i32.const 5)) (i32.const -2))
-(assert_return (invoke "div_s101" (i32.const -2)) (i32.const -2))
-(assert_return (invoke "div_s102") (i32.const 2))
-(assert_return (invoke "div_s103" (i32.const -5)) (i32.const 2))
-(assert_return (invoke "div_s104" (i32.const -2)) (i32.const 2))
-(assert_return (invoke "div_s105") (i32.const 2))
-(assert_return (invoke "div_s106" (i32.const 7)) (i32.const 2))
-(assert_return (invoke "div_s107" (i32.const 3)) (i32.const 2))
-(assert_return (invoke "div_s108") (i32.const -2))
-(assert_return (invoke "div_s109" (i32.const -7)) (i32.const -2))
-(assert_return (invoke "div_s110" (i32.const 3)) (i32.const -2))
-(assert_return (invoke "div_s111") (i32.const -2))
-(assert_return (invoke "div_s112" (i32.const 7)) (i32.const -2))
-(assert_return (invoke "div_s113" (i32.const -3)) (i32.const -2))
-(assert_return (invoke "div_s114") (i32.const 2))
-(assert_return (invoke "div_s115" (i32.const -7)) (i32.const 2))
-(assert_return (invoke "div_s116" (i32.const -3)) (i32.const 2))
-(assert_return (invoke "div_s117") (i32.const 2))
-(assert_return (invoke "div_s118" (i32.const 11)) (i32.const 2))
-(assert_return (invoke "div_s119" (i32.const 5)) (i32.const 2))
+(assert_trap (invoke "div_s75") "integer divide by zero")
+(assert_trap (invoke "div_s76" (i32.const 0)) "integer divide by zero")
+(assert_trap (invoke "div_s77" (i32.const 0)) "integer divide by zero")
+(assert_trap (invoke "div_s78") "integer overflow")
+(assert_trap (invoke "div_s79" (i32.const 0x80000000)) "integer overflow")
+(assert_trap (invoke "div_s80" (i32.const -1)) "integer overflow")
+(assert_return (invoke "div_s81") (i32.const 1))
+(assert_return (invoke "div_s82" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "div_s83" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "div_s84") (i32.const 0))
+(assert_return (invoke "div_s85" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "div_s86" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "div_s87") (i32.const 0))
+(assert_return (invoke "div_s88" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "div_s89" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "div_s90") (i32.const 1))
+(assert_return (invoke "div_s91" (i32.const -1)) (i32.const 1))
+(assert_return (invoke "div_s92" (i32.const -1)) (i32.const 1))
+(assert_return (invoke "div_s93") (i32.const 0xc0000000))
+(assert_return (invoke "div_s94" (i32.const 0x80000000)) (i32.const 0xc0000000))
+(assert_return (invoke "div_s95" (i32.const 2)) (i32.const 0xc0000000))
+(assert_return (invoke "div_s96") (i32.const 0xffdf3b65))
+(assert_return (invoke "div_s97" (i32.const 0x80000001)) (i32.const 0xffdf3b65))
+(assert_return (invoke "div_s98" (i32.const 1000)) (i32.const 0xffdf3b65))
+(assert_return (invoke "div_s99") (i32.const 2))
+(assert_return (invoke "div_s100" (i32.const 5)) (i32.const 2))
+(assert_return (invoke "div_s101" (i32.const 2)) (i32.const 2))
+(assert_return (invoke "div_s102") (i32.const -2))
+(assert_return (invoke "div_s103" (i32.const -5)) (i32.const -2))
+(assert_return (invoke "div_s104" (i32.const 2)) (i32.const -2))
+(assert_return (invoke "div_s105") (i32.const -2))
+(assert_return (invoke "div_s106" (i32.const 5)) (i32.const -2))
+(assert_return (invoke "div_s107" (i32.const -2)) (i32.const -2))
+(assert_return (invoke "div_s108") (i32.const 2))
+(assert_return (invoke "div_s109" (i32.const -5)) (i32.const 2))
+(assert_return (invoke "div_s110" (i32.const -2)) (i32.const 2))
+(assert_return (invoke "div_s111") (i32.const 2))
+(assert_return (invoke "div_s112" (i32.const 7)) (i32.const 2))
+(assert_return (invoke "div_s113" (i32.const 3)) (i32.const 2))
+(assert_return (invoke "div_s114") (i32.const -2))
+(assert_return (invoke "div_s115" (i32.const -7)) (i32.const -2))
+(assert_return (invoke "div_s116" (i32.const 3)) (i32.const -2))
+(assert_return (invoke "div_s117") (i32.const -2))
+(assert_return (invoke "div_s118" (i32.const 7)) (i32.const -2))
+(assert_return (invoke "div_s119" (i32.const -3)) (i32.const -2))
 (assert_return (invoke "div_s120") (i32.const 2))
-(assert_return (invoke "div_s121" (i32.const 17)) (i32.const 2))
-(assert_return (invoke "div_s122" (i32.const 7)) (i32.const 2))
-(assert_trap (invoke "div_u123") "integer divide by zero")
-(assert_trap (invoke "div_u124" (i32.const 1)) "integer divide by zero")
-(assert_trap (invoke "div_u125" (i32.const 0)) "integer divide by zero")
-(assert_trap (invoke "div_u126") "integer divide by zero")
-(assert_trap (invoke "div_u127" (i32.const 0)) "integer divide by zero")
-(assert_trap (invoke "div_u128" (i32.const 0)) "integer divide by zero")
-(assert_return (invoke "div_u129") (i32.const 1))
-(assert_return (invoke "div_u130" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "div_u131" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "div_u132") (i32.const 0))
-(assert_return (invoke "div_u133" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "div_u134" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "div_s121" (i32.const -7)) (i32.const 2))
+(assert_return (invoke "div_s122" (i32.const -3)) (i32.const 2))
+(assert_return (invoke "div_s123") (i32.const 2))
+(assert_return (invoke "div_s124" (i32.const 11)) (i32.const 2))
+(assert_return (invoke "div_s125" (i32.const 5)) (i32.const 2))
+(assert_return (invoke "div_s126") (i32.const 2))
+(assert_return (invoke "div_s127" (i32.const 17)) (i32.const 2))
+(assert_return (invoke "div_s128" (i32.const 7)) (i32.const 2))
+(assert_trap (invoke "div_u129") "integer divide by zero")
+(assert_trap (invoke "div_u130" (i32.const 1)) "integer divide by zero")
+(assert_trap (invoke "div_u131" (i32.const 0)) "integer divide by zero")
+(assert_trap (invoke "div_u132") "integer divide by zero")
+(assert_trap (invoke "div_u133" (i32.const 0)) "integer divide by zero")
+(assert_trap (invoke "div_u134" (i32.const 0)) "integer divide by zero")
 (assert_return (invoke "div_u135") (i32.const 1))
-(assert_return (invoke "div_u136" (i32.const -1)) (i32.const 1))
-(assert_return (invoke "div_u137" (i32.const -1)) (i32.const 1))
+(assert_return (invoke "div_u136" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "div_u137" (i32.const 1)) (i32.const 1))
 (assert_return (invoke "div_u138") (i32.const 0))
-(assert_return (invoke "div_u139" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "div_u140" (i32.const -1)) (i32.const 0))
-(assert_return (invoke "div_u141") (i32.const 0x40000000))
-(assert_return (invoke "div_u142" (i32.const 0x80000000)) (i32.const 0x40000000))
-(assert_return (invoke "div_u143" (i32.const 2)) (i32.const 0x40000000))
-(assert_return (invoke "div_u144") (i32.const 0x8fef))
-(assert_return (invoke "div_u145" (i32.const 0x8ff00ff0)) (i32.const 0x8fef))
-(assert_return (invoke "div_u146" (i32.const 0x10001)) (i32.const 0x8fef))
-(assert_return (invoke "div_u147") (i32.const 0x20c49b))
-(assert_return (invoke "div_u148" (i32.const 0x80000001)) (i32.const 0x20c49b))
-(assert_return (invoke "div_u149" (i32.const 1000)) (i32.const 0x20c49b))
-(assert_return (invoke "div_u150") (i32.const 2))
-(assert_return (invoke "div_u151" (i32.const 5)) (i32.const 2))
-(assert_return (invoke "div_u152" (i32.const 2)) (i32.const 2))
-(assert_return (invoke "div_u153") (i32.const 0x7ffffffd))
-(assert_return (invoke "div_u154" (i32.const -5)) (i32.const 0x7ffffffd))
-(assert_return (invoke "div_u155" (i32.const 2)) (i32.const 0x7ffffffd))
-(assert_return (invoke "div_u156") (i32.const 0))
-(assert_return (invoke "div_u157" (i32.const 5)) (i32.const 0))
-(assert_return (invoke "div_u158" (i32.const -2)) (i32.const 0))
-(assert_return (invoke "div_u159") (i32.const 0))
-(assert_return (invoke "div_u160" (i32.const -5)) (i32.const 0))
-(assert_return (invoke "div_u161" (i32.const -2)) (i32.const 0))
-(assert_return (invoke "div_u162") (i32.const 2))
-(assert_return (invoke "div_u163" (i32.const 7)) (i32.const 2))
-(assert_return (invoke "div_u164" (i32.const 3)) (i32.const 2))
-(assert_return (invoke "div_u165") (i32.const 2))
-(assert_return (invoke "div_u166" (i32.const 11)) (i32.const 2))
-(assert_return (invoke "div_u167" (i32.const 5)) (i32.const 2))
+(assert_return (invoke "div_u139" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "div_u140" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "div_u141") (i32.const 1))
+(assert_return (invoke "div_u142" (i32.const -1)) (i32.const 1))
+(assert_return (invoke "div_u143" (i32.const -1)) (i32.const 1))
+(assert_return (invoke "div_u144") (i32.const 0))
+(assert_return (invoke "div_u145" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "div_u146" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "div_u147") (i32.const 0x40000000))
+(assert_return (invoke "div_u148" (i32.const 0x80000000)) (i32.const 0x40000000))
+(assert_return (invoke "div_u149" (i32.const 2)) (i32.const 0x40000000))
+(assert_return (invoke "div_u150") (i32.const 0x8fef))
+(assert_return (invoke "div_u151" (i32.const 0x8ff00ff0)) (i32.const 0x8fef))
+(assert_return (invoke "div_u152" (i32.const 0x10001)) (i32.const 0x8fef))
+(assert_return (invoke "div_u153") (i32.const 0x20c49b))
+(assert_return (invoke "div_u154" (i32.const 0x80000001)) (i32.const 0x20c49b))
+(assert_return (invoke "div_u155" (i32.const 1000)) (i32.const 0x20c49b))
+(assert_return (invoke "div_u156") (i32.const 2))
+(assert_return (invoke "div_u157" (i32.const 5)) (i32.const 2))
+(assert_return (invoke "div_u158" (i32.const 2)) (i32.const 2))
+(assert_return (invoke "div_u159") (i32.const 0x7ffffffd))
+(assert_return (invoke "div_u160" (i32.const -5)) (i32.const 0x7ffffffd))
+(assert_return (invoke "div_u161" (i32.const 2)) (i32.const 0x7ffffffd))
+(assert_return (invoke "div_u162") (i32.const 0))
+(assert_return (invoke "div_u163" (i32.const 5)) (i32.const 0))
+(assert_return (invoke "div_u164" (i32.const -2)) (i32.const 0))
+(assert_return (invoke "div_u165") (i32.const 0))
+(assert_return (invoke "div_u166" (i32.const -5)) (i32.const 0))
+(assert_return (invoke "div_u167" (i32.const -2)) (i32.const 0))
 (assert_return (invoke "div_u168") (i32.const 2))
-(assert_return (invoke "div_u169" (i32.const 17)) (i32.const 2))
-(assert_return (invoke "div_u170" (i32.const 7)) (i32.const 2))
-(assert_trap (invoke "rem_s171") "integer divide by zero")
-(assert_trap (invoke "rem_s172" (i32.const 1)) "integer divide by zero")
-(assert_trap (invoke "rem_s173" (i32.const 0)) "integer divide by zero")
-(assert_trap (invoke "rem_s174") "integer divide by zero")
-(assert_trap (invoke "rem_s175" (i32.const 0)) "integer divide by zero")
-(assert_trap (invoke "rem_s176" (i32.const 0)) "integer divide by zero")
-(assert_return (invoke "rem_s177") (i32.const 0))
-(assert_return (invoke "rem_s178" (i32.const 0x7fffffff)) (i32.const 0))
-(assert_return (invoke "rem_s179" (i32.const -1)) (i32.const 0))
-(assert_return (invoke "rem_s180") (i32.const 0))
-(assert_return (invoke "rem_s181" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "rem_s182" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "div_u169" (i32.const 7)) (i32.const 2))
+(assert_return (invoke "div_u170" (i32.const 3)) (i32.const 2))
+(assert_return (invoke "div_u171") (i32.const 2))
+(assert_return (invoke "div_u172" (i32.const 11)) (i32.const 2))
+(assert_return (invoke "div_u173" (i32.const 5)) (i32.const 2))
+(assert_return (invoke "div_u174") (i32.const 2))
+(assert_return (invoke "div_u175" (i32.const 17)) (i32.const 2))
+(assert_return (invoke "div_u176" (i32.const 7)) (i32.const 2))
+(assert_trap (invoke "rem_s177") "integer divide by zero")
+(assert_trap (invoke "rem_s178" (i32.const 1)) "integer divide by zero")
+(assert_trap (invoke "rem_s179" (i32.const 0)) "integer divide by zero")
+(assert_trap (invoke "rem_s180") "integer divide by zero")
+(assert_trap (invoke "rem_s181" (i32.const 0)) "integer divide by zero")
+(assert_trap (invoke "rem_s182" (i32.const 0)) "integer divide by zero")
 (assert_return (invoke "rem_s183") (i32.const 0))
-(assert_return (invoke "rem_s184" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "rem_s185" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "rem_s184" (i32.const 0x7fffffff)) (i32.const 0))
+(assert_return (invoke "rem_s185" (i32.const -1)) (i32.const 0))
 (assert_return (invoke "rem_s186") (i32.const 0))
-(assert_return (invoke "rem_s187" (i32.const -1)) (i32.const 0))
-(assert_return (invoke "rem_s188" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "rem_s187" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "rem_s188" (i32.const 1)) (i32.const 0))
 (assert_return (invoke "rem_s189") (i32.const 0))
-(assert_return (invoke "rem_s190" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "rem_s191" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "rem_s190" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "rem_s191" (i32.const 1)) (i32.const 0))
 (assert_return (invoke "rem_s192") (i32.const 0))
-(assert_return (invoke "rem_s193" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "rem_s194" (i32.const 2)) (i32.const 0))
-(assert_return (invoke "rem_s195") (i32.const -647))
-(assert_return (invoke "rem_s196" (i32.const 0x80000001)) (i32.const -647))
-(assert_return (invoke "rem_s197" (i32.const 1000)) (i32.const -647))
-(assert_return (invoke "rem_s198") (i32.const 1))
-(assert_return (invoke "rem_s199" (i32.const 5)) (i32.const 1))
-(assert_return (invoke "rem_s200" (i32.const 2)) (i32.const 1))
-(assert_return (invoke "rem_s201") (i32.const -1))
-(assert_return (invoke "rem_s202" (i32.const -5)) (i32.const -1))
-(assert_return (invoke "rem_s203" (i32.const 2)) (i32.const -1))
-(assert_return (invoke "rem_s204") (i32.const 1))
-(assert_return (invoke "rem_s205" (i32.const 5)) (i32.const 1))
-(assert_return (invoke "rem_s206" (i32.const -2)) (i32.const 1))
-(assert_return (invoke "rem_s207") (i32.const -1))
-(assert_return (invoke "rem_s208" (i32.const -5)) (i32.const -1))
-(assert_return (invoke "rem_s209" (i32.const -2)) (i32.const -1))
-(assert_return (invoke "rem_s210") (i32.const 1))
-(assert_return (invoke "rem_s211" (i32.const 7)) (i32.const 1))
-(assert_return (invoke "rem_s212" (i32.const 3)) (i32.const 1))
-(assert_return (invoke "rem_s213") (i32.const -1))
-(assert_return (invoke "rem_s214" (i32.const -7)) (i32.const -1))
-(assert_return (invoke "rem_s215" (i32.const 3)) (i32.const -1))
-(assert_return (invoke "rem_s216") (i32.const 1))
-(assert_return (invoke "rem_s217" (i32.const 7)) (i32.const 1))
-(assert_return (invoke "rem_s218" (i32.const -3)) (i32.const 1))
-(assert_return (invoke "rem_s219") (i32.const -1))
-(assert_return (invoke "rem_s220" (i32.const -7)) (i32.const -1))
-(assert_return (invoke "rem_s221" (i32.const -3)) (i32.const -1))
-(assert_return (invoke "rem_s222") (i32.const 1))
-(assert_return (invoke "rem_s223" (i32.const 11)) (i32.const 1))
-(assert_return (invoke "rem_s224" (i32.const 5)) (i32.const 1))
-(assert_return (invoke "rem_s225") (i32.const 3))
-(assert_return (invoke "rem_s226" (i32.const 17)) (i32.const 3))
-(assert_return (invoke "rem_s227" (i32.const 7)) (i32.const 3))
-(assert_trap (invoke "rem_u228") "integer divide by zero")
-(assert_trap (invoke "rem_u229" (i32.const 1)) "integer divide by zero")
-(assert_trap (invoke "rem_u230" (i32.const 0)) "integer divide by zero")
-(assert_trap (invoke "rem_u231") "integer divide by zero")
-(assert_trap (invoke "rem_u232" (i32.const 0)) "integer divide by zero")
-(assert_trap (invoke "rem_u233" (i32.const 0)) "integer divide by zero")
-(assert_return (invoke "rem_u234") (i32.const 0))
-(assert_return (invoke "rem_u235" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "rem_u236" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "rem_u237") (i32.const 0))
-(assert_return (invoke "rem_u238" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "rem_u239" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "rem_u240") (i32.const 0))
-(assert_return (invoke "rem_u241" (i32.const -1)) (i32.const 0))
-(assert_return (invoke "rem_u242" (i32.const -1)) (i32.const 0))
-(assert_return (invoke "rem_u243") (i32.const 0x80000000))
-(assert_return (invoke "rem_u244" (i32.const 0x80000000)) (i32.const 0x80000000))
-(assert_return (invoke "rem_u245" (i32.const -1)) (i32.const 0x80000000))
+(assert_return (invoke "rem_s193" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "rem_s194" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "rem_s195") (i32.const 0))
+(assert_return (invoke "rem_s196" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "rem_s197" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "rem_s198") (i32.const 0))
+(assert_return (invoke "rem_s199" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "rem_s200" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "rem_s201") (i32.const 0))
+(assert_return (invoke "rem_s202" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "rem_s203" (i32.const 2)) (i32.const 0))
+(assert_return (invoke "rem_s204") (i32.const -647))
+(assert_return (invoke "rem_s205" (i32.const 0x80000001)) (i32.const -647))
+(assert_return (invoke "rem_s206" (i32.const 1000)) (i32.const -647))
+(assert_return (invoke "rem_s207") (i32.const 1))
+(assert_return (invoke "rem_s208" (i32.const 5)) (i32.const 1))
+(assert_return (invoke "rem_s209" (i32.const 2)) (i32.const 1))
+(assert_return (invoke "rem_s210") (i32.const -1))
+(assert_return (invoke "rem_s211" (i32.const -5)) (i32.const -1))
+(assert_return (invoke "rem_s212" (i32.const 2)) (i32.const -1))
+(assert_return (invoke "rem_s213") (i32.const 1))
+(assert_return (invoke "rem_s214" (i32.const 5)) (i32.const 1))
+(assert_return (invoke "rem_s215" (i32.const -2)) (i32.const 1))
+(assert_return (invoke "rem_s216") (i32.const -1))
+(assert_return (invoke "rem_s217" (i32.const -5)) (i32.const -1))
+(assert_return (invoke "rem_s218" (i32.const -2)) (i32.const -1))
+(assert_return (invoke "rem_s219") (i32.const 1))
+(assert_return (invoke "rem_s220" (i32.const 7)) (i32.const 1))
+(assert_return (invoke "rem_s221" (i32.const 3)) (i32.const 1))
+(assert_return (invoke "rem_s222") (i32.const -1))
+(assert_return (invoke "rem_s223" (i32.const -7)) (i32.const -1))
+(assert_return (invoke "rem_s224" (i32.const 3)) (i32.const -1))
+(assert_return (invoke "rem_s225") (i32.const 1))
+(assert_return (invoke "rem_s226" (i32.const 7)) (i32.const 1))
+(assert_return (invoke "rem_s227" (i32.const -3)) (i32.const 1))
+(assert_return (invoke "rem_s228") (i32.const -1))
+(assert_return (invoke "rem_s229" (i32.const -7)) (i32.const -1))
+(assert_return (invoke "rem_s230" (i32.const -3)) (i32.const -1))
+(assert_return (invoke "rem_s231") (i32.const 1))
+(assert_return (invoke "rem_s232" (i32.const 11)) (i32.const 1))
+(assert_return (invoke "rem_s233" (i32.const 5)) (i32.const 1))
+(assert_return (invoke "rem_s234") (i32.const 3))
+(assert_return (invoke "rem_s235" (i32.const 17)) (i32.const 3))
+(assert_return (invoke "rem_s236" (i32.const 7)) (i32.const 3))
+(assert_trap (invoke "rem_u237") "integer divide by zero")
+(assert_trap (invoke "rem_u238" (i32.const 1)) "integer divide by zero")
+(assert_trap (invoke "rem_u239" (i32.const 0)) "integer divide by zero")
+(assert_trap (invoke "rem_u240") "integer divide by zero")
+(assert_trap (invoke "rem_u241" (i32.const 0)) "integer divide by zero")
+(assert_trap (invoke "rem_u242" (i32.const 0)) "integer divide by zero")
+(assert_return (invoke "rem_u243") (i32.const 0))
+(assert_return (invoke "rem_u244" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "rem_u245" (i32.const 1)) (i32.const 0))
 (assert_return (invoke "rem_u246") (i32.const 0))
-(assert_return (invoke "rem_u247" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "rem_u248" (i32.const 2)) (i32.const 0))
-(assert_return (invoke "rem_u249") (i32.const 0x8001))
-(assert_return (invoke "rem_u250" (i32.const 0x8ff00ff0)) (i32.const 0x8001))
-(assert_return (invoke "rem_u251" (i32.const 0x10001)) (i32.const 0x8001))
-(assert_return (invoke "rem_u252") (i32.const 649))
-(assert_return (invoke "rem_u253" (i32.const 0x80000001)) (i32.const 649))
-(assert_return (invoke "rem_u254" (i32.const 1000)) (i32.const 649))
-(assert_return (invoke "rem_u255") (i32.const 1))
-(assert_return (invoke "rem_u256" (i32.const 5)) (i32.const 1))
-(assert_return (invoke "rem_u257" (i32.const 2)) (i32.const 1))
-(assert_return (invoke "rem_u258") (i32.const 1))
-(assert_return (invoke "rem_u259" (i32.const -5)) (i32.const 1))
-(assert_return (invoke "rem_u260" (i32.const 2)) (i32.const 1))
-(assert_return (invoke "rem_u261") (i32.const 5))
-(assert_return (invoke "rem_u262" (i32.const 5)) (i32.const 5))
-(assert_return (invoke "rem_u263" (i32.const -2)) (i32.const 5))
-(assert_return (invoke "rem_u264") (i32.const -5))
-(assert_return (invoke "rem_u265" (i32.const -5)) (i32.const -5))
-(assert_return (invoke "rem_u266" (i32.const -2)) (i32.const -5))
+(assert_return (invoke "rem_u247" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "rem_u248" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "rem_u249") (i32.const 0))
+(assert_return (invoke "rem_u250" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "rem_u251" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "rem_u252") (i32.const 0x80000000))
+(assert_return (invoke "rem_u253" (i32.const 0x80000000)) (i32.const 0x80000000))
+(assert_return (invoke "rem_u254" (i32.const -1)) (i32.const 0x80000000))
+(assert_return (invoke "rem_u255") (i32.const 0))
+(assert_return (invoke "rem_u256" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "rem_u257" (i32.const 2)) (i32.const 0))
+(assert_return (invoke "rem_u258") (i32.const 0x8001))
+(assert_return (invoke "rem_u259" (i32.const 0x8ff00ff0)) (i32.const 0x8001))
+(assert_return (invoke "rem_u260" (i32.const 0x10001)) (i32.const 0x8001))
+(assert_return (invoke "rem_u261") (i32.const 649))
+(assert_return (invoke "rem_u262" (i32.const 0x80000001)) (i32.const 649))
+(assert_return (invoke "rem_u263" (i32.const 1000)) (i32.const 649))
+(assert_return (invoke "rem_u264") (i32.const 1))
+(assert_return (invoke "rem_u265" (i32.const 5)) (i32.const 1))
+(assert_return (invoke "rem_u266" (i32.const 2)) (i32.const 1))
 (assert_return (invoke "rem_u267") (i32.const 1))
-(assert_return (invoke "rem_u268" (i32.const 7)) (i32.const 1))
-(assert_return (invoke "rem_u269" (i32.const 3)) (i32.const 1))
-(assert_return (invoke "rem_u270") (i32.const 1))
-(assert_return (invoke "rem_u271" (i32.const 11)) (i32.const 1))
-(assert_return (invoke "rem_u272" (i32.const 5)) (i32.const 1))
-(assert_return (invoke "rem_u273") (i32.const 3))
-(assert_return (invoke "rem_u274" (i32.const 17)) (i32.const 3))
-(assert_return (invoke "rem_u275" (i32.const 7)) (i32.const 3))
-(assert_return (invoke "and276") (i32.const 0))
-(assert_return (invoke "and277" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "and278" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "and279") (i32.const 0))
-(assert_return (invoke "and280" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "and281" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "and282") (i32.const 1))
-(assert_return (invoke "and283" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "and284" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "rem_u268" (i32.const -5)) (i32.const 1))
+(assert_return (invoke "rem_u269" (i32.const 2)) (i32.const 1))
+(assert_return (invoke "rem_u270") (i32.const 5))
+(assert_return (invoke "rem_u271" (i32.const 5)) (i32.const 5))
+(assert_return (invoke "rem_u272" (i32.const -2)) (i32.const 5))
+(assert_return (invoke "rem_u273") (i32.const -5))
+(assert_return (invoke "rem_u274" (i32.const -5)) (i32.const -5))
+(assert_return (invoke "rem_u275" (i32.const -2)) (i32.const -5))
+(assert_return (invoke "rem_u276") (i32.const 1))
+(assert_return (invoke "rem_u277" (i32.const 7)) (i32.const 1))
+(assert_return (invoke "rem_u278" (i32.const 3)) (i32.const 1))
+(assert_return (invoke "rem_u279") (i32.const 1))
+(assert_return (invoke "rem_u280" (i32.const 11)) (i32.const 1))
+(assert_return (invoke "rem_u281" (i32.const 5)) (i32.const 1))
+(assert_return (invoke "rem_u282") (i32.const 3))
+(assert_return (invoke "rem_u283" (i32.const 17)) (i32.const 3))
+(assert_return (invoke "rem_u284" (i32.const 7)) (i32.const 3))
 (assert_return (invoke "and285") (i32.const 0))
-(assert_return (invoke "and286" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "and286" (i32.const 1)) (i32.const 0))
 (assert_return (invoke "and287" (i32.const 0)) (i32.const 0))
 (assert_return (invoke "and288") (i32.const 0))
-(assert_return (invoke "and289" (i32.const 0x7fffffff)) (i32.const 0))
-(assert_return (invoke "and290" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "and291") (i32.const 0x7fffffff))
-(assert_return (invoke "and292" (i32.const 0x7fffffff)) (i32.const 0x7fffffff))
-(assert_return (invoke "and293" (i32.const -1)) (i32.const 0x7fffffff))
-(assert_return (invoke "and294") (i32.const 0xf0f0f0f0))
-(assert_return (invoke "and295" (i32.const 0xf0f0ffff)) (i32.const 0xf0f0f0f0))
-(assert_return (invoke "and296" (i32.const 0xfffff0f0)) (i32.const 0xf0f0f0f0))
-(assert_return (invoke "and297") (i32.const 0xffffffff))
-(assert_return (invoke "and298" (i32.const 0xffffffff)) (i32.const 0xffffffff))
-(assert_return (invoke "and299" (i32.const 0xffffffff)) (i32.const 0xffffffff))
-(assert_return (invoke "or300") (i32.const 1))
-(assert_return (invoke "or301" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "or302" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "or303") (i32.const 1))
-(assert_return (invoke "or304" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "or305" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "or306") (i32.const 1))
-(assert_return (invoke "or307" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "or308" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "or309") (i32.const 0))
-(assert_return (invoke "or310" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "or311" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "or312") (i32.const -1))
-(assert_return (invoke "or313" (i32.const 0x7fffffff)) (i32.const -1))
-(assert_return (invoke "or314" (i32.const 0x80000000)) (i32.const -1))
-(assert_return (invoke "or315") (i32.const 0x80000000))
-(assert_return (invoke "or316" (i32.const 0x80000000)) (i32.const 0x80000000))
-(assert_return (invoke "or317" (i32.const 0)) (i32.const 0x80000000))
-(assert_return (invoke "or318") (i32.const 0xffffffff))
-(assert_return (invoke "or319" (i32.const 0xf0f0ffff)) (i32.const 0xffffffff))
-(assert_return (invoke "or320" (i32.const 0xfffff0f0)) (i32.const 0xffffffff))
-(assert_return (invoke "or321") (i32.const 0xffffffff))
-(assert_return (invoke "or322" (i32.const 0xffffffff)) (i32.const 0xffffffff))
-(assert_return (invoke "or323" (i32.const 0xffffffff)) (i32.const 0xffffffff))
-(assert_return (invoke "xor324") (i32.const 1))
-(assert_return (invoke "xor325" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "xor326" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "xor327") (i32.const 1))
-(assert_return (invoke "xor328" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "xor329" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "xor330") (i32.const 0))
-(assert_return (invoke "xor331" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "xor332" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "xor333") (i32.const 0))
-(assert_return (invoke "xor334" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "xor335" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "xor336") (i32.const -1))
-(assert_return (invoke "xor337" (i32.const 0x7fffffff)) (i32.const -1))
-(assert_return (invoke "xor338" (i32.const 0x80000000)) (i32.const -1))
-(assert_return (invoke "xor339") (i32.const 0x80000000))
-(assert_return (invoke "xor340" (i32.const 0x80000000)) (i32.const 0x80000000))
-(assert_return (invoke "xor341" (i32.const 0)) (i32.const 0x80000000))
-(assert_return (invoke "xor342") (i32.const 0x7fffffff))
-(assert_return (invoke "xor343" (i32.const -1)) (i32.const 0x7fffffff))
-(assert_return (invoke "xor344" (i32.const 0x80000000)) (i32.const 0x7fffffff))
-(assert_return (invoke "xor345") (i32.const 0x80000000))
-(assert_return (invoke "xor346" (i32.const -1)) (i32.const 0x80000000))
-(assert_return (invoke "xor347" (i32.const 0x7fffffff)) (i32.const 0x80000000))
-(assert_return (invoke "xor348") (i32.const 0x0f0f0f0f))
-(assert_return (invoke "xor349" (i32.const 0xf0f0ffff)) (i32.const 0x0f0f0f0f))
-(assert_return (invoke "xor350" (i32.const 0xfffff0f0)) (i32.const 0x0f0f0f0f))
-(assert_return (invoke "xor351") (i32.const 0))
-(assert_return (invoke "xor352" (i32.const 0xffffffff)) (i32.const 0))
-(assert_return (invoke "xor353" (i32.const 0xffffffff)) (i32.const 0))
-(assert_return (invoke "shl354") (i32.const 2))
-(assert_return (invoke "shl355" (i32.const 1)) (i32.const 2))
-(assert_return (invoke "shl356" (i32.const 1)) (i32.const 2))
-(assert_return (invoke "shl357") (i32.const 1))
-(assert_return (invoke "shl358" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "shl359" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "shl360") (i32.const 0xfffffffe))
-(assert_return (invoke "shl361" (i32.const 0x7fffffff)) (i32.const 0xfffffffe))
-(assert_return (invoke "shl362" (i32.const 1)) (i32.const 0xfffffffe))
-(assert_return (invoke "shl363") (i32.const 0xfffffffe))
-(assert_return (invoke "shl364" (i32.const 0xffffffff)) (i32.const 0xfffffffe))
-(assert_return (invoke "shl365" (i32.const 1)) (i32.const 0xfffffffe))
-(assert_return (invoke "shl366") (i32.const 0))
-(assert_return (invoke "shl367" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "shl368" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "shl369") (i32.const 0x80000000))
-(assert_return (invoke "shl370" (i32.const 0x40000000)) (i32.const 0x80000000))
-(assert_return (invoke "shl371" (i32.const 1)) (i32.const 0x80000000))
-(assert_return (invoke "shl372") (i32.const 0x80000000))
-(assert_return (invoke "shl373" (i32.const 1)) (i32.const 0x80000000))
-(assert_return (invoke "shl374" (i32.const 31)) (i32.const 0x80000000))
-(assert_return (invoke "shl375") (i32.const 1))
-(assert_return (invoke "shl376" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "shl377" (i32.const 32)) (i32.const 1))
-(assert_return (invoke "shl378") (i32.const 2))
-(assert_return (invoke "shl379" (i32.const 1)) (i32.const 2))
-(assert_return (invoke "shl380" (i32.const 33)) (i32.const 2))
+(assert_return (invoke "and289" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "and290" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "and291") (i32.const 1))
+(assert_return (invoke "and292" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "and293" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "and294") (i32.const 0))
+(assert_return (invoke "and295" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "and296" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "and297") (i32.const 0))
+(assert_return (invoke "and298" (i32.const 0x7fffffff)) (i32.const 0))
+(assert_return (invoke "and299" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "and300") (i32.const 0x7fffffff))
+(assert_return (invoke "and301" (i32.const 0x7fffffff)) (i32.const 0x7fffffff))
+(assert_return (invoke "and302" (i32.const -1)) (i32.const 0x7fffffff))
+(assert_return (invoke "and303") (i32.const 0xf0f0f0f0))
+(assert_return (invoke "and304" (i32.const 0xf0f0ffff)) (i32.const 0xf0f0f0f0))
+(assert_return (invoke "and305" (i32.const 0xfffff0f0)) (i32.const 0xf0f0f0f0))
+(assert_return (invoke "and306") (i32.const 0xffffffff))
+(assert_return (invoke "and307" (i32.const 0xffffffff)) (i32.const 0xffffffff))
+(assert_return (invoke "and308" (i32.const 0xffffffff)) (i32.const 0xffffffff))
+(assert_return (invoke "or309") (i32.const 1))
+(assert_return (invoke "or310" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "or311" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "or312") (i32.const 1))
+(assert_return (invoke "or313" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "or314" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "or315") (i32.const 1))
+(assert_return (invoke "or316" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "or317" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "or318") (i32.const 0))
+(assert_return (invoke "or319" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "or320" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "or321") (i32.const -1))
+(assert_return (invoke "or322" (i32.const 0x7fffffff)) (i32.const -1))
+(assert_return (invoke "or323" (i32.const 0x80000000)) (i32.const -1))
+(assert_return (invoke "or324") (i32.const 0x80000000))
+(assert_return (invoke "or325" (i32.const 0x80000000)) (i32.const 0x80000000))
+(assert_return (invoke "or326" (i32.const 0)) (i32.const 0x80000000))
+(assert_return (invoke "or327") (i32.const 0xffffffff))
+(assert_return (invoke "or328" (i32.const 0xf0f0ffff)) (i32.const 0xffffffff))
+(assert_return (invoke "or329" (i32.const 0xfffff0f0)) (i32.const 0xffffffff))
+(assert_return (invoke "or330") (i32.const 0xffffffff))
+(assert_return (invoke "or331" (i32.const 0xffffffff)) (i32.const 0xffffffff))
+(assert_return (invoke "or332" (i32.const 0xffffffff)) (i32.const 0xffffffff))
+(assert_return (invoke "xor333") (i32.const 1))
+(assert_return (invoke "xor334" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "xor335" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "xor336") (i32.const 1))
+(assert_return (invoke "xor337" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "xor338" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "xor339") (i32.const 0))
+(assert_return (invoke "xor340" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "xor341" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "xor342") (i32.const 0))
+(assert_return (invoke "xor343" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "xor344" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "xor345") (i32.const -1))
+(assert_return (invoke "xor346" (i32.const 0x7fffffff)) (i32.const -1))
+(assert_return (invoke "xor347" (i32.const 0x80000000)) (i32.const -1))
+(assert_return (invoke "xor348") (i32.const 0x80000000))
+(assert_return (invoke "xor349" (i32.const 0x80000000)) (i32.const 0x80000000))
+(assert_return (invoke "xor350" (i32.const 0)) (i32.const 0x80000000))
+(assert_return (invoke "xor351") (i32.const 0x7fffffff))
+(assert_return (invoke "xor352" (i32.const -1)) (i32.const 0x7fffffff))
+(assert_return (invoke "xor353" (i32.const 0x80000000)) (i32.const 0x7fffffff))
+(assert_return (invoke "xor354") (i32.const 0x80000000))
+(assert_return (invoke "xor355" (i32.const -1)) (i32.const 0x80000000))
+(assert_return (invoke "xor356" (i32.const 0x7fffffff)) (i32.const 0x80000000))
+(assert_return (invoke "xor357") (i32.const 0x0f0f0f0f))
+(assert_return (invoke "xor358" (i32.const 0xf0f0ffff)) (i32.const 0x0f0f0f0f))
+(assert_return (invoke "xor359" (i32.const 0xfffff0f0)) (i32.const 0x0f0f0f0f))
+(assert_return (invoke "xor360") (i32.const 0))
+(assert_return (invoke "xor361" (i32.const 0xffffffff)) (i32.const 0))
+(assert_return (invoke "xor362" (i32.const 0xffffffff)) (i32.const 0))
+(assert_return (invoke "shl363") (i32.const 2))
+(assert_return (invoke "shl364" (i32.const 1)) (i32.const 2))
+(assert_return (invoke "shl365" (i32.const 1)) (i32.const 2))
+(assert_return (invoke "shl366") (i32.const 1))
+(assert_return (invoke "shl367" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "shl368" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "shl369") (i32.const 0xfffffffe))
+(assert_return (invoke "shl370" (i32.const 0x7fffffff)) (i32.const 0xfffffffe))
+(assert_return (invoke "shl371" (i32.const 1)) (i32.const 0xfffffffe))
+(assert_return (invoke "shl372") (i32.const 0xfffffffe))
+(assert_return (invoke "shl373" (i32.const 0xffffffff)) (i32.const 0xfffffffe))
+(assert_return (invoke "shl374" (i32.const 1)) (i32.const 0xfffffffe))
+(assert_return (invoke "shl375") (i32.const 0))
+(assert_return (invoke "shl376" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "shl377" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "shl378") (i32.const 0x80000000))
+(assert_return (invoke "shl379" (i32.const 0x40000000)) (i32.const 0x80000000))
+(assert_return (invoke "shl380" (i32.const 1)) (i32.const 0x80000000))
 (assert_return (invoke "shl381") (i32.const 0x80000000))
 (assert_return (invoke "shl382" (i32.const 1)) (i32.const 0x80000000))
-(assert_return (invoke "shl383" (i32.const -1)) (i32.const 0x80000000))
-(assert_return (invoke "shl384") (i32.const 0x80000000))
-(assert_return (invoke "shl385" (i32.const 1)) (i32.const 0x80000000))
-(assert_return (invoke "shl386" (i32.const 0x7fffffff)) (i32.const 0x80000000))
-(assert_return (invoke "shr_s387") (i32.const 0))
-(assert_return (invoke "shr_s388" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "shr_s389" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "shr_s390") (i32.const 1))
-(assert_return (invoke "shr_s391" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "shr_s392" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "shr_s393") (i32.const -1))
-(assert_return (invoke "shr_s394" (i32.const -1)) (i32.const -1))
-(assert_return (invoke "shr_s395" (i32.const 1)) (i32.const -1))
-(assert_return (invoke "shr_s396") (i32.const 0x3fffffff))
-(assert_return (invoke "shr_s397" (i32.const 0x7fffffff)) (i32.const 0x3fffffff))
-(assert_return (invoke "shr_s398" (i32.const 1)) (i32.const 0x3fffffff))
-(assert_return (invoke "shr_s399") (i32.const 0xc0000000))
-(assert_return (invoke "shr_s400" (i32.const 0x80000000)) (i32.const 0xc0000000))
-(assert_return (invoke "shr_s401" (i32.const 1)) (i32.const 0xc0000000))
-(assert_return (invoke "shr_s402") (i32.const 0x20000000))
-(assert_return (invoke "shr_s403" (i32.const 0x40000000)) (i32.const 0x20000000))
-(assert_return (invoke "shr_s404" (i32.const 1)) (i32.const 0x20000000))
-(assert_return (invoke "shr_s405") (i32.const 1))
-(assert_return (invoke "shr_s406" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "shr_s407" (i32.const 32)) (i32.const 1))
-(assert_return (invoke "shr_s408") (i32.const 0))
-(assert_return (invoke "shr_s409" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "shr_s410" (i32.const 33)) (i32.const 0))
-(assert_return (invoke "shr_s411") (i32.const 0))
-(assert_return (invoke "shr_s412" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "shr_s413" (i32.const -1)) (i32.const 0))
-(assert_return (invoke "shr_s414") (i32.const 0))
-(assert_return (invoke "shr_s415" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "shr_s416" (i32.const 0x7fffffff)) (i32.const 0))
-(assert_return (invoke "shr_s417") (i32.const 1))
-(assert_return (invoke "shr_s418" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "shr_s419" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "shr_s420") (i32.const -1))
-(assert_return (invoke "shr_s421" (i32.const 0x80000000)) (i32.const -1))
-(assert_return (invoke "shr_s422" (i32.const 31)) (i32.const -1))
-(assert_return (invoke "shr_s423") (i32.const -1))
-(assert_return (invoke "shr_s424" (i32.const -1)) (i32.const -1))
-(assert_return (invoke "shr_s425" (i32.const 32)) (i32.const -1))
-(assert_return (invoke "shr_s426") (i32.const -1))
-(assert_return (invoke "shr_s427" (i32.const -1)) (i32.const -1))
-(assert_return (invoke "shr_s428" (i32.const 33)) (i32.const -1))
+(assert_return (invoke "shl383" (i32.const 31)) (i32.const 0x80000000))
+(assert_return (invoke "shl384") (i32.const 1))
+(assert_return (invoke "shl385" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "shl386" (i32.const 32)) (i32.const 1))
+(assert_return (invoke "shl387") (i32.const 2))
+(assert_return (invoke "shl388" (i32.const 1)) (i32.const 2))
+(assert_return (invoke "shl389" (i32.const 33)) (i32.const 2))
+(assert_return (invoke "shl390") (i32.const 0x80000000))
+(assert_return (invoke "shl391" (i32.const 1)) (i32.const 0x80000000))
+(assert_return (invoke "shl392" (i32.const -1)) (i32.const 0x80000000))
+(assert_return (invoke "shl393") (i32.const 0x80000000))
+(assert_return (invoke "shl394" (i32.const 1)) (i32.const 0x80000000))
+(assert_return (invoke "shl395" (i32.const 0x7fffffff)) (i32.const 0x80000000))
+(assert_return (invoke "shr_s396") (i32.const 0))
+(assert_return (invoke "shr_s397" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "shr_s398" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "shr_s399") (i32.const 1))
+(assert_return (invoke "shr_s400" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "shr_s401" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "shr_s402") (i32.const -1))
+(assert_return (invoke "shr_s403" (i32.const -1)) (i32.const -1))
+(assert_return (invoke "shr_s404" (i32.const 1)) (i32.const -1))
+(assert_return (invoke "shr_s405") (i32.const 0x3fffffff))
+(assert_return (invoke "shr_s406" (i32.const 0x7fffffff)) (i32.const 0x3fffffff))
+(assert_return (invoke "shr_s407" (i32.const 1)) (i32.const 0x3fffffff))
+(assert_return (invoke "shr_s408") (i32.const 0xc0000000))
+(assert_return (invoke "shr_s409" (i32.const 0x80000000)) (i32.const 0xc0000000))
+(assert_return (invoke "shr_s410" (i32.const 1)) (i32.const 0xc0000000))
+(assert_return (invoke "shr_s411") (i32.const 0x20000000))
+(assert_return (invoke "shr_s412" (i32.const 0x40000000)) (i32.const 0x20000000))
+(assert_return (invoke "shr_s413" (i32.const 1)) (i32.const 0x20000000))
+(assert_return (invoke "shr_s414") (i32.const 1))
+(assert_return (invoke "shr_s415" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "shr_s416" (i32.const 32)) (i32.const 1))
+(assert_return (invoke "shr_s417") (i32.const 0))
+(assert_return (invoke "shr_s418" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "shr_s419" (i32.const 33)) (i32.const 0))
+(assert_return (invoke "shr_s420") (i32.const 0))
+(assert_return (invoke "shr_s421" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "shr_s422" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "shr_s423") (i32.const 0))
+(assert_return (invoke "shr_s424" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "shr_s425" (i32.const 0x7fffffff)) (i32.const 0))
+(assert_return (invoke "shr_s426") (i32.const 1))
+(assert_return (invoke "shr_s427" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "shr_s428" (i32.const 0x80000000)) (i32.const 1))
 (assert_return (invoke "shr_s429") (i32.const -1))
-(assert_return (invoke "shr_s430" (i32.const -1)) (i32.const -1))
-(assert_return (invoke "shr_s431" (i32.const -1)) (i32.const -1))
+(assert_return (invoke "shr_s430" (i32.const 0x80000000)) (i32.const -1))
+(assert_return (invoke "shr_s431" (i32.const 31)) (i32.const -1))
 (assert_return (invoke "shr_s432") (i32.const -1))
 (assert_return (invoke "shr_s433" (i32.const -1)) (i32.const -1))
-(assert_return (invoke "shr_s434" (i32.const 0x7fffffff)) (i32.const -1))
+(assert_return (invoke "shr_s434" (i32.const 32)) (i32.const -1))
 (assert_return (invoke "shr_s435") (i32.const -1))
 (assert_return (invoke "shr_s436" (i32.const -1)) (i32.const -1))
-(assert_return (invoke "shr_s437" (i32.const 0x80000000)) (i32.const -1))
-(assert_return (invoke "shr_u438") (i32.const 0))
-(assert_return (invoke "shr_u439" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "shr_u440" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "shr_u441") (i32.const 1))
-(assert_return (invoke "shr_u442" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "shr_u443" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "shr_u444") (i32.const 0x7fffffff))
-(assert_return (invoke "shr_u445" (i32.const -1)) (i32.const 0x7fffffff))
-(assert_return (invoke "shr_u446" (i32.const 1)) (i32.const 0x7fffffff))
-(assert_return (invoke "shr_u447") (i32.const 0x3fffffff))
-(assert_return (invoke "shr_u448" (i32.const 0x7fffffff)) (i32.const 0x3fffffff))
-(assert_return (invoke "shr_u449" (i32.const 1)) (i32.const 0x3fffffff))
-(assert_return (invoke "shr_u450") (i32.const 0x40000000))
-(assert_return (invoke "shr_u451" (i32.const 0x80000000)) (i32.const 0x40000000))
-(assert_return (invoke "shr_u452" (i32.const 1)) (i32.const 0x40000000))
-(assert_return (invoke "shr_u453") (i32.const 0x20000000))
-(assert_return (invoke "shr_u454" (i32.const 0x40000000)) (i32.const 0x20000000))
-(assert_return (invoke "shr_u455" (i32.const 1)) (i32.const 0x20000000))
-(assert_return (invoke "shr_u456") (i32.const 1))
-(assert_return (invoke "shr_u457" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "shr_u458" (i32.const 32)) (i32.const 1))
-(assert_return (invoke "shr_u459") (i32.const 0))
-(assert_return (invoke "shr_u460" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "shr_u461" (i32.const 33)) (i32.const 0))
-(assert_return (invoke "shr_u462") (i32.const 0))
-(assert_return (invoke "shr_u463" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "shr_u464" (i32.const -1)) (i32.const 0))
-(assert_return (invoke "shr_u465") (i32.const 0))
-(assert_return (invoke "shr_u466" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "shr_u467" (i32.const 0x7fffffff)) (i32.const 0))
-(assert_return (invoke "shr_u468") (i32.const 1))
-(assert_return (invoke "shr_u469" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "shr_u470" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "shr_u471") (i32.const 1))
-(assert_return (invoke "shr_u472" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "shr_u473" (i32.const 31)) (i32.const 1))
-(assert_return (invoke "shr_u474") (i32.const -1))
-(assert_return (invoke "shr_u475" (i32.const -1)) (i32.const -1))
-(assert_return (invoke "shr_u476" (i32.const 32)) (i32.const -1))
-(assert_return (invoke "shr_u477") (i32.const 0x7fffffff))
-(assert_return (invoke "shr_u478" (i32.const -1)) (i32.const 0x7fffffff))
-(assert_return (invoke "shr_u479" (i32.const 33)) (i32.const 0x7fffffff))
+(assert_return (invoke "shr_s437" (i32.const 33)) (i32.const -1))
+(assert_return (invoke "shr_s438") (i32.const -1))
+(assert_return (invoke "shr_s439" (i32.const -1)) (i32.const -1))
+(assert_return (invoke "shr_s440" (i32.const -1)) (i32.const -1))
+(assert_return (invoke "shr_s441") (i32.const -1))
+(assert_return (invoke "shr_s442" (i32.const -1)) (i32.const -1))
+(assert_return (invoke "shr_s443" (i32.const 0x7fffffff)) (i32.const -1))
+(assert_return (invoke "shr_s444") (i32.const -1))
+(assert_return (invoke "shr_s445" (i32.const -1)) (i32.const -1))
+(assert_return (invoke "shr_s446" (i32.const 0x80000000)) (i32.const -1))
+(assert_return (invoke "shr_u447") (i32.const 0))
+(assert_return (invoke "shr_u448" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "shr_u449" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "shr_u450") (i32.const 1))
+(assert_return (invoke "shr_u451" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "shr_u452" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "shr_u453") (i32.const 0x7fffffff))
+(assert_return (invoke "shr_u454" (i32.const -1)) (i32.const 0x7fffffff))
+(assert_return (invoke "shr_u455" (i32.const 1)) (i32.const 0x7fffffff))
+(assert_return (invoke "shr_u456") (i32.const 0x3fffffff))
+(assert_return (invoke "shr_u457" (i32.const 0x7fffffff)) (i32.const 0x3fffffff))
+(assert_return (invoke "shr_u458" (i32.const 1)) (i32.const 0x3fffffff))
+(assert_return (invoke "shr_u459") (i32.const 0x40000000))
+(assert_return (invoke "shr_u460" (i32.const 0x80000000)) (i32.const 0x40000000))
+(assert_return (invoke "shr_u461" (i32.const 1)) (i32.const 0x40000000))
+(assert_return (invoke "shr_u462") (i32.const 0x20000000))
+(assert_return (invoke "shr_u463" (i32.const 0x40000000)) (i32.const 0x20000000))
+(assert_return (invoke "shr_u464" (i32.const 1)) (i32.const 0x20000000))
+(assert_return (invoke "shr_u465") (i32.const 1))
+(assert_return (invoke "shr_u466" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "shr_u467" (i32.const 32)) (i32.const 1))
+(assert_return (invoke "shr_u468") (i32.const 0))
+(assert_return (invoke "shr_u469" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "shr_u470" (i32.const 33)) (i32.const 0))
+(assert_return (invoke "shr_u471") (i32.const 0))
+(assert_return (invoke "shr_u472" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "shr_u473" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "shr_u474") (i32.const 0))
+(assert_return (invoke "shr_u475" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "shr_u476" (i32.const 0x7fffffff)) (i32.const 0))
+(assert_return (invoke "shr_u477") (i32.const 1))
+(assert_return (invoke "shr_u478" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "shr_u479" (i32.const 0x80000000)) (i32.const 1))
 (assert_return (invoke "shr_u480") (i32.const 1))
-(assert_return (invoke "shr_u481" (i32.const -1)) (i32.const 1))
-(assert_return (invoke "shr_u482" (i32.const -1)) (i32.const 1))
-(assert_return (invoke "shr_u483") (i32.const 1))
-(assert_return (invoke "shr_u484" (i32.const -1)) (i32.const 1))
-(assert_return (invoke "shr_u485" (i32.const 0x7fffffff)) (i32.const 1))
-(assert_return (invoke "shr_u486") (i32.const -1))
-(assert_return (invoke "shr_u487" (i32.const -1)) (i32.const -1))
-(assert_return (invoke "shr_u488" (i32.const 0x80000000)) (i32.const -1))
-(assert_return (invoke "rotl489") (i32.const 0xe00dc00f))
-(assert_return (invoke "rotl490" (i32.const 0xfe00dc00)) (i32.const 0xe00dc00f))
-(assert_return (invoke "rotl491" (i32.const 4)) (i32.const 0xe00dc00f))
-(assert_return (invoke "rotl492") (i32.const 0x579b30ed))
-(assert_return (invoke "rotl493" (i32.const 0xabcd9876)) (i32.const 0x579b30ed))
-(assert_return (invoke "rotl494" (i32.const 1)) (i32.const 0x579b30ed))
-(assert_return (invoke "rotl495") (i32.const 0x00100000))
-(assert_return (invoke "rotl496" (i32.const 0x00008000)) (i32.const 0x00100000))
-(assert_return (invoke "rotl497" (i32.const 37)) (i32.const 0x00100000))
-(assert_return (invoke "rotl498") (i32.const 0x579beed3))
-(assert_return (invoke "rotl499" (i32.const 0x769abcdf)) (i32.const 0x579beed3))
-(assert_return (invoke "rotl500" (i32.const 0x8000000d)) (i32.const 0x579beed3))
-(assert_return (invoke "rotl501") (i32.const 0x80000000))
-(assert_return (invoke "rotl502" (i32.const 1)) (i32.const 0x80000000))
-(assert_return (invoke "rotl503" (i32.const 31)) (i32.const 0x80000000))
-(assert_return (invoke "rotl504") (i32.const 1))
-(assert_return (invoke "rotl505" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "rotl506" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "rotr507") (i32.const 0x1d860e97))
-(assert_return (invoke "rotr508" (i32.const 0xb0c1d2e3)) (i32.const 0x1d860e97))
-(assert_return (invoke "rotr509" (i32.const 0x0005)) (i32.const 0x1d860e97))
-(assert_return (invoke "rotr510") (i32.const 0x1d860e97))
-(assert_return (invoke "rotr511" (i32.const 0xb0c1d2e3)) (i32.const 0x1d860e97))
-(assert_return (invoke "rotr512" (i32.const 0xff05)) (i32.const 0x1d860e97))
-(assert_return (invoke "rotr513") (i32.const 0x7f806600))
-(assert_return (invoke "rotr514" (i32.const 0xff00cc00)) (i32.const 0x7f806600))
-(assert_return (invoke "rotr515" (i32.const 1)) (i32.const 0x7f806600))
-(assert_return (invoke "rotr516") (i32.const 0x00008000))
-(assert_return (invoke "rotr517" (i32.const 0x00080000)) (i32.const 0x00008000))
-(assert_return (invoke "rotr518" (i32.const 4)) (i32.const 0x00008000))
-(assert_return (invoke "rotr519") (i32.const 0xe6fbb4d5))
-(assert_return (invoke "rotr520" (i32.const 0x769abcdf)) (i32.const 0xe6fbb4d5))
-(assert_return (invoke "rotr521" (i32.const 0xffffffed)) (i32.const 0xe6fbb4d5))
-(assert_return (invoke "rotr522") (i32.const 0x80000000))
-(assert_return (invoke "rotr523" (i32.const 1)) (i32.const 0x80000000))
-(assert_return (invoke "rotr524" (i32.const 1)) (i32.const 0x80000000))
-(assert_return (invoke "rotr525") (i32.const 1))
-(assert_return (invoke "rotr526" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "rotr527" (i32.const 31)) (i32.const 1))
-(assert_return (invoke "clz528") (i32.const 0))
-(assert_return (invoke "clz529") (i32.const 32))
-(assert_return (invoke "clz530") (i32.const 16))
-(assert_return (invoke "clz531") (i32.const 24))
-(assert_return (invoke "clz532") (i32.const 0))
-(assert_return (invoke "clz533") (i32.const 31))
-(assert_return (invoke "clz534") (i32.const 30))
-(assert_return (invoke "clz535") (i32.const 1))
-(assert_return (invoke "ctz536") (i32.const 0))
-(assert_return (invoke "ctz537") (i32.const 32))
-(assert_return (invoke "ctz538") (i32.const 15))
-(assert_return (invoke "ctz539") (i32.const 16))
-(assert_return (invoke "ctz540") (i32.const 31))
-(assert_return (invoke "ctz541") (i32.const 0))
-(assert_return (invoke "popcnt542") (i32.const 32))
-(assert_return (invoke "popcnt543") (i32.const 0))
-(assert_return (invoke "popcnt544") (i32.const 1))
-(assert_return (invoke "popcnt545") (i32.const 2))
-(assert_return (invoke "popcnt546") (i32.const 31))
-(assert_return (invoke "popcnt547") (i32.const 16))
-(assert_return (invoke "popcnt548") (i32.const 16))
-(assert_return (invoke "popcnt549") (i32.const 24))
-(assert_return (invoke "eqz550") (i32.const 1))
-(assert_return (invoke "eqz551") (i32.const 0))
-(assert_return (invoke "eqz552") (i32.const 0))
-(assert_return (invoke "eqz553") (i32.const 0))
-(assert_return (invoke "eq554") (i32.const 1))
-(assert_return (invoke "eq555" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "eq556" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "eq557") (i32.const 1))
-(assert_return (invoke "eq558" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "eq559" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "eq560") (i32.const 0))
-(assert_return (invoke "eq561" (i32.const -1)) (i32.const 0))
-(assert_return (invoke "eq562" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "eq563") (i32.const 1))
-(assert_return (invoke "eq564" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "eq565" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "eq566") (i32.const 1))
-(assert_return (invoke "eq567" (i32.const 0x7fffffff)) (i32.const 1))
-(assert_return (invoke "eq568" (i32.const 0x7fffffff)) (i32.const 1))
-(assert_return (invoke "eq569") (i32.const 1))
-(assert_return (invoke "eq570" (i32.const -1)) (i32.const 1))
-(assert_return (invoke "eq571" (i32.const -1)) (i32.const 1))
-(assert_return (invoke "eq572") (i32.const 0))
-(assert_return (invoke "eq573" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "eq574" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "eq575") (i32.const 0))
-(assert_return (invoke "eq576" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "eq577" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "eq578") (i32.const 0))
-(assert_return (invoke "eq579" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "eq580" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "eq581") (i32.const 0))
-(assert_return (invoke "eq582" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "eq583" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "eq584") (i32.const 0))
-(assert_return (invoke "eq585" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "eq586" (i32.const -1)) (i32.const 0))
-(assert_return (invoke "eq587") (i32.const 0))
-(assert_return (invoke "eq588" (i32.const -1)) (i32.const 0))
-(assert_return (invoke "eq589" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "eq590") (i32.const 0))
-(assert_return (invoke "eq591" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "eq592" (i32.const 0x7fffffff)) (i32.const 0))
-(assert_return (invoke "eq593") (i32.const 0))
-(assert_return (invoke "eq594" (i32.const 0x7fffffff)) (i32.const 0))
-(assert_return (invoke "eq595" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "ne596") (i32.const 0))
-(assert_return (invoke "ne597" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "ne598" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "ne599") (i32.const 0))
-(assert_return (invoke "ne600" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "ne601" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "ne602") (i32.const 1))
-(assert_return (invoke "ne603" (i32.const -1)) (i32.const 1))
-(assert_return (invoke "ne604" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "ne605") (i32.const 0))
-(assert_return (invoke "ne606" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "ne607" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "ne608") (i32.const 0))
-(assert_return (invoke "ne609" (i32.const 0x7fffffff)) (i32.const 0))
-(assert_return (invoke "ne610" (i32.const 0x7fffffff)) (i32.const 0))
-(assert_return (invoke "ne611") (i32.const 0))
-(assert_return (invoke "ne612" (i32.const -1)) (i32.const 0))
-(assert_return (invoke "ne613" (i32.const -1)) (i32.const 0))
-(assert_return (invoke "ne614") (i32.const 1))
-(assert_return (invoke "ne615" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "ne616" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "ne617") (i32.const 1))
-(assert_return (invoke "ne618" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "ne619" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "ne620") (i32.const 1))
-(assert_return (invoke "ne621" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "ne622" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "ne623") (i32.const 1))
-(assert_return (invoke "ne624" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "ne625" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "ne626") (i32.const 1))
-(assert_return (invoke "ne627" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "ne628" (i32.const -1)) (i32.const 1))
-(assert_return (invoke "ne629") (i32.const 1))
-(assert_return (invoke "ne630" (i32.const -1)) (i32.const 1))
-(assert_return (invoke "ne631" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "ne632") (i32.const 1))
-(assert_return (invoke "ne633" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "ne634" (i32.const 0x7fffffff)) (i32.const 1))
-(assert_return (invoke "ne635") (i32.const 1))
-(assert_return (invoke "ne636" (i32.const 0x7fffffff)) (i32.const 1))
-(assert_return (invoke "ne637" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "lt_s638") (i32.const 0))
-(assert_return (invoke "lt_s639" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "lt_s640" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "lt_s641") (i32.const 0))
-(assert_return (invoke "lt_s642" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "lt_s643" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "lt_s644") (i32.const 1))
-(assert_return (invoke "lt_s645" (i32.const -1)) (i32.const 1))
-(assert_return (invoke "lt_s646" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "lt_s647") (i32.const 0))
-(assert_return (invoke "lt_s648" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "lt_s649" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "lt_s650") (i32.const 0))
-(assert_return (invoke "lt_s651" (i32.const 0x7fffffff)) (i32.const 0))
-(assert_return (invoke "lt_s652" (i32.const 0x7fffffff)) (i32.const 0))
-(assert_return (invoke "lt_s653") (i32.const 0))
-(assert_return (invoke "lt_s654" (i32.const -1)) (i32.const 0))
-(assert_return (invoke "lt_s655" (i32.const -1)) (i32.const 0))
-(assert_return (invoke "lt_s656") (i32.const 0))
-(assert_return (invoke "lt_s657" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "lt_s658" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "lt_s659") (i32.const 1))
-(assert_return (invoke "lt_s660" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "lt_s661" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "lt_s662") (i32.const 1))
-(assert_return (invoke "lt_s663" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "lt_s664" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "lt_s665") (i32.const 0))
-(assert_return (invoke "lt_s666" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "lt_s667" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "lt_s668") (i32.const 1))
-(assert_return (invoke "lt_s669" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "lt_s670" (i32.const -1)) (i32.const 1))
-(assert_return (invoke "lt_s671") (i32.const 0))
-(assert_return (invoke "lt_s672" (i32.const -1)) (i32.const 0))
-(assert_return (invoke "lt_s673" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "lt_s674") (i32.const 1))
-(assert_return (invoke "lt_s675" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "lt_s676" (i32.const 0x7fffffff)) (i32.const 1))
-(assert_return (invoke "lt_s677") (i32.const 0))
-(assert_return (invoke "lt_s678" (i32.const 0x7fffffff)) (i32.const 0))
-(assert_return (invoke "lt_s679" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "lt_u680") (i32.const 0))
-(assert_return (invoke "lt_u681" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "lt_u682" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "lt_u683") (i32.const 0))
-(assert_return (invoke "lt_u684" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "lt_u685" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "lt_u686") (i32.const 0))
-(assert_return (invoke "lt_u687" (i32.const -1)) (i32.const 0))
-(assert_return (invoke "lt_u688" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "lt_u689") (i32.const 0))
-(assert_return (invoke "lt_u690" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "lt_u691" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "lt_u692") (i32.const 0))
-(assert_return (invoke "lt_u693" (i32.const 0x7fffffff)) (i32.const 0))
-(assert_return (invoke "lt_u694" (i32.const 0x7fffffff)) (i32.const 0))
-(assert_return (invoke "lt_u695") (i32.const 0))
-(assert_return (invoke "lt_u696" (i32.const -1)) (i32.const 0))
-(assert_return (invoke "lt_u697" (i32.const -1)) (i32.const 0))
-(assert_return (invoke "lt_u698") (i32.const 0))
-(assert_return (invoke "lt_u699" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "lt_u700" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "lt_u701") (i32.const 1))
-(assert_return (invoke "lt_u702" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "lt_u703" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "lt_u704") (i32.const 0))
-(assert_return (invoke "lt_u705" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "lt_u706" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "lt_u707") (i32.const 1))
-(assert_return (invoke "lt_u708" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "lt_u709" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "lt_u710") (i32.const 1))
-(assert_return (invoke "lt_u711" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "lt_u712" (i32.const -1)) (i32.const 1))
-(assert_return (invoke "lt_u713") (i32.const 0))
-(assert_return (invoke "lt_u714" (i32.const -1)) (i32.const 0))
-(assert_return (invoke "lt_u715" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "lt_u716") (i32.const 0))
-(assert_return (invoke "lt_u717" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "lt_u718" (i32.const 0x7fffffff)) (i32.const 0))
-(assert_return (invoke "lt_u719") (i32.const 1))
-(assert_return (invoke "lt_u720" (i32.const 0x7fffffff)) (i32.const 1))
-(assert_return (invoke "lt_u721" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "le_s722") (i32.const 1))
-(assert_return (invoke "le_s723" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "le_s724" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "le_s725") (i32.const 1))
-(assert_return (invoke "le_s726" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "le_s727" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "le_s728") (i32.const 1))
-(assert_return (invoke "le_s729" (i32.const -1)) (i32.const 1))
-(assert_return (invoke "le_s730" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "le_s731") (i32.const 1))
-(assert_return (invoke "le_s732" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "le_s733" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "le_s734") (i32.const 1))
-(assert_return (invoke "le_s735" (i32.const 0x7fffffff)) (i32.const 1))
-(assert_return (invoke "le_s736" (i32.const 0x7fffffff)) (i32.const 1))
-(assert_return (invoke "le_s737") (i32.const 1))
-(assert_return (invoke "le_s738" (i32.const -1)) (i32.const 1))
-(assert_return (invoke "le_s739" (i32.const -1)) (i32.const 1))
-(assert_return (invoke "le_s740") (i32.const 0))
-(assert_return (invoke "le_s741" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "le_s742" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "le_s743") (i32.const 1))
-(assert_return (invoke "le_s744" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "le_s745" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "le_s746") (i32.const 1))
-(assert_return (invoke "le_s747" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "le_s748" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "le_s749") (i32.const 0))
-(assert_return (invoke "le_s750" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "le_s751" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "le_s752") (i32.const 1))
-(assert_return (invoke "le_s753" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "le_s754" (i32.const -1)) (i32.const 1))
-(assert_return (invoke "le_s755") (i32.const 0))
-(assert_return (invoke "le_s756" (i32.const -1)) (i32.const 0))
-(assert_return (invoke "le_s757" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "le_s758") (i32.const 1))
-(assert_return (invoke "le_s759" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "le_s760" (i32.const 0x7fffffff)) (i32.const 1))
-(assert_return (invoke "le_s761") (i32.const 0))
-(assert_return (invoke "le_s762" (i32.const 0x7fffffff)) (i32.const 0))
-(assert_return (invoke "le_s763" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "le_u764") (i32.const 1))
-(assert_return (invoke "le_u765" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "le_u766" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "le_u767") (i32.const 1))
-(assert_return (invoke "le_u768" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "le_u769" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "le_u770") (i32.const 0))
-(assert_return (invoke "le_u771" (i32.const -1)) (i32.const 0))
-(assert_return (invoke "le_u772" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "le_u773") (i32.const 1))
-(assert_return (invoke "le_u774" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "le_u775" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "le_u776") (i32.const 1))
-(assert_return (invoke "le_u777" (i32.const 0x7fffffff)) (i32.const 1))
-(assert_return (invoke "le_u778" (i32.const 0x7fffffff)) (i32.const 1))
-(assert_return (invoke "le_u779") (i32.const 1))
-(assert_return (invoke "le_u780" (i32.const -1)) (i32.const 1))
-(assert_return (invoke "le_u781" (i32.const -1)) (i32.const 1))
-(assert_return (invoke "le_u782") (i32.const 0))
-(assert_return (invoke "le_u783" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "le_u784" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "le_u785") (i32.const 1))
-(assert_return (invoke "le_u786" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "le_u787" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "le_u788") (i32.const 0))
-(assert_return (invoke "le_u789" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "le_u790" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "le_u791") (i32.const 1))
-(assert_return (invoke "le_u792" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "le_u793" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "le_u794") (i32.const 1))
-(assert_return (invoke "le_u795" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "le_u796" (i32.const -1)) (i32.const 1))
-(assert_return (invoke "le_u797") (i32.const 0))
-(assert_return (invoke "le_u798" (i32.const -1)) (i32.const 0))
-(assert_return (invoke "le_u799" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "le_u800") (i32.const 0))
-(assert_return (invoke "le_u801" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "le_u802" (i32.const 0x7fffffff)) (i32.const 0))
-(assert_return (invoke "le_u803") (i32.const 1))
-(assert_return (invoke "le_u804" (i32.const 0x7fffffff)) (i32.const 1))
-(assert_return (invoke "le_u805" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "gt_s806") (i32.const 0))
-(assert_return (invoke "gt_s807" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "gt_s808" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "gt_s809") (i32.const 0))
-(assert_return (invoke "gt_s810" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "gt_s811" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "gt_s812") (i32.const 0))
-(assert_return (invoke "gt_s813" (i32.const -1)) (i32.const 0))
-(assert_return (invoke "gt_s814" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "gt_s815") (i32.const 0))
-(assert_return (invoke "gt_s816" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "gt_s817" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "gt_s818") (i32.const 0))
-(assert_return (invoke "gt_s819" (i32.const 0x7fffffff)) (i32.const 0))
-(assert_return (invoke "gt_s820" (i32.const 0x7fffffff)) (i32.const 0))
-(assert_return (invoke "gt_s821") (i32.const 0))
-(assert_return (invoke "gt_s822" (i32.const -1)) (i32.const 0))
-(assert_return (invoke "gt_s823" (i32.const -1)) (i32.const 0))
-(assert_return (invoke "gt_s824") (i32.const 1))
-(assert_return (invoke "gt_s825" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "gt_s826" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "gt_s827") (i32.const 0))
-(assert_return (invoke "gt_s828" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "gt_s829" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "gt_s830") (i32.const 0))
-(assert_return (invoke "gt_s831" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "gt_s832" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "gt_s833") (i32.const 1))
-(assert_return (invoke "gt_s834" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "gt_s835" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "gt_s836") (i32.const 0))
-(assert_return (invoke "gt_s837" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "gt_s838" (i32.const -1)) (i32.const 0))
-(assert_return (invoke "gt_s839") (i32.const 1))
-(assert_return (invoke "gt_s840" (i32.const -1)) (i32.const 1))
-(assert_return (invoke "gt_s841" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "gt_s842") (i32.const 0))
-(assert_return (invoke "gt_s843" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "gt_s844" (i32.const 0x7fffffff)) (i32.const 0))
-(assert_return (invoke "gt_s845") (i32.const 1))
-(assert_return (invoke "gt_s846" (i32.const 0x7fffffff)) (i32.const 1))
-(assert_return (invoke "gt_s847" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "gt_u848") (i32.const 0))
-(assert_return (invoke "gt_u849" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "gt_u850" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "gt_u851") (i32.const 0))
-(assert_return (invoke "gt_u852" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "gt_u853" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "gt_u854") (i32.const 1))
-(assert_return (invoke "gt_u855" (i32.const -1)) (i32.const 1))
-(assert_return (invoke "gt_u856" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "gt_u857") (i32.const 0))
-(assert_return (invoke "gt_u858" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "gt_u859" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "gt_u860") (i32.const 0))
-(assert_return (invoke "gt_u861" (i32.const 0x7fffffff)) (i32.const 0))
-(assert_return (invoke "gt_u862" (i32.const 0x7fffffff)) (i32.const 0))
-(assert_return (invoke "gt_u863") (i32.const 0))
-(assert_return (invoke "gt_u864" (i32.const -1)) (i32.const 0))
-(assert_return (invoke "gt_u865" (i32.const -1)) (i32.const 0))
-(assert_return (invoke "gt_u866") (i32.const 1))
-(assert_return (invoke "gt_u867" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "gt_u868" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "gt_u869") (i32.const 0))
-(assert_return (invoke "gt_u870" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "gt_u871" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "gt_u872") (i32.const 1))
-(assert_return (invoke "gt_u873" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "gt_u874" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "gt_u875") (i32.const 0))
-(assert_return (invoke "gt_u876" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "gt_u877" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "gt_u878") (i32.const 0))
-(assert_return (invoke "gt_u879" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "gt_u880" (i32.const -1)) (i32.const 0))
-(assert_return (invoke "gt_u881") (i32.const 1))
-(assert_return (invoke "gt_u882" (i32.const -1)) (i32.const 1))
-(assert_return (invoke "gt_u883" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "gt_u884") (i32.const 1))
-(assert_return (invoke "gt_u885" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "gt_u886" (i32.const 0x7fffffff)) (i32.const 1))
-(assert_return (invoke "gt_u887") (i32.const 0))
-(assert_return (invoke "gt_u888" (i32.const 0x7fffffff)) (i32.const 0))
-(assert_return (invoke "gt_u889" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "ge_s890") (i32.const 1))
-(assert_return (invoke "ge_s891" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "ge_s892" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "ge_s893") (i32.const 1))
-(assert_return (invoke "ge_s894" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "ge_s895" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "ge_s896") (i32.const 0))
-(assert_return (invoke "ge_s897" (i32.const -1)) (i32.const 0))
-(assert_return (invoke "ge_s898" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "ge_s899") (i32.const 1))
-(assert_return (invoke "ge_s900" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "ge_s901" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "ge_s902") (i32.const 1))
-(assert_return (invoke "ge_s903" (i32.const 0x7fffffff)) (i32.const 1))
-(assert_return (invoke "ge_s904" (i32.const 0x7fffffff)) (i32.const 1))
-(assert_return (invoke "ge_s905") (i32.const 1))
-(assert_return (invoke "ge_s906" (i32.const -1)) (i32.const 1))
-(assert_return (invoke "ge_s907" (i32.const -1)) (i32.const 1))
-(assert_return (invoke "ge_s908") (i32.const 1))
-(assert_return (invoke "ge_s909" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "ge_s910" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "ge_s911") (i32.const 0))
-(assert_return (invoke "ge_s912" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "ge_s913" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "ge_s914") (i32.const 0))
-(assert_return (invoke "ge_s915" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "ge_s916" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "ge_s917") (i32.const 1))
-(assert_return (invoke "ge_s918" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "ge_s919" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "ge_s920") (i32.const 0))
-(assert_return (invoke "ge_s921" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "ge_s922" (i32.const -1)) (i32.const 0))
-(assert_return (invoke "ge_s923") (i32.const 1))
-(assert_return (invoke "ge_s924" (i32.const -1)) (i32.const 1))
-(assert_return (invoke "ge_s925" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "ge_s926") (i32.const 0))
-(assert_return (invoke "ge_s927" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "ge_s928" (i32.const 0x7fffffff)) (i32.const 0))
-(assert_return (invoke "ge_s929") (i32.const 1))
-(assert_return (invoke "ge_s930" (i32.const 0x7fffffff)) (i32.const 1))
-(assert_return (invoke "ge_s931" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "ge_u932") (i32.const 1))
-(assert_return (invoke "ge_u933" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "ge_u934" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "ge_u935") (i32.const 1))
-(assert_return (invoke "ge_u936" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "ge_u937" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "ge_u938") (i32.const 1))
-(assert_return (invoke "ge_u939" (i32.const -1)) (i32.const 1))
-(assert_return (invoke "ge_u940" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "ge_u941") (i32.const 1))
-(assert_return (invoke "ge_u942" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "ge_u943" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "ge_u944") (i32.const 1))
-(assert_return (invoke "ge_u945" (i32.const 0x7fffffff)) (i32.const 1))
-(assert_return (invoke "ge_u946" (i32.const 0x7fffffff)) (i32.const 1))
-(assert_return (invoke "ge_u947") (i32.const 1))
-(assert_return (invoke "ge_u948" (i32.const -1)) (i32.const 1))
-(assert_return (invoke "ge_u949" (i32.const -1)) (i32.const 1))
-(assert_return (invoke "ge_u950") (i32.const 1))
-(assert_return (invoke "ge_u951" (i32.const 1)) (i32.const 1))
-(assert_return (invoke "ge_u952" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "ge_u953") (i32.const 0))
-(assert_return (invoke "ge_u954" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "ge_u955" (i32.const 1)) (i32.const 0))
-(assert_return (invoke "ge_u956") (i32.const 1))
-(assert_return (invoke "ge_u957" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "ge_u958" (i32.const 0)) (i32.const 1))
-(assert_return (invoke "ge_u959") (i32.const 0))
-(assert_return (invoke "ge_u960" (i32.const 0)) (i32.const 0))
-(assert_return (invoke "ge_u961" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "ge_u962") (i32.const 0))
-(assert_return (invoke "ge_u963" (i32.const 0x80000000)) (i32.const 0))
-(assert_return (invoke "ge_u964" (i32.const -1)) (i32.const 0))
-(assert_return (invoke "ge_u965") (i32.const 1))
-(assert_return (invoke "ge_u966" (i32.const -1)) (i32.const 1))
-(assert_return (invoke "ge_u967" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "ge_u968") (i32.const 1))
-(assert_return (invoke "ge_u969" (i32.const 0x80000000)) (i32.const 1))
-(assert_return (invoke "ge_u970" (i32.const 0x7fffffff)) (i32.const 1))
-(assert_return (invoke "ge_u971") (i32.const 0))
-(assert_return (invoke "ge_u972" (i32.const 0x7fffffff)) (i32.const 0))
-(assert_return (invoke "ge_u973" (i32.const 0x80000000)) (i32.const 0))
\ No newline at end of file
+(assert_return (invoke "shr_u481" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "shr_u482" (i32.const 31)) (i32.const 1))
+(assert_return (invoke "shr_u483") (i32.const -1))
+(assert_return (invoke "shr_u484" (i32.const -1)) (i32.const -1))
+(assert_return (invoke "shr_u485" (i32.const 32)) (i32.const -1))
+(assert_return (invoke "shr_u486") (i32.const 0x7fffffff))
+(assert_return (invoke "shr_u487" (i32.const -1)) (i32.const 0x7fffffff))
+(assert_return (invoke "shr_u488" (i32.const 33)) (i32.const 0x7fffffff))
+(assert_return (invoke "shr_u489") (i32.const 1))
+(assert_return (invoke "shr_u490" (i32.const -1)) (i32.const 1))
+(assert_return (invoke "shr_u491" (i32.const -1)) (i32.const 1))
+(assert_return (invoke "shr_u492") (i32.const 1))
+(assert_return (invoke "shr_u493" (i32.const -1)) (i32.const 1))
+(assert_return (invoke "shr_u494" (i32.const 0x7fffffff)) (i32.const 1))
+(assert_return (invoke "shr_u495") (i32.const -1))
+(assert_return (invoke "shr_u496" (i32.const -1)) (i32.const -1))
+(assert_return (invoke "shr_u497" (i32.const 0x80000000)) (i32.const -1))
+(assert_return (invoke "rotl498") (i32.const 2))
+(assert_return (invoke "rotl499" (i32.const 1)) (i32.const 2))
+(assert_return (invoke "rotl500" (i32.const 1)) (i32.const 2))
+(assert_return (invoke "rotl501") (i32.const 1))
+(assert_return (invoke "rotl502" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "rotl503" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "rotl504") (i32.const -1))
+(assert_return (invoke "rotl505" (i32.const -1)) (i32.const -1))
+(assert_return (invoke "rotl506" (i32.const 1)) (i32.const -1))
+(assert_return (invoke "rotl507") (i32.const 1))
+(assert_return (invoke "rotl508" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "rotl509" (i32.const 32)) (i32.const 1))
+(assert_return (invoke "rotl510") (i32.const 0x579b30ed))
+(assert_return (invoke "rotl511" (i32.const 0xabcd9876)) (i32.const 0x579b30ed))
+(assert_return (invoke "rotl512" (i32.const 1)) (i32.const 0x579b30ed))
+(assert_return (invoke "rotl513") (i32.const 0xe00dc00f))
+(assert_return (invoke "rotl514" (i32.const 0xfe00dc00)) (i32.const 0xe00dc00f))
+(assert_return (invoke "rotl515" (i32.const 4)) (i32.const 0xe00dc00f))
+(assert_return (invoke "rotl516") (i32.const 0x183a5c76))
+(assert_return (invoke "rotl517" (i32.const 0xb0c1d2e3)) (i32.const 0x183a5c76))
+(assert_return (invoke "rotl518" (i32.const 5)) (i32.const 0x183a5c76))
+(assert_return (invoke "rotl519") (i32.const 0x00100000))
+(assert_return (invoke "rotl520" (i32.const 0x00008000)) (i32.const 0x00100000))
+(assert_return (invoke "rotl521" (i32.const 37)) (i32.const 0x00100000))
+(assert_return (invoke "rotl522") (i32.const 0x183a5c76))
+(assert_return (invoke "rotl523" (i32.const 0xb0c1d2e3)) (i32.const 0x183a5c76))
+(assert_return (invoke "rotl524" (i32.const 0xff05)) (i32.const 0x183a5c76))
+(assert_return (invoke "rotl525") (i32.const 0x579beed3))
+(assert_return (invoke "rotl526" (i32.const 0x769abcdf)) (i32.const 0x579beed3))
+(assert_return (invoke "rotl527" (i32.const 0xffffffed)) (i32.const 0x579beed3))
+(assert_return (invoke "rotl528") (i32.const 0x579beed3))
+(assert_return (invoke "rotl529" (i32.const 0x769abcdf)) (i32.const 0x579beed3))
+(assert_return (invoke "rotl530" (i32.const 0x8000000d)) (i32.const 0x579beed3))
+(assert_return (invoke "rotl531") (i32.const 0x80000000))
+(assert_return (invoke "rotl532" (i32.const 1)) (i32.const 0x80000000))
+(assert_return (invoke "rotl533" (i32.const 31)) (i32.const 0x80000000))
+(assert_return (invoke "rotl534") (i32.const 1))
+(assert_return (invoke "rotl535" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "rotl536" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "rotr537") (i32.const 0x80000000))
+(assert_return (invoke "rotr538" (i32.const 1)) (i32.const 0x80000000))
+(assert_return (invoke "rotr539" (i32.const 1)) (i32.const 0x80000000))
+(assert_return (invoke "rotr540") (i32.const 1))
+(assert_return (invoke "rotr541" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "rotr542" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "rotr543") (i32.const -1))
+(assert_return (invoke "rotr544" (i32.const -1)) (i32.const -1))
+(assert_return (invoke "rotr545" (i32.const 1)) (i32.const -1))
+(assert_return (invoke "rotr546") (i32.const 1))
+(assert_return (invoke "rotr547" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "rotr548" (i32.const 32)) (i32.const 1))
+(assert_return (invoke "rotr549") (i32.const 0x7f806600))
+(assert_return (invoke "rotr550" (i32.const 0xff00cc00)) (i32.const 0x7f806600))
+(assert_return (invoke "rotr551" (i32.const 1)) (i32.const 0x7f806600))
+(assert_return (invoke "rotr552") (i32.const 0x00008000))
+(assert_return (invoke "rotr553" (i32.const 0x00080000)) (i32.const 0x00008000))
+(assert_return (invoke "rotr554" (i32.const 4)) (i32.const 0x00008000))
+(assert_return (invoke "rotr555") (i32.const 0x1d860e97))
+(assert_return (invoke "rotr556" (i32.const 0xb0c1d2e3)) (i32.const 0x1d860e97))
+(assert_return (invoke "rotr557" (i32.const 5)) (i32.const 0x1d860e97))
+(assert_return (invoke "rotr558") (i32.const 0x00000400))
+(assert_return (invoke "rotr559" (i32.const 0x00008000)) (i32.const 0x00000400))
+(assert_return (invoke "rotr560" (i32.const 37)) (i32.const 0x00000400))
+(assert_return (invoke "rotr561") (i32.const 0x1d860e97))
+(assert_return (invoke "rotr562" (i32.const 0xb0c1d2e3)) (i32.const 0x1d860e97))
+(assert_return (invoke "rotr563" (i32.const 0xff05)) (i32.const 0x1d860e97))
+(assert_return (invoke "rotr564") (i32.const 0xe6fbb4d5))
+(assert_return (invoke "rotr565" (i32.const 0x769abcdf)) (i32.const 0xe6fbb4d5))
+(assert_return (invoke "rotr566" (i32.const 0xffffffed)) (i32.const 0xe6fbb4d5))
+(assert_return (invoke "rotr567") (i32.const 0xe6fbb4d5))
+(assert_return (invoke "rotr568" (i32.const 0x769abcdf)) (i32.const 0xe6fbb4d5))
+(assert_return (invoke "rotr569" (i32.const 0x8000000d)) (i32.const 0xe6fbb4d5))
+(assert_return (invoke "rotr570") (i32.const 2))
+(assert_return (invoke "rotr571" (i32.const 1)) (i32.const 2))
+(assert_return (invoke "rotr572" (i32.const 31)) (i32.const 2))
+(assert_return (invoke "rotr573") (i32.const 1))
+(assert_return (invoke "rotr574" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "rotr575" (i32.const 31)) (i32.const 1))
+(assert_return (invoke "clz576") (i32.const 0))
+(assert_return (invoke "clz577") (i32.const 32))
+(assert_return (invoke "clz578") (i32.const 16))
+(assert_return (invoke "clz579") (i32.const 24))
+(assert_return (invoke "clz580") (i32.const 0))
+(assert_return (invoke "clz581") (i32.const 31))
+(assert_return (invoke "clz582") (i32.const 30))
+(assert_return (invoke "clz583") (i32.const 1))
+(assert_return (invoke "ctz584") (i32.const 0))
+(assert_return (invoke "ctz585") (i32.const 32))
+(assert_return (invoke "ctz586") (i32.const 15))
+(assert_return (invoke "ctz587") (i32.const 16))
+(assert_return (invoke "ctz588") (i32.const 31))
+(assert_return (invoke "ctz589") (i32.const 0))
+(assert_return (invoke "popcnt590") (i32.const 32))
+(assert_return (invoke "popcnt591") (i32.const 0))
+(assert_return (invoke "popcnt592") (i32.const 1))
+(assert_return (invoke "popcnt593") (i32.const 2))
+(assert_return (invoke "popcnt594") (i32.const 31))
+(assert_return (invoke "popcnt595") (i32.const 16))
+(assert_return (invoke "popcnt596") (i32.const 16))
+(assert_return (invoke "popcnt597") (i32.const 24))
+(assert_return (invoke "eqz598") (i32.const 1))
+(assert_return (invoke "eqz599") (i32.const 0))
+(assert_return (invoke "eqz600") (i32.const 0))
+(assert_return (invoke "eqz601") (i32.const 0))
+(assert_return (invoke "eqz602") (i32.const 0))
+(assert_return (invoke "eq603") (i32.const 1))
+(assert_return (invoke "eq604" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "eq605" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "eq606") (i32.const 1))
+(assert_return (invoke "eq607" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "eq608" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "eq609") (i32.const 0))
+(assert_return (invoke "eq610" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "eq611" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "eq612") (i32.const 1))
+(assert_return (invoke "eq613" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "eq614" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "eq615") (i32.const 1))
+(assert_return (invoke "eq616" (i32.const 0x7fffffff)) (i32.const 1))
+(assert_return (invoke "eq617" (i32.const 0x7fffffff)) (i32.const 1))
+(assert_return (invoke "eq618") (i32.const 1))
+(assert_return (invoke "eq619" (i32.const -1)) (i32.const 1))
+(assert_return (invoke "eq620" (i32.const -1)) (i32.const 1))
+(assert_return (invoke "eq621") (i32.const 0))
+(assert_return (invoke "eq622" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "eq623" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "eq624") (i32.const 0))
+(assert_return (invoke "eq625" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "eq626" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "eq627") (i32.const 0))
+(assert_return (invoke "eq628" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "eq629" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "eq630") (i32.const 0))
+(assert_return (invoke "eq631" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "eq632" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "eq633") (i32.const 0))
+(assert_return (invoke "eq634" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "eq635" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "eq636") (i32.const 0))
+(assert_return (invoke "eq637" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "eq638" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "eq639") (i32.const 0))
+(assert_return (invoke "eq640" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "eq641" (i32.const 0x7fffffff)) (i32.const 0))
+(assert_return (invoke "eq642") (i32.const 0))
+(assert_return (invoke "eq643" (i32.const 0x7fffffff)) (i32.const 0))
+(assert_return (invoke "eq644" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "ne645") (i32.const 0))
+(assert_return (invoke "ne646" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "ne647" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "ne648") (i32.const 0))
+(assert_return (invoke "ne649" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "ne650" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "ne651") (i32.const 1))
+(assert_return (invoke "ne652" (i32.const -1)) (i32.const 1))
+(assert_return (invoke "ne653" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "ne654") (i32.const 0))
+(assert_return (invoke "ne655" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "ne656" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "ne657") (i32.const 0))
+(assert_return (invoke "ne658" (i32.const 0x7fffffff)) (i32.const 0))
+(assert_return (invoke "ne659" (i32.const 0x7fffffff)) (i32.const 0))
+(assert_return (invoke "ne660") (i32.const 0))
+(assert_return (invoke "ne661" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "ne662" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "ne663") (i32.const 1))
+(assert_return (invoke "ne664" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "ne665" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "ne666") (i32.const 1))
+(assert_return (invoke "ne667" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "ne668" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "ne669") (i32.const 1))
+(assert_return (invoke "ne670" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "ne671" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "ne672") (i32.const 1))
+(assert_return (invoke "ne673" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "ne674" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "ne675") (i32.const 1))
+(assert_return (invoke "ne676" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "ne677" (i32.const -1)) (i32.const 1))
+(assert_return (invoke "ne678") (i32.const 1))
+(assert_return (invoke "ne679" (i32.const -1)) (i32.const 1))
+(assert_return (invoke "ne680" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "ne681") (i32.const 1))
+(assert_return (invoke "ne682" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "ne683" (i32.const 0x7fffffff)) (i32.const 1))
+(assert_return (invoke "ne684") (i32.const 1))
+(assert_return (invoke "ne685" (i32.const 0x7fffffff)) (i32.const 1))
+(assert_return (invoke "ne686" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "lt_s687") (i32.const 0))
+(assert_return (invoke "lt_s688" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "lt_s689" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "lt_s690") (i32.const 0))
+(assert_return (invoke "lt_s691" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "lt_s692" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "lt_s693") (i32.const 1))
+(assert_return (invoke "lt_s694" (i32.const -1)) (i32.const 1))
+(assert_return (invoke "lt_s695" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "lt_s696") (i32.const 0))
+(assert_return (invoke "lt_s697" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "lt_s698" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "lt_s699") (i32.const 0))
+(assert_return (invoke "lt_s700" (i32.const 0x7fffffff)) (i32.const 0))
+(assert_return (invoke "lt_s701" (i32.const 0x7fffffff)) (i32.const 0))
+(assert_return (invoke "lt_s702") (i32.const 0))
+(assert_return (invoke "lt_s703" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "lt_s704" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "lt_s705") (i32.const 0))
+(assert_return (invoke "lt_s706" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "lt_s707" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "lt_s708") (i32.const 1))
+(assert_return (invoke "lt_s709" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "lt_s710" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "lt_s711") (i32.const 1))
+(assert_return (invoke "lt_s712" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "lt_s713" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "lt_s714") (i32.const 0))
+(assert_return (invoke "lt_s715" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "lt_s716" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "lt_s717") (i32.const 1))
+(assert_return (invoke "lt_s718" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "lt_s719" (i32.const -1)) (i32.const 1))
+(assert_return (invoke "lt_s720") (i32.const 0))
+(assert_return (invoke "lt_s721" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "lt_s722" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "lt_s723") (i32.const 1))
+(assert_return (invoke "lt_s724" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "lt_s725" (i32.const 0x7fffffff)) (i32.const 1))
+(assert_return (invoke "lt_s726") (i32.const 0))
+(assert_return (invoke "lt_s727" (i32.const 0x7fffffff)) (i32.const 0))
+(assert_return (invoke "lt_s728" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "lt_u729") (i32.const 0))
+(assert_return (invoke "lt_u730" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "lt_u731" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "lt_u732") (i32.const 0))
+(assert_return (invoke "lt_u733" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "lt_u734" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "lt_u735") (i32.const 0))
+(assert_return (invoke "lt_u736" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "lt_u737" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "lt_u738") (i32.const 0))
+(assert_return (invoke "lt_u739" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "lt_u740" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "lt_u741") (i32.const 0))
+(assert_return (invoke "lt_u742" (i32.const 0x7fffffff)) (i32.const 0))
+(assert_return (invoke "lt_u743" (i32.const 0x7fffffff)) (i32.const 0))
+(assert_return (invoke "lt_u744") (i32.const 0))
+(assert_return (invoke "lt_u745" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "lt_u746" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "lt_u747") (i32.const 0))
+(assert_return (invoke "lt_u748" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "lt_u749" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "lt_u750") (i32.const 1))
+(assert_return (invoke "lt_u751" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "lt_u752" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "lt_u753") (i32.const 0))
+(assert_return (invoke "lt_u754" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "lt_u755" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "lt_u756") (i32.const 1))
+(assert_return (invoke "lt_u757" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "lt_u758" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "lt_u759") (i32.const 1))
+(assert_return (invoke "lt_u760" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "lt_u761" (i32.const -1)) (i32.const 1))
+(assert_return (invoke "lt_u762") (i32.const 0))
+(assert_return (invoke "lt_u763" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "lt_u764" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "lt_u765") (i32.const 0))
+(assert_return (invoke "lt_u766" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "lt_u767" (i32.const 0x7fffffff)) (i32.const 0))
+(assert_return (invoke "lt_u768") (i32.const 1))
+(assert_return (invoke "lt_u769" (i32.const 0x7fffffff)) (i32.const 1))
+(assert_return (invoke "lt_u770" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "le_s771") (i32.const 1))
+(assert_return (invoke "le_s772" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "le_s773" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "le_s774") (i32.const 1))
+(assert_return (invoke "le_s775" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "le_s776" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "le_s777") (i32.const 1))
+(assert_return (invoke "le_s778" (i32.const -1)) (i32.const 1))
+(assert_return (invoke "le_s779" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "le_s780") (i32.const 1))
+(assert_return (invoke "le_s781" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "le_s782" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "le_s783") (i32.const 1))
+(assert_return (invoke "le_s784" (i32.const 0x7fffffff)) (i32.const 1))
+(assert_return (invoke "le_s785" (i32.const 0x7fffffff)) (i32.const 1))
+(assert_return (invoke "le_s786") (i32.const 1))
+(assert_return (invoke "le_s787" (i32.const -1)) (i32.const 1))
+(assert_return (invoke "le_s788" (i32.const -1)) (i32.const 1))
+(assert_return (invoke "le_s789") (i32.const 0))
+(assert_return (invoke "le_s790" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "le_s791" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "le_s792") (i32.const 1))
+(assert_return (invoke "le_s793" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "le_s794" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "le_s795") (i32.const 1))
+(assert_return (invoke "le_s796" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "le_s797" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "le_s798") (i32.const 0))
+(assert_return (invoke "le_s799" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "le_s800" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "le_s801") (i32.const 1))
+(assert_return (invoke "le_s802" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "le_s803" (i32.const -1)) (i32.const 1))
+(assert_return (invoke "le_s804") (i32.const 0))
+(assert_return (invoke "le_s805" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "le_s806" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "le_s807") (i32.const 1))
+(assert_return (invoke "le_s808" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "le_s809" (i32.const 0x7fffffff)) (i32.const 1))
+(assert_return (invoke "le_s810") (i32.const 0))
+(assert_return (invoke "le_s811" (i32.const 0x7fffffff)) (i32.const 0))
+(assert_return (invoke "le_s812" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "le_u813") (i32.const 1))
+(assert_return (invoke "le_u814" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "le_u815" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "le_u816") (i32.const 1))
+(assert_return (invoke "le_u817" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "le_u818" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "le_u819") (i32.const 0))
+(assert_return (invoke "le_u820" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "le_u821" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "le_u822") (i32.const 1))
+(assert_return (invoke "le_u823" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "le_u824" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "le_u825") (i32.const 1))
+(assert_return (invoke "le_u826" (i32.const 0x7fffffff)) (i32.const 1))
+(assert_return (invoke "le_u827" (i32.const 0x7fffffff)) (i32.const 1))
+(assert_return (invoke "le_u828") (i32.const 1))
+(assert_return (invoke "le_u829" (i32.const -1)) (i32.const 1))
+(assert_return (invoke "le_u830" (i32.const -1)) (i32.const 1))
+(assert_return (invoke "le_u831") (i32.const 0))
+(assert_return (invoke "le_u832" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "le_u833" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "le_u834") (i32.const 1))
+(assert_return (invoke "le_u835" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "le_u836" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "le_u837") (i32.const 0))
+(assert_return (invoke "le_u838" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "le_u839" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "le_u840") (i32.const 1))
+(assert_return (invoke "le_u841" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "le_u842" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "le_u843") (i32.const 1))
+(assert_return (invoke "le_u844" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "le_u845" (i32.const -1)) (i32.const 1))
+(assert_return (invoke "le_u846") (i32.const 0))
+(assert_return (invoke "le_u847" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "le_u848" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "le_u849") (i32.const 0))
+(assert_return (invoke "le_u850" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "le_u851" (i32.const 0x7fffffff)) (i32.const 0))
+(assert_return (invoke "le_u852") (i32.const 1))
+(assert_return (invoke "le_u853" (i32.const 0x7fffffff)) (i32.const 1))
+(assert_return (invoke "le_u854" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "gt_s855") (i32.const 0))
+(assert_return (invoke "gt_s856" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "gt_s857" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "gt_s858") (i32.const 0))
+(assert_return (invoke "gt_s859" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "gt_s860" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "gt_s861") (i32.const 0))
+(assert_return (invoke "gt_s862" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "gt_s863" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "gt_s864") (i32.const 0))
+(assert_return (invoke "gt_s865" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "gt_s866" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "gt_s867") (i32.const 0))
+(assert_return (invoke "gt_s868" (i32.const 0x7fffffff)) (i32.const 0))
+(assert_return (invoke "gt_s869" (i32.const 0x7fffffff)) (i32.const 0))
+(assert_return (invoke "gt_s870") (i32.const 0))
+(assert_return (invoke "gt_s871" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "gt_s872" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "gt_s873") (i32.const 1))
+(assert_return (invoke "gt_s874" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "gt_s875" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "gt_s876") (i32.const 0))
+(assert_return (invoke "gt_s877" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "gt_s878" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "gt_s879") (i32.const 0))
+(assert_return (invoke "gt_s880" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "gt_s881" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "gt_s882") (i32.const 1))
+(assert_return (invoke "gt_s883" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "gt_s884" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "gt_s885") (i32.const 0))
+(assert_return (invoke "gt_s886" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "gt_s887" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "gt_s888") (i32.const 1))
+(assert_return (invoke "gt_s889" (i32.const -1)) (i32.const 1))
+(assert_return (invoke "gt_s890" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "gt_s891") (i32.const 0))
+(assert_return (invoke "gt_s892" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "gt_s893" (i32.const 0x7fffffff)) (i32.const 0))
+(assert_return (invoke "gt_s894") (i32.const 1))
+(assert_return (invoke "gt_s895" (i32.const 0x7fffffff)) (i32.const 1))
+(assert_return (invoke "gt_s896" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "gt_u897") (i32.const 0))
+(assert_return (invoke "gt_u898" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "gt_u899" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "gt_u900") (i32.const 0))
+(assert_return (invoke "gt_u901" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "gt_u902" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "gt_u903") (i32.const 1))
+(assert_return (invoke "gt_u904" (i32.const -1)) (i32.const 1))
+(assert_return (invoke "gt_u905" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "gt_u906") (i32.const 0))
+(assert_return (invoke "gt_u907" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "gt_u908" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "gt_u909") (i32.const 0))
+(assert_return (invoke "gt_u910" (i32.const 0x7fffffff)) (i32.const 0))
+(assert_return (invoke "gt_u911" (i32.const 0x7fffffff)) (i32.const 0))
+(assert_return (invoke "gt_u912") (i32.const 0))
+(assert_return (invoke "gt_u913" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "gt_u914" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "gt_u915") (i32.const 1))
+(assert_return (invoke "gt_u916" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "gt_u917" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "gt_u918") (i32.const 0))
+(assert_return (invoke "gt_u919" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "gt_u920" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "gt_u921") (i32.const 1))
+(assert_return (invoke "gt_u922" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "gt_u923" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "gt_u924") (i32.const 0))
+(assert_return (invoke "gt_u925" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "gt_u926" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "gt_u927") (i32.const 0))
+(assert_return (invoke "gt_u928" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "gt_u929" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "gt_u930") (i32.const 1))
+(assert_return (invoke "gt_u931" (i32.const -1)) (i32.const 1))
+(assert_return (invoke "gt_u932" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "gt_u933") (i32.const 1))
+(assert_return (invoke "gt_u934" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "gt_u935" (i32.const 0x7fffffff)) (i32.const 1))
+(assert_return (invoke "gt_u936") (i32.const 0))
+(assert_return (invoke "gt_u937" (i32.const 0x7fffffff)) (i32.const 0))
+(assert_return (invoke "gt_u938" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "ge_s939") (i32.const 1))
+(assert_return (invoke "ge_s940" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "ge_s941" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "ge_s942") (i32.const 1))
+(assert_return (invoke "ge_s943" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "ge_s944" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "ge_s945") (i32.const 0))
+(assert_return (invoke "ge_s946" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "ge_s947" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "ge_s948") (i32.const 1))
+(assert_return (invoke "ge_s949" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "ge_s950" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "ge_s951") (i32.const 1))
+(assert_return (invoke "ge_s952" (i32.const 0x7fffffff)) (i32.const 1))
+(assert_return (invoke "ge_s953" (i32.const 0x7fffffff)) (i32.const 1))
+(assert_return (invoke "ge_s954") (i32.const 1))
+(assert_return (invoke "ge_s955" (i32.const -1)) (i32.const 1))
+(assert_return (invoke "ge_s956" (i32.const -1)) (i32.const 1))
+(assert_return (invoke "ge_s957") (i32.const 1))
+(assert_return (invoke "ge_s958" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "ge_s959" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "ge_s960") (i32.const 0))
+(assert_return (invoke "ge_s961" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "ge_s962" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "ge_s963") (i32.const 0))
+(assert_return (invoke "ge_s964" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "ge_s965" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "ge_s966") (i32.const 1))
+(assert_return (invoke "ge_s967" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "ge_s968" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "ge_s969") (i32.const 0))
+(assert_return (invoke "ge_s970" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "ge_s971" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "ge_s972") (i32.const 1))
+(assert_return (invoke "ge_s973" (i32.const -1)) (i32.const 1))
+(assert_return (invoke "ge_s974" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "ge_s975") (i32.const 0))
+(assert_return (invoke "ge_s976" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "ge_s977" (i32.const 0x7fffffff)) (i32.const 0))
+(assert_return (invoke "ge_s978") (i32.const 1))
+(assert_return (invoke "ge_s979" (i32.const 0x7fffffff)) (i32.const 1))
+(assert_return (invoke "ge_s980" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "ge_u981") (i32.const 1))
+(assert_return (invoke "ge_u982" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "ge_u983" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "ge_u984") (i32.const 1))
+(assert_return (invoke "ge_u985" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "ge_u986" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "ge_u987") (i32.const 1))
+(assert_return (invoke "ge_u988" (i32.const -1)) (i32.const 1))
+(assert_return (invoke "ge_u989" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "ge_u990") (i32.const 1))
+(assert_return (invoke "ge_u991" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "ge_u992" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "ge_u993") (i32.const 1))
+(assert_return (invoke "ge_u994" (i32.const 0x7fffffff)) (i32.const 1))
+(assert_return (invoke "ge_u995" (i32.const 0x7fffffff)) (i32.const 1))
+(assert_return (invoke "ge_u996") (i32.const 1))
+(assert_return (invoke "ge_u997" (i32.const -1)) (i32.const 1))
+(assert_return (invoke "ge_u998" (i32.const -1)) (i32.const 1))
+(assert_return (invoke "ge_u999") (i32.const 1))
+(assert_return (invoke "ge_u1000" (i32.const 1)) (i32.const 1))
+(assert_return (invoke "ge_u1001" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "ge_u1002") (i32.const 0))
+(assert_return (invoke "ge_u1003" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "ge_u1004" (i32.const 1)) (i32.const 0))
+(assert_return (invoke "ge_u1005") (i32.const 1))
+(assert_return (invoke "ge_u1006" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "ge_u1007" (i32.const 0)) (i32.const 1))
+(assert_return (invoke "ge_u1008") (i32.const 0))
+(assert_return (invoke "ge_u1009" (i32.const 0)) (i32.const 0))
+(assert_return (invoke "ge_u1010" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "ge_u1011") (i32.const 0))
+(assert_return (invoke "ge_u1012" (i32.const 0x80000000)) (i32.const 0))
+(assert_return (invoke "ge_u1013" (i32.const -1)) (i32.const 0))
+(assert_return (invoke "ge_u1014") (i32.const 1))
+(assert_return (invoke "ge_u1015" (i32.const -1)) (i32.const 1))
+(assert_return (invoke "ge_u1016" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "ge_u1017") (i32.const 1))
+(assert_return (invoke "ge_u1018" (i32.const 0x80000000)) (i32.const 1))
+(assert_return (invoke "ge_u1019" (i32.const 0x7fffffff)) (i32.const 1))
+(assert_return (invoke "ge_u1020") (i32.const 0))
+(assert_return (invoke "ge_u1021" (i32.const 0x7fffffff)) (i32.const 0))
+(assert_return (invoke "ge_u1022" (i32.const 0x80000000)) (i32.const 0))
\ No newline at end of file
diff --git a/test/WasmSpec/testsuite/chakra/chakra_i64.wast b/test/WasmSpec/testsuite/chakra/chakra_i64.wast
index a3769d1..8d12cda 100644
--- a/test/WasmSpec/testsuite/chakra/chakra_i64.wast
+++ b/test/WasmSpec/testsuite/chakra/chakra_i64.wast
@@ -74,917 +74,960 @@
   (func (export "mul66") (result i64) (i64.mul (i64.const 0x0123456789abcdef) (i64.const 0xfedcba9876543210)))
   (func (export "mul67") (param $x i64) (result i64) (i64.mul (get_local $x) (i64.const 0xfedcba9876543210)))
   (func (export "mul68") (param $y i64) (result i64) (i64.mul (i64.const 0x0123456789abcdef) (get_local $y)))
-  (func (export "div_s69") (result i64) (i64.div_s (i64.const 1) (i64.const 0)))
-  (func (export "div_s70") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const 0)))
-  (func (export "div_s71") (param $y i64) (result i64) (i64.div_s (i64.const 1) (get_local $y)))
-  (func (export "div_s72") (result i64) (i64.div_s (i64.const 0) (i64.const 0)))
+  (func (export "mul69") (result i64) (i64.mul (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)))
+  (func (export "mul70") (param $x i64) (result i64) (i64.mul (get_local $x) (i64.const 0x7fffffffffffffff)))
+  (func (export "mul71") (param $y i64) (result i64) (i64.mul (i64.const 0x7fffffffffffffff) (get_local $y)))
+  (func (export "div_s72") (result i64) (i64.div_s (i64.const 1) (i64.const 0)))
   (func (export "div_s73") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const 0)))
-  (func (export "div_s74") (param $y i64) (result i64) (i64.div_s (i64.const 0) (get_local $y)))
-  (func (export "div_s75") (result i64) (i64.div_s (i64.const 0x8000000000000000) (i64.const -1)))
-  (func (export "div_s76") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const -1)))
-  (func (export "div_s77") (param $y i64) (result i64) (i64.div_s (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "div_s78") (result i64) (i64.div_s (i64.const 1) (i64.const 1)))
-  (func (export "div_s79") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const 1)))
-  (func (export "div_s80") (param $y i64) (result i64) (i64.div_s (i64.const 1) (get_local $y)))
-  (func (export "div_s81") (result i64) (i64.div_s (i64.const 0) (i64.const 1)))
+  (func (export "div_s74") (param $y i64) (result i64) (i64.div_s (i64.const 1) (get_local $y)))
+  (func (export "div_s75") (result i64) (i64.div_s (i64.const 0) (i64.const 0)))
+  (func (export "div_s76") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const 0)))
+  (func (export "div_s77") (param $y i64) (result i64) (i64.div_s (i64.const 0) (get_local $y)))
+  (func (export "div_s78") (result i64) (i64.div_s (i64.const 0x8000000000000000) (i64.const -1)))
+  (func (export "div_s79") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const -1)))
+  (func (export "div_s80") (param $y i64) (result i64) (i64.div_s (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "div_s81") (result i64) (i64.div_s (i64.const 1) (i64.const 1)))
   (func (export "div_s82") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const 1)))
-  (func (export "div_s83") (param $y i64) (result i64) (i64.div_s (i64.const 0) (get_local $y)))
-  (func (export "div_s84") (result i64) (i64.div_s (i64.const -1) (i64.const -1)))
-  (func (export "div_s85") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const -1)))
-  (func (export "div_s86") (param $y i64) (result i64) (i64.div_s (i64.const -1) (get_local $y)))
-  (func (export "div_s87") (result i64) (i64.div_s (i64.const 0x8000000000000000) (i64.const 2)))
-  (func (export "div_s88") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const 2)))
-  (func (export "div_s89") (param $y i64) (result i64) (i64.div_s (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "div_s90") (result i64) (i64.div_s (i64.const 0x8000000000000001) (i64.const 1000)))
-  (func (export "div_s91") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const 1000)))
-  (func (export "div_s92") (param $y i64) (result i64) (i64.div_s (i64.const 0x8000000000000001) (get_local $y)))
-  (func (export "div_s93") (result i64) (i64.div_s (i64.const 5) (i64.const 2)))
+  (func (export "div_s83") (param $y i64) (result i64) (i64.div_s (i64.const 1) (get_local $y)))
+  (func (export "div_s84") (result i64) (i64.div_s (i64.const 0) (i64.const 1)))
+  (func (export "div_s85") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const 1)))
+  (func (export "div_s86") (param $y i64) (result i64) (i64.div_s (i64.const 0) (get_local $y)))
+  (func (export "div_s87") (result i64) (i64.div_s (i64.const 0) (i64.const -1)))
+  (func (export "div_s88") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const -1)))
+  (func (export "div_s89") (param $y i64) (result i64) (i64.div_s (i64.const 0) (get_local $y)))
+  (func (export "div_s90") (result i64) (i64.div_s (i64.const -1) (i64.const -1)))
+  (func (export "div_s91") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const -1)))
+  (func (export "div_s92") (param $y i64) (result i64) (i64.div_s (i64.const -1) (get_local $y)))
+  (func (export "div_s93") (result i64) (i64.div_s (i64.const 0x8000000000000000) (i64.const 2)))
   (func (export "div_s94") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const 2)))
-  (func (export "div_s95") (param $y i64) (result i64) (i64.div_s (i64.const 5) (get_local $y)))
-  (func (export "div_s96") (result i64) (i64.div_s (i64.const -5) (i64.const 2)))
-  (func (export "div_s97") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const 2)))
-  (func (export "div_s98") (param $y i64) (result i64) (i64.div_s (i64.const -5) (get_local $y)))
-  (func (export "div_s99") (result i64) (i64.div_s (i64.const 5) (i64.const -2)))
-  (func (export "div_s100") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const -2)))
+  (func (export "div_s95") (param $y i64) (result i64) (i64.div_s (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "div_s96") (result i64) (i64.div_s (i64.const 0x8000000000000001) (i64.const 1000)))
+  (func (export "div_s97") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const 1000)))
+  (func (export "div_s98") (param $y i64) (result i64) (i64.div_s (i64.const 0x8000000000000001) (get_local $y)))
+  (func (export "div_s99") (result i64) (i64.div_s (i64.const 5) (i64.const 2)))
+  (func (export "div_s100") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const 2)))
   (func (export "div_s101") (param $y i64) (result i64) (i64.div_s (i64.const 5) (get_local $y)))
-  (func (export "div_s102") (result i64) (i64.div_s (i64.const -5) (i64.const -2)))
-  (func (export "div_s103") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const -2)))
+  (func (export "div_s102") (result i64) (i64.div_s (i64.const -5) (i64.const 2)))
+  (func (export "div_s103") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const 2)))
   (func (export "div_s104") (param $y i64) (result i64) (i64.div_s (i64.const -5) (get_local $y)))
-  (func (export "div_s105") (result i64) (i64.div_s (i64.const 7) (i64.const 3)))
-  (func (export "div_s106") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const 3)))
-  (func (export "div_s107") (param $y i64) (result i64) (i64.div_s (i64.const 7) (get_local $y)))
-  (func (export "div_s108") (result i64) (i64.div_s (i64.const -7) (i64.const 3)))
-  (func (export "div_s109") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const 3)))
-  (func (export "div_s110") (param $y i64) (result i64) (i64.div_s (i64.const -7) (get_local $y)))
-  (func (export "div_s111") (result i64) (i64.div_s (i64.const 7) (i64.const -3)))
-  (func (export "div_s112") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const -3)))
+  (func (export "div_s105") (result i64) (i64.div_s (i64.const 5) (i64.const -2)))
+  (func (export "div_s106") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const -2)))
+  (func (export "div_s107") (param $y i64) (result i64) (i64.div_s (i64.const 5) (get_local $y)))
+  (func (export "div_s108") (result i64) (i64.div_s (i64.const -5) (i64.const -2)))
+  (func (export "div_s109") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const -2)))
+  (func (export "div_s110") (param $y i64) (result i64) (i64.div_s (i64.const -5) (get_local $y)))
+  (func (export "div_s111") (result i64) (i64.div_s (i64.const 7) (i64.const 3)))
+  (func (export "div_s112") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const 3)))
   (func (export "div_s113") (param $y i64) (result i64) (i64.div_s (i64.const 7) (get_local $y)))
-  (func (export "div_s114") (result i64) (i64.div_s (i64.const -7) (i64.const -3)))
-  (func (export "div_s115") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const -3)))
+  (func (export "div_s114") (result i64) (i64.div_s (i64.const -7) (i64.const 3)))
+  (func (export "div_s115") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const 3)))
   (func (export "div_s116") (param $y i64) (result i64) (i64.div_s (i64.const -7) (get_local $y)))
-  (func (export "div_s117") (result i64) (i64.div_s (i64.const 11) (i64.const 5)))
-  (func (export "div_s118") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const 5)))
-  (func (export "div_s119") (param $y i64) (result i64) (i64.div_s (i64.const 11) (get_local $y)))
-  (func (export "div_s120") (result i64) (i64.div_s (i64.const 17) (i64.const 7)))
-  (func (export "div_s121") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const 7)))
-  (func (export "div_s122") (param $y i64) (result i64) (i64.div_s (i64.const 17) (get_local $y)))
-  (func (export "div_u123") (result i64) (i64.div_u (i64.const 1) (i64.const 0)))
-  (func (export "div_u124") (param $x i64) (result i64) (i64.div_u (get_local $x) (i64.const 0)))
-  (func (export "div_u125") (param $y i64) (result i64) (i64.div_u (i64.const 1) (get_local $y)))
-  (func (export "div_u126") (result i64) (i64.div_u (i64.const 0) (i64.const 0)))
-  (func (export "div_u127") (param $x i64) (result i64) (i64.div_u (get_local $x) (i64.const 0)))
-  (func (export "div_u128") (param $y i64) (result i64) (i64.div_u (i64.const 0) (get_local $y)))
-  (func (export "div_u129") (result i64) (i64.div_u (i64.const 1) (i64.const 1)))
-  (func (export "div_u130") (param $x i64) (result i64) (i64.div_u (get_local $x) (i64.const 1)))
+  (func (export "div_s117") (result i64) (i64.div_s (i64.const 7) (i64.const -3)))
+  (func (export "div_s118") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const -3)))
+  (func (export "div_s119") (param $y i64) (result i64) (i64.div_s (i64.const 7) (get_local $y)))
+  (func (export "div_s120") (result i64) (i64.div_s (i64.const -7) (i64.const -3)))
+  (func (export "div_s121") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const -3)))
+  (func (export "div_s122") (param $y i64) (result i64) (i64.div_s (i64.const -7) (get_local $y)))
+  (func (export "div_s123") (result i64) (i64.div_s (i64.const 11) (i64.const 5)))
+  (func (export "div_s124") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const 5)))
+  (func (export "div_s125") (param $y i64) (result i64) (i64.div_s (i64.const 11) (get_local $y)))
+  (func (export "div_s126") (result i64) (i64.div_s (i64.const 17) (i64.const 7)))
+  (func (export "div_s127") (param $x i64) (result i64) (i64.div_s (get_local $x) (i64.const 7)))
+  (func (export "div_s128") (param $y i64) (result i64) (i64.div_s (i64.const 17) (get_local $y)))
+  (func (export "div_u129") (result i64) (i64.div_u (i64.const 1) (i64.const 0)))
+  (func (export "div_u130") (param $x i64) (result i64) (i64.div_u (get_local $x) (i64.const 0)))
   (func (export "div_u131") (param $y i64) (result i64) (i64.div_u (i64.const 1) (get_local $y)))
-  (func (export "div_u132") (result i64) (i64.div_u (i64.const 0) (i64.const 1)))
-  (func (export "div_u133") (param $x i64) (result i64) (i64.div_u (get_local $x) (i64.const 1)))
+  (func (export "div_u132") (result i64) (i64.div_u (i64.const 0) (i64.const 0)))
+  (func (export "div_u133") (param $x i64) (result i64) (i64.div_u (get_local $x) (i64.const 0)))
   (func (export "div_u134") (param $y i64) (result i64) (i64.div_u (i64.const 0) (get_local $y)))
-  (func (export "div_u135") (result i64) (i64.div_u (i64.const -1) (i64.const -1)))
-  (func (export "div_u136") (param $x i64) (result i64) (i64.div_u (get_local $x) (i64.const -1)))
-  (func (export "div_u137") (param $y i64) (result i64) (i64.div_u (i64.const -1) (get_local $y)))
-  (func (export "div_u138") (result i64) (i64.div_u (i64.const 0x8000000000000000) (i64.const -1)))
-  (func (export "div_u139") (param $x i64) (result i64) (i64.div_u (get_local $x) (i64.const -1)))
-  (func (export "div_u140") (param $y i64) (result i64) (i64.div_u (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "div_u141") (result i64) (i64.div_u (i64.const 0x8000000000000000) (i64.const 2)))
-  (func (export "div_u142") (param $x i64) (result i64) (i64.div_u (get_local $x) (i64.const 2)))
-  (func (export "div_u143") (param $y i64) (result i64) (i64.div_u (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "div_u144") (result i64) (i64.div_u (i64.const 0x8ff00ff00ff00ff0) (i64.const 0x100000001)))
-  (func (export "div_u145") (param $x i64) (result i64) (i64.div_u (get_local $x) (i64.const 0x100000001)))
-  (func (export "div_u146") (param $y i64) (result i64) (i64.div_u (i64.const 0x8ff00ff00ff00ff0) (get_local $y)))
-  (func (export "div_u147") (result i64) (i64.div_u (i64.const 0x8000000000000001) (i64.const 1000)))
-  (func (export "div_u148") (param $x i64) (result i64) (i64.div_u (get_local $x) (i64.const 1000)))
-  (func (export "div_u149") (param $y i64) (result i64) (i64.div_u (i64.const 0x8000000000000001) (get_local $y)))
-  (func (export "div_u150") (result i64) (i64.div_u (i64.const 5) (i64.const 2)))
-  (func (export "div_u151") (param $x i64) (result i64) (i64.div_u (get_local $x) (i64.const 2)))
-  (func (export "div_u152") (param $y i64) (result i64) (i64.div_u (i64.const 5) (get_local $y)))
-  (func (export "div_u153") (result i64) (i64.div_u (i64.const -5) (i64.const 2)))
-  (func (export "div_u154") (param $x i64) (result i64) (i64.div_u (get_local $x) (i64.const 2)))
-  (func (export "div_u155") (param $y i64) (result i64) (i64.div_u (i64.const -5) (get_local $y)))
-  (func (export "div_u156") (result i64) (i64.div_u (i64.const 5) (i64.const -2)))
-  (func (export "div_u157") (param $x i64) (result i64) (i64.div_u (get_local $x) (i64.const -2)))
+  (func (export "div_u135") (result i64) (i64.div_u (i64.const 1) (i64.const 1)))
+  (func (export "div_u136") (param $x i64) (result i64) (i64.div_u (get_local $x) (i64.const 1)))
+  (func (export "div_u137") (param $y i64) (result i64) (i64.div_u (i64.const 1) (get_local $y)))
+  (func (export "div_u138") (result i64) (i64.div_u (i64.const 0) (i64.const 1)))
+  (func (export "div_u139") (param $x i64) (result i64) (i64.div_u (get_local $x) (i64.const 1)))
+  (func (export "div_u140") (param $y i64) (result i64) (i64.div_u (i64.const 0) (get_local $y)))
+  (func (export "div_u141") (result i64) (i64.div_u (i64.const -1) (i64.const -1)))
+  (func (export "div_u142") (param $x i64) (result i64) (i64.div_u (get_local $x) (i64.const -1)))
+  (func (export "div_u143") (param $y i64) (result i64) (i64.div_u (i64.const -1) (get_local $y)))
+  (func (export "div_u144") (result i64) (i64.div_u (i64.const 0x8000000000000000) (i64.const -1)))
+  (func (export "div_u145") (param $x i64) (result i64) (i64.div_u (get_local $x) (i64.const -1)))
+  (func (export "div_u146") (param $y i64) (result i64) (i64.div_u (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "div_u147") (result i64) (i64.div_u (i64.const 0x8000000000000000) (i64.const 2)))
+  (func (export "div_u148") (param $x i64) (result i64) (i64.div_u (get_local $x) (i64.const 2)))
+  (func (export "div_u149") (param $y i64) (result i64) (i64.div_u (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "div_u150") (result i64) (i64.div_u (i64.const 0x8ff00ff00ff00ff0) (i64.const 0x100000001)))
+  (func (export "div_u151") (param $x i64) (result i64) (i64.div_u (get_local $x) (i64.const 0x100000001)))
+  (func (export "div_u152") (param $y i64) (result i64) (i64.div_u (i64.const 0x8ff00ff00ff00ff0) (get_local $y)))
+  (func (export "div_u153") (result i64) (i64.div_u (i64.const 0x8000000000000001) (i64.const 1000)))
+  (func (export "div_u154") (param $x i64) (result i64) (i64.div_u (get_local $x) (i64.const 1000)))
+  (func (export "div_u155") (param $y i64) (result i64) (i64.div_u (i64.const 0x8000000000000001) (get_local $y)))
+  (func (export "div_u156") (result i64) (i64.div_u (i64.const 5) (i64.const 2)))
+  (func (export "div_u157") (param $x i64) (result i64) (i64.div_u (get_local $x) (i64.const 2)))
   (func (export "div_u158") (param $y i64) (result i64) (i64.div_u (i64.const 5) (get_local $y)))
-  (func (export "div_u159") (result i64) (i64.div_u (i64.const -5) (i64.const -2)))
-  (func (export "div_u160") (param $x i64) (result i64) (i64.div_u (get_local $x) (i64.const -2)))
+  (func (export "div_u159") (result i64) (i64.div_u (i64.const -5) (i64.const 2)))
+  (func (export "div_u160") (param $x i64) (result i64) (i64.div_u (get_local $x) (i64.const 2)))
   (func (export "div_u161") (param $y i64) (result i64) (i64.div_u (i64.const -5) (get_local $y)))
-  (func (export "div_u162") (result i64) (i64.div_u (i64.const 7) (i64.const 3)))
-  (func (export "div_u163") (param $x i64) (result i64) (i64.div_u (get_local $x) (i64.const 3)))
-  (func (export "div_u164") (param $y i64) (result i64) (i64.div_u (i64.const 7) (get_local $y)))
-  (func (export "div_u165") (result i64) (i64.div_u (i64.const 11) (i64.const 5)))
-  (func (export "div_u166") (param $x i64) (result i64) (i64.div_u (get_local $x) (i64.const 5)))
-  (func (export "div_u167") (param $y i64) (result i64) (i64.div_u (i64.const 11) (get_local $y)))
-  (func (export "div_u168") (result i64) (i64.div_u (i64.const 17) (i64.const 7)))
-  (func (export "div_u169") (param $x i64) (result i64) (i64.div_u (get_local $x) (i64.const 7)))
-  (func (export "div_u170") (param $y i64) (result i64) (i64.div_u (i64.const 17) (get_local $y)))
-  (func (export "rem_s171") (result i64) (i64.rem_s (i64.const 1) (i64.const 0)))
-  (func (export "rem_s172") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const 0)))
-  (func (export "rem_s173") (param $y i64) (result i64) (i64.rem_s (i64.const 1) (get_local $y)))
-  (func (export "rem_s174") (result i64) (i64.rem_s (i64.const 0) (i64.const 0)))
-  (func (export "rem_s175") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const 0)))
-  (func (export "rem_s176") (param $y i64) (result i64) (i64.rem_s (i64.const 0) (get_local $y)))
-  (func (export "rem_s177") (result i64) (i64.rem_s (i64.const 0x7fffffffffffffff) (i64.const -1)))
-  (func (export "rem_s178") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const -1)))
-  (func (export "rem_s179") (param $y i64) (result i64) (i64.rem_s (i64.const 0x7fffffffffffffff) (get_local $y)))
-  (func (export "rem_s180") (result i64) (i64.rem_s (i64.const 1) (i64.const 1)))
-  (func (export "rem_s181") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const 1)))
-  (func (export "rem_s182") (param $y i64) (result i64) (i64.rem_s (i64.const 1) (get_local $y)))
-  (func (export "rem_s183") (result i64) (i64.rem_s (i64.const 0) (i64.const 1)))
-  (func (export "rem_s184") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const 1)))
-  (func (export "rem_s185") (param $y i64) (result i64) (i64.rem_s (i64.const 0) (get_local $y)))
-  (func (export "rem_s186") (result i64) (i64.rem_s (i64.const -1) (i64.const -1)))
-  (func (export "rem_s187") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const -1)))
-  (func (export "rem_s188") (param $y i64) (result i64) (i64.rem_s (i64.const -1) (get_local $y)))
-  (func (export "rem_s189") (result i64) (i64.rem_s (i64.const 0x8000000000000000) (i64.const -1)))
-  (func (export "rem_s190") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const -1)))
-  (func (export "rem_s191") (param $y i64) (result i64) (i64.rem_s (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "rem_s192") (result i64) (i64.rem_s (i64.const 0x8000000000000000) (i64.const 2)))
-  (func (export "rem_s193") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const 2)))
-  (func (export "rem_s194") (param $y i64) (result i64) (i64.rem_s (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "rem_s195") (result i64) (i64.rem_s (i64.const 0x8000000000000001) (i64.const 1000)))
-  (func (export "rem_s196") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const 1000)))
-  (func (export "rem_s197") (param $y i64) (result i64) (i64.rem_s (i64.const 0x8000000000000001) (get_local $y)))
-  (func (export "rem_s198") (result i64) (i64.rem_s (i64.const 5) (i64.const 2)))
-  (func (export "rem_s199") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const 2)))
-  (func (export "rem_s200") (param $y i64) (result i64) (i64.rem_s (i64.const 5) (get_local $y)))
-  (func (export "rem_s201") (result i64) (i64.rem_s (i64.const -5) (i64.const 2)))
+  (func (export "div_u162") (result i64) (i64.div_u (i64.const 5) (i64.const -2)))
+  (func (export "div_u163") (param $x i64) (result i64) (i64.div_u (get_local $x) (i64.const -2)))
+  (func (export "div_u164") (param $y i64) (result i64) (i64.div_u (i64.const 5) (get_local $y)))
+  (func (export "div_u165") (result i64) (i64.div_u (i64.const -5) (i64.const -2)))
+  (func (export "div_u166") (param $x i64) (result i64) (i64.div_u (get_local $x) (i64.const -2)))
+  (func (export "div_u167") (param $y i64) (result i64) (i64.div_u (i64.const -5) (get_local $y)))
+  (func (export "div_u168") (result i64) (i64.div_u (i64.const 7) (i64.const 3)))
+  (func (export "div_u169") (param $x i64) (result i64) (i64.div_u (get_local $x) (i64.const 3)))
+  (func (export "div_u170") (param $y i64) (result i64) (i64.div_u (i64.const 7) (get_local $y)))
+  (func (export "div_u171") (result i64) (i64.div_u (i64.const 11) (i64.const 5)))
+  (func (export "div_u172") (param $x i64) (result i64) (i64.div_u (get_local $x) (i64.const 5)))
+  (func (export "div_u173") (param $y i64) (result i64) (i64.div_u (i64.const 11) (get_local $y)))
+  (func (export "div_u174") (result i64) (i64.div_u (i64.const 17) (i64.const 7)))
+  (func (export "div_u175") (param $x i64) (result i64) (i64.div_u (get_local $x) (i64.const 7)))
+  (func (export "div_u176") (param $y i64) (result i64) (i64.div_u (i64.const 17) (get_local $y)))
+  (func (export "rem_s177") (result i64) (i64.rem_s (i64.const 1) (i64.const 0)))
+  (func (export "rem_s178") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const 0)))
+  (func (export "rem_s179") (param $y i64) (result i64) (i64.rem_s (i64.const 1) (get_local $y)))
+  (func (export "rem_s180") (result i64) (i64.rem_s (i64.const 0) (i64.const 0)))
+  (func (export "rem_s181") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const 0)))
+  (func (export "rem_s182") (param $y i64) (result i64) (i64.rem_s (i64.const 0) (get_local $y)))
+  (func (export "rem_s183") (result i64) (i64.rem_s (i64.const 0x7fffffffffffffff) (i64.const -1)))
+  (func (export "rem_s184") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const -1)))
+  (func (export "rem_s185") (param $y i64) (result i64) (i64.rem_s (i64.const 0x7fffffffffffffff) (get_local $y)))
+  (func (export "rem_s186") (result i64) (i64.rem_s (i64.const 1) (i64.const 1)))
+  (func (export "rem_s187") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const 1)))
+  (func (export "rem_s188") (param $y i64) (result i64) (i64.rem_s (i64.const 1) (get_local $y)))
+  (func (export "rem_s189") (result i64) (i64.rem_s (i64.const 0) (i64.const 1)))
+  (func (export "rem_s190") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const 1)))
+  (func (export "rem_s191") (param $y i64) (result i64) (i64.rem_s (i64.const 0) (get_local $y)))
+  (func (export "rem_s192") (result i64) (i64.rem_s (i64.const 0) (i64.const -1)))
+  (func (export "rem_s193") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const -1)))
+  (func (export "rem_s194") (param $y i64) (result i64) (i64.rem_s (i64.const 0) (get_local $y)))
+  (func (export "rem_s195") (result i64) (i64.rem_s (i64.const -1) (i64.const -1)))
+  (func (export "rem_s196") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const -1)))
+  (func (export "rem_s197") (param $y i64) (result i64) (i64.rem_s (i64.const -1) (get_local $y)))
+  (func (export "rem_s198") (result i64) (i64.rem_s (i64.const 0x8000000000000000) (i64.const -1)))
+  (func (export "rem_s199") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const -1)))
+  (func (export "rem_s200") (param $y i64) (result i64) (i64.rem_s (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "rem_s201") (result i64) (i64.rem_s (i64.const 0x8000000000000000) (i64.const 2)))
   (func (export "rem_s202") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const 2)))
-  (func (export "rem_s203") (param $y i64) (result i64) (i64.rem_s (i64.const -5) (get_local $y)))
-  (func (export "rem_s204") (result i64) (i64.rem_s (i64.const 5) (i64.const -2)))
-  (func (export "rem_s205") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const -2)))
-  (func (export "rem_s206") (param $y i64) (result i64) (i64.rem_s (i64.const 5) (get_local $y)))
-  (func (export "rem_s207") (result i64) (i64.rem_s (i64.const -5) (i64.const -2)))
-  (func (export "rem_s208") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const -2)))
-  (func (export "rem_s209") (param $y i64) (result i64) (i64.rem_s (i64.const -5) (get_local $y)))
-  (func (export "rem_s210") (result i64) (i64.rem_s (i64.const 7) (i64.const 3)))
-  (func (export "rem_s211") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const 3)))
-  (func (export "rem_s212") (param $y i64) (result i64) (i64.rem_s (i64.const 7) (get_local $y)))
-  (func (export "rem_s213") (result i64) (i64.rem_s (i64.const -7) (i64.const 3)))
-  (func (export "rem_s214") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const 3)))
-  (func (export "rem_s215") (param $y i64) (result i64) (i64.rem_s (i64.const -7) (get_local $y)))
-  (func (export "rem_s216") (result i64) (i64.rem_s (i64.const 7) (i64.const -3)))
-  (func (export "rem_s217") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const -3)))
-  (func (export "rem_s218") (param $y i64) (result i64) (i64.rem_s (i64.const 7) (get_local $y)))
-  (func (export "rem_s219") (result i64) (i64.rem_s (i64.const -7) (i64.const -3)))
-  (func (export "rem_s220") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const -3)))
-  (func (export "rem_s221") (param $y i64) (result i64) (i64.rem_s (i64.const -7) (get_local $y)))
-  (func (export "rem_s222") (result i64) (i64.rem_s (i64.const 11) (i64.const 5)))
-  (func (export "rem_s223") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const 5)))
-  (func (export "rem_s224") (param $y i64) (result i64) (i64.rem_s (i64.const 11) (get_local $y)))
-  (func (export "rem_s225") (result i64) (i64.rem_s (i64.const 17) (i64.const 7)))
-  (func (export "rem_s226") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const 7)))
-  (func (export "rem_s227") (param $y i64) (result i64) (i64.rem_s (i64.const 17) (get_local $y)))
-  (func (export "rem_u228") (result i64) (i64.rem_u (i64.const 1) (i64.const 0)))
-  (func (export "rem_u229") (param $x i64) (result i64) (i64.rem_u (get_local $x) (i64.const 0)))
-  (func (export "rem_u230") (param $y i64) (result i64) (i64.rem_u (i64.const 1) (get_local $y)))
-  (func (export "rem_u231") (result i64) (i64.rem_u (i64.const 0) (i64.const 0)))
-  (func (export "rem_u232") (param $x i64) (result i64) (i64.rem_u (get_local $x) (i64.const 0)))
-  (func (export "rem_u233") (param $y i64) (result i64) (i64.rem_u (i64.const 0) (get_local $y)))
-  (func (export "rem_u234") (result i64) (i64.rem_u (i64.const 1) (i64.const 1)))
-  (func (export "rem_u235") (param $x i64) (result i64) (i64.rem_u (get_local $x) (i64.const 1)))
-  (func (export "rem_u236") (param $y i64) (result i64) (i64.rem_u (i64.const 1) (get_local $y)))
-  (func (export "rem_u237") (result i64) (i64.rem_u (i64.const 0) (i64.const 1)))
-  (func (export "rem_u238") (param $x i64) (result i64) (i64.rem_u (get_local $x) (i64.const 1)))
-  (func (export "rem_u239") (param $y i64) (result i64) (i64.rem_u (i64.const 0) (get_local $y)))
-  (func (export "rem_u240") (result i64) (i64.rem_u (i64.const -1) (i64.const -1)))
-  (func (export "rem_u241") (param $x i64) (result i64) (i64.rem_u (get_local $x) (i64.const -1)))
-  (func (export "rem_u242") (param $y i64) (result i64) (i64.rem_u (i64.const -1) (get_local $y)))
-  (func (export "rem_u243") (result i64) (i64.rem_u (i64.const 0x8000000000000000) (i64.const -1)))
-  (func (export "rem_u244") (param $x i64) (result i64) (i64.rem_u (get_local $x) (i64.const -1)))
-  (func (export "rem_u245") (param $y i64) (result i64) (i64.rem_u (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "rem_u246") (result i64) (i64.rem_u (i64.const 0x8000000000000000) (i64.const 2)))
-  (func (export "rem_u247") (param $x i64) (result i64) (i64.rem_u (get_local $x) (i64.const 2)))
-  (func (export "rem_u248") (param $y i64) (result i64) (i64.rem_u (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "rem_u249") (result i64) (i64.rem_u (i64.const 0x8ff00ff00ff00ff0) (i64.const 0x100000001)))
-  (func (export "rem_u250") (param $x i64) (result i64) (i64.rem_u (get_local $x) (i64.const 0x100000001)))
-  (func (export "rem_u251") (param $y i64) (result i64) (i64.rem_u (i64.const 0x8ff00ff00ff00ff0) (get_local $y)))
-  (func (export "rem_u252") (result i64) (i64.rem_u (i64.const 0x8000000000000001) (i64.const 1000)))
-  (func (export "rem_u253") (param $x i64) (result i64) (i64.rem_u (get_local $x) (i64.const 1000)))
-  (func (export "rem_u254") (param $y i64) (result i64) (i64.rem_u (i64.const 0x8000000000000001) (get_local $y)))
-  (func (export "rem_u255") (result i64) (i64.rem_u (i64.const 5) (i64.const 2)))
+  (func (export "rem_s203") (param $y i64) (result i64) (i64.rem_s (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "rem_s204") (result i64) (i64.rem_s (i64.const 0x8000000000000001) (i64.const 1000)))
+  (func (export "rem_s205") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const 1000)))
+  (func (export "rem_s206") (param $y i64) (result i64) (i64.rem_s (i64.const 0x8000000000000001) (get_local $y)))
+  (func (export "rem_s207") (result i64) (i64.rem_s (i64.const 5) (i64.const 2)))
+  (func (export "rem_s208") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const 2)))
+  (func (export "rem_s209") (param $y i64) (result i64) (i64.rem_s (i64.const 5) (get_local $y)))
+  (func (export "rem_s210") (result i64) (i64.rem_s (i64.const -5) (i64.const 2)))
+  (func (export "rem_s211") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const 2)))
+  (func (export "rem_s212") (param $y i64) (result i64) (i64.rem_s (i64.const -5) (get_local $y)))
+  (func (export "rem_s213") (result i64) (i64.rem_s (i64.const 5) (i64.const -2)))
+  (func (export "rem_s214") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const -2)))
+  (func (export "rem_s215") (param $y i64) (result i64) (i64.rem_s (i64.const 5) (get_local $y)))
+  (func (export "rem_s216") (result i64) (i64.rem_s (i64.const -5) (i64.const -2)))
+  (func (export "rem_s217") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const -2)))
+  (func (export "rem_s218") (param $y i64) (result i64) (i64.rem_s (i64.const -5) (get_local $y)))
+  (func (export "rem_s219") (result i64) (i64.rem_s (i64.const 7) (i64.const 3)))
+  (func (export "rem_s220") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const 3)))
+  (func (export "rem_s221") (param $y i64) (result i64) (i64.rem_s (i64.const 7) (get_local $y)))
+  (func (export "rem_s222") (result i64) (i64.rem_s (i64.const -7) (i64.const 3)))
+  (func (export "rem_s223") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const 3)))
+  (func (export "rem_s224") (param $y i64) (result i64) (i64.rem_s (i64.const -7) (get_local $y)))
+  (func (export "rem_s225") (result i64) (i64.rem_s (i64.const 7) (i64.const -3)))
+  (func (export "rem_s226") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const -3)))
+  (func (export "rem_s227") (param $y i64) (result i64) (i64.rem_s (i64.const 7) (get_local $y)))
+  (func (export "rem_s228") (result i64) (i64.rem_s (i64.const -7) (i64.const -3)))
+  (func (export "rem_s229") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const -3)))
+  (func (export "rem_s230") (param $y i64) (result i64) (i64.rem_s (i64.const -7) (get_local $y)))
+  (func (export "rem_s231") (result i64) (i64.rem_s (i64.const 11) (i64.const 5)))
+  (func (export "rem_s232") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const 5)))
+  (func (export "rem_s233") (param $y i64) (result i64) (i64.rem_s (i64.const 11) (get_local $y)))
+  (func (export "rem_s234") (result i64) (i64.rem_s (i64.const 17) (i64.const 7)))
+  (func (export "rem_s235") (param $x i64) (result i64) (i64.rem_s (get_local $x) (i64.const 7)))
+  (func (export "rem_s236") (param $y i64) (result i64) (i64.rem_s (i64.const 17) (get_local $y)))
+  (func (export "rem_u237") (result i64) (i64.rem_u (i64.const 1) (i64.const 0)))
+  (func (export "rem_u238") (param $x i64) (result i64) (i64.rem_u (get_local $x) (i64.const 0)))
+  (func (export "rem_u239") (param $y i64) (result i64) (i64.rem_u (i64.const 1) (get_local $y)))
+  (func (export "rem_u240") (result i64) (i64.rem_u (i64.const 0) (i64.const 0)))
+  (func (export "rem_u241") (param $x i64) (result i64) (i64.rem_u (get_local $x) (i64.const 0)))
+  (func (export "rem_u242") (param $y i64) (result i64) (i64.rem_u (i64.const 0) (get_local $y)))
+  (func (export "rem_u243") (result i64) (i64.rem_u (i64.const 1) (i64.const 1)))
+  (func (export "rem_u244") (param $x i64) (result i64) (i64.rem_u (get_local $x) (i64.const 1)))
+  (func (export "rem_u245") (param $y i64) (result i64) (i64.rem_u (i64.const 1) (get_local $y)))
+  (func (export "rem_u246") (result i64) (i64.rem_u (i64.const 0) (i64.const 1)))
+  (func (export "rem_u247") (param $x i64) (result i64) (i64.rem_u (get_local $x) (i64.const 1)))
+  (func (export "rem_u248") (param $y i64) (result i64) (i64.rem_u (i64.const 0) (get_local $y)))
+  (func (export "rem_u249") (result i64) (i64.rem_u (i64.const -1) (i64.const -1)))
+  (func (export "rem_u250") (param $x i64) (result i64) (i64.rem_u (get_local $x) (i64.const -1)))
+  (func (export "rem_u251") (param $y i64) (result i64) (i64.rem_u (i64.const -1) (get_local $y)))
+  (func (export "rem_u252") (result i64) (i64.rem_u (i64.const 0x8000000000000000) (i64.const -1)))
+  (func (export "rem_u253") (param $x i64) (result i64) (i64.rem_u (get_local $x) (i64.const -1)))
+  (func (export "rem_u254") (param $y i64) (result i64) (i64.rem_u (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "rem_u255") (result i64) (i64.rem_u (i64.const 0x8000000000000000) (i64.const 2)))
   (func (export "rem_u256") (param $x i64) (result i64) (i64.rem_u (get_local $x) (i64.const 2)))
-  (func (export "rem_u257") (param $y i64) (result i64) (i64.rem_u (i64.const 5) (get_local $y)))
-  (func (export "rem_u258") (result i64) (i64.rem_u (i64.const -5) (i64.const 2)))
-  (func (export "rem_u259") (param $x i64) (result i64) (i64.rem_u (get_local $x) (i64.const 2)))
-  (func (export "rem_u260") (param $y i64) (result i64) (i64.rem_u (i64.const -5) (get_local $y)))
-  (func (export "rem_u261") (result i64) (i64.rem_u (i64.const 5) (i64.const -2)))
-  (func (export "rem_u262") (param $x i64) (result i64) (i64.rem_u (get_local $x) (i64.const -2)))
-  (func (export "rem_u263") (param $y i64) (result i64) (i64.rem_u (i64.const 5) (get_local $y)))
-  (func (export "rem_u264") (result i64) (i64.rem_u (i64.const -5) (i64.const -2)))
-  (func (export "rem_u265") (param $x i64) (result i64) (i64.rem_u (get_local $x) (i64.const -2)))
-  (func (export "rem_u266") (param $y i64) (result i64) (i64.rem_u (i64.const -5) (get_local $y)))
-  (func (export "rem_u267") (result i64) (i64.rem_u (i64.const 7) (i64.const 3)))
-  (func (export "rem_u268") (param $x i64) (result i64) (i64.rem_u (get_local $x) (i64.const 3)))
-  (func (export "rem_u269") (param $y i64) (result i64) (i64.rem_u (i64.const 7) (get_local $y)))
-  (func (export "rem_u270") (result i64) (i64.rem_u (i64.const 11) (i64.const 5)))
-  (func (export "rem_u271") (param $x i64) (result i64) (i64.rem_u (get_local $x) (i64.const 5)))
-  (func (export "rem_u272") (param $y i64) (result i64) (i64.rem_u (i64.const 11) (get_local $y)))
-  (func (export "rem_u273") (result i64) (i64.rem_u (i64.const 17) (i64.const 7)))
-  (func (export "rem_u274") (param $x i64) (result i64) (i64.rem_u (get_local $x) (i64.const 7)))
-  (func (export "rem_u275") (param $y i64) (result i64) (i64.rem_u (i64.const 17) (get_local $y)))
-  (func (export "and276") (result i64) (i64.and (i64.const 1) (i64.const 0)))
-  (func (export "and277") (param $x i64) (result i64) (i64.and (get_local $x) (i64.const 0)))
-  (func (export "and278") (param $y i64) (result i64) (i64.and (i64.const 1) (get_local $y)))
-  (func (export "and279") (result i64) (i64.and (i64.const 0) (i64.const 1)))
-  (func (export "and280") (param $x i64) (result i64) (i64.and (get_local $x) (i64.const 1)))
-  (func (export "and281") (param $y i64) (result i64) (i64.and (i64.const 0) (get_local $y)))
-  (func (export "and282") (result i64) (i64.and (i64.const 1) (i64.const 1)))
-  (func (export "and283") (param $x i64) (result i64) (i64.and (get_local $x) (i64.const 1)))
-  (func (export "and284") (param $y i64) (result i64) (i64.and (i64.const 1) (get_local $y)))
-  (func (export "and285") (result i64) (i64.and (i64.const 0) (i64.const 0)))
+  (func (export "rem_u257") (param $y i64) (result i64) (i64.rem_u (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "rem_u258") (result i64) (i64.rem_u (i64.const 0x8ff00ff00ff00ff0) (i64.const 0x100000001)))
+  (func (export "rem_u259") (param $x i64) (result i64) (i64.rem_u (get_local $x) (i64.const 0x100000001)))
+  (func (export "rem_u260") (param $y i64) (result i64) (i64.rem_u (i64.const 0x8ff00ff00ff00ff0) (get_local $y)))
+  (func (export "rem_u261") (result i64) (i64.rem_u (i64.const 0x8000000000000001) (i64.const 1000)))
+  (func (export "rem_u262") (param $x i64) (result i64) (i64.rem_u (get_local $x) (i64.const 1000)))
+  (func (export "rem_u263") (param $y i64) (result i64) (i64.rem_u (i64.const 0x8000000000000001) (get_local $y)))
+  (func (export "rem_u264") (result i64) (i64.rem_u (i64.const 5) (i64.const 2)))
+  (func (export "rem_u265") (param $x i64) (result i64) (i64.rem_u (get_local $x) (i64.const 2)))
+  (func (export "rem_u266") (param $y i64) (result i64) (i64.rem_u (i64.const 5) (get_local $y)))
+  (func (export "rem_u267") (result i64) (i64.rem_u (i64.const -5) (i64.const 2)))
+  (func (export "rem_u268") (param $x i64) (result i64) (i64.rem_u (get_local $x) (i64.const 2)))
+  (func (export "rem_u269") (param $y i64) (result i64) (i64.rem_u (i64.const -5) (get_local $y)))
+  (func (export "rem_u270") (result i64) (i64.rem_u (i64.const 5) (i64.const -2)))
+  (func (export "rem_u271") (param $x i64) (result i64) (i64.rem_u (get_local $x) (i64.const -2)))
+  (func (export "rem_u272") (param $y i64) (result i64) (i64.rem_u (i64.const 5) (get_local $y)))
+  (func (export "rem_u273") (result i64) (i64.rem_u (i64.const -5) (i64.const -2)))
+  (func (export "rem_u274") (param $x i64) (result i64) (i64.rem_u (get_local $x) (i64.const -2)))
+  (func (export "rem_u275") (param $y i64) (result i64) (i64.rem_u (i64.const -5) (get_local $y)))
+  (func (export "rem_u276") (result i64) (i64.rem_u (i64.const 7) (i64.const 3)))
+  (func (export "rem_u277") (param $x i64) (result i64) (i64.rem_u (get_local $x) (i64.const 3)))
+  (func (export "rem_u278") (param $y i64) (result i64) (i64.rem_u (i64.const 7) (get_local $y)))
+  (func (export "rem_u279") (result i64) (i64.rem_u (i64.const 11) (i64.const 5)))
+  (func (export "rem_u280") (param $x i64) (result i64) (i64.rem_u (get_local $x) (i64.const 5)))
+  (func (export "rem_u281") (param $y i64) (result i64) (i64.rem_u (i64.const 11) (get_local $y)))
+  (func (export "rem_u282") (result i64) (i64.rem_u (i64.const 17) (i64.const 7)))
+  (func (export "rem_u283") (param $x i64) (result i64) (i64.rem_u (get_local $x) (i64.const 7)))
+  (func (export "rem_u284") (param $y i64) (result i64) (i64.rem_u (i64.const 17) (get_local $y)))
+  (func (export "and285") (result i64) (i64.and (i64.const 1) (i64.const 0)))
   (func (export "and286") (param $x i64) (result i64) (i64.and (get_local $x) (i64.const 0)))
-  (func (export "and287") (param $y i64) (result i64) (i64.and (i64.const 0) (get_local $y)))
-  (func (export "and288") (result i64) (i64.and (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)))
-  (func (export "and289") (param $x i64) (result i64) (i64.and (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "and290") (param $y i64) (result i64) (i64.and (i64.const 0x7fffffffffffffff) (get_local $y)))
-  (func (export "and291") (result i64) (i64.and (i64.const 0x7fffffffffffffff) (i64.const -1)))
-  (func (export "and292") (param $x i64) (result i64) (i64.and (get_local $x) (i64.const -1)))
-  (func (export "and293") (param $y i64) (result i64) (i64.and (i64.const 0x7fffffffffffffff) (get_local $y)))
-  (func (export "and294") (result i64) (i64.and (i64.const 0xf0f0ffff) (i64.const 0xfffff0f0)))
-  (func (export "and295") (param $x i64) (result i64) (i64.and (get_local $x) (i64.const 0xfffff0f0)))
-  (func (export "and296") (param $y i64) (result i64) (i64.and (i64.const 0xf0f0ffff) (get_local $y)))
-  (func (export "and297") (result i64) (i64.and (i64.const 0xffffffffffffffff) (i64.const 0xffffffffffffffff)))
-  (func (export "and298") (param $x i64) (result i64) (i64.and (get_local $x) (i64.const 0xffffffffffffffff)))
-  (func (export "and299") (param $y i64) (result i64) (i64.and (i64.const 0xffffffffffffffff) (get_local $y)))
-  (func (export "or300") (result i64) (i64.or (i64.const 1) (i64.const 0)))
-  (func (export "or301") (param $x i64) (result i64) (i64.or (get_local $x) (i64.const 0)))
-  (func (export "or302") (param $y i64) (result i64) (i64.or (i64.const 1) (get_local $y)))
-  (func (export "or303") (result i64) (i64.or (i64.const 0) (i64.const 1)))
-  (func (export "or304") (param $x i64) (result i64) (i64.or (get_local $x) (i64.const 1)))
-  (func (export "or305") (param $y i64) (result i64) (i64.or (i64.const 0) (get_local $y)))
-  (func (export "or306") (result i64) (i64.or (i64.const 1) (i64.const 1)))
-  (func (export "or307") (param $x i64) (result i64) (i64.or (get_local $x) (i64.const 1)))
-  (func (export "or308") (param $y i64) (result i64) (i64.or (i64.const 1) (get_local $y)))
-  (func (export "or309") (result i64) (i64.or (i64.const 0) (i64.const 0)))
+  (func (export "and287") (param $y i64) (result i64) (i64.and (i64.const 1) (get_local $y)))
+  (func (export "and288") (result i64) (i64.and (i64.const 0) (i64.const 1)))
+  (func (export "and289") (param $x i64) (result i64) (i64.and (get_local $x) (i64.const 1)))
+  (func (export "and290") (param $y i64) (result i64) (i64.and (i64.const 0) (get_local $y)))
+  (func (export "and291") (result i64) (i64.and (i64.const 1) (i64.const 1)))
+  (func (export "and292") (param $x i64) (result i64) (i64.and (get_local $x) (i64.const 1)))
+  (func (export "and293") (param $y i64) (result i64) (i64.and (i64.const 1) (get_local $y)))
+  (func (export "and294") (result i64) (i64.and (i64.const 0) (i64.const 0)))
+  (func (export "and295") (param $x i64) (result i64) (i64.and (get_local $x) (i64.const 0)))
+  (func (export "and296") (param $y i64) (result i64) (i64.and (i64.const 0) (get_local $y)))
+  (func (export "and297") (result i64) (i64.and (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)))
+  (func (export "and298") (param $x i64) (result i64) (i64.and (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "and299") (param $y i64) (result i64) (i64.and (i64.const 0x7fffffffffffffff) (get_local $y)))
+  (func (export "and300") (result i64) (i64.and (i64.const 0x7fffffffffffffff) (i64.const -1)))
+  (func (export "and301") (param $x i64) (result i64) (i64.and (get_local $x) (i64.const -1)))
+  (func (export "and302") (param $y i64) (result i64) (i64.and (i64.const 0x7fffffffffffffff) (get_local $y)))
+  (func (export "and303") (result i64) (i64.and (i64.const 0xf0f0ffff) (i64.const 0xfffff0f0)))
+  (func (export "and304") (param $x i64) (result i64) (i64.and (get_local $x) (i64.const 0xfffff0f0)))
+  (func (export "and305") (param $y i64) (result i64) (i64.and (i64.const 0xf0f0ffff) (get_local $y)))
+  (func (export "and306") (result i64) (i64.and (i64.const 0xffffffffffffffff) (i64.const 0xffffffffffffffff)))
+  (func (export "and307") (param $x i64) (result i64) (i64.and (get_local $x) (i64.const 0xffffffffffffffff)))
+  (func (export "and308") (param $y i64) (result i64) (i64.and (i64.const 0xffffffffffffffff) (get_local $y)))
+  (func (export "or309") (result i64) (i64.or (i64.const 1) (i64.const 0)))
   (func (export "or310") (param $x i64) (result i64) (i64.or (get_local $x) (i64.const 0)))
-  (func (export "or311") (param $y i64) (result i64) (i64.or (i64.const 0) (get_local $y)))
-  (func (export "or312") (result i64) (i64.or (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)))
-  (func (export "or313") (param $x i64) (result i64) (i64.or (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "or314") (param $y i64) (result i64) (i64.or (i64.const 0x7fffffffffffffff) (get_local $y)))
-  (func (export "or315") (result i64) (i64.or (i64.const 0x8000000000000000) (i64.const 0)))
-  (func (export "or316") (param $x i64) (result i64) (i64.or (get_local $x) (i64.const 0)))
-  (func (export "or317") (param $y i64) (result i64) (i64.or (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "or318") (result i64) (i64.or (i64.const 0xf0f0ffff) (i64.const 0xfffff0f0)))
-  (func (export "or319") (param $x i64) (result i64) (i64.or (get_local $x) (i64.const 0xfffff0f0)))
-  (func (export "or320") (param $y i64) (result i64) (i64.or (i64.const 0xf0f0ffff) (get_local $y)))
-  (func (export "or321") (result i64) (i64.or (i64.const 0xffffffffffffffff) (i64.const 0xffffffffffffffff)))
-  (func (export "or322") (param $x i64) (result i64) (i64.or (get_local $x) (i64.const 0xffffffffffffffff)))
-  (func (export "or323") (param $y i64) (result i64) (i64.or (i64.const 0xffffffffffffffff) (get_local $y)))
-  (func (export "xor324") (result i64) (i64.xor (i64.const 1) (i64.const 0)))
-  (func (export "xor325") (param $x i64) (result i64) (i64.xor (get_local $x) (i64.const 0)))
-  (func (export "xor326") (param $y i64) (result i64) (i64.xor (i64.const 1) (get_local $y)))
-  (func (export "xor327") (result i64) (i64.xor (i64.const 0) (i64.const 1)))
-  (func (export "xor328") (param $x i64) (result i64) (i64.xor (get_local $x) (i64.const 1)))
-  (func (export "xor329") (param $y i64) (result i64) (i64.xor (i64.const 0) (get_local $y)))
-  (func (export "xor330") (result i64) (i64.xor (i64.const 1) (i64.const 1)))
-  (func (export "xor331") (param $x i64) (result i64) (i64.xor (get_local $x) (i64.const 1)))
-  (func (export "xor332") (param $y i64) (result i64) (i64.xor (i64.const 1) (get_local $y)))
-  (func (export "xor333") (result i64) (i64.xor (i64.const 0) (i64.const 0)))
+  (func (export "or311") (param $y i64) (result i64) (i64.or (i64.const 1) (get_local $y)))
+  (func (export "or312") (result i64) (i64.or (i64.const 0) (i64.const 1)))
+  (func (export "or313") (param $x i64) (result i64) (i64.or (get_local $x) (i64.const 1)))
+  (func (export "or314") (param $y i64) (result i64) (i64.or (i64.const 0) (get_local $y)))
+  (func (export "or315") (result i64) (i64.or (i64.const 1) (i64.const 1)))
+  (func (export "or316") (param $x i64) (result i64) (i64.or (get_local $x) (i64.const 1)))
+  (func (export "or317") (param $y i64) (result i64) (i64.or (i64.const 1) (get_local $y)))
+  (func (export "or318") (result i64) (i64.or (i64.const 0) (i64.const 0)))
+  (func (export "or319") (param $x i64) (result i64) (i64.or (get_local $x) (i64.const 0)))
+  (func (export "or320") (param $y i64) (result i64) (i64.or (i64.const 0) (get_local $y)))
+  (func (export "or321") (result i64) (i64.or (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)))
+  (func (export "or322") (param $x i64) (result i64) (i64.or (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "or323") (param $y i64) (result i64) (i64.or (i64.const 0x7fffffffffffffff) (get_local $y)))
+  (func (export "or324") (result i64) (i64.or (i64.const 0x8000000000000000) (i64.const 0)))
+  (func (export "or325") (param $x i64) (result i64) (i64.or (get_local $x) (i64.const 0)))
+  (func (export "or326") (param $y i64) (result i64) (i64.or (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "or327") (result i64) (i64.or (i64.const 0xf0f0ffff) (i64.const 0xfffff0f0)))
+  (func (export "or328") (param $x i64) (result i64) (i64.or (get_local $x) (i64.const 0xfffff0f0)))
+  (func (export "or329") (param $y i64) (result i64) (i64.or (i64.const 0xf0f0ffff) (get_local $y)))
+  (func (export "or330") (result i64) (i64.or (i64.const 0xffffffffffffffff) (i64.const 0xffffffffffffffff)))
+  (func (export "or331") (param $x i64) (result i64) (i64.or (get_local $x) (i64.const 0xffffffffffffffff)))
+  (func (export "or332") (param $y i64) (result i64) (i64.or (i64.const 0xffffffffffffffff) (get_local $y)))
+  (func (export "xor333") (result i64) (i64.xor (i64.const 1) (i64.const 0)))
   (func (export "xor334") (param $x i64) (result i64) (i64.xor (get_local $x) (i64.const 0)))
-  (func (export "xor335") (param $y i64) (result i64) (i64.xor (i64.const 0) (get_local $y)))
-  (func (export "xor336") (result i64) (i64.xor (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)))
-  (func (export "xor337") (param $x i64) (result i64) (i64.xor (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "xor338") (param $y i64) (result i64) (i64.xor (i64.const 0x7fffffffffffffff) (get_local $y)))
-  (func (export "xor339") (result i64) (i64.xor (i64.const 0x8000000000000000) (i64.const 0)))
-  (func (export "xor340") (param $x i64) (result i64) (i64.xor (get_local $x) (i64.const 0)))
-  (func (export "xor341") (param $y i64) (result i64) (i64.xor (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "xor342") (result i64) (i64.xor (i64.const -1) (i64.const 0x8000000000000000)))
-  (func (export "xor343") (param $x i64) (result i64) (i64.xor (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "xor344") (param $y i64) (result i64) (i64.xor (i64.const -1) (get_local $y)))
-  (func (export "xor345") (result i64) (i64.xor (i64.const -1) (i64.const 0x7fffffffffffffff)))
-  (func (export "xor346") (param $x i64) (result i64) (i64.xor (get_local $x) (i64.const 0x7fffffffffffffff)))
-  (func (export "xor347") (param $y i64) (result i64) (i64.xor (i64.const -1) (get_local $y)))
-  (func (export "xor348") (result i64) (i64.xor (i64.const 0xf0f0ffff) (i64.const 0xfffff0f0)))
-  (func (export "xor349") (param $x i64) (result i64) (i64.xor (get_local $x) (i64.const 0xfffff0f0)))
-  (func (export "xor350") (param $y i64) (result i64) (i64.xor (i64.const 0xf0f0ffff) (get_local $y)))
-  (func (export "xor351") (result i64) (i64.xor (i64.const 0xffffffffffffffff) (i64.const 0xffffffffffffffff)))
-  (func (export "xor352") (param $x i64) (result i64) (i64.xor (get_local $x) (i64.const 0xffffffffffffffff)))
-  (func (export "xor353") (param $y i64) (result i64) (i64.xor (i64.const 0xffffffffffffffff) (get_local $y)))
-  (func (export "shl354") (result i64) (i64.shl (i64.const 1) (i64.const 1)))
-  (func (export "shl355") (param $x i64) (result i64) (i64.shl (get_local $x) (i64.const 1)))
-  (func (export "shl356") (param $y i64) (result i64) (i64.shl (i64.const 1) (get_local $y)))
-  (func (export "shl357") (result i64) (i64.shl (i64.const 1) (i64.const 0)))
-  (func (export "shl358") (param $x i64) (result i64) (i64.shl (get_local $x) (i64.const 0)))
-  (func (export "shl359") (param $y i64) (result i64) (i64.shl (i64.const 1) (get_local $y)))
-  (func (export "shl360") (result i64) (i64.shl (i64.const 0x7fffffffffffffff) (i64.const 1)))
-  (func (export "shl361") (param $x i64) (result i64) (i64.shl (get_local $x) (i64.const 1)))
-  (func (export "shl362") (param $y i64) (result i64) (i64.shl (i64.const 0x7fffffffffffffff) (get_local $y)))
-  (func (export "shl363") (result i64) (i64.shl (i64.const 0xffffffffffffffff) (i64.const 1)))
+  (func (export "xor335") (param $y i64) (result i64) (i64.xor (i64.const 1) (get_local $y)))
+  (func (export "xor336") (result i64) (i64.xor (i64.const 0) (i64.const 1)))
+  (func (export "xor337") (param $x i64) (result i64) (i64.xor (get_local $x) (i64.const 1)))
+  (func (export "xor338") (param $y i64) (result i64) (i64.xor (i64.const 0) (get_local $y)))
+  (func (export "xor339") (result i64) (i64.xor (i64.const 1) (i64.const 1)))
+  (func (export "xor340") (param $x i64) (result i64) (i64.xor (get_local $x) (i64.const 1)))
+  (func (export "xor341") (param $y i64) (result i64) (i64.xor (i64.const 1) (get_local $y)))
+  (func (export "xor342") (result i64) (i64.xor (i64.const 0) (i64.const 0)))
+  (func (export "xor343") (param $x i64) (result i64) (i64.xor (get_local $x) (i64.const 0)))
+  (func (export "xor344") (param $y i64) (result i64) (i64.xor (i64.const 0) (get_local $y)))
+  (func (export "xor345") (result i64) (i64.xor (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)))
+  (func (export "xor346") (param $x i64) (result i64) (i64.xor (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "xor347") (param $y i64) (result i64) (i64.xor (i64.const 0x7fffffffffffffff) (get_local $y)))
+  (func (export "xor348") (result i64) (i64.xor (i64.const 0x8000000000000000) (i64.const 0)))
+  (func (export "xor349") (param $x i64) (result i64) (i64.xor (get_local $x) (i64.const 0)))
+  (func (export "xor350") (param $y i64) (result i64) (i64.xor (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "xor351") (result i64) (i64.xor (i64.const -1) (i64.const 0x8000000000000000)))
+  (func (export "xor352") (param $x i64) (result i64) (i64.xor (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "xor353") (param $y i64) (result i64) (i64.xor (i64.const -1) (get_local $y)))
+  (func (export "xor354") (result i64) (i64.xor (i64.const -1) (i64.const 0x7fffffffffffffff)))
+  (func (export "xor355") (param $x i64) (result i64) (i64.xor (get_local $x) (i64.const 0x7fffffffffffffff)))
+  (func (export "xor356") (param $y i64) (result i64) (i64.xor (i64.const -1) (get_local $y)))
+  (func (export "xor357") (result i64) (i64.xor (i64.const 0xf0f0ffff) (i64.const 0xfffff0f0)))
+  (func (export "xor358") (param $x i64) (result i64) (i64.xor (get_local $x) (i64.const 0xfffff0f0)))
+  (func (export "xor359") (param $y i64) (result i64) (i64.xor (i64.const 0xf0f0ffff) (get_local $y)))
+  (func (export "xor360") (result i64) (i64.xor (i64.const 0xffffffffffffffff) (i64.const 0xffffffffffffffff)))
+  (func (export "xor361") (param $x i64) (result i64) (i64.xor (get_local $x) (i64.const 0xffffffffffffffff)))
+  (func (export "xor362") (param $y i64) (result i64) (i64.xor (i64.const 0xffffffffffffffff) (get_local $y)))
+  (func (export "shl363") (result i64) (i64.shl (i64.const 1) (i64.const 1)))
   (func (export "shl364") (param $x i64) (result i64) (i64.shl (get_local $x) (i64.const 1)))
-  (func (export "shl365") (param $y i64) (result i64) (i64.shl (i64.const 0xffffffffffffffff) (get_local $y)))
-  (func (export "shl366") (result i64) (i64.shl (i64.const 0x8000000000000000) (i64.const 1)))
-  (func (export "shl367") (param $x i64) (result i64) (i64.shl (get_local $x) (i64.const 1)))
-  (func (export "shl368") (param $y i64) (result i64) (i64.shl (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "shl369") (result i64) (i64.shl (i64.const 0x4000000000000000) (i64.const 1)))
+  (func (export "shl365") (param $y i64) (result i64) (i64.shl (i64.const 1) (get_local $y)))
+  (func (export "shl366") (result i64) (i64.shl (i64.const 1) (i64.const 0)))
+  (func (export "shl367") (param $x i64) (result i64) (i64.shl (get_local $x) (i64.const 0)))
+  (func (export "shl368") (param $y i64) (result i64) (i64.shl (i64.const 1) (get_local $y)))
+  (func (export "shl369") (result i64) (i64.shl (i64.const 0x7fffffffffffffff) (i64.const 1)))
   (func (export "shl370") (param $x i64) (result i64) (i64.shl (get_local $x) (i64.const 1)))
-  (func (export "shl371") (param $y i64) (result i64) (i64.shl (i64.const 0x4000000000000000) (get_local $y)))
-  (func (export "shl372") (result i64) (i64.shl (i64.const 1) (i64.const 63)))
-  (func (export "shl373") (param $x i64) (result i64) (i64.shl (get_local $x) (i64.const 63)))
-  (func (export "shl374") (param $y i64) (result i64) (i64.shl (i64.const 1) (get_local $y)))
-  (func (export "shl375") (result i64) (i64.shl (i64.const 1) (i64.const 64)))
-  (func (export "shl376") (param $x i64) (result i64) (i64.shl (get_local $x) (i64.const 64)))
-  (func (export "shl377") (param $y i64) (result i64) (i64.shl (i64.const 1) (get_local $y)))
-  (func (export "shl378") (result i64) (i64.shl (i64.const 1) (i64.const 65)))
-  (func (export "shl379") (param $x i64) (result i64) (i64.shl (get_local $x) (i64.const 65)))
-  (func (export "shl380") (param $y i64) (result i64) (i64.shl (i64.const 1) (get_local $y)))
-  (func (export "shl381") (result i64) (i64.shl (i64.const 1) (i64.const -1)))
-  (func (export "shl382") (param $x i64) (result i64) (i64.shl (get_local $x) (i64.const -1)))
+  (func (export "shl371") (param $y i64) (result i64) (i64.shl (i64.const 0x7fffffffffffffff) (get_local $y)))
+  (func (export "shl372") (result i64) (i64.shl (i64.const 0xffffffffffffffff) (i64.const 1)))
+  (func (export "shl373") (param $x i64) (result i64) (i64.shl (get_local $x) (i64.const 1)))
+  (func (export "shl374") (param $y i64) (result i64) (i64.shl (i64.const 0xffffffffffffffff) (get_local $y)))
+  (func (export "shl375") (result i64) (i64.shl (i64.const 0x8000000000000000) (i64.const 1)))
+  (func (export "shl376") (param $x i64) (result i64) (i64.shl (get_local $x) (i64.const 1)))
+  (func (export "shl377") (param $y i64) (result i64) (i64.shl (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "shl378") (result i64) (i64.shl (i64.const 0x4000000000000000) (i64.const 1)))
+  (func (export "shl379") (param $x i64) (result i64) (i64.shl (get_local $x) (i64.const 1)))
+  (func (export "shl380") (param $y i64) (result i64) (i64.shl (i64.const 0x4000000000000000) (get_local $y)))
+  (func (export "shl381") (result i64) (i64.shl (i64.const 1) (i64.const 63)))
+  (func (export "shl382") (param $x i64) (result i64) (i64.shl (get_local $x) (i64.const 63)))
   (func (export "shl383") (param $y i64) (result i64) (i64.shl (i64.const 1) (get_local $y)))
-  (func (export "shl384") (result i64) (i64.shl (i64.const 1) (i64.const 0x7fffffffffffffff)))
-  (func (export "shl385") (param $x i64) (result i64) (i64.shl (get_local $x) (i64.const 0x7fffffffffffffff)))
+  (func (export "shl384") (result i64) (i64.shl (i64.const 1) (i64.const 64)))
+  (func (export "shl385") (param $x i64) (result i64) (i64.shl (get_local $x) (i64.const 64)))
   (func (export "shl386") (param $y i64) (result i64) (i64.shl (i64.const 1) (get_local $y)))
-  (func (export "shr_s387") (result i64) (i64.shr_s (i64.const 1) (i64.const 1)))
-  (func (export "shr_s388") (param $x i64) (result i64) (i64.shr_s (get_local $x) (i64.const 1)))
-  (func (export "shr_s389") (param $y i64) (result i64) (i64.shr_s (i64.const 1) (get_local $y)))
-  (func (export "shr_s390") (result i64) (i64.shr_s (i64.const 1) (i64.const 0)))
-  (func (export "shr_s391") (param $x i64) (result i64) (i64.shr_s (get_local $x) (i64.const 0)))
-  (func (export "shr_s392") (param $y i64) (result i64) (i64.shr_s (i64.const 1) (get_local $y)))
-  (func (export "shr_s393") (result i64) (i64.shr_s (i64.const -1) (i64.const 1)))
-  (func (export "shr_s394") (param $x i64) (result i64) (i64.shr_s (get_local $x) (i64.const 1)))
-  (func (export "shr_s395") (param $y i64) (result i64) (i64.shr_s (i64.const -1) (get_local $y)))
-  (func (export "shr_s396") (result i64) (i64.shr_s (i64.const 0x7fffffffffffffff) (i64.const 1)))
+  (func (export "shl387") (result i64) (i64.shl (i64.const 1) (i64.const 65)))
+  (func (export "shl388") (param $x i64) (result i64) (i64.shl (get_local $x) (i64.const 65)))
+  (func (export "shl389") (param $y i64) (result i64) (i64.shl (i64.const 1) (get_local $y)))
+  (func (export "shl390") (result i64) (i64.shl (i64.const 1) (i64.const -1)))
+  (func (export "shl391") (param $x i64) (result i64) (i64.shl (get_local $x) (i64.const -1)))
+  (func (export "shl392") (param $y i64) (result i64) (i64.shl (i64.const 1) (get_local $y)))
+  (func (export "shl393") (result i64) (i64.shl (i64.const 1) (i64.const 0x7fffffffffffffff)))
+  (func (export "shl394") (param $x i64) (result i64) (i64.shl (get_local $x) (i64.const 0x7fffffffffffffff)))
+  (func (export "shl395") (param $y i64) (result i64) (i64.shl (i64.const 1) (get_local $y)))
+  (func (export "shr_s396") (result i64) (i64.shr_s (i64.const 1) (i64.const 1)))
   (func (export "shr_s397") (param $x i64) (result i64) (i64.shr_s (get_local $x) (i64.const 1)))
-  (func (export "shr_s398") (param $y i64) (result i64) (i64.shr_s (i64.const 0x7fffffffffffffff) (get_local $y)))
-  (func (export "shr_s399") (result i64) (i64.shr_s (i64.const 0x8000000000000000) (i64.const 1)))
-  (func (export "shr_s400") (param $x i64) (result i64) (i64.shr_s (get_local $x) (i64.const 1)))
-  (func (export "shr_s401") (param $y i64) (result i64) (i64.shr_s (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "shr_s402") (result i64) (i64.shr_s (i64.const 0x4000000000000000) (i64.const 1)))
+  (func (export "shr_s398") (param $y i64) (result i64) (i64.shr_s (i64.const 1) (get_local $y)))
+  (func (export "shr_s399") (result i64) (i64.shr_s (i64.const 1) (i64.const 0)))
+  (func (export "shr_s400") (param $x i64) (result i64) (i64.shr_s (get_local $x) (i64.const 0)))
+  (func (export "shr_s401") (param $y i64) (result i64) (i64.shr_s (i64.const 1) (get_local $y)))
+  (func (export "shr_s402") (result i64) (i64.shr_s (i64.const -1) (i64.const 1)))
   (func (export "shr_s403") (param $x i64) (result i64) (i64.shr_s (get_local $x) (i64.const 1)))
-  (func (export "shr_s404") (param $y i64) (result i64) (i64.shr_s (i64.const 0x4000000000000000) (get_local $y)))
-  (func (export "shr_s405") (result i64) (i64.shr_s (i64.const 1) (i64.const 64)))
-  (func (export "shr_s406") (param $x i64) (result i64) (i64.shr_s (get_local $x) (i64.const 64)))
-  (func (export "shr_s407") (param $y i64) (result i64) (i64.shr_s (i64.const 1) (get_local $y)))
-  (func (export "shr_s408") (result i64) (i64.shr_s (i64.const 1) (i64.const 65)))
-  (func (export "shr_s409") (param $x i64) (result i64) (i64.shr_s (get_local $x) (i64.const 65)))
-  (func (export "shr_s410") (param $y i64) (result i64) (i64.shr_s (i64.const 1) (get_local $y)))
-  (func (export "shr_s411") (result i64) (i64.shr_s (i64.const 1) (i64.const -1)))
-  (func (export "shr_s412") (param $x i64) (result i64) (i64.shr_s (get_local $x) (i64.const -1)))
-  (func (export "shr_s413") (param $y i64) (result i64) (i64.shr_s (i64.const 1) (get_local $y)))
-  (func (export "shr_s414") (result i64) (i64.shr_s (i64.const 1) (i64.const 0x7fffffffffffffff)))
-  (func (export "shr_s415") (param $x i64) (result i64) (i64.shr_s (get_local $x) (i64.const 0x7fffffffffffffff)))
+  (func (export "shr_s404") (param $y i64) (result i64) (i64.shr_s (i64.const -1) (get_local $y)))
+  (func (export "shr_s405") (result i64) (i64.shr_s (i64.const 0x7fffffffffffffff) (i64.const 1)))
+  (func (export "shr_s406") (param $x i64) (result i64) (i64.shr_s (get_local $x) (i64.const 1)))
+  (func (export "shr_s407") (param $y i64) (result i64) (i64.shr_s (i64.const 0x7fffffffffffffff) (get_local $y)))
+  (func (export "shr_s408") (result i64) (i64.shr_s (i64.const 0x8000000000000000) (i64.const 1)))
+  (func (export "shr_s409") (param $x i64) (result i64) (i64.shr_s (get_local $x) (i64.const 1)))
+  (func (export "shr_s410") (param $y i64) (result i64) (i64.shr_s (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "shr_s411") (result i64) (i64.shr_s (i64.const 0x4000000000000000) (i64.const 1)))
+  (func (export "shr_s412") (param $x i64) (result i64) (i64.shr_s (get_local $x) (i64.const 1)))
+  (func (export "shr_s413") (param $y i64) (result i64) (i64.shr_s (i64.const 0x4000000000000000) (get_local $y)))
+  (func (export "shr_s414") (result i64) (i64.shr_s (i64.const 1) (i64.const 64)))
+  (func (export "shr_s415") (param $x i64) (result i64) (i64.shr_s (get_local $x) (i64.const 64)))
   (func (export "shr_s416") (param $y i64) (result i64) (i64.shr_s (i64.const 1) (get_local $y)))
-  (func (export "shr_s417") (result i64) (i64.shr_s (i64.const 1) (i64.const 0x8000000000000000)))
-  (func (export "shr_s418") (param $x i64) (result i64) (i64.shr_s (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "shr_s417") (result i64) (i64.shr_s (i64.const 1) (i64.const 65)))
+  (func (export "shr_s418") (param $x i64) (result i64) (i64.shr_s (get_local $x) (i64.const 65)))
   (func (export "shr_s419") (param $y i64) (result i64) (i64.shr_s (i64.const 1) (get_local $y)))
-  (func (export "shr_s420") (result i64) (i64.shr_s (i64.const 0x8000000000000000) (i64.const 63)))
-  (func (export "shr_s421") (param $x i64) (result i64) (i64.shr_s (get_local $x) (i64.const 63)))
-  (func (export "shr_s422") (param $y i64) (result i64) (i64.shr_s (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "shr_s423") (result i64) (i64.shr_s (i64.const -1) (i64.const 64)))
-  (func (export "shr_s424") (param $x i64) (result i64) (i64.shr_s (get_local $x) (i64.const 64)))
-  (func (export "shr_s425") (param $y i64) (result i64) (i64.shr_s (i64.const -1) (get_local $y)))
-  (func (export "shr_s426") (result i64) (i64.shr_s (i64.const -1) (i64.const 65)))
-  (func (export "shr_s427") (param $x i64) (result i64) (i64.shr_s (get_local $x) (i64.const 65)))
-  (func (export "shr_s428") (param $y i64) (result i64) (i64.shr_s (i64.const -1) (get_local $y)))
-  (func (export "shr_s429") (result i64) (i64.shr_s (i64.const -1) (i64.const -1)))
-  (func (export "shr_s430") (param $x i64) (result i64) (i64.shr_s (get_local $x) (i64.const -1)))
-  (func (export "shr_s431") (param $y i64) (result i64) (i64.shr_s (i64.const -1) (get_local $y)))
-  (func (export "shr_s432") (result i64) (i64.shr_s (i64.const -1) (i64.const 0x7fffffffffffffff)))
-  (func (export "shr_s433") (param $x i64) (result i64) (i64.shr_s (get_local $x) (i64.const 0x7fffffffffffffff)))
+  (func (export "shr_s420") (result i64) (i64.shr_s (i64.const 1) (i64.const -1)))
+  (func (export "shr_s421") (param $x i64) (result i64) (i64.shr_s (get_local $x) (i64.const -1)))
+  (func (export "shr_s422") (param $y i64) (result i64) (i64.shr_s (i64.const 1) (get_local $y)))
+  (func (export "shr_s423") (result i64) (i64.shr_s (i64.const 1) (i64.const 0x7fffffffffffffff)))
+  (func (export "shr_s424") (param $x i64) (result i64) (i64.shr_s (get_local $x) (i64.const 0x7fffffffffffffff)))
+  (func (export "shr_s425") (param $y i64) (result i64) (i64.shr_s (i64.const 1) (get_local $y)))
+  (func (export "shr_s426") (result i64) (i64.shr_s (i64.const 1) (i64.const 0x8000000000000000)))
+  (func (export "shr_s427") (param $x i64) (result i64) (i64.shr_s (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "shr_s428") (param $y i64) (result i64) (i64.shr_s (i64.const 1) (get_local $y)))
+  (func (export "shr_s429") (result i64) (i64.shr_s (i64.const 0x8000000000000000) (i64.const 63)))
+  (func (export "shr_s430") (param $x i64) (result i64) (i64.shr_s (get_local $x) (i64.const 63)))
+  (func (export "shr_s431") (param $y i64) (result i64) (i64.shr_s (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "shr_s432") (result i64) (i64.shr_s (i64.const -1) (i64.const 64)))
+  (func (export "shr_s433") (param $x i64) (result i64) (i64.shr_s (get_local $x) (i64.const 64)))
   (func (export "shr_s434") (param $y i64) (result i64) (i64.shr_s (i64.const -1) (get_local $y)))
-  (func (export "shr_s435") (result i64) (i64.shr_s (i64.const -1) (i64.const 0x8000000000000000)))
-  (func (export "shr_s436") (param $x i64) (result i64) (i64.shr_s (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "shr_s435") (result i64) (i64.shr_s (i64.const -1) (i64.const 65)))
+  (func (export "shr_s436") (param $x i64) (result i64) (i64.shr_s (get_local $x) (i64.const 65)))
   (func (export "shr_s437") (param $y i64) (result i64) (i64.shr_s (i64.const -1) (get_local $y)))
-  (func (export "shr_u438") (result i64) (i64.shr_u (i64.const 1) (i64.const 1)))
-  (func (export "shr_u439") (param $x i64) (result i64) (i64.shr_u (get_local $x) (i64.const 1)))
-  (func (export "shr_u440") (param $y i64) (result i64) (i64.shr_u (i64.const 1) (get_local $y)))
-  (func (export "shr_u441") (result i64) (i64.shr_u (i64.const 1) (i64.const 0)))
-  (func (export "shr_u442") (param $x i64) (result i64) (i64.shr_u (get_local $x) (i64.const 0)))
-  (func (export "shr_u443") (param $y i64) (result i64) (i64.shr_u (i64.const 1) (get_local $y)))
-  (func (export "shr_u444") (result i64) (i64.shr_u (i64.const -1) (i64.const 1)))
-  (func (export "shr_u445") (param $x i64) (result i64) (i64.shr_u (get_local $x) (i64.const 1)))
-  (func (export "shr_u446") (param $y i64) (result i64) (i64.shr_u (i64.const -1) (get_local $y)))
-  (func (export "shr_u447") (result i64) (i64.shr_u (i64.const 0x7fffffffffffffff) (i64.const 1)))
+  (func (export "shr_s438") (result i64) (i64.shr_s (i64.const -1) (i64.const -1)))
+  (func (export "shr_s439") (param $x i64) (result i64) (i64.shr_s (get_local $x) (i64.const -1)))
+  (func (export "shr_s440") (param $y i64) (result i64) (i64.shr_s (i64.const -1) (get_local $y)))
+  (func (export "shr_s441") (result i64) (i64.shr_s (i64.const -1) (i64.const 0x7fffffffffffffff)))
+  (func (export "shr_s442") (param $x i64) (result i64) (i64.shr_s (get_local $x) (i64.const 0x7fffffffffffffff)))
+  (func (export "shr_s443") (param $y i64) (result i64) (i64.shr_s (i64.const -1) (get_local $y)))
+  (func (export "shr_s444") (result i64) (i64.shr_s (i64.const -1) (i64.const 0x8000000000000000)))
+  (func (export "shr_s445") (param $x i64) (result i64) (i64.shr_s (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "shr_s446") (param $y i64) (result i64) (i64.shr_s (i64.const -1) (get_local $y)))
+  (func (export "shr_u447") (result i64) (i64.shr_u (i64.const 1) (i64.const 1)))
   (func (export "shr_u448") (param $x i64) (result i64) (i64.shr_u (get_local $x) (i64.const 1)))
-  (func (export "shr_u449") (param $y i64) (result i64) (i64.shr_u (i64.const 0x7fffffffffffffff) (get_local $y)))
-  (func (export "shr_u450") (result i64) (i64.shr_u (i64.const 0x8000000000000000) (i64.const 1)))
-  (func (export "shr_u451") (param $x i64) (result i64) (i64.shr_u (get_local $x) (i64.const 1)))
-  (func (export "shr_u452") (param $y i64) (result i64) (i64.shr_u (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "shr_u453") (result i64) (i64.shr_u (i64.const 0x4000000000000000) (i64.const 1)))
+  (func (export "shr_u449") (param $y i64) (result i64) (i64.shr_u (i64.const 1) (get_local $y)))
+  (func (export "shr_u450") (result i64) (i64.shr_u (i64.const 1) (i64.const 0)))
+  (func (export "shr_u451") (param $x i64) (result i64) (i64.shr_u (get_local $x) (i64.const 0)))
+  (func (export "shr_u452") (param $y i64) (result i64) (i64.shr_u (i64.const 1) (get_local $y)))
+  (func (export "shr_u453") (result i64) (i64.shr_u (i64.const -1) (i64.const 1)))
   (func (export "shr_u454") (param $x i64) (result i64) (i64.shr_u (get_local $x) (i64.const 1)))
-  (func (export "shr_u455") (param $y i64) (result i64) (i64.shr_u (i64.const 0x4000000000000000) (get_local $y)))
-  (func (export "shr_u456") (result i64) (i64.shr_u (i64.const 1) (i64.const 64)))
-  (func (export "shr_u457") (param $x i64) (result i64) (i64.shr_u (get_local $x) (i64.const 64)))
-  (func (export "shr_u458") (param $y i64) (result i64) (i64.shr_u (i64.const 1) (get_local $y)))
-  (func (export "shr_u459") (result i64) (i64.shr_u (i64.const 1) (i64.const 65)))
-  (func (export "shr_u460") (param $x i64) (result i64) (i64.shr_u (get_local $x) (i64.const 65)))
-  (func (export "shr_u461") (param $y i64) (result i64) (i64.shr_u (i64.const 1) (get_local $y)))
-  (func (export "shr_u462") (result i64) (i64.shr_u (i64.const 1) (i64.const -1)))
-  (func (export "shr_u463") (param $x i64) (result i64) (i64.shr_u (get_local $x) (i64.const -1)))
-  (func (export "shr_u464") (param $y i64) (result i64) (i64.shr_u (i64.const 1) (get_local $y)))
-  (func (export "shr_u465") (result i64) (i64.shr_u (i64.const 1) (i64.const 0x7fffffffffffffff)))
-  (func (export "shr_u466") (param $x i64) (result i64) (i64.shr_u (get_local $x) (i64.const 0x7fffffffffffffff)))
+  (func (export "shr_u455") (param $y i64) (result i64) (i64.shr_u (i64.const -1) (get_local $y)))
+  (func (export "shr_u456") (result i64) (i64.shr_u (i64.const 0x7fffffffffffffff) (i64.const 1)))
+  (func (export "shr_u457") (param $x i64) (result i64) (i64.shr_u (get_local $x) (i64.const 1)))
+  (func (export "shr_u458") (param $y i64) (result i64) (i64.shr_u (i64.const 0x7fffffffffffffff) (get_local $y)))
+  (func (export "shr_u459") (result i64) (i64.shr_u (i64.const 0x8000000000000000) (i64.const 1)))
+  (func (export "shr_u460") (param $x i64) (result i64) (i64.shr_u (get_local $x) (i64.const 1)))
+  (func (export "shr_u461") (param $y i64) (result i64) (i64.shr_u (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "shr_u462") (result i64) (i64.shr_u (i64.const 0x4000000000000000) (i64.const 1)))
+  (func (export "shr_u463") (param $x i64) (result i64) (i64.shr_u (get_local $x) (i64.const 1)))
+  (func (export "shr_u464") (param $y i64) (result i64) (i64.shr_u (i64.const 0x4000000000000000) (get_local $y)))
+  (func (export "shr_u465") (result i64) (i64.shr_u (i64.const 1) (i64.const 64)))
+  (func (export "shr_u466") (param $x i64) (result i64) (i64.shr_u (get_local $x) (i64.const 64)))
   (func (export "shr_u467") (param $y i64) (result i64) (i64.shr_u (i64.const 1) (get_local $y)))
-  (func (export "shr_u468") (result i64) (i64.shr_u (i64.const 1) (i64.const 0x8000000000000000)))
-  (func (export "shr_u469") (param $x i64) (result i64) (i64.shr_u (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "shr_u468") (result i64) (i64.shr_u (i64.const 1) (i64.const 65)))
+  (func (export "shr_u469") (param $x i64) (result i64) (i64.shr_u (get_local $x) (i64.const 65)))
   (func (export "shr_u470") (param $y i64) (result i64) (i64.shr_u (i64.const 1) (get_local $y)))
-  (func (export "shr_u471") (result i64) (i64.shr_u (i64.const 0x8000000000000000) (i64.const 63)))
-  (func (export "shr_u472") (param $x i64) (result i64) (i64.shr_u (get_local $x) (i64.const 63)))
-  (func (export "shr_u473") (param $y i64) (result i64) (i64.shr_u (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "shr_u474") (result i64) (i64.shr_u (i64.const -1) (i64.const 64)))
-  (func (export "shr_u475") (param $x i64) (result i64) (i64.shr_u (get_local $x) (i64.const 64)))
-  (func (export "shr_u476") (param $y i64) (result i64) (i64.shr_u (i64.const -1) (get_local $y)))
-  (func (export "shr_u477") (result i64) (i64.shr_u (i64.const -1) (i64.const 65)))
-  (func (export "shr_u478") (param $x i64) (result i64) (i64.shr_u (get_local $x) (i64.const 65)))
-  (func (export "shr_u479") (param $y i64) (result i64) (i64.shr_u (i64.const -1) (get_local $y)))
-  (func (export "shr_u480") (result i64) (i64.shr_u (i64.const -1) (i64.const -1)))
-  (func (export "shr_u481") (param $x i64) (result i64) (i64.shr_u (get_local $x) (i64.const -1)))
-  (func (export "shr_u482") (param $y i64) (result i64) (i64.shr_u (i64.const -1) (get_local $y)))
-  (func (export "shr_u483") (result i64) (i64.shr_u (i64.const -1) (i64.const 0x7fffffffffffffff)))
-  (func (export "shr_u484") (param $x i64) (result i64) (i64.shr_u (get_local $x) (i64.const 0x7fffffffffffffff)))
+  (func (export "shr_u471") (result i64) (i64.shr_u (i64.const 1) (i64.const -1)))
+  (func (export "shr_u472") (param $x i64) (result i64) (i64.shr_u (get_local $x) (i64.const -1)))
+  (func (export "shr_u473") (param $y i64) (result i64) (i64.shr_u (i64.const 1) (get_local $y)))
+  (func (export "shr_u474") (result i64) (i64.shr_u (i64.const 1) (i64.const 0x7fffffffffffffff)))
+  (func (export "shr_u475") (param $x i64) (result i64) (i64.shr_u (get_local $x) (i64.const 0x7fffffffffffffff)))
+  (func (export "shr_u476") (param $y i64) (result i64) (i64.shr_u (i64.const 1) (get_local $y)))
+  (func (export "shr_u477") (result i64) (i64.shr_u (i64.const 1) (i64.const 0x8000000000000000)))
+  (func (export "shr_u478") (param $x i64) (result i64) (i64.shr_u (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "shr_u479") (param $y i64) (result i64) (i64.shr_u (i64.const 1) (get_local $y)))
+  (func (export "shr_u480") (result i64) (i64.shr_u (i64.const 0x8000000000000000) (i64.const 63)))
+  (func (export "shr_u481") (param $x i64) (result i64) (i64.shr_u (get_local $x) (i64.const 63)))
+  (func (export "shr_u482") (param $y i64) (result i64) (i64.shr_u (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "shr_u483") (result i64) (i64.shr_u (i64.const -1) (i64.const 64)))
+  (func (export "shr_u484") (param $x i64) (result i64) (i64.shr_u (get_local $x) (i64.const 64)))
   (func (export "shr_u485") (param $y i64) (result i64) (i64.shr_u (i64.const -1) (get_local $y)))
-  (func (export "shr_u486") (result i64) (i64.shr_u (i64.const -1) (i64.const 0x8000000000000000)))
-  (func (export "shr_u487") (param $x i64) (result i64) (i64.shr_u (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "shr_u486") (result i64) (i64.shr_u (i64.const -1) (i64.const 65)))
+  (func (export "shr_u487") (param $x i64) (result i64) (i64.shr_u (get_local $x) (i64.const 65)))
   (func (export "shr_u488") (param $y i64) (result i64) (i64.shr_u (i64.const -1) (get_local $y)))
-  (func (export "rotl489") (result i64) (i64.rotl (i64.const 1) (i64.const 1)))
-  (func (export "rotl490") (param $x i64) (result i64) (i64.rotl (get_local $x) (i64.const 1)))
-  (func (export "rotl491") (param $y i64) (result i64) (i64.rotl (i64.const 1) (get_local $y)))
-  (func (export "rotl492") (result i64) (i64.rotl (i64.const 1) (i64.const 0)))
-  (func (export "rotl493") (param $x i64) (result i64) (i64.rotl (get_local $x) (i64.const 0)))
-  (func (export "rotl494") (param $y i64) (result i64) (i64.rotl (i64.const 1) (get_local $y)))
-  (func (export "rotl495") (result i64) (i64.rotl (i64.const -1) (i64.const 1)))
-  (func (export "rotl496") (param $x i64) (result i64) (i64.rotl (get_local $x) (i64.const 1)))
-  (func (export "rotl497") (param $y i64) (result i64) (i64.rotl (i64.const -1) (get_local $y)))
-  (func (export "rotl498") (result i64) (i64.rotl (i64.const 0xabd1234ef567809c) (i64.const 63)))
-  (func (export "rotl499") (param $x i64) (result i64) (i64.rotl (get_local $x) (i64.const 63)))
-  (func (export "rotl500") (param $y i64) (result i64) (i64.rotl (i64.const 0xabd1234ef567809c) (get_local $y)))
-  (func (export "rotl501") (result i64) (i64.rotl (i64.const 0xabd1234ef567809c) (i64.const 0x800000000000003f)))
-  (func (export "rotl502") (param $x i64) (result i64) (i64.rotl (get_local $x) (i64.const 0x800000000000003f)))
-  (func (export "rotl503") (param $y i64) (result i64) (i64.rotl (i64.const 0xabd1234ef567809c) (get_local $y)))
-  (func (export "rotl504") (result i64) (i64.rotl (i64.const 1) (i64.const 63)))
-  (func (export "rotl505") (param $x i64) (result i64) (i64.rotl (get_local $x) (i64.const 63)))
-  (func (export "rotl506") (param $y i64) (result i64) (i64.rotl (i64.const 1) (get_local $y)))
-  (func (export "rotl507") (result i64) (i64.rotl (i64.const 0x8000000000000000) (i64.const 1)))
-  (func (export "rotl508") (param $x i64) (result i64) (i64.rotl (get_local $x) (i64.const 1)))
-  (func (export "rotl509") (param $y i64) (result i64) (i64.rotl (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "rotr510") (result i64) (i64.rotr (i64.const 1) (i64.const 1)))
-  (func (export "rotr511") (param $x i64) (result i64) (i64.rotr (get_local $x) (i64.const 1)))
-  (func (export "rotr512") (param $y i64) (result i64) (i64.rotr (i64.const 1) (get_local $y)))
-  (func (export "rotr513") (result i64) (i64.rotr (i64.const 1) (i64.const 0)))
-  (func (export "rotr514") (param $x i64) (result i64) (i64.rotr (get_local $x) (i64.const 0)))
-  (func (export "rotr515") (param $y i64) (result i64) (i64.rotr (i64.const 1) (get_local $y)))
-  (func (export "rotr516") (result i64) (i64.rotr (i64.const -1) (i64.const 1)))
-  (func (export "rotr517") (param $x i64) (result i64) (i64.rotr (get_local $x) (i64.const 1)))
-  (func (export "rotr518") (param $y i64) (result i64) (i64.rotr (i64.const -1) (get_local $y)))
-  (func (export "rotr519") (result i64) (i64.rotr (i64.const 0xabcd1234ef567809) (i64.const 53)))
-  (func (export "rotr520") (param $x i64) (result i64) (i64.rotr (get_local $x) (i64.const 53)))
-  (func (export "rotr521") (param $y i64) (result i64) (i64.rotr (i64.const 0xabcd1234ef567809) (get_local $y)))
-  (func (export "rotr522") (result i64) (i64.rotr (i64.const 0xabcd1234ef567809) (i64.const 0x35)))
-  (func (export "rotr523") (param $x i64) (result i64) (i64.rotr (get_local $x) (i64.const 0x35)))
-  (func (export "rotr524") (param $y i64) (result i64) (i64.rotr (i64.const 0xabcd1234ef567809) (get_local $y)))
-  (func (export "rotr525") (result i64) (i64.rotr (i64.const 0xabcd1234ef567809) (i64.const 0xf5)))
-  (func (export "rotr526") (param $x i64) (result i64) (i64.rotr (get_local $x) (i64.const 0xf5)))
-  (func (export "rotr527") (param $y i64) (result i64) (i64.rotr (i64.const 0xabcd1234ef567809) (get_local $y)))
-  (func (export "rotr528") (result i64) (i64.rotr (i64.const 1) (i64.const 1)))
-  (func (export "rotr529") (param $x i64) (result i64) (i64.rotr (get_local $x) (i64.const 1)))
-  (func (export "rotr530") (param $y i64) (result i64) (i64.rotr (i64.const 1) (get_local $y)))
-  (func (export "rotr531") (result i64) (i64.rotr (i64.const 0x8000000000000000) (i64.const 63)))
-  (func (export "rotr532") (param $x i64) (result i64) (i64.rotr (get_local $x) (i64.const 63)))
-  (func (export "rotr533") (param $y i64) (result i64) (i64.rotr (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "clz534") (result i64) (i64.clz (i64.const 0xffffffffffffffff)))
-  (func (export "clz535") (result i64) (i64.clz (i64.const 0)))
-  (func (export "clz536") (result i64) (i64.clz (i64.const 0x00008000)))
-  (func (export "clz537") (result i64) (i64.clz (i64.const 0xff)))
-  (func (export "clz538") (result i64) (i64.clz (i64.const 0x8000000000000000)))
-  (func (export "clz539") (result i64) (i64.clz (i64.const 1)))
-  (func (export "clz540") (result i64) (i64.clz (i64.const 2)))
-  (func (export "clz541") (result i64) (i64.clz (i64.const 0x7fffffffffffffff)))
-  (func (export "ctz542") (result i64) (i64.ctz (i64.const -1)))
-  (func (export "ctz543") (result i64) (i64.ctz (i64.const 0)))
-  (func (export "ctz544") (result i64) (i64.ctz (i64.const 0x00008000)))
-  (func (export "ctz545") (result i64) (i64.ctz (i64.const 0x00010000)))
-  (func (export "ctz546") (result i64) (i64.ctz (i64.const 0x8000000000000000)))
-  (func (export "ctz547") (result i64) (i64.ctz (i64.const 0x7fffffffffffffff)))
-  (func (export "popcnt548") (result i64) (i64.popcnt (i64.const -1)))
-  (func (export "popcnt549") (result i64) (i64.popcnt (i64.const 0)))
-  (func (export "popcnt550") (result i64) (i64.popcnt (i64.const 0x00008000)))
-  (func (export "popcnt551") (result i64) (i64.popcnt (i64.const 0x8000800080008000)))
-  (func (export "popcnt552") (result i64) (i64.popcnt (i64.const 0x7fffffffffffffff)))
-  (func (export "popcnt553") (result i64) (i64.popcnt (i64.const 0xAAAAAAAA55555555)))
-  (func (export "popcnt554") (result i64) (i64.popcnt (i64.const 0x99999999AAAAAAAA)))
-  (func (export "popcnt555") (result i64) (i64.popcnt (i64.const 0xDEADBEEFDEADBEEF)))
-  (func (export "eqz556") (result i32) (i64.eqz (i64.const 0)))
-  (func (export "eqz557") (result i32) (i64.eqz (i64.const 1)))
-  (func (export "eqz558") (result i32) (i64.eqz (i64.const 0x8000000000000000)))
-  (func (export "eqz559") (result i32) (i64.eqz (i64.const 0x7fffffffffffffff)))
-  (func (export "eq560") (result i32) (i64.eq (i64.const 0) (i64.const 0)))
-  (func (export "eq561") (param $x i64) (result i32) (i64.eq (get_local $x) (i64.const 0)))
-  (func (export "eq562") (param $y i64) (result i32) (i64.eq (i64.const 0) (get_local $y)))
-  (func (export "eq563") (result i32) (i64.eq (i64.const 1) (i64.const 1)))
-  (func (export "eq564") (param $x i64) (result i32) (i64.eq (get_local $x) (i64.const 1)))
-  (func (export "eq565") (param $y i64) (result i32) (i64.eq (i64.const 1) (get_local $y)))
-  (func (export "eq566") (result i32) (i64.eq (i64.const -1) (i64.const 1)))
-  (func (export "eq567") (param $x i64) (result i32) (i64.eq (get_local $x) (i64.const 1)))
-  (func (export "eq568") (param $y i64) (result i32) (i64.eq (i64.const -1) (get_local $y)))
-  (func (export "eq569") (result i32) (i64.eq (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)))
-  (func (export "eq570") (param $x i64) (result i32) (i64.eq (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "eq571") (param $y i64) (result i32) (i64.eq (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "eq572") (result i32) (i64.eq (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)))
-  (func (export "eq573") (param $x i64) (result i32) (i64.eq (get_local $x) (i64.const 0x7fffffffffffffff)))
-  (func (export "eq574") (param $y i64) (result i32) (i64.eq (i64.const 0x7fffffffffffffff) (get_local $y)))
-  (func (export "eq575") (result i32) (i64.eq (i64.const -1) (i64.const -1)))
-  (func (export "eq576") (param $x i64) (result i32) (i64.eq (get_local $x) (i64.const -1)))
-  (func (export "eq577") (param $y i64) (result i32) (i64.eq (i64.const -1) (get_local $y)))
-  (func (export "eq578") (result i32) (i64.eq (i64.const 1) (i64.const 0)))
-  (func (export "eq579") (param $x i64) (result i32) (i64.eq (get_local $x) (i64.const 0)))
-  (func (export "eq580") (param $y i64) (result i32) (i64.eq (i64.const 1) (get_local $y)))
-  (func (export "eq581") (result i32) (i64.eq (i64.const 0) (i64.const 1)))
-  (func (export "eq582") (param $x i64) (result i32) (i64.eq (get_local $x) (i64.const 1)))
-  (func (export "eq583") (param $y i64) (result i32) (i64.eq (i64.const 0) (get_local $y)))
-  (func (export "eq584") (result i32) (i64.eq (i64.const 0x8000000000000000) (i64.const 0)))
-  (func (export "eq585") (param $x i64) (result i32) (i64.eq (get_local $x) (i64.const 0)))
-  (func (export "eq586") (param $y i64) (result i32) (i64.eq (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "eq587") (result i32) (i64.eq (i64.const 0) (i64.const 0x8000000000000000)))
-  (func (export "eq588") (param $x i64) (result i32) (i64.eq (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "eq589") (param $y i64) (result i32) (i64.eq (i64.const 0) (get_local $y)))
-  (func (export "eq590") (result i32) (i64.eq (i64.const 0x8000000000000000) (i64.const -1)))
-  (func (export "eq591") (param $x i64) (result i32) (i64.eq (get_local $x) (i64.const -1)))
-  (func (export "eq592") (param $y i64) (result i32) (i64.eq (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "eq593") (result i32) (i64.eq (i64.const -1) (i64.const 0x8000000000000000)))
-  (func (export "eq594") (param $x i64) (result i32) (i64.eq (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "eq595") (param $y i64) (result i32) (i64.eq (i64.const -1) (get_local $y)))
-  (func (export "eq596") (result i32) (i64.eq (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)))
-  (func (export "eq597") (param $x i64) (result i32) (i64.eq (get_local $x) (i64.const 0x7fffffffffffffff)))
-  (func (export "eq598") (param $y i64) (result i32) (i64.eq (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "eq599") (result i32) (i64.eq (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)))
-  (func (export "eq600") (param $x i64) (result i32) (i64.eq (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "eq601") (param $y i64) (result i32) (i64.eq (i64.const 0x7fffffffffffffff) (get_local $y)))
-  (func (export "ne602") (result i32) (i64.ne (i64.const 0) (i64.const 0)))
-  (func (export "ne603") (param $x i64) (result i32) (i64.ne (get_local $x) (i64.const 0)))
-  (func (export "ne604") (param $y i64) (result i32) (i64.ne (i64.const 0) (get_local $y)))
-  (func (export "ne605") (result i32) (i64.ne (i64.const 1) (i64.const 1)))
-  (func (export "ne606") (param $x i64) (result i32) (i64.ne (get_local $x) (i64.const 1)))
-  (func (export "ne607") (param $y i64) (result i32) (i64.ne (i64.const 1) (get_local $y)))
-  (func (export "ne608") (result i32) (i64.ne (i64.const -1) (i64.const 1)))
-  (func (export "ne609") (param $x i64) (result i32) (i64.ne (get_local $x) (i64.const 1)))
-  (func (export "ne610") (param $y i64) (result i32) (i64.ne (i64.const -1) (get_local $y)))
-  (func (export "ne611") (result i32) (i64.ne (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)))
-  (func (export "ne612") (param $x i64) (result i32) (i64.ne (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "ne613") (param $y i64) (result i32) (i64.ne (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "ne614") (result i32) (i64.ne (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)))
-  (func (export "ne615") (param $x i64) (result i32) (i64.ne (get_local $x) (i64.const 0x7fffffffffffffff)))
-  (func (export "ne616") (param $y i64) (result i32) (i64.ne (i64.const 0x7fffffffffffffff) (get_local $y)))
-  (func (export "ne617") (result i32) (i64.ne (i64.const -1) (i64.const -1)))
-  (func (export "ne618") (param $x i64) (result i32) (i64.ne (get_local $x) (i64.const -1)))
-  (func (export "ne619") (param $y i64) (result i32) (i64.ne (i64.const -1) (get_local $y)))
-  (func (export "ne620") (result i32) (i64.ne (i64.const 1) (i64.const 0)))
-  (func (export "ne621") (param $x i64) (result i32) (i64.ne (get_local $x) (i64.const 0)))
-  (func (export "ne622") (param $y i64) (result i32) (i64.ne (i64.const 1) (get_local $y)))
-  (func (export "ne623") (result i32) (i64.ne (i64.const 0) (i64.const 1)))
-  (func (export "ne624") (param $x i64) (result i32) (i64.ne (get_local $x) (i64.const 1)))
-  (func (export "ne625") (param $y i64) (result i32) (i64.ne (i64.const 0) (get_local $y)))
-  (func (export "ne626") (result i32) (i64.ne (i64.const 0x8000000000000000) (i64.const 0)))
-  (func (export "ne627") (param $x i64) (result i32) (i64.ne (get_local $x) (i64.const 0)))
-  (func (export "ne628") (param $y i64) (result i32) (i64.ne (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "ne629") (result i32) (i64.ne (i64.const 0) (i64.const 0x8000000000000000)))
-  (func (export "ne630") (param $x i64) (result i32) (i64.ne (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "ne631") (param $y i64) (result i32) (i64.ne (i64.const 0) (get_local $y)))
-  (func (export "ne632") (result i32) (i64.ne (i64.const 0x8000000000000000) (i64.const -1)))
-  (func (export "ne633") (param $x i64) (result i32) (i64.ne (get_local $x) (i64.const -1)))
-  (func (export "ne634") (param $y i64) (result i32) (i64.ne (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "ne635") (result i32) (i64.ne (i64.const -1) (i64.const 0x8000000000000000)))
-  (func (export "ne636") (param $x i64) (result i32) (i64.ne (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "ne637") (param $y i64) (result i32) (i64.ne (i64.const -1) (get_local $y)))
-  (func (export "ne638") (result i32) (i64.ne (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)))
-  (func (export "ne639") (param $x i64) (result i32) (i64.ne (get_local $x) (i64.const 0x7fffffffffffffff)))
-  (func (export "ne640") (param $y i64) (result i32) (i64.ne (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "ne641") (result i32) (i64.ne (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)))
-  (func (export "ne642") (param $x i64) (result i32) (i64.ne (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "ne643") (param $y i64) (result i32) (i64.ne (i64.const 0x7fffffffffffffff) (get_local $y)))
-  (func (export "lt_s644") (result i32) (i64.lt_s (i64.const 0) (i64.const 0)))
-  (func (export "lt_s645") (param $x i64) (result i32) (i64.lt_s (get_local $x) (i64.const 0)))
-  (func (export "lt_s646") (param $y i64) (result i32) (i64.lt_s (i64.const 0) (get_local $y)))
-  (func (export "lt_s647") (result i32) (i64.lt_s (i64.const 1) (i64.const 1)))
-  (func (export "lt_s648") (param $x i64) (result i32) (i64.lt_s (get_local $x) (i64.const 1)))
-  (func (export "lt_s649") (param $y i64) (result i32) (i64.lt_s (i64.const 1) (get_local $y)))
-  (func (export "lt_s650") (result i32) (i64.lt_s (i64.const -1) (i64.const 1)))
-  (func (export "lt_s651") (param $x i64) (result i32) (i64.lt_s (get_local $x) (i64.const 1)))
-  (func (export "lt_s652") (param $y i64) (result i32) (i64.lt_s (i64.const -1) (get_local $y)))
-  (func (export "lt_s653") (result i32) (i64.lt_s (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)))
-  (func (export "lt_s654") (param $x i64) (result i32) (i64.lt_s (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "lt_s655") (param $y i64) (result i32) (i64.lt_s (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "lt_s656") (result i32) (i64.lt_s (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)))
-  (func (export "lt_s657") (param $x i64) (result i32) (i64.lt_s (get_local $x) (i64.const 0x7fffffffffffffff)))
-  (func (export "lt_s658") (param $y i64) (result i32) (i64.lt_s (i64.const 0x7fffffffffffffff) (get_local $y)))
-  (func (export "lt_s659") (result i32) (i64.lt_s (i64.const -1) (i64.const -1)))
-  (func (export "lt_s660") (param $x i64) (result i32) (i64.lt_s (get_local $x) (i64.const -1)))
-  (func (export "lt_s661") (param $y i64) (result i32) (i64.lt_s (i64.const -1) (get_local $y)))
-  (func (export "lt_s662") (result i32) (i64.lt_s (i64.const 1) (i64.const 0)))
-  (func (export "lt_s663") (param $x i64) (result i32) (i64.lt_s (get_local $x) (i64.const 0)))
-  (func (export "lt_s664") (param $y i64) (result i32) (i64.lt_s (i64.const 1) (get_local $y)))
-  (func (export "lt_s665") (result i32) (i64.lt_s (i64.const 0) (i64.const 1)))
-  (func (export "lt_s666") (param $x i64) (result i32) (i64.lt_s (get_local $x) (i64.const 1)))
-  (func (export "lt_s667") (param $y i64) (result i32) (i64.lt_s (i64.const 0) (get_local $y)))
-  (func (export "lt_s668") (result i32) (i64.lt_s (i64.const 0x8000000000000000) (i64.const 0)))
-  (func (export "lt_s669") (param $x i64) (result i32) (i64.lt_s (get_local $x) (i64.const 0)))
-  (func (export "lt_s670") (param $y i64) (result i32) (i64.lt_s (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "lt_s671") (result i32) (i64.lt_s (i64.const 0) (i64.const 0x8000000000000000)))
-  (func (export "lt_s672") (param $x i64) (result i32) (i64.lt_s (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "lt_s673") (param $y i64) (result i32) (i64.lt_s (i64.const 0) (get_local $y)))
-  (func (export "lt_s674") (result i32) (i64.lt_s (i64.const 0x8000000000000000) (i64.const -1)))
-  (func (export "lt_s675") (param $x i64) (result i32) (i64.lt_s (get_local $x) (i64.const -1)))
-  (func (export "lt_s676") (param $y i64) (result i32) (i64.lt_s (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "lt_s677") (result i32) (i64.lt_s (i64.const -1) (i64.const 0x8000000000000000)))
-  (func (export "lt_s678") (param $x i64) (result i32) (i64.lt_s (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "lt_s679") (param $y i64) (result i32) (i64.lt_s (i64.const -1) (get_local $y)))
-  (func (export "lt_s680") (result i32) (i64.lt_s (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)))
-  (func (export "lt_s681") (param $x i64) (result i32) (i64.lt_s (get_local $x) (i64.const 0x7fffffffffffffff)))
-  (func (export "lt_s682") (param $y i64) (result i32) (i64.lt_s (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "lt_s683") (result i32) (i64.lt_s (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)))
-  (func (export "lt_s684") (param $x i64) (result i32) (i64.lt_s (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "lt_s685") (param $y i64) (result i32) (i64.lt_s (i64.const 0x7fffffffffffffff) (get_local $y)))
-  (func (export "lt_u686") (result i32) (i64.lt_u (i64.const 0) (i64.const 0)))
-  (func (export "lt_u687") (param $x i64) (result i32) (i64.lt_u (get_local $x) (i64.const 0)))
-  (func (export "lt_u688") (param $y i64) (result i32) (i64.lt_u (i64.const 0) (get_local $y)))
-  (func (export "lt_u689") (result i32) (i64.lt_u (i64.const 1) (i64.const 1)))
-  (func (export "lt_u690") (param $x i64) (result i32) (i64.lt_u (get_local $x) (i64.const 1)))
-  (func (export "lt_u691") (param $y i64) (result i32) (i64.lt_u (i64.const 1) (get_local $y)))
-  (func (export "lt_u692") (result i32) (i64.lt_u (i64.const -1) (i64.const 1)))
-  (func (export "lt_u693") (param $x i64) (result i32) (i64.lt_u (get_local $x) (i64.const 1)))
-  (func (export "lt_u694") (param $y i64) (result i32) (i64.lt_u (i64.const -1) (get_local $y)))
-  (func (export "lt_u695") (result i32) (i64.lt_u (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)))
-  (func (export "lt_u696") (param $x i64) (result i32) (i64.lt_u (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "lt_u697") (param $y i64) (result i32) (i64.lt_u (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "lt_u698") (result i32) (i64.lt_u (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)))
-  (func (export "lt_u699") (param $x i64) (result i32) (i64.lt_u (get_local $x) (i64.const 0x7fffffffffffffff)))
-  (func (export "lt_u700") (param $y i64) (result i32) (i64.lt_u (i64.const 0x7fffffffffffffff) (get_local $y)))
-  (func (export "lt_u701") (result i32) (i64.lt_u (i64.const -1) (i64.const -1)))
-  (func (export "lt_u702") (param $x i64) (result i32) (i64.lt_u (get_local $x) (i64.const -1)))
-  (func (export "lt_u703") (param $y i64) (result i32) (i64.lt_u (i64.const -1) (get_local $y)))
-  (func (export "lt_u704") (result i32) (i64.lt_u (i64.const 1) (i64.const 0)))
-  (func (export "lt_u705") (param $x i64) (result i32) (i64.lt_u (get_local $x) (i64.const 0)))
-  (func (export "lt_u706") (param $y i64) (result i32) (i64.lt_u (i64.const 1) (get_local $y)))
-  (func (export "lt_u707") (result i32) (i64.lt_u (i64.const 0) (i64.const 1)))
-  (func (export "lt_u708") (param $x i64) (result i32) (i64.lt_u (get_local $x) (i64.const 1)))
-  (func (export "lt_u709") (param $y i64) (result i32) (i64.lt_u (i64.const 0) (get_local $y)))
-  (func (export "lt_u710") (result i32) (i64.lt_u (i64.const 0x8000000000000000) (i64.const 0)))
-  (func (export "lt_u711") (param $x i64) (result i32) (i64.lt_u (get_local $x) (i64.const 0)))
-  (func (export "lt_u712") (param $y i64) (result i32) (i64.lt_u (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "lt_u713") (result i32) (i64.lt_u (i64.const 0) (i64.const 0x8000000000000000)))
-  (func (export "lt_u714") (param $x i64) (result i32) (i64.lt_u (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "lt_u715") (param $y i64) (result i32) (i64.lt_u (i64.const 0) (get_local $y)))
-  (func (export "lt_u716") (result i32) (i64.lt_u (i64.const 0x8000000000000000) (i64.const -1)))
-  (func (export "lt_u717") (param $x i64) (result i32) (i64.lt_u (get_local $x) (i64.const -1)))
-  (func (export "lt_u718") (param $y i64) (result i32) (i64.lt_u (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "lt_u719") (result i32) (i64.lt_u (i64.const -1) (i64.const 0x8000000000000000)))
-  (func (export "lt_u720") (param $x i64) (result i32) (i64.lt_u (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "lt_u721") (param $y i64) (result i32) (i64.lt_u (i64.const -1) (get_local $y)))
-  (func (export "lt_u722") (result i32) (i64.lt_u (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)))
-  (func (export "lt_u723") (param $x i64) (result i32) (i64.lt_u (get_local $x) (i64.const 0x7fffffffffffffff)))
-  (func (export "lt_u724") (param $y i64) (result i32) (i64.lt_u (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "lt_u725") (result i32) (i64.lt_u (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)))
-  (func (export "lt_u726") (param $x i64) (result i32) (i64.lt_u (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "lt_u727") (param $y i64) (result i32) (i64.lt_u (i64.const 0x7fffffffffffffff) (get_local $y)))
-  (func (export "le_s728") (result i32) (i64.le_s (i64.const 0) (i64.const 0)))
-  (func (export "le_s729") (param $x i64) (result i32) (i64.le_s (get_local $x) (i64.const 0)))
-  (func (export "le_s730") (param $y i64) (result i32) (i64.le_s (i64.const 0) (get_local $y)))
-  (func (export "le_s731") (result i32) (i64.le_s (i64.const 1) (i64.const 1)))
-  (func (export "le_s732") (param $x i64) (result i32) (i64.le_s (get_local $x) (i64.const 1)))
-  (func (export "le_s733") (param $y i64) (result i32) (i64.le_s (i64.const 1) (get_local $y)))
-  (func (export "le_s734") (result i32) (i64.le_s (i64.const -1) (i64.const 1)))
-  (func (export "le_s735") (param $x i64) (result i32) (i64.le_s (get_local $x) (i64.const 1)))
-  (func (export "le_s736") (param $y i64) (result i32) (i64.le_s (i64.const -1) (get_local $y)))
-  (func (export "le_s737") (result i32) (i64.le_s (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)))
-  (func (export "le_s738") (param $x i64) (result i32) (i64.le_s (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "le_s739") (param $y i64) (result i32) (i64.le_s (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "le_s740") (result i32) (i64.le_s (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)))
-  (func (export "le_s741") (param $x i64) (result i32) (i64.le_s (get_local $x) (i64.const 0x7fffffffffffffff)))
-  (func (export "le_s742") (param $y i64) (result i32) (i64.le_s (i64.const 0x7fffffffffffffff) (get_local $y)))
-  (func (export "le_s743") (result i32) (i64.le_s (i64.const -1) (i64.const -1)))
-  (func (export "le_s744") (param $x i64) (result i32) (i64.le_s (get_local $x) (i64.const -1)))
-  (func (export "le_s745") (param $y i64) (result i32) (i64.le_s (i64.const -1) (get_local $y)))
-  (func (export "le_s746") (result i32) (i64.le_s (i64.const 1) (i64.const 0)))
-  (func (export "le_s747") (param $x i64) (result i32) (i64.le_s (get_local $x) (i64.const 0)))
-  (func (export "le_s748") (param $y i64) (result i32) (i64.le_s (i64.const 1) (get_local $y)))
-  (func (export "le_s749") (result i32) (i64.le_s (i64.const 0) (i64.const 1)))
-  (func (export "le_s750") (param $x i64) (result i32) (i64.le_s (get_local $x) (i64.const 1)))
-  (func (export "le_s751") (param $y i64) (result i32) (i64.le_s (i64.const 0) (get_local $y)))
-  (func (export "le_s752") (result i32) (i64.le_s (i64.const 0x8000000000000000) (i64.const 0)))
-  (func (export "le_s753") (param $x i64) (result i32) (i64.le_s (get_local $x) (i64.const 0)))
-  (func (export "le_s754") (param $y i64) (result i32) (i64.le_s (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "le_s755") (result i32) (i64.le_s (i64.const 0) (i64.const 0x8000000000000000)))
-  (func (export "le_s756") (param $x i64) (result i32) (i64.le_s (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "le_s757") (param $y i64) (result i32) (i64.le_s (i64.const 0) (get_local $y)))
-  (func (export "le_s758") (result i32) (i64.le_s (i64.const 0x8000000000000000) (i64.const -1)))
-  (func (export "le_s759") (param $x i64) (result i32) (i64.le_s (get_local $x) (i64.const -1)))
-  (func (export "le_s760") (param $y i64) (result i32) (i64.le_s (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "le_s761") (result i32) (i64.le_s (i64.const -1) (i64.const 0x8000000000000000)))
-  (func (export "le_s762") (param $x i64) (result i32) (i64.le_s (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "le_s763") (param $y i64) (result i32) (i64.le_s (i64.const -1) (get_local $y)))
-  (func (export "le_s764") (result i32) (i64.le_s (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)))
-  (func (export "le_s765") (param $x i64) (result i32) (i64.le_s (get_local $x) (i64.const 0x7fffffffffffffff)))
-  (func (export "le_s766") (param $y i64) (result i32) (i64.le_s (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "le_s767") (result i32) (i64.le_s (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)))
-  (func (export "le_s768") (param $x i64) (result i32) (i64.le_s (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "le_s769") (param $y i64) (result i32) (i64.le_s (i64.const 0x7fffffffffffffff) (get_local $y)))
-  (func (export "le_u770") (result i32) (i64.le_u (i64.const 0) (i64.const 0)))
-  (func (export "le_u771") (param $x i64) (result i32) (i64.le_u (get_local $x) (i64.const 0)))
-  (func (export "le_u772") (param $y i64) (result i32) (i64.le_u (i64.const 0) (get_local $y)))
-  (func (export "le_u773") (result i32) (i64.le_u (i64.const 1) (i64.const 1)))
-  (func (export "le_u774") (param $x i64) (result i32) (i64.le_u (get_local $x) (i64.const 1)))
-  (func (export "le_u775") (param $y i64) (result i32) (i64.le_u (i64.const 1) (get_local $y)))
-  (func (export "le_u776") (result i32) (i64.le_u (i64.const -1) (i64.const 1)))
-  (func (export "le_u777") (param $x i64) (result i32) (i64.le_u (get_local $x) (i64.const 1)))
-  (func (export "le_u778") (param $y i64) (result i32) (i64.le_u (i64.const -1) (get_local $y)))
-  (func (export "le_u779") (result i32) (i64.le_u (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)))
-  (func (export "le_u780") (param $x i64) (result i32) (i64.le_u (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "le_u781") (param $y i64) (result i32) (i64.le_u (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "le_u782") (result i32) (i64.le_u (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)))
-  (func (export "le_u783") (param $x i64) (result i32) (i64.le_u (get_local $x) (i64.const 0x7fffffffffffffff)))
-  (func (export "le_u784") (param $y i64) (result i32) (i64.le_u (i64.const 0x7fffffffffffffff) (get_local $y)))
-  (func (export "le_u785") (result i32) (i64.le_u (i64.const -1) (i64.const -1)))
-  (func (export "le_u786") (param $x i64) (result i32) (i64.le_u (get_local $x) (i64.const -1)))
-  (func (export "le_u787") (param $y i64) (result i32) (i64.le_u (i64.const -1) (get_local $y)))
-  (func (export "le_u788") (result i32) (i64.le_u (i64.const 1) (i64.const 0)))
-  (func (export "le_u789") (param $x i64) (result i32) (i64.le_u (get_local $x) (i64.const 0)))
-  (func (export "le_u790") (param $y i64) (result i32) (i64.le_u (i64.const 1) (get_local $y)))
-  (func (export "le_u791") (result i32) (i64.le_u (i64.const 0) (i64.const 1)))
-  (func (export "le_u792") (param $x i64) (result i32) (i64.le_u (get_local $x) (i64.const 1)))
-  (func (export "le_u793") (param $y i64) (result i32) (i64.le_u (i64.const 0) (get_local $y)))
-  (func (export "le_u794") (result i32) (i64.le_u (i64.const 0x8000000000000000) (i64.const 0)))
-  (func (export "le_u795") (param $x i64) (result i32) (i64.le_u (get_local $x) (i64.const 0)))
-  (func (export "le_u796") (param $y i64) (result i32) (i64.le_u (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "le_u797") (result i32) (i64.le_u (i64.const 0) (i64.const 0x8000000000000000)))
-  (func (export "le_u798") (param $x i64) (result i32) (i64.le_u (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "le_u799") (param $y i64) (result i32) (i64.le_u (i64.const 0) (get_local $y)))
-  (func (export "le_u800") (result i32) (i64.le_u (i64.const 0x8000000000000000) (i64.const -1)))
-  (func (export "le_u801") (param $x i64) (result i32) (i64.le_u (get_local $x) (i64.const -1)))
-  (func (export "le_u802") (param $y i64) (result i32) (i64.le_u (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "le_u803") (result i32) (i64.le_u (i64.const -1) (i64.const 0x8000000000000000)))
-  (func (export "le_u804") (param $x i64) (result i32) (i64.le_u (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "le_u805") (param $y i64) (result i32) (i64.le_u (i64.const -1) (get_local $y)))
-  (func (export "le_u806") (result i32) (i64.le_u (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)))
-  (func (export "le_u807") (param $x i64) (result i32) (i64.le_u (get_local $x) (i64.const 0x7fffffffffffffff)))
-  (func (export "le_u808") (param $y i64) (result i32) (i64.le_u (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "le_u809") (result i32) (i64.le_u (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)))
-  (func (export "le_u810") (param $x i64) (result i32) (i64.le_u (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "le_u811") (param $y i64) (result i32) (i64.le_u (i64.const 0x7fffffffffffffff) (get_local $y)))
-  (func (export "gt_s812") (result i32) (i64.gt_s (i64.const 0) (i64.const 0)))
-  (func (export "gt_s813") (param $x i64) (result i32) (i64.gt_s (get_local $x) (i64.const 0)))
-  (func (export "gt_s814") (param $y i64) (result i32) (i64.gt_s (i64.const 0) (get_local $y)))
-  (func (export "gt_s815") (result i32) (i64.gt_s (i64.const 1) (i64.const 1)))
-  (func (export "gt_s816") (param $x i64) (result i32) (i64.gt_s (get_local $x) (i64.const 1)))
-  (func (export "gt_s817") (param $y i64) (result i32) (i64.gt_s (i64.const 1) (get_local $y)))
-  (func (export "gt_s818") (result i32) (i64.gt_s (i64.const -1) (i64.const 1)))
-  (func (export "gt_s819") (param $x i64) (result i32) (i64.gt_s (get_local $x) (i64.const 1)))
-  (func (export "gt_s820") (param $y i64) (result i32) (i64.gt_s (i64.const -1) (get_local $y)))
-  (func (export "gt_s821") (result i32) (i64.gt_s (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)))
-  (func (export "gt_s822") (param $x i64) (result i32) (i64.gt_s (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "gt_s823") (param $y i64) (result i32) (i64.gt_s (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "gt_s824") (result i32) (i64.gt_s (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)))
-  (func (export "gt_s825") (param $x i64) (result i32) (i64.gt_s (get_local $x) (i64.const 0x7fffffffffffffff)))
-  (func (export "gt_s826") (param $y i64) (result i32) (i64.gt_s (i64.const 0x7fffffffffffffff) (get_local $y)))
-  (func (export "gt_s827") (result i32) (i64.gt_s (i64.const -1) (i64.const -1)))
-  (func (export "gt_s828") (param $x i64) (result i32) (i64.gt_s (get_local $x) (i64.const -1)))
-  (func (export "gt_s829") (param $y i64) (result i32) (i64.gt_s (i64.const -1) (get_local $y)))
-  (func (export "gt_s830") (result i32) (i64.gt_s (i64.const 1) (i64.const 0)))
-  (func (export "gt_s831") (param $x i64) (result i32) (i64.gt_s (get_local $x) (i64.const 0)))
-  (func (export "gt_s832") (param $y i64) (result i32) (i64.gt_s (i64.const 1) (get_local $y)))
-  (func (export "gt_s833") (result i32) (i64.gt_s (i64.const 0) (i64.const 1)))
-  (func (export "gt_s834") (param $x i64) (result i32) (i64.gt_s (get_local $x) (i64.const 1)))
-  (func (export "gt_s835") (param $y i64) (result i32) (i64.gt_s (i64.const 0) (get_local $y)))
-  (func (export "gt_s836") (result i32) (i64.gt_s (i64.const 0x8000000000000000) (i64.const 0)))
-  (func (export "gt_s837") (param $x i64) (result i32) (i64.gt_s (get_local $x) (i64.const 0)))
-  (func (export "gt_s838") (param $y i64) (result i32) (i64.gt_s (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "gt_s839") (result i32) (i64.gt_s (i64.const 0) (i64.const 0x8000000000000000)))
-  (func (export "gt_s840") (param $x i64) (result i32) (i64.gt_s (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "gt_s841") (param $y i64) (result i32) (i64.gt_s (i64.const 0) (get_local $y)))
-  (func (export "gt_s842") (result i32) (i64.gt_s (i64.const 0x8000000000000000) (i64.const -1)))
-  (func (export "gt_s843") (param $x i64) (result i32) (i64.gt_s (get_local $x) (i64.const -1)))
-  (func (export "gt_s844") (param $y i64) (result i32) (i64.gt_s (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "gt_s845") (result i32) (i64.gt_s (i64.const -1) (i64.const 0x8000000000000000)))
-  (func (export "gt_s846") (param $x i64) (result i32) (i64.gt_s (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "gt_s847") (param $y i64) (result i32) (i64.gt_s (i64.const -1) (get_local $y)))
-  (func (export "gt_s848") (result i32) (i64.gt_s (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)))
-  (func (export "gt_s849") (param $x i64) (result i32) (i64.gt_s (get_local $x) (i64.const 0x7fffffffffffffff)))
-  (func (export "gt_s850") (param $y i64) (result i32) (i64.gt_s (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "gt_s851") (result i32) (i64.gt_s (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)))
-  (func (export "gt_s852") (param $x i64) (result i32) (i64.gt_s (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "gt_s853") (param $y i64) (result i32) (i64.gt_s (i64.const 0x7fffffffffffffff) (get_local $y)))
-  (func (export "gt_u854") (result i32) (i64.gt_u (i64.const 0) (i64.const 0)))
-  (func (export "gt_u855") (param $x i64) (result i32) (i64.gt_u (get_local $x) (i64.const 0)))
-  (func (export "gt_u856") (param $y i64) (result i32) (i64.gt_u (i64.const 0) (get_local $y)))
-  (func (export "gt_u857") (result i32) (i64.gt_u (i64.const 1) (i64.const 1)))
-  (func (export "gt_u858") (param $x i64) (result i32) (i64.gt_u (get_local $x) (i64.const 1)))
-  (func (export "gt_u859") (param $y i64) (result i32) (i64.gt_u (i64.const 1) (get_local $y)))
-  (func (export "gt_u860") (result i32) (i64.gt_u (i64.const -1) (i64.const 1)))
-  (func (export "gt_u861") (param $x i64) (result i32) (i64.gt_u (get_local $x) (i64.const 1)))
-  (func (export "gt_u862") (param $y i64) (result i32) (i64.gt_u (i64.const -1) (get_local $y)))
-  (func (export "gt_u863") (result i32) (i64.gt_u (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)))
-  (func (export "gt_u864") (param $x i64) (result i32) (i64.gt_u (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "gt_u865") (param $y i64) (result i32) (i64.gt_u (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "gt_u866") (result i32) (i64.gt_u (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)))
-  (func (export "gt_u867") (param $x i64) (result i32) (i64.gt_u (get_local $x) (i64.const 0x7fffffffffffffff)))
-  (func (export "gt_u868") (param $y i64) (result i32) (i64.gt_u (i64.const 0x7fffffffffffffff) (get_local $y)))
-  (func (export "gt_u869") (result i32) (i64.gt_u (i64.const -1) (i64.const -1)))
-  (func (export "gt_u870") (param $x i64) (result i32) (i64.gt_u (get_local $x) (i64.const -1)))
-  (func (export "gt_u871") (param $y i64) (result i32) (i64.gt_u (i64.const -1) (get_local $y)))
-  (func (export "gt_u872") (result i32) (i64.gt_u (i64.const 1) (i64.const 0)))
-  (func (export "gt_u873") (param $x i64) (result i32) (i64.gt_u (get_local $x) (i64.const 0)))
-  (func (export "gt_u874") (param $y i64) (result i32) (i64.gt_u (i64.const 1) (get_local $y)))
-  (func (export "gt_u875") (result i32) (i64.gt_u (i64.const 0) (i64.const 1)))
-  (func (export "gt_u876") (param $x i64) (result i32) (i64.gt_u (get_local $x) (i64.const 1)))
-  (func (export "gt_u877") (param $y i64) (result i32) (i64.gt_u (i64.const 0) (get_local $y)))
-  (func (export "gt_u878") (result i32) (i64.gt_u (i64.const 0x8000000000000000) (i64.const 0)))
-  (func (export "gt_u879") (param $x i64) (result i32) (i64.gt_u (get_local $x) (i64.const 0)))
-  (func (export "gt_u880") (param $y i64) (result i32) (i64.gt_u (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "gt_u881") (result i32) (i64.gt_u (i64.const 0) (i64.const 0x8000000000000000)))
-  (func (export "gt_u882") (param $x i64) (result i32) (i64.gt_u (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "gt_u883") (param $y i64) (result i32) (i64.gt_u (i64.const 0) (get_local $y)))
-  (func (export "gt_u884") (result i32) (i64.gt_u (i64.const 0x8000000000000000) (i64.const -1)))
-  (func (export "gt_u885") (param $x i64) (result i32) (i64.gt_u (get_local $x) (i64.const -1)))
-  (func (export "gt_u886") (param $y i64) (result i32) (i64.gt_u (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "gt_u887") (result i32) (i64.gt_u (i64.const -1) (i64.const 0x8000000000000000)))
-  (func (export "gt_u888") (param $x i64) (result i32) (i64.gt_u (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "gt_u889") (param $y i64) (result i32) (i64.gt_u (i64.const -1) (get_local $y)))
-  (func (export "gt_u890") (result i32) (i64.gt_u (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)))
-  (func (export "gt_u891") (param $x i64) (result i32) (i64.gt_u (get_local $x) (i64.const 0x7fffffffffffffff)))
-  (func (export "gt_u892") (param $y i64) (result i32) (i64.gt_u (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "gt_u893") (result i32) (i64.gt_u (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)))
-  (func (export "gt_u894") (param $x i64) (result i32) (i64.gt_u (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "gt_u895") (param $y i64) (result i32) (i64.gt_u (i64.const 0x7fffffffffffffff) (get_local $y)))
-  (func (export "ge_s896") (result i32) (i64.ge_s (i64.const 0) (i64.const 0)))
-  (func (export "ge_s897") (param $x i64) (result i32) (i64.ge_s (get_local $x) (i64.const 0)))
-  (func (export "ge_s898") (param $y i64) (result i32) (i64.ge_s (i64.const 0) (get_local $y)))
-  (func (export "ge_s899") (result i32) (i64.ge_s (i64.const 1) (i64.const 1)))
-  (func (export "ge_s900") (param $x i64) (result i32) (i64.ge_s (get_local $x) (i64.const 1)))
-  (func (export "ge_s901") (param $y i64) (result i32) (i64.ge_s (i64.const 1) (get_local $y)))
-  (func (export "ge_s902") (result i32) (i64.ge_s (i64.const -1) (i64.const 1)))
-  (func (export "ge_s903") (param $x i64) (result i32) (i64.ge_s (get_local $x) (i64.const 1)))
-  (func (export "ge_s904") (param $y i64) (result i32) (i64.ge_s (i64.const -1) (get_local $y)))
-  (func (export "ge_s905") (result i32) (i64.ge_s (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)))
-  (func (export "ge_s906") (param $x i64) (result i32) (i64.ge_s (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "ge_s907") (param $y i64) (result i32) (i64.ge_s (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "ge_s908") (result i32) (i64.ge_s (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)))
-  (func (export "ge_s909") (param $x i64) (result i32) (i64.ge_s (get_local $x) (i64.const 0x7fffffffffffffff)))
-  (func (export "ge_s910") (param $y i64) (result i32) (i64.ge_s (i64.const 0x7fffffffffffffff) (get_local $y)))
-  (func (export "ge_s911") (result i32) (i64.ge_s (i64.const -1) (i64.const -1)))
-  (func (export "ge_s912") (param $x i64) (result i32) (i64.ge_s (get_local $x) (i64.const -1)))
-  (func (export "ge_s913") (param $y i64) (result i32) (i64.ge_s (i64.const -1) (get_local $y)))
-  (func (export "ge_s914") (result i32) (i64.ge_s (i64.const 1) (i64.const 0)))
-  (func (export "ge_s915") (param $x i64) (result i32) (i64.ge_s (get_local $x) (i64.const 0)))
-  (func (export "ge_s916") (param $y i64) (result i32) (i64.ge_s (i64.const 1) (get_local $y)))
-  (func (export "ge_s917") (result i32) (i64.ge_s (i64.const 0) (i64.const 1)))
-  (func (export "ge_s918") (param $x i64) (result i32) (i64.ge_s (get_local $x) (i64.const 1)))
-  (func (export "ge_s919") (param $y i64) (result i32) (i64.ge_s (i64.const 0) (get_local $y)))
-  (func (export "ge_s920") (result i32) (i64.ge_s (i64.const 0x8000000000000000) (i64.const 0)))
-  (func (export "ge_s921") (param $x i64) (result i32) (i64.ge_s (get_local $x) (i64.const 0)))
-  (func (export "ge_s922") (param $y i64) (result i32) (i64.ge_s (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "ge_s923") (result i32) (i64.ge_s (i64.const 0) (i64.const 0x8000000000000000)))
-  (func (export "ge_s924") (param $x i64) (result i32) (i64.ge_s (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "ge_s925") (param $y i64) (result i32) (i64.ge_s (i64.const 0) (get_local $y)))
-  (func (export "ge_s926") (result i32) (i64.ge_s (i64.const 0x8000000000000000) (i64.const -1)))
-  (func (export "ge_s927") (param $x i64) (result i32) (i64.ge_s (get_local $x) (i64.const -1)))
-  (func (export "ge_s928") (param $y i64) (result i32) (i64.ge_s (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "ge_s929") (result i32) (i64.ge_s (i64.const -1) (i64.const 0x8000000000000000)))
-  (func (export "ge_s930") (param $x i64) (result i32) (i64.ge_s (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "ge_s931") (param $y i64) (result i32) (i64.ge_s (i64.const -1) (get_local $y)))
-  (func (export "ge_s932") (result i32) (i64.ge_s (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)))
-  (func (export "ge_s933") (param $x i64) (result i32) (i64.ge_s (get_local $x) (i64.const 0x7fffffffffffffff)))
-  (func (export "ge_s934") (param $y i64) (result i32) (i64.ge_s (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "ge_s935") (result i32) (i64.ge_s (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)))
-  (func (export "ge_s936") (param $x i64) (result i32) (i64.ge_s (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "ge_s937") (param $y i64) (result i32) (i64.ge_s (i64.const 0x7fffffffffffffff) (get_local $y)))
-  (func (export "ge_u938") (result i32) (i64.ge_u (i64.const 0) (i64.const 0)))
-  (func (export "ge_u939") (param $x i64) (result i32) (i64.ge_u (get_local $x) (i64.const 0)))
-  (func (export "ge_u940") (param $y i64) (result i32) (i64.ge_u (i64.const 0) (get_local $y)))
-  (func (export "ge_u941") (result i32) (i64.ge_u (i64.const 1) (i64.const 1)))
-  (func (export "ge_u942") (param $x i64) (result i32) (i64.ge_u (get_local $x) (i64.const 1)))
-  (func (export "ge_u943") (param $y i64) (result i32) (i64.ge_u (i64.const 1) (get_local $y)))
-  (func (export "ge_u944") (result i32) (i64.ge_u (i64.const -1) (i64.const 1)))
-  (func (export "ge_u945") (param $x i64) (result i32) (i64.ge_u (get_local $x) (i64.const 1)))
-  (func (export "ge_u946") (param $y i64) (result i32) (i64.ge_u (i64.const -1) (get_local $y)))
-  (func (export "ge_u947") (result i32) (i64.ge_u (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)))
-  (func (export "ge_u948") (param $x i64) (result i32) (i64.ge_u (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "ge_u949") (param $y i64) (result i32) (i64.ge_u (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "ge_u950") (result i32) (i64.ge_u (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)))
-  (func (export "ge_u951") (param $x i64) (result i32) (i64.ge_u (get_local $x) (i64.const 0x7fffffffffffffff)))
-  (func (export "ge_u952") (param $y i64) (result i32) (i64.ge_u (i64.const 0x7fffffffffffffff) (get_local $y)))
-  (func (export "ge_u953") (result i32) (i64.ge_u (i64.const -1) (i64.const -1)))
-  (func (export "ge_u954") (param $x i64) (result i32) (i64.ge_u (get_local $x) (i64.const -1)))
-  (func (export "ge_u955") (param $y i64) (result i32) (i64.ge_u (i64.const -1) (get_local $y)))
-  (func (export "ge_u956") (result i32) (i64.ge_u (i64.const 1) (i64.const 0)))
-  (func (export "ge_u957") (param $x i64) (result i32) (i64.ge_u (get_local $x) (i64.const 0)))
-  (func (export "ge_u958") (param $y i64) (result i32) (i64.ge_u (i64.const 1) (get_local $y)))
-  (func (export "ge_u959") (result i32) (i64.ge_u (i64.const 0) (i64.const 1)))
-  (func (export "ge_u960") (param $x i64) (result i32) (i64.ge_u (get_local $x) (i64.const 1)))
-  (func (export "ge_u961") (param $y i64) (result i32) (i64.ge_u (i64.const 0) (get_local $y)))
-  (func (export "ge_u962") (result i32) (i64.ge_u (i64.const 0x8000000000000000) (i64.const 0)))
-  (func (export "ge_u963") (param $x i64) (result i32) (i64.ge_u (get_local $x) (i64.const 0)))
-  (func (export "ge_u964") (param $y i64) (result i32) (i64.ge_u (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "ge_u965") (result i32) (i64.ge_u (i64.const 0) (i64.const 0x8000000000000000)))
-  (func (export "ge_u966") (param $x i64) (result i32) (i64.ge_u (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "ge_u967") (param $y i64) (result i32) (i64.ge_u (i64.const 0) (get_local $y)))
-  (func (export "ge_u968") (result i32) (i64.ge_u (i64.const 0x8000000000000000) (i64.const -1)))
-  (func (export "ge_u969") (param $x i64) (result i32) (i64.ge_u (get_local $x) (i64.const -1)))
-  (func (export "ge_u970") (param $y i64) (result i32) (i64.ge_u (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "ge_u971") (result i32) (i64.ge_u (i64.const -1) (i64.const 0x8000000000000000)))
-  (func (export "ge_u972") (param $x i64) (result i32) (i64.ge_u (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "ge_u973") (param $y i64) (result i32) (i64.ge_u (i64.const -1) (get_local $y)))
-  (func (export "ge_u974") (result i32) (i64.ge_u (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)))
-  (func (export "ge_u975") (param $x i64) (result i32) (i64.ge_u (get_local $x) (i64.const 0x7fffffffffffffff)))
-  (func (export "ge_u976") (param $y i64) (result i32) (i64.ge_u (i64.const 0x8000000000000000) (get_local $y)))
-  (func (export "ge_u977") (result i32) (i64.ge_u (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)))
-  (func (export "ge_u978") (param $x i64) (result i32) (i64.ge_u (get_local $x) (i64.const 0x8000000000000000)))
-  (func (export "ge_u979") (param $y i64) (result i32) (i64.ge_u (i64.const 0x7fffffffffffffff) (get_local $y)))
+  (func (export "shr_u489") (result i64) (i64.shr_u (i64.const -1) (i64.const -1)))
+  (func (export "shr_u490") (param $x i64) (result i64) (i64.shr_u (get_local $x) (i64.const -1)))
+  (func (export "shr_u491") (param $y i64) (result i64) (i64.shr_u (i64.const -1) (get_local $y)))
+  (func (export "shr_u492") (result i64) (i64.shr_u (i64.const -1) (i64.const 0x7fffffffffffffff)))
+  (func (export "shr_u493") (param $x i64) (result i64) (i64.shr_u (get_local $x) (i64.const 0x7fffffffffffffff)))
+  (func (export "shr_u494") (param $y i64) (result i64) (i64.shr_u (i64.const -1) (get_local $y)))
+  (func (export "shr_u495") (result i64) (i64.shr_u (i64.const -1) (i64.const 0x8000000000000000)))
+  (func (export "shr_u496") (param $x i64) (result i64) (i64.shr_u (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "shr_u497") (param $y i64) (result i64) (i64.shr_u (i64.const -1) (get_local $y)))
+  (func (export "rotl498") (result i64) (i64.rotl (i64.const 1) (i64.const 1)))
+  (func (export "rotl499") (param $x i64) (result i64) (i64.rotl (get_local $x) (i64.const 1)))
+  (func (export "rotl500") (param $y i64) (result i64) (i64.rotl (i64.const 1) (get_local $y)))
+  (func (export "rotl501") (result i64) (i64.rotl (i64.const 1) (i64.const 0)))
+  (func (export "rotl502") (param $x i64) (result i64) (i64.rotl (get_local $x) (i64.const 0)))
+  (func (export "rotl503") (param $y i64) (result i64) (i64.rotl (i64.const 1) (get_local $y)))
+  (func (export "rotl504") (result i64) (i64.rotl (i64.const -1) (i64.const 1)))
+  (func (export "rotl505") (param $x i64) (result i64) (i64.rotl (get_local $x) (i64.const 1)))
+  (func (export "rotl506") (param $y i64) (result i64) (i64.rotl (i64.const -1) (get_local $y)))
+  (func (export "rotl507") (result i64) (i64.rotl (i64.const 1) (i64.const 64)))
+  (func (export "rotl508") (param $x i64) (result i64) (i64.rotl (get_local $x) (i64.const 64)))
+  (func (export "rotl509") (param $y i64) (result i64) (i64.rotl (i64.const 1) (get_local $y)))
+  (func (export "rotl510") (result i64) (i64.rotl (i64.const 0xabcd987602468ace) (i64.const 1)))
+  (func (export "rotl511") (param $x i64) (result i64) (i64.rotl (get_local $x) (i64.const 1)))
+  (func (export "rotl512") (param $y i64) (result i64) (i64.rotl (i64.const 0xabcd987602468ace) (get_local $y)))
+  (func (export "rotl513") (result i64) (i64.rotl (i64.const 0xfe000000dc000000) (i64.const 4)))
+  (func (export "rotl514") (param $x i64) (result i64) (i64.rotl (get_local $x) (i64.const 4)))
+  (func (export "rotl515") (param $y i64) (result i64) (i64.rotl (i64.const 0xfe000000dc000000) (get_local $y)))
+  (func (export "rotl516") (result i64) (i64.rotl (i64.const 0xabcd1234ef567809) (i64.const 53)))
+  (func (export "rotl517") (param $x i64) (result i64) (i64.rotl (get_local $x) (i64.const 53)))
+  (func (export "rotl518") (param $y i64) (result i64) (i64.rotl (i64.const 0xabcd1234ef567809) (get_local $y)))
+  (func (export "rotl519") (result i64) (i64.rotl (i64.const 0xabd1234ef567809c) (i64.const 63)))
+  (func (export "rotl520") (param $x i64) (result i64) (i64.rotl (get_local $x) (i64.const 63)))
+  (func (export "rotl521") (param $y i64) (result i64) (i64.rotl (i64.const 0xabd1234ef567809c) (get_local $y)))
+  (func (export "rotl522") (result i64) (i64.rotl (i64.const 0xabcd1234ef567809) (i64.const 0xf5)))
+  (func (export "rotl523") (param $x i64) (result i64) (i64.rotl (get_local $x) (i64.const 0xf5)))
+  (func (export "rotl524") (param $y i64) (result i64) (i64.rotl (i64.const 0xabcd1234ef567809) (get_local $y)))
+  (func (export "rotl525") (result i64) (i64.rotl (i64.const 0xabcd7294ef567809) (i64.const 0xffffffffffffffed)))
+  (func (export "rotl526") (param $x i64) (result i64) (i64.rotl (get_local $x) (i64.const 0xffffffffffffffed)))
+  (func (export "rotl527") (param $y i64) (result i64) (i64.rotl (i64.const 0xabcd7294ef567809) (get_local $y)))
+  (func (export "rotl528") (result i64) (i64.rotl (i64.const 0xabd1234ef567809c) (i64.const 0x800000000000003f)))
+  (func (export "rotl529") (param $x i64) (result i64) (i64.rotl (get_local $x) (i64.const 0x800000000000003f)))
+  (func (export "rotl530") (param $y i64) (result i64) (i64.rotl (i64.const 0xabd1234ef567809c) (get_local $y)))
+  (func (export "rotl531") (result i64) (i64.rotl (i64.const 1) (i64.const 63)))
+  (func (export "rotl532") (param $x i64) (result i64) (i64.rotl (get_local $x) (i64.const 63)))
+  (func (export "rotl533") (param $y i64) (result i64) (i64.rotl (i64.const 1) (get_local $y)))
+  (func (export "rotl534") (result i64) (i64.rotl (i64.const 0x8000000000000000) (i64.const 1)))
+  (func (export "rotl535") (param $x i64) (result i64) (i64.rotl (get_local $x) (i64.const 1)))
+  (func (export "rotl536") (param $y i64) (result i64) (i64.rotl (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "rotr537") (result i64) (i64.rotr (i64.const 1) (i64.const 1)))
+  (func (export "rotr538") (param $x i64) (result i64) (i64.rotr (get_local $x) (i64.const 1)))
+  (func (export "rotr539") (param $y i64) (result i64) (i64.rotr (i64.const 1) (get_local $y)))
+  (func (export "rotr540") (result i64) (i64.rotr (i64.const 1) (i64.const 0)))
+  (func (export "rotr541") (param $x i64) (result i64) (i64.rotr (get_local $x) (i64.const 0)))
+  (func (export "rotr542") (param $y i64) (result i64) (i64.rotr (i64.const 1) (get_local $y)))
+  (func (export "rotr543") (result i64) (i64.rotr (i64.const -1) (i64.const 1)))
+  (func (export "rotr544") (param $x i64) (result i64) (i64.rotr (get_local $x) (i64.const 1)))
+  (func (export "rotr545") (param $y i64) (result i64) (i64.rotr (i64.const -1) (get_local $y)))
+  (func (export "rotr546") (result i64) (i64.rotr (i64.const 1) (i64.const 64)))
+  (func (export "rotr547") (param $x i64) (result i64) (i64.rotr (get_local $x) (i64.const 64)))
+  (func (export "rotr548") (param $y i64) (result i64) (i64.rotr (i64.const 1) (get_local $y)))
+  (func (export "rotr549") (result i64) (i64.rotr (i64.const 0xabcd987602468ace) (i64.const 1)))
+  (func (export "rotr550") (param $x i64) (result i64) (i64.rotr (get_local $x) (i64.const 1)))
+  (func (export "rotr551") (param $y i64) (result i64) (i64.rotr (i64.const 0xabcd987602468ace) (get_local $y)))
+  (func (export "rotr552") (result i64) (i64.rotr (i64.const 0xfe000000dc000000) (i64.const 4)))
+  (func (export "rotr553") (param $x i64) (result i64) (i64.rotr (get_local $x) (i64.const 4)))
+  (func (export "rotr554") (param $y i64) (result i64) (i64.rotr (i64.const 0xfe000000dc000000) (get_local $y)))
+  (func (export "rotr555") (result i64) (i64.rotr (i64.const 0xabcd1234ef567809) (i64.const 53)))
+  (func (export "rotr556") (param $x i64) (result i64) (i64.rotr (get_local $x) (i64.const 53)))
+  (func (export "rotr557") (param $y i64) (result i64) (i64.rotr (i64.const 0xabcd1234ef567809) (get_local $y)))
+  (func (export "rotr558") (result i64) (i64.rotr (i64.const 0xabd1234ef567809c) (i64.const 63)))
+  (func (export "rotr559") (param $x i64) (result i64) (i64.rotr (get_local $x) (i64.const 63)))
+  (func (export "rotr560") (param $y i64) (result i64) (i64.rotr (i64.const 0xabd1234ef567809c) (get_local $y)))
+  (func (export "rotr561") (result i64) (i64.rotr (i64.const 0xabcd1234ef567809) (i64.const 0xf5)))
+  (func (export "rotr562") (param $x i64) (result i64) (i64.rotr (get_local $x) (i64.const 0xf5)))
+  (func (export "rotr563") (param $y i64) (result i64) (i64.rotr (i64.const 0xabcd1234ef567809) (get_local $y)))
+  (func (export "rotr564") (result i64) (i64.rotr (i64.const 0xabcd7294ef567809) (i64.const 0xffffffffffffffed)))
+  (func (export "rotr565") (param $x i64) (result i64) (i64.rotr (get_local $x) (i64.const 0xffffffffffffffed)))
+  (func (export "rotr566") (param $y i64) (result i64) (i64.rotr (i64.const 0xabcd7294ef567809) (get_local $y)))
+  (func (export "rotr567") (result i64) (i64.rotr (i64.const 0xabd1234ef567809c) (i64.const 0x800000000000003f)))
+  (func (export "rotr568") (param $x i64) (result i64) (i64.rotr (get_local $x) (i64.const 0x800000000000003f)))
+  (func (export "rotr569") (param $y i64) (result i64) (i64.rotr (i64.const 0xabd1234ef567809c) (get_local $y)))
+  (func (export "rotr570") (result i64) (i64.rotr (i64.const 1) (i64.const 63)))
+  (func (export "rotr571") (param $x i64) (result i64) (i64.rotr (get_local $x) (i64.const 63)))
+  (func (export "rotr572") (param $y i64) (result i64) (i64.rotr (i64.const 1) (get_local $y)))
+  (func (export "rotr573") (result i64) (i64.rotr (i64.const 0x8000000000000000) (i64.const 63)))
+  (func (export "rotr574") (param $x i64) (result i64) (i64.rotr (get_local $x) (i64.const 63)))
+  (func (export "rotr575") (param $y i64) (result i64) (i64.rotr (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "clz576") (result i64) (i64.clz (i64.const 0xffffffffffffffff)))
+  (func (export "clz577") (result i64) (i64.clz (i64.const 0)))
+  (func (export "clz578") (result i64) (i64.clz (i64.const 0x00008000)))
+  (func (export "clz579") (result i64) (i64.clz (i64.const 0xff)))
+  (func (export "clz580") (result i64) (i64.clz (i64.const 0x8000000000000000)))
+  (func (export "clz581") (result i64) (i64.clz (i64.const 1)))
+  (func (export "clz582") (result i64) (i64.clz (i64.const 2)))
+  (func (export "clz583") (result i64) (i64.clz (i64.const 0x7fffffffffffffff)))
+  (func (export "ctz584") (result i64) (i64.ctz (i64.const -1)))
+  (func (export "ctz585") (result i64) (i64.ctz (i64.const 0)))
+  (func (export "ctz586") (result i64) (i64.ctz (i64.const 0x00008000)))
+  (func (export "ctz587") (result i64) (i64.ctz (i64.const 0x00010000)))
+  (func (export "ctz588") (result i64) (i64.ctz (i64.const 0x8000000000000000)))
+  (func (export "ctz589") (result i64) (i64.ctz (i64.const 0x7fffffffffffffff)))
+  (func (export "popcnt590") (result i64) (i64.popcnt (i64.const -1)))
+  (func (export "popcnt591") (result i64) (i64.popcnt (i64.const 0)))
+  (func (export "popcnt592") (result i64) (i64.popcnt (i64.const 0x00008000)))
+  (func (export "popcnt593") (result i64) (i64.popcnt (i64.const 0x8000800080008000)))
+  (func (export "popcnt594") (result i64) (i64.popcnt (i64.const 0x7fffffffffffffff)))
+  (func (export "popcnt595") (result i64) (i64.popcnt (i64.const 0xAAAAAAAA55555555)))
+  (func (export "popcnt596") (result i64) (i64.popcnt (i64.const 0x99999999AAAAAAAA)))
+  (func (export "popcnt597") (result i64) (i64.popcnt (i64.const 0xDEADBEEFDEADBEEF)))
+  (func (export "eqz598") (result i32) (i64.eqz (i64.const 0)))
+  (func (export "eqz599") (result i32) (i64.eqz (i64.const 1)))
+  (func (export "eqz600") (result i32) (i64.eqz (i64.const 0x8000000000000000)))
+  (func (export "eqz601") (result i32) (i64.eqz (i64.const 0x7fffffffffffffff)))
+  (func (export "eqz602") (result i32) (i64.eqz (i64.const 0xffffffffffffffff)))
+  (func (export "eq603") (result i32) (i64.eq (i64.const 0) (i64.const 0)))
+  (func (export "eq604") (param $x i64) (result i32) (i64.eq (get_local $x) (i64.const 0)))
+  (func (export "eq605") (param $y i64) (result i32) (i64.eq (i64.const 0) (get_local $y)))
+  (func (export "eq606") (result i32) (i64.eq (i64.const 1) (i64.const 1)))
+  (func (export "eq607") (param $x i64) (result i32) (i64.eq (get_local $x) (i64.const 1)))
+  (func (export "eq608") (param $y i64) (result i32) (i64.eq (i64.const 1) (get_local $y)))
+  (func (export "eq609") (result i32) (i64.eq (i64.const -1) (i64.const 1)))
+  (func (export "eq610") (param $x i64) (result i32) (i64.eq (get_local $x) (i64.const 1)))
+  (func (export "eq611") (param $y i64) (result i32) (i64.eq (i64.const -1) (get_local $y)))
+  (func (export "eq612") (result i32) (i64.eq (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)))
+  (func (export "eq613") (param $x i64) (result i32) (i64.eq (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "eq614") (param $y i64) (result i32) (i64.eq (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "eq615") (result i32) (i64.eq (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)))
+  (func (export "eq616") (param $x i64) (result i32) (i64.eq (get_local $x) (i64.const 0x7fffffffffffffff)))
+  (func (export "eq617") (param $y i64) (result i32) (i64.eq (i64.const 0x7fffffffffffffff) (get_local $y)))
+  (func (export "eq618") (result i32) (i64.eq (i64.const -1) (i64.const -1)))
+  (func (export "eq619") (param $x i64) (result i32) (i64.eq (get_local $x) (i64.const -1)))
+  (func (export "eq620") (param $y i64) (result i32) (i64.eq (i64.const -1) (get_local $y)))
+  (func (export "eq621") (result i32) (i64.eq (i64.const 1) (i64.const 0)))
+  (func (export "eq622") (param $x i64) (result i32) (i64.eq (get_local $x) (i64.const 0)))
+  (func (export "eq623") (param $y i64) (result i32) (i64.eq (i64.const 1) (get_local $y)))
+  (func (export "eq624") (result i32) (i64.eq (i64.const 0) (i64.const 1)))
+  (func (export "eq625") (param $x i64) (result i32) (i64.eq (get_local $x) (i64.const 1)))
+  (func (export "eq626") (param $y i64) (result i32) (i64.eq (i64.const 0) (get_local $y)))
+  (func (export "eq627") (result i32) (i64.eq (i64.const 0x8000000000000000) (i64.const 0)))
+  (func (export "eq628") (param $x i64) (result i32) (i64.eq (get_local $x) (i64.const 0)))
+  (func (export "eq629") (param $y i64) (result i32) (i64.eq (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "eq630") (result i32) (i64.eq (i64.const 0) (i64.const 0x8000000000000000)))
+  (func (export "eq631") (param $x i64) (result i32) (i64.eq (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "eq632") (param $y i64) (result i32) (i64.eq (i64.const 0) (get_local $y)))
+  (func (export "eq633") (result i32) (i64.eq (i64.const 0x8000000000000000) (i64.const -1)))
+  (func (export "eq634") (param $x i64) (result i32) (i64.eq (get_local $x) (i64.const -1)))
+  (func (export "eq635") (param $y i64) (result i32) (i64.eq (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "eq636") (result i32) (i64.eq (i64.const -1) (i64.const 0x8000000000000000)))
+  (func (export "eq637") (param $x i64) (result i32) (i64.eq (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "eq638") (param $y i64) (result i32) (i64.eq (i64.const -1) (get_local $y)))
+  (func (export "eq639") (result i32) (i64.eq (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)))
+  (func (export "eq640") (param $x i64) (result i32) (i64.eq (get_local $x) (i64.const 0x7fffffffffffffff)))
+  (func (export "eq641") (param $y i64) (result i32) (i64.eq (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "eq642") (result i32) (i64.eq (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)))
+  (func (export "eq643") (param $x i64) (result i32) (i64.eq (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "eq644") (param $y i64) (result i32) (i64.eq (i64.const 0x7fffffffffffffff) (get_local $y)))
+  (func (export "ne645") (result i32) (i64.ne (i64.const 0) (i64.const 0)))
+  (func (export "ne646") (param $x i64) (result i32) (i64.ne (get_local $x) (i64.const 0)))
+  (func (export "ne647") (param $y i64) (result i32) (i64.ne (i64.const 0) (get_local $y)))
+  (func (export "ne648") (result i32) (i64.ne (i64.const 1) (i64.const 1)))
+  (func (export "ne649") (param $x i64) (result i32) (i64.ne (get_local $x) (i64.const 1)))
+  (func (export "ne650") (param $y i64) (result i32) (i64.ne (i64.const 1) (get_local $y)))
+  (func (export "ne651") (result i32) (i64.ne (i64.const -1) (i64.const 1)))
+  (func (export "ne652") (param $x i64) (result i32) (i64.ne (get_local $x) (i64.const 1)))
+  (func (export "ne653") (param $y i64) (result i32) (i64.ne (i64.const -1) (get_local $y)))
+  (func (export "ne654") (result i32) (i64.ne (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)))
+  (func (export "ne655") (param $x i64) (result i32) (i64.ne (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "ne656") (param $y i64) (result i32) (i64.ne (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "ne657") (result i32) (i64.ne (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)))
+  (func (export "ne658") (param $x i64) (result i32) (i64.ne (get_local $x) (i64.const 0x7fffffffffffffff)))
+  (func (export "ne659") (param $y i64) (result i32) (i64.ne (i64.const 0x7fffffffffffffff) (get_local $y)))
+  (func (export "ne660") (result i32) (i64.ne (i64.const -1) (i64.const -1)))
+  (func (export "ne661") (param $x i64) (result i32) (i64.ne (get_local $x) (i64.const -1)))
+  (func (export "ne662") (param $y i64) (result i32) (i64.ne (i64.const -1) (get_local $y)))
+  (func (export "ne663") (result i32) (i64.ne (i64.const 1) (i64.const 0)))
+  (func (export "ne664") (param $x i64) (result i32) (i64.ne (get_local $x) (i64.const 0)))
+  (func (export "ne665") (param $y i64) (result i32) (i64.ne (i64.const 1) (get_local $y)))
+  (func (export "ne666") (result i32) (i64.ne (i64.const 0) (i64.const 1)))
+  (func (export "ne667") (param $x i64) (result i32) (i64.ne (get_local $x) (i64.const 1)))
+  (func (export "ne668") (param $y i64) (result i32) (i64.ne (i64.const 0) (get_local $y)))
+  (func (export "ne669") (result i32) (i64.ne (i64.const 0x8000000000000000) (i64.const 0)))
+  (func (export "ne670") (param $x i64) (result i32) (i64.ne (get_local $x) (i64.const 0)))
+  (func (export "ne671") (param $y i64) (result i32) (i64.ne (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "ne672") (result i32) (i64.ne (i64.const 0) (i64.const 0x8000000000000000)))
+  (func (export "ne673") (param $x i64) (result i32) (i64.ne (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "ne674") (param $y i64) (result i32) (i64.ne (i64.const 0) (get_local $y)))
+  (func (export "ne675") (result i32) (i64.ne (i64.const 0x8000000000000000) (i64.const -1)))
+  (func (export "ne676") (param $x i64) (result i32) (i64.ne (get_local $x) (i64.const -1)))
+  (func (export "ne677") (param $y i64) (result i32) (i64.ne (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "ne678") (result i32) (i64.ne (i64.const -1) (i64.const 0x8000000000000000)))
+  (func (export "ne679") (param $x i64) (result i32) (i64.ne (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "ne680") (param $y i64) (result i32) (i64.ne (i64.const -1) (get_local $y)))
+  (func (export "ne681") (result i32) (i64.ne (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)))
+  (func (export "ne682") (param $x i64) (result i32) (i64.ne (get_local $x) (i64.const 0x7fffffffffffffff)))
+  (func (export "ne683") (param $y i64) (result i32) (i64.ne (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "ne684") (result i32) (i64.ne (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)))
+  (func (export "ne685") (param $x i64) (result i32) (i64.ne (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "ne686") (param $y i64) (result i32) (i64.ne (i64.const 0x7fffffffffffffff) (get_local $y)))
+  (func (export "lt_s687") (result i32) (i64.lt_s (i64.const 0) (i64.const 0)))
+  (func (export "lt_s688") (param $x i64) (result i32) (i64.lt_s (get_local $x) (i64.const 0)))
+  (func (export "lt_s689") (param $y i64) (result i32) (i64.lt_s (i64.const 0) (get_local $y)))
+  (func (export "lt_s690") (result i32) (i64.lt_s (i64.const 1) (i64.const 1)))
+  (func (export "lt_s691") (param $x i64) (result i32) (i64.lt_s (get_local $x) (i64.const 1)))
+  (func (export "lt_s692") (param $y i64) (result i32) (i64.lt_s (i64.const 1) (get_local $y)))
+  (func (export "lt_s693") (result i32) (i64.lt_s (i64.const -1) (i64.const 1)))
+  (func (export "lt_s694") (param $x i64) (result i32) (i64.lt_s (get_local $x) (i64.const 1)))
+  (func (export "lt_s695") (param $y i64) (result i32) (i64.lt_s (i64.const -1) (get_local $y)))
+  (func (export "lt_s696") (result i32) (i64.lt_s (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)))
+  (func (export "lt_s697") (param $x i64) (result i32) (i64.lt_s (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "lt_s698") (param $y i64) (result i32) (i64.lt_s (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "lt_s699") (result i32) (i64.lt_s (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)))
+  (func (export "lt_s700") (param $x i64) (result i32) (i64.lt_s (get_local $x) (i64.const 0x7fffffffffffffff)))
+  (func (export "lt_s701") (param $y i64) (result i32) (i64.lt_s (i64.const 0x7fffffffffffffff) (get_local $y)))
+  (func (export "lt_s702") (result i32) (i64.lt_s (i64.const -1) (i64.const -1)))
+  (func (export "lt_s703") (param $x i64) (result i32) (i64.lt_s (get_local $x) (i64.const -1)))
+  (func (export "lt_s704") (param $y i64) (result i32) (i64.lt_s (i64.const -1) (get_local $y)))
+  (func (export "lt_s705") (result i32) (i64.lt_s (i64.const 1) (i64.const 0)))
+  (func (export "lt_s706") (param $x i64) (result i32) (i64.lt_s (get_local $x) (i64.const 0)))
+  (func (export "lt_s707") (param $y i64) (result i32) (i64.lt_s (i64.const 1) (get_local $y)))
+  (func (export "lt_s708") (result i32) (i64.lt_s (i64.const 0) (i64.const 1)))
+  (func (export "lt_s709") (param $x i64) (result i32) (i64.lt_s (get_local $x) (i64.const 1)))
+  (func (export "lt_s710") (param $y i64) (result i32) (i64.lt_s (i64.const 0) (get_local $y)))
+  (func (export "lt_s711") (result i32) (i64.lt_s (i64.const 0x8000000000000000) (i64.const 0)))
+  (func (export "lt_s712") (param $x i64) (result i32) (i64.lt_s (get_local $x) (i64.const 0)))
+  (func (export "lt_s713") (param $y i64) (result i32) (i64.lt_s (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "lt_s714") (result i32) (i64.lt_s (i64.const 0) (i64.const 0x8000000000000000)))
+  (func (export "lt_s715") (param $x i64) (result i32) (i64.lt_s (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "lt_s716") (param $y i64) (result i32) (i64.lt_s (i64.const 0) (get_local $y)))
+  (func (export "lt_s717") (result i32) (i64.lt_s (i64.const 0x8000000000000000) (i64.const -1)))
+  (func (export "lt_s718") (param $x i64) (result i32) (i64.lt_s (get_local $x) (i64.const -1)))
+  (func (export "lt_s719") (param $y i64) (result i32) (i64.lt_s (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "lt_s720") (result i32) (i64.lt_s (i64.const -1) (i64.const 0x8000000000000000)))
+  (func (export "lt_s721") (param $x i64) (result i32) (i64.lt_s (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "lt_s722") (param $y i64) (result i32) (i64.lt_s (i64.const -1) (get_local $y)))
+  (func (export "lt_s723") (result i32) (i64.lt_s (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)))
+  (func (export "lt_s724") (param $x i64) (result i32) (i64.lt_s (get_local $x) (i64.const 0x7fffffffffffffff)))
+  (func (export "lt_s725") (param $y i64) (result i32) (i64.lt_s (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "lt_s726") (result i32) (i64.lt_s (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)))
+  (func (export "lt_s727") (param $x i64) (result i32) (i64.lt_s (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "lt_s728") (param $y i64) (result i32) (i64.lt_s (i64.const 0x7fffffffffffffff) (get_local $y)))
+  (func (export "lt_u729") (result i32) (i64.lt_u (i64.const 0) (i64.const 0)))
+  (func (export "lt_u730") (param $x i64) (result i32) (i64.lt_u (get_local $x) (i64.const 0)))
+  (func (export "lt_u731") (param $y i64) (result i32) (i64.lt_u (i64.const 0) (get_local $y)))
+  (func (export "lt_u732") (result i32) (i64.lt_u (i64.const 1) (i64.const 1)))
+  (func (export "lt_u733") (param $x i64) (result i32) (i64.lt_u (get_local $x) (i64.const 1)))
+  (func (export "lt_u734") (param $y i64) (result i32) (i64.lt_u (i64.const 1) (get_local $y)))
+  (func (export "lt_u735") (result i32) (i64.lt_u (i64.const -1) (i64.const 1)))
+  (func (export "lt_u736") (param $x i64) (result i32) (i64.lt_u (get_local $x) (i64.const 1)))
+  (func (export "lt_u737") (param $y i64) (result i32) (i64.lt_u (i64.const -1) (get_local $y)))
+  (func (export "lt_u738") (result i32) (i64.lt_u (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)))
+  (func (export "lt_u739") (param $x i64) (result i32) (i64.lt_u (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "lt_u740") (param $y i64) (result i32) (i64.lt_u (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "lt_u741") (result i32) (i64.lt_u (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)))
+  (func (export "lt_u742") (param $x i64) (result i32) (i64.lt_u (get_local $x) (i64.const 0x7fffffffffffffff)))
+  (func (export "lt_u743") (param $y i64) (result i32) (i64.lt_u (i64.const 0x7fffffffffffffff) (get_local $y)))
+  (func (export "lt_u744") (result i32) (i64.lt_u (i64.const -1) (i64.const -1)))
+  (func (export "lt_u745") (param $x i64) (result i32) (i64.lt_u (get_local $x) (i64.const -1)))
+  (func (export "lt_u746") (param $y i64) (result i32) (i64.lt_u (i64.const -1) (get_local $y)))
+  (func (export "lt_u747") (result i32) (i64.lt_u (i64.const 1) (i64.const 0)))
+  (func (export "lt_u748") (param $x i64) (result i32) (i64.lt_u (get_local $x) (i64.const 0)))
+  (func (export "lt_u749") (param $y i64) (result i32) (i64.lt_u (i64.const 1) (get_local $y)))
+  (func (export "lt_u750") (result i32) (i64.lt_u (i64.const 0) (i64.const 1)))
+  (func (export "lt_u751") (param $x i64) (result i32) (i64.lt_u (get_local $x) (i64.const 1)))
+  (func (export "lt_u752") (param $y i64) (result i32) (i64.lt_u (i64.const 0) (get_local $y)))
+  (func (export "lt_u753") (result i32) (i64.lt_u (i64.const 0x8000000000000000) (i64.const 0)))
+  (func (export "lt_u754") (param $x i64) (result i32) (i64.lt_u (get_local $x) (i64.const 0)))
+  (func (export "lt_u755") (param $y i64) (result i32) (i64.lt_u (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "lt_u756") (result i32) (i64.lt_u (i64.const 0) (i64.const 0x8000000000000000)))
+  (func (export "lt_u757") (param $x i64) (result i32) (i64.lt_u (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "lt_u758") (param $y i64) (result i32) (i64.lt_u (i64.const 0) (get_local $y)))
+  (func (export "lt_u759") (result i32) (i64.lt_u (i64.const 0x8000000000000000) (i64.const -1)))
+  (func (export "lt_u760") (param $x i64) (result i32) (i64.lt_u (get_local $x) (i64.const -1)))
+  (func (export "lt_u761") (param $y i64) (result i32) (i64.lt_u (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "lt_u762") (result i32) (i64.lt_u (i64.const -1) (i64.const 0x8000000000000000)))
+  (func (export "lt_u763") (param $x i64) (result i32) (i64.lt_u (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "lt_u764") (param $y i64) (result i32) (i64.lt_u (i64.const -1) (get_local $y)))
+  (func (export "lt_u765") (result i32) (i64.lt_u (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)))
+  (func (export "lt_u766") (param $x i64) (result i32) (i64.lt_u (get_local $x) (i64.const 0x7fffffffffffffff)))
+  (func (export "lt_u767") (param $y i64) (result i32) (i64.lt_u (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "lt_u768") (result i32) (i64.lt_u (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)))
+  (func (export "lt_u769") (param $x i64) (result i32) (i64.lt_u (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "lt_u770") (param $y i64) (result i32) (i64.lt_u (i64.const 0x7fffffffffffffff) (get_local $y)))
+  (func (export "le_s771") (result i32) (i64.le_s (i64.const 0) (i64.const 0)))
+  (func (export "le_s772") (param $x i64) (result i32) (i64.le_s (get_local $x) (i64.const 0)))
+  (func (export "le_s773") (param $y i64) (result i32) (i64.le_s (i64.const 0) (get_local $y)))
+  (func (export "le_s774") (result i32) (i64.le_s (i64.const 1) (i64.const 1)))
+  (func (export "le_s775") (param $x i64) (result i32) (i64.le_s (get_local $x) (i64.const 1)))
+  (func (export "le_s776") (param $y i64) (result i32) (i64.le_s (i64.const 1) (get_local $y)))
+  (func (export "le_s777") (result i32) (i64.le_s (i64.const -1) (i64.const 1)))
+  (func (export "le_s778") (param $x i64) (result i32) (i64.le_s (get_local $x) (i64.const 1)))
+  (func (export "le_s779") (param $y i64) (result i32) (i64.le_s (i64.const -1) (get_local $y)))
+  (func (export "le_s780") (result i32) (i64.le_s (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)))
+  (func (export "le_s781") (param $x i64) (result i32) (i64.le_s (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "le_s782") (param $y i64) (result i32) (i64.le_s (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "le_s783") (result i32) (i64.le_s (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)))
+  (func (export "le_s784") (param $x i64) (result i32) (i64.le_s (get_local $x) (i64.const 0x7fffffffffffffff)))
+  (func (export "le_s785") (param $y i64) (result i32) (i64.le_s (i64.const 0x7fffffffffffffff) (get_local $y)))
+  (func (export "le_s786") (result i32) (i64.le_s (i64.const -1) (i64.const -1)))
+  (func (export "le_s787") (param $x i64) (result i32) (i64.le_s (get_local $x) (i64.const -1)))
+  (func (export "le_s788") (param $y i64) (result i32) (i64.le_s (i64.const -1) (get_local $y)))
+  (func (export "le_s789") (result i32) (i64.le_s (i64.const 1) (i64.const 0)))
+  (func (export "le_s790") (param $x i64) (result i32) (i64.le_s (get_local $x) (i64.const 0)))
+  (func (export "le_s791") (param $y i64) (result i32) (i64.le_s (i64.const 1) (get_local $y)))
+  (func (export "le_s792") (result i32) (i64.le_s (i64.const 0) (i64.const 1)))
+  (func (export "le_s793") (param $x i64) (result i32) (i64.le_s (get_local $x) (i64.const 1)))
+  (func (export "le_s794") (param $y i64) (result i32) (i64.le_s (i64.const 0) (get_local $y)))
+  (func (export "le_s795") (result i32) (i64.le_s (i64.const 0x8000000000000000) (i64.const 0)))
+  (func (export "le_s796") (param $x i64) (result i32) (i64.le_s (get_local $x) (i64.const 0)))
+  (func (export "le_s797") (param $y i64) (result i32) (i64.le_s (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "le_s798") (result i32) (i64.le_s (i64.const 0) (i64.const 0x8000000000000000)))
+  (func (export "le_s799") (param $x i64) (result i32) (i64.le_s (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "le_s800") (param $y i64) (result i32) (i64.le_s (i64.const 0) (get_local $y)))
+  (func (export "le_s801") (result i32) (i64.le_s (i64.const 0x8000000000000000) (i64.const -1)))
+  (func (export "le_s802") (param $x i64) (result i32) (i64.le_s (get_local $x) (i64.const -1)))
+  (func (export "le_s803") (param $y i64) (result i32) (i64.le_s (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "le_s804") (result i32) (i64.le_s (i64.const -1) (i64.const 0x8000000000000000)))
+  (func (export "le_s805") (param $x i64) (result i32) (i64.le_s (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "le_s806") (param $y i64) (result i32) (i64.le_s (i64.const -1) (get_local $y)))
+  (func (export "le_s807") (result i32) (i64.le_s (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)))
+  (func (export "le_s808") (param $x i64) (result i32) (i64.le_s (get_local $x) (i64.const 0x7fffffffffffffff)))
+  (func (export "le_s809") (param $y i64) (result i32) (i64.le_s (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "le_s810") (result i32) (i64.le_s (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)))
+  (func (export "le_s811") (param $x i64) (result i32) (i64.le_s (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "le_s812") (param $y i64) (result i32) (i64.le_s (i64.const 0x7fffffffffffffff) (get_local $y)))
+  (func (export "le_u813") (result i32) (i64.le_u (i64.const 0) (i64.const 0)))
+  (func (export "le_u814") (param $x i64) (result i32) (i64.le_u (get_local $x) (i64.const 0)))
+  (func (export "le_u815") (param $y i64) (result i32) (i64.le_u (i64.const 0) (get_local $y)))
+  (func (export "le_u816") (result i32) (i64.le_u (i64.const 1) (i64.const 1)))
+  (func (export "le_u817") (param $x i64) (result i32) (i64.le_u (get_local $x) (i64.const 1)))
+  (func (export "le_u818") (param $y i64) (result i32) (i64.le_u (i64.const 1) (get_local $y)))
+  (func (export "le_u819") (result i32) (i64.le_u (i64.const -1) (i64.const 1)))
+  (func (export "le_u820") (param $x i64) (result i32) (i64.le_u (get_local $x) (i64.const 1)))
+  (func (export "le_u821") (param $y i64) (result i32) (i64.le_u (i64.const -1) (get_local $y)))
+  (func (export "le_u822") (result i32) (i64.le_u (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)))
+  (func (export "le_u823") (param $x i64) (result i32) (i64.le_u (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "le_u824") (param $y i64) (result i32) (i64.le_u (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "le_u825") (result i32) (i64.le_u (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)))
+  (func (export "le_u826") (param $x i64) (result i32) (i64.le_u (get_local $x) (i64.const 0x7fffffffffffffff)))
+  (func (export "le_u827") (param $y i64) (result i32) (i64.le_u (i64.const 0x7fffffffffffffff) (get_local $y)))
+  (func (export "le_u828") (result i32) (i64.le_u (i64.const -1) (i64.const -1)))
+  (func (export "le_u829") (param $x i64) (result i32) (i64.le_u (get_local $x) (i64.const -1)))
+  (func (export "le_u830") (param $y i64) (result i32) (i64.le_u (i64.const -1) (get_local $y)))
+  (func (export "le_u831") (result i32) (i64.le_u (i64.const 1) (i64.const 0)))
+  (func (export "le_u832") (param $x i64) (result i32) (i64.le_u (get_local $x) (i64.const 0)))
+  (func (export "le_u833") (param $y i64) (result i32) (i64.le_u (i64.const 1) (get_local $y)))
+  (func (export "le_u834") (result i32) (i64.le_u (i64.const 0) (i64.const 1)))
+  (func (export "le_u835") (param $x i64) (result i32) (i64.le_u (get_local $x) (i64.const 1)))
+  (func (export "le_u836") (param $y i64) (result i32) (i64.le_u (i64.const 0) (get_local $y)))
+  (func (export "le_u837") (result i32) (i64.le_u (i64.const 0x8000000000000000) (i64.const 0)))
+  (func (export "le_u838") (param $x i64) (result i32) (i64.le_u (get_local $x) (i64.const 0)))
+  (func (export "le_u839") (param $y i64) (result i32) (i64.le_u (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "le_u840") (result i32) (i64.le_u (i64.const 0) (i64.const 0x8000000000000000)))
+  (func (export "le_u841") (param $x i64) (result i32) (i64.le_u (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "le_u842") (param $y i64) (result i32) (i64.le_u (i64.const 0) (get_local $y)))
+  (func (export "le_u843") (result i32) (i64.le_u (i64.const 0x8000000000000000) (i64.const -1)))
+  (func (export "le_u844") (param $x i64) (result i32) (i64.le_u (get_local $x) (i64.const -1)))
+  (func (export "le_u845") (param $y i64) (result i32) (i64.le_u (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "le_u846") (result i32) (i64.le_u (i64.const -1) (i64.const 0x8000000000000000)))
+  (func (export "le_u847") (param $x i64) (result i32) (i64.le_u (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "le_u848") (param $y i64) (result i32) (i64.le_u (i64.const -1) (get_local $y)))
+  (func (export "le_u849") (result i32) (i64.le_u (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)))
+  (func (export "le_u850") (param $x i64) (result i32) (i64.le_u (get_local $x) (i64.const 0x7fffffffffffffff)))
+  (func (export "le_u851") (param $y i64) (result i32) (i64.le_u (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "le_u852") (result i32) (i64.le_u (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)))
+  (func (export "le_u853") (param $x i64) (result i32) (i64.le_u (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "le_u854") (param $y i64) (result i32) (i64.le_u (i64.const 0x7fffffffffffffff) (get_local $y)))
+  (func (export "gt_s855") (result i32) (i64.gt_s (i64.const 0) (i64.const 0)))
+  (func (export "gt_s856") (param $x i64) (result i32) (i64.gt_s (get_local $x) (i64.const 0)))
+  (func (export "gt_s857") (param $y i64) (result i32) (i64.gt_s (i64.const 0) (get_local $y)))
+  (func (export "gt_s858") (result i32) (i64.gt_s (i64.const 1) (i64.const 1)))
+  (func (export "gt_s859") (param $x i64) (result i32) (i64.gt_s (get_local $x) (i64.const 1)))
+  (func (export "gt_s860") (param $y i64) (result i32) (i64.gt_s (i64.const 1) (get_local $y)))
+  (func (export "gt_s861") (result i32) (i64.gt_s (i64.const -1) (i64.const 1)))
+  (func (export "gt_s862") (param $x i64) (result i32) (i64.gt_s (get_local $x) (i64.const 1)))
+  (func (export "gt_s863") (param $y i64) (result i32) (i64.gt_s (i64.const -1) (get_local $y)))
+  (func (export "gt_s864") (result i32) (i64.gt_s (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)))
+  (func (export "gt_s865") (param $x i64) (result i32) (i64.gt_s (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "gt_s866") (param $y i64) (result i32) (i64.gt_s (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "gt_s867") (result i32) (i64.gt_s (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)))
+  (func (export "gt_s868") (param $x i64) (result i32) (i64.gt_s (get_local $x) (i64.const 0x7fffffffffffffff)))
+  (func (export "gt_s869") (param $y i64) (result i32) (i64.gt_s (i64.const 0x7fffffffffffffff) (get_local $y)))
+  (func (export "gt_s870") (result i32) (i64.gt_s (i64.const -1) (i64.const -1)))
+  (func (export "gt_s871") (param $x i64) (result i32) (i64.gt_s (get_local $x) (i64.const -1)))
+  (func (export "gt_s872") (param $y i64) (result i32) (i64.gt_s (i64.const -1) (get_local $y)))
+  (func (export "gt_s873") (result i32) (i64.gt_s (i64.const 1) (i64.const 0)))
+  (func (export "gt_s874") (param $x i64) (result i32) (i64.gt_s (get_local $x) (i64.const 0)))
+  (func (export "gt_s875") (param $y i64) (result i32) (i64.gt_s (i64.const 1) (get_local $y)))
+  (func (export "gt_s876") (result i32) (i64.gt_s (i64.const 0) (i64.const 1)))
+  (func (export "gt_s877") (param $x i64) (result i32) (i64.gt_s (get_local $x) (i64.const 1)))
+  (func (export "gt_s878") (param $y i64) (result i32) (i64.gt_s (i64.const 0) (get_local $y)))
+  (func (export "gt_s879") (result i32) (i64.gt_s (i64.const 0x8000000000000000) (i64.const 0)))
+  (func (export "gt_s880") (param $x i64) (result i32) (i64.gt_s (get_local $x) (i64.const 0)))
+  (func (export "gt_s881") (param $y i64) (result i32) (i64.gt_s (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "gt_s882") (result i32) (i64.gt_s (i64.const 0) (i64.const 0x8000000000000000)))
+  (func (export "gt_s883") (param $x i64) (result i32) (i64.gt_s (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "gt_s884") (param $y i64) (result i32) (i64.gt_s (i64.const 0) (get_local $y)))
+  (func (export "gt_s885") (result i32) (i64.gt_s (i64.const 0x8000000000000000) (i64.const -1)))
+  (func (export "gt_s886") (param $x i64) (result i32) (i64.gt_s (get_local $x) (i64.const -1)))
+  (func (export "gt_s887") (param $y i64) (result i32) (i64.gt_s (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "gt_s888") (result i32) (i64.gt_s (i64.const -1) (i64.const 0x8000000000000000)))
+  (func (export "gt_s889") (param $x i64) (result i32) (i64.gt_s (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "gt_s890") (param $y i64) (result i32) (i64.gt_s (i64.const -1) (get_local $y)))
+  (func (export "gt_s891") (result i32) (i64.gt_s (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)))
+  (func (export "gt_s892") (param $x i64) (result i32) (i64.gt_s (get_local $x) (i64.const 0x7fffffffffffffff)))
+  (func (export "gt_s893") (param $y i64) (result i32) (i64.gt_s (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "gt_s894") (result i32) (i64.gt_s (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)))
+  (func (export "gt_s895") (param $x i64) (result i32) (i64.gt_s (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "gt_s896") (param $y i64) (result i32) (i64.gt_s (i64.const 0x7fffffffffffffff) (get_local $y)))
+  (func (export "gt_u897") (result i32) (i64.gt_u (i64.const 0) (i64.const 0)))
+  (func (export "gt_u898") (param $x i64) (result i32) (i64.gt_u (get_local $x) (i64.const 0)))
+  (func (export "gt_u899") (param $y i64) (result i32) (i64.gt_u (i64.const 0) (get_local $y)))
+  (func (export "gt_u900") (result i32) (i64.gt_u (i64.const 1) (i64.const 1)))
+  (func (export "gt_u901") (param $x i64) (result i32) (i64.gt_u (get_local $x) (i64.const 1)))
+  (func (export "gt_u902") (param $y i64) (result i32) (i64.gt_u (i64.const 1) (get_local $y)))
+  (func (export "gt_u903") (result i32) (i64.gt_u (i64.const -1) (i64.const 1)))
+  (func (export "gt_u904") (param $x i64) (result i32) (i64.gt_u (get_local $x) (i64.const 1)))
+  (func (export "gt_u905") (param $y i64) (result i32) (i64.gt_u (i64.const -1) (get_local $y)))
+  (func (export "gt_u906") (result i32) (i64.gt_u (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)))
+  (func (export "gt_u907") (param $x i64) (result i32) (i64.gt_u (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "gt_u908") (param $y i64) (result i32) (i64.gt_u (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "gt_u909") (result i32) (i64.gt_u (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)))
+  (func (export "gt_u910") (param $x i64) (result i32) (i64.gt_u (get_local $x) (i64.const 0x7fffffffffffffff)))
+  (func (export "gt_u911") (param $y i64) (result i32) (i64.gt_u (i64.const 0x7fffffffffffffff) (get_local $y)))
+  (func (export "gt_u912") (result i32) (i64.gt_u (i64.const -1) (i64.const -1)))
+  (func (export "gt_u913") (param $x i64) (result i32) (i64.gt_u (get_local $x) (i64.const -1)))
+  (func (export "gt_u914") (param $y i64) (result i32) (i64.gt_u (i64.const -1) (get_local $y)))
+  (func (export "gt_u915") (result i32) (i64.gt_u (i64.const 1) (i64.const 0)))
+  (func (export "gt_u916") (param $x i64) (result i32) (i64.gt_u (get_local $x) (i64.const 0)))
+  (func (export "gt_u917") (param $y i64) (result i32) (i64.gt_u (i64.const 1) (get_local $y)))
+  (func (export "gt_u918") (result i32) (i64.gt_u (i64.const 0) (i64.const 1)))
+  (func (export "gt_u919") (param $x i64) (result i32) (i64.gt_u (get_local $x) (i64.const 1)))
+  (func (export "gt_u920") (param $y i64) (result i32) (i64.gt_u (i64.const 0) (get_local $y)))
+  (func (export "gt_u921") (result i32) (i64.gt_u (i64.const 0x8000000000000000) (i64.const 0)))
+  (func (export "gt_u922") (param $x i64) (result i32) (i64.gt_u (get_local $x) (i64.const 0)))
+  (func (export "gt_u923") (param $y i64) (result i32) (i64.gt_u (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "gt_u924") (result i32) (i64.gt_u (i64.const 0) (i64.const 0x8000000000000000)))
+  (func (export "gt_u925") (param $x i64) (result i32) (i64.gt_u (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "gt_u926") (param $y i64) (result i32) (i64.gt_u (i64.const 0) (get_local $y)))
+  (func (export "gt_u927") (result i32) (i64.gt_u (i64.const 0x8000000000000000) (i64.const -1)))
+  (func (export "gt_u928") (param $x i64) (result i32) (i64.gt_u (get_local $x) (i64.const -1)))
+  (func (export "gt_u929") (param $y i64) (result i32) (i64.gt_u (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "gt_u930") (result i32) (i64.gt_u (i64.const -1) (i64.const 0x8000000000000000)))
+  (func (export "gt_u931") (param $x i64) (result i32) (i64.gt_u (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "gt_u932") (param $y i64) (result i32) (i64.gt_u (i64.const -1) (get_local $y)))
+  (func (export "gt_u933") (result i32) (i64.gt_u (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)))
+  (func (export "gt_u934") (param $x i64) (result i32) (i64.gt_u (get_local $x) (i64.const 0x7fffffffffffffff)))
+  (func (export "gt_u935") (param $y i64) (result i32) (i64.gt_u (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "gt_u936") (result i32) (i64.gt_u (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)))
+  (func (export "gt_u937") (param $x i64) (result i32) (i64.gt_u (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "gt_u938") (param $y i64) (result i32) (i64.gt_u (i64.const 0x7fffffffffffffff) (get_local $y)))
+  (func (export "ge_s939") (result i32) (i64.ge_s (i64.const 0) (i64.const 0)))
+  (func (export "ge_s940") (param $x i64) (result i32) (i64.ge_s (get_local $x) (i64.const 0)))
+  (func (export "ge_s941") (param $y i64) (result i32) (i64.ge_s (i64.const 0) (get_local $y)))
+  (func (export "ge_s942") (result i32) (i64.ge_s (i64.const 1) (i64.const 1)))
+  (func (export "ge_s943") (param $x i64) (result i32) (i64.ge_s (get_local $x) (i64.const 1)))
+  (func (export "ge_s944") (param $y i64) (result i32) (i64.ge_s (i64.const 1) (get_local $y)))
+  (func (export "ge_s945") (result i32) (i64.ge_s (i64.const -1) (i64.const 1)))
+  (func (export "ge_s946") (param $x i64) (result i32) (i64.ge_s (get_local $x) (i64.const 1)))
+  (func (export "ge_s947") (param $y i64) (result i32) (i64.ge_s (i64.const -1) (get_local $y)))
+  (func (export "ge_s948") (result i32) (i64.ge_s (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)))
+  (func (export "ge_s949") (param $x i64) (result i32) (i64.ge_s (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "ge_s950") (param $y i64) (result i32) (i64.ge_s (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "ge_s951") (result i32) (i64.ge_s (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)))
+  (func (export "ge_s952") (param $x i64) (result i32) (i64.ge_s (get_local $x) (i64.const 0x7fffffffffffffff)))
+  (func (export "ge_s953") (param $y i64) (result i32) (i64.ge_s (i64.const 0x7fffffffffffffff) (get_local $y)))
+  (func (export "ge_s954") (result i32) (i64.ge_s (i64.const -1) (i64.const -1)))
+  (func (export "ge_s955") (param $x i64) (result i32) (i64.ge_s (get_local $x) (i64.const -1)))
+  (func (export "ge_s956") (param $y i64) (result i32) (i64.ge_s (i64.const -1) (get_local $y)))
+  (func (export "ge_s957") (result i32) (i64.ge_s (i64.const 1) (i64.const 0)))
+  (func (export "ge_s958") (param $x i64) (result i32) (i64.ge_s (get_local $x) (i64.const 0)))
+  (func (export "ge_s959") (param $y i64) (result i32) (i64.ge_s (i64.const 1) (get_local $y)))
+  (func (export "ge_s960") (result i32) (i64.ge_s (i64.const 0) (i64.const 1)))
+  (func (export "ge_s961") (param $x i64) (result i32) (i64.ge_s (get_local $x) (i64.const 1)))
+  (func (export "ge_s962") (param $y i64) (result i32) (i64.ge_s (i64.const 0) (get_local $y)))
+  (func (export "ge_s963") (result i32) (i64.ge_s (i64.const 0x8000000000000000) (i64.const 0)))
+  (func (export "ge_s964") (param $x i64) (result i32) (i64.ge_s (get_local $x) (i64.const 0)))
+  (func (export "ge_s965") (param $y i64) (result i32) (i64.ge_s (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "ge_s966") (result i32) (i64.ge_s (i64.const 0) (i64.const 0x8000000000000000)))
+  (func (export "ge_s967") (param $x i64) (result i32) (i64.ge_s (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "ge_s968") (param $y i64) (result i32) (i64.ge_s (i64.const 0) (get_local $y)))
+  (func (export "ge_s969") (result i32) (i64.ge_s (i64.const 0x8000000000000000) (i64.const -1)))
+  (func (export "ge_s970") (param $x i64) (result i32) (i64.ge_s (get_local $x) (i64.const -1)))
+  (func (export "ge_s971") (param $y i64) (result i32) (i64.ge_s (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "ge_s972") (result i32) (i64.ge_s (i64.const -1) (i64.const 0x8000000000000000)))
+  (func (export "ge_s973") (param $x i64) (result i32) (i64.ge_s (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "ge_s974") (param $y i64) (result i32) (i64.ge_s (i64.const -1) (get_local $y)))
+  (func (export "ge_s975") (result i32) (i64.ge_s (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)))
+  (func (export "ge_s976") (param $x i64) (result i32) (i64.ge_s (get_local $x) (i64.const 0x7fffffffffffffff)))
+  (func (export "ge_s977") (param $y i64) (result i32) (i64.ge_s (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "ge_s978") (result i32) (i64.ge_s (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)))
+  (func (export "ge_s979") (param $x i64) (result i32) (i64.ge_s (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "ge_s980") (param $y i64) (result i32) (i64.ge_s (i64.const 0x7fffffffffffffff) (get_local $y)))
+  (func (export "ge_u981") (result i32) (i64.ge_u (i64.const 0) (i64.const 0)))
+  (func (export "ge_u982") (param $x i64) (result i32) (i64.ge_u (get_local $x) (i64.const 0)))
+  (func (export "ge_u983") (param $y i64) (result i32) (i64.ge_u (i64.const 0) (get_local $y)))
+  (func (export "ge_u984") (result i32) (i64.ge_u (i64.const 1) (i64.const 1)))
+  (func (export "ge_u985") (param $x i64) (result i32) (i64.ge_u (get_local $x) (i64.const 1)))
+  (func (export "ge_u986") (param $y i64) (result i32) (i64.ge_u (i64.const 1) (get_local $y)))
+  (func (export "ge_u987") (result i32) (i64.ge_u (i64.const -1) (i64.const 1)))
+  (func (export "ge_u988") (param $x i64) (result i32) (i64.ge_u (get_local $x) (i64.const 1)))
+  (func (export "ge_u989") (param $y i64) (result i32) (i64.ge_u (i64.const -1) (get_local $y)))
+  (func (export "ge_u990") (result i32) (i64.ge_u (i64.const 0x8000000000000000) (i64.const 0x8000000000000000)))
+  (func (export "ge_u991") (param $x i64) (result i32) (i64.ge_u (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "ge_u992") (param $y i64) (result i32) (i64.ge_u (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "ge_u993") (result i32) (i64.ge_u (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)))
+  (func (export "ge_u994") (param $x i64) (result i32) (i64.ge_u (get_local $x) (i64.const 0x7fffffffffffffff)))
+  (func (export "ge_u995") (param $y i64) (result i32) (i64.ge_u (i64.const 0x7fffffffffffffff) (get_local $y)))
+  (func (export "ge_u996") (result i32) (i64.ge_u (i64.const -1) (i64.const -1)))
+  (func (export "ge_u997") (param $x i64) (result i32) (i64.ge_u (get_local $x) (i64.const -1)))
+  (func (export "ge_u998") (param $y i64) (result i32) (i64.ge_u (i64.const -1) (get_local $y)))
+  (func (export "ge_u999") (result i32) (i64.ge_u (i64.const 1) (i64.const 0)))
+  (func (export "ge_u1000") (param $x i64) (result i32) (i64.ge_u (get_local $x) (i64.const 0)))
+  (func (export "ge_u1001") (param $y i64) (result i32) (i64.ge_u (i64.const 1) (get_local $y)))
+  (func (export "ge_u1002") (result i32) (i64.ge_u (i64.const 0) (i64.const 1)))
+  (func (export "ge_u1003") (param $x i64) (result i32) (i64.ge_u (get_local $x) (i64.const 1)))
+  (func (export "ge_u1004") (param $y i64) (result i32) (i64.ge_u (i64.const 0) (get_local $y)))
+  (func (export "ge_u1005") (result i32) (i64.ge_u (i64.const 0x8000000000000000) (i64.const 0)))
+  (func (export "ge_u1006") (param $x i64) (result i32) (i64.ge_u (get_local $x) (i64.const 0)))
+  (func (export "ge_u1007") (param $y i64) (result i32) (i64.ge_u (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "ge_u1008") (result i32) (i64.ge_u (i64.const 0) (i64.const 0x8000000000000000)))
+  (func (export "ge_u1009") (param $x i64) (result i32) (i64.ge_u (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "ge_u1010") (param $y i64) (result i32) (i64.ge_u (i64.const 0) (get_local $y)))
+  (func (export "ge_u1011") (result i32) (i64.ge_u (i64.const 0x8000000000000000) (i64.const -1)))
+  (func (export "ge_u1012") (param $x i64) (result i32) (i64.ge_u (get_local $x) (i64.const -1)))
+  (func (export "ge_u1013") (param $y i64) (result i32) (i64.ge_u (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "ge_u1014") (result i32) (i64.ge_u (i64.const -1) (i64.const 0x8000000000000000)))
+  (func (export "ge_u1015") (param $x i64) (result i32) (i64.ge_u (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "ge_u1016") (param $y i64) (result i32) (i64.ge_u (i64.const -1) (get_local $y)))
+  (func (export "ge_u1017") (result i32) (i64.ge_u (i64.const 0x8000000000000000) (i64.const 0x7fffffffffffffff)))
+  (func (export "ge_u1018") (param $x i64) (result i32) (i64.ge_u (get_local $x) (i64.const 0x7fffffffffffffff)))
+  (func (export "ge_u1019") (param $y i64) (result i32) (i64.ge_u (i64.const 0x8000000000000000) (get_local $y)))
+  (func (export "ge_u1020") (result i32) (i64.ge_u (i64.const 0x7fffffffffffffff) (i64.const 0x8000000000000000)))
+  (func (export "ge_u1021") (param $x i64) (result i32) (i64.ge_u (get_local $x) (i64.const 0x8000000000000000)))
+  (func (export "ge_u1022") (param $y i64) (result i32) (i64.ge_u (i64.const 0x7fffffffffffffff) (get_local $y)))
 )
 
 (assert_return (invoke "add0") (i64.const 2))
@@ -1056,914 +1099,957 @@
 (assert_return (invoke "mul66") (i64.const 0x2236d88fe5618cf0))
 (assert_return (invoke "mul67" (i64.const 0x0123456789abcdef)) (i64.const 0x2236d88fe5618cf0))
 (assert_return (invoke "mul68" (i64.const 0xfedcba9876543210)) (i64.const 0x2236d88fe5618cf0))
-(assert_trap (invoke "div_s69") "integer divide by zero")
-(assert_trap (invoke "div_s70" (i64.const 1)) "integer divide by zero")
-(assert_trap (invoke "div_s71" (i64.const 0)) "integer divide by zero")
+(assert_return (invoke "mul69") (i64.const 1))
+(assert_return (invoke "mul70" (i64.const 0x7fffffffffffffff)) (i64.const 1))
+(assert_return (invoke "mul71" (i64.const 0x7fffffffffffffff)) (i64.const 1))
 (assert_trap (invoke "div_s72") "integer divide by zero")
-(assert_trap (invoke "div_s73" (i64.const 0)) "integer divide by zero")
+(assert_trap (invoke "div_s73" (i64.const 1)) "integer divide by zero")
 (assert_trap (invoke "div_s74" (i64.const 0)) "integer divide by zero")
-(assert_trap (invoke "div_s75") "integer overflow")
-(assert_trap (invoke "div_s76" (i64.const 0x8000000000000000)) "integer overflow")
-(assert_trap (invoke "div_s77" (i64.const -1)) "integer overflow")
-(assert_return (invoke "div_s78") (i64.const 1))
-(assert_return (invoke "div_s79" (i64.const 1)) (i64.const 1))
-(assert_return (invoke "div_s80" (i64.const 1)) (i64.const 1))
-(assert_return (invoke "div_s81") (i64.const 0))
-(assert_return (invoke "div_s82" (i64.const 0)) (i64.const 0))
-(assert_return (invoke "div_s83" (i64.const 1)) (i64.const 0))
-(assert_return (invoke "div_s84") (i64.const 1))
-(assert_return (invoke "div_s85" (i64.const -1)) (i64.const 1))
-(assert_return (invoke "div_s86" (i64.const -1)) (i64.const 1))
-(assert_return (invoke "div_s87") (i64.const 0xc000000000000000))
-(assert_return (invoke "div_s88" (i64.const 0x8000000000000000)) (i64.const 0xc000000000000000))
-(assert_return (invoke "div_s89" (i64.const 2)) (i64.const 0xc000000000000000))
-(assert_return (invoke "div_s90") (i64.const 0xffdf3b645a1cac09))
-(assert_return (invoke "div_s91" (i64.const 0x8000000000000001)) (i64.const 0xffdf3b645a1cac09))
-(assert_return (invoke "div_s92" (i64.const 1000)) (i64.const 0xffdf3b645a1cac09))
-(assert_return (invoke "div_s93") (i64.const 2))
-(assert_return (invoke "div_s94" (i64.const 5)) (i64.const 2))
-(assert_return (invoke "div_s95" (i64.const 2)) (i64.const 2))
-(assert_return (invoke "div_s96") (i64.const -2))
-(assert_return (invoke "div_s97" (i64.const -5)) (i64.const -2))
-(assert_return (invoke "div_s98" (i64.const 2)) (i64.const -2))
-(assert_return (invoke "div_s99") (i64.const -2))
-(assert_return (invoke "div_s100" (i64.const 5)) (i64.const -2))
-(assert_return (invoke "div_s101" (i64.const -2)) (i64.const -2))
-(assert_return (invoke "div_s102") (i64.const 2))
-(assert_return (invoke "div_s103" (i64.const -5)) (i64.const 2))
-(assert_return (invoke "div_s104" (i64.const -2)) (i64.const 2))
-(assert_return (invoke "div_s105") (i64.const 2))
-(assert_return (invoke "div_s106" (i64.const 7)) (i64.const 2))
-(assert_return (invoke "div_s107" (i64.const 3)) (i64.const 2))
-(assert_return (invoke "div_s108") (i64.const -2))
-(assert_return (invoke "div_s109" (i64.const -7)) (i64.const -2))
-(assert_return (invoke "div_s110" (i64.const 3)) (i64.const -2))
-(assert_return (invoke "div_s111") (i64.const -2))
-(assert_return (invoke "div_s112" (i64.const 7)) (i64.const -2))
-(assert_return (invoke "div_s113" (i64.const -3)) (i64.const -2))
-(assert_return (invoke "div_s114") (i64.const 2))
-(assert_return (invoke "div_s115" (i64.const -7)) (i64.const 2))
-(assert_return (invoke "div_s116" (i64.const -3)) (i64.const 2))
-(assert_return (invoke "div_s117") (i64.const 2))
-(assert_return (invoke "div_s118" (i64.const 11)) (i64.const 2))
-(assert_return (invoke "div_s119" (i64.const 5)) (i64.const 2))
+(assert_trap (invoke "div_s75") "integer divide by zero")
+(assert_trap (invoke "div_s76" (i64.const 0)) "integer divide by zero")
+(assert_trap (invoke "div_s77" (i64.const 0)) "integer divide by zero")
+(assert_trap (invoke "div_s78") "integer overflow")
+(assert_trap (invoke "div_s79" (i64.const 0x8000000000000000)) "integer overflow")
+(assert_trap (invoke "div_s80" (i64.const -1)) "integer overflow")
+(assert_return (invoke "div_s81") (i64.const 1))
+(assert_return (invoke "div_s82" (i64.const 1)) (i64.const 1))
+(assert_return (invoke "div_s83" (i64.const 1)) (i64.const 1))
+(assert_return (invoke "div_s84") (i64.const 0))
+(assert_return (invoke "div_s85" (i64.const 0)) (i64.const 0))
+(assert_return (invoke "div_s86" (i64.const 1)) (i64.const 0))
+(assert_return (invoke "div_s87") (i64.const 0))
+(assert_return (invoke "div_s88" (i64.const 0)) (i64.const 0))
+(assert_return (invoke "div_s89" (i64.const -1)) (i64.const 0))
+(assert_return (invoke "div_s90") (i64.const 1))
+(assert_return (invoke "div_s91" (i64.const -1)) (i64.const 1))
+(assert_return (invoke "div_s92" (i64.const -1)) (i64.const 1))
+(assert_return (invoke "div_s93") (i64.const 0xc000000000000000))
+(assert_return (invoke "div_s94" (i64.const 0x8000000000000000)) (i64.const 0xc000000000000000))
+(assert_return (invoke "div_s95" (i64.const 2)) (i64.const 0xc000000000000000))
+(assert_return (invoke "div_s96") (i64.const 0xffdf3b645a1cac09))
+(assert_return (invoke "div_s97" (i64.const 0x8000000000000001)) (i64.const 0xffdf3b645a1cac09))
+(assert_return (invoke "div_s98" (i64.const 1000)) (i64.const 0xffdf3b645a1cac09))
+(assert_return (invoke "div_s99") (i64.const 2))
+(assert_return (invoke "div_s100" (i64.const 5)) (i64.const 2))
+(assert_return (invoke "div_s101" (i64.const 2)) (i64.const 2))
+(assert_return (invoke "div_s102") (i64.const -2))
+(assert_return (invoke "div_s103" (i64.const -5)) (i64.const -2))
+(assert_return (invoke "div_s104" (i64.const 2)) (i64.const -2))
+(assert_return (invoke "div_s105") (i64.const -2))
+(assert_return (invoke "div_s106" (i64.const 5)) (i64.const -2))
+(assert_return (invoke "div_s107" (i64.const -2)) (i64.const -2))
+(assert_return (invoke "div_s108") (i64.const 2))
+(assert_return (invoke "div_s109" (i64.const -5)) (i64.const 2))
+(assert_return (invoke "div_s110" (i64.const -2)) (i64.const 2))
+(assert_return (invoke "div_s111") (i64.const 2))
+(assert_return (invoke "div_s112" (i64.const 7)) (i64.const 2))
+(assert_return (invoke "div_s113" (i64.const 3)) (i64.const 2))
+(assert_return (invoke "div_s114") (i64.const -2))
+(assert_return (invoke "div_s115" (i64.const -7)) (i64.const -2))
+(assert_return (invoke "div_s116" (i64.const 3)) (i64.const -2))
+(assert_return (invoke "div_s117") (i64.const -2))
+(assert_return (invoke "div_s118" (i64.const 7)) (i64.const -2))
+(assert_return (invoke "div_s119" (i64.const -3)) (i64.const -2))
 (assert_return (invoke "div_s120") (i64.const 2))
-(assert_return (invoke "div_s121" (i64.const 17)) (i64.const 2))
-(assert_return (invoke "div_s122" (i64.const 7)) (i64.const 2))
-(assert_trap (invoke "div_u123") "integer divide by zero")
-(assert_trap (invoke "div_u124" (i64.const 1)) "integer divide by zero")
-(assert_trap (invoke "div_u125" (i64.const 0)) "integer divide by zero")
-(assert_trap (invoke "div_u126") "integer divide by zero")
-(assert_trap (invoke "div_u127" (i64.const 0)) "integer divide by zero")
-(assert_trap (invoke "div_u128" (i64.const 0)) "integer divide by zero")
-(assert_return (invoke "div_u129") (i64.const 1))
-(assert_return (invoke "div_u130" (i64.const 1)) (i64.const 1))
-(assert_return (invoke "div_u131" (i64.const 1)) (i64.const 1))
-(assert_return (invoke "div_u132") (i64.const 0))
-(assert_return (invoke "div_u133" (i64.const 0)) (i64.const 0))
-(assert_return (invoke "div_u134" (i64.const 1)) (i64.const 0))
+(assert_return (invoke "div_s121" (i64.const -7)) (i64.const 2))
+(assert_return (invoke "div_s122" (i64.const -3)) (i64.const 2))
+(assert_return (invoke "div_s123") (i64.const 2))
+(assert_return (invoke "div_s124" (i64.const 11)) (i64.const 2))
+(assert_return (invoke "div_s125" (i64.const 5)) (i64.const 2))
+(assert_return (invoke "div_s126") (i64.const 2))
+(assert_return (invoke "div_s127" (i64.const 17)) (i64.const 2))
+(assert_return (invoke "div_s128" (i64.const 7)) (i64.const 2))
+(assert_trap (invoke "div_u129") "integer divide by zero")
+(assert_trap (invoke "div_u130" (i64.const 1)) "integer divide by zero")
+(assert_trap (invoke "div_u131" (i64.const 0)) "integer divide by zero")
+(assert_trap (invoke "div_u132") "integer divide by zero")
+(assert_trap (invoke "div_u133" (i64.const 0)) "integer divide by zero")
+(assert_trap (invoke "div_u134" (i64.const 0)) "integer divide by zero")
 (assert_return (invoke "div_u135") (i64.const 1))
-(assert_return (invoke "div_u136" (i64.const -1)) (i64.const 1))
-(assert_return (invoke "div_u137" (i64.const -1)) (i64.const 1))
+(assert_return (invoke "div_u136" (i64.const 1)) (i64.const 1))
+(assert_return (invoke "div_u137" (i64.const 1)) (i64.const 1))
 (assert_return (invoke "div_u138") (i64.const 0))
-(assert_return (invoke "div_u139" (i64.const 0x8000000000000000)) (i64.const 0))
-(assert_return (invoke "div_u140" (i64.const -1)) (i64.const 0))
-(assert_return (invoke "div_u141") (i64.const 0x4000000000000000))
-(assert_return (invoke "div_u142" (i64.const 0x8000000000000000)) (i64.const 0x4000000000000000))
-(assert_return (invoke "div_u143" (i64.const 2)) (i64.const 0x4000000000000000))
-(assert_return (invoke "div_u144") (i64.const 0x8ff00fef))
-(assert_return (invoke "div_u145" (i64.const 0x8ff00ff00ff00ff0)) (i64.const 0x8ff00fef))
-(assert_return (invoke "div_u146" (i64.const 0x100000001)) (i64.const 0x8ff00fef))
-(assert_return (invoke "div_u147") (i64.const 0x20c49ba5e353f7))
-(assert_return (invoke "div_u148" (i64.const 0x8000000000000001)) (i64.const 0x20c49ba5e353f7))
-(assert_return (invoke "div_u149" (i64.const 1000)) (i64.const 0x20c49ba5e353f7))
-(assert_return (invoke "div_u150") (i64.const 2))
-(assert_return (invoke "div_u151" (i64.const 5)) (i64.const 2))
-(assert_return (invoke "div_u152" (i64.const 2)) (i64.const 2))
-(assert_return (invoke "div_u153") (i64.const 0x7ffffffffffffffd))
-(assert_return (invoke "div_u154" (i64.const -5)) (i64.const 0x7ffffffffffffffd))
-(assert_return (invoke "div_u155" (i64.const 2)) (i64.const 0x7ffffffffffffffd))
-(assert_return (invoke "div_u156") (i64.const 0))
-(assert_return (invoke "div_u157" (i64.const 5)) (i64.const 0))
-(assert_return (invoke "div_u158" (i64.const -2)) (i64.const 0))
-(assert_return (invoke "div_u159") (i64.const 0))
-(assert_return (invoke "div_u160" (i64.const -5)) (i64.const 0))
-(assert_return (invoke "div_u161" (i64.const -2)) (i64.const 0))
-(assert_return (invoke "div_u162") (i64.const 2))
-(assert_return (invoke "div_u163" (i64.const 7)) (i64.const 2))
-(assert_return (invoke "div_u164" (i64.const 3)) (i64.const 2))
-(assert_return (invoke "div_u165") (i64.const 2))
-(assert_return (invoke "div_u166" (i64.const 11)) (i64.const 2))
-(assert_return (invoke "div_u167" (i64.const 5)) (i64.const 2))
+(assert_return (invoke "div_u139" (i64.const 0)) (i64.const 0))
+(assert_return (invoke "div_u140" (i64.const 1)) (i64.const 0))
+(assert_return (invoke "div_u141") (i64.const 1))
+(assert_return (invoke "div_u142" (i64.const -1)) (i64.const 1))
+(assert_return (invoke "div_u143" (i64.const -1)) (i64.const 1))
+(assert_return (invoke "div_u144") (i64.const 0))
+(assert_return (invoke "div_u145" (i64.const 0x8000000000000000)) (i64.const 0))
+(assert_return (invoke "div_u146" (i64.const -1)) (i64.const 0))
+(assert_return (invoke "div_u147") (i64.const 0x4000000000000000))
+(assert_return (invoke "div_u148" (i64.const 0x8000000000000000)) (i64.const 0x4000000000000000))
+(assert_return (invoke "div_u149" (i64.const 2)) (i64.const 0x4000000000000000))
+(assert_return (invoke "div_u150") (i64.const 0x8ff00fef))
+(assert_return (invoke "div_u151" (i64.const 0x8ff00ff00ff00ff0)) (i64.const 0x8ff00fef))
+(assert_return (invoke "div_u152" (i64.const 0x100000001)) (i64.const 0x8ff00fef))
+(assert_return (invoke "div_u153") (i64.const 0x20c49ba5e353f7))
+(assert_return (invoke "div_u154" (i64.const 0x8000000000000001)) (i64.const 0x20c49ba5e353f7))
+(assert_return (invoke "div_u155" (i64.const 1000)) (i64.const 0x20c49ba5e353f7))
+(assert_return (invoke "div_u156") (i64.const 2))
+(assert_return (invoke "div_u157" (i64.const 5)) (i64.const 2))
+(assert_return (invoke "div_u158" (i64.const 2)) (i64.const 2))
+(assert_return (invoke "div_u159") (i64.const 0x7ffffffffffffffd))
+(assert_return (invoke "div_u160" (i64.const -5)) (i64.const 0x7ffffffffffffffd))
+(assert_return (invoke "div_u161" (i64.const 2)) (i64.const 0x7ffffffffffffffd))
+(assert_return (invoke "div_u162") (i64.const 0))
+(assert_return (invoke "div_u163" (i64.const 5)) (i64.const 0))
+(assert_return (invoke "div_u164" (i64.const -2)) (i64.const 0))
+(assert_return (invoke "div_u165") (i64.const 0))
+(assert_return (invoke "div_u166" (i64.const -5)) (i64.const 0))
+(assert_return (invoke "div_u167" (i64.const -2)) (i64.const 0))
 (assert_return (invoke "div_u168") (i64.const 2))
-(assert_return (invoke "div_u169" (i64.const 17)) (i64.const 2))
-(assert_return (invoke "div_u170" (i64.const 7)) (i64.const 2))
-(assert_trap (invoke "rem_s171") "integer divide by zero")
-(assert_trap (invoke "rem_s172" (i64.const 1)) "integer divide by zero")
-(assert_trap (invoke "rem_s173" (i64.const 0)) "integer divide by zero")
-(assert_trap (invoke "rem_s174") "integer divide by zero")
-(assert_trap (invoke "rem_s175" (i64.const 0)) "integer divide by zero")
-(assert_trap (invoke "rem_s176" (i64.const 0)) "integer divide by zero")
-(assert_return (invoke "rem_s177") (i64.const 0))
-(assert_return (invoke "rem_s178" (i64.const 0x7fffffffffffffff)) (i64.const 0))
-(assert_return (invoke "rem_s179" (i64.const -1)) (i64.const 0))
-(assert_return (invoke "rem_s180") (i64.const 0))
-(assert_return (invoke "rem_s181" (i64.const 1)) (i64.const 0))
-(assert_return (invoke "rem_s182" (i64.const 1)) (i64.const 0))
+(assert_return (invoke "div_u169" (i64.const 7)) (i64.const 2))
+(assert_return (invoke "div_u170" (i64.const 3)) (i64.const 2))
+(assert_return (invoke "div_u171") (i64.const 2))
+(assert_return (invoke "div_u172" (i64.const 11)) (i64.const 2))
+(assert_return (invoke "div_u173" (i64.const 5)) (i64.const 2))
+(assert_return (invoke "div_u174") (i64.const 2))
+(assert_return (invoke "div_u175" (i64.const 17)) (i64.const 2))
+(assert_return (invoke "div_u176" (i64.const 7)) (i64.const 2))
+(assert_trap (invoke "rem_s177") "integer divide by zero")
+(assert_trap (invoke "rem_s178" (i64.const 1)) "integer divide by zero")
+(assert_trap (invoke "rem_s179" (i64.const 0)) "integer divide by zero")
+(assert_trap (invoke "rem_s180") "integer divide by zero")
+(assert_trap (invoke "rem_s181" (i64.const 0)) "integer divide by zero")
+(assert_trap (invoke "rem_s182" (i64.const 0)) "integer divide by zero")
 (assert_return (invoke "rem_s183") (i64.const 0))
-(assert_return (invoke "rem_s184" (i64.const 0)) (i64.const 0))
-(assert_return (invoke "rem_s185" (i64.const 1)) (i64.const 0))
+(assert_return (invoke "rem_s184" (i64.const 0x7fffffffffffffff)) (i64.const 0))
+(assert_return (invoke "rem_s185" (i64.const -1)) (i64.const 0))
 (assert_return (invoke "rem_s186") (i64.const 0))
-(assert_return (invoke "rem_s187" (i64.const -1)) (i64.const 0))
-(assert_return (invoke "rem_s188" (i64.const -1)) (i64.const 0))
+(assert_return (invoke "rem_s187" (i64.const 1)) (i64.const 0))
+(assert_return (invoke "rem_s188" (i64.const 1)) (i64.const 0))
 (assert_return (invoke "rem_s189") (i64.const 0))
-(assert_return (invoke "rem_s190" (i64.const 0x8000000000000000)) (i64.const 0))
-(assert_return (invoke "rem_s191" (i64.const -1)) (i64.const 0))
+(assert_return (invoke "rem_s190" (i64.const 0)) (i64.const 0))
+(assert_return (invoke "rem_s191" (i64.const 1)) (i64.const 0))
 (assert_return (invoke "rem_s192") (i64.const 0))
-(assert_return (invoke "rem_s193" (i64.const 0x8000000000000000)) (i64.const 0))
-(assert_return (invoke "rem_s194" (i64.const 2)) (i64.const 0))
-(assert_return (invoke "rem_s195") (i64.const -807))
-(assert_return (invoke "rem_s196" (i64.const 0x8000000000000001)) (i64.const -807))
-(assert_return (invoke "rem_s197" (i64.const 1000)) (i64.const -807))
-(assert_return (invoke "rem_s198") (i64.const 1))
-(assert_return (invoke "rem_s199" (i64.const 5)) (i64.const 1))
-(assert_return (invoke "rem_s200" (i64.const 2)) (i64.const 1))
-(assert_return (invoke "rem_s201") (i64.const -1))
-(assert_return (invoke "rem_s202" (i64.const -5)) (i64.const -1))
-(assert_return (invoke "rem_s203" (i64.const 2)) (i64.const -1))
-(assert_return (invoke "rem_s204") (i64.const 1))
-(assert_return (invoke "rem_s205" (i64.const 5)) (i64.const 1))
-(assert_return (invoke "rem_s206" (i64.const -2)) (i64.const 1))
-(assert_return (invoke "rem_s207") (i64.const -1))
-(assert_return (invoke "rem_s208" (i64.const -5)) (i64.const -1))
-(assert_return (invoke "rem_s209" (i64.const -2)) (i64.const -1))
-(assert_return (invoke "rem_s210") (i64.const 1))
-(assert_return (invoke "rem_s211" (i64.const 7)) (i64.const 1))
-(assert_return (invoke "rem_s212" (i64.const 3)) (i64.const 1))
-(assert_return (invoke "rem_s213") (i64.const -1))
-(assert_return (invoke "rem_s214" (i64.const -7)) (i64.const -1))
-(assert_return (invoke "rem_s215" (i64.const 3)) (i64.const -1))
-(assert_return (invoke "rem_s216") (i64.const 1))
-(assert_return (invoke "rem_s217" (i64.const 7)) (i64.const 1))
-(assert_return (invoke "rem_s218" (i64.const -3)) (i64.const 1))
-(assert_return (invoke "rem_s219") (i64.const -1))
-(assert_return (invoke "rem_s220" (i64.const -7)) (i64.const -1))
-(assert_return (invoke "rem_s221" (i64.const -3)) (i64.const -1))
-(assert_return (invoke "rem_s222") (i64.const 1))
-(assert_return (invoke "rem_s223" (i64.const 11)) (i64.const 1))
-(assert_return (invoke "rem_s224" (i64.const 5)) (i64.const 1))
-(assert_return (invoke "rem_s225") (i64.const 3))
-(assert_return (invoke "rem_s226" (i64.const 17)) (i64.const 3))
-(assert_return (invoke "rem_s227" (i64.const 7)) (i64.const 3))
-(assert_trap (invoke "rem_u228") "integer divide by zero")
-(assert_trap (invoke "rem_u229" (i64.const 1)) "integer divide by zero")
-(assert_trap (invoke "rem_u230" (i64.const 0)) "integer divide by zero")
-(assert_trap (invoke "rem_u231") "integer divide by zero")
-(assert_trap (invoke "rem_u232" (i64.const 0)) "integer divide by zero")
-(assert_trap (invoke "rem_u233" (i64.const 0)) "integer divide by zero")
-(assert_return (invoke "rem_u234") (i64.const 0))
-(assert_return (invoke "rem_u235" (i64.const 1)) (i64.const 0))
-(assert_return (invoke "rem_u236" (i64.const 1)) (i64.const 0))
-(assert_return (invoke "rem_u237") (i64.const 0))
-(assert_return (invoke "rem_u238" (i64.const 0)) (i64.const 0))
-(assert_return (invoke "rem_u239" (i64.const 1)) (i64.const 0))
-(assert_return (invoke "rem_u240") (i64.const 0))
-(assert_return (invoke "rem_u241" (i64.const -1)) (i64.const 0))
-(assert_return (invoke "rem_u242" (i64.const -1)) (i64.const 0))
-(assert_return (invoke "rem_u243") (i64.const 0x8000000000000000))
-(assert_return (invoke "rem_u244" (i64.const 0x8000000000000000)) (i64.const 0x8000000000000000))
-(assert_return (invoke "rem_u245" (i64.const -1)) (i64.const 0x8000000000000000))
+(assert_return (invoke "rem_s193" (i64.const 0)) (i64.const 0))
+(assert_return (invoke "rem_s194" (i64.const -1)) (i64.const 0))
+(assert_return (invoke "rem_s195") (i64.const 0))
+(assert_return (invoke "rem_s196" (i64.const -1)) (i64.const 0))
+(assert_return (invoke "rem_s197" (i64.const -1)) (i64.const 0))
+(assert_return (invoke "rem_s198") (i64.const 0))
+(assert_return (invoke "rem_s199" (i64.const 0x8000000000000000)) (i64.const 0))
+(assert_return (invoke "rem_s200" (i64.const -1)) (i64.const 0))
+(assert_return (invoke "rem_s201") (i64.const 0))
+(assert_return (invoke "rem_s202" (i64.const 0x8000000000000000)) (i64.const 0))
+(assert_return (invoke "rem_s203" (i64.const 2)) (i64.const 0))
+(assert_return (invoke "rem_s204") (i64.const -807))
+(assert_return (invoke "rem_s205" (i64.const 0x8000000000000001)) (i64.const -807))
+(assert_return (invoke "rem_s206" (i64.const 1000)) (i64.const -807))
+(assert_return (invoke "rem_s207") (i64.const 1))
+(assert_return (invoke "rem_s208" (i64.const 5)) (i64.const 1))
+(assert_return (invoke "rem_s209" (i64.const 2)) (i64.const 1))
+(assert_return (invoke "rem_s210") (i64.const -1))
+(assert_return (invoke "rem_s211" (i64.const -5)) (i64.const -1))
+(assert_return (invoke "rem_s212" (i64.const 2)) (i64.const -1))
+(assert_return (invoke "rem_s213") (i64.const 1))
+(assert_return (invoke "rem_s214" (i64.const 5)) (i64.const 1))
+(assert_return (invoke "rem_s215" (i64.const -2)) (i64.const 1))
+(assert_return (invoke "rem_s216") (i64.const -1))
+(assert_return (invoke "rem_s217" (i64.const -5)) (i64.const -1))
+(assert_return (invoke "rem_s218" (i64.const -2)) (i64.const -1))
+(assert_return (invoke "rem_s219") (i64.const 1))
+(assert_return (invoke "rem_s220" (i64.const 7)) (i64.const 1))
+(assert_return (invoke "rem_s221" (i64.const 3)) (i64.const 1))
+(assert_return (invoke "rem_s222") (i64.const -1))
+(assert_return (invoke "rem_s223" (i64.const -7)) (i64.const -1))
+(assert_return (invoke "rem_s224" (i64.const 3)) (i64.const -1))
+(assert_return (invoke "rem_s225") (i64.const 1))
+(assert_return (invoke "rem_s226" (i64.const 7)) (i64.const 1))
+(assert_return (invoke "rem_s227" (i64.const -3)) (i64.const 1))
+(assert_return (invoke "rem_s228") (i64.const -1))
+(assert_return (invoke "rem_s229" (i64.const -7)) (i64.const -1))
+(assert_return (invoke "rem_s230" (i64.const -3)) (i64.const -1))
+(assert_return (invoke "rem_s231") (i64.const 1))
+(assert_return (invoke "rem_s232" (i64.const 11)) (i64.const 1))
+(assert_return (invoke "rem_s233" (i64.const 5)) (i64.const 1))
+(assert_return (invoke "rem_s234") (i64.const 3))
+(assert_return (invoke "rem_s235" (i64.const 17)) (i64.const 3))
+(assert_return (invoke "rem_s236" (i64.const 7)) (i64.const 3))
+(assert_trap (invoke "rem_u237") "integer divide by zero")
+(assert_trap (invoke "rem_u238" (i64.const 1)) "integer divide by zero")
+(assert_trap (invoke "rem_u239" (i64.const 0)) "integer divide by zero")
+(assert_trap (invoke "rem_u240") "integer divide by zero")
+(assert_trap (invoke "rem_u241" (i64.const 0)) "integer divide by zero")
+(assert_trap (invoke "rem_u242" (i64.const 0)) "integer divide by zero")
+(assert_return (invoke "rem_u243") (i64.const 0))
+(assert_return (invoke "rem_u244" (i64.const 1)) (i64.const 0))
+(assert_return (invoke "rem_u245" (i64.const 1)) (i64.const 0))
 (assert_return (invoke "rem_u246") (i64.const 0))
-(assert_return (invoke "rem_u247" (i64.const 0x8000000000000000)) (i64.const 0))
-(assert_return (invoke "rem_u248" (i64.const 2)) (i64.const 0))
-(assert_return (invoke "rem_u249") (i64.const 0x80000001))
-(assert_return (invoke "rem_u250" (i64.const 0x8ff00ff00ff00ff0)) (i64.const 0x80000001))
-(assert_return (invoke "rem_u251" (i64.const 0x100000001)) (i64.const 0x80000001))
-(assert_return (invoke "rem_u252") (i64.const 809))
-(assert_return (invoke "rem_u253" (i64.const 0x8000000000000001)) (i64.const 809))
-(assert_return (invoke "rem_u254" (i64.const 1000)) (i64.const 809))
-(assert_return (invoke "rem_u255") (i64.const 1))
-(assert_return (invoke "rem_u256" (i64.const 5)) (i64.const 1))
-(assert_return (invoke "rem_u257" (i64.const 2)) (i64.const 1))
-(assert_return (invoke "rem_u258") (i64.const 1))
-(assert_return (invoke "rem_u259" (i64.const -5)) (i64.const 1))
-(assert_return (invoke "rem_u260" (i64.const 2)) (i64.const 1))
-(assert_return (invoke "rem_u261") (i64.const 5))
-(assert_return (invoke "rem_u262" (i64.const 5)) (i64.const 5))
-(assert_return (invoke "rem_u263" (i64.const -2)) (i64.const 5))
-(assert_return (invoke "rem_u264") (i64.const -5))
-(assert_return (invoke "rem_u265" (i64.const -5)) (i64.const -5))
-(assert_return (invoke "rem_u266" (i64.const -2)) (i64.const -5))
+(assert_return (invoke "rem_u247" (i64.const 0)) (i64.const 0))
+(assert_return (invoke "rem_u248" (i64.const 1)) (i64.const 0))
+(assert_return (invoke "rem_u249") (i64.const 0))
+(assert_return (invoke "rem_u250" (i64.const -1)) (i64.const 0))
+(assert_return (invoke "rem_u251" (i64.const -1)) (i64.const 0))
+(assert_return (invoke "rem_u252") (i64.const 0x8000000000000000))
+(assert_return (invoke "rem_u253" (i64.const 0x8000000000000000)) (i64.const 0x8000000000000000))
+(assert_return (invoke "rem_u254" (i64.const -1)) (i64.const 0x8000000000000000))
+(assert_return (invoke "rem_u255") (i64.const 0))
+(assert_return (invoke "rem_u256" (i64.const 0x8000000000000000)) (i64.const 0))
+(assert_return (invoke "rem_u257" (i64.const 2)) (i64.const 0))
+(assert_return (invoke "rem_u258") (i64.const 0x80000001))
+(assert_return (invoke "rem_u259" (i64.const 0x8ff00ff00ff00ff0)) (i64.const 0x80000001))
+(assert_return (invoke "rem_u260" (i64.const 0x100000001)) (i64.const 0x80000001))
+(assert_return (invoke "rem_u261") (i64.const 809))
+(assert_return (invoke "rem_u262" (i64.const 0x8000000000000001)) (i64.const 809))
+(assert_return (invoke "rem_u263" (i64.const 1000)) (i64.const 809))
+(assert_return (invoke "rem_u264") (i64.const 1))
+(assert_return (invoke "rem_u265" (i64.const 5)) (i64.const 1))
+(assert_return (invoke "rem_u266" (i64.const 2)) (i64.const 1))
 (assert_return (invoke "rem_u267") (i64.const 1))
-(assert_return (invoke "rem_u268" (i64.const 7)) (i64.const 1))
-(assert_return (invoke "rem_u269" (i64.const 3)) (i64.const 1))
-(assert_return (invoke "rem_u270") (i64.const 1))
-(assert_return (invoke "rem_u271" (i64.const 11)) (i64.const 1))
-(assert_return (invoke "rem_u272" (i64.const 5)) (i64.const 1))
-(assert_return (invoke "rem_u273") (i64.const 3))
-(assert_return (invoke "rem_u274" (i64.const 17)) (i64.const 3))
-(assert_return (invoke "rem_u275" (i64.const 7)) (i64.const 3))
-(assert_return (invoke "and276") (i64.const 0))
-(assert_return (invoke "and277" (i64.const 1)) (i64.const 0))
-(assert_return (invoke "and278" (i64.const 0)) (i64.const 0))
-(assert_return (invoke "and279") (i64.const 0))
-(assert_return (invoke "and280" (i64.const 0)) (i64.const 0))
-(assert_return (invoke "and281" (i64.const 1)) (i64.const 0))
-(assert_return (invoke "and282") (i64.const 1))
-(assert_return (invoke "and283" (i64.const 1)) (i64.const 1))
-(assert_return (invoke "and284" (i64.const 1)) (i64.const 1))
+(assert_return (invoke "rem_u268" (i64.const -5)) (i64.const 1))
+(assert_return (invoke "rem_u269" (i64.const 2)) (i64.const 1))
+(assert_return (invoke "rem_u270") (i64.const 5))
+(assert_return (invoke "rem_u271" (i64.const 5)) (i64.const 5))
+(assert_return (invoke "rem_u272" (i64.const -2)) (i64.const 5))
+(assert_return (invoke "rem_u273") (i64.const -5))
+(assert_return (invoke "rem_u274" (i64.const -5)) (i64.const -5))
+(assert_return (invoke "rem_u275" (i64.const -2)) (i64.const -5))
+(assert_return (invoke "rem_u276") (i64.const 1))
+(assert_return (invoke "rem_u277" (i64.const 7)) (i64.const 1))
+(assert_return (invoke "rem_u278" (i64.const 3)) (i64.const 1))
+(assert_return (invoke "rem_u279") (i64.const 1))
+(assert_return (invoke "rem_u280" (i64.const 11)) (i64.const 1))
+(assert_return (invoke "rem_u281" (i64.const 5)) (i64.const 1))
+(assert_return (invoke "rem_u282") (i64.const 3))
+(assert_return (invoke "rem_u283" (i64.const 17)) (i64.const 3))
+(assert_return (invoke "rem_u284" (i64.const 7)) (i64.const 3))
 (assert_return (invoke "and285") (i64.const 0))
-(assert_return (invoke "and286" (i64.const 0)) (i64.const 0))
+(assert_return (invoke "and286" (i64.const 1)) (i64.const 0))
 (assert_return (invoke "and287" (i64.const 0)) (i64.const 0))
 (assert_return (invoke "and288") (i64.const 0))
-(assert_return (invoke "and289" (i64.const 0x7fffffffffffffff)) (i64.const 0))
-(assert_return (invoke "and290" (i64.const 0x8000000000000000)) (i64.const 0))
-(assert_return (invoke "and291") (i64.const 0x7fffffffffffffff))
-(assert_return (invoke "and292" (i64.const 0x7fffffffffffffff)) (i64.const 0x7fffffffffffffff))
-(assert_return (invoke "and293" (i64.const -1)) (i64.const 0x7fffffffffffffff))
-(assert_return (invoke "and294") (i64.const 0xf0f0f0f0))
-(assert_return (invoke "and295" (i64.const 0xf0f0ffff)) (i64.const 0xf0f0f0f0))
-(assert_return (invoke "and296" (i64.const 0xfffff0f0)) (i64.const 0xf0f0f0f0))
-(assert_return (invoke "and297") (i64.const 0xffffffffffffffff))
-(assert_return (invoke "and298" (i64.const 0xffffffffffffffff)) (i64.const 0xffffffffffffffff))
-(assert_return (invoke "and299" (i64.const 0xffffffffffffffff)) (i64.const 0xffffffffffffffff))
-(assert_return (invoke "or300") (i64.const 1))
-(assert_return (invoke "or301" (i64.const 1)) (i64.const 1))
-(assert_return (invoke "or302" (i64.const 0)) (i64.const 1))
-(assert_return (invoke "or303") (i64.const 1))
-(assert_return (invoke "or304" (i64.const 0)) (i64.const 1))
-(assert_return (invoke "or305" (i64.const 1)) (i64.const 1))
-(assert_return (invoke "or306") (i64.const 1))
-(assert_return (invoke "or307" (i64.const 1)) (i64.const 1))
-(assert_return (invoke "or308" (i64.const 1)) (i64.const 1))
-(assert_return (invoke "or309") (i64.const 0))
-(assert_return (invoke "or310" (i64.const 0)) (i64.const 0))
-(assert_return (invoke "or311" (i64.const 0)) (i64.const 0))
-(assert_return (invoke "or312") (i64.const -1))
-(assert_return (invoke "or313" (i64.const 0x7fffffffffffffff)) (i64.const -1))
-(assert_return (invoke "or314" (i64.const 0x8000000000000000)) (i64.const -1))
-(assert_return (invoke "or315") (i64.const 0x8000000000000000))
-(assert_return (invoke "or316" (i64.const 0x8000000000000000)) (i64.const 0x8000000000000000))
-(assert_return (invoke "or317" (i64.const 0)) (i64.const 0x8000000000000000))
-(assert_return (invoke "or318") (i64.const 0xffffffff))
-(assert_return (invoke "or319" (i64.const 0xf0f0ffff)) (i64.const 0xffffffff))
-(assert_return (invoke "or320" (i64.const 0xfffff0f0)) (i64.const 0xffffffff))
-(assert_return (invoke "or321") (i64.const 0xffffffffffffffff))
-(assert_return (invoke "or322" (i64.const 0xffffffffffffffff)) (i64.const 0xffffffffffffffff))
-(assert_return (invoke "or323" (i64.const 0xffffffffffffffff)) (i64.const 0xffffffffffffffff))
-(assert_return (invoke "xor324") (i64.const 1))
-(assert_return (invoke "xor325" (i64.const 1)) (i64.const 1))
-(assert_return (invoke "xor326" (i64.const 0)) (i64.const 1))
-(assert_return (invoke "xor327") (i64.const 1))
-(assert_return (invoke "xor328" (i64.const 0)) (i64.const 1))
-(assert_return (invoke "xor329" (i64.const 1)) (i64.const 1))
-(assert_return (invoke "xor330") (i64.const 0))
-(assert_return (invoke "xor331" (i64.const 1)) (i64.const 0))
-(assert_return (invoke "xor332" (i64.const 1)) (i64.const 0))
-(assert_return (invoke "xor333") (i64.const 0))
-(assert_return (invoke "xor334" (i64.const 0)) (i64.const 0))
-(assert_return (invoke "xor335" (i64.const 0)) (i64.const 0))
-(assert_return (invoke "xor336") (i64.const -1))
-(assert_return (invoke "xor337" (i64.const 0x7fffffffffffffff)) (i64.const -1))
-(assert_return (invoke "xor338" (i64.const 0x8000000000000000)) (i64.const -1))
-(assert_return (invoke "xor339") (i64.const 0x8000000000000000))
-(assert_return (invoke "xor340" (i64.const 0x8000000000000000)) (i64.const 0x8000000000000000))
-(assert_return (invoke "xor341" (i64.const 0)) (i64.const 0x8000000000000000))
-(assert_return (invoke "xor342") (i64.const 0x7fffffffffffffff))
-(assert_return (invoke "xor343" (i64.const -1)) (i64.const 0x7fffffffffffffff))
-(assert_return (invoke "xor344" (i64.const 0x8000000000000000)) (i64.const 0x7fffffffffffffff))
-(assert_return (invoke "xor345") (i64.const 0x8000000000000000))
-(assert_return (invoke "xor346" (i64.const -1)) (i64.const 0x8000000000000000))
-(assert_return (invoke "xor347" (i64.const 0x7fffffffffffffff)) (i64.const 0x8000000000000000))
-(assert_return (invoke "xor348") (i64.const 0x0f0f0f0f))
-(assert_return (invoke "xor349" (i64.const 0xf0f0ffff)) (i64.const 0x0f0f0f0f))
-(assert_return (invoke "xor350" (i64.const 0xfffff0f0)) (i64.const 0x0f0f0f0f))
-(assert_return (invoke "xor351") (i64.const 0))
-(assert_return (invoke "xor352" (i64.const 0xffffffffffffffff)) (i64.const 0))
-(assert_return (invoke "xor353" (i64.const 0xffffffffffffffff)) (i64.const 0))
-(assert_return (invoke "shl354") (i64.const 2))
-(assert_return (invoke "shl355" (i64.const 1)) (i64.const 2))
-(assert_return (invoke "shl356" (i64.const 1)) (i64.const 2))
-(assert_return (invoke "shl357") (i64.const 1))
-(assert_return (invoke "shl358" (i64.const 1)) (i64.const 1))
-(assert_return (invoke "shl359" (i64.const 0)) (i64.const 1))
-(assert_return (invoke "shl360") (i64.const 0xfffffffffffffffe))
-(assert_return (invoke "shl361" (i64.const 0x7fffffffffffffff)) (i64.const 0xfffffffffffffffe))
-(assert_return (invoke "shl362" (i64.const 1)) (i64.const 0xfffffffffffffffe))
-(assert_return (invoke "shl363") (i64.const 0xfffffffffffffffe))
-(assert_return (invoke "shl364" (i64.const 0xffffffffffffffff)) (i64.const 0xfffffffffffffffe))
-(assert_return (invoke "shl365" (i64.const 1)) (i64.const 0xfffffffffffffffe))
-(assert_return (invoke "shl366") (i64.const 0))
-(assert_return (invoke "shl367" (i64.const 0x8000000000000000)) (i64.const 0))
-(assert_return (invoke "shl368" (i64.const 1)) (i64.const 0))
-(assert_return (invoke "shl369") (i64.const 0x8000000000000000))
-(assert_return (invoke "shl370" (i64.const 0x4000000000000000)) (i64.const 0x8000000000000000))
-(assert_return (invoke "shl371" (i64.const 1)) (i64.const 0x8000000000000000))
-(assert_return (invoke "shl372") (i64.const 0x8000000000000000))
-(assert_return (invoke "shl373" (i64.const 1)) (i64.const 0x8000000000000000))
-(assert_return (invoke "shl374" (i64.const 63)) (i64.const 0x8000000000000000))
-(assert_return (invoke "shl375") (i64.const 1))
-(assert_return (invoke "shl376" (i64.const 1)) (i64.const 1))
-(assert_return (invoke "shl377" (i64.const 64)) (i64.const 1))
-(assert_return (invoke "shl378") (i64.const 2))
-(assert_return (invoke "shl379" (i64.const 1)) (i64.const 2))
-(assert_return (invoke "shl380" (i64.const 65)) (i64.const 2))
+(assert_return (invoke "and289" (i64.const 0)) (i64.const 0))
+(assert_return (invoke "and290" (i64.const 1)) (i64.const 0))
+(assert_return (invoke "and291") (i64.const 1))
+(assert_return (invoke "and292" (i64.const 1)) (i64.const 1))
+(assert_return (invoke "and293" (i64.const 1)) (i64.const 1))
+(assert_return (invoke "and294") (i64.const 0))
+(assert_return (invoke "and295" (i64.const 0)) (i64.const 0))
+(assert_return (invoke "and296" (i64.const 0)) (i64.const 0))
+(assert_return (invoke "and297") (i64.const 0))
+(assert_return (invoke "and298" (i64.const 0x7fffffffffffffff)) (i64.const 0))
+(assert_return (invoke "and299" (i64.const 0x8000000000000000)) (i64.const 0))
+(assert_return (invoke "and300") (i64.const 0x7fffffffffffffff))
+(assert_return (invoke "and301" (i64.const 0x7fffffffffffffff)) (i64.const 0x7fffffffffffffff))
+(assert_return (invoke "and302" (i64.const -1)) (i64.const 0x7fffffffffffffff))
+(assert_return (invoke "and303") (i64.const 0xf0f0f0f0))
+(assert_return (invoke "and304" (i64.const 0xf0f0ffff)) (i64.const 0xf0f0f0f0))
+(assert_return (invoke "and305" (i64.const 0xfffff0f0)) (i64.const 0xf0f0f0f0))
+(assert_return (invoke "and306") (i64.const 0xffffffffffffffff))
+(assert_return (invoke "and307" (i64.const 0xffffffffffffffff)) (i64.const 0xffffffffffffffff))
+(assert_return (invoke "and308" (i64.const 0xffffffffffffffff)) (i64.const 0xffffffffffffffff))
+(assert_return (invoke "or309") (i64.const 1))
+(assert_return (invoke "or310" (i64.const 1)) (i64.const 1))
+(assert_return (invoke "or311" (i64.const 0)) (i64.const 1))
+(assert_return (invoke "or312") (i64.const 1))
+(assert_return (invoke "or313" (i64.const 0)) (i64.const 1))
+(assert_return (invoke "or314" (i64.const 1)) (i64.const 1))
+(assert_return (invoke "or315") (i64.const 1))
+(assert_return (invoke "or316" (i64.const 1)) (i64.const 1))
+(assert_return (invoke "or317" (i64.const 1)) (i64.const 1))
+(assert_return (invoke "or318") (i64.const 0))
+(assert_return (invoke "or319" (i64.const 0)) (i64.const 0))
+(assert_return (invoke "or320" (i64.const 0)) (i64.const 0))
+(assert_return (invoke "or321") (i64.const -1))
+(assert_return (invoke "or322" (i64.const 0x7fffffffffffffff)) (i64.const -1))
+(assert_return (invoke "or323" (i64.const 0x8000000000000000)) (i64.const -1))
+(assert_return (invoke "or324") (i64.const 0x8000000000000000))
+(assert_return (invoke "or325" (i64.const 0x8000000000000000)) (i64.const 0x8000000000000000))
+(assert_return (invoke "or326" (i64.const 0)) (i64.const 0x8000000000000000))
+(assert_return (invoke "or327") (i64.const 0xffffffff))
+(assert_return (invoke "or328" (i64.const 0xf0f0ffff)) (i64.const 0xffffffff))
+(assert_return (invoke "or329" (i64.const 0xfffff0f0)) (i64.const 0xffffffff))
+(assert_return (invoke "or330") (i64.const 0xffffffffffffffff))
+(assert_return (invoke "or331" (i64.const 0xffffffffffffffff)) (i64.const 0xffffffffffffffff))
+(assert_return (invoke "or332" (i64.const 0xffffffffffffffff)) (i64.const 0xffffffffffffffff))
+(assert_return (invoke "xor333") (i64.const 1))
+(assert_return (invoke "xor334" (i64.const 1)) (i64.const 1))
+(assert_return (invoke "xor335" (i64.const 0)) (i64.const 1))
+(assert_return (invoke "xor336") (i64.const 1))
+(assert_return (invoke "xor337" (i64.const 0)) (i64.const 1))
+(assert_return (invoke "xor338" (i64.const 1)) (i64.const 1))
+(assert_return (invoke "xor339") (i64.const 0))
+(assert_return (invoke "xor340" (i64.const 1)) (i64.const 0))
+(assert_return (invoke "xor341" (i64.const 1)) (i64.const 0))
+(assert_return (invoke "xor342") (i64.const 0))
+(assert_return (invoke "xor343" (i64.const 0)) (i64.const 0))
+(assert_return (invoke "xor344" (i64.const 0)) (i64.const 0))
+(assert_return (invoke "xor345") (i64.const -1))
+(assert_return (invoke "xor346" (i64.const 0x7fffffffffffffff)) (i64.const -1))
+(assert_return (invoke "xor347" (i64.const 0x8000000000000000)) (i64.const -1))
+(assert_return (invoke "xor348") (i64.const 0x8000000000000000))
+(assert_return (invoke "xor349" (i64.const 0x8000000000000000)) (i64.const 0x8000000000000000))
+(assert_return (invoke "xor350" (i64.const 0)) (i64.const 0x8000000000000000))
+(assert_return (invoke "xor351") (i64.const 0x7fffffffffffffff))
+(assert_return (invoke "xor352" (i64.const -1)) (i64.const 0x7fffffffffffffff))
+(assert_return (invoke "xor353" (i64.const 0x8000000000000000)) (i64.const 0x7fffffffffffffff))
+(assert_return (invoke "xor354") (i64.const 0x8000000000000000))
+(assert_return (invoke "xor355" (i64.const -1)) (i64.const 0x8000000000000000))
+(assert_return (invoke "xor356" (i64.const 0x7fffffffffffffff)) (i64.const 0x8000000000000000))
+(assert_return (invoke "xor357") (i64.const 0x0f0f0f0f))
+(assert_return (invoke "xor358" (i64.const 0xf0f0ffff)) (i64.const 0x0f0f0f0f))
+(assert_return (invoke "xor359" (i64.const 0xfffff0f0)) (i64.const 0x0f0f0f0f))
+(assert_return (invoke "xor360") (i64.const 0))
+(assert_return (invoke "xor361" (i64.const 0xffffffffffffffff)) (i64.const 0))
+(assert_return (invoke "xor362" (i64.const 0xffffffffffffffff)) (i64.const 0))
+(assert_return (invoke "shl363") (i64.const 2))
+(assert_return (invoke "shl364" (i64.const 1)) (i64.const 2))
+(assert_return (invoke "shl365" (i64.const 1)) (i64.const 2))
+(assert_return (invoke "shl366") (i64.const 1))
+(assert_return (invoke "shl367" (i64.const 1)) (i64.const 1))
+(assert_return (invoke "shl368" (i64.const 0)) (i64.const 1))
+(assert_return (invoke "shl369") (i64.const 0xfffffffffffffffe))
+(assert_return (invoke "shl370" (i64.const 0x7fffffffffffffff)) (i64.const 0xfffffffffffffffe))
+(assert_return (invoke "shl371" (i64.const 1)) (i64.const 0xfffffffffffffffe))
+(assert_return (invoke "shl372") (i64.const 0xfffffffffffffffe))
+(assert_return (invoke "shl373" (i64.const 0xffffffffffffffff)) (i64.const 0xfffffffffffffffe))
+(assert_return (invoke "shl374" (i64.const 1)) (i64.const 0xfffffffffffffffe))
+(assert_return (invoke "shl375") (i64.const 0))
+(assert_return (invoke "shl376" (i64.const 0x8000000000000000)) (i64.const 0))
+(assert_return (invoke "shl377" (i64.const 1)) (i64.const 0))
+(assert_return (invoke "shl378") (i64.const 0x8000000000000000))
+(assert_return (invoke "shl379" (i64.const 0x4000000000000000)) (i64.const 0x8000000000000000))
+(assert_return (invoke "shl380" (i64.const 1)) (i64.const 0x8000000000000000))
 (assert_return (invoke "shl381") (i64.const 0x8000000000000000))
 (assert_return (invoke "shl382" (i64.const 1)) (i64.const 0x8000000000000000))
-(assert_return (invoke "shl383" (i64.const -1)) (i64.const 0x8000000000000000))
-(assert_return (invoke "shl384") (i64.const 0x8000000000000000))
-(assert_return (invoke "shl385" (i64.const 1)) (i64.const 0x8000000000000000))
-(assert_return (invoke "shl386" (i64.const 0x7fffffffffffffff)) (i64.const 0x8000000000000000))
-(assert_return (invoke "shr_s387") (i64.const 0))
-(assert_return (invoke "shr_s388" (i64.const 1)) (i64.const 0))
-(assert_return (invoke "shr_s389" (i64.const 1)) (i64.const 0))
-(assert_return (invoke "shr_s390") (i64.const 1))
-(assert_return (invoke "shr_s391" (i64.const 1)) (i64.const 1))
-(assert_return (invoke "shr_s392" (i64.const 0)) (i64.const 1))
-(assert_return (invoke "shr_s393") (i64.const -1))
-(assert_return (invoke "shr_s394" (i64.const -1)) (i64.const -1))
-(assert_return (invoke "shr_s395" (i64.const 1)) (i64.const -1))
-(assert_return (invoke "shr_s396") (i64.const 0x3fffffffffffffff))
-(assert_return (invoke "shr_s397" (i64.const 0x7fffffffffffffff)) (i64.const 0x3fffffffffffffff))
-(assert_return (invoke "shr_s398" (i64.const 1)) (i64.const 0x3fffffffffffffff))
-(assert_return (invoke "shr_s399") (i64.const 0xc000000000000000))
-(assert_return (invoke "shr_s400" (i64.const 0x8000000000000000)) (i64.const 0xc000000000000000))
-(assert_return (invoke "shr_s401" (i64.const 1)) (i64.const 0xc000000000000000))
-(assert_return (invoke "shr_s402") (i64.const 0x2000000000000000))
-(assert_return (invoke "shr_s403" (i64.const 0x4000000000000000)) (i64.const 0x2000000000000000))
-(assert_return (invoke "shr_s404" (i64.const 1)) (i64.const 0x2000000000000000))
-(assert_return (invoke "shr_s405") (i64.const 1))
-(assert_return (invoke "shr_s406" (i64.const 1)) (i64.const 1))
-(assert_return (invoke "shr_s407" (i64.const 64)) (i64.const 1))
-(assert_return (invoke "shr_s408") (i64.const 0))
-(assert_return (invoke "shr_s409" (i64.const 1)) (i64.const 0))
-(assert_return (invoke "shr_s410" (i64.const 65)) (i64.const 0))
-(assert_return (invoke "shr_s411") (i64.const 0))
-(assert_return (invoke "shr_s412" (i64.const 1)) (i64.const 0))
-(assert_return (invoke "shr_s413" (i64.const -1)) (i64.const 0))
-(assert_return (invoke "shr_s414") (i64.const 0))
-(assert_return (invoke "shr_s415" (i64.const 1)) (i64.const 0))
-(assert_return (invoke "shr_s416" (i64.const 0x7fffffffffffffff)) (i64.const 0))
-(assert_return (invoke "shr_s417") (i64.const 1))
-(assert_return (invoke "shr_s418" (i64.const 1)) (i64.const 1))
-(assert_return (invoke "shr_s419" (i64.const 0x8000000000000000)) (i64.const 1))
-(assert_return (invoke "shr_s420") (i64.const -1))
-(assert_return (invoke "shr_s421" (i64.const 0x8000000000000000)) (i64.const -1))
-(assert_return (invoke "shr_s422" (i64.const 63)) (i64.const -1))
-(assert_return (invoke "shr_s423") (i64.const -1))
-(assert_return (invoke "shr_s424" (i64.const -1)) (i64.const -1))
-(assert_return (invoke "shr_s425" (i64.const 64)) (i64.const -1))
-(assert_return (invoke "shr_s426") (i64.const -1))
-(assert_return (invoke "shr_s427" (i64.const -1)) (i64.const -1))
-(assert_return (invoke "shr_s428" (i64.const 65)) (i64.const -1))
+(assert_return (invoke "shl383" (i64.const 63)) (i64.const 0x8000000000000000))
+(assert_return (invoke "shl384") (i64.const 1))
+(assert_return (invoke "shl385" (i64.const 1)) (i64.const 1))
+(assert_return (invoke "shl386" (i64.const 64)) (i64.const 1))
+(assert_return (invoke "shl387") (i64.const 2))
+(assert_return (invoke "shl388" (i64.const 1)) (i64.const 2))
+(assert_return (invoke "shl389" (i64.const 65)) (i64.const 2))
+(assert_return (invoke "shl390") (i64.const 0x8000000000000000))
+(assert_return (invoke "shl391" (i64.const 1)) (i64.const 0x8000000000000000))
+(assert_return (invoke "shl392" (i64.const -1)) (i64.const 0x8000000000000000))
+(assert_return (invoke "shl393") (i64.const 0x8000000000000000))
+(assert_return (invoke "shl394" (i64.const 1)) (i64.const 0x8000000000000000))
+(assert_return (invoke "shl395" (i64.const 0x7fffffffffffffff)) (i64.const 0x8000000000000000))
+(assert_return (invoke "shr_s396") (i64.const 0))
+(assert_return (invoke "shr_s397" (i64.const 1)) (i64.const 0))
+(assert_return (invoke "shr_s398" (i64.const 1)) (i64.const 0))
+(assert_return (invoke "shr_s399") (i64.const 1))
+(assert_return (invoke "shr_s400" (i64.const 1)) (i64.const 1))
+(assert_return (invoke "shr_s401" (i64.const 0)) (i64.const 1))
+(assert_return (invoke "shr_s402") (i64.const -1))
+(assert_return (invoke "shr_s403" (i64.const -1)) (i64.const -1))
+(assert_return (invoke "shr_s404" (i64.const 1)) (i64.const -1))
+(assert_return (invoke "shr_s405") (i64.const 0x3fffffffffffffff))
+(assert_return (invoke "shr_s406" (i64.const 0x7fffffffffffffff)) (i64.const 0x3fffffffffffffff))
+(assert_return (invoke "shr_s407" (i64.const 1)) (i64.const 0x3fffffffffffffff))
+(assert_return (invoke "shr_s408") (i64.const 0xc000000000000000))
+(assert_return (invoke "shr_s409" (i64.const 0x8000000000000000)) (i64.const 0xc000000000000000))
+(assert_return (invoke "shr_s410" (i64.const 1)) (i64.const 0xc000000000000000))
+(assert_return (invoke "shr_s411") (i64.const 0x2000000000000000))
+(assert_return (invoke "shr_s412" (i64.const 0x4000000000000000)) (i64.const 0x2000000000000000))
+(assert_return (invoke "shr_s413" (i64.const 1)) (i64.const 0x2000000000000000))
+(assert_return (invoke "shr_s414") (i64.const 1))
+(assert_return (invoke "shr_s415" (i64.const 1)) (i64.const 1))
+(assert_return (invoke "shr_s416" (i64.const 64)) (i64.const 1))
+(assert_return (invoke "shr_s417") (i64.const 0))
+(assert_return (invoke "shr_s418" (i64.const 1)) (i64.const 0))
+(assert_return (invoke "shr_s419" (i64.const 65)) (i64.const 0))
+(assert_return (invoke "shr_s420") (i64.const 0))
+(assert_return (invoke "shr_s421" (i64.const 1)) (i64.const 0))
+(assert_return (invoke "shr_s422" (i64.const -1)) (i64.const 0))
+(assert_return (invoke "shr_s423") (i64.const 0))
+(assert_return (invoke "shr_s424" (i64.const 1)) (i64.const 0))
+(assert_return (invoke "shr_s425" (i64.const 0x7fffffffffffffff)) (i64.const 0))
+(assert_return (invoke "shr_s426") (i64.const 1))
+(assert_return (invoke "shr_s427" (i64.const 1)) (i64.const 1))
+(assert_return (invoke "shr_s428" (i64.const 0x8000000000000000)) (i64.const 1))
 (assert_return (invoke "shr_s429") (i64.const -1))
-(assert_return (invoke "shr_s430" (i64.const -1)) (i64.const -1))
-(assert_return (invoke "shr_s431" (i64.const -1)) (i64.const -1))
+(assert_return (invoke "shr_s430" (i64.const 0x8000000000000000)) (i64.const -1))
+(assert_return (invoke "shr_s431" (i64.const 63)) (i64.const -1))
 (assert_return (invoke "shr_s432") (i64.const -1))
 (assert_return (invoke "shr_s433" (i64.const -1)) (i64.const -1))
-(assert_return (invoke "shr_s434" (i64.const 0x7fffffffffffffff)) (i64.const -1))
+(assert_return (invoke "shr_s434" (i64.const 64)) (i64.const -1))
 (assert_return (invoke "shr_s435") (i64.const -1))
 (assert_return (invoke "shr_s436" (i64.const -1)) (i64.const -1))
-(assert_return (invoke "shr_s437" (i64.const 0x8000000000000000)) (i64.const -1))
-(assert_return (invoke "shr_u438") (i64.const 0))
-(assert_return (invoke "shr_u439" (i64.const 1)) (i64.const 0))
-(assert_return (invoke "shr_u440" (i64.const 1)) (i64.const 0))
-(assert_return (invoke "shr_u441") (i64.const 1))
-(assert_return (invoke "shr_u442" (i64.const 1)) (i64.const 1))
-(assert_return (invoke "shr_u443" (i64.const 0)) (i64.const 1))
-(assert_return (invoke "shr_u444") (i64.const 0x7fffffffffffffff))
-(assert_return (invoke "shr_u445" (i64.const -1)) (i64.const 0x7fffffffffffffff))
-(assert_return (invoke "shr_u446" (i64.const 1)) (i64.const 0x7fffffffffffffff))
-(assert_return (invoke "shr_u447") (i64.const 0x3fffffffffffffff))
-(assert_return (invoke "shr_u448" (i64.const 0x7fffffffffffffff)) (i64.const 0x3fffffffffffffff))
-(assert_return (invoke "shr_u449" (i64.const 1)) (i64.const 0x3fffffffffffffff))
-(assert_return (invoke "shr_u450") (i64.const 0x4000000000000000))
-(assert_return (invoke "shr_u451" (i64.const 0x8000000000000000)) (i64.const 0x4000000000000000))
-(assert_return (invoke "shr_u452" (i64.const 1)) (i64.const 0x4000000000000000))
-(assert_return (invoke "shr_u453") (i64.const 0x2000000000000000))
-(assert_return (invoke "shr_u454" (i64.const 0x4000000000000000)) (i64.const 0x2000000000000000))
-(assert_return (invoke "shr_u455" (i64.const 1)) (i64.const 0x2000000000000000))
-(assert_return (invoke "shr_u456") (i64.const 1))
-(assert_return (invoke "shr_u457" (i64.const 1)) (i64.const 1))
-(assert_return (invoke "shr_u458" (i64.const 64)) (i64.const 1))
-(assert_return (invoke "shr_u459") (i64.const 0))
-(assert_return (invoke "shr_u460" (i64.const 1)) (i64.const 0))
-(assert_return (invoke "shr_u461" (i64.const 65)) (i64.const 0))
-(assert_return (invoke "shr_u462") (i64.const 0))
-(assert_return (invoke "shr_u463" (i64.const 1)) (i64.const 0))
-(assert_return (invoke "shr_u464" (i64.const -1)) (i64.const 0))
-(assert_return (invoke "shr_u465") (i64.const 0))
-(assert_return (invoke "shr_u466" (i64.const 1)) (i64.const 0))
-(assert_return (invoke "shr_u467" (i64.const 0x7fffffffffffffff)) (i64.const 0))
-(assert_return (invoke "shr_u468") (i64.const 1))
-(assert_return (invoke "shr_u469" (i64.const 1)) (i64.const 1))
-(assert_return (invoke "shr_u470" (i64.const 0x8000000000000000)) (i64.const 1))
-(assert_return (invoke "shr_u471") (i64.const 1))
-(assert_return (invoke "shr_u472" (i64.const 0x8000000000000000)) (i64.const 1))
-(assert_return (invoke "shr_u473" (i64.const 63)) (i64.const 1))
-(assert_return (invoke "shr_u474") (i64.const -1))
-(assert_return (invoke "shr_u475" (i64.const -1)) (i64.const -1))
-(assert_return (invoke "shr_u476" (i64.const 64)) (i64.const -1))
-(assert_return (invoke "shr_u477") (i64.const 0x7fffffffffffffff))
-(assert_return (invoke "shr_u478" (i64.const -1)) (i64.const 0x7fffffffffffffff))
-(assert_return (invoke "shr_u479" (i64.const 65)) (i64.const 0x7fffffffffffffff))
+(assert_return (invoke "shr_s437" (i64.const 65)) (i64.const -1))
+(assert_return (invoke "shr_s438") (i64.const -1))
+(assert_return (invoke "shr_s439" (i64.const -1)) (i64.const -1))
+(assert_return (invoke "shr_s440" (i64.const -1)) (i64.const -1))
+(assert_return (invoke "shr_s441") (i64.const -1))
+(assert_return (invoke "shr_s442" (i64.const -1)) (i64.const -1))
+(assert_return (invoke "shr_s443" (i64.const 0x7fffffffffffffff)) (i64.const -1))
+(assert_return (invoke "shr_s444") (i64.const -1))
+(assert_return (invoke "shr_s445" (i64.const -1)) (i64.const -1))
+(assert_return (invoke "shr_s446" (i64.const 0x8000000000000000)) (i64.const -1))
+(assert_return (invoke "shr_u447") (i64.const 0))
+(assert_return (invoke "shr_u448" (i64.const 1)) (i64.const 0))
+(assert_return (invoke "shr_u449" (i64.const 1)) (i64.const 0))
+(assert_return (invoke "shr_u450") (i64.const 1))
+(assert_return (invoke "shr_u451" (i64.const 1)) (i64.const 1))
+(assert_return (invoke "shr_u452" (i64.const 0)) (i64.const 1))
+(assert_return (invoke "shr_u453") (i64.const 0x7fffffffffffffff))
+(assert_return (invoke "shr_u454" (i64.const -1)) (i64.const 0x7fffffffffffffff))
+(assert_return (invoke "shr_u455" (i64.const 1)) (i64.const 0x7fffffffffffffff))
+(assert_return (invoke "shr_u456") (i64.const 0x3fffffffffffffff))
+(assert_return (invoke "shr_u457" (i64.const 0x7fffffffffffffff)) (i64.const 0x3fffffffffffffff))
+(assert_return (invoke "shr_u458" (i64.const 1)) (i64.const 0x3fffffffffffffff))
+(assert_return (invoke "shr_u459") (i64.const 0x4000000000000000))
+(assert_return (invoke "shr_u460" (i64.const 0x8000000000000000)) (i64.const 0x4000000000000000))
+(assert_return (invoke "shr_u461" (i64.const 1)) (i64.const 0x4000000000000000))
+(assert_return (invoke "shr_u462") (i64.const 0x2000000000000000))
+(assert_return (invoke "shr_u463" (i64.const 0x4000000000000000)) (i64.const 0x2000000000000000))
+(assert_return (invoke "shr_u464" (i64.const 1)) (i64.const 0x2000000000000000))
+(assert_return (invoke "shr_u465") (i64.const 1))
+(assert_return (invoke "shr_u466" (i64.const 1)) (i64.const 1))
+(assert_return (invoke "shr_u467" (i64.const 64)) (i64.const 1))
+(assert_return (invoke "shr_u468") (i64.const 0))
+(assert_return (invoke "shr_u469" (i64.const 1)) (i64.const 0))
+(assert_return (invoke "shr_u470" (i64.const 65)) (i64.const 0))
+(assert_return (invoke "shr_u471") (i64.const 0))
+(assert_return (invoke "shr_u472" (i64.const 1)) (i64.const 0))
+(assert_return (invoke "shr_u473" (i64.const -1)) (i64.const 0))
+(assert_return (invoke "shr_u474") (i64.const 0))
+(assert_return (invoke "shr_u475" (i64.const 1)) (i64.const 0))
+(assert_return (invoke "shr_u476" (i64.const 0x7fffffffffffffff)) (i64.const 0))
+(assert_return (invoke "shr_u477") (i64.const 1))
+(assert_return (invoke "shr_u478" (i64.const 1)) (i64.const 1))
+(assert_return (invoke "shr_u479" (i64.const 0x8000000000000000)) (i64.const 1))
 (assert_return (invoke "shr_u480") (i64.const 1))
-(assert_return (invoke "shr_u481" (i64.const -1)) (i64.const 1))
-(assert_return (invoke "shr_u482" (i64.const -1)) (i64.const 1))
-(assert_return (invoke "shr_u483") (i64.const 1))
-(assert_return (invoke "shr_u484" (i64.const -1)) (i64.const 1))
-(assert_return (invoke "shr_u485" (i64.const 0x7fffffffffffffff)) (i64.const 1))
-(assert_return (invoke "shr_u486") (i64.const -1))
-(assert_return (invoke "shr_u487" (i64.const -1)) (i64.const -1))
-(assert_return (invoke "shr_u488" (i64.const 0x8000000000000000)) (i64.const -1))
-(assert_return (invoke "rotl489") (i64.const 2))
-(assert_return (invoke "rotl490" (i64.const 1)) (i64.const 2))
-(assert_return (invoke "rotl491" (i64.const 1)) (i64.const 2))
-(assert_return (invoke "rotl492") (i64.const 1))
-(assert_return (invoke "rotl493" (i64.const 1)) (i64.const 1))
-(assert_return (invoke "rotl494" (i64.const 0)) (i64.const 1))
-(assert_return (invoke "rotl495") (i64.const -1))
-(assert_return (invoke "rotl496" (i64.const -1)) (i64.const -1))
-(assert_return (invoke "rotl497" (i64.const 1)) (i64.const -1))
-(assert_return (invoke "rotl498") (i64.const 0x55e891a77ab3c04e))
-(assert_return (invoke "rotl499" (i64.const 0xabd1234ef567809c)) (i64.const 0x55e891a77ab3c04e))
-(assert_return (invoke "rotl500" (i64.const 63)) (i64.const 0x55e891a77ab3c04e))
-(assert_return (invoke "rotl501") (i64.const 0x55e891a77ab3c04e))
-(assert_return (invoke "rotl502" (i64.const 0xabd1234ef567809c)) (i64.const 0x55e891a77ab3c04e))
-(assert_return (invoke "rotl503" (i64.const 0x800000000000003f)) (i64.const 0x55e891a77ab3c04e))
-(assert_return (invoke "rotl504") (i64.const 0x8000000000000000))
-(assert_return (invoke "rotl505" (i64.const 1)) (i64.const 0x8000000000000000))
-(assert_return (invoke "rotl506" (i64.const 63)) (i64.const 0x8000000000000000))
+(assert_return (invoke "shr_u481" (i64.const 0x8000000000000000)) (i64.const 1))
+(assert_return (invoke "shr_u482" (i64.const 63)) (i64.const 1))
+(assert_return (invoke "shr_u483") (i64.const -1))
+(assert_return (invoke "shr_u484" (i64.const -1)) (i64.const -1))
+(assert_return (invoke "shr_u485" (i64.const 64)) (i64.const -1))
+(assert_return (invoke "shr_u486") (i64.const 0x7fffffffffffffff))
+(assert_return (invoke "shr_u487" (i64.const -1)) (i64.const 0x7fffffffffffffff))
+(assert_return (invoke "shr_u488" (i64.const 65)) (i64.const 0x7fffffffffffffff))
+(assert_return (invoke "shr_u489") (i64.const 1))
+(assert_return (invoke "shr_u490" (i64.const -1)) (i64.const 1))
+(assert_return (invoke "shr_u491" (i64.const -1)) (i64.const 1))
+(assert_return (invoke "shr_u492") (i64.const 1))
+(assert_return (invoke "shr_u493" (i64.const -1)) (i64.const 1))
+(assert_return (invoke "shr_u494" (i64.const 0x7fffffffffffffff)) (i64.const 1))
+(assert_return (invoke "shr_u495") (i64.const -1))
+(assert_return (invoke "shr_u496" (i64.const -1)) (i64.const -1))
+(assert_return (invoke "shr_u497" (i64.const 0x8000000000000000)) (i64.const -1))
+(assert_return (invoke "rotl498") (i64.const 2))
+(assert_return (invoke "rotl499" (i64.const 1)) (i64.const 2))
+(assert_return (invoke "rotl500" (i64.const 1)) (i64.const 2))
+(assert_return (invoke "rotl501") (i64.const 1))
+(assert_return (invoke "rotl502" (i64.const 1)) (i64.const 1))
+(assert_return (invoke "rotl503" (i64.const 0)) (i64.const 1))
+(assert_return (invoke "rotl504") (i64.const -1))
+(assert_return (invoke "rotl505" (i64.const -1)) (i64.const -1))
+(assert_return (invoke "rotl506" (i64.const 1)) (i64.const -1))
 (assert_return (invoke "rotl507") (i64.const 1))
-(assert_return (invoke "rotl508" (i64.const 0x8000000000000000)) (i64.const 1))
-(assert_return (invoke "rotl509" (i64.const 1)) (i64.const 1))
-(assert_return (invoke "rotr510") (i64.const 0x8000000000000000))
-(assert_return (invoke "rotr511" (i64.const 1)) (i64.const 0x8000000000000000))
-(assert_return (invoke "rotr512" (i64.const 1)) (i64.const 0x8000000000000000))
-(assert_return (invoke "rotr513") (i64.const 1))
-(assert_return (invoke "rotr514" (i64.const 1)) (i64.const 1))
-(assert_return (invoke "rotr515" (i64.const 0)) (i64.const 1))
-(assert_return (invoke "rotr516") (i64.const -1))
-(assert_return (invoke "rotr517" (i64.const -1)) (i64.const -1))
-(assert_return (invoke "rotr518" (i64.const 1)) (i64.const -1))
-(assert_return (invoke "rotr519") (i64.const 0x6891a77ab3c04d5e))
-(assert_return (invoke "rotr520" (i64.const 0xabcd1234ef567809)) (i64.const 0x6891a77ab3c04d5e))
-(assert_return (invoke "rotr521" (i64.const 53)) (i64.const 0x6891a77ab3c04d5e))
-(assert_return (invoke "rotr522") (i64.const 0x6891a77ab3c04d5e))
-(assert_return (invoke "rotr523" (i64.const 0xabcd1234ef567809)) (i64.const 0x6891a77ab3c04d5e))
-(assert_return (invoke "rotr524" (i64.const 0x35)) (i64.const 0x6891a77ab3c04d5e))
-(assert_return (invoke "rotr525") (i64.const 0x6891a77ab3c04d5e))
-(assert_return (invoke "rotr526" (i64.const 0xabcd1234ef567809)) (i64.const 0x6891a77ab3c04d5e))
-(assert_return (invoke "rotr527" (i64.const 0xf5)) (i64.const 0x6891a77ab3c04d5e))
-(assert_return (invoke "rotr528") (i64.const 0x8000000000000000))
-(assert_return (invoke "rotr529" (i64.const 1)) (i64.const 0x8000000000000000))
-(assert_return (invoke "rotr530" (i64.const 1)) (i64.const 0x8000000000000000))
-(assert_return (invoke "rotr531") (i64.const 1))
-(assert_return (invoke "rotr532" (i64.const 0x8000000000000000)) (i64.const 1))
-(assert_return (invoke "rotr533" (i64.const 63)) (i64.const 1))
-(assert_return (invoke "clz534") (i64.const 0))
-(assert_return (invoke "clz535") (i64.const 64))
-(assert_return (invoke "clz536") (i64.const 48))
-(assert_return (invoke "clz537") (i64.const 56))
-(assert_return (invoke "clz538") (i64.const 0))
-(assert_return (invoke "clz539") (i64.const 63))
-(assert_return (invoke "clz540") (i64.const 62))
-(assert_return (invoke "clz541") (i64.const 1))
-(assert_return (invoke "ctz542") (i64.const 0))
-(assert_return (invoke "ctz543") (i64.const 64))
-(assert_return (invoke "ctz544") (i64.const 15))
-(assert_return (invoke "ctz545") (i64.const 16))
-(assert_return (invoke "ctz546") (i64.const 63))
-(assert_return (invoke "ctz547") (i64.const 0))
-(assert_return (invoke "popcnt548") (i64.const 64))
-(assert_return (invoke "popcnt549") (i64.const 0))
-(assert_return (invoke "popcnt550") (i64.const 1))
-(assert_return (invoke "popcnt551") (i64.const 4))
-(assert_return (invoke "popcnt552") (i64.const 63))
-(assert_return (invoke "popcnt553") (i64.const 32))
-(assert_return (invoke "popcnt554") (i64.const 32))
-(assert_return (invoke "popcnt555") (i64.const 48))
-(assert_return (invoke "eqz556") (i32.const 1))
-(assert_return (invoke "eqz557") (i32.const 0))
-(assert_return (invoke "eqz558") (i32.const 0))
-(assert_return (invoke "eqz559") (i32.const 0))
-(assert_return (invoke "eq560") (i32.const 1))
-(assert_return (invoke "eq561" (i64.const 0)) (i32.const 1))
-(assert_return (invoke "eq562" (i64.const 0)) (i32.const 1))
-(assert_return (invoke "eq563") (i32.const 1))
-(assert_return (invoke "eq564" (i64.const 1)) (i32.const 1))
-(assert_return (invoke "eq565" (i64.const 1)) (i32.const 1))
-(assert_return (invoke "eq566") (i32.const 0))
-(assert_return (invoke "eq567" (i64.const -1)) (i32.const 0))
-(assert_return (invoke "eq568" (i64.const 1)) (i32.const 0))
-(assert_return (invoke "eq569") (i32.const 1))
-(assert_return (invoke "eq570" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "eq571" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "eq572") (i32.const 1))
-(assert_return (invoke "eq573" (i64.const 0x7fffffffffffffff)) (i32.const 1))
-(assert_return (invoke "eq574" (i64.const 0x7fffffffffffffff)) (i32.const 1))
-(assert_return (invoke "eq575") (i32.const 1))
-(assert_return (invoke "eq576" (i64.const -1)) (i32.const 1))
-(assert_return (invoke "eq577" (i64.const -1)) (i32.const 1))
-(assert_return (invoke "eq578") (i32.const 0))
-(assert_return (invoke "eq579" (i64.const 1)) (i32.const 0))
-(assert_return (invoke "eq580" (i64.const 0)) (i32.const 0))
-(assert_return (invoke "eq581") (i32.const 0))
-(assert_return (invoke "eq582" (i64.const 0)) (i32.const 0))
-(assert_return (invoke "eq583" (i64.const 1)) (i32.const 0))
-(assert_return (invoke "eq584") (i32.const 0))
-(assert_return (invoke "eq585" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "eq586" (i64.const 0)) (i32.const 0))
-(assert_return (invoke "eq587") (i32.const 0))
-(assert_return (invoke "eq588" (i64.const 0)) (i32.const 0))
-(assert_return (invoke "eq589" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "eq590") (i32.const 0))
-(assert_return (invoke "eq591" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "eq592" (i64.const -1)) (i32.const 0))
-(assert_return (invoke "eq593") (i32.const 0))
-(assert_return (invoke "eq594" (i64.const -1)) (i32.const 0))
-(assert_return (invoke "eq595" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "eq596") (i32.const 0))
-(assert_return (invoke "eq597" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "eq598" (i64.const 0x7fffffffffffffff)) (i32.const 0))
-(assert_return (invoke "eq599") (i32.const 0))
-(assert_return (invoke "eq600" (i64.const 0x7fffffffffffffff)) (i32.const 0))
-(assert_return (invoke "eq601" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "ne602") (i32.const 0))
-(assert_return (invoke "ne603" (i64.const 0)) (i32.const 0))
-(assert_return (invoke "ne604" (i64.const 0)) (i32.const 0))
-(assert_return (invoke "ne605") (i32.const 0))
-(assert_return (invoke "ne606" (i64.const 1)) (i32.const 0))
-(assert_return (invoke "ne607" (i64.const 1)) (i32.const 0))
-(assert_return (invoke "ne608") (i32.const 1))
-(assert_return (invoke "ne609" (i64.const -1)) (i32.const 1))
-(assert_return (invoke "ne610" (i64.const 1)) (i32.const 1))
-(assert_return (invoke "ne611") (i32.const 0))
-(assert_return (invoke "ne612" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "ne613" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "ne614") (i32.const 0))
-(assert_return (invoke "ne615" (i64.const 0x7fffffffffffffff)) (i32.const 0))
-(assert_return (invoke "ne616" (i64.const 0x7fffffffffffffff)) (i32.const 0))
-(assert_return (invoke "ne617") (i32.const 0))
-(assert_return (invoke "ne618" (i64.const -1)) (i32.const 0))
-(assert_return (invoke "ne619" (i64.const -1)) (i32.const 0))
-(assert_return (invoke "ne620") (i32.const 1))
-(assert_return (invoke "ne621" (i64.const 1)) (i32.const 1))
-(assert_return (invoke "ne622" (i64.const 0)) (i32.const 1))
-(assert_return (invoke "ne623") (i32.const 1))
-(assert_return (invoke "ne624" (i64.const 0)) (i32.const 1))
-(assert_return (invoke "ne625" (i64.const 1)) (i32.const 1))
-(assert_return (invoke "ne626") (i32.const 1))
-(assert_return (invoke "ne627" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "ne628" (i64.const 0)) (i32.const 1))
-(assert_return (invoke "ne629") (i32.const 1))
-(assert_return (invoke "ne630" (i64.const 0)) (i32.const 1))
-(assert_return (invoke "ne631" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "ne632") (i32.const 1))
-(assert_return (invoke "ne633" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "ne634" (i64.const -1)) (i32.const 1))
-(assert_return (invoke "ne635") (i32.const 1))
-(assert_return (invoke "ne636" (i64.const -1)) (i32.const 1))
-(assert_return (invoke "ne637" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "ne638") (i32.const 1))
-(assert_return (invoke "ne639" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "ne640" (i64.const 0x7fffffffffffffff)) (i32.const 1))
-(assert_return (invoke "ne641") (i32.const 1))
-(assert_return (invoke "ne642" (i64.const 0x7fffffffffffffff)) (i32.const 1))
-(assert_return (invoke "ne643" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "lt_s644") (i32.const 0))
-(assert_return (invoke "lt_s645" (i64.const 0)) (i32.const 0))
-(assert_return (invoke "lt_s646" (i64.const 0)) (i32.const 0))
-(assert_return (invoke "lt_s647") (i32.const 0))
-(assert_return (invoke "lt_s648" (i64.const 1)) (i32.const 0))
-(assert_return (invoke "lt_s649" (i64.const 1)) (i32.const 0))
-(assert_return (invoke "lt_s650") (i32.const 1))
-(assert_return (invoke "lt_s651" (i64.const -1)) (i32.const 1))
-(assert_return (invoke "lt_s652" (i64.const 1)) (i32.const 1))
-(assert_return (invoke "lt_s653") (i32.const 0))
-(assert_return (invoke "lt_s654" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "lt_s655" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "lt_s656") (i32.const 0))
-(assert_return (invoke "lt_s657" (i64.const 0x7fffffffffffffff)) (i32.const 0))
-(assert_return (invoke "lt_s658" (i64.const 0x7fffffffffffffff)) (i32.const 0))
-(assert_return (invoke "lt_s659") (i32.const 0))
-(assert_return (invoke "lt_s660" (i64.const -1)) (i32.const 0))
-(assert_return (invoke "lt_s661" (i64.const -1)) (i32.const 0))
-(assert_return (invoke "lt_s662") (i32.const 0))
-(assert_return (invoke "lt_s663" (i64.const 1)) (i32.const 0))
-(assert_return (invoke "lt_s664" (i64.const 0)) (i32.const 0))
-(assert_return (invoke "lt_s665") (i32.const 1))
-(assert_return (invoke "lt_s666" (i64.const 0)) (i32.const 1))
-(assert_return (invoke "lt_s667" (i64.const 1)) (i32.const 1))
-(assert_return (invoke "lt_s668") (i32.const 1))
-(assert_return (invoke "lt_s669" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "lt_s670" (i64.const 0)) (i32.const 1))
-(assert_return (invoke "lt_s671") (i32.const 0))
-(assert_return (invoke "lt_s672" (i64.const 0)) (i32.const 0))
-(assert_return (invoke "lt_s673" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "lt_s674") (i32.const 1))
-(assert_return (invoke "lt_s675" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "lt_s676" (i64.const -1)) (i32.const 1))
-(assert_return (invoke "lt_s677") (i32.const 0))
-(assert_return (invoke "lt_s678" (i64.const -1)) (i32.const 0))
-(assert_return (invoke "lt_s679" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "lt_s680") (i32.const 1))
-(assert_return (invoke "lt_s681" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "lt_s682" (i64.const 0x7fffffffffffffff)) (i32.const 1))
-(assert_return (invoke "lt_s683") (i32.const 0))
-(assert_return (invoke "lt_s684" (i64.const 0x7fffffffffffffff)) (i32.const 0))
-(assert_return (invoke "lt_s685" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "lt_u686") (i32.const 0))
-(assert_return (invoke "lt_u687" (i64.const 0)) (i32.const 0))
-(assert_return (invoke "lt_u688" (i64.const 0)) (i32.const 0))
-(assert_return (invoke "lt_u689") (i32.const 0))
-(assert_return (invoke "lt_u690" (i64.const 1)) (i32.const 0))
-(assert_return (invoke "lt_u691" (i64.const 1)) (i32.const 0))
-(assert_return (invoke "lt_u692") (i32.const 0))
-(assert_return (invoke "lt_u693" (i64.const -1)) (i32.const 0))
-(assert_return (invoke "lt_u694" (i64.const 1)) (i32.const 0))
-(assert_return (invoke "lt_u695") (i32.const 0))
-(assert_return (invoke "lt_u696" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "lt_u697" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "lt_u698") (i32.const 0))
-(assert_return (invoke "lt_u699" (i64.const 0x7fffffffffffffff)) (i32.const 0))
-(assert_return (invoke "lt_u700" (i64.const 0x7fffffffffffffff)) (i32.const 0))
-(assert_return (invoke "lt_u701") (i32.const 0))
-(assert_return (invoke "lt_u702" (i64.const -1)) (i32.const 0))
-(assert_return (invoke "lt_u703" (i64.const -1)) (i32.const 0))
-(assert_return (invoke "lt_u704") (i32.const 0))
-(assert_return (invoke "lt_u705" (i64.const 1)) (i32.const 0))
-(assert_return (invoke "lt_u706" (i64.const 0)) (i32.const 0))
-(assert_return (invoke "lt_u707") (i32.const 1))
-(assert_return (invoke "lt_u708" (i64.const 0)) (i32.const 1))
-(assert_return (invoke "lt_u709" (i64.const 1)) (i32.const 1))
-(assert_return (invoke "lt_u710") (i32.const 0))
-(assert_return (invoke "lt_u711" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "lt_u712" (i64.const 0)) (i32.const 0))
-(assert_return (invoke "lt_u713") (i32.const 1))
-(assert_return (invoke "lt_u714" (i64.const 0)) (i32.const 1))
-(assert_return (invoke "lt_u715" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "lt_u716") (i32.const 1))
-(assert_return (invoke "lt_u717" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "lt_u718" (i64.const -1)) (i32.const 1))
-(assert_return (invoke "lt_u719") (i32.const 0))
-(assert_return (invoke "lt_u720" (i64.const -1)) (i32.const 0))
-(assert_return (invoke "lt_u721" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "lt_u722") (i32.const 0))
-(assert_return (invoke "lt_u723" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "lt_u724" (i64.const 0x7fffffffffffffff)) (i32.const 0))
-(assert_return (invoke "lt_u725") (i32.const 1))
-(assert_return (invoke "lt_u726" (i64.const 0x7fffffffffffffff)) (i32.const 1))
-(assert_return (invoke "lt_u727" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "le_s728") (i32.const 1))
-(assert_return (invoke "le_s729" (i64.const 0)) (i32.const 1))
-(assert_return (invoke "le_s730" (i64.const 0)) (i32.const 1))
-(assert_return (invoke "le_s731") (i32.const 1))
-(assert_return (invoke "le_s732" (i64.const 1)) (i32.const 1))
-(assert_return (invoke "le_s733" (i64.const 1)) (i32.const 1))
-(assert_return (invoke "le_s734") (i32.const 1))
-(assert_return (invoke "le_s735" (i64.const -1)) (i32.const 1))
-(assert_return (invoke "le_s736" (i64.const 1)) (i32.const 1))
-(assert_return (invoke "le_s737") (i32.const 1))
-(assert_return (invoke "le_s738" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "le_s739" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "le_s740") (i32.const 1))
-(assert_return (invoke "le_s741" (i64.const 0x7fffffffffffffff)) (i32.const 1))
-(assert_return (invoke "le_s742" (i64.const 0x7fffffffffffffff)) (i32.const 1))
-(assert_return (invoke "le_s743") (i32.const 1))
-(assert_return (invoke "le_s744" (i64.const -1)) (i32.const 1))
-(assert_return (invoke "le_s745" (i64.const -1)) (i32.const 1))
-(assert_return (invoke "le_s746") (i32.const 0))
-(assert_return (invoke "le_s747" (i64.const 1)) (i32.const 0))
-(assert_return (invoke "le_s748" (i64.const 0)) (i32.const 0))
-(assert_return (invoke "le_s749") (i32.const 1))
-(assert_return (invoke "le_s750" (i64.const 0)) (i32.const 1))
-(assert_return (invoke "le_s751" (i64.const 1)) (i32.const 1))
-(assert_return (invoke "le_s752") (i32.const 1))
-(assert_return (invoke "le_s753" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "le_s754" (i64.const 0)) (i32.const 1))
-(assert_return (invoke "le_s755") (i32.const 0))
-(assert_return (invoke "le_s756" (i64.const 0)) (i32.const 0))
-(assert_return (invoke "le_s757" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "le_s758") (i32.const 1))
-(assert_return (invoke "le_s759" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "le_s760" (i64.const -1)) (i32.const 1))
-(assert_return (invoke "le_s761") (i32.const 0))
-(assert_return (invoke "le_s762" (i64.const -1)) (i32.const 0))
-(assert_return (invoke "le_s763" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "le_s764") (i32.const 1))
-(assert_return (invoke "le_s765" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "le_s766" (i64.const 0x7fffffffffffffff)) (i32.const 1))
-(assert_return (invoke "le_s767") (i32.const 0))
-(assert_return (invoke "le_s768" (i64.const 0x7fffffffffffffff)) (i32.const 0))
-(assert_return (invoke "le_s769" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "le_u770") (i32.const 1))
-(assert_return (invoke "le_u771" (i64.const 0)) (i32.const 1))
-(assert_return (invoke "le_u772" (i64.const 0)) (i32.const 1))
-(assert_return (invoke "le_u773") (i32.const 1))
-(assert_return (invoke "le_u774" (i64.const 1)) (i32.const 1))
-(assert_return (invoke "le_u775" (i64.const 1)) (i32.const 1))
-(assert_return (invoke "le_u776") (i32.const 0))
-(assert_return (invoke "le_u777" (i64.const -1)) (i32.const 0))
-(assert_return (invoke "le_u778" (i64.const 1)) (i32.const 0))
-(assert_return (invoke "le_u779") (i32.const 1))
-(assert_return (invoke "le_u780" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "le_u781" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "le_u782") (i32.const 1))
-(assert_return (invoke "le_u783" (i64.const 0x7fffffffffffffff)) (i32.const 1))
-(assert_return (invoke "le_u784" (i64.const 0x7fffffffffffffff)) (i32.const 1))
-(assert_return (invoke "le_u785") (i32.const 1))
-(assert_return (invoke "le_u786" (i64.const -1)) (i32.const 1))
-(assert_return (invoke "le_u787" (i64.const -1)) (i32.const 1))
-(assert_return (invoke "le_u788") (i32.const 0))
-(assert_return (invoke "le_u789" (i64.const 1)) (i32.const 0))
-(assert_return (invoke "le_u790" (i64.const 0)) (i32.const 0))
-(assert_return (invoke "le_u791") (i32.const 1))
-(assert_return (invoke "le_u792" (i64.const 0)) (i32.const 1))
-(assert_return (invoke "le_u793" (i64.const 1)) (i32.const 1))
-(assert_return (invoke "le_u794") (i32.const 0))
-(assert_return (invoke "le_u795" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "le_u796" (i64.const 0)) (i32.const 0))
-(assert_return (invoke "le_u797") (i32.const 1))
-(assert_return (invoke "le_u798" (i64.const 0)) (i32.const 1))
-(assert_return (invoke "le_u799" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "le_u800") (i32.const 1))
-(assert_return (invoke "le_u801" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "le_u802" (i64.const -1)) (i32.const 1))
-(assert_return (invoke "le_u803") (i32.const 0))
-(assert_return (invoke "le_u804" (i64.const -1)) (i32.const 0))
-(assert_return (invoke "le_u805" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "le_u806") (i32.const 0))
-(assert_return (invoke "le_u807" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "le_u808" (i64.const 0x7fffffffffffffff)) (i32.const 0))
-(assert_return (invoke "le_u809") (i32.const 1))
-(assert_return (invoke "le_u810" (i64.const 0x7fffffffffffffff)) (i32.const 1))
-(assert_return (invoke "le_u811" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "gt_s812") (i32.const 0))
-(assert_return (invoke "gt_s813" (i64.const 0)) (i32.const 0))
-(assert_return (invoke "gt_s814" (i64.const 0)) (i32.const 0))
-(assert_return (invoke "gt_s815") (i32.const 0))
-(assert_return (invoke "gt_s816" (i64.const 1)) (i32.const 0))
-(assert_return (invoke "gt_s817" (i64.const 1)) (i32.const 0))
-(assert_return (invoke "gt_s818") (i32.const 0))
-(assert_return (invoke "gt_s819" (i64.const -1)) (i32.const 0))
-(assert_return (invoke "gt_s820" (i64.const 1)) (i32.const 0))
-(assert_return (invoke "gt_s821") (i32.const 0))
-(assert_return (invoke "gt_s822" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "gt_s823" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "gt_s824") (i32.const 0))
-(assert_return (invoke "gt_s825" (i64.const 0x7fffffffffffffff)) (i32.const 0))
-(assert_return (invoke "gt_s826" (i64.const 0x7fffffffffffffff)) (i32.const 0))
-(assert_return (invoke "gt_s827") (i32.const 0))
-(assert_return (invoke "gt_s828" (i64.const -1)) (i32.const 0))
-(assert_return (invoke "gt_s829" (i64.const -1)) (i32.const 0))
-(assert_return (invoke "gt_s830") (i32.const 1))
-(assert_return (invoke "gt_s831" (i64.const 1)) (i32.const 1))
-(assert_return (invoke "gt_s832" (i64.const 0)) (i32.const 1))
-(assert_return (invoke "gt_s833") (i32.const 0))
-(assert_return (invoke "gt_s834" (i64.const 0)) (i32.const 0))
-(assert_return (invoke "gt_s835" (i64.const 1)) (i32.const 0))
-(assert_return (invoke "gt_s836") (i32.const 0))
-(assert_return (invoke "gt_s837" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "gt_s838" (i64.const 0)) (i32.const 0))
-(assert_return (invoke "gt_s839") (i32.const 1))
-(assert_return (invoke "gt_s840" (i64.const 0)) (i32.const 1))
-(assert_return (invoke "gt_s841" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "gt_s842") (i32.const 0))
-(assert_return (invoke "gt_s843" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "gt_s844" (i64.const -1)) (i32.const 0))
-(assert_return (invoke "gt_s845") (i32.const 1))
-(assert_return (invoke "gt_s846" (i64.const -1)) (i32.const 1))
-(assert_return (invoke "gt_s847" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "gt_s848") (i32.const 0))
-(assert_return (invoke "gt_s849" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "gt_s850" (i64.const 0x7fffffffffffffff)) (i32.const 0))
-(assert_return (invoke "gt_s851") (i32.const 1))
-(assert_return (invoke "gt_s852" (i64.const 0x7fffffffffffffff)) (i32.const 1))
-(assert_return (invoke "gt_s853" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "gt_u854") (i32.const 0))
-(assert_return (invoke "gt_u855" (i64.const 0)) (i32.const 0))
-(assert_return (invoke "gt_u856" (i64.const 0)) (i32.const 0))
-(assert_return (invoke "gt_u857") (i32.const 0))
-(assert_return (invoke "gt_u858" (i64.const 1)) (i32.const 0))
-(assert_return (invoke "gt_u859" (i64.const 1)) (i32.const 0))
-(assert_return (invoke "gt_u860") (i32.const 1))
-(assert_return (invoke "gt_u861" (i64.const -1)) (i32.const 1))
-(assert_return (invoke "gt_u862" (i64.const 1)) (i32.const 1))
-(assert_return (invoke "gt_u863") (i32.const 0))
-(assert_return (invoke "gt_u864" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "gt_u865" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "gt_u866") (i32.const 0))
-(assert_return (invoke "gt_u867" (i64.const 0x7fffffffffffffff)) (i32.const 0))
-(assert_return (invoke "gt_u868" (i64.const 0x7fffffffffffffff)) (i32.const 0))
-(assert_return (invoke "gt_u869") (i32.const 0))
-(assert_return (invoke "gt_u870" (i64.const -1)) (i32.const 0))
-(assert_return (invoke "gt_u871" (i64.const -1)) (i32.const 0))
-(assert_return (invoke "gt_u872") (i32.const 1))
-(assert_return (invoke "gt_u873" (i64.const 1)) (i32.const 1))
-(assert_return (invoke "gt_u874" (i64.const 0)) (i32.const 1))
-(assert_return (invoke "gt_u875") (i32.const 0))
-(assert_return (invoke "gt_u876" (i64.const 0)) (i32.const 0))
-(assert_return (invoke "gt_u877" (i64.const 1)) (i32.const 0))
-(assert_return (invoke "gt_u878") (i32.const 1))
-(assert_return (invoke "gt_u879" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "gt_u880" (i64.const 0)) (i32.const 1))
-(assert_return (invoke "gt_u881") (i32.const 0))
-(assert_return (invoke "gt_u882" (i64.const 0)) (i32.const 0))
-(assert_return (invoke "gt_u883" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "gt_u884") (i32.const 0))
-(assert_return (invoke "gt_u885" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "gt_u886" (i64.const -1)) (i32.const 0))
-(assert_return (invoke "gt_u887") (i32.const 1))
-(assert_return (invoke "gt_u888" (i64.const -1)) (i32.const 1))
-(assert_return (invoke "gt_u889" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "gt_u890") (i32.const 1))
-(assert_return (invoke "gt_u891" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "gt_u892" (i64.const 0x7fffffffffffffff)) (i32.const 1))
-(assert_return (invoke "gt_u893") (i32.const 0))
-(assert_return (invoke "gt_u894" (i64.const 0x7fffffffffffffff)) (i32.const 0))
-(assert_return (invoke "gt_u895" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "ge_s896") (i32.const 1))
-(assert_return (invoke "ge_s897" (i64.const 0)) (i32.const 1))
-(assert_return (invoke "ge_s898" (i64.const 0)) (i32.const 1))
-(assert_return (invoke "ge_s899") (i32.const 1))
-(assert_return (invoke "ge_s900" (i64.const 1)) (i32.const 1))
-(assert_return (invoke "ge_s901" (i64.const 1)) (i32.const 1))
-(assert_return (invoke "ge_s902") (i32.const 0))
-(assert_return (invoke "ge_s903" (i64.const -1)) (i32.const 0))
-(assert_return (invoke "ge_s904" (i64.const 1)) (i32.const 0))
-(assert_return (invoke "ge_s905") (i32.const 1))
-(assert_return (invoke "ge_s906" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "ge_s907" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "ge_s908") (i32.const 1))
-(assert_return (invoke "ge_s909" (i64.const 0x7fffffffffffffff)) (i32.const 1))
-(assert_return (invoke "ge_s910" (i64.const 0x7fffffffffffffff)) (i32.const 1))
-(assert_return (invoke "ge_s911") (i32.const 1))
-(assert_return (invoke "ge_s912" (i64.const -1)) (i32.const 1))
-(assert_return (invoke "ge_s913" (i64.const -1)) (i32.const 1))
-(assert_return (invoke "ge_s914") (i32.const 1))
-(assert_return (invoke "ge_s915" (i64.const 1)) (i32.const 1))
-(assert_return (invoke "ge_s916" (i64.const 0)) (i32.const 1))
-(assert_return (invoke "ge_s917") (i32.const 0))
-(assert_return (invoke "ge_s918" (i64.const 0)) (i32.const 0))
-(assert_return (invoke "ge_s919" (i64.const 1)) (i32.const 0))
-(assert_return (invoke "ge_s920") (i32.const 0))
-(assert_return (invoke "ge_s921" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "ge_s922" (i64.const 0)) (i32.const 0))
-(assert_return (invoke "ge_s923") (i32.const 1))
-(assert_return (invoke "ge_s924" (i64.const 0)) (i32.const 1))
-(assert_return (invoke "ge_s925" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "ge_s926") (i32.const 0))
-(assert_return (invoke "ge_s927" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "ge_s928" (i64.const -1)) (i32.const 0))
-(assert_return (invoke "ge_s929") (i32.const 1))
-(assert_return (invoke "ge_s930" (i64.const -1)) (i32.const 1))
-(assert_return (invoke "ge_s931" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "ge_s932") (i32.const 0))
-(assert_return (invoke "ge_s933" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "ge_s934" (i64.const 0x7fffffffffffffff)) (i32.const 0))
-(assert_return (invoke "ge_s935") (i32.const 1))
-(assert_return (invoke "ge_s936" (i64.const 0x7fffffffffffffff)) (i32.const 1))
-(assert_return (invoke "ge_s937" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "ge_u938") (i32.const 1))
-(assert_return (invoke "ge_u939" (i64.const 0)) (i32.const 1))
-(assert_return (invoke "ge_u940" (i64.const 0)) (i32.const 1))
-(assert_return (invoke "ge_u941") (i32.const 1))
-(assert_return (invoke "ge_u942" (i64.const 1)) (i32.const 1))
-(assert_return (invoke "ge_u943" (i64.const 1)) (i32.const 1))
-(assert_return (invoke "ge_u944") (i32.const 1))
-(assert_return (invoke "ge_u945" (i64.const -1)) (i32.const 1))
-(assert_return (invoke "ge_u946" (i64.const 1)) (i32.const 1))
-(assert_return (invoke "ge_u947") (i32.const 1))
-(assert_return (invoke "ge_u948" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "ge_u949" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "ge_u950") (i32.const 1))
-(assert_return (invoke "ge_u951" (i64.const 0x7fffffffffffffff)) (i32.const 1))
-(assert_return (invoke "ge_u952" (i64.const 0x7fffffffffffffff)) (i32.const 1))
-(assert_return (invoke "ge_u953") (i32.const 1))
-(assert_return (invoke "ge_u954" (i64.const -1)) (i32.const 1))
-(assert_return (invoke "ge_u955" (i64.const -1)) (i32.const 1))
-(assert_return (invoke "ge_u956") (i32.const 1))
-(assert_return (invoke "ge_u957" (i64.const 1)) (i32.const 1))
-(assert_return (invoke "ge_u958" (i64.const 0)) (i32.const 1))
-(assert_return (invoke "ge_u959") (i32.const 0))
-(assert_return (invoke "ge_u960" (i64.const 0)) (i32.const 0))
-(assert_return (invoke "ge_u961" (i64.const 1)) (i32.const 0))
-(assert_return (invoke "ge_u962") (i32.const 1))
-(assert_return (invoke "ge_u963" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "ge_u964" (i64.const 0)) (i32.const 1))
-(assert_return (invoke "ge_u965") (i32.const 0))
-(assert_return (invoke "ge_u966" (i64.const 0)) (i32.const 0))
-(assert_return (invoke "ge_u967" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "ge_u968") (i32.const 0))
-(assert_return (invoke "ge_u969" (i64.const 0x8000000000000000)) (i32.const 0))
-(assert_return (invoke "ge_u970" (i64.const -1)) (i32.const 0))
-(assert_return (invoke "ge_u971") (i32.const 1))
-(assert_return (invoke "ge_u972" (i64.const -1)) (i32.const 1))
-(assert_return (invoke "ge_u973" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "ge_u974") (i32.const 1))
-(assert_return (invoke "ge_u975" (i64.const 0x8000000000000000)) (i32.const 1))
-(assert_return (invoke "ge_u976" (i64.const 0x7fffffffffffffff)) (i32.const 1))
-(assert_return (invoke "ge_u977") (i32.const 0))
-(assert_return (invoke "ge_u978" (i64.const 0x7fffffffffffffff)) (i32.const 0))
-(assert_return (invoke "ge_u979" (i64.const 0x8000000000000000)) (i32.const 0))
\ No newline at end of file
+(assert_return (invoke "rotl508" (i64.const 1)) (i64.const 1))
+(assert_return (invoke "rotl509" (i64.const 64)) (i64.const 1))
+(assert_return (invoke "rotl510") (i64.const 0x579b30ec048d159d))
+(assert_return (invoke "rotl511" (i64.const 0xabcd987602468ace)) (i64.const 0x579b30ec048d159d))
+(assert_return (invoke "rotl512" (i64.const 1)) (i64.const 0x579b30ec048d159d))
+(assert_return (invoke "rotl513") (i64.const 0xe000000dc000000f))
+(assert_return (invoke "rotl514" (i64.const 0xfe000000dc000000)) (i64.const 0xe000000dc000000f))
+(assert_return (invoke "rotl515" (i64.const 4)) (i64.const 0xe000000dc000000f))
+(assert_return (invoke "rotl516") (i64.const 0x013579a2469deacf))
+(assert_return (invoke "rotl517" (i64.const 0xabcd1234ef567809)) (i64.const 0x013579a2469deacf))
+(assert_return (invoke "rotl518" (i64.const 53)) (i64.const 0x013579a2469deacf))
+(assert_return (invoke "rotl519") (i64.const 0x55e891a77ab3c04e))
+(assert_return (invoke "rotl520" (i64.const 0xabd1234ef567809c)) (i64.const 0x55e891a77ab3c04e))
+(assert_return (invoke "rotl521" (i64.const 63)) (i64.const 0x55e891a77ab3c04e))
+(assert_return (invoke "rotl522") (i64.const 0x013579a2469deacf))
+(assert_return (invoke "rotl523" (i64.const 0xabcd1234ef567809)) (i64.const 0x013579a2469deacf))
+(assert_return (invoke "rotl524" (i64.const 0xf5)) (i64.const 0x013579a2469deacf))
+(assert_return (invoke "rotl525") (i64.const 0xcf013579ae529dea))
+(assert_return (invoke "rotl526" (i64.const 0xabcd7294ef567809)) (i64.const 0xcf013579ae529dea))
+(assert_return (invoke "rotl527" (i64.const 0xffffffffffffffed)) (i64.const 0xcf013579ae529dea))
+(assert_return (invoke "rotl528") (i64.const 0x55e891a77ab3c04e))
+(assert_return (invoke "rotl529" (i64.const 0xabd1234ef567809c)) (i64.const 0x55e891a77ab3c04e))
+(assert_return (invoke "rotl530" (i64.const 0x800000000000003f)) (i64.const 0x55e891a77ab3c04e))
+(assert_return (invoke "rotl531") (i64.const 0x8000000000000000))
+(assert_return (invoke "rotl532" (i64.const 1)) (i64.const 0x8000000000000000))
+(assert_return (invoke "rotl533" (i64.const 63)) (i64.const 0x8000000000000000))
+(assert_return (invoke "rotl534") (i64.const 1))
+(assert_return (invoke "rotl535" (i64.const 0x8000000000000000)) (i64.const 1))
+(assert_return (invoke "rotl536" (i64.const 1)) (i64.const 1))
+(assert_return (invoke "rotr537") (i64.const 0x8000000000000000))
+(assert_return (invoke "rotr538" (i64.const 1)) (i64.const 0x8000000000000000))
+(assert_return (invoke "rotr539" (i64.const 1)) (i64.const 0x8000000000000000))
+(assert_return (invoke "rotr540") (i64.const 1))
+(assert_return (invoke "rotr541" (i64.const 1)) (i64.const 1))
+(assert_return (invoke "rotr542" (i64.const 0)) (i64.const 1))
+(assert_return (invoke "rotr543") (i64.const -1))
+(assert_return (invoke "rotr544" (i64.const -1)) (i64.const -1))
+(assert_return (invoke "rotr545" (i64.const 1)) (i64.const -1))
+(assert_return (invoke "rotr546") (i64.const 1))
+(assert_return (invoke "rotr547" (i64.const 1)) (i64.const 1))
+(assert_return (invoke "rotr548" (i64.const 64)) (i64.const 1))
+(assert_return (invoke "rotr549") (i64.const 0x55e6cc3b01234567))
+(assert_return (invoke "rotr550" (i64.const 0xabcd987602468ace)) (i64.const 0x55e6cc3b01234567))
+(assert_return (invoke "rotr551" (i64.const 1)) (i64.const 0x55e6cc3b01234567))
+(assert_return (invoke "rotr552") (i64.const 0x0fe000000dc00000))
+(assert_return (invoke "rotr553" (i64.const 0xfe000000dc000000)) (i64.const 0x0fe000000dc00000))
+(assert_return (invoke "rotr554" (i64.const 4)) (i64.const 0x0fe000000dc00000))
+(assert_return (invoke "rotr555") (i64.const 0x6891a77ab3c04d5e))
+(assert_return (invoke "rotr556" (i64.const 0xabcd1234ef567809)) (i64.const 0x6891a77ab3c04d5e))
+(assert_return (invoke "rotr557" (i64.const 53)) (i64.const 0x6891a77ab3c04d5e))
+(assert_return (invoke "rotr558") (i64.const 0x57a2469deacf0139))
+(assert_return (invoke "rotr559" (i64.const 0xabd1234ef567809c)) (i64.const 0x57a2469deacf0139))
+(assert_return (invoke "rotr560" (i64.const 63)) (i64.const 0x57a2469deacf0139))
+(assert_return (invoke "rotr561") (i64.const 0x6891a77ab3c04d5e))
+(assert_return (invoke "rotr562" (i64.const 0xabcd1234ef567809)) (i64.const 0x6891a77ab3c04d5e))
+(assert_return (invoke "rotr563" (i64.const 0xf5)) (i64.const 0x6891a77ab3c04d5e))
+(assert_return (invoke "rotr564") (i64.const 0x94a77ab3c04d5e6b))
+(assert_return (invoke "rotr565" (i64.const 0xabcd7294ef567809)) (i64.const 0x94a77ab3c04d5e6b))
+(assert_return (invoke "rotr566" (i64.const 0xffffffffffffffed)) (i64.const 0x94a77ab3c04d5e6b))
+(assert_return (invoke "rotr567") (i64.const 0x57a2469deacf0139))
+(assert_return (invoke "rotr568" (i64.const 0xabd1234ef567809c)) (i64.const 0x57a2469deacf0139))
+(assert_return (invoke "rotr569" (i64.const 0x800000000000003f)) (i64.const 0x57a2469deacf0139))
+(assert_return (invoke "rotr570") (i64.const 2))
+(assert_return (invoke "rotr571" (i64.const 1)) (i64.const 2))
+(assert_return (invoke "rotr572" (i64.const 63)) (i64.const 2))
+(assert_return (invoke "rotr573") (i64.const 1))
+(assert_return (invoke "rotr574" (i64.const 0x8000000000000000)) (i64.const 1))
+(assert_return (invoke "rotr575" (i64.const 63)) (i64.const 1))
+(assert_return (invoke "clz576") (i64.const 0))
+(assert_return (invoke "clz577") (i64.const 64))
+(assert_return (invoke "clz578") (i64.const 48))
+(assert_return (invoke "clz579") (i64.const 56))
+(assert_return (invoke "clz580") (i64.const 0))
+(assert_return (invoke "clz581") (i64.const 63))
+(assert_return (invoke "clz582") (i64.const 62))
+(assert_return (invoke "clz583") (i64.const 1))
+(assert_return (invoke "ctz584") (i64.const 0))
+(assert_return (invoke "ctz585") (i64.const 64))
+(assert_return (invoke "ctz586") (i64.const 15))
+(assert_return (invoke "ctz587") (i64.const 16))
+(assert_return (invoke "ctz588") (i64.const 63))
+(assert_return (invoke "ctz589") (i64.const 0))
+(assert_return (invoke "popcnt590") (i64.const 64))
+(assert_return (invoke "popcnt591") (i64.const 0))
+(assert_return (invoke "popcnt592") (i64.const 1))
+(assert_return (invoke "popcnt593") (i64.const 4))
+(assert_return (invoke "popcnt594") (i64.const 63))
+(assert_return (invoke "popcnt595") (i64.const 32))
+(assert_return (invoke "popcnt596") (i64.const 32))
+(assert_return (invoke "popcnt597") (i64.const 48))
+(assert_return (invoke "eqz598") (i32.const 1))
+(assert_return (invoke "eqz599") (i32.const 0))
+(assert_return (invoke "eqz600") (i32.const 0))
+(assert_return (invoke "eqz601") (i32.const 0))
+(assert_return (invoke "eqz602") (i32.const 0))
+(assert_return (invoke "eq603") (i32.const 1))
+(assert_return (invoke "eq604" (i64.const 0)) (i32.const 1))
+(assert_return (invoke "eq605" (i64.const 0)) (i32.const 1))
+(assert_return (invoke "eq606") (i32.const 1))
+(assert_return (invoke "eq607" (i64.const 1)) (i32.const 1))
+(assert_return (invoke "eq608" (i64.const 1)) (i32.const 1))
+(assert_return (invoke "eq609") (i32.const 0))
+(assert_return (invoke "eq610" (i64.const -1)) (i32.const 0))
+(assert_return (invoke "eq611" (i64.const 1)) (i32.const 0))
+(assert_return (invoke "eq612") (i32.const 1))
+(assert_return (invoke "eq613" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "eq614" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "eq615") (i32.const 1))
+(assert_return (invoke "eq616" (i64.const 0x7fffffffffffffff)) (i32.const 1))
+(assert_return (invoke "eq617" (i64.const 0x7fffffffffffffff)) (i32.const 1))
+(assert_return (invoke "eq618") (i32.const 1))
+(assert_return (invoke "eq619" (i64.const -1)) (i32.const 1))
+(assert_return (invoke "eq620" (i64.const -1)) (i32.const 1))
+(assert_return (invoke "eq621") (i32.const 0))
+(assert_return (invoke "eq622" (i64.const 1)) (i32.const 0))
+(assert_return (invoke "eq623" (i64.const 0)) (i32.const 0))
+(assert_return (invoke "eq624") (i32.const 0))
+(assert_return (invoke "eq625" (i64.const 0)) (i32.const 0))
+(assert_return (invoke "eq626" (i64.const 1)) (i32.const 0))
+(assert_return (invoke "eq627") (i32.const 0))
+(assert_return (invoke "eq628" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "eq629" (i64.const 0)) (i32.const 0))
+(assert_return (invoke "eq630") (i32.const 0))
+(assert_return (invoke "eq631" (i64.const 0)) (i32.const 0))
+(assert_return (invoke "eq632" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "eq633") (i32.const 0))
+(assert_return (invoke "eq634" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "eq635" (i64.const -1)) (i32.const 0))
+(assert_return (invoke "eq636") (i32.const 0))
+(assert_return (invoke "eq637" (i64.const -1)) (i32.const 0))
+(assert_return (invoke "eq638" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "eq639") (i32.const 0))
+(assert_return (invoke "eq640" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "eq641" (i64.const 0x7fffffffffffffff)) (i32.const 0))
+(assert_return (invoke "eq642") (i32.const 0))
+(assert_return (invoke "eq643" (i64.const 0x7fffffffffffffff)) (i32.const 0))
+(assert_return (invoke "eq644" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "ne645") (i32.const 0))
+(assert_return (invoke "ne646" (i64.const 0)) (i32.const 0))
+(assert_return (invoke "ne647" (i64.const 0)) (i32.const 0))
+(assert_return (invoke "ne648") (i32.const 0))
+(assert_return (invoke "ne649" (i64.const 1)) (i32.const 0))
+(assert_return (invoke "ne650" (i64.const 1)) (i32.const 0))
+(assert_return (invoke "ne651") (i32.const 1))
+(assert_return (invoke "ne652" (i64.const -1)) (i32.const 1))
+(assert_return (invoke "ne653" (i64.const 1)) (i32.const 1))
+(assert_return (invoke "ne654") (i32.const 0))
+(assert_return (invoke "ne655" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "ne656" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "ne657") (i32.const 0))
+(assert_return (invoke "ne658" (i64.const 0x7fffffffffffffff)) (i32.const 0))
+(assert_return (invoke "ne659" (i64.const 0x7fffffffffffffff)) (i32.const 0))
+(assert_return (invoke "ne660") (i32.const 0))
+(assert_return (invoke "ne661" (i64.const -1)) (i32.const 0))
+(assert_return (invoke "ne662" (i64.const -1)) (i32.const 0))
+(assert_return (invoke "ne663") (i32.const 1))
+(assert_return (invoke "ne664" (i64.const 1)) (i32.const 1))
+(assert_return (invoke "ne665" (i64.const 0)) (i32.const 1))
+(assert_return (invoke "ne666") (i32.const 1))
+(assert_return (invoke "ne667" (i64.const 0)) (i32.const 1))
+(assert_return (invoke "ne668" (i64.const 1)) (i32.const 1))
+(assert_return (invoke "ne669") (i32.const 1))
+(assert_return (invoke "ne670" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "ne671" (i64.const 0)) (i32.const 1))
+(assert_return (invoke "ne672") (i32.const 1))
+(assert_return (invoke "ne673" (i64.const 0)) (i32.const 1))
+(assert_return (invoke "ne674" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "ne675") (i32.const 1))
+(assert_return (invoke "ne676" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "ne677" (i64.const -1)) (i32.const 1))
+(assert_return (invoke "ne678") (i32.const 1))
+(assert_return (invoke "ne679" (i64.const -1)) (i32.const 1))
+(assert_return (invoke "ne680" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "ne681") (i32.const 1))
+(assert_return (invoke "ne682" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "ne683" (i64.const 0x7fffffffffffffff)) (i32.const 1))
+(assert_return (invoke "ne684") (i32.const 1))
+(assert_return (invoke "ne685" (i64.const 0x7fffffffffffffff)) (i32.const 1))
+(assert_return (invoke "ne686" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "lt_s687") (i32.const 0))
+(assert_return (invoke "lt_s688" (i64.const 0)) (i32.const 0))
+(assert_return (invoke "lt_s689" (i64.const 0)) (i32.const 0))
+(assert_return (invoke "lt_s690") (i32.const 0))
+(assert_return (invoke "lt_s691" (i64.const 1)) (i32.const 0))
+(assert_return (invoke "lt_s692" (i64.const 1)) (i32.const 0))
+(assert_return (invoke "lt_s693") (i32.const 1))
+(assert_return (invoke "lt_s694" (i64.const -1)) (i32.const 1))
+(assert_return (invoke "lt_s695" (i64.const 1)) (i32.const 1))
+(assert_return (invoke "lt_s696") (i32.const 0))
+(assert_return (invoke "lt_s697" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "lt_s698" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "lt_s699") (i32.const 0))
+(assert_return (invoke "lt_s700" (i64.const 0x7fffffffffffffff)) (i32.const 0))
+(assert_return (invoke "lt_s701" (i64.const 0x7fffffffffffffff)) (i32.const 0))
+(assert_return (invoke "lt_s702") (i32.const 0))
+(assert_return (invoke "lt_s703" (i64.const -1)) (i32.const 0))
+(assert_return (invoke "lt_s704" (i64.const -1)) (i32.const 0))
+(assert_return (invoke "lt_s705") (i32.const 0))
+(assert_return (invoke "lt_s706" (i64.const 1)) (i32.const 0))
+(assert_return (invoke "lt_s707" (i64.const 0)) (i32.const 0))
+(assert_return (invoke "lt_s708") (i32.const 1))
+(assert_return (invoke "lt_s709" (i64.const 0)) (i32.const 1))
+(assert_return (invoke "lt_s710" (i64.const 1)) (i32.const 1))
+(assert_return (invoke "lt_s711") (i32.const 1))
+(assert_return (invoke "lt_s712" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "lt_s713" (i64.const 0)) (i32.const 1))
+(assert_return (invoke "lt_s714") (i32.const 0))
+(assert_return (invoke "lt_s715" (i64.const 0)) (i32.const 0))
+(assert_return (invoke "lt_s716" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "lt_s717") (i32.const 1))
+(assert_return (invoke "lt_s718" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "lt_s719" (i64.const -1)) (i32.const 1))
+(assert_return (invoke "lt_s720") (i32.const 0))
+(assert_return (invoke "lt_s721" (i64.const -1)) (i32.const 0))
+(assert_return (invoke "lt_s722" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "lt_s723") (i32.const 1))
+(assert_return (invoke "lt_s724" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "lt_s725" (i64.const 0x7fffffffffffffff)) (i32.const 1))
+(assert_return (invoke "lt_s726") (i32.const 0))
+(assert_return (invoke "lt_s727" (i64.const 0x7fffffffffffffff)) (i32.const 0))
+(assert_return (invoke "lt_s728" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "lt_u729") (i32.const 0))
+(assert_return (invoke "lt_u730" (i64.const 0)) (i32.const 0))
+(assert_return (invoke "lt_u731" (i64.const 0)) (i32.const 0))
+(assert_return (invoke "lt_u732") (i32.const 0))
+(assert_return (invoke "lt_u733" (i64.const 1)) (i32.const 0))
+(assert_return (invoke "lt_u734" (i64.const 1)) (i32.const 0))
+(assert_return (invoke "lt_u735") (i32.const 0))
+(assert_return (invoke "lt_u736" (i64.const -1)) (i32.const 0))
+(assert_return (invoke "lt_u737" (i64.const 1)) (i32.const 0))
+(assert_return (invoke "lt_u738") (i32.const 0))
+(assert_return (invoke "lt_u739" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "lt_u740" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "lt_u741") (i32.const 0))
+(assert_return (invoke "lt_u742" (i64.const 0x7fffffffffffffff)) (i32.const 0))
+(assert_return (invoke "lt_u743" (i64.const 0x7fffffffffffffff)) (i32.const 0))
+(assert_return (invoke "lt_u744") (i32.const 0))
+(assert_return (invoke "lt_u745" (i64.const -1)) (i32.const 0))
+(assert_return (invoke "lt_u746" (i64.const -1)) (i32.const 0))
+(assert_return (invoke "lt_u747") (i32.const 0))
+(assert_return (invoke "lt_u748" (i64.const 1)) (i32.const 0))
+(assert_return (invoke "lt_u749" (i64.const 0)) (i32.const 0))
+(assert_return (invoke "lt_u750") (i32.const 1))
+(assert_return (invoke "lt_u751" (i64.const 0)) (i32.const 1))
+(assert_return (invoke "lt_u752" (i64.const 1)) (i32.const 1))
+(assert_return (invoke "lt_u753") (i32.const 0))
+(assert_return (invoke "lt_u754" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "lt_u755" (i64.const 0)) (i32.const 0))
+(assert_return (invoke "lt_u756") (i32.const 1))
+(assert_return (invoke "lt_u757" (i64.const 0)) (i32.const 1))
+(assert_return (invoke "lt_u758" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "lt_u759") (i32.const 1))
+(assert_return (invoke "lt_u760" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "lt_u761" (i64.const -1)) (i32.const 1))
+(assert_return (invoke "lt_u762") (i32.const 0))
+(assert_return (invoke "lt_u763" (i64.const -1)) (i32.const 0))
+(assert_return (invoke "lt_u764" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "lt_u765") (i32.const 0))
+(assert_return (invoke "lt_u766" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "lt_u767" (i64.const 0x7fffffffffffffff)) (i32.const 0))
+(assert_return (invoke "lt_u768") (i32.const 1))
+(assert_return (invoke "lt_u769" (i64.const 0x7fffffffffffffff)) (i32.const 1))
+(assert_return (invoke "lt_u770" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "le_s771") (i32.const 1))
+(assert_return (invoke "le_s772" (i64.const 0)) (i32.const 1))
+(assert_return (invoke "le_s773" (i64.const 0)) (i32.const 1))
+(assert_return (invoke "le_s774") (i32.const 1))
+(assert_return (invoke "le_s775" (i64.const 1)) (i32.const 1))
+(assert_return (invoke "le_s776" (i64.const 1)) (i32.const 1))
+(assert_return (invoke "le_s777") (i32.const 1))
+(assert_return (invoke "le_s778" (i64.const -1)) (i32.const 1))
+(assert_return (invoke "le_s779" (i64.const 1)) (i32.const 1))
+(assert_return (invoke "le_s780") (i32.const 1))
+(assert_return (invoke "le_s781" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "le_s782" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "le_s783") (i32.const 1))
+(assert_return (invoke "le_s784" (i64.const 0x7fffffffffffffff)) (i32.const 1))
+(assert_return (invoke "le_s785" (i64.const 0x7fffffffffffffff)) (i32.const 1))
+(assert_return (invoke "le_s786") (i32.const 1))
+(assert_return (invoke "le_s787" (i64.const -1)) (i32.const 1))
+(assert_return (invoke "le_s788" (i64.const -1)) (i32.const 1))
+(assert_return (invoke "le_s789") (i32.const 0))
+(assert_return (invoke "le_s790" (i64.const 1)) (i32.const 0))
+(assert_return (invoke "le_s791" (i64.const 0)) (i32.const 0))
+(assert_return (invoke "le_s792") (i32.const 1))
+(assert_return (invoke "le_s793" (i64.const 0)) (i32.const 1))
+(assert_return (invoke "le_s794" (i64.const 1)) (i32.const 1))
+(assert_return (invoke "le_s795") (i32.const 1))
+(assert_return (invoke "le_s796" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "le_s797" (i64.const 0)) (i32.const 1))
+(assert_return (invoke "le_s798") (i32.const 0))
+(assert_return (invoke "le_s799" (i64.const 0)) (i32.const 0))
+(assert_return (invoke "le_s800" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "le_s801") (i32.const 1))
+(assert_return (invoke "le_s802" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "le_s803" (i64.const -1)) (i32.const 1))
+(assert_return (invoke "le_s804") (i32.const 0))
+(assert_return (invoke "le_s805" (i64.const -1)) (i32.const 0))
+(assert_return (invoke "le_s806" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "le_s807") (i32.const 1))
+(assert_return (invoke "le_s808" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "le_s809" (i64.const 0x7fffffffffffffff)) (i32.const 1))
+(assert_return (invoke "le_s810") (i32.const 0))
+(assert_return (invoke "le_s811" (i64.const 0x7fffffffffffffff)) (i32.const 0))
+(assert_return (invoke "le_s812" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "le_u813") (i32.const 1))
+(assert_return (invoke "le_u814" (i64.const 0)) (i32.const 1))
+(assert_return (invoke "le_u815" (i64.const 0)) (i32.const 1))
+(assert_return (invoke "le_u816") (i32.const 1))
+(assert_return (invoke "le_u817" (i64.const 1)) (i32.const 1))
+(assert_return (invoke "le_u818" (i64.const 1)) (i32.const 1))
+(assert_return (invoke "le_u819") (i32.const 0))
+(assert_return (invoke "le_u820" (i64.const -1)) (i32.const 0))
+(assert_return (invoke "le_u821" (i64.const 1)) (i32.const 0))
+(assert_return (invoke "le_u822") (i32.const 1))
+(assert_return (invoke "le_u823" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "le_u824" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "le_u825") (i32.const 1))
+(assert_return (invoke "le_u826" (i64.const 0x7fffffffffffffff)) (i32.const 1))
+(assert_return (invoke "le_u827" (i64.const 0x7fffffffffffffff)) (i32.const 1))
+(assert_return (invoke "le_u828") (i32.const 1))
+(assert_return (invoke "le_u829" (i64.const -1)) (i32.const 1))
+(assert_return (invoke "le_u830" (i64.const -1)) (i32.const 1))
+(assert_return (invoke "le_u831") (i32.const 0))
+(assert_return (invoke "le_u832" (i64.const 1)) (i32.const 0))
+(assert_return (invoke "le_u833" (i64.const 0)) (i32.const 0))
+(assert_return (invoke "le_u834") (i32.const 1))
+(assert_return (invoke "le_u835" (i64.const 0)) (i32.const 1))
+(assert_return (invoke "le_u836" (i64.const 1)) (i32.const 1))
+(assert_return (invoke "le_u837") (i32.const 0))
+(assert_return (invoke "le_u838" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "le_u839" (i64.const 0)) (i32.const 0))
+(assert_return (invoke "le_u840") (i32.const 1))
+(assert_return (invoke "le_u841" (i64.const 0)) (i32.const 1))
+(assert_return (invoke "le_u842" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "le_u843") (i32.const 1))
+(assert_return (invoke "le_u844" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "le_u845" (i64.const -1)) (i32.const 1))
+(assert_return (invoke "le_u846") (i32.const 0))
+(assert_return (invoke "le_u847" (i64.const -1)) (i32.const 0))
+(assert_return (invoke "le_u848" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "le_u849") (i32.const 0))
+(assert_return (invoke "le_u850" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "le_u851" (i64.const 0x7fffffffffffffff)) (i32.const 0))
+(assert_return (invoke "le_u852") (i32.const 1))
+(assert_return (invoke "le_u853" (i64.const 0x7fffffffffffffff)) (i32.const 1))
+(assert_return (invoke "le_u854" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "gt_s855") (i32.const 0))
+(assert_return (invoke "gt_s856" (i64.const 0)) (i32.const 0))
+(assert_return (invoke "gt_s857" (i64.const 0)) (i32.const 0))
+(assert_return (invoke "gt_s858") (i32.const 0))
+(assert_return (invoke "gt_s859" (i64.const 1)) (i32.const 0))
+(assert_return (invoke "gt_s860" (i64.const 1)) (i32.const 0))
+(assert_return (invoke "gt_s861") (i32.const 0))
+(assert_return (invoke "gt_s862" (i64.const -1)) (i32.const 0))
+(assert_return (invoke "gt_s863" (i64.const 1)) (i32.const 0))
+(assert_return (invoke "gt_s864") (i32.const 0))
+(assert_return (invoke "gt_s865" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "gt_s866" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "gt_s867") (i32.const 0))
+(assert_return (invoke "gt_s868" (i64.const 0x7fffffffffffffff)) (i32.const 0))
+(assert_return (invoke "gt_s869" (i64.const 0x7fffffffffffffff)) (i32.const 0))
+(assert_return (invoke "gt_s870") (i32.const 0))
+(assert_return (invoke "gt_s871" (i64.const -1)) (i32.const 0))
+(assert_return (invoke "gt_s872" (i64.const -1)) (i32.const 0))
+(assert_return (invoke "gt_s873") (i32.const 1))
+(assert_return (invoke "gt_s874" (i64.const 1)) (i32.const 1))
+(assert_return (invoke "gt_s875" (i64.const 0)) (i32.const 1))
+(assert_return (invoke "gt_s876") (i32.const 0))
+(assert_return (invoke "gt_s877" (i64.const 0)) (i32.const 0))
+(assert_return (invoke "gt_s878" (i64.const 1)) (i32.const 0))
+(assert_return (invoke "gt_s879") (i32.const 0))
+(assert_return (invoke "gt_s880" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "gt_s881" (i64.const 0)) (i32.const 0))
+(assert_return (invoke "gt_s882") (i32.const 1))
+(assert_return (invoke "gt_s883" (i64.const 0)) (i32.const 1))
+(assert_return (invoke "gt_s884" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "gt_s885") (i32.const 0))
+(assert_return (invoke "gt_s886" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "gt_s887" (i64.const -1)) (i32.const 0))
+(assert_return (invoke "gt_s888") (i32.const 1))
+(assert_return (invoke "gt_s889" (i64.const -1)) (i32.const 1))
+(assert_return (invoke "gt_s890" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "gt_s891") (i32.const 0))
+(assert_return (invoke "gt_s892" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "gt_s893" (i64.const 0x7fffffffffffffff)) (i32.const 0))
+(assert_return (invoke "gt_s894") (i32.const 1))
+(assert_return (invoke "gt_s895" (i64.const 0x7fffffffffffffff)) (i32.const 1))
+(assert_return (invoke "gt_s896" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "gt_u897") (i32.const 0))
+(assert_return (invoke "gt_u898" (i64.const 0)) (i32.const 0))
+(assert_return (invoke "gt_u899" (i64.const 0)) (i32.const 0))
+(assert_return (invoke "gt_u900") (i32.const 0))
+(assert_return (invoke "gt_u901" (i64.const 1)) (i32.const 0))
+(assert_return (invoke "gt_u902" (i64.const 1)) (i32.const 0))
+(assert_return (invoke "gt_u903") (i32.const 1))
+(assert_return (invoke "gt_u904" (i64.const -1)) (i32.const 1))
+(assert_return (invoke "gt_u905" (i64.const 1)) (i32.const 1))
+(assert_return (invoke "gt_u906") (i32.const 0))
+(assert_return (invoke "gt_u907" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "gt_u908" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "gt_u909") (i32.const 0))
+(assert_return (invoke "gt_u910" (i64.const 0x7fffffffffffffff)) (i32.const 0))
+(assert_return (invoke "gt_u911" (i64.const 0x7fffffffffffffff)) (i32.const 0))
+(assert_return (invoke "gt_u912") (i32.const 0))
+(assert_return (invoke "gt_u913" (i64.const -1)) (i32.const 0))
+(assert_return (invoke "gt_u914" (i64.const -1)) (i32.const 0))
+(assert_return (invoke "gt_u915") (i32.const 1))
+(assert_return (invoke "gt_u916" (i64.const 1)) (i32.const 1))
+(assert_return (invoke "gt_u917" (i64.const 0)) (i32.const 1))
+(assert_return (invoke "gt_u918") (i32.const 0))
+(assert_return (invoke "gt_u919" (i64.const 0)) (i32.const 0))
+(assert_return (invoke "gt_u920" (i64.const 1)) (i32.const 0))
+(assert_return (invoke "gt_u921") (i32.const 1))
+(assert_return (invoke "gt_u922" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "gt_u923" (i64.const 0)) (i32.const 1))
+(assert_return (invoke "gt_u924") (i32.const 0))
+(assert_return (invoke "gt_u925" (i64.const 0)) (i32.const 0))
+(assert_return (invoke "gt_u926" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "gt_u927") (i32.const 0))
+(assert_return (invoke "gt_u928" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "gt_u929" (i64.const -1)) (i32.const 0))
+(assert_return (invoke "gt_u930") (i32.const 1))
+(assert_return (invoke "gt_u931" (i64.const -1)) (i32.const 1))
+(assert_return (invoke "gt_u932" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "gt_u933") (i32.const 1))
+(assert_return (invoke "gt_u934" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "gt_u935" (i64.const 0x7fffffffffffffff)) (i32.const 1))
+(assert_return (invoke "gt_u936") (i32.const 0))
+(assert_return (invoke "gt_u937" (i64.const 0x7fffffffffffffff)) (i32.const 0))
+(assert_return (invoke "gt_u938" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "ge_s939") (i32.const 1))
+(assert_return (invoke "ge_s940" (i64.const 0)) (i32.const 1))
+(assert_return (invoke "ge_s941" (i64.const 0)) (i32.const 1))
+(assert_return (invoke "ge_s942") (i32.const 1))
+(assert_return (invoke "ge_s943" (i64.const 1)) (i32.const 1))
+(assert_return (invoke "ge_s944" (i64.const 1)) (i32.const 1))
+(assert_return (invoke "ge_s945") (i32.const 0))
+(assert_return (invoke "ge_s946" (i64.const -1)) (i32.const 0))
+(assert_return (invoke "ge_s947" (i64.const 1)) (i32.const 0))
+(assert_return (invoke "ge_s948") (i32.const 1))
+(assert_return (invoke "ge_s949" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "ge_s950" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "ge_s951") (i32.const 1))
+(assert_return (invoke "ge_s952" (i64.const 0x7fffffffffffffff)) (i32.const 1))
+(assert_return (invoke "ge_s953" (i64.const 0x7fffffffffffffff)) (i32.const 1))
+(assert_return (invoke "ge_s954") (i32.const 1))
+(assert_return (invoke "ge_s955" (i64.const -1)) (i32.const 1))
+(assert_return (invoke "ge_s956" (i64.const -1)) (i32.const 1))
+(assert_return (invoke "ge_s957") (i32.const 1))
+(assert_return (invoke "ge_s958" (i64.const 1)) (i32.const 1))
+(assert_return (invoke "ge_s959" (i64.const 0)) (i32.const 1))
+(assert_return (invoke "ge_s960") (i32.const 0))
+(assert_return (invoke "ge_s961" (i64.const 0)) (i32.const 0))
+(assert_return (invoke "ge_s962" (i64.const 1)) (i32.const 0))
+(assert_return (invoke "ge_s963") (i32.const 0))
+(assert_return (invoke "ge_s964" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "ge_s965" (i64.const 0)) (i32.const 0))
+(assert_return (invoke "ge_s966") (i32.const 1))
+(assert_return (invoke "ge_s967" (i64.const 0)) (i32.const 1))
+(assert_return (invoke "ge_s968" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "ge_s969") (i32.const 0))
+(assert_return (invoke "ge_s970" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "ge_s971" (i64.const -1)) (i32.const 0))
+(assert_return (invoke "ge_s972") (i32.const 1))
+(assert_return (invoke "ge_s973" (i64.const -1)) (i32.const 1))
+(assert_return (invoke "ge_s974" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "ge_s975") (i32.const 0))
+(assert_return (invoke "ge_s976" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "ge_s977" (i64.const 0x7fffffffffffffff)) (i32.const 0))
+(assert_return (invoke "ge_s978") (i32.const 1))
+(assert_return (invoke "ge_s979" (i64.const 0x7fffffffffffffff)) (i32.const 1))
+(assert_return (invoke "ge_s980" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "ge_u981") (i32.const 1))
+(assert_return (invoke "ge_u982" (i64.const 0)) (i32.const 1))
+(assert_return (invoke "ge_u983" (i64.const 0)) (i32.const 1))
+(assert_return (invoke "ge_u984") (i32.const 1))
+(assert_return (invoke "ge_u985" (i64.const 1)) (i32.const 1))
+(assert_return (invoke "ge_u986" (i64.const 1)) (i32.const 1))
+(assert_return (invoke "ge_u987") (i32.const 1))
+(assert_return (invoke "ge_u988" (i64.const -1)) (i32.const 1))
+(assert_return (invoke "ge_u989" (i64.const 1)) (i32.const 1))
+(assert_return (invoke "ge_u990") (i32.const 1))
+(assert_return (invoke "ge_u991" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "ge_u992" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "ge_u993") (i32.const 1))
+(assert_return (invoke "ge_u994" (i64.const 0x7fffffffffffffff)) (i32.const 1))
+(assert_return (invoke "ge_u995" (i64.const 0x7fffffffffffffff)) (i32.const 1))
+(assert_return (invoke "ge_u996") (i32.const 1))
+(assert_return (invoke "ge_u997" (i64.const -1)) (i32.const 1))
+(assert_return (invoke "ge_u998" (i64.const -1)) (i32.const 1))
+(assert_return (invoke "ge_u999") (i32.const 1))
+(assert_return (invoke "ge_u1000" (i64.const 1)) (i32.const 1))
+(assert_return (invoke "ge_u1001" (i64.const 0)) (i32.const 1))
+(assert_return (invoke "ge_u1002") (i32.const 0))
+(assert_return (invoke "ge_u1003" (i64.const 0)) (i32.const 0))
+(assert_return (invoke "ge_u1004" (i64.const 1)) (i32.const 0))
+(assert_return (invoke "ge_u1005") (i32.const 1))
+(assert_return (invoke "ge_u1006" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "ge_u1007" (i64.const 0)) (i32.const 1))
+(assert_return (invoke "ge_u1008") (i32.const 0))
+(assert_return (invoke "ge_u1009" (i64.const 0)) (i32.const 0))
+(assert_return (invoke "ge_u1010" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "ge_u1011") (i32.const 0))
+(assert_return (invoke "ge_u1012" (i64.const 0x8000000000000000)) (i32.const 0))
+(assert_return (invoke "ge_u1013" (i64.const -1)) (i32.const 0))
+(assert_return (invoke "ge_u1014") (i32.const 1))
+(assert_return (invoke "ge_u1015" (i64.const -1)) (i32.const 1))
+(assert_return (invoke "ge_u1016" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "ge_u1017") (i32.const 1))
+(assert_return (invoke "ge_u1018" (i64.const 0x8000000000000000)) (i32.const 1))
+(assert_return (invoke "ge_u1019" (i64.const 0x7fffffffffffffff)) (i32.const 1))
+(assert_return (invoke "ge_u1020") (i32.const 0))
+(assert_return (invoke "ge_u1021" (i64.const 0x7fffffffffffffff)) (i32.const 0))
+(assert_return (invoke "ge_u1022" (i64.const 0x8000000000000000)) (i32.const 0))
\ No newline at end of file
diff --git a/test/WasmSpec/testsuite/core/address-offset-range.fail.wast b/test/WasmSpec/testsuite/core/address-offset-range.fail.wast
deleted file mode 100644
index 127327a..0000000
--- a/test/WasmSpec/testsuite/core/address-offset-range.fail.wast
+++ /dev/null
@@ -1,4 +0,0 @@
-(module
-  (memory 1)
-  (func $bad (drop (i32.load offset=4294967296 (i32.const 0))))
-)
diff --git a/test/WasmSpec/testsuite/core/address.wast b/test/WasmSpec/testsuite/core/address.wast
index 4f8e349..47bd21b 100644
--- a/test/WasmSpec/testsuite/core/address.wast
+++ b/test/WasmSpec/testsuite/core/address.wast
@@ -32,3 +32,11 @@
 (assert_trap (invoke "good" (i32.const 65508)) "out of bounds memory access")
 (assert_trap (invoke "bad" (i32.const 0)) "out of bounds memory access")
 (assert_trap (invoke "bad" (i32.const 1)) "out of bounds memory access")
+
+(assert_malformed
+  (module quote
+    "(memory 1)"
+    "(func (drop (i32.load offset=4294967296 (i32.const 0))))"
+  )
+  "i32 constant"
+)
diff --git a/test/WasmSpec/testsuite/core/align.wast b/test/WasmSpec/testsuite/core/align.wast
new file mode 100644
index 0000000..133b501
--- /dev/null
+++ b/test/WasmSpec/testsuite/core/align.wast
@@ -0,0 +1,33 @@
+(assert_malformed
+  (module quote
+    "(module (memory 0) (func (drop (i64.load align=0 (i32.const 0)))))"
+  )
+  "alignment"
+)
+(assert_malformed
+  (module quote
+    "(module (memory 0) (func (drop (i64.load align=7 (i32.const 0)))))"
+  )
+  "alignment"
+)
+(assert_invalid
+  (module (memory 0) (func (drop (i64.load align=16 (i32.const 0)))))
+  "alignment"
+)
+
+(assert_malformed
+  (module quote
+    "(module (memory 0) (func (i64.store align=0 (i32.const 0) (i64.const 0))))"
+  )
+  "alignment"
+)
+(assert_malformed
+  (module quote
+    "(module (memory 0) (func (i64.store align=5 (i32.const 0) (i64.const 0))))"
+  )
+  "alignment"
+)
+(assert_invalid
+  (module (memory 0) (func (i64.store align=16 (i32.const 0) (i64.const 0))))
+  "alignment"
+)
diff --git a/test/WasmSpec/testsuite/core/binary.wast b/test/WasmSpec/testsuite/core/binary.wast
index 3902239..3e971a2 100644
--- a/test/WasmSpec/testsuite/core/binary.wast
+++ b/test/WasmSpec/testsuite/core/binary.wast
@@ -1,19 +1,44 @@
-(module "\00asm\01\00\00\00")
-(module "\00asm" "\01\00\00\00")
-(module $M1 "\00asm\01\00\00\00")
-(module $M2 "\00asm" "\01\00\00\00")
+(module binary "\00asm\01\00\00\00")
+(module binary "\00asm" "\01\00\00\00")
+(module $M1 binary "\00asm\01\00\00\00")
+(module $M2 binary "\00asm" "\01\00\00\00")
 
-(assert_malformed (module "") "unexpected end")
-(assert_malformed (module "\01") "unexpected end")
-(assert_malformed (module "\00as") "unexpected end")
-(assert_malformed (module "asm\00") "magic header not detected")
-(assert_malformed (module "msa\00") "magic header not detected")
-(assert_malformed (module "msa\00\01\00\00\00") "magic header not detected")
-(assert_malformed (module "msa\00\00\00\00\01") "magic header not detected")
+(assert_malformed (module binary "") "unexpected end")
+(assert_malformed (module binary "\01") "unexpected end")
+(assert_malformed (module binary "\00as") "unexpected end")
+(assert_malformed (module binary "asm\00") "magic header not detected")
+(assert_malformed (module binary "msa\00") "magic header not detected")
+(assert_malformed (module binary "msa\00\01\00\00\00") "magic header not detected")
+(assert_malformed (module binary "msa\00\00\00\00\01") "magic header not detected")
+(assert_malformed (module binary "asm\01\00\00\00\00") "magic header not detected")
+(assert_malformed (module binary "wasm\01\00\00\00") "magic header not detected")
+(assert_malformed (module binary "\7fasm\01\00\00\00") "magic header not detected")
+(assert_malformed (module binary "\80asm\01\00\00\00") "magic header not detected")
+(assert_malformed (module binary "\82asm\01\00\00\00") "magic header not detected")
+(assert_malformed (module binary "\ffasm\01\00\00\00") "magic header not detected")
 
-(assert_malformed (module "\00asm") "unexpected end")
-(assert_malformed (module "\00asm\01") "unexpected end")
-(assert_malformed (module "\00asm\01\00\00") "unexpected end")
-(assert_malformed (module "\00asm\0d\00\00\00") "unknown binary version")
-(assert_malformed (module "\00asm\0e\00\00\00") "unknown binary version")
-(assert_malformed (module "\00asm\00\00\00\01") "unknown binary version")
+;; 8-byte endian-reversed.
+(assert_malformed (module binary "\00\00\00\01msa\00") "magic header not detected")
+
+;; Middle-endian byte orderings.
+(assert_malformed (module binary "a\00ms\00\01\00\00") "magic header not detected")
+(assert_malformed (module binary "sm\00a\00\00\01\00") "magic header not detected")
+
+;; Upper-cased.
+(assert_malformed (module binary "\00ASM\01\00\00\00") "magic header not detected")
+
+;; EBCDIC-encoded magic.
+(assert_malformed (module binary "\00\81\a2\94\01\00\00\00") "magic header not detected")
+
+;; Leading UTF-8 BOM.
+(assert_malformed (module binary "\ef\bb\bf\00asm\01\00\00\00") "magic header not detected")
+
+(assert_malformed (module binary "\00asm") "unexpected end")
+(assert_malformed (module binary "\00asm\01") "unexpected end")
+(assert_malformed (module binary "\00asm\01\00\00") "unexpected end")
+(assert_malformed (module binary "\00asm\00\00\00\00") "unknown binary version")
+(assert_malformed (module binary "\00asm\0d\00\00\00") "unknown binary version")
+(assert_malformed (module binary "\00asm\0e\00\00\00") "unknown binary version")
+(assert_malformed (module binary "\00asm\00\01\00\00") "unknown binary version")
+(assert_malformed (module binary "\00asm\00\00\01\00") "unknown binary version")
+(assert_malformed (module binary "\00asm\00\00\00\01") "unknown binary version")
diff --git a/test/WasmSpec/testsuite/core/block-end-label-mismatch.fail.wast b/test/WasmSpec/testsuite/core/block-end-label-mismatch.fail.wast
deleted file mode 100644
index 8eeaaff..0000000
--- a/test/WasmSpec/testsuite/core/block-end-label-mismatch.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (func block $a end $l))
diff --git a/test/WasmSpec/testsuite/core/block-end-label-superfluous.fail.wast b/test/WasmSpec/testsuite/core/block-end-label-superfluous.fail.wast
deleted file mode 100644
index f33b8f5..0000000
--- a/test/WasmSpec/testsuite/core/block-end-label-superfluous.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (func block end $l))
diff --git a/test/WasmSpec/testsuite/core/block.wast b/test/WasmSpec/testsuite/core/block.wast
index cb7935c..f2b6384 100644
--- a/test/WasmSpec/testsuite/core/block.wast
+++ b/test/WasmSpec/testsuite/core/block.wast
@@ -11,53 +11,79 @@
 
   (func (export "singular") (result i32)
     (block (nop))
-    (block i32 (i32.const 7))
+    (block (result i32) (i32.const 7))
   )
 
   (func (export "multi") (result i32)
     (block (call $dummy) (call $dummy) (call $dummy) (call $dummy))
-    (block i32 (call $dummy) (call $dummy) (call $dummy) (i32.const 8))
+    (block (result i32) (call $dummy) (call $dummy) (call $dummy) (i32.const 8))
   )
 
   (func (export "nested") (result i32)
-    (block i32
+    (block (result i32)
       (block (call $dummy) (block) (nop))
-      (block i32 (call $dummy) (i32.const 9))
+      (block (result i32) (call $dummy) (i32.const 9))
     )
   )
 
   (func (export "deep") (result i32)
-    (block i32 (block i32 (block i32 (block i32 (block i32 (block i32
-      (block i32 (block i32 (block i32 (block i32 (block i32 (block i32
-        (block i32 (block i32 (block i32 (block i32 (block i32 (block i32
-          (block i32 (block i32 (block i32 (block i32 (block i32 (block i32
-            (block i32 (block i32 (block i32 (block i32 (block i32 (block i32
-              (block i32 (block i32 (block i32 (block i32 (block i32 (block i32
-                (block i32 (block i32 (call $dummy) (i32.const 150)))
-              ))))))
-            ))))))
-          ))))))
-        ))))))
-      ))))))
-    ))))))
+    (block (result i32) (block (result i32)
+      (block (result i32) (block (result i32)
+        (block (result i32) (block (result i32)
+          (block (result i32) (block (result i32)
+            (block (result i32) (block (result i32)
+              (block (result i32) (block (result i32)
+                (block (result i32) (block (result i32)
+                  (block (result i32) (block (result i32)
+                    (block (result i32) (block (result i32)
+                      (block (result i32) (block (result i32)
+                        (block (result i32) (block (result i32)
+                          (block (result i32) (block (result i32)
+                            (block (result i32) (block (result i32)
+                              (block (result i32) (block (result i32)
+                                (block (result i32) (block (result i32)
+                                  (block (result i32) (block (result i32)
+                                    (block (result i32) (block (result i32)
+                                      (block (result i32) (block (result i32)
+                                        (block (result i32) (block (result i32)
+                                          (call $dummy) (i32.const 150)
+                                        ))
+                                      ))
+                                    ))
+                                  ))
+                                ))
+                              ))
+                            ))
+                          ))
+                        ))
+                      ))
+                    ))
+                  ))
+                ))
+              ))
+            ))
+          ))
+        ))
+      ))
+    ))
   )
 
   (func (export "as-unary-operand") (result i32)
-    (i32.ctz (block i32 (call $dummy) (i32.const 13)))
+    (i32.ctz (block (result i32) (call $dummy) (i32.const 13)))
   )
   (func (export "as-binary-operand") (result i32)
     (i32.mul
-      (block i32 (call $dummy) (i32.const 3))
-      (block i32 (call $dummy) (i32.const 4))
+      (block (result i32) (call $dummy) (i32.const 3))
+      (block (result i32) (call $dummy) (i32.const 4))
     )
   )
   (func (export "as-test-operand") (result i32)
-    (i32.eqz (block i32 (call $dummy) (i32.const 13)))
+    (i32.eqz (block (result i32) (call $dummy) (i32.const 13)))
   )
   (func (export "as-compare-operand") (result i32)
     (f32.gt
-      (block f32 (call $dummy) (f32.const 3))
-      (block f32 (call $dummy) (f32.const 3))
+      (block (result f32) (call $dummy) (f32.const 3))
+      (block (result f32) (call $dummy) (f32.const 3))
     )
   )
 
@@ -69,10 +95,10 @@
     (i32.const 19)
   )
   (func (export "break-value") (result i32)
-    (block i32 (br 0 (i32.const 18)) (i32.const 19))
+    (block (result i32) (br 0 (i32.const 18)) (i32.const 19))
   )
   (func (export "break-repeated") (result i32)
-    (block i32
+    (block (result i32)
       (br 0 (i32.const 18))
       (br 0 (i32.const 19))
       (drop (br_if 0 (i32.const 20) (i32.const 0)))
@@ -86,13 +112,13 @@
   (func (export "break-inner") (result i32)
     (local i32)
     (set_local 0 (i32.const 0))
-    (set_local 0 (i32.add (get_local 0) (block i32 (block i32 (br 1 (i32.const 0x1))))))
-    (set_local 0 (i32.add (get_local 0) (block i32 (block (br 0)) (i32.const 0x2))))
+    (set_local 0 (i32.add (get_local 0) (block (result i32) (block (result i32) (br 1 (i32.const 0x1))))))
+    (set_local 0 (i32.add (get_local 0) (block (result i32) (block (br 0)) (i32.const 0x2))))
     (set_local 0
-      (i32.add (get_local 0) (block i32 (i32.ctz (br 0 (i32.const 0x4)))))
+      (i32.add (get_local 0) (block (result i32) (i32.ctz (br 0 (i32.const 0x4)))))
     )
     (set_local 0
-      (i32.add (get_local 0) (block i32 (i32.ctz (block i32 (br 1 (i32.const 0x8))))))
+      (i32.add (get_local 0) (block (result i32) (i32.ctz (block (result i32) (br 1 (i32.const 0x8))))))
     )
     (get_local 0)
   )
@@ -154,89 +180,91 @@
 )
 (assert_invalid
   (module (func $type-value-empty-vs-num (result i32)
-    (block i32)
+    (block (result i32))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-value-void-vs-num (result i32)
-    (block i32 (nop))
+    (block (result i32) (nop))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-value-num-vs-num (result i32)
-    (block i32 (f32.const 0))
+    (block (result i32) (f32.const 0))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-value-unreached-select (result i32)
-    (block i64 (select (unreachable) (unreachable) (unreachable)))
+    (block (result i64) (select (unreachable) (unreachable) (unreachable)))
   ))
   "type mismatch"
 )
 
 (assert_invalid
   (module (func $type-break-last-void-vs-num (result i32)
-    (block i32 (br 0))
+    (block (result i32) (br 0))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-break-empty-vs-num (result i32)
-    (block i32 (br 0) (i32.const 1))
+    (block (result i32) (br 0) (i32.const 1))
   ))
   "type mismatch"
 )
 
 (assert_invalid
   (module (func $type-break-void-vs-num (result i32)
-    (block i32 (br 0 (nop)) (i32.const 1))
+    (block (result i32) (br 0 (nop)) (i32.const 1))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-break-num-vs-num (result i32)
-    (block i32 (br 0 (i64.const 1)) (i32.const 1))
+    (block (result i32) (br 0 (i64.const 1)) (i32.const 1))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-break-first-void-vs-num (result i32)
-    (block i32 (br 0 (nop)) (br 0 (i32.const 1)))
+    (block (result i32) (br 0 (nop)) (br 0 (i32.const 1)))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-break-first-num-vs-num (result i32)
-    (block i32 (br 0 (i64.const 1)) (br 0 (i32.const 1)))
+    (block (result i32) (br 0 (i64.const 1)) (br 0 (i32.const 1)))
   ))
   "type mismatch"
 )
 
 (assert_invalid
   (module (func $type-break-nested-num-vs-void
-    (block i32 (block i32 (br 1 (i32.const 1))) (br 0))
+    (block (result i32) (block (result i32) (br 1 (i32.const 1))) (br 0))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-break-nested-empty-vs-num (result i32)
-    (block i32 (block (br 1)) (br 0 (i32.const 1)))
+    (block (result i32) (block (br 1)) (br 0 (i32.const 1)))
   ))
   "type mismatch"
 )
 
 (assert_invalid
   (module (func $type-break-nested-void-vs-num (result i32)
-    (block i32 (block i32 (br 1 (nop))) (br 0 (i32.const 1)))
+    (block (result i32) (block (result i32) (br 1 (nop))) (br 0 (i32.const 1)))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-break-nested-num-vs-num (result i32)
-    (block i32 (block i32 (br 1 (i64.const 1))) (br 0 (i32.const 1)))
+    (block (result i32)
+      (block (result i32) (br 1 (i64.const 1))) (br 0 (i32.const 1))
+    )
   ))
   "type mismatch"
 )
@@ -259,3 +287,13 @@
   ))
   "type mismatch"
 )
+
+
+(assert_malformed
+  (module quote "(func block end $l)")
+  "mismatching label"
+)
+(assert_malformed
+  (module quote "(func block $a end $l)")
+  "mismatching label"
+)
diff --git a/test/WasmSpec/testsuite/core/br.wast b/test/WasmSpec/testsuite/core/br.wast
index 8d1c7e1..77f781d 100644
--- a/test/WasmSpec/testsuite/core/br.wast
+++ b/test/WasmSpec/testsuite/core/br.wast
@@ -10,16 +10,16 @@
   (func (export "type-f64") (block (drop (f64.neg (br 0)))))
 
   (func (export "type-i32-value") (result i32)
-    (block i32 (i32.ctz (br 0 (i32.const 1))))
+    (block (result i32) (i32.ctz (br 0 (i32.const 1))))
   )
   (func (export "type-i64-value") (result i64)
-    (block i64 (i64.ctz (br 0 (i64.const 2))))
+    (block (result i64) (i64.ctz (br 0 (i64.const 2))))
   )
   (func (export "type-f32-value") (result f32)
-    (block f32 (f32.neg (br 0 (f32.const 3))))
+    (block (result f32) (f32.neg (br 0 (f32.const 3))))
   )
   (func (export "type-f64-value") (result f64)
-    (block f64 (f64.neg (br 0 (f64.const 4))))
+    (block (result f64) (f64.neg (br 0 (f64.const 4))))
   )
 
   (func (export "as-block-first")
@@ -32,33 +32,37 @@
     (block (nop) (call $dummy) (br 0))
   )
   (func (export "as-block-value") (result i32)
-    (block i32 (nop) (call $dummy) (br 0 (i32.const 2)))
+    (block (result i32) (nop) (call $dummy) (br 0 (i32.const 2)))
   )
 
   (func (export "as-loop-first") (result i32)
-    (block i32 (loop i32 (br 1 (i32.const 3)) (i32.const 2)))
+    (block (result i32) (loop (result i32) (br 1 (i32.const 3)) (i32.const 2)))
   )
   (func (export "as-loop-mid") (result i32)
-    (block i32 (loop i32 (call $dummy) (br 1 (i32.const 4)) (i32.const 2)))
+    (block (result i32)
+      (loop (result i32) (call $dummy) (br 1 (i32.const 4)) (i32.const 2))
+    )
   )
   (func (export "as-loop-last") (result i32)
-    (block i32 (loop i32 (nop) (call $dummy) (br 1 (i32.const 5))))
+    (block (result i32)
+      (loop (result i32) (nop) (call $dummy) (br 1 (i32.const 5)))
+    )
   )
 
   (func (export "as-br-value") (result i32)
-    (block i32 (br 0 (br 0 (i32.const 9))))
+    (block (result i32) (br 0 (br 0 (i32.const 9))))
   )
 
   (func (export "as-br_if-cond")
     (block (br_if 0 (br 0)))
   )
   (func (export "as-br_if-value") (result i32)
-    (block i32
+    (block (result i32)
       (drop (br_if 0 (br 0 (i32.const 8)) (i32.const 1))) (i32.const 7)
     )
   )
   (func (export "as-br_if-value-cond") (result i32)
-    (block i32
+    (block (result i32)
       (drop (br_if 0 (i32.const 6) (br 0 (i32.const 9)))) (i32.const 7)
     )
   )
@@ -67,55 +71,82 @@
     (block (br_table 0 0 0 (br 0)))
   )
   (func (export "as-br_table-value") (result i32)
-    (block i32
+    (block (result i32)
       (br_table 0 0 0 (br 0 (i32.const 10)) (i32.const 1)) (i32.const 7)
     )
   )
   (func (export "as-br_table-value-index") (result i32)
-    (block i32
+    (block (result i32)
       (br_table 0 0 (i32.const 6) (br 0 (i32.const 11))) (i32.const 7)
     )
   )
 
   (func (export "as-return-value") (result i64)
-    (block i64 (return (br 0 (i64.const 7))))
+    (block (result i64) (return (br 0 (i64.const 7))))
   )
 
   (func (export "as-if-cond") (result i32)
-    (block i32 (if i32 (br 0 (i32.const 2)) (i32.const 0) (i32.const 1)))
+    (block (result i32)
+      (if (result i32) (br 0 (i32.const 2))
+        (then (i32.const 0))
+        (else (i32.const 1))
+      )
+    )
   )
   (func (export "as-if-then") (param i32 i32) (result i32)
-    (block i32 (if i32 (get_local 0) (br 1 (i32.const 3)) (get_local 1)))
+    (block (result i32)
+      (if (result i32) (get_local 0)
+        (then (br 1 (i32.const 3)))
+        (else (get_local 1))
+      )
+    )
   )
   (func (export "as-if-else") (param i32 i32) (result i32)
-    (block i32 (if i32 (get_local 0) (get_local 1) (br 1 (i32.const 4))))
+    (block (result i32)
+      (if (result i32) (get_local 0)
+        (then (get_local 1))
+        (else (br 1 (i32.const 4)))
+      )
+    )
   )
 
   (func (export "as-select-first") (param i32 i32) (result i32)
-    (block i32 (select (br 0 (i32.const 5)) (get_local 0) (get_local 1)))
+    (block (result i32)
+      (select (br 0 (i32.const 5)) (get_local 0) (get_local 1))
+    )
   )
   (func (export "as-select-second") (param i32 i32) (result i32)
-    (block i32 (select (get_local 0) (br 0 (i32.const 6)) (get_local 1)))
+    (block (result i32)
+      (select (get_local 0) (br 0 (i32.const 6)) (get_local 1))
+    )
   )
   (func (export "as-select-cond") (result i32)
-    (block i32 (select (i32.const 0) (i32.const 1) (br 0 (i32.const 7))))
+    (block (result i32)
+      (select (i32.const 0) (i32.const 1) (br 0 (i32.const 7)))
+    )
   )
 
   (func $f (param i32 i32 i32) (result i32) (i32.const -1))
   (func (export "as-call-first") (result i32)
-    (block i32 (call $f (br 0 (i32.const 12)) (i32.const 2) (i32.const 3)))
+    (block (result i32)
+      (call $f (br 0 (i32.const 12)) (i32.const 2) (i32.const 3))
+    )
   )
   (func (export "as-call-mid") (result i32)
-    (block i32 (call $f (i32.const 1) (br 0 (i32.const 13)) (i32.const 3)))
+    (block (result i32)
+      (call $f (i32.const 1) (br 0 (i32.const 13)) (i32.const 3))
+    )
   )
   (func (export "as-call-last") (result i32)
-    (block i32 (call $f (i32.const 1) (i32.const 2) (br 0 (i32.const 14))))
+    (block (result i32)
+      (call $f (i32.const 1) (i32.const 2) (br 0 (i32.const 14)))
+    )
   )
 
   (type $sig (func (param i32 i32 i32) (result i32)))
   (table anyfunc (elem $f))
   (func (export "as-call_indirect-func") (result i32)
-    (block i32
+    (block (result i32)
       (call_indirect $sig
         (br 0 (i32.const 20))
         (i32.const 1) (i32.const 2) (i32.const 3)
@@ -123,7 +154,7 @@
     )
   )
   (func (export "as-call_indirect-first") (result i32)
-    (block i32
+    (block (result i32)
       (call_indirect $sig
         (i32.const 0)
         (br 0 (i32.const 21)) (i32.const 2) (i32.const 3)
@@ -131,7 +162,7 @@
     )
   )
   (func (export "as-call_indirect-mid") (result i32)
-    (block i32
+    (block (result i32)
       (call_indirect $sig
         (i32.const 0)
         (i32.const 1) (br 0 (i32.const 22)) (i32.const 3)
@@ -139,7 +170,7 @@
     )
   )
   (func (export "as-call_indirect-last") (result i32)
-    (block i32
+    (block (result i32)
       (call_indirect $sig
         (i32.const 0)
         (i32.const 1) (i32.const 2) (br 0 (i32.const 23))
@@ -148,65 +179,73 @@
   )
 
   (func (export "as-set_local-value") (result i32) (local f32)
-    (block i32 (set_local 0 (br 0 (i32.const 17))) (i32.const -1))
+    (block (result i32) (set_local 0 (br 0 (i32.const 17))) (i32.const -1))
   )
 
   (memory 1)
   (func (export "as-load-address") (result f32)
-    (block f32 (f32.load (br 0 (f32.const 1.7))))
+    (block (result f32) (f32.load (br 0 (f32.const 1.7))))
   )
   (func (export "as-loadN-address") (result i64)
-    (block i64 (i64.load8_s (br 0 (i64.const 30))))
+    (block (result i64) (i64.load8_s (br 0 (i64.const 30))))
   )
 
   (func (export "as-store-address") (result i32)
-    (block i32 (f64.store (br 0 (i32.const 30)) (f64.const 7)) (i32.const -1))
+    (block (result i32)
+      (f64.store (br 0 (i32.const 30)) (f64.const 7)) (i32.const -1)
+    )
   )
   (func (export "as-store-value") (result i32)
-    (block i32 (i64.store (i32.const 2) (br 0 (i32.const 31))) (i32.const -1))
+    (block (result i32)
+      (i64.store (i32.const 2) (br 0 (i32.const 31))) (i32.const -1)
+    )
   )
 
   (func (export "as-storeN-address") (result i32)
-    (block i32 (i32.store8 (br 0 (i32.const 32)) (i32.const 7)) (i32.const -1))
+    (block (result i32)
+      (i32.store8 (br 0 (i32.const 32)) (i32.const 7)) (i32.const -1)
+    )
   )
   (func (export "as-storeN-value") (result i32)
-    (block i32 (i64.store16 (i32.const 2) (br 0 (i32.const 33))) (i32.const -1))
+    (block (result i32)
+      (i64.store16 (i32.const 2) (br 0 (i32.const 33))) (i32.const -1)
+    )
   )
 
   (func (export "as-unary-operand") (result f32)
-    (block f32 (f32.neg (br 0 (f32.const 3.4))))
+    (block (result f32) (f32.neg (br 0 (f32.const 3.4))))
   )
 
   (func (export "as-binary-left") (result i32)
-    (block i32 (i32.add (br 0 (i32.const 3)) (i32.const 10)))
+    (block (result i32) (i32.add (br 0 (i32.const 3)) (i32.const 10)))
   )
   (func (export "as-binary-right") (result i64)
-    (block i64 (i64.sub (i64.const 10) (br 0 (i64.const 45))))
+    (block (result i64) (i64.sub (i64.const 10) (br 0 (i64.const 45))))
   )
 
   (func (export "as-test-operand") (result i32)
-    (block i32 (i32.eqz (br 0 (i32.const 44))))
+    (block (result i32) (i32.eqz (br 0 (i32.const 44))))
   )
 
   (func (export "as-compare-left") (result i32)
-    (block i32 (f64.le (br 0 (i32.const 43)) (f64.const 10)))
+    (block (result i32) (f64.le (br 0 (i32.const 43)) (f64.const 10)))
   )
   (func (export "as-compare-right") (result i32)
-    (block i32 (f32.ne (f32.const 10) (br 0 (i32.const 42))))
+    (block (result i32) (f32.ne (f32.const 10) (br 0 (i32.const 42))))
   )
 
   (func (export "as-convert-operand") (result i32)
-    (block i32 (i32.wrap/i64 (br 0 (i32.const 41))))
+    (block (result i32) (i32.wrap/i64 (br 0 (i32.const 41))))
   )
 
   (func (export "as-grow_memory-size") (result i32)
-    (block i32 (grow_memory (br 0 (i32.const 40))))
+    (block (result i32) (grow_memory (br 0 (i32.const 40))))
   )
 
   (func (export "nested-block-value") (result i32)
     (i32.add
       (i32.const 1)
-      (block i32
+      (block (result i32)
         (call $dummy)
         (i32.add (i32.const 4) (br 0 (i32.const 8)))
       )
@@ -216,10 +255,10 @@
   (func (export "nested-br-value") (result i32)
     (i32.add
       (i32.const 1)
-      (block i32
+      (block (result i32)
         (drop (i32.const 2))
         (drop
-          (block i32
+          (block (result i32)
             (drop (i32.const 4))
             (br 0 (br 1 (i32.const 8)))
           )
@@ -232,10 +271,10 @@
   (func (export "nested-br_if-value") (result i32)
     (i32.add
       (i32.const 1)
-      (block i32
+      (block (result i32)
         (drop (i32.const 2))
         (drop
-          (block i32
+          (block (result i32)
             (drop (i32.const 4))
             (drop (br_if 0 (br 1 (i32.const 8)) (i32.const 1)))
             (i32.const 32)
@@ -249,7 +288,7 @@
   (func (export "nested-br_if-value-cond") (result i32)
     (i32.add
       (i32.const 1)
-      (block i32
+      (block (result i32)
         (drop (i32.const 2))
         (drop (br_if 0 (i32.const 4) (br 0 (i32.const 8))))
         (i32.const 16)
@@ -260,10 +299,10 @@
   (func (export "nested-br_table-value") (result i32)
     (i32.add
       (i32.const 1)
-      (block i32
+      (block (result i32)
         (drop (i32.const 2))
         (drop
-          (block i32
+          (block (result i32)
             (drop (i32.const 4))
             (br_table 0 (br 1 (i32.const 8)) (i32.const 1))
           )
@@ -276,7 +315,7 @@
   (func (export "nested-br_table-value-index") (result i32)
     (i32.add
       (i32.const 1)
-      (block i32
+      (block (result i32)
         (drop (i32.const 2))
         (br_table 0 (i32.const 4) (br 0 (i32.const 8)))
         (i32.const 16)
@@ -370,26 +409,26 @@
 
 (assert_invalid
   (module (func $type-arg-empty-vs-num (result i32)
-    (block i32 (br 0) (i32.const 1))
+    (block (result i32) (br 0) (i32.const 1))
   ))
   "type mismatch"
 )
 
 (assert_invalid
   (module (func $type-arg-void-vs-num (result i32)
-    (block i32 (br 0 (nop)) (i32.const 1))
+    (block (result i32) (br 0 (nop)) (i32.const 1))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-arg-void-vs-num-nested (result i32)
-    (block i32 (i32.const 0) (block (br 1)))
+    (block (result i32) (i32.const 0) (block (br 1)))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-arg-num-vs-num (result i32)
-    (block i32 (br 0 (i64.const 1)) (i32.const 1))
+    (block (result i32) (br 0 (i64.const 1)) (i32.const 1))
   ))
   "type mismatch"
 )
diff --git a/test/WasmSpec/testsuite/core/br_if.wast b/test/WasmSpec/testsuite/core/br_if.wast
index 6fcfc64..0aa46d4 100644
--- a/test/WasmSpec/testsuite/core/br_if.wast
+++ b/test/WasmSpec/testsuite/core/br_if.wast
@@ -14,13 +14,19 @@
     (block (call $dummy) (call $dummy) (br_if 0 (get_local 0)))
   )
   (func (export "as-block-first-value") (param i32) (result i32)
-    (block i32 (drop (br_if 0 (i32.const 10) (get_local 0))) (return (i32.const 11)))
+    (block (result i32)
+      (drop (br_if 0 (i32.const 10) (get_local 0))) (return (i32.const 11))
+    )
   )
   (func (export "as-block-mid-value") (param i32) (result i32)
-    (block i32 (call $dummy) (drop (br_if 0 (i32.const 20) (get_local 0))) (return (i32.const 21)))
+    (block (result i32)
+      (call $dummy)
+      (drop (br_if 0 (i32.const 20) (get_local 0)))
+      (return (i32.const 21))
+    )
   )
   (func (export "as-block-last-value") (param i32) (result i32)
-    (block i32
+    (block (result i32)
       (call $dummy) (call $dummy) (br_if 0 (i32.const 11) (get_local 0))
     )
   )
@@ -37,20 +43,24 @@
   )
 
   (func (export "as-if-then") (param i32 i32)
-    (block (if (get_local 0) (br_if 1 (get_local 1)) (call $dummy)))
+    (block
+      (if (get_local 0) (then (br_if 1 (get_local 1))) (else (call $dummy)))
+    )
   )
   (func (export "as-if-else") (param i32 i32)
-    (block (if (get_local 0) (call $dummy) (br_if 1 (get_local 1))))
+    (block
+      (if (get_local 0) (then (call $dummy)) (else (br_if 1 (get_local 1))))
+    )
   )
 
   (func (export "nested-block-value") (param i32) (result i32)
     (i32.add
       (i32.const 1)
-      (block i32
+      (block (result i32)
         (drop (i32.const 2))
         (i32.add
           (i32.const 4)
-          (block i32
+          (block (result i32)
             (drop (br_if 1 (i32.const 8) (get_local 0)))
             (i32.const 16)
           )
@@ -62,10 +72,12 @@
   (func (export "nested-br-value") (param i32) (result i32)
     (i32.add
       (i32.const 1)
-      (block i32
+      (block (result i32)
         (drop (i32.const 2))
         (br 0
-          (block i32 (drop (br_if 1 (i32.const 8) (get_local 0))) (i32.const 4))
+          (block (result i32)
+            (drop (br_if 1 (i32.const 8) (get_local 0))) (i32.const 4)
+          )
         )
         (i32.const 16)
       )
@@ -75,10 +87,12 @@
   (func (export "nested-br_if-value") (param i32) (result i32)
     (i32.add
       (i32.const 1)
-      (block i32
+      (block (result i32)
         (drop (i32.const 2))
         (drop (br_if 0
-          (block i32 (drop (br_if 1 (i32.const 8) (get_local 0))) (i32.const 4))
+          (block (result i32)
+            (drop (br_if 1 (i32.const 8) (get_local 0))) (i32.const 4)
+          )
           (i32.const 1)
         ))
         (i32.const 16)
@@ -89,11 +103,13 @@
   (func (export "nested-br_if-value-cond") (param i32) (result i32)
     (i32.add
       (i32.const 1)
-      (block i32
+      (block (result i32)
         (drop (i32.const 2))
         (drop (br_if 0
           (i32.const 4)
-          (block i32 (drop (br_if 1 (i32.const 8) (get_local 0))) (i32.const 1))
+          (block (result i32)
+            (drop (br_if 1 (i32.const 8) (get_local 0))) (i32.const 1)
+          )
         ))
         (i32.const 16)
       )
@@ -103,10 +119,12 @@
   (func (export "nested-br_table-value") (param i32) (result i32)
     (i32.add
       (i32.const 1)
-      (block i32
+      (block (result i32)
         (drop (i32.const 2))
         (br_table 0
-          (block i32 (drop (br_if 1 (i32.const 8) (get_local 0))) (i32.const 4))
+          (block (result i32)
+            (drop (br_if 1 (i32.const 8) (get_local 0))) (i32.const 4)
+          )
           (i32.const 1)
         )
         (i32.const 16)
@@ -117,11 +135,13 @@
   (func (export "nested-br_table-value-index") (param i32) (result i32)
     (i32.add
       (i32.const 1)
-      (block i32
+      (block (result i32)
         (drop (i32.const 2))
         (br_table 0
           (i32.const 4)
-          (block i32 (drop (br_if 1 (i32.const 8) (get_local 0))) (i32.const 1))
+          (block (result i32)
+            (drop (br_if 1 (i32.const 8) (get_local 0))) (i32.const 1)
+          )
         )
         (i32.const 16)
       )
@@ -203,13 +223,13 @@
 
 (assert_invalid
   (module (func $type-false-arg-void-vs-num (result i32)
-    (block i32 (br_if 0 (i32.const 0)) (i32.const 1))
+    (block (result i32) (br_if 0 (i32.const 0)) (i32.const 1))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-true-arg-void-vs-num (result i32)
-    (block i32 (br_if 0 (i32.const 1)) (i32.const 1))
+    (block (result i32) (br_if 0 (i32.const 1)) (i32.const 1))
   ))
   "type mismatch"
 )
@@ -228,25 +248,29 @@
 
 (assert_invalid
   (module (func $type-false-arg-void-vs-num (result i32)
-    (block i32 (br_if 0 (nop) (i32.const 0)) (i32.const 1))
+    (block (result i32) (br_if 0 (nop) (i32.const 0)) (i32.const 1))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-true-arg-void-vs-num (result i32)
-    (block i32 (br_if 0 (nop) (i32.const 1)) (i32.const 1))
+    (block (result i32) (br_if 0 (nop) (i32.const 1)) (i32.const 1))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-false-arg-num-vs-num (result i32)
-    (block i32 (drop (br_if 0 (i64.const 1) (i32.const 0))) (i32.const 1))
+    (block (result i32)
+      (drop (br_if 0 (i64.const 1) (i32.const 0))) (i32.const 1)
+    )
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-true-arg-num-vs-num (result i32)
-    (block i32 (drop (br_if 0 (i64.const 1) (i32.const 0))) (i32.const 1))
+    (block (result i32)
+      (drop (br_if 0 (i64.const 1) (i32.const 0))) (i32.const 1)
+    )
   ))
   "type mismatch"
 )
@@ -265,19 +289,19 @@
 )
 (assert_invalid
   (module (func $type-arg-cond-void-vs-i32 (result i32)
-    (block i32 (br_if 0 (i32.const 0) (nop)) (i32.const 1))
+    (block (result i32) (br_if 0 (i32.const 0) (nop)) (i32.const 1))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-arg-void-vs-num-nested (result i32)
-    (block i32 (i32.const 0) (block (br_if 1 (i32.const 1))))
+    (block (result i32) (i32.const 0) (block (br_if 1 (i32.const 1))))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-arg-cond-num-vs-i32 (result i32)
-    (block i32 (br_if 0 (i32.const 0) (i64.const 0)) (i32.const 1))
+    (block (result i32) (br_if 0 (i32.const 0) (i64.const 0)) (i32.const 1))
   ))
   "type mismatch"
 )
diff --git a/test/WasmSpec/testsuite/core/br_table.wast b/test/WasmSpec/testsuite/core/br_table.wast
index 620bc9b..c8d6082 100644
--- a/test/WasmSpec/testsuite/core/br_table.wast
+++ b/test/WasmSpec/testsuite/core/br_table.wast
@@ -18,16 +18,16 @@
   )
 
   (func (export "type-i32-value") (result i32)
-    (block i32 (i32.ctz (br_table 0 0 (i32.const 1) (i32.const 0))))
+    (block (result i32) (i32.ctz (br_table 0 0 (i32.const 1) (i32.const 0))))
   )
   (func (export "type-i64-value") (result i64)
-    (block i64 (i64.ctz (br_table 0 0 (i64.const 2) (i32.const 0))))
+    (block (result i64) (i64.ctz (br_table 0 0 (i64.const 2) (i32.const 0))))
   )
   (func (export "type-f32-value") (result f32)
-    (block f32 (f32.neg (br_table 0 0 (f32.const 3) (i32.const 0))))
+    (block (result f32) (f32.neg (br_table 0 0 (f32.const 3) (i32.const 0))))
   )
   (func (export "type-f64-value") (result f64)
-    (block f64 (f64.neg (br_table 0 0 (f64.const 4) (i32.const 0))))
+    (block (result f64) (f64.neg (br_table 0 0 (f64.const 4) (i32.const 0))))
   )
 
   (func (export "empty") (param i32) (result i32)
@@ -35,7 +35,9 @@
     (i32.const 22)
   )
   (func (export "empty-value") (param i32) (result i32)
-    (block i32 (br_table 0 (i32.const 33) (get_local 0)) (i32.const 31))
+    (block (result i32)
+      (br_table 0 (i32.const 33) (get_local 0)) (i32.const 31)
+    )
   )
 
   (func (export "singleton") (param i32) (result i32)
@@ -50,9 +52,9 @@
   )
 
   (func (export "singleton-value") (param i32) (result i32)
-    (block i32
+    (block (result i32)
       (drop
-        (block i32
+        (block (result i32)
           (br_table 0 1 (i32.const 33) (get_local 0))
           (return (i32.const 31))
         )
@@ -83,11 +85,11 @@
 
   (func (export "multiple-value") (param i32) (result i32)
     (local i32)
-    (set_local 1 (block i32
-      (set_local 1 (block i32
-        (set_local 1 (block i32
-          (set_local 1 (block i32
-            (set_local 1 (block i32
+    (set_local 1 (block (result i32)
+      (set_local 1 (block (result i32)
+        (set_local 1 (block (result i32)
+          (set_local 1 (block (result i32)
+            (set_local 1 (block (result i32)
               (br_table 3 2 1 0 4 (i32.const 200) (get_local 0))
               (return (i32.add (get_local 1) (i32.const 99)))
             ))
@@ -849,38 +851,42 @@
     (block (nop) (call $dummy) (br_table 0 0 0 (i32.const 0)))
   )
   (func (export "as-block-value") (result i32)
-    (block i32 (nop) (call $dummy) (br_table 0 0 0 (i32.const 2) (i32.const 0)))
+    (block (result i32)
+      (nop) (call $dummy) (br_table 0 0 0 (i32.const 2) (i32.const 0))
+    )
   )
 
   (func (export "as-loop-first") (result i32)
-    (loop i32 (br_table 1 1 (i32.const 3) (i32.const 0)) (i32.const 1))
+    (loop (result i32) (br_table 1 1 (i32.const 3) (i32.const 0)) (i32.const 1))
   )
   (func (export "as-loop-mid") (result i32)
-    (loop i32
+    (loop (result i32)
       (call $dummy)
       (br_table 1 1 1 (i32.const 4) (i32.const -1))
       (i32.const 2)
     )
   )
   (func (export "as-loop-last") (result i32)
-    (loop i32 (nop) (call $dummy) (br_table 1 1 1 (i32.const 5) (i32.const 1)))
+    (loop (result i32)
+      (nop) (call $dummy) (br_table 1 1 1 (i32.const 5) (i32.const 1))
+    )
   )
 
   (func (export "as-br-value") (result i32)
-    (block i32 (br 0 (br 0 (i32.const 9))))
+    (block (result i32) (br 0 (br 0 (i32.const 9))))
   )
 
   (func (export "as-br_if-cond")
     (block (br_if 0 (br_table 0 0 0 (i32.const 1))))
   )
   (func (export "as-br_if-value") (result i32)
-    (block i32
+    (block (result i32)
       (drop (br_if 0 (br_table 0 (i32.const 8) (i32.const 0)) (i32.const 1)))
       (i32.const 7)
     )
   )
   (func (export "as-br_if-value-cond") (result i32)
-    (block i32
+    (block (result i32)
       (drop (br_if 0 (i32.const 6) (br_table 0 0 (i32.const 9) (i32.const 0))))
       (i32.const 7)
     )
@@ -890,66 +896,66 @@
     (block (br_table 0 0 0 (br_table 0 (i32.const 1))))
   )
   (func (export "as-br_table-value") (result i32)
-    (block i32
+    (block (result i32)
       (br_table 0 0 0 (br_table 0 (i32.const 10) (i32.const 0)) (i32.const 1))
       (i32.const 7)
     )
   )
   (func (export "as-br_table-value-index") (result i32)
-    (block i32
+    (block (result i32)
       (br_table 0 0 (i32.const 6) (br_table 0 (i32.const 11) (i32.const 1)))
       (i32.const 7)
     )
   )
 
   (func (export "as-return-value") (result i64)
-    (block i64 (return (br_table 0 (i64.const 7) (i32.const 0))))
+    (block (result i64) (return (br_table 0 (i64.const 7) (i32.const 0))))
   )
 
   (func (export "as-if-cond") (result i32)
-    (block i32
-      (if i32
+    (block (result i32)
+      (if (result i32)
         (br_table 0 (i32.const 2) (i32.const 0))
-        (i32.const 0)
-        (i32.const 1)
+        (then (i32.const 0))
+        (else (i32.const 1))
       )
     )
   )
   (func (export "as-if-then") (param i32 i32) (result i32)
-    (block i32
-      (if i32
+    (block (result i32)
+      (if (result i32)
         (get_local 0)
-        (br_table 1 (i32.const 3) (i32.const 0))
-        (get_local 1)
+        (then (br_table 1 (i32.const 3) (i32.const 0)))
+        (else (get_local 1))
       )
     )
   )
   (func (export "as-if-else") (param i32 i32) (result i32)
-    (block i32
-      (if i32
+    (block (result i32)
+      (if (result i32)
         (get_local 0)
-        (get_local 1)
-        (br_table 1 0 (i32.const 4) (i32.const 0))
+        (then (get_local 1))
+        (else (br_table 1 0 (i32.const 4) (i32.const 0)))
       )
     )
   )
 
   (func (export "as-select-first") (param i32 i32) (result i32)
-    (block i32
+    (block (result i32)
       (select
         (br_table 0 (i32.const 5) (i32.const 0)) (get_local 0) (get_local 1)
       )
     )
   )
   (func (export "as-select-second") (param i32 i32) (result i32)
-    (block i32
+    (block (result i32)
       (select
         (get_local 0) (br_table 0 (i32.const 6) (i32.const 1)) (get_local 1)
       )
     )
   )
   (func (export "as-select-cond") (result i32)
-    (block i32
+    (block (result i32)
       (select
         (i32.const 0) (i32.const 1) (br_table 0 (i32.const 7) (i32.const 1))
       )
@@ -958,21 +964,21 @@
 
   (func $f (param i32 i32 i32) (result i32) (i32.const -1))
   (func (export "as-call-first") (result i32)
-    (block i32
+    (block (result i32)
       (call $f
         (br_table 0 (i32.const 12) (i32.const 1)) (i32.const 2) (i32.const 3)
       )
     )
   )
   (func (export "as-call-mid") (result i32)
-    (block i32
+    (block (result i32)
       (call $f
         (i32.const 1) (br_table 0 (i32.const 13) (i32.const 1)) (i32.const 3)
       )
     )
   )
   (func (export "as-call-last") (result i32)
-    (block i32
+    (block (result i32)
       (call $f
         (i32.const 1) (i32.const 2) (br_table 0 (i32.const 14) (i32.const 1))
       )
@@ -982,7 +988,7 @@
   (type $sig (func (param i32 i32 i32) (result i32)))
   (table anyfunc (elem $f))
   (func (export "as-call_indirect-first") (result i32)
-    (block i32
+    (block (result i32)
       (call_indirect $sig
         (br_table 0 (i32.const 20) (i32.const 1)) (i32.const 1) (i32.const 2)
         (i32.const 3)
@@ -990,7 +996,7 @@
     )
   )
   (func (export "as-call_indirect-mid") (result i32)
-    (block i32
+    (block (result i32)
       (call_indirect $sig
         (i32.const 0) (br_table 0 (i32.const 21) (i32.const 1)) (i32.const 2)
         (i32.const 3)
@@ -998,7 +1004,7 @@
     )
   )
   (func (export "as-call_indirect-last") (result i32)
-    (block i32
+    (block (result i32)
       (call_indirect $sig
         (i32.const 0) (i32.const 1) (br_table 0 (i32.const 22) (i32.const 1))
         (i32.const 3)
@@ -1006,7 +1012,7 @@
     )
   )
   (func (export "as-call_indirect-func") (result i32)
-    (block i32
+    (block (result i32)
       (call_indirect $sig
         (i32.const 0) (i32.const 1) (i32.const 2)
         (br_table 0 (i32.const 23) (i32.const 1))
@@ -1016,7 +1022,7 @@
 
   (func (export "as-set_local-value") (result i32)
     (local f32)
-    (block i32
+    (block (result i32)
       (set_local 0 (br_table 0 (i32.const 17) (i32.const 1)))
       (i32.const -1)
     )
@@ -1024,85 +1030,87 @@
 
   (memory 1)
   (func (export "as-load-address") (result f32)
-    (block f32 (f32.load (br_table 0 (f32.const 1.7) (i32.const 1))))
+    (block (result f32) (f32.load (br_table 0 (f32.const 1.7) (i32.const 1))))
   )
   (func (export "as-loadN-address") (result i64)
-    (block i64 (i64.load8_s (br_table 0 (i64.const 30) (i32.const 1))))
+    (block (result i64) (i64.load8_s (br_table 0 (i64.const 30) (i32.const 1))))
   )
 
   (func (export "as-store-address") (result i32)
-    (block i32
+    (block (result i32)
       (f64.store (br_table 0 (i32.const 30) (i32.const 1)) (f64.const 7))
       (i32.const -1)
     )
   )
   (func (export "as-store-value") (result i32)
-    (block i32
+    (block (result i32)
       (i64.store (i32.const 2) (br_table 0 (i32.const 31) (i32.const 1)))
       (i32.const -1)
      )
   )
 
   (func (export "as-storeN-address") (result i32)
-    (block i32
+    (block (result i32)
       (i32.store8 (br_table 0 (i32.const 32) (i32.const 0)) (i32.const 7))
       (i32.const -1)
     )
   )
   (func (export "as-storeN-value") (result i32)
-    (block i32
+    (block (result i32)
       (i64.store16 (i32.const 2) (br_table 0 (i32.const 33) (i32.const 0)))
       (i32.const -1)
     )
   )
 
   (func (export "as-unary-operand") (result f32)
-    (block f32 (f32.neg (br_table 0 (f32.const 3.4) (i32.const 0))))
+    (block (result f32) (f32.neg (br_table 0 (f32.const 3.4) (i32.const 0))))
   )
 
   (func (export "as-binary-left") (result i32)
-    (block i32
+    (block (result i32)
       (i32.add (br_table 0 0 (i32.const 3) (i32.const 0)) (i32.const 10))
     )
   )
   (func (export "as-binary-right") (result i64)
-    (block i64
+    (block (result i64)
       (i64.sub (i64.const 10) (br_table 0 (i64.const 45) (i32.const 0)))
     )
   )
 
   (func (export "as-test-operand") (result i32)
-    (block i32 (i32.eqz (br_table 0 (i32.const 44) (i32.const 0))))
+    (block (result i32) (i32.eqz (br_table 0 (i32.const 44) (i32.const 0))))
   )
 
   (func (export "as-compare-left") (result i32)
-    (block i32
+    (block (result i32)
       (f64.le (br_table 0 0 (i32.const 43) (i32.const 0)) (f64.const 10))
     )
   )
   (func (export "as-compare-right") (result i32)
-    (block i32
+    (block (result i32)
       (f32.ne (f32.const 10) (br_table 0 (i32.const 42) (i32.const 0)))
     )
   )
 
   (func (export "as-convert-operand") (result i32)
-    (block i32 (i32.wrap/i64 (br_table 0 (i32.const 41) (i32.const 0))))
+    (block (result i32)
+      (i32.wrap/i64 (br_table 0 (i32.const 41) (i32.const 0)))
+    )
   )
 
   (func (export "as-grow_memory-size") (result i32)
-    (block i32 (grow_memory (br_table 0 (i32.const 40) (i32.const 0))))
+    (block (result i32) (grow_memory (br_table 0 (i32.const 40) (i32.const 0))))
   )
 
   (func (export "nested-block-value") (param i32) (result i32)
-    (block i32
+    (block (result i32)
       (drop (i32.const -1))
       (i32.add
         (i32.const 1)
-        (block i32
+        (block (result i32)
           (i32.add
             (i32.const 2)
-            (block i32
+            (block (result i32)
               (drop (i32.const 4))
               (i32.add
                 (i32.const 8)
@@ -1116,13 +1124,13 @@
   )
 
   (func (export "nested-br-value") (param i32) (result i32)
-    (block i32
+    (block (result i32)
       (i32.add
         (i32.const 1)
-        (block i32
+        (block (result i32)
           (drop (i32.const 2))
           (drop
-            (block i32
+            (block (result i32)
               (drop (i32.const 4))
               (br 0 (br_table 2 1 0 (i32.const 8) (get_local 0)))
             )
@@ -1134,13 +1142,13 @@
   )
 
   (func (export "nested-br_if-value") (param i32) (result i32)
-    (block i32
+    (block (result i32)
       (i32.add
         (i32.const 1)
-        (block i32
+        (block (result i32)
           (drop (i32.const 2))
           (drop
-            (block i32
+            (block (result i32)
               (drop (i32.const 4))
               (drop
                 (br_if 0
@@ -1158,10 +1166,10 @@
   )
 
   (func (export "nested-br_if-value-cond") (param i32) (result i32)
-    (block i32
+    (block (result i32)
       (i32.add
         (i32.const 1)
-        (block i32
+        (block (result i32)
           (drop (i32.const 2))
           (drop
             (br_if 0 (i32.const 4) (br_table 0 1 0 (i32.const 8) (get_local 0)))
@@ -1173,13 +1181,13 @@
   )
 
   (func (export "nested-br_table-value") (param i32) (result i32)
-    (block i32
+    (block (result i32)
       (i32.add
         (i32.const 1)
-        (block i32
+        (block (result i32)
           (drop (i32.const 2))
           (drop
-            (block i32
+            (block (result i32)
               (drop (i32.const 4))
               (br_table 0 (br_table 0 1 2 (i32.const 8) (get_local 0)) (i32.const 1))
               (i32.const 32)
@@ -1192,10 +1200,10 @@
   )
 
   (func (export "nested-br_table-value-index") (param i32) (result i32)
-    (block i32
+    (block (result i32)
       (i32.add
         (i32.const 1)
-        (block i32
+        (block (result i32)
           (drop (i32.const 2))
           (br_table 0 (i32.const 4) (br_table 0 1 0 (i32.const 8) (get_local 0)))
           (i32.const 16)
@@ -1203,6 +1211,23 @@
       )
     )
   )
+
+  (func (export "nested-br_table-loop-block") (param i32) (result i32)
+    (set_local 0
+      (loop (result i32)
+        (block
+          (br_table 1 0 0 (get_local 0))
+        )
+        (i32.const 0)
+      )
+    )
+    (loop (result i32)
+      (block
+        (br_table 0 1 1 (get_local 0))
+      )
+      (i32.const 3)
+    )
+  )
 )
 
 (assert_return (invoke "type-i32"))
@@ -1382,6 +1407,8 @@
 (assert_return (invoke "nested-br_table-value-index" (i32.const -1000000)) (i32.const 9))
 (assert_return (invoke "nested-br_table-value-index" (i32.const 9423975)) (i32.const 9))
 
+(assert_return (invoke "nested-br_table-loop-block" (i32.const 1)) (i32.const 3))
+
 (assert_invalid
   (module (func $type-arg-void-vs-num (result i32)
     (block (br_table 0 (i32.const 1)) (i32.const 1))
@@ -1391,20 +1418,22 @@
 
 (assert_invalid
   (module (func $type-arg-void-vs-num (result i32)
-    (block i32 (br_table 0 (nop) (i32.const 1)) (i32.const 1))
+    (block (result i32) (br_table 0 (nop) (i32.const 1)) (i32.const 1))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-arg-num-vs-num (result i32)
-    (block i32 (br_table 0 0 0 (i64.const 1) (i32.const 1)) (i32.const 1))
+    (block (result i32)
+      (br_table 0 0 0 (i64.const 1) (i32.const 1)) (i32.const 1)
+    )
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-arg-num-vs-arg-num
     (block
-      (block f32
+      (block (result f32)
         (br_table 0 1 (f32.const 0) (i32.const 0))
       )
       (drop)
@@ -1427,19 +1456,21 @@
 )
 (assert_invalid
   (module (func $type-arg-index-void-vs-i32 (result i32)
-    (block i32 (br_table 0 0 (i32.const 0) (nop)) (i32.const 1))
+    (block (result i32) (br_table 0 0 (i32.const 0) (nop)) (i32.const 1))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-arg-void-vs-num-nested (result i32)
-    (block i32 (i32.const 0) (block (br_table 1 (i32.const 0))))
+    (block (result i32) (i32.const 0) (block (br_table 1 (i32.const 0))))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-arg-index-num-vs-i32 (result i32)
-    (block i32 (br_table 0 0 (i32.const 0) (i64.const 0)) (i32.const 1))
+    (block (result i32)
+      (br_table 0 0 (i32.const 0) (i64.const 0)) (i32.const 1)
+    )
   ))
   "type mismatch"
 )
diff --git a/test/WasmSpec/testsuite/core/call.wast b/test/WasmSpec/testsuite/core/call.wast
index 612daf2..3a89f23 100644
--- a/test/WasmSpec/testsuite/core/call.wast
+++ b/test/WasmSpec/testsuite/core/call.wast
@@ -45,42 +45,51 @@
   ;; Recursion
 
   (func $fac (export "fac") (param i64) (result i64)
-    (if i64 (i64.eqz (get_local 0))
-      (i64.const 1)
-      (i64.mul (get_local 0) (call $fac (i64.sub (get_local 0) (i64.const 1))))
+    (if (result i64) (i64.eqz (get_local 0))
+      (then (i64.const 1))
+      (else
+        (i64.mul
+          (get_local 0)
+          (call $fac (i64.sub (get_local 0) (i64.const 1)))
+        )
+      )
     )
   )
 
   (func $fac-acc (export "fac-acc") (param i64 i64) (result i64)
-    (if i64 (i64.eqz (get_local 0))
-      (get_local 1)
-      (call $fac-acc
-        (i64.sub (get_local 0) (i64.const 1))
-        (i64.mul (get_local 0) (get_local 1))
+    (if (result i64) (i64.eqz (get_local 0))
+      (then (get_local 1))
+      (else
+        (call $fac-acc
+          (i64.sub (get_local 0) (i64.const 1))
+          (i64.mul (get_local 0) (get_local 1))
+        )
       )
     )
   )
 
   (func $fib (export "fib") (param i64) (result i64)
-    (if i64 (i64.le_u (get_local 0) (i64.const 1))
-      (i64.const 1)
-      (i64.add
-        (call $fib (i64.sub (get_local 0) (i64.const 2)))
-        (call $fib (i64.sub (get_local 0) (i64.const 1)))
+    (if (result i64) (i64.le_u (get_local 0) (i64.const 1))
+      (then (i64.const 1))
+      (else
+        (i64.add
+          (call $fib (i64.sub (get_local 0) (i64.const 2)))
+          (call $fib (i64.sub (get_local 0) (i64.const 1)))
+        )
       )
     )
   )
 
   (func $even (export "even") (param i64) (result i32)
-    (if i32 (i64.eqz (get_local 0))
-      (i32.const 44)
-      (call $odd (i64.sub (get_local 0) (i64.const 1)))
+    (if (result i32) (i64.eqz (get_local 0))
+      (then (i32.const 44))
+      (else (call $odd (i64.sub (get_local 0) (i64.const 1))))
     )
   )
   (func $odd (export "odd") (param i64) (result i32)
-    (if i32 (i64.eqz (get_local 0))
-      (i32.const 99)
-      (call $even (i64.sub (get_local 0) (i64.const 1)))
+    (if (result i32) (i64.eqz (get_local 0))
+      (then (i32.const 99))
+      (else (call $even (i64.sub (get_local 0) (i64.const 1))))
     )
   )
 
diff --git a/test/WasmSpec/testsuite/core/call_indirect.wast b/test/WasmSpec/testsuite/core/call_indirect.wast
index 532f613..3c27c53 100644
--- a/test/WasmSpec/testsuite/core/call_indirect.wast
+++ b/test/WasmSpec/testsuite/core/call_indirect.wast
@@ -102,49 +102,57 @@
   ;; Recursion
 
   (func $fac (export "fac") (type $over-i64)
-    (if i64 (i64.eqz (get_local 0))
-      (i64.const 1)
-      (i64.mul
-        (get_local 0)
-        (call_indirect $over-i64
-          (i64.sub (get_local 0) (i64.const 1))
-          (i32.const 12)
+    (if (result i64) (i64.eqz (get_local 0))
+      (then (i64.const 1))
+      (else
+        (i64.mul
+          (get_local 0)
+          (call_indirect $over-i64
+            (i64.sub (get_local 0) (i64.const 1))
+            (i32.const 12)
+          )
         )
       )
     )
   )
 
   (func $fib (export "fib") (type $over-i64)
-    (if i64 (i64.le_u (get_local 0) (i64.const 1))
-      (i64.const 1)
-      (i64.add
-        (call_indirect $over-i64
-          (i64.sub (get_local 0) (i64.const 2))
-          (i32.const 13)
-        )
-        (call_indirect $over-i64
-          (i64.sub (get_local 0) (i64.const 1))
-          (i32.const 13)
+    (if (result i64) (i64.le_u (get_local 0) (i64.const 1))
+      (then (i64.const 1))
+      (else
+        (i64.add
+          (call_indirect $over-i64
+            (i64.sub (get_local 0) (i64.const 2))
+            (i32.const 13)
+          )
+          (call_indirect $over-i64
+            (i64.sub (get_local 0) (i64.const 1))
+            (i32.const 13)
+          )
         )
       )
     )
   )
 
   (func $even (export "even") (param i32) (result i32)
-    (if i32 (i32.eqz (get_local 0))
-      (i32.const 44)
-      (call_indirect $over-i32
-        (i32.sub (get_local 0) (i32.const 1))
-        (i32.const 15)
+    (if (result i32) (i32.eqz (get_local 0))
+      (then (i32.const 44))
+      (else
+        (call_indirect $over-i32
+          (i32.sub (get_local 0) (i32.const 1))
+          (i32.const 15)
+        )
       )
     )
   )
   (func $odd (export "odd") (param i32) (result i32)
-    (if i32 (i32.eqz (get_local 0))
-      (i32.const 99)
-      (call_indirect $over-i32
-        (i32.sub (get_local 0) (i32.const 1))
-        (i32.const 14)
+    (if (result i32) (i32.eqz (get_local 0))
+      (then (i32.const 99))
+      (else
+        (call_indirect $over-i32
+          (i32.sub (get_local 0) (i32.const 1))
+          (i32.const 14)
+        )
       )
     )
   )
@@ -364,7 +372,7 @@
 
 ;; Unbound function in table
 
-(assert_invalid 
+(assert_invalid
   (module (table anyfunc (elem 0 0)))
   "unknown function 0"
 )
diff --git a/test/WasmSpec/testsuite/core/comments.wast b/test/WasmSpec/testsuite/core/comments.wast
deleted file mode 100644
index 07a6298..0000000
--- a/test/WasmSpec/testsuite/core/comments.wast
+++ /dev/null
@@ -1,69 +0,0 @@
-;; Test comment syntax
-
-;;comment
-
-;;;;;;;;;;;
-
-    ;;comment
-
-( ;;comment
-module;;comment
-);;comment
-
-;;)
-;;;)
-;; ;)
-;; (;
-
-(;;)
-
-(;comment;)
-
-(;;comment;)
-
-(;;;comment;)
-
-(;;;;;;;;;;;;;;)
-
-(;(((((((((( ;)
-
-(;)))))))))));)
-
-(;comment";)
-
-(;comment"";)
-
-(;comment""";)
-
-(;Heiße Würstchen;)
-
-(;í ½í¸ší¸Ží ½í²©;)
-
-(;comment
-comment;)
-
-         	(;comment;)
-
-(;comment;)((;comment;)
-(;comment;)module(;comment;)
-(;comment;))(;comment;)
-
-(;comment(;nested;)comment;)
-
-(;comment
-(;nested
-;)comment
-;)
-
-(module
-  (;comment(;nested(;further;)nested;)comment;)
-)
-
-(;comment;;comment;)
-
-(;comment;;comment
-;)
-
-(module
-  (;comment;;comment(;nested;)comment;)
-)
\ No newline at end of file
diff --git a/test/WasmSpec/testsuite/core/const.wast b/test/WasmSpec/testsuite/core/const.wast
new file mode 100644
index 0000000..5929646
--- /dev/null
+++ b/test/WasmSpec/testsuite/core/const.wast
@@ -0,0 +1,137 @@
+;; Test t.const instructions
+
+;; Syntax error
+
+(module (func (i32.const 0xffffffff) drop))
+(module (func (i32.const -0x80000000) drop))
+(assert_malformed
+  (module quote "(func (i32.const 0x100000000) drop)")
+  "constant out of range"
+)
+(assert_malformed
+  (module quote "(func (i32.const -0x80000001) drop)")
+  "constant out of range"
+)
+
+(module (func (i32.const 4294967295) drop))
+(module (func (i32.const -2147483648) drop))
+(assert_malformed
+  (module quote "(func (i32.const 4294967296) drop)")
+  "constant out of range"
+)
+(assert_malformed
+  (module quote "(func (i32.const -2147483649) drop)")
+  "constant out of range"
+)
+
+(module (func (i64.const 0xffffffffffffffff) drop))
+(module (func (i64.const -0x8000000000000000) drop))
+(assert_malformed
+  (module quote "(func (i64.const 0x10000000000000000) drop)")
+  "constant out of range"
+)
+(assert_malformed
+  (module quote "(func (i64.const -0x8000000000000001) drop)")
+  "constant out of range"
+)
+
+(module (func (i64.const 18446744073709551615) drop))
+(module (func (i64.const -9223372036854775808) drop))
+(assert_malformed
+  (module quote "(func (i64.const 18446744073709551616) drop)")
+  "constant out of range"
+)
+(assert_malformed
+  (module quote "(func (i64.const -9223372036854775809) drop)")
+  "constant out of range"
+)
+
+(module (func (f32.const 0x1p127) drop))
+(module (func (f32.const -0x1p127) drop))
+(module (func (f32.const 0x1.fffffep127) drop))
+(module (func (f32.const -0x1.fffffep127) drop))
+(module (func (f32.const 0x1.fffffe7p127) drop))
+(module (func (f32.const -0x1.fffffe7p127) drop))
+(assert_malformed
+  (module quote "(func (f32.const 0x1p128) drop)")
+  "constant out of range"
+)
+(assert_malformed
+  (module quote "(func (f32.const -0x1p128) drop)")
+  "constant out of range"
+)
+(assert_malformed
+  (module quote "(func (f32.const 0x1.ffffffp127) drop)")
+  "constant out of range"
+)
+(assert_malformed
+  (module quote "(func (f32.const -0x1.ffffffp127) drop)")
+  "constant out of range"
+)
+
+(module (func (f32.const 1e38) drop))
+(module (func (f32.const -1e38) drop))
+(assert_malformed
+  (module quote "(func (f32.const 1e39) drop)")
+  "constant out of range"
+)
+(assert_malformed
+  (module quote "(func (f32.const -1e39) drop)")
+  "constant out of range"
+)
+
+(module (func (f32.const 340282356779733623858607532500980858880) drop))
+(module (func (f32.const -340282356779733623858607532500980858880) drop))
+(assert_malformed
+  (module quote "(func (f32.const 340282356779733661637539395458142568448) drop)")
+  "constant out of range"
+)
+(assert_malformed
+  (module quote "(func (f32.const -340282356779733661637539395458142568448) drop)")
+  "constant out of range"
+)
+
+(module (func (f64.const 0x1p1023) drop))
+(module (func (f64.const -0x1p1023) drop))
+(module (func (f64.const 0x1.fffffffffffffp1023) drop))
+(module (func (f64.const -0x1.fffffffffffffp1023) drop))
+(module (func (f64.const 0x1.fffffffffffff7p1023) drop))
+(module (func (f64.const -0x1.fffffffffffff7p1023) drop))
+(assert_malformed
+  (module quote "(func (f64.const 0x1p1024) drop)")
+  "constant out of range"
+)
+(assert_malformed
+  (module quote "(func (f64.const -0x1p1024) drop)")
+  "constant out of range"
+)
+(assert_malformed
+  (module quote "(func (f64.const 0x1.fffffffffffff8p1023) drop)")
+  "constant out of range"
+)
+(assert_malformed
+  (module quote "(func (f64.const -0x1.fffffffffffff8p1023) drop)")
+  "constant out of range"
+)
+
+(module (func (f64.const 1e308) drop))
+(module (func (f64.const -1e308) drop))
+(assert_malformed
+  (module quote "(func (f64.const 1e309) drop)")
+  "constant out of range"
+)
+(assert_malformed
+  (module quote "(func (f64.const -1e309) drop)")
+  "constant out of range"
+)
+
+(module (func (f64.const 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368) drop))
+(module (func (f64.const -179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368) drop))
+(assert_malformed
+  (module quote "(func (f64.const 269653970229347356221791135597556535197105851288767494898376215204735891170042808140884337949150317257310688430271573696351481990334196274152701320055306275479074865864826923114368235135583993416113802762682700913456874855354834422248712838998185022412196739306217084753107265771378949821875606039276187287552) drop)")
+  "constant out of range"
+)
+(assert_malformed
+  (module quote "(func (f64.const -269653970229347356221791135597556535197105851288767494898376215204735891170042808140884337949150317257310688430271573696351481990334196274152701320055306275479074865864826923114368235135583993416113802762682700913456874855354834422248712838998185022412196739306217084753107265771378949821875606039276187287552) drop)")
+  "constant out of range"
+)
diff --git a/test/WasmSpec/testsuite/core/conversions.wast b/test/WasmSpec/testsuite/core/conversions.wast
index c48d5ea..4c4f2ff 100644
--- a/test/WasmSpec/testsuite/core/conversions.wast
+++ b/test/WasmSpec/testsuite/core/conversions.wast
@@ -69,9 +69,12 @@
 (assert_return (invoke "i32.trunc_s_f32" (f32.const -2147483648.0)) (i32.const -2147483648))
 (assert_trap (invoke "i32.trunc_s_f32" (f32.const 2147483648.0)) "integer overflow")
 (assert_trap (invoke "i32.trunc_s_f32" (f32.const -2147483904.0)) "integer overflow")
-(assert_trap (invoke "i32.trunc_s_f32" (f32.const infinity)) "integer overflow")
-(assert_trap (invoke "i32.trunc_s_f32" (f32.const -infinity)) "integer overflow")
+(assert_trap (invoke "i32.trunc_s_f32" (f32.const inf)) "integer overflow")
+(assert_trap (invoke "i32.trunc_s_f32" (f32.const -inf)) "integer overflow")
 (assert_trap (invoke "i32.trunc_s_f32" (f32.const nan)) "invalid conversion to integer")
+(assert_trap (invoke "i32.trunc_s_f32" (f32.const nan:0x200000)) "invalid conversion to integer")
+(assert_trap (invoke "i32.trunc_s_f32" (f32.const -nan)) "invalid conversion to integer")
+(assert_trap (invoke "i32.trunc_s_f32" (f32.const -nan:0x200000)) "invalid conversion to integer")
 
 (assert_return (invoke "i32.trunc_u_f32" (f32.const 0.0)) (i32.const 0))
 (assert_return (invoke "i32.trunc_u_f32" (f32.const -0.0)) (i32.const 0))
@@ -88,9 +91,12 @@
 (assert_return (invoke "i32.trunc_u_f32" (f32.const -0x1.fffffep-1)) (i32.const 0))
 (assert_trap (invoke "i32.trunc_u_f32" (f32.const 4294967296.0)) "integer overflow")
 (assert_trap (invoke "i32.trunc_u_f32" (f32.const -1.0)) "integer overflow")
-(assert_trap (invoke "i32.trunc_u_f32" (f32.const infinity)) "integer overflow")
-(assert_trap (invoke "i32.trunc_u_f32" (f32.const -infinity)) "integer overflow")
+(assert_trap (invoke "i32.trunc_u_f32" (f32.const inf)) "integer overflow")
+(assert_trap (invoke "i32.trunc_u_f32" (f32.const -inf)) "integer overflow")
 (assert_trap (invoke "i32.trunc_u_f32" (f32.const nan)) "invalid conversion to integer")
+(assert_trap (invoke "i32.trunc_u_f32" (f32.const nan:0x200000)) "invalid conversion to integer")
+(assert_trap (invoke "i32.trunc_u_f32" (f32.const -nan)) "invalid conversion to integer")
+(assert_trap (invoke "i32.trunc_u_f32" (f32.const -nan:0x200000)) "invalid conversion to integer")
 
 (assert_return (invoke "i32.trunc_s_f64" (f64.const 0.0)) (i32.const 0))
 (assert_return (invoke "i32.trunc_s_f64" (f64.const -0.0)) (i32.const 0))
@@ -108,9 +114,12 @@
 (assert_return (invoke "i32.trunc_s_f64" (f64.const -2147483648.0)) (i32.const -2147483648))
 (assert_trap (invoke "i32.trunc_s_f64" (f64.const 2147483648.0)) "integer overflow")
 (assert_trap (invoke "i32.trunc_s_f64" (f64.const -2147483649.0)) "integer overflow")
-(assert_trap (invoke "i32.trunc_s_f64" (f64.const infinity)) "integer overflow")
-(assert_trap (invoke "i32.trunc_s_f64" (f64.const -infinity)) "integer overflow")
+(assert_trap (invoke "i32.trunc_s_f64" (f64.const inf)) "integer overflow")
+(assert_trap (invoke "i32.trunc_s_f64" (f64.const -inf)) "integer overflow")
 (assert_trap (invoke "i32.trunc_s_f64" (f64.const nan)) "invalid conversion to integer")
+(assert_trap (invoke "i32.trunc_s_f64" (f64.const nan:0x4000000000000)) "invalid conversion to integer")
+(assert_trap (invoke "i32.trunc_s_f64" (f64.const -nan)) "invalid conversion to integer")
+(assert_trap (invoke "i32.trunc_s_f64" (f64.const -nan:0x4000000000000)) "invalid conversion to integer")
 
 (assert_return (invoke "i32.trunc_u_f64" (f64.const 0.0)) (i32.const 0))
 (assert_return (invoke "i32.trunc_u_f64" (f64.const -0.0)) (i32.const 0))
@@ -131,9 +140,12 @@
 (assert_trap (invoke "i32.trunc_u_f64" (f64.const 1e16)) "integer overflow")
 (assert_trap (invoke "i32.trunc_u_f64" (f64.const 1e30)) "integer overflow")
 (assert_trap (invoke "i32.trunc_u_f64" (f64.const 9223372036854775808)) "integer overflow")
-(assert_trap (invoke "i32.trunc_u_f64" (f64.const infinity)) "integer overflow")
-(assert_trap (invoke "i32.trunc_u_f64" (f64.const -infinity)) "integer overflow")
+(assert_trap (invoke "i32.trunc_u_f64" (f64.const inf)) "integer overflow")
+(assert_trap (invoke "i32.trunc_u_f64" (f64.const -inf)) "integer overflow")
 (assert_trap (invoke "i32.trunc_u_f64" (f64.const nan)) "invalid conversion to integer")
+(assert_trap (invoke "i32.trunc_u_f64" (f64.const nan:0x4000000000000)) "invalid conversion to integer")
+(assert_trap (invoke "i32.trunc_u_f64" (f64.const -nan)) "invalid conversion to integer")
+(assert_trap (invoke "i32.trunc_u_f64" (f64.const -nan:0x4000000000000)) "invalid conversion to integer")
 
 (assert_return (invoke "i64.trunc_s_f32" (f32.const 0.0)) (i64.const 0))
 (assert_return (invoke "i64.trunc_s_f32" (f32.const -0.0)) (i64.const 0))
@@ -153,9 +165,12 @@
 (assert_return (invoke "i64.trunc_s_f32" (f32.const -9223372036854775808.0)) (i64.const -9223372036854775808))
 (assert_trap (invoke "i64.trunc_s_f32" (f32.const 9223372036854775808.0)) "integer overflow")
 (assert_trap (invoke "i64.trunc_s_f32" (f32.const -9223373136366403584.0)) "integer overflow")
-(assert_trap (invoke "i64.trunc_s_f32" (f32.const infinity)) "integer overflow")
-(assert_trap (invoke "i64.trunc_s_f32" (f32.const -infinity)) "integer overflow")
+(assert_trap (invoke "i64.trunc_s_f32" (f32.const inf)) "integer overflow")
+(assert_trap (invoke "i64.trunc_s_f32" (f32.const -inf)) "integer overflow")
 (assert_trap (invoke "i64.trunc_s_f32" (f32.const nan)) "invalid conversion to integer")
+(assert_trap (invoke "i64.trunc_s_f32" (f32.const nan:0x200000)) "invalid conversion to integer")
+(assert_trap (invoke "i64.trunc_s_f32" (f32.const -nan)) "invalid conversion to integer")
+(assert_trap (invoke "i64.trunc_s_f32" (f32.const -nan:0x200000)) "invalid conversion to integer")
 
 (assert_return (invoke "i64.trunc_u_f32" (f32.const 0.0)) (i64.const 0))
 (assert_return (invoke "i64.trunc_u_f32" (f32.const -0.0)) (i64.const 0))
@@ -170,9 +185,12 @@
 (assert_return (invoke "i64.trunc_u_f32" (f32.const -0x1.fffffep-1)) (i64.const 0))
 (assert_trap (invoke "i64.trunc_u_f32" (f32.const 18446744073709551616.0)) "integer overflow")
 (assert_trap (invoke "i64.trunc_u_f32" (f32.const -1.0)) "integer overflow")
-(assert_trap (invoke "i64.trunc_u_f32" (f32.const infinity)) "integer overflow")
-(assert_trap (invoke "i64.trunc_u_f32" (f32.const -infinity)) "integer overflow")
+(assert_trap (invoke "i64.trunc_u_f32" (f32.const inf)) "integer overflow")
+(assert_trap (invoke "i64.trunc_u_f32" (f32.const -inf)) "integer overflow")
 (assert_trap (invoke "i64.trunc_u_f32" (f32.const nan)) "invalid conversion to integer")
+(assert_trap (invoke "i64.trunc_u_f32" (f32.const nan:0x200000)) "invalid conversion to integer")
+(assert_trap (invoke "i64.trunc_u_f32" (f32.const -nan)) "invalid conversion to integer")
+(assert_trap (invoke "i64.trunc_u_f32" (f32.const -nan:0x200000)) "invalid conversion to integer")
 
 (assert_return (invoke "i64.trunc_s_f64" (f64.const 0.0)) (i64.const 0))
 (assert_return (invoke "i64.trunc_s_f64" (f64.const -0.0)) (i64.const 0))
@@ -192,9 +210,12 @@
 (assert_return (invoke "i64.trunc_s_f64" (f64.const -9223372036854775808.0)) (i64.const -9223372036854775808))
 (assert_trap (invoke "i64.trunc_s_f64" (f64.const 9223372036854775808.0)) "integer overflow")
 (assert_trap (invoke "i64.trunc_s_f64" (f64.const -9223372036854777856.0)) "integer overflow")
-(assert_trap (invoke "i64.trunc_s_f64" (f64.const infinity)) "integer overflow")
-(assert_trap (invoke "i64.trunc_s_f64" (f64.const -infinity)) "integer overflow")
+(assert_trap (invoke "i64.trunc_s_f64" (f64.const inf)) "integer overflow")
+(assert_trap (invoke "i64.trunc_s_f64" (f64.const -inf)) "integer overflow")
 (assert_trap (invoke "i64.trunc_s_f64" (f64.const nan)) "invalid conversion to integer")
+(assert_trap (invoke "i64.trunc_s_f64" (f64.const nan:0x4000000000000)) "invalid conversion to integer")
+(assert_trap (invoke "i64.trunc_s_f64" (f64.const -nan)) "invalid conversion to integer")
+(assert_trap (invoke "i64.trunc_s_f64" (f64.const -nan:0x4000000000000)) "invalid conversion to integer")
 
 (assert_return (invoke "i64.trunc_u_f64" (f64.const 0.0)) (i64.const 0))
 (assert_return (invoke "i64.trunc_u_f64" (f64.const -0.0)) (i64.const 0))
@@ -213,9 +234,12 @@
 (assert_return (invoke "i64.trunc_u_f64" (f64.const 9223372036854775808)) (i64.const -9223372036854775808))
 (assert_trap (invoke "i64.trunc_u_f64" (f64.const 18446744073709551616.0)) "integer overflow")
 (assert_trap (invoke "i64.trunc_u_f64" (f64.const -1.0)) "integer overflow")
-(assert_trap (invoke "i64.trunc_u_f64" (f64.const infinity)) "integer overflow")
-(assert_trap (invoke "i64.trunc_u_f64" (f64.const -infinity)) "integer overflow")
+(assert_trap (invoke "i64.trunc_u_f64" (f64.const inf)) "integer overflow")
+(assert_trap (invoke "i64.trunc_u_f64" (f64.const -inf)) "integer overflow")
 (assert_trap (invoke "i64.trunc_u_f64" (f64.const nan)) "invalid conversion to integer")
+(assert_trap (invoke "i64.trunc_u_f64" (f64.const nan:0x4000000000000)) "invalid conversion to integer")
+(assert_trap (invoke "i64.trunc_u_f64" (f64.const -nan)) "invalid conversion to integer")
+(assert_trap (invoke "i64.trunc_u_f64" (f64.const -nan:0x4000000000000)) "invalid conversion to integer")
 
 (assert_return (invoke "f32.convert_s_i32" (i32.const 1)) (f32.const 1.0))
 (assert_return (invoke "f32.convert_s_i32" (i32.const -1)) (f32.const -1.0))
@@ -318,9 +342,12 @@
 (assert_return (invoke "f64.promote_f32" (f32.const 0x1p-119)) (f64.const 0x1p-119))
 ;; Generated randomly by picking a random float.
 (assert_return (invoke "f64.promote_f32" (f32.const 0x1.8f867ep+125)) (f64.const 6.6382536710104395e+37))
-(assert_return (invoke "f64.promote_f32" (f32.const infinity)) (f64.const infinity))
-(assert_return (invoke "f64.promote_f32" (f32.const -infinity)) (f64.const -infinity))
+(assert_return (invoke "f64.promote_f32" (f32.const inf)) (f64.const inf))
+(assert_return (invoke "f64.promote_f32" (f32.const -inf)) (f64.const -inf))
 (assert_return_canonical_nan (invoke "f64.promote_f32" (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "f64.promote_f32" (f32.const nan:0x200000)))
+(assert_return_canonical_nan (invoke "f64.promote_f32" (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "f64.promote_f32" (f32.const -nan:0x200000)))
 
 (assert_return (invoke "f32.demote_f64" (f64.const 0.0)) (f32.const 0.0))
 (assert_return (invoke "f32.demote_f64" (f64.const -0.0)) (f32.const -0.0))
@@ -342,12 +369,12 @@
 (assert_return (invoke "f32.demote_f64" (f64.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "f32.demote_f64" (f64.const 0x1.fffffefffffffp+127)) (f32.const 0x1.fffffep+127))
 (assert_return (invoke "f32.demote_f64" (f64.const -0x1.fffffefffffffp+127)) (f32.const -0x1.fffffep+127))
-(assert_return (invoke "f32.demote_f64" (f64.const 0x1.ffffffp+127)) (f32.const infinity))
-(assert_return (invoke "f32.demote_f64" (f64.const -0x1.ffffffp+127)) (f32.const -infinity))
+(assert_return (invoke "f32.demote_f64" (f64.const 0x1.ffffffp+127)) (f32.const inf))
+(assert_return (invoke "f32.demote_f64" (f64.const -0x1.ffffffp+127)) (f32.const -inf))
 (assert_return (invoke "f32.demote_f64" (f64.const 0x1p-119)) (f32.const 0x1p-119))
 (assert_return (invoke "f32.demote_f64" (f64.const 0x1.8f867ep+125)) (f32.const 0x1.8f867ep+125))
-(assert_return (invoke "f32.demote_f64" (f64.const infinity)) (f32.const infinity))
-(assert_return (invoke "f32.demote_f64" (f64.const -infinity)) (f32.const -infinity))
+(assert_return (invoke "f32.demote_f64" (f64.const inf)) (f32.const inf))
+(assert_return (invoke "f32.demote_f64" (f64.const -inf)) (f32.const -inf))
 (assert_return (invoke "f32.demote_f64" (f64.const 0x1.0000000000001p+0)) (f32.const 1.0))
 (assert_return (invoke "f32.demote_f64" (f64.const 0x1.fffffffffffffp-1)) (f32.const 1.0))
 (assert_return (invoke "f32.demote_f64" (f64.const 0x1.0000010000000p+0)) (f32.const 0x1.000000p+0))
@@ -365,6 +392,9 @@
 (assert_return (invoke "f32.demote_f64" (f64.const -0x1.6972b30cfb562p+1)) (f32.const -0x1.6972b4p+1))
 (assert_return (invoke "f32.demote_f64" (f64.const -0x1.bedbe4819d4c4p+112)) (f32.const -0x1.bedbe4p+112))
 (assert_return_canonical_nan (invoke "f32.demote_f64" (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "f32.demote_f64" (f64.const nan:0x4000000000000)))
+(assert_return_canonical_nan (invoke "f32.demote_f64" (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "f32.demote_f64" (f64.const -nan:0x4000000000000)))
 (assert_return (invoke "f32.demote_f64" (f64.const 0x1p-1022)) (f32.const 0.0))
 (assert_return (invoke "f32.demote_f64" (f64.const -0x1p-1022)) (f32.const -0.0))
 (assert_return (invoke "f32.demote_f64" (f64.const 0x1.0p-150)) (f32.const 0.0))
@@ -375,28 +405,28 @@
 (assert_return (invoke "f32.reinterpret_i32" (i32.const 0)) (f32.const 0.0))
 (assert_return (invoke "f32.reinterpret_i32" (i32.const 0x80000000)) (f32.const -0.0))
 (assert_return (invoke "f32.reinterpret_i32" (i32.const 1)) (f32.const 0x1p-149))
-(assert_return_arithmetic_nan (invoke "f32.reinterpret_i32" (i32.const -1)))
+(assert_return (invoke "f32.reinterpret_i32" (i32.const -1)) (f32.const -nan:0x7fffff))
 (assert_return (invoke "f32.reinterpret_i32" (i32.const 123456789)) (f32.const 0x1.b79a2ap-113))
 (assert_return (invoke "f32.reinterpret_i32" (i32.const -2147483647)) (f32.const -0x1p-149))
-(assert_return (invoke "f32.reinterpret_i32" (i32.const 0x7f800000)) (f32.const infinity))
-(assert_return (invoke "f32.reinterpret_i32" (i32.const 0xff800000)) (f32.const -infinity))
-(assert_return_canonical_nan (invoke "f32.reinterpret_i32" (i32.const 0x7fc00000)))
-(assert_return_canonical_nan (invoke "f32.reinterpret_i32" (i32.const 0xffc00000)))
-(assert_return_arithmetic_nan (invoke "f32.reinterpret_i32" (i32.const 0x7fa00000)))
-(assert_return_arithmetic_nan (invoke "f32.reinterpret_i32" (i32.const 0xffa00000)))
+(assert_return (invoke "f32.reinterpret_i32" (i32.const 0x7f800000)) (f32.const inf))
+(assert_return (invoke "f32.reinterpret_i32" (i32.const 0xff800000)) (f32.const -inf))
+(assert_return (invoke "f32.reinterpret_i32" (i32.const 0x7fc00000)) (f32.const nan))
+(assert_return (invoke "f32.reinterpret_i32" (i32.const 0xffc00000)) (f32.const -nan))
+(assert_return (invoke "f32.reinterpret_i32" (i32.const 0x7fa00000)) (f32.const nan:0x200000))
+(assert_return (invoke "f32.reinterpret_i32" (i32.const 0xffa00000)) (f32.const -nan:0x200000))
 
 (assert_return (invoke "f64.reinterpret_i64" (i64.const 0)) (f64.const 0.0))
 (assert_return (invoke "f64.reinterpret_i64" (i64.const 1)) (f64.const 0x0.0000000000001p-1022))
-(assert_return_arithmetic_nan (invoke "f64.reinterpret_i64" (i64.const -1)))
+(assert_return (invoke "f64.reinterpret_i64" (i64.const -1)) (f64.const -nan:0xfffffffffffff))
 (assert_return (invoke "f64.reinterpret_i64" (i64.const 0x8000000000000000)) (f64.const -0.0))
 (assert_return (invoke "f64.reinterpret_i64" (i64.const 1234567890)) (f64.const 0x0.00000499602d2p-1022))
 (assert_return (invoke "f64.reinterpret_i64" (i64.const -9223372036854775807)) (f64.const -0x0.0000000000001p-1022))
-(assert_return (invoke "f64.reinterpret_i64" (i64.const 0x7ff0000000000000)) (f64.const infinity))
-(assert_return (invoke "f64.reinterpret_i64" (i64.const 0xfff0000000000000)) (f64.const -infinity))
-(assert_return_canonical_nan (invoke "f64.reinterpret_i64" (i64.const 0x7ff8000000000000)))
-(assert_return_canonical_nan (invoke "f64.reinterpret_i64" (i64.const 0xfff8000000000000)))
-(assert_return_arithmetic_nan (invoke "f64.reinterpret_i64" (i64.const 0x7ff4000000000000)))
-(assert_return_arithmetic_nan (invoke "f64.reinterpret_i64" (i64.const 0xfff4000000000000)))
+(assert_return (invoke "f64.reinterpret_i64" (i64.const 0x7ff0000000000000)) (f64.const inf))
+(assert_return (invoke "f64.reinterpret_i64" (i64.const 0xfff0000000000000)) (f64.const -inf))
+(assert_return (invoke "f64.reinterpret_i64" (i64.const 0x7ff8000000000000)) (f64.const nan))
+(assert_return (invoke "f64.reinterpret_i64" (i64.const 0xfff8000000000000)) (f64.const -nan))
+(assert_return (invoke "f64.reinterpret_i64" (i64.const 0x7ff4000000000000)) (f64.const nan:0x4000000000000))
+(assert_return (invoke "f64.reinterpret_i64" (i64.const 0xfff4000000000000)) (f64.const -nan:0x4000000000000))
 
 (assert_return (invoke "i32.reinterpret_f32" (f32.const 0.0)) (i32.const 0))
 (assert_return (invoke "i32.reinterpret_f32" (f32.const -0.0)) (i32.const 0x80000000))
@@ -407,8 +437,8 @@
 (assert_return (invoke "i32.reinterpret_f32" (f32.const 3.1415926)) (i32.const 1078530010))
 (assert_return (invoke "i32.reinterpret_f32" (f32.const 0x1.fffffep+127)) (i32.const 2139095039))
 (assert_return (invoke "i32.reinterpret_f32" (f32.const -0x1.fffffep+127)) (i32.const -8388609))
-(assert_return (invoke "i32.reinterpret_f32" (f32.const infinity)) (i32.const 0x7f800000))
-(assert_return (invoke "i32.reinterpret_f32" (f32.const -infinity)) (i32.const 0xff800000))
+(assert_return (invoke "i32.reinterpret_f32" (f32.const inf)) (i32.const 0x7f800000))
+(assert_return (invoke "i32.reinterpret_f32" (f32.const -inf)) (i32.const 0xff800000))
 (assert_return (invoke "i32.reinterpret_f32" (f32.const nan)) (i32.const 0x7fc00000))
 (assert_return (invoke "i32.reinterpret_f32" (f32.const -nan)) (i32.const 0xffc00000))
 ;;(assert_return (invoke "i32.reinterpret_f32" (f32.const nan:0x200000)) (i32.const 0x7fa00000))
@@ -423,8 +453,8 @@
 (assert_return (invoke "i64.reinterpret_f64" (f64.const 3.14159265358979)) (i64.const 4614256656552045841))
 (assert_return (invoke "i64.reinterpret_f64" (f64.const 0x1.fffffffffffffp+1023)) (i64.const 9218868437227405311))
 (assert_return (invoke "i64.reinterpret_f64" (f64.const -0x1.fffffffffffffp+1023)) (i64.const -4503599627370497))
-(assert_return (invoke "i64.reinterpret_f64" (f64.const infinity)) (i64.const 0x7ff0000000000000))
-(assert_return (invoke "i64.reinterpret_f64" (f64.const -infinity)) (i64.const 0xfff0000000000000))
+(assert_return (invoke "i64.reinterpret_f64" (f64.const inf)) (i64.const 0x7ff0000000000000))
+(assert_return (invoke "i64.reinterpret_f64" (f64.const -inf)) (i64.const 0xfff0000000000000))
 (assert_return (invoke "i64.reinterpret_f64" (f64.const nan)) (i64.const 0x7ff8000000000000))
 (assert_return (invoke "i64.reinterpret_f64" (f64.const -nan)) (i64.const 0xfff8000000000000))
 ;;(assert_return (invoke "i64.reinterpret_f64" (f64.const nan:0x4000000000000)) (i64.const 0x7ff4000000000000))
diff --git a/test/WasmSpec/testsuite/core/custom_section.wast b/test/WasmSpec/testsuite/core/custom_section.wast
index f087a9d..c6c3389 100644
--- a/test/WasmSpec/testsuite/core/custom_section.wast
+++ b/test/WasmSpec/testsuite/core/custom_section.wast
@@ -1,4 +1,4 @@
-(module
+(module binary
   "\00asm" "\01\00\00\00"
   "\00\24\10" "a custom section" "this is the payload"
   "\00\20\10" "a custom section" "this is payload"
@@ -6,9 +6,12 @@
   "\00\10\00" "" "this is payload"
   "\00\01\00" "" ""
   "\00\24\10" "\00\00custom sectio\00" "this is the payload"
+  "\00\24\10" "\ef\bb\bfa custom sect" "this is the payload"
+  "\00\24\10" "a custom sect\e2\8c\a3" "this is the payload"
+  "\00\1f\16" "module within a module" "\00asm" "\01\00\00\00"
 )
 
-(module
+(module binary
   "\00asm" "\01\00\00\00"
   "\00\0e\06" "custom" "payload"
   "\00\0e\06" "custom" "payload"
@@ -44,7 +47,7 @@
   "\00\0e\06" "custom" "payload"
 )
 
-(module
+(module binary
   "\00asm" "\01\00\00\00"
   "\01\07\01\60\02\7f\7f\01\7f"                ;; type section
   "\00\1a\06" "custom" "this is the payload"   ;; custom section
@@ -55,7 +58,15 @@
 )
 
 (assert_malformed
-  (module
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00"
+  )
+  "unexpected end"
+)
+
+(assert_malformed
+  (module binary
     "\00asm" "\01\00\00\00"
     "\00\00"
   )
@@ -63,7 +74,7 @@
 )
 
 (assert_malformed
-  (module
+  (module binary
     "\00asm" "\01\00\00\00"
     "\00\26\10" "a custom section" "this is the payload"
   )
@@ -71,7 +82,7 @@
 )
 
 (assert_malformed
-  (module
+  (module binary
     "\00asm" "\01\00\00\00"
     "\00\25\10" "a custom section" "this is the payload"
     "\00\24\10" "a custom section" "this is the payload"
@@ -80,7 +91,7 @@
 )
 
 (assert_malformed
-  (module
+  (module binary
     "\00asm" "\01\00\00\00"
     "\01\07\01\60\02\7f\7f\01\7f"                         ;; type section
     "\00\25\10" "a custom section" "this is the payload"  ;; invalid length!
@@ -90,3 +101,12 @@
   )
   "function and code section have inconsistent lengths"
 )
+
+;; Test concatenated modules.
+(assert_malformed
+  (module binary
+    "\00asm\01\00\00\00"
+    "\00asm\01\00\00\00"
+  )
+  "length out of bounds"
+)
diff --git a/test/WasmSpec/testsuite/core/exports.wast b/test/WasmSpec/testsuite/core/exports.wast
index e3a0052..6841aa8 100644
--- a/test/WasmSpec/testsuite/core/exports.wast
+++ b/test/WasmSpec/testsuite/core/exports.wast
@@ -5,6 +5,8 @@
 (module (func) (func) (export "a" (func 0)) (export "b" (func 1)))
 
 (module (func (export "a")))
+(module (func (export "a") (export "b") (export "c")))
+(module (func (export "a") (export "b") (param i32)))
 (module (func) (export "a" (func 0)))
 (module (func $a (export "a")))
 (module (func $a) (export "a" (func $a)))
diff --git a/test/WasmSpec/testsuite/core/f32.load32.fail.wast b/test/WasmSpec/testsuite/core/f32.load32.fail.wast
deleted file mode 100644
index 3133645..0000000
--- a/test/WasmSpec/testsuite/core/f32.load32.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (memory 1) (func (param i32) (result f32) (f32.load32 (get_local 0))))
diff --git a/test/WasmSpec/testsuite/core/f32.load64.fail.wast b/test/WasmSpec/testsuite/core/f32.load64.fail.wast
deleted file mode 100644
index da94668..0000000
--- a/test/WasmSpec/testsuite/core/f32.load64.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (memory 1) (func (param i32) (result f32) (f32.load64 (get_local 0))))
diff --git a/test/WasmSpec/testsuite/core/f32.store32.fail.wast b/test/WasmSpec/testsuite/core/f32.store32.fail.wast
deleted file mode 100644
index 3daf6eb..0000000
--- a/test/WasmSpec/testsuite/core/f32.store32.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (memory 1) (func (param i32) (param f32) (f32.store32 (get_local 0) (get_local 1))))
diff --git a/test/WasmSpec/testsuite/core/f32.store64.fail.wast b/test/WasmSpec/testsuite/core/f32.store64.fail.wast
deleted file mode 100644
index b2c47bb..0000000
--- a/test/WasmSpec/testsuite/core/f32.store64.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (memory 1) (func (param i32) (param f64) (f32.store64 (get_local 0) (get_local 1))))
diff --git a/test/WasmSpec/testsuite/core/f32.wast b/test/WasmSpec/testsuite/core/f32.wast
index 5224495..2595a4a 100644
--- a/test/WasmSpec/testsuite/core/f32.wast
+++ b/test/WasmSpec/testsuite/core/f32.wast
@@ -1,5 +1,6 @@
 ;; Test all the f32 operators on major boundary values and all special
-;; values (except comparison operators, which are tested in f32_cmp.wast).
+;; values (except comparison and bitwise operators, which are tested in
+;; f32_bitwise.wast and f32_cmp.wast).
 
 (module
   (func (export "add") (param $x f32) (param $y f32) (result f32) (f32.add (get_local $x) (get_local $y)))
@@ -13,9 +14,6 @@
   (func (export "floor") (param $x f32) (result f32) (f32.floor (get_local $x)))
   (func (export "trunc") (param $x f32) (result f32) (f32.trunc (get_local $x)))
   (func (export "nearest") (param $x f32) (result f32) (f32.nearest (get_local $x)))
-  (func (export "abs") (param $x f32) (result f32) (f32.abs (get_local $x)))
-  (func (export "neg") (param $x f32) (result f32) (f32.neg (get_local $x)))
-  (func (export "copysign") (param $x f32) (param $y f32) (result f32) (f32.copysign (get_local $x) (get_local $y)))
 )
 
 (assert_return (invoke "add" (f32.const -0x0p+0) (f32.const -0x0p+0)) (f32.const -0x0p+0))
@@ -46,14 +44,18 @@
 (assert_return (invoke "add" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
 (assert_return (invoke "add" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "add" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "add" (f32.const -0x0p+0) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "add" (f32.const -0x0p+0) (f32.const infinity)) (f32.const infinity))
-(assert_return (invoke "add" (f32.const 0x0p+0) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "add" (f32.const 0x0p+0) (f32.const infinity)) (f32.const infinity))
+(assert_return (invoke "add" (f32.const -0x0p+0) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "add" (f32.const -0x0p+0) (f32.const inf)) (f32.const inf))
+(assert_return (invoke "add" (f32.const 0x0p+0) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "add" (f32.const 0x0p+0) (f32.const inf)) (f32.const inf))
 (assert_return_canonical_nan (invoke "add" (f32.const -0x0p+0) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -0x0p+0) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "add" (f32.const -0x0p+0) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -0x0p+0) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "add" (f32.const 0x0p+0) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const 0x0p+0) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "add" (f32.const 0x0p+0) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const 0x0p+0) (f32.const nan:0x200000)))
 (assert_return (invoke "add" (f32.const -0x1p-149) (f32.const -0x0p+0)) (f32.const -0x1p-149))
 (assert_return (invoke "add" (f32.const -0x1p-149) (f32.const 0x0p+0)) (f32.const -0x1p-149))
 (assert_return (invoke "add" (f32.const 0x1p-149) (f32.const -0x0p+0)) (f32.const 0x1p-149))
@@ -82,14 +84,18 @@
 (assert_return (invoke "add" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
 (assert_return (invoke "add" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "add" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "add" (f32.const -0x1p-149) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "add" (f32.const -0x1p-149) (f32.const infinity)) (f32.const infinity))
-(assert_return (invoke "add" (f32.const 0x1p-149) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "add" (f32.const 0x1p-149) (f32.const infinity)) (f32.const infinity))
+(assert_return (invoke "add" (f32.const -0x1p-149) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "add" (f32.const -0x1p-149) (f32.const inf)) (f32.const inf))
+(assert_return (invoke "add" (f32.const 0x1p-149) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "add" (f32.const 0x1p-149) (f32.const inf)) (f32.const inf))
 (assert_return_canonical_nan (invoke "add" (f32.const -0x1p-149) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -0x1p-149) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "add" (f32.const -0x1p-149) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -0x1p-149) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "add" (f32.const 0x1p-149) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const 0x1p-149) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "add" (f32.const 0x1p-149) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const 0x1p-149) (f32.const nan:0x200000)))
 (assert_return (invoke "add" (f32.const -0x1p-126) (f32.const -0x0p+0)) (f32.const -0x1p-126))
 (assert_return (invoke "add" (f32.const -0x1p-126) (f32.const 0x0p+0)) (f32.const -0x1p-126))
 (assert_return (invoke "add" (f32.const 0x1p-126) (f32.const -0x0p+0)) (f32.const 0x1p-126))
@@ -118,14 +124,18 @@
 (assert_return (invoke "add" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
 (assert_return (invoke "add" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "add" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "add" (f32.const -0x1p-126) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "add" (f32.const -0x1p-126) (f32.const infinity)) (f32.const infinity))
-(assert_return (invoke "add" (f32.const 0x1p-126) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "add" (f32.const 0x1p-126) (f32.const infinity)) (f32.const infinity))
+(assert_return (invoke "add" (f32.const -0x1p-126) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "add" (f32.const -0x1p-126) (f32.const inf)) (f32.const inf))
+(assert_return (invoke "add" (f32.const 0x1p-126) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "add" (f32.const 0x1p-126) (f32.const inf)) (f32.const inf))
 (assert_return_canonical_nan (invoke "add" (f32.const -0x1p-126) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -0x1p-126) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "add" (f32.const -0x1p-126) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -0x1p-126) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "add" (f32.const 0x1p-126) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const 0x1p-126) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "add" (f32.const 0x1p-126) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const 0x1p-126) (f32.const nan:0x200000)))
 (assert_return (invoke "add" (f32.const -0x1p-1) (f32.const -0x0p+0)) (f32.const -0x1p-1))
 (assert_return (invoke "add" (f32.const -0x1p-1) (f32.const 0x0p+0)) (f32.const -0x1p-1))
 (assert_return (invoke "add" (f32.const 0x1p-1) (f32.const -0x0p+0)) (f32.const 0x1p-1))
@@ -154,14 +164,18 @@
 (assert_return (invoke "add" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
 (assert_return (invoke "add" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "add" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "add" (f32.const -0x1p-1) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "add" (f32.const -0x1p-1) (f32.const infinity)) (f32.const infinity))
-(assert_return (invoke "add" (f32.const 0x1p-1) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "add" (f32.const 0x1p-1) (f32.const infinity)) (f32.const infinity))
+(assert_return (invoke "add" (f32.const -0x1p-1) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "add" (f32.const -0x1p-1) (f32.const inf)) (f32.const inf))
+(assert_return (invoke "add" (f32.const 0x1p-1) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "add" (f32.const 0x1p-1) (f32.const inf)) (f32.const inf))
 (assert_return_canonical_nan (invoke "add" (f32.const -0x1p-1) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -0x1p-1) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "add" (f32.const -0x1p-1) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -0x1p-1) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "add" (f32.const 0x1p-1) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const 0x1p-1) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "add" (f32.const 0x1p-1) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const 0x1p-1) (f32.const nan:0x200000)))
 (assert_return (invoke "add" (f32.const -0x1p+0) (f32.const -0x0p+0)) (f32.const -0x1p+0))
 (assert_return (invoke "add" (f32.const -0x1p+0) (f32.const 0x0p+0)) (f32.const -0x1p+0))
 (assert_return (invoke "add" (f32.const 0x1p+0) (f32.const -0x0p+0)) (f32.const 0x1p+0))
@@ -190,14 +204,18 @@
 (assert_return (invoke "add" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
 (assert_return (invoke "add" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "add" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "add" (f32.const -0x1p+0) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "add" (f32.const -0x1p+0) (f32.const infinity)) (f32.const infinity))
-(assert_return (invoke "add" (f32.const 0x1p+0) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "add" (f32.const 0x1p+0) (f32.const infinity)) (f32.const infinity))
+(assert_return (invoke "add" (f32.const -0x1p+0) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "add" (f32.const -0x1p+0) (f32.const inf)) (f32.const inf))
+(assert_return (invoke "add" (f32.const 0x1p+0) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "add" (f32.const 0x1p+0) (f32.const inf)) (f32.const inf))
 (assert_return_canonical_nan (invoke "add" (f32.const -0x1p+0) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -0x1p+0) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "add" (f32.const -0x1p+0) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -0x1p+0) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "add" (f32.const 0x1p+0) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const 0x1p+0) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "add" (f32.const 0x1p+0) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const 0x1p+0) (f32.const nan:0x200000)))
 (assert_return (invoke "add" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const -0x1.921fb6p+2))
 (assert_return (invoke "add" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const -0x1.921fb6p+2))
 (assert_return (invoke "add" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const 0x1.921fb6p+2))
@@ -226,14 +244,18 @@
 (assert_return (invoke "add" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
 (assert_return (invoke "add" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "add" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "add" (f32.const -0x1.921fb6p+2) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "add" (f32.const -0x1.921fb6p+2) (f32.const infinity)) (f32.const infinity))
-(assert_return (invoke "add" (f32.const 0x1.921fb6p+2) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "add" (f32.const 0x1.921fb6p+2) (f32.const infinity)) (f32.const infinity))
+(assert_return (invoke "add" (f32.const -0x1.921fb6p+2) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "add" (f32.const -0x1.921fb6p+2) (f32.const inf)) (f32.const inf))
+(assert_return (invoke "add" (f32.const 0x1.921fb6p+2) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "add" (f32.const 0x1.921fb6p+2) (f32.const inf)) (f32.const inf))
 (assert_return_canonical_nan (invoke "add" (f32.const -0x1.921fb6p+2) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -0x1.921fb6p+2) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "add" (f32.const -0x1.921fb6p+2) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -0x1.921fb6p+2) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "add" (f32.const 0x1.921fb6p+2) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const 0x1.921fb6p+2) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "add" (f32.const 0x1.921fb6p+2) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const 0x1.921fb6p+2) (f32.const nan:0x200000)))
 (assert_return (invoke "add" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "add" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "add" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const 0x1.fffffep+127))
@@ -258,90 +280,142 @@
 (assert_return (invoke "add" (f32.const -0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "add" (f32.const 0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.fffffep+127))
 (assert_return (invoke "add" (f32.const 0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "add" (f32.const -0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const -infinity))
+(assert_return (invoke "add" (f32.const -0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const -inf))
 (assert_return (invoke "add" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const 0x0p+0))
 (assert_return (invoke "add" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const 0x0p+0))
-(assert_return (invoke "add" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const infinity))
-(assert_return (invoke "add" (f32.const -0x1.fffffep+127) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "add" (f32.const -0x1.fffffep+127) (f32.const infinity)) (f32.const infinity))
-(assert_return (invoke "add" (f32.const 0x1.fffffep+127) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "add" (f32.const 0x1.fffffep+127) (f32.const infinity)) (f32.const infinity))
+(assert_return (invoke "add" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const inf))
+(assert_return (invoke "add" (f32.const -0x1.fffffep+127) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "add" (f32.const -0x1.fffffep+127) (f32.const inf)) (f32.const inf))
+(assert_return (invoke "add" (f32.const 0x1.fffffep+127) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "add" (f32.const 0x1.fffffep+127) (f32.const inf)) (f32.const inf))
 (assert_return_canonical_nan (invoke "add" (f32.const -0x1.fffffep+127) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -0x1.fffffep+127) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "add" (f32.const -0x1.fffffep+127) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -0x1.fffffep+127) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "add" (f32.const 0x1.fffffep+127) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const 0x1.fffffep+127) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "add" (f32.const 0x1.fffffep+127) (f32.const nan)))
-(assert_return (invoke "add" (f32.const -infinity) (f32.const -0x0p+0)) (f32.const -infinity))
-(assert_return (invoke "add" (f32.const -infinity) (f32.const 0x0p+0)) (f32.const -infinity))
-(assert_return (invoke "add" (f32.const infinity) (f32.const -0x0p+0)) (f32.const infinity))
-(assert_return (invoke "add" (f32.const infinity) (f32.const 0x0p+0)) (f32.const infinity))
-(assert_return (invoke "add" (f32.const -infinity) (f32.const -0x1p-149)) (f32.const -infinity))
-(assert_return (invoke "add" (f32.const -infinity) (f32.const 0x1p-149)) (f32.const -infinity))
-(assert_return (invoke "add" (f32.const infinity) (f32.const -0x1p-149)) (f32.const infinity))
-(assert_return (invoke "add" (f32.const infinity) (f32.const 0x1p-149)) (f32.const infinity))
-(assert_return (invoke "add" (f32.const -infinity) (f32.const -0x1p-126)) (f32.const -infinity))
-(assert_return (invoke "add" (f32.const -infinity) (f32.const 0x1p-126)) (f32.const -infinity))
-(assert_return (invoke "add" (f32.const infinity) (f32.const -0x1p-126)) (f32.const infinity))
-(assert_return (invoke "add" (f32.const infinity) (f32.const 0x1p-126)) (f32.const infinity))
-(assert_return (invoke "add" (f32.const -infinity) (f32.const -0x1p-1)) (f32.const -infinity))
-(assert_return (invoke "add" (f32.const -infinity) (f32.const 0x1p-1)) (f32.const -infinity))
-(assert_return (invoke "add" (f32.const infinity) (f32.const -0x1p-1)) (f32.const infinity))
-(assert_return (invoke "add" (f32.const infinity) (f32.const 0x1p-1)) (f32.const infinity))
-(assert_return (invoke "add" (f32.const -infinity) (f32.const -0x1p+0)) (f32.const -infinity))
-(assert_return (invoke "add" (f32.const -infinity) (f32.const 0x1p+0)) (f32.const -infinity))
-(assert_return (invoke "add" (f32.const infinity) (f32.const -0x1p+0)) (f32.const infinity))
-(assert_return (invoke "add" (f32.const infinity) (f32.const 0x1p+0)) (f32.const infinity))
-(assert_return (invoke "add" (f32.const -infinity) (f32.const -0x1.921fb6p+2)) (f32.const -infinity))
-(assert_return (invoke "add" (f32.const -infinity) (f32.const 0x1.921fb6p+2)) (f32.const -infinity))
-(assert_return (invoke "add" (f32.const infinity) (f32.const -0x1.921fb6p+2)) (f32.const infinity))
-(assert_return (invoke "add" (f32.const infinity) (f32.const 0x1.921fb6p+2)) (f32.const infinity))
-(assert_return (invoke "add" (f32.const -infinity) (f32.const -0x1.fffffep+127)) (f32.const -infinity))
-(assert_return (invoke "add" (f32.const -infinity) (f32.const 0x1.fffffep+127)) (f32.const -infinity))
-(assert_return (invoke "add" (f32.const infinity) (f32.const -0x1.fffffep+127)) (f32.const infinity))
-(assert_return (invoke "add" (f32.const infinity) (f32.const 0x1.fffffep+127)) (f32.const infinity))
-(assert_return (invoke "add" (f32.const -infinity) (f32.const -infinity)) (f32.const -infinity))
-(assert_return_canonical_nan (invoke "add" (f32.const -infinity) (f32.const infinity)))
-(assert_return_canonical_nan (invoke "add" (f32.const infinity) (f32.const -infinity)))
-(assert_return (invoke "add" (f32.const infinity) (f32.const infinity)) (f32.const infinity))
-(assert_return_canonical_nan (invoke "add" (f32.const -infinity) (f32.const -nan)))
-(assert_return_canonical_nan (invoke "add" (f32.const -infinity) (f32.const nan)))
-(assert_return_canonical_nan (invoke "add" (f32.const infinity) (f32.const -nan)))
-(assert_return_canonical_nan (invoke "add" (f32.const infinity) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const 0x1.fffffep+127) (f32.const nan:0x200000)))
+(assert_return (invoke "add" (f32.const -inf) (f32.const -0x0p+0)) (f32.const -inf))
+(assert_return (invoke "add" (f32.const -inf) (f32.const 0x0p+0)) (f32.const -inf))
+(assert_return (invoke "add" (f32.const inf) (f32.const -0x0p+0)) (f32.const inf))
+(assert_return (invoke "add" (f32.const inf) (f32.const 0x0p+0)) (f32.const inf))
+(assert_return (invoke "add" (f32.const -inf) (f32.const -0x1p-149)) (f32.const -inf))
+(assert_return (invoke "add" (f32.const -inf) (f32.const 0x1p-149)) (f32.const -inf))
+(assert_return (invoke "add" (f32.const inf) (f32.const -0x1p-149)) (f32.const inf))
+(assert_return (invoke "add" (f32.const inf) (f32.const 0x1p-149)) (f32.const inf))
+(assert_return (invoke "add" (f32.const -inf) (f32.const -0x1p-126)) (f32.const -inf))
+(assert_return (invoke "add" (f32.const -inf) (f32.const 0x1p-126)) (f32.const -inf))
+(assert_return (invoke "add" (f32.const inf) (f32.const -0x1p-126)) (f32.const inf))
+(assert_return (invoke "add" (f32.const inf) (f32.const 0x1p-126)) (f32.const inf))
+(assert_return (invoke "add" (f32.const -inf) (f32.const -0x1p-1)) (f32.const -inf))
+(assert_return (invoke "add" (f32.const -inf) (f32.const 0x1p-1)) (f32.const -inf))
+(assert_return (invoke "add" (f32.const inf) (f32.const -0x1p-1)) (f32.const inf))
+(assert_return (invoke "add" (f32.const inf) (f32.const 0x1p-1)) (f32.const inf))
+(assert_return (invoke "add" (f32.const -inf) (f32.const -0x1p+0)) (f32.const -inf))
+(assert_return (invoke "add" (f32.const -inf) (f32.const 0x1p+0)) (f32.const -inf))
+(assert_return (invoke "add" (f32.const inf) (f32.const -0x1p+0)) (f32.const inf))
+(assert_return (invoke "add" (f32.const inf) (f32.const 0x1p+0)) (f32.const inf))
+(assert_return (invoke "add" (f32.const -inf) (f32.const -0x1.921fb6p+2)) (f32.const -inf))
+(assert_return (invoke "add" (f32.const -inf) (f32.const 0x1.921fb6p+2)) (f32.const -inf))
+(assert_return (invoke "add" (f32.const inf) (f32.const -0x1.921fb6p+2)) (f32.const inf))
+(assert_return (invoke "add" (f32.const inf) (f32.const 0x1.921fb6p+2)) (f32.const inf))
+(assert_return (invoke "add" (f32.const -inf) (f32.const -0x1.fffffep+127)) (f32.const -inf))
+(assert_return (invoke "add" (f32.const -inf) (f32.const 0x1.fffffep+127)) (f32.const -inf))
+(assert_return (invoke "add" (f32.const inf) (f32.const -0x1.fffffep+127)) (f32.const inf))
+(assert_return (invoke "add" (f32.const inf) (f32.const 0x1.fffffep+127)) (f32.const inf))
+(assert_return (invoke "add" (f32.const -inf) (f32.const -inf)) (f32.const -inf))
+(assert_return_canonical_nan (invoke "add" (f32.const -inf) (f32.const inf)))
+(assert_return_canonical_nan (invoke "add" (f32.const inf) (f32.const -inf)))
+(assert_return (invoke "add" (f32.const inf) (f32.const inf)) (f32.const inf))
+(assert_return_canonical_nan (invoke "add" (f32.const -inf) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -inf) (f32.const -nan:0x200000)))
+(assert_return_canonical_nan (invoke "add" (f32.const -inf) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -inf) (f32.const nan:0x200000)))
+(assert_return_canonical_nan (invoke "add" (f32.const inf) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const inf) (f32.const -nan:0x200000)))
+(assert_return_canonical_nan (invoke "add" (f32.const inf) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const inf) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "add" (f32.const -nan) (f32.const -0x0p+0)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -nan:0x200000) (f32.const -0x0p+0)))
 (assert_return_canonical_nan (invoke "add" (f32.const -nan) (f32.const 0x0p+0)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -nan:0x200000) (f32.const 0x0p+0)))
 (assert_return_canonical_nan (invoke "add" (f32.const nan) (f32.const -0x0p+0)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const nan:0x200000) (f32.const -0x0p+0)))
 (assert_return_canonical_nan (invoke "add" (f32.const nan) (f32.const 0x0p+0)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const nan:0x200000) (f32.const 0x0p+0)))
 (assert_return_canonical_nan (invoke "add" (f32.const -nan) (f32.const -0x1p-149)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -nan:0x200000) (f32.const -0x1p-149)))
 (assert_return_canonical_nan (invoke "add" (f32.const -nan) (f32.const 0x1p-149)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -nan:0x200000) (f32.const 0x1p-149)))
 (assert_return_canonical_nan (invoke "add" (f32.const nan) (f32.const -0x1p-149)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const nan:0x200000) (f32.const -0x1p-149)))
 (assert_return_canonical_nan (invoke "add" (f32.const nan) (f32.const 0x1p-149)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const nan:0x200000) (f32.const 0x1p-149)))
 (assert_return_canonical_nan (invoke "add" (f32.const -nan) (f32.const -0x1p-126)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -nan:0x200000) (f32.const -0x1p-126)))
 (assert_return_canonical_nan (invoke "add" (f32.const -nan) (f32.const 0x1p-126)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -nan:0x200000) (f32.const 0x1p-126)))
 (assert_return_canonical_nan (invoke "add" (f32.const nan) (f32.const -0x1p-126)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const nan:0x200000) (f32.const -0x1p-126)))
 (assert_return_canonical_nan (invoke "add" (f32.const nan) (f32.const 0x1p-126)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const nan:0x200000) (f32.const 0x1p-126)))
 (assert_return_canonical_nan (invoke "add" (f32.const -nan) (f32.const -0x1p-1)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -nan:0x200000) (f32.const -0x1p-1)))
 (assert_return_canonical_nan (invoke "add" (f32.const -nan) (f32.const 0x1p-1)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -nan:0x200000) (f32.const 0x1p-1)))
 (assert_return_canonical_nan (invoke "add" (f32.const nan) (f32.const -0x1p-1)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const nan:0x200000) (f32.const -0x1p-1)))
 (assert_return_canonical_nan (invoke "add" (f32.const nan) (f32.const 0x1p-1)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const nan:0x200000) (f32.const 0x1p-1)))
 (assert_return_canonical_nan (invoke "add" (f32.const -nan) (f32.const -0x1p+0)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -nan:0x200000) (f32.const -0x1p+0)))
 (assert_return_canonical_nan (invoke "add" (f32.const -nan) (f32.const 0x1p+0)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -nan:0x200000) (f32.const 0x1p+0)))
 (assert_return_canonical_nan (invoke "add" (f32.const nan) (f32.const -0x1p+0)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const nan:0x200000) (f32.const -0x1p+0)))
 (assert_return_canonical_nan (invoke "add" (f32.const nan) (f32.const 0x1p+0)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const nan:0x200000) (f32.const 0x1p+0)))
 (assert_return_canonical_nan (invoke "add" (f32.const -nan) (f32.const -0x1.921fb6p+2)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -nan:0x200000) (f32.const -0x1.921fb6p+2)))
 (assert_return_canonical_nan (invoke "add" (f32.const -nan) (f32.const 0x1.921fb6p+2)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -nan:0x200000) (f32.const 0x1.921fb6p+2)))
 (assert_return_canonical_nan (invoke "add" (f32.const nan) (f32.const -0x1.921fb6p+2)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const nan:0x200000) (f32.const -0x1.921fb6p+2)))
 (assert_return_canonical_nan (invoke "add" (f32.const nan) (f32.const 0x1.921fb6p+2)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const nan:0x200000) (f32.const 0x1.921fb6p+2)))
 (assert_return_canonical_nan (invoke "add" (f32.const -nan) (f32.const -0x1.fffffep+127)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -nan:0x200000) (f32.const -0x1.fffffep+127)))
 (assert_return_canonical_nan (invoke "add" (f32.const -nan) (f32.const 0x1.fffffep+127)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -nan:0x200000) (f32.const 0x1.fffffep+127)))
 (assert_return_canonical_nan (invoke "add" (f32.const nan) (f32.const -0x1.fffffep+127)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const nan:0x200000) (f32.const -0x1.fffffep+127)))
 (assert_return_canonical_nan (invoke "add" (f32.const nan) (f32.const 0x1.fffffep+127)))
-(assert_return_canonical_nan (invoke "add" (f32.const -nan) (f32.const -infinity)))
-(assert_return_canonical_nan (invoke "add" (f32.const -nan) (f32.const infinity)))
-(assert_return_canonical_nan (invoke "add" (f32.const nan) (f32.const -infinity)))
-(assert_return_canonical_nan (invoke "add" (f32.const nan) (f32.const infinity)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const nan:0x200000) (f32.const 0x1.fffffep+127)))
+(assert_return_canonical_nan (invoke "add" (f32.const -nan) (f32.const -inf)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -nan:0x200000) (f32.const -inf)))
+(assert_return_canonical_nan (invoke "add" (f32.const -nan) (f32.const inf)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -nan:0x200000) (f32.const inf)))
+(assert_return_canonical_nan (invoke "add" (f32.const nan) (f32.const -inf)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const nan:0x200000) (f32.const -inf)))
+(assert_return_canonical_nan (invoke "add" (f32.const nan) (f32.const inf)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const nan:0x200000) (f32.const inf)))
 (assert_return_canonical_nan (invoke "add" (f32.const -nan) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -nan:0x200000) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -nan) (f32.const -nan:0x200000)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -nan:0x200000) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "add" (f32.const -nan) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -nan:0x200000) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -nan) (f32.const nan:0x200000)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const -nan:0x200000) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "add" (f32.const nan) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const nan:0x200000) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const nan) (f32.const -nan:0x200000)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const nan:0x200000) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "add" (f32.const nan) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const nan:0x200000) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const nan) (f32.const nan:0x200000)))
+(assert_return_arithmetic_nan (invoke "add" (f32.const nan:0x200000) (f32.const nan:0x200000)))
 (assert_return (invoke "sub" (f32.const -0x0p+0) (f32.const -0x0p+0)) (f32.const 0x0p+0))
 (assert_return (invoke "sub" (f32.const -0x0p+0) (f32.const 0x0p+0)) (f32.const -0x0p+0))
 (assert_return (invoke "sub" (f32.const 0x0p+0) (f32.const -0x0p+0)) (f32.const 0x0p+0))
@@ -370,14 +444,18 @@
 (assert_return (invoke "sub" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "sub" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
 (assert_return (invoke "sub" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
-(assert_return (invoke "sub" (f32.const -0x0p+0) (f32.const -infinity)) (f32.const infinity))
-(assert_return (invoke "sub" (f32.const -0x0p+0) (f32.const infinity)) (f32.const -infinity))
-(assert_return (invoke "sub" (f32.const 0x0p+0) (f32.const -infinity)) (f32.const infinity))
-(assert_return (invoke "sub" (f32.const 0x0p+0) (f32.const infinity)) (f32.const -infinity))
+(assert_return (invoke "sub" (f32.const -0x0p+0) (f32.const -inf)) (f32.const inf))
+(assert_return (invoke "sub" (f32.const -0x0p+0) (f32.const inf)) (f32.const -inf))
+(assert_return (invoke "sub" (f32.const 0x0p+0) (f32.const -inf)) (f32.const inf))
+(assert_return (invoke "sub" (f32.const 0x0p+0) (f32.const inf)) (f32.const -inf))
 (assert_return_canonical_nan (invoke "sub" (f32.const -0x0p+0) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -0x0p+0) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "sub" (f32.const -0x0p+0) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -0x0p+0) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "sub" (f32.const 0x0p+0) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const 0x0p+0) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "sub" (f32.const 0x0p+0) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const 0x0p+0) (f32.const nan:0x200000)))
 (assert_return (invoke "sub" (f32.const -0x1p-149) (f32.const -0x0p+0)) (f32.const -0x1p-149))
 (assert_return (invoke "sub" (f32.const -0x1p-149) (f32.const 0x0p+0)) (f32.const -0x1p-149))
 (assert_return (invoke "sub" (f32.const 0x1p-149) (f32.const -0x0p+0)) (f32.const 0x1p-149))
@@ -406,14 +484,18 @@
 (assert_return (invoke "sub" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "sub" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
 (assert_return (invoke "sub" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
-(assert_return (invoke "sub" (f32.const -0x1p-149) (f32.const -infinity)) (f32.const infinity))
-(assert_return (invoke "sub" (f32.const -0x1p-149) (f32.const infinity)) (f32.const -infinity))
-(assert_return (invoke "sub" (f32.const 0x1p-149) (f32.const -infinity)) (f32.const infinity))
-(assert_return (invoke "sub" (f32.const 0x1p-149) (f32.const infinity)) (f32.const -infinity))
+(assert_return (invoke "sub" (f32.const -0x1p-149) (f32.const -inf)) (f32.const inf))
+(assert_return (invoke "sub" (f32.const -0x1p-149) (f32.const inf)) (f32.const -inf))
+(assert_return (invoke "sub" (f32.const 0x1p-149) (f32.const -inf)) (f32.const inf))
+(assert_return (invoke "sub" (f32.const 0x1p-149) (f32.const inf)) (f32.const -inf))
 (assert_return_canonical_nan (invoke "sub" (f32.const -0x1p-149) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -0x1p-149) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "sub" (f32.const -0x1p-149) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -0x1p-149) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "sub" (f32.const 0x1p-149) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const 0x1p-149) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "sub" (f32.const 0x1p-149) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const 0x1p-149) (f32.const nan:0x200000)))
 (assert_return (invoke "sub" (f32.const -0x1p-126) (f32.const -0x0p+0)) (f32.const -0x1p-126))
 (assert_return (invoke "sub" (f32.const -0x1p-126) (f32.const 0x0p+0)) (f32.const -0x1p-126))
 (assert_return (invoke "sub" (f32.const 0x1p-126) (f32.const -0x0p+0)) (f32.const 0x1p-126))
@@ -442,14 +524,18 @@
 (assert_return (invoke "sub" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "sub" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
 (assert_return (invoke "sub" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
-(assert_return (invoke "sub" (f32.const -0x1p-126) (f32.const -infinity)) (f32.const infinity))
-(assert_return (invoke "sub" (f32.const -0x1p-126) (f32.const infinity)) (f32.const -infinity))
-(assert_return (invoke "sub" (f32.const 0x1p-126) (f32.const -infinity)) (f32.const infinity))
-(assert_return (invoke "sub" (f32.const 0x1p-126) (f32.const infinity)) (f32.const -infinity))
+(assert_return (invoke "sub" (f32.const -0x1p-126) (f32.const -inf)) (f32.const inf))
+(assert_return (invoke "sub" (f32.const -0x1p-126) (f32.const inf)) (f32.const -inf))
+(assert_return (invoke "sub" (f32.const 0x1p-126) (f32.const -inf)) (f32.const inf))
+(assert_return (invoke "sub" (f32.const 0x1p-126) (f32.const inf)) (f32.const -inf))
 (assert_return_canonical_nan (invoke "sub" (f32.const -0x1p-126) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -0x1p-126) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "sub" (f32.const -0x1p-126) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -0x1p-126) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "sub" (f32.const 0x1p-126) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const 0x1p-126) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "sub" (f32.const 0x1p-126) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const 0x1p-126) (f32.const nan:0x200000)))
 (assert_return (invoke "sub" (f32.const -0x1p-1) (f32.const -0x0p+0)) (f32.const -0x1p-1))
 (assert_return (invoke "sub" (f32.const -0x1p-1) (f32.const 0x0p+0)) (f32.const -0x1p-1))
 (assert_return (invoke "sub" (f32.const 0x1p-1) (f32.const -0x0p+0)) (f32.const 0x1p-1))
@@ -478,14 +564,18 @@
 (assert_return (invoke "sub" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "sub" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
 (assert_return (invoke "sub" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
-(assert_return (invoke "sub" (f32.const -0x1p-1) (f32.const -infinity)) (f32.const infinity))
-(assert_return (invoke "sub" (f32.const -0x1p-1) (f32.const infinity)) (f32.const -infinity))
-(assert_return (invoke "sub" (f32.const 0x1p-1) (f32.const -infinity)) (f32.const infinity))
-(assert_return (invoke "sub" (f32.const 0x1p-1) (f32.const infinity)) (f32.const -infinity))
+(assert_return (invoke "sub" (f32.const -0x1p-1) (f32.const -inf)) (f32.const inf))
+(assert_return (invoke "sub" (f32.const -0x1p-1) (f32.const inf)) (f32.const -inf))
+(assert_return (invoke "sub" (f32.const 0x1p-1) (f32.const -inf)) (f32.const inf))
+(assert_return (invoke "sub" (f32.const 0x1p-1) (f32.const inf)) (f32.const -inf))
 (assert_return_canonical_nan (invoke "sub" (f32.const -0x1p-1) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -0x1p-1) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "sub" (f32.const -0x1p-1) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -0x1p-1) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "sub" (f32.const 0x1p-1) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const 0x1p-1) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "sub" (f32.const 0x1p-1) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const 0x1p-1) (f32.const nan:0x200000)))
 (assert_return (invoke "sub" (f32.const -0x1p+0) (f32.const -0x0p+0)) (f32.const -0x1p+0))
 (assert_return (invoke "sub" (f32.const -0x1p+0) (f32.const 0x0p+0)) (f32.const -0x1p+0))
 (assert_return (invoke "sub" (f32.const 0x1p+0) (f32.const -0x0p+0)) (f32.const 0x1p+0))
@@ -514,14 +604,18 @@
 (assert_return (invoke "sub" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "sub" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
 (assert_return (invoke "sub" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
-(assert_return (invoke "sub" (f32.const -0x1p+0) (f32.const -infinity)) (f32.const infinity))
-(assert_return (invoke "sub" (f32.const -0x1p+0) (f32.const infinity)) (f32.const -infinity))
-(assert_return (invoke "sub" (f32.const 0x1p+0) (f32.const -infinity)) (f32.const infinity))
-(assert_return (invoke "sub" (f32.const 0x1p+0) (f32.const infinity)) (f32.const -infinity))
+(assert_return (invoke "sub" (f32.const -0x1p+0) (f32.const -inf)) (f32.const inf))
+(assert_return (invoke "sub" (f32.const -0x1p+0) (f32.const inf)) (f32.const -inf))
+(assert_return (invoke "sub" (f32.const 0x1p+0) (f32.const -inf)) (f32.const inf))
+(assert_return (invoke "sub" (f32.const 0x1p+0) (f32.const inf)) (f32.const -inf))
 (assert_return_canonical_nan (invoke "sub" (f32.const -0x1p+0) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -0x1p+0) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "sub" (f32.const -0x1p+0) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -0x1p+0) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "sub" (f32.const 0x1p+0) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const 0x1p+0) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "sub" (f32.const 0x1p+0) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const 0x1p+0) (f32.const nan:0x200000)))
 (assert_return (invoke "sub" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const -0x1.921fb6p+2))
 (assert_return (invoke "sub" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const -0x1.921fb6p+2))
 (assert_return (invoke "sub" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const 0x1.921fb6p+2))
@@ -550,14 +644,18 @@
 (assert_return (invoke "sub" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "sub" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
 (assert_return (invoke "sub" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
-(assert_return (invoke "sub" (f32.const -0x1.921fb6p+2) (f32.const -infinity)) (f32.const infinity))
-(assert_return (invoke "sub" (f32.const -0x1.921fb6p+2) (f32.const infinity)) (f32.const -infinity))
-(assert_return (invoke "sub" (f32.const 0x1.921fb6p+2) (f32.const -infinity)) (f32.const infinity))
-(assert_return (invoke "sub" (f32.const 0x1.921fb6p+2) (f32.const infinity)) (f32.const -infinity))
+(assert_return (invoke "sub" (f32.const -0x1.921fb6p+2) (f32.const -inf)) (f32.const inf))
+(assert_return (invoke "sub" (f32.const -0x1.921fb6p+2) (f32.const inf)) (f32.const -inf))
+(assert_return (invoke "sub" (f32.const 0x1.921fb6p+2) (f32.const -inf)) (f32.const inf))
+(assert_return (invoke "sub" (f32.const 0x1.921fb6p+2) (f32.const inf)) (f32.const -inf))
 (assert_return_canonical_nan (invoke "sub" (f32.const -0x1.921fb6p+2) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -0x1.921fb6p+2) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "sub" (f32.const -0x1.921fb6p+2) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -0x1.921fb6p+2) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "sub" (f32.const 0x1.921fb6p+2) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const 0x1.921fb6p+2) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "sub" (f32.const 0x1.921fb6p+2) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const 0x1.921fb6p+2) (f32.const nan:0x200000)))
 (assert_return (invoke "sub" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "sub" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "sub" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const 0x1.fffffep+127))
@@ -583,89 +681,141 @@
 (assert_return (invoke "sub" (f32.const 0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const 0x1.fffffep+127))
 (assert_return (invoke "sub" (f32.const 0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.fffffep+127))
 (assert_return (invoke "sub" (f32.const -0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const 0x0p+0))
-(assert_return (invoke "sub" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const -infinity))
-(assert_return (invoke "sub" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const infinity))
+(assert_return (invoke "sub" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const -inf))
+(assert_return (invoke "sub" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const inf))
 (assert_return (invoke "sub" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const 0x0p+0))
-(assert_return (invoke "sub" (f32.const -0x1.fffffep+127) (f32.const -infinity)) (f32.const infinity))
-(assert_return (invoke "sub" (f32.const -0x1.fffffep+127) (f32.const infinity)) (f32.const -infinity))
-(assert_return (invoke "sub" (f32.const 0x1.fffffep+127) (f32.const -infinity)) (f32.const infinity))
-(assert_return (invoke "sub" (f32.const 0x1.fffffep+127) (f32.const infinity)) (f32.const -infinity))
+(assert_return (invoke "sub" (f32.const -0x1.fffffep+127) (f32.const -inf)) (f32.const inf))
+(assert_return (invoke "sub" (f32.const -0x1.fffffep+127) (f32.const inf)) (f32.const -inf))
+(assert_return (invoke "sub" (f32.const 0x1.fffffep+127) (f32.const -inf)) (f32.const inf))
+(assert_return (invoke "sub" (f32.const 0x1.fffffep+127) (f32.const inf)) (f32.const -inf))
 (assert_return_canonical_nan (invoke "sub" (f32.const -0x1.fffffep+127) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -0x1.fffffep+127) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "sub" (f32.const -0x1.fffffep+127) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -0x1.fffffep+127) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "sub" (f32.const 0x1.fffffep+127) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const 0x1.fffffep+127) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "sub" (f32.const 0x1.fffffep+127) (f32.const nan)))
-(assert_return (invoke "sub" (f32.const -infinity) (f32.const -0x0p+0)) (f32.const -infinity))
-(assert_return (invoke "sub" (f32.const -infinity) (f32.const 0x0p+0)) (f32.const -infinity))
-(assert_return (invoke "sub" (f32.const infinity) (f32.const -0x0p+0)) (f32.const infinity))
-(assert_return (invoke "sub" (f32.const infinity) (f32.const 0x0p+0)) (f32.const infinity))
-(assert_return (invoke "sub" (f32.const -infinity) (f32.const -0x1p-149)) (f32.const -infinity))
-(assert_return (invoke "sub" (f32.const -infinity) (f32.const 0x1p-149)) (f32.const -infinity))
-(assert_return (invoke "sub" (f32.const infinity) (f32.const -0x1p-149)) (f32.const infinity))
-(assert_return (invoke "sub" (f32.const infinity) (f32.const 0x1p-149)) (f32.const infinity))
-(assert_return (invoke "sub" (f32.const -infinity) (f32.const -0x1p-126)) (f32.const -infinity))
-(assert_return (invoke "sub" (f32.const -infinity) (f32.const 0x1p-126)) (f32.const -infinity))
-(assert_return (invoke "sub" (f32.const infinity) (f32.const -0x1p-126)) (f32.const infinity))
-(assert_return (invoke "sub" (f32.const infinity) (f32.const 0x1p-126)) (f32.const infinity))
-(assert_return (invoke "sub" (f32.const -infinity) (f32.const -0x1p-1)) (f32.const -infinity))
-(assert_return (invoke "sub" (f32.const -infinity) (f32.const 0x1p-1)) (f32.const -infinity))
-(assert_return (invoke "sub" (f32.const infinity) (f32.const -0x1p-1)) (f32.const infinity))
-(assert_return (invoke "sub" (f32.const infinity) (f32.const 0x1p-1)) (f32.const infinity))
-(assert_return (invoke "sub" (f32.const -infinity) (f32.const -0x1p+0)) (f32.const -infinity))
-(assert_return (invoke "sub" (f32.const -infinity) (f32.const 0x1p+0)) (f32.const -infinity))
-(assert_return (invoke "sub" (f32.const infinity) (f32.const -0x1p+0)) (f32.const infinity))
-(assert_return (invoke "sub" (f32.const infinity) (f32.const 0x1p+0)) (f32.const infinity))
-(assert_return (invoke "sub" (f32.const -infinity) (f32.const -0x1.921fb6p+2)) (f32.const -infinity))
-(assert_return (invoke "sub" (f32.const -infinity) (f32.const 0x1.921fb6p+2)) (f32.const -infinity))
-(assert_return (invoke "sub" (f32.const infinity) (f32.const -0x1.921fb6p+2)) (f32.const infinity))
-(assert_return (invoke "sub" (f32.const infinity) (f32.const 0x1.921fb6p+2)) (f32.const infinity))
-(assert_return (invoke "sub" (f32.const -infinity) (f32.const -0x1.fffffep+127)) (f32.const -infinity))
-(assert_return (invoke "sub" (f32.const -infinity) (f32.const 0x1.fffffep+127)) (f32.const -infinity))
-(assert_return (invoke "sub" (f32.const infinity) (f32.const -0x1.fffffep+127)) (f32.const infinity))
-(assert_return (invoke "sub" (f32.const infinity) (f32.const 0x1.fffffep+127)) (f32.const infinity))
-(assert_return_canonical_nan (invoke "sub" (f32.const -infinity) (f32.const -infinity)))
-(assert_return (invoke "sub" (f32.const -infinity) (f32.const infinity)) (f32.const -infinity))
-(assert_return (invoke "sub" (f32.const infinity) (f32.const -infinity)) (f32.const infinity))
-(assert_return_canonical_nan (invoke "sub" (f32.const infinity) (f32.const infinity)))
-(assert_return_canonical_nan (invoke "sub" (f32.const -infinity) (f32.const -nan)))
-(assert_return_canonical_nan (invoke "sub" (f32.const -infinity) (f32.const nan)))
-(assert_return_canonical_nan (invoke "sub" (f32.const infinity) (f32.const -nan)))
-(assert_return_canonical_nan (invoke "sub" (f32.const infinity) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const 0x1.fffffep+127) (f32.const nan:0x200000)))
+(assert_return (invoke "sub" (f32.const -inf) (f32.const -0x0p+0)) (f32.const -inf))
+(assert_return (invoke "sub" (f32.const -inf) (f32.const 0x0p+0)) (f32.const -inf))
+(assert_return (invoke "sub" (f32.const inf) (f32.const -0x0p+0)) (f32.const inf))
+(assert_return (invoke "sub" (f32.const inf) (f32.const 0x0p+0)) (f32.const inf))
+(assert_return (invoke "sub" (f32.const -inf) (f32.const -0x1p-149)) (f32.const -inf))
+(assert_return (invoke "sub" (f32.const -inf) (f32.const 0x1p-149)) (f32.const -inf))
+(assert_return (invoke "sub" (f32.const inf) (f32.const -0x1p-149)) (f32.const inf))
+(assert_return (invoke "sub" (f32.const inf) (f32.const 0x1p-149)) (f32.const inf))
+(assert_return (invoke "sub" (f32.const -inf) (f32.const -0x1p-126)) (f32.const -inf))
+(assert_return (invoke "sub" (f32.const -inf) (f32.const 0x1p-126)) (f32.const -inf))
+(assert_return (invoke "sub" (f32.const inf) (f32.const -0x1p-126)) (f32.const inf))
+(assert_return (invoke "sub" (f32.const inf) (f32.const 0x1p-126)) (f32.const inf))
+(assert_return (invoke "sub" (f32.const -inf) (f32.const -0x1p-1)) (f32.const -inf))
+(assert_return (invoke "sub" (f32.const -inf) (f32.const 0x1p-1)) (f32.const -inf))
+(assert_return (invoke "sub" (f32.const inf) (f32.const -0x1p-1)) (f32.const inf))
+(assert_return (invoke "sub" (f32.const inf) (f32.const 0x1p-1)) (f32.const inf))
+(assert_return (invoke "sub" (f32.const -inf) (f32.const -0x1p+0)) (f32.const -inf))
+(assert_return (invoke "sub" (f32.const -inf) (f32.const 0x1p+0)) (f32.const -inf))
+(assert_return (invoke "sub" (f32.const inf) (f32.const -0x1p+0)) (f32.const inf))
+(assert_return (invoke "sub" (f32.const inf) (f32.const 0x1p+0)) (f32.const inf))
+(assert_return (invoke "sub" (f32.const -inf) (f32.const -0x1.921fb6p+2)) (f32.const -inf))
+(assert_return (invoke "sub" (f32.const -inf) (f32.const 0x1.921fb6p+2)) (f32.const -inf))
+(assert_return (invoke "sub" (f32.const inf) (f32.const -0x1.921fb6p+2)) (f32.const inf))
+(assert_return (invoke "sub" (f32.const inf) (f32.const 0x1.921fb6p+2)) (f32.const inf))
+(assert_return (invoke "sub" (f32.const -inf) (f32.const -0x1.fffffep+127)) (f32.const -inf))
+(assert_return (invoke "sub" (f32.const -inf) (f32.const 0x1.fffffep+127)) (f32.const -inf))
+(assert_return (invoke "sub" (f32.const inf) (f32.const -0x1.fffffep+127)) (f32.const inf))
+(assert_return (invoke "sub" (f32.const inf) (f32.const 0x1.fffffep+127)) (f32.const inf))
+(assert_return_canonical_nan (invoke "sub" (f32.const -inf) (f32.const -inf)))
+(assert_return (invoke "sub" (f32.const -inf) (f32.const inf)) (f32.const -inf))
+(assert_return (invoke "sub" (f32.const inf) (f32.const -inf)) (f32.const inf))
+(assert_return_canonical_nan (invoke "sub" (f32.const inf) (f32.const inf)))
+(assert_return_canonical_nan (invoke "sub" (f32.const -inf) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -inf) (f32.const -nan:0x200000)))
+(assert_return_canonical_nan (invoke "sub" (f32.const -inf) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -inf) (f32.const nan:0x200000)))
+(assert_return_canonical_nan (invoke "sub" (f32.const inf) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const inf) (f32.const -nan:0x200000)))
+(assert_return_canonical_nan (invoke "sub" (f32.const inf) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const inf) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "sub" (f32.const -nan) (f32.const -0x0p+0)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -nan:0x200000) (f32.const -0x0p+0)))
 (assert_return_canonical_nan (invoke "sub" (f32.const -nan) (f32.const 0x0p+0)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -nan:0x200000) (f32.const 0x0p+0)))
 (assert_return_canonical_nan (invoke "sub" (f32.const nan) (f32.const -0x0p+0)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const nan:0x200000) (f32.const -0x0p+0)))
 (assert_return_canonical_nan (invoke "sub" (f32.const nan) (f32.const 0x0p+0)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const nan:0x200000) (f32.const 0x0p+0)))
 (assert_return_canonical_nan (invoke "sub" (f32.const -nan) (f32.const -0x1p-149)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -nan:0x200000) (f32.const -0x1p-149)))
 (assert_return_canonical_nan (invoke "sub" (f32.const -nan) (f32.const 0x1p-149)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -nan:0x200000) (f32.const 0x1p-149)))
 (assert_return_canonical_nan (invoke "sub" (f32.const nan) (f32.const -0x1p-149)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const nan:0x200000) (f32.const -0x1p-149)))
 (assert_return_canonical_nan (invoke "sub" (f32.const nan) (f32.const 0x1p-149)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const nan:0x200000) (f32.const 0x1p-149)))
 (assert_return_canonical_nan (invoke "sub" (f32.const -nan) (f32.const -0x1p-126)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -nan:0x200000) (f32.const -0x1p-126)))
 (assert_return_canonical_nan (invoke "sub" (f32.const -nan) (f32.const 0x1p-126)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -nan:0x200000) (f32.const 0x1p-126)))
 (assert_return_canonical_nan (invoke "sub" (f32.const nan) (f32.const -0x1p-126)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const nan:0x200000) (f32.const -0x1p-126)))
 (assert_return_canonical_nan (invoke "sub" (f32.const nan) (f32.const 0x1p-126)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const nan:0x200000) (f32.const 0x1p-126)))
 (assert_return_canonical_nan (invoke "sub" (f32.const -nan) (f32.const -0x1p-1)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -nan:0x200000) (f32.const -0x1p-1)))
 (assert_return_canonical_nan (invoke "sub" (f32.const -nan) (f32.const 0x1p-1)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -nan:0x200000) (f32.const 0x1p-1)))
 (assert_return_canonical_nan (invoke "sub" (f32.const nan) (f32.const -0x1p-1)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const nan:0x200000) (f32.const -0x1p-1)))
 (assert_return_canonical_nan (invoke "sub" (f32.const nan) (f32.const 0x1p-1)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const nan:0x200000) (f32.const 0x1p-1)))
 (assert_return_canonical_nan (invoke "sub" (f32.const -nan) (f32.const -0x1p+0)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -nan:0x200000) (f32.const -0x1p+0)))
 (assert_return_canonical_nan (invoke "sub" (f32.const -nan) (f32.const 0x1p+0)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -nan:0x200000) (f32.const 0x1p+0)))
 (assert_return_canonical_nan (invoke "sub" (f32.const nan) (f32.const -0x1p+0)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const nan:0x200000) (f32.const -0x1p+0)))
 (assert_return_canonical_nan (invoke "sub" (f32.const nan) (f32.const 0x1p+0)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const nan:0x200000) (f32.const 0x1p+0)))
 (assert_return_canonical_nan (invoke "sub" (f32.const -nan) (f32.const -0x1.921fb6p+2)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -nan:0x200000) (f32.const -0x1.921fb6p+2)))
 (assert_return_canonical_nan (invoke "sub" (f32.const -nan) (f32.const 0x1.921fb6p+2)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -nan:0x200000) (f32.const 0x1.921fb6p+2)))
 (assert_return_canonical_nan (invoke "sub" (f32.const nan) (f32.const -0x1.921fb6p+2)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const nan:0x200000) (f32.const -0x1.921fb6p+2)))
 (assert_return_canonical_nan (invoke "sub" (f32.const nan) (f32.const 0x1.921fb6p+2)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const nan:0x200000) (f32.const 0x1.921fb6p+2)))
 (assert_return_canonical_nan (invoke "sub" (f32.const -nan) (f32.const -0x1.fffffep+127)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -nan:0x200000) (f32.const -0x1.fffffep+127)))
 (assert_return_canonical_nan (invoke "sub" (f32.const -nan) (f32.const 0x1.fffffep+127)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -nan:0x200000) (f32.const 0x1.fffffep+127)))
 (assert_return_canonical_nan (invoke "sub" (f32.const nan) (f32.const -0x1.fffffep+127)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const nan:0x200000) (f32.const -0x1.fffffep+127)))
 (assert_return_canonical_nan (invoke "sub" (f32.const nan) (f32.const 0x1.fffffep+127)))
-(assert_return_canonical_nan (invoke "sub" (f32.const -nan) (f32.const -infinity)))
-(assert_return_canonical_nan (invoke "sub" (f32.const -nan) (f32.const infinity)))
-(assert_return_canonical_nan (invoke "sub" (f32.const nan) (f32.const -infinity)))
-(assert_return_canonical_nan (invoke "sub" (f32.const nan) (f32.const infinity)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const nan:0x200000) (f32.const 0x1.fffffep+127)))
+(assert_return_canonical_nan (invoke "sub" (f32.const -nan) (f32.const -inf)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -nan:0x200000) (f32.const -inf)))
+(assert_return_canonical_nan (invoke "sub" (f32.const -nan) (f32.const inf)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -nan:0x200000) (f32.const inf)))
+(assert_return_canonical_nan (invoke "sub" (f32.const nan) (f32.const -inf)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const nan:0x200000) (f32.const -inf)))
+(assert_return_canonical_nan (invoke "sub" (f32.const nan) (f32.const inf)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const nan:0x200000) (f32.const inf)))
 (assert_return_canonical_nan (invoke "sub" (f32.const -nan) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -nan:0x200000) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -nan) (f32.const -nan:0x200000)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -nan:0x200000) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "sub" (f32.const -nan) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -nan:0x200000) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -nan) (f32.const nan:0x200000)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const -nan:0x200000) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "sub" (f32.const nan) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const nan:0x200000) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const nan) (f32.const -nan:0x200000)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const nan:0x200000) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "sub" (f32.const nan) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const nan:0x200000) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const nan) (f32.const nan:0x200000)))
+(assert_return_arithmetic_nan (invoke "sub" (f32.const nan:0x200000) (f32.const nan:0x200000)))
 (assert_return (invoke "mul" (f32.const -0x0p+0) (f32.const -0x0p+0)) (f32.const 0x0p+0))
 (assert_return (invoke "mul" (f32.const -0x0p+0) (f32.const 0x0p+0)) (f32.const -0x0p+0))
 (assert_return (invoke "mul" (f32.const 0x0p+0) (f32.const -0x0p+0)) (f32.const -0x0p+0))
@@ -694,14 +844,18 @@
 (assert_return (invoke "mul" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const -0x0p+0))
 (assert_return (invoke "mul" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x0p+0))
 (assert_return (invoke "mul" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x0p+0))
-(assert_return_canonical_nan (invoke "mul" (f32.const -0x0p+0) (f32.const -infinity)))
-(assert_return_canonical_nan (invoke "mul" (f32.const -0x0p+0) (f32.const infinity)))
-(assert_return_canonical_nan (invoke "mul" (f32.const 0x0p+0) (f32.const -infinity)))
-(assert_return_canonical_nan (invoke "mul" (f32.const 0x0p+0) (f32.const infinity)))
+(assert_return_canonical_nan (invoke "mul" (f32.const -0x0p+0) (f32.const -inf)))
+(assert_return_canonical_nan (invoke "mul" (f32.const -0x0p+0) (f32.const inf)))
+(assert_return_canonical_nan (invoke "mul" (f32.const 0x0p+0) (f32.const -inf)))
+(assert_return_canonical_nan (invoke "mul" (f32.const 0x0p+0) (f32.const inf)))
 (assert_return_canonical_nan (invoke "mul" (f32.const -0x0p+0) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -0x0p+0) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "mul" (f32.const -0x0p+0) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -0x0p+0) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "mul" (f32.const 0x0p+0) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const 0x0p+0) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "mul" (f32.const 0x0p+0) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const 0x0p+0) (f32.const nan:0x200000)))
 (assert_return (invoke "mul" (f32.const -0x1p-149) (f32.const -0x0p+0)) (f32.const 0x0p+0))
 (assert_return (invoke "mul" (f32.const -0x1p-149) (f32.const 0x0p+0)) (f32.const -0x0p+0))
 (assert_return (invoke "mul" (f32.const 0x1p-149) (f32.const -0x0p+0)) (f32.const -0x0p+0))
@@ -730,14 +884,18 @@
 (assert_return (invoke "mul" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep-22))
 (assert_return (invoke "mul" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep-22))
 (assert_return (invoke "mul" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep-22))
-(assert_return (invoke "mul" (f32.const -0x1p-149) (f32.const -infinity)) (f32.const infinity))
-(assert_return (invoke "mul" (f32.const -0x1p-149) (f32.const infinity)) (f32.const -infinity))
-(assert_return (invoke "mul" (f32.const 0x1p-149) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "mul" (f32.const 0x1p-149) (f32.const infinity)) (f32.const infinity))
+(assert_return (invoke "mul" (f32.const -0x1p-149) (f32.const -inf)) (f32.const inf))
+(assert_return (invoke "mul" (f32.const -0x1p-149) (f32.const inf)) (f32.const -inf))
+(assert_return (invoke "mul" (f32.const 0x1p-149) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "mul" (f32.const 0x1p-149) (f32.const inf)) (f32.const inf))
 (assert_return_canonical_nan (invoke "mul" (f32.const -0x1p-149) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -0x1p-149) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "mul" (f32.const -0x1p-149) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -0x1p-149) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "mul" (f32.const 0x1p-149) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const 0x1p-149) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "mul" (f32.const 0x1p-149) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const 0x1p-149) (f32.const nan:0x200000)))
 (assert_return (invoke "mul" (f32.const -0x1p-126) (f32.const -0x0p+0)) (f32.const 0x0p+0))
 (assert_return (invoke "mul" (f32.const -0x1p-126) (f32.const 0x0p+0)) (f32.const -0x0p+0))
 (assert_return (invoke "mul" (f32.const 0x1p-126) (f32.const -0x0p+0)) (f32.const -0x0p+0))
@@ -766,14 +924,18 @@
 (assert_return (invoke "mul" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+1))
 (assert_return (invoke "mul" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+1))
 (assert_return (invoke "mul" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+1))
-(assert_return (invoke "mul" (f32.const -0x1p-126) (f32.const -infinity)) (f32.const infinity))
-(assert_return (invoke "mul" (f32.const -0x1p-126) (f32.const infinity)) (f32.const -infinity))
-(assert_return (invoke "mul" (f32.const 0x1p-126) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "mul" (f32.const 0x1p-126) (f32.const infinity)) (f32.const infinity))
+(assert_return (invoke "mul" (f32.const -0x1p-126) (f32.const -inf)) (f32.const inf))
+(assert_return (invoke "mul" (f32.const -0x1p-126) (f32.const inf)) (f32.const -inf))
+(assert_return (invoke "mul" (f32.const 0x1p-126) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "mul" (f32.const 0x1p-126) (f32.const inf)) (f32.const inf))
 (assert_return_canonical_nan (invoke "mul" (f32.const -0x1p-126) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -0x1p-126) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "mul" (f32.const -0x1p-126) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -0x1p-126) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "mul" (f32.const 0x1p-126) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const 0x1p-126) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "mul" (f32.const 0x1p-126) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const 0x1p-126) (f32.const nan:0x200000)))
 (assert_return (invoke "mul" (f32.const -0x1p-1) (f32.const -0x0p+0)) (f32.const 0x0p+0))
 (assert_return (invoke "mul" (f32.const -0x1p-1) (f32.const 0x0p+0)) (f32.const -0x0p+0))
 (assert_return (invoke "mul" (f32.const 0x1p-1) (f32.const -0x0p+0)) (f32.const -0x0p+0))
@@ -802,14 +964,18 @@
 (assert_return (invoke "mul" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+126))
 (assert_return (invoke "mul" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+126))
 (assert_return (invoke "mul" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+126))
-(assert_return (invoke "mul" (f32.const -0x1p-1) (f32.const -infinity)) (f32.const infinity))
-(assert_return (invoke "mul" (f32.const -0x1p-1) (f32.const infinity)) (f32.const -infinity))
-(assert_return (invoke "mul" (f32.const 0x1p-1) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "mul" (f32.const 0x1p-1) (f32.const infinity)) (f32.const infinity))
+(assert_return (invoke "mul" (f32.const -0x1p-1) (f32.const -inf)) (f32.const inf))
+(assert_return (invoke "mul" (f32.const -0x1p-1) (f32.const inf)) (f32.const -inf))
+(assert_return (invoke "mul" (f32.const 0x1p-1) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "mul" (f32.const 0x1p-1) (f32.const inf)) (f32.const inf))
 (assert_return_canonical_nan (invoke "mul" (f32.const -0x1p-1) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -0x1p-1) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "mul" (f32.const -0x1p-1) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -0x1p-1) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "mul" (f32.const 0x1p-1) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const 0x1p-1) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "mul" (f32.const 0x1p-1) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const 0x1p-1) (f32.const nan:0x200000)))
 (assert_return (invoke "mul" (f32.const -0x1p+0) (f32.const -0x0p+0)) (f32.const 0x0p+0))
 (assert_return (invoke "mul" (f32.const -0x1p+0) (f32.const 0x0p+0)) (f32.const -0x0p+0))
 (assert_return (invoke "mul" (f32.const 0x1p+0) (f32.const -0x0p+0)) (f32.const -0x0p+0))
@@ -838,14 +1004,18 @@
 (assert_return (invoke "mul" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "mul" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "mul" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "mul" (f32.const -0x1p+0) (f32.const -infinity)) (f32.const infinity))
-(assert_return (invoke "mul" (f32.const -0x1p+0) (f32.const infinity)) (f32.const -infinity))
-(assert_return (invoke "mul" (f32.const 0x1p+0) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "mul" (f32.const 0x1p+0) (f32.const infinity)) (f32.const infinity))
+(assert_return (invoke "mul" (f32.const -0x1p+0) (f32.const -inf)) (f32.const inf))
+(assert_return (invoke "mul" (f32.const -0x1p+0) (f32.const inf)) (f32.const -inf))
+(assert_return (invoke "mul" (f32.const 0x1p+0) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "mul" (f32.const 0x1p+0) (f32.const inf)) (f32.const inf))
 (assert_return_canonical_nan (invoke "mul" (f32.const -0x1p+0) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -0x1p+0) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "mul" (f32.const -0x1p+0) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -0x1p+0) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "mul" (f32.const 0x1p+0) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const 0x1p+0) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "mul" (f32.const 0x1p+0) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const 0x1p+0) (f32.const nan:0x200000)))
 (assert_return (invoke "mul" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const 0x0p+0))
 (assert_return (invoke "mul" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const -0x0p+0))
 (assert_return (invoke "mul" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const -0x0p+0))
@@ -870,18 +1040,22 @@
 (assert_return (invoke "mul" (f32.const -0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const -0x1.3bd3cep+5))
 (assert_return (invoke "mul" (f32.const 0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.3bd3cep+5))
 (assert_return (invoke "mul" (f32.const 0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.3bd3cep+5))
-(assert_return (invoke "mul" (f32.const -0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const infinity))
-(assert_return (invoke "mul" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const -infinity))
-(assert_return (invoke "mul" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const -infinity))
-(assert_return (invoke "mul" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const infinity))
-(assert_return (invoke "mul" (f32.const -0x1.921fb6p+2) (f32.const -infinity)) (f32.const infinity))
-(assert_return (invoke "mul" (f32.const -0x1.921fb6p+2) (f32.const infinity)) (f32.const -infinity))
-(assert_return (invoke "mul" (f32.const 0x1.921fb6p+2) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "mul" (f32.const 0x1.921fb6p+2) (f32.const infinity)) (f32.const infinity))
+(assert_return (invoke "mul" (f32.const -0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const inf))
+(assert_return (invoke "mul" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const -inf))
+(assert_return (invoke "mul" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const -inf))
+(assert_return (invoke "mul" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const inf))
+(assert_return (invoke "mul" (f32.const -0x1.921fb6p+2) (f32.const -inf)) (f32.const inf))
+(assert_return (invoke "mul" (f32.const -0x1.921fb6p+2) (f32.const inf)) (f32.const -inf))
+(assert_return (invoke "mul" (f32.const 0x1.921fb6p+2) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "mul" (f32.const 0x1.921fb6p+2) (f32.const inf)) (f32.const inf))
 (assert_return_canonical_nan (invoke "mul" (f32.const -0x1.921fb6p+2) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -0x1.921fb6p+2) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "mul" (f32.const -0x1.921fb6p+2) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -0x1.921fb6p+2) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "mul" (f32.const 0x1.921fb6p+2) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const 0x1.921fb6p+2) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "mul" (f32.const 0x1.921fb6p+2) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const 0x1.921fb6p+2) (f32.const nan:0x200000)))
 (assert_return (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const 0x0p+0))
 (assert_return (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const -0x0p+0))
 (assert_return (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const -0x0p+0))
@@ -902,94 +1076,146 @@
 (assert_return (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const infinity))
-(assert_return (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const -infinity))
-(assert_return (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const -infinity))
-(assert_return (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const infinity))
-(assert_return (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const infinity))
-(assert_return (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const -infinity))
-(assert_return (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const -infinity))
-(assert_return (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const infinity))
-(assert_return (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const -infinity)) (f32.const infinity))
-(assert_return (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const infinity)) (f32.const -infinity))
-(assert_return (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const infinity)) (f32.const infinity))
+(assert_return (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const inf))
+(assert_return (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const -inf))
+(assert_return (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const -inf))
+(assert_return (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const inf))
+(assert_return (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const inf))
+(assert_return (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const -inf))
+(assert_return (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const -inf))
+(assert_return (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const inf))
+(assert_return (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const -inf)) (f32.const inf))
+(assert_return (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const inf)) (f32.const -inf))
+(assert_return (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const inf)) (f32.const inf))
 (assert_return_canonical_nan (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -0x1.fffffep+127) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const nan)))
-(assert_return_canonical_nan (invoke "mul" (f32.const -infinity) (f32.const -0x0p+0)))
-(assert_return_canonical_nan (invoke "mul" (f32.const -infinity) (f32.const 0x0p+0)))
-(assert_return_canonical_nan (invoke "mul" (f32.const infinity) (f32.const -0x0p+0)))
-(assert_return_canonical_nan (invoke "mul" (f32.const infinity) (f32.const 0x0p+0)))
-(assert_return (invoke "mul" (f32.const -infinity) (f32.const -0x1p-149)) (f32.const infinity))
-(assert_return (invoke "mul" (f32.const -infinity) (f32.const 0x1p-149)) (f32.const -infinity))
-(assert_return (invoke "mul" (f32.const infinity) (f32.const -0x1p-149)) (f32.const -infinity))
-(assert_return (invoke "mul" (f32.const infinity) (f32.const 0x1p-149)) (f32.const infinity))
-(assert_return (invoke "mul" (f32.const -infinity) (f32.const -0x1p-126)) (f32.const infinity))
-(assert_return (invoke "mul" (f32.const -infinity) (f32.const 0x1p-126)) (f32.const -infinity))
-(assert_return (invoke "mul" (f32.const infinity) (f32.const -0x1p-126)) (f32.const -infinity))
-(assert_return (invoke "mul" (f32.const infinity) (f32.const 0x1p-126)) (f32.const infinity))
-(assert_return (invoke "mul" (f32.const -infinity) (f32.const -0x1p-1)) (f32.const infinity))
-(assert_return (invoke "mul" (f32.const -infinity) (f32.const 0x1p-1)) (f32.const -infinity))
-(assert_return (invoke "mul" (f32.const infinity) (f32.const -0x1p-1)) (f32.const -infinity))
-(assert_return (invoke "mul" (f32.const infinity) (f32.const 0x1p-1)) (f32.const infinity))
-(assert_return (invoke "mul" (f32.const -infinity) (f32.const -0x1p+0)) (f32.const infinity))
-(assert_return (invoke "mul" (f32.const -infinity) (f32.const 0x1p+0)) (f32.const -infinity))
-(assert_return (invoke "mul" (f32.const infinity) (f32.const -0x1p+0)) (f32.const -infinity))
-(assert_return (invoke "mul" (f32.const infinity) (f32.const 0x1p+0)) (f32.const infinity))
-(assert_return (invoke "mul" (f32.const -infinity) (f32.const -0x1.921fb6p+2)) (f32.const infinity))
-(assert_return (invoke "mul" (f32.const -infinity) (f32.const 0x1.921fb6p+2)) (f32.const -infinity))
-(assert_return (invoke "mul" (f32.const infinity) (f32.const -0x1.921fb6p+2)) (f32.const -infinity))
-(assert_return (invoke "mul" (f32.const infinity) (f32.const 0x1.921fb6p+2)) (f32.const infinity))
-(assert_return (invoke "mul" (f32.const -infinity) (f32.const -0x1.fffffep+127)) (f32.const infinity))
-(assert_return (invoke "mul" (f32.const -infinity) (f32.const 0x1.fffffep+127)) (f32.const -infinity))
-(assert_return (invoke "mul" (f32.const infinity) (f32.const -0x1.fffffep+127)) (f32.const -infinity))
-(assert_return (invoke "mul" (f32.const infinity) (f32.const 0x1.fffffep+127)) (f32.const infinity))
-(assert_return (invoke "mul" (f32.const -infinity) (f32.const -infinity)) (f32.const infinity))
-(assert_return (invoke "mul" (f32.const -infinity) (f32.const infinity)) (f32.const -infinity))
-(assert_return (invoke "mul" (f32.const infinity) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "mul" (f32.const infinity) (f32.const infinity)) (f32.const infinity))
-(assert_return_canonical_nan (invoke "mul" (f32.const -infinity) (f32.const -nan)))
-(assert_return_canonical_nan (invoke "mul" (f32.const -infinity) (f32.const nan)))
-(assert_return_canonical_nan (invoke "mul" (f32.const infinity) (f32.const -nan)))
-(assert_return_canonical_nan (invoke "mul" (f32.const infinity) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const 0x1.fffffep+127) (f32.const nan:0x200000)))
+(assert_return_canonical_nan (invoke "mul" (f32.const -inf) (f32.const -0x0p+0)))
+(assert_return_canonical_nan (invoke "mul" (f32.const -inf) (f32.const 0x0p+0)))
+(assert_return_canonical_nan (invoke "mul" (f32.const inf) (f32.const -0x0p+0)))
+(assert_return_canonical_nan (invoke "mul" (f32.const inf) (f32.const 0x0p+0)))
+(assert_return (invoke "mul" (f32.const -inf) (f32.const -0x1p-149)) (f32.const inf))
+(assert_return (invoke "mul" (f32.const -inf) (f32.const 0x1p-149)) (f32.const -inf))
+(assert_return (invoke "mul" (f32.const inf) (f32.const -0x1p-149)) (f32.const -inf))
+(assert_return (invoke "mul" (f32.const inf) (f32.const 0x1p-149)) (f32.const inf))
+(assert_return (invoke "mul" (f32.const -inf) (f32.const -0x1p-126)) (f32.const inf))
+(assert_return (invoke "mul" (f32.const -inf) (f32.const 0x1p-126)) (f32.const -inf))
+(assert_return (invoke "mul" (f32.const inf) (f32.const -0x1p-126)) (f32.const -inf))
+(assert_return (invoke "mul" (f32.const inf) (f32.const 0x1p-126)) (f32.const inf))
+(assert_return (invoke "mul" (f32.const -inf) (f32.const -0x1p-1)) (f32.const inf))
+(assert_return (invoke "mul" (f32.const -inf) (f32.const 0x1p-1)) (f32.const -inf))
+(assert_return (invoke "mul" (f32.const inf) (f32.const -0x1p-1)) (f32.const -inf))
+(assert_return (invoke "mul" (f32.const inf) (f32.const 0x1p-1)) (f32.const inf))
+(assert_return (invoke "mul" (f32.const -inf) (f32.const -0x1p+0)) (f32.const inf))
+(assert_return (invoke "mul" (f32.const -inf) (f32.const 0x1p+0)) (f32.const -inf))
+(assert_return (invoke "mul" (f32.const inf) (f32.const -0x1p+0)) (f32.const -inf))
+(assert_return (invoke "mul" (f32.const inf) (f32.const 0x1p+0)) (f32.const inf))
+(assert_return (invoke "mul" (f32.const -inf) (f32.const -0x1.921fb6p+2)) (f32.const inf))
+(assert_return (invoke "mul" (f32.const -inf) (f32.const 0x1.921fb6p+2)) (f32.const -inf))
+(assert_return (invoke "mul" (f32.const inf) (f32.const -0x1.921fb6p+2)) (f32.const -inf))
+(assert_return (invoke "mul" (f32.const inf) (f32.const 0x1.921fb6p+2)) (f32.const inf))
+(assert_return (invoke "mul" (f32.const -inf) (f32.const -0x1.fffffep+127)) (f32.const inf))
+(assert_return (invoke "mul" (f32.const -inf) (f32.const 0x1.fffffep+127)) (f32.const -inf))
+(assert_return (invoke "mul" (f32.const inf) (f32.const -0x1.fffffep+127)) (f32.const -inf))
+(assert_return (invoke "mul" (f32.const inf) (f32.const 0x1.fffffep+127)) (f32.const inf))
+(assert_return (invoke "mul" (f32.const -inf) (f32.const -inf)) (f32.const inf))
+(assert_return (invoke "mul" (f32.const -inf) (f32.const inf)) (f32.const -inf))
+(assert_return (invoke "mul" (f32.const inf) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "mul" (f32.const inf) (f32.const inf)) (f32.const inf))
+(assert_return_canonical_nan (invoke "mul" (f32.const -inf) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -inf) (f32.const -nan:0x200000)))
+(assert_return_canonical_nan (invoke "mul" (f32.const -inf) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -inf) (f32.const nan:0x200000)))
+(assert_return_canonical_nan (invoke "mul" (f32.const inf) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const inf) (f32.const -nan:0x200000)))
+(assert_return_canonical_nan (invoke "mul" (f32.const inf) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const inf) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "mul" (f32.const -nan) (f32.const -0x0p+0)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -nan:0x200000) (f32.const -0x0p+0)))
 (assert_return_canonical_nan (invoke "mul" (f32.const -nan) (f32.const 0x0p+0)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -nan:0x200000) (f32.const 0x0p+0)))
 (assert_return_canonical_nan (invoke "mul" (f32.const nan) (f32.const -0x0p+0)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const nan:0x200000) (f32.const -0x0p+0)))
 (assert_return_canonical_nan (invoke "mul" (f32.const nan) (f32.const 0x0p+0)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const nan:0x200000) (f32.const 0x0p+0)))
 (assert_return_canonical_nan (invoke "mul" (f32.const -nan) (f32.const -0x1p-149)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -nan:0x200000) (f32.const -0x1p-149)))
 (assert_return_canonical_nan (invoke "mul" (f32.const -nan) (f32.const 0x1p-149)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -nan:0x200000) (f32.const 0x1p-149)))
 (assert_return_canonical_nan (invoke "mul" (f32.const nan) (f32.const -0x1p-149)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const nan:0x200000) (f32.const -0x1p-149)))
 (assert_return_canonical_nan (invoke "mul" (f32.const nan) (f32.const 0x1p-149)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const nan:0x200000) (f32.const 0x1p-149)))
 (assert_return_canonical_nan (invoke "mul" (f32.const -nan) (f32.const -0x1p-126)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -nan:0x200000) (f32.const -0x1p-126)))
 (assert_return_canonical_nan (invoke "mul" (f32.const -nan) (f32.const 0x1p-126)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -nan:0x200000) (f32.const 0x1p-126)))
 (assert_return_canonical_nan (invoke "mul" (f32.const nan) (f32.const -0x1p-126)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const nan:0x200000) (f32.const -0x1p-126)))
 (assert_return_canonical_nan (invoke "mul" (f32.const nan) (f32.const 0x1p-126)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const nan:0x200000) (f32.const 0x1p-126)))
 (assert_return_canonical_nan (invoke "mul" (f32.const -nan) (f32.const -0x1p-1)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -nan:0x200000) (f32.const -0x1p-1)))
 (assert_return_canonical_nan (invoke "mul" (f32.const -nan) (f32.const 0x1p-1)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -nan:0x200000) (f32.const 0x1p-1)))
 (assert_return_canonical_nan (invoke "mul" (f32.const nan) (f32.const -0x1p-1)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const nan:0x200000) (f32.const -0x1p-1)))
 (assert_return_canonical_nan (invoke "mul" (f32.const nan) (f32.const 0x1p-1)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const nan:0x200000) (f32.const 0x1p-1)))
 (assert_return_canonical_nan (invoke "mul" (f32.const -nan) (f32.const -0x1p+0)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -nan:0x200000) (f32.const -0x1p+0)))
 (assert_return_canonical_nan (invoke "mul" (f32.const -nan) (f32.const 0x1p+0)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -nan:0x200000) (f32.const 0x1p+0)))
 (assert_return_canonical_nan (invoke "mul" (f32.const nan) (f32.const -0x1p+0)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const nan:0x200000) (f32.const -0x1p+0)))
 (assert_return_canonical_nan (invoke "mul" (f32.const nan) (f32.const 0x1p+0)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const nan:0x200000) (f32.const 0x1p+0)))
 (assert_return_canonical_nan (invoke "mul" (f32.const -nan) (f32.const -0x1.921fb6p+2)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -nan:0x200000) (f32.const -0x1.921fb6p+2)))
 (assert_return_canonical_nan (invoke "mul" (f32.const -nan) (f32.const 0x1.921fb6p+2)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -nan:0x200000) (f32.const 0x1.921fb6p+2)))
 (assert_return_canonical_nan (invoke "mul" (f32.const nan) (f32.const -0x1.921fb6p+2)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const nan:0x200000) (f32.const -0x1.921fb6p+2)))
 (assert_return_canonical_nan (invoke "mul" (f32.const nan) (f32.const 0x1.921fb6p+2)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const nan:0x200000) (f32.const 0x1.921fb6p+2)))
 (assert_return_canonical_nan (invoke "mul" (f32.const -nan) (f32.const -0x1.fffffep+127)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -nan:0x200000) (f32.const -0x1.fffffep+127)))
 (assert_return_canonical_nan (invoke "mul" (f32.const -nan) (f32.const 0x1.fffffep+127)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -nan:0x200000) (f32.const 0x1.fffffep+127)))
 (assert_return_canonical_nan (invoke "mul" (f32.const nan) (f32.const -0x1.fffffep+127)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const nan:0x200000) (f32.const -0x1.fffffep+127)))
 (assert_return_canonical_nan (invoke "mul" (f32.const nan) (f32.const 0x1.fffffep+127)))
-(assert_return_canonical_nan (invoke "mul" (f32.const -nan) (f32.const -infinity)))
-(assert_return_canonical_nan (invoke "mul" (f32.const -nan) (f32.const infinity)))
-(assert_return_canonical_nan (invoke "mul" (f32.const nan) (f32.const -infinity)))
-(assert_return_canonical_nan (invoke "mul" (f32.const nan) (f32.const infinity)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const nan:0x200000) (f32.const 0x1.fffffep+127)))
+(assert_return_canonical_nan (invoke "mul" (f32.const -nan) (f32.const -inf)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -nan:0x200000) (f32.const -inf)))
+(assert_return_canonical_nan (invoke "mul" (f32.const -nan) (f32.const inf)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -nan:0x200000) (f32.const inf)))
+(assert_return_canonical_nan (invoke "mul" (f32.const nan) (f32.const -inf)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const nan:0x200000) (f32.const -inf)))
+(assert_return_canonical_nan (invoke "mul" (f32.const nan) (f32.const inf)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const nan:0x200000) (f32.const inf)))
 (assert_return_canonical_nan (invoke "mul" (f32.const -nan) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -nan:0x200000) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -nan) (f32.const -nan:0x200000)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -nan:0x200000) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "mul" (f32.const -nan) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -nan:0x200000) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -nan) (f32.const nan:0x200000)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const -nan:0x200000) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "mul" (f32.const nan) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const nan:0x200000) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const nan) (f32.const -nan:0x200000)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const nan:0x200000) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "mul" (f32.const nan) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const nan:0x200000) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const nan) (f32.const nan:0x200000)))
+(assert_return_arithmetic_nan (invoke "mul" (f32.const nan:0x200000) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "div" (f32.const -0x0p+0) (f32.const -0x0p+0)))
 (assert_return_canonical_nan (invoke "div" (f32.const -0x0p+0) (f32.const 0x0p+0)))
 (assert_return_canonical_nan (invoke "div" (f32.const 0x0p+0) (f32.const -0x0p+0)))
@@ -1018,18 +1244,22 @@
 (assert_return (invoke "div" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const -0x0p+0))
 (assert_return (invoke "div" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x0p+0))
 (assert_return (invoke "div" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x0p+0))
-(assert_return (invoke "div" (f32.const -0x0p+0) (f32.const -infinity)) (f32.const 0x0p+0))
-(assert_return (invoke "div" (f32.const -0x0p+0) (f32.const infinity)) (f32.const -0x0p+0))
-(assert_return (invoke "div" (f32.const 0x0p+0) (f32.const -infinity)) (f32.const -0x0p+0))
-(assert_return (invoke "div" (f32.const 0x0p+0) (f32.const infinity)) (f32.const 0x0p+0))
+(assert_return (invoke "div" (f32.const -0x0p+0) (f32.const -inf)) (f32.const 0x0p+0))
+(assert_return (invoke "div" (f32.const -0x0p+0) (f32.const inf)) (f32.const -0x0p+0))
+(assert_return (invoke "div" (f32.const 0x0p+0) (f32.const -inf)) (f32.const -0x0p+0))
+(assert_return (invoke "div" (f32.const 0x0p+0) (f32.const inf)) (f32.const 0x0p+0))
 (assert_return_canonical_nan (invoke "div" (f32.const -0x0p+0) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -0x0p+0) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "div" (f32.const -0x0p+0) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -0x0p+0) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "div" (f32.const 0x0p+0) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const 0x0p+0) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "div" (f32.const 0x0p+0) (f32.const nan)))
-(assert_return (invoke "div" (f32.const -0x1p-149) (f32.const -0x0p+0)) (f32.const infinity))
-(assert_return (invoke "div" (f32.const -0x1p-149) (f32.const 0x0p+0)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const 0x1p-149) (f32.const -0x0p+0)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const 0x1p-149) (f32.const 0x0p+0)) (f32.const infinity))
+(assert_return_arithmetic_nan (invoke "div" (f32.const 0x0p+0) (f32.const nan:0x200000)))
+(assert_return (invoke "div" (f32.const -0x1p-149) (f32.const -0x0p+0)) (f32.const inf))
+(assert_return (invoke "div" (f32.const -0x1p-149) (f32.const 0x0p+0)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const 0x1p-149) (f32.const -0x0p+0)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const 0x1p-149) (f32.const 0x0p+0)) (f32.const inf))
 (assert_return (invoke "div" (f32.const -0x1p-149) (f32.const -0x1p-149)) (f32.const 0x1p+0))
 (assert_return (invoke "div" (f32.const -0x1p-149) (f32.const 0x1p-149)) (f32.const -0x1p+0))
 (assert_return (invoke "div" (f32.const 0x1p-149) (f32.const -0x1p-149)) (f32.const -0x1p+0))
@@ -1054,18 +1284,22 @@
 (assert_return (invoke "div" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const -0x0p+0))
 (assert_return (invoke "div" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const -0x0p+0))
 (assert_return (invoke "div" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const 0x0p+0))
-(assert_return (invoke "div" (f32.const -0x1p-149) (f32.const -infinity)) (f32.const 0x0p+0))
-(assert_return (invoke "div" (f32.const -0x1p-149) (f32.const infinity)) (f32.const -0x0p+0))
-(assert_return (invoke "div" (f32.const 0x1p-149) (f32.const -infinity)) (f32.const -0x0p+0))
-(assert_return (invoke "div" (f32.const 0x1p-149) (f32.const infinity)) (f32.const 0x0p+0))
+(assert_return (invoke "div" (f32.const -0x1p-149) (f32.const -inf)) (f32.const 0x0p+0))
+(assert_return (invoke "div" (f32.const -0x1p-149) (f32.const inf)) (f32.const -0x0p+0))
+(assert_return (invoke "div" (f32.const 0x1p-149) (f32.const -inf)) (f32.const -0x0p+0))
+(assert_return (invoke "div" (f32.const 0x1p-149) (f32.const inf)) (f32.const 0x0p+0))
 (assert_return_canonical_nan (invoke "div" (f32.const -0x1p-149) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -0x1p-149) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "div" (f32.const -0x1p-149) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -0x1p-149) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "div" (f32.const 0x1p-149) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const 0x1p-149) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "div" (f32.const 0x1p-149) (f32.const nan)))
-(assert_return (invoke "div" (f32.const -0x1p-126) (f32.const -0x0p+0)) (f32.const infinity))
-(assert_return (invoke "div" (f32.const -0x1p-126) (f32.const 0x0p+0)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const 0x1p-126) (f32.const -0x0p+0)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const 0x1p-126) (f32.const 0x0p+0)) (f32.const infinity))
+(assert_return_arithmetic_nan (invoke "div" (f32.const 0x1p-149) (f32.const nan:0x200000)))
+(assert_return (invoke "div" (f32.const -0x1p-126) (f32.const -0x0p+0)) (f32.const inf))
+(assert_return (invoke "div" (f32.const -0x1p-126) (f32.const 0x0p+0)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const 0x1p-126) (f32.const -0x0p+0)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const 0x1p-126) (f32.const 0x0p+0)) (f32.const inf))
 (assert_return (invoke "div" (f32.const -0x1p-126) (f32.const -0x1p-149)) (f32.const 0x1p+23))
 (assert_return (invoke "div" (f32.const -0x1p-126) (f32.const 0x1p-149)) (f32.const -0x1p+23))
 (assert_return (invoke "div" (f32.const 0x1p-126) (f32.const -0x1p-149)) (f32.const -0x1p+23))
@@ -1090,22 +1324,26 @@
 (assert_return (invoke "div" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const -0x0p+0))
 (assert_return (invoke "div" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const -0x0p+0))
 (assert_return (invoke "div" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const 0x0p+0))
-(assert_return (invoke "div" (f32.const -0x1p-126) (f32.const -infinity)) (f32.const 0x0p+0))
-(assert_return (invoke "div" (f32.const -0x1p-126) (f32.const infinity)) (f32.const -0x0p+0))
-(assert_return (invoke "div" (f32.const 0x1p-126) (f32.const -infinity)) (f32.const -0x0p+0))
-(assert_return (invoke "div" (f32.const 0x1p-126) (f32.const infinity)) (f32.const 0x0p+0))
+(assert_return (invoke "div" (f32.const -0x1p-126) (f32.const -inf)) (f32.const 0x0p+0))
+(assert_return (invoke "div" (f32.const -0x1p-126) (f32.const inf)) (f32.const -0x0p+0))
+(assert_return (invoke "div" (f32.const 0x1p-126) (f32.const -inf)) (f32.const -0x0p+0))
+(assert_return (invoke "div" (f32.const 0x1p-126) (f32.const inf)) (f32.const 0x0p+0))
 (assert_return_canonical_nan (invoke "div" (f32.const -0x1p-126) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -0x1p-126) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "div" (f32.const -0x1p-126) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -0x1p-126) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "div" (f32.const 0x1p-126) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const 0x1p-126) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "div" (f32.const 0x1p-126) (f32.const nan)))
-(assert_return (invoke "div" (f32.const -0x1p-1) (f32.const -0x0p+0)) (f32.const infinity))
-(assert_return (invoke "div" (f32.const -0x1p-1) (f32.const 0x0p+0)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const 0x1p-1) (f32.const -0x0p+0)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const 0x1p-1) (f32.const 0x0p+0)) (f32.const infinity))
-(assert_return (invoke "div" (f32.const -0x1p-1) (f32.const -0x1p-149)) (f32.const infinity))
-(assert_return (invoke "div" (f32.const -0x1p-1) (f32.const 0x1p-149)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const 0x1p-1) (f32.const -0x1p-149)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const 0x1p-1) (f32.const 0x1p-149)) (f32.const infinity))
+(assert_return_arithmetic_nan (invoke "div" (f32.const 0x1p-126) (f32.const nan:0x200000)))
+(assert_return (invoke "div" (f32.const -0x1p-1) (f32.const -0x0p+0)) (f32.const inf))
+(assert_return (invoke "div" (f32.const -0x1p-1) (f32.const 0x0p+0)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const 0x1p-1) (f32.const -0x0p+0)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const 0x1p-1) (f32.const 0x0p+0)) (f32.const inf))
+(assert_return (invoke "div" (f32.const -0x1p-1) (f32.const -0x1p-149)) (f32.const inf))
+(assert_return (invoke "div" (f32.const -0x1p-1) (f32.const 0x1p-149)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const 0x1p-1) (f32.const -0x1p-149)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const 0x1p-1) (f32.const 0x1p-149)) (f32.const inf))
 (assert_return (invoke "div" (f32.const -0x1p-1) (f32.const -0x1p-126)) (f32.const 0x1p+125))
 (assert_return (invoke "div" (f32.const -0x1p-1) (f32.const 0x1p-126)) (f32.const -0x1p+125))
 (assert_return (invoke "div" (f32.const 0x1p-1) (f32.const -0x1p-126)) (f32.const -0x1p+125))
@@ -1126,22 +1364,26 @@
 (assert_return (invoke "div" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const -0x1p-129))
 (assert_return (invoke "div" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-129))
 (assert_return (invoke "div" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-129))
-(assert_return (invoke "div" (f32.const -0x1p-1) (f32.const -infinity)) (f32.const 0x0p+0))
-(assert_return (invoke "div" (f32.const -0x1p-1) (f32.const infinity)) (f32.const -0x0p+0))
-(assert_return (invoke "div" (f32.const 0x1p-1) (f32.const -infinity)) (f32.const -0x0p+0))
-(assert_return (invoke "div" (f32.const 0x1p-1) (f32.const infinity)) (f32.const 0x0p+0))
+(assert_return (invoke "div" (f32.const -0x1p-1) (f32.const -inf)) (f32.const 0x0p+0))
+(assert_return (invoke "div" (f32.const -0x1p-1) (f32.const inf)) (f32.const -0x0p+0))
+(assert_return (invoke "div" (f32.const 0x1p-1) (f32.const -inf)) (f32.const -0x0p+0))
+(assert_return (invoke "div" (f32.const 0x1p-1) (f32.const inf)) (f32.const 0x0p+0))
 (assert_return_canonical_nan (invoke "div" (f32.const -0x1p-1) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -0x1p-1) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "div" (f32.const -0x1p-1) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -0x1p-1) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "div" (f32.const 0x1p-1) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const 0x1p-1) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "div" (f32.const 0x1p-1) (f32.const nan)))
-(assert_return (invoke "div" (f32.const -0x1p+0) (f32.const -0x0p+0)) (f32.const infinity))
-(assert_return (invoke "div" (f32.const -0x1p+0) (f32.const 0x0p+0)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const 0x1p+0) (f32.const -0x0p+0)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const 0x1p+0) (f32.const 0x0p+0)) (f32.const infinity))
-(assert_return (invoke "div" (f32.const -0x1p+0) (f32.const -0x1p-149)) (f32.const infinity))
-(assert_return (invoke "div" (f32.const -0x1p+0) (f32.const 0x1p-149)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const 0x1p+0) (f32.const -0x1p-149)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const 0x1p+0) (f32.const 0x1p-149)) (f32.const infinity))
+(assert_return_arithmetic_nan (invoke "div" (f32.const 0x1p-1) (f32.const nan:0x200000)))
+(assert_return (invoke "div" (f32.const -0x1p+0) (f32.const -0x0p+0)) (f32.const inf))
+(assert_return (invoke "div" (f32.const -0x1p+0) (f32.const 0x0p+0)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const 0x1p+0) (f32.const -0x0p+0)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const 0x1p+0) (f32.const 0x0p+0)) (f32.const inf))
+(assert_return (invoke "div" (f32.const -0x1p+0) (f32.const -0x1p-149)) (f32.const inf))
+(assert_return (invoke "div" (f32.const -0x1p+0) (f32.const 0x1p-149)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const 0x1p+0) (f32.const -0x1p-149)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const 0x1p+0) (f32.const 0x1p-149)) (f32.const inf))
 (assert_return (invoke "div" (f32.const -0x1p+0) (f32.const -0x1p-126)) (f32.const 0x1p+126))
 (assert_return (invoke "div" (f32.const -0x1p+0) (f32.const 0x1p-126)) (f32.const -0x1p+126))
 (assert_return (invoke "div" (f32.const 0x1p+0) (f32.const -0x1p-126)) (f32.const -0x1p+126))
@@ -1162,26 +1404,30 @@
 (assert_return (invoke "div" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const -0x1p-128))
 (assert_return (invoke "div" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-128))
 (assert_return (invoke "div" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-128))
-(assert_return (invoke "div" (f32.const -0x1p+0) (f32.const -infinity)) (f32.const 0x0p+0))
-(assert_return (invoke "div" (f32.const -0x1p+0) (f32.const infinity)) (f32.const -0x0p+0))
-(assert_return (invoke "div" (f32.const 0x1p+0) (f32.const -infinity)) (f32.const -0x0p+0))
-(assert_return (invoke "div" (f32.const 0x1p+0) (f32.const infinity)) (f32.const 0x0p+0))
+(assert_return (invoke "div" (f32.const -0x1p+0) (f32.const -inf)) (f32.const 0x0p+0))
+(assert_return (invoke "div" (f32.const -0x1p+0) (f32.const inf)) (f32.const -0x0p+0))
+(assert_return (invoke "div" (f32.const 0x1p+0) (f32.const -inf)) (f32.const -0x0p+0))
+(assert_return (invoke "div" (f32.const 0x1p+0) (f32.const inf)) (f32.const 0x0p+0))
 (assert_return_canonical_nan (invoke "div" (f32.const -0x1p+0) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -0x1p+0) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "div" (f32.const -0x1p+0) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -0x1p+0) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "div" (f32.const 0x1p+0) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const 0x1p+0) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "div" (f32.const 0x1p+0) (f32.const nan)))
-(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const infinity))
-(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const infinity))
-(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const infinity))
-(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const infinity))
-(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const infinity))
-(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const infinity))
+(assert_return_arithmetic_nan (invoke "div" (f32.const 0x1p+0) (f32.const nan:0x200000)))
+(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const inf))
+(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const inf))
+(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const inf))
+(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const inf))
+(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const inf))
+(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const inf))
 (assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const 0x1.921fb6p+3))
 (assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-1)) (f32.const -0x1.921fb6p+3))
 (assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const -0x1.921fb6p+3))
@@ -1198,30 +1444,34 @@
 (assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const -0x1.921fb8p-126))
 (assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const -0x1.921fb8p-126))
 (assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const 0x1.921fb8p-126))
-(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const -infinity)) (f32.const 0x0p+0))
-(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const infinity)) (f32.const -0x0p+0))
-(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const -infinity)) (f32.const -0x0p+0))
-(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const infinity)) (f32.const 0x0p+0))
+(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const -inf)) (f32.const 0x0p+0))
+(assert_return (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const inf)) (f32.const -0x0p+0))
+(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const -inf)) (f32.const -0x0p+0))
+(assert_return (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const inf)) (f32.const 0x0p+0))
 (assert_return_canonical_nan (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -0x1.921fb6p+2) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const nan)))
-(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const infinity))
-(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const infinity))
-(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const infinity))
-(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const infinity))
-(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const infinity))
-(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const infinity))
-(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const infinity))
-(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const infinity))
+(assert_return_arithmetic_nan (invoke "div" (f32.const 0x1.921fb6p+2) (f32.const nan:0x200000)))
+(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const inf))
+(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const inf))
+(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const inf))
+(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const inf))
+(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const inf))
+(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const inf))
+(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const inf))
+(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const inf))
 (assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const 0x1.fffffep+127))
 (assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const -0x1.fffffep+127))
@@ -1234,86 +1484,138 @@
 (assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const -0x1p+0))
 (assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const -0x1p+0))
 (assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const 0x1p+0))
-(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const -infinity)) (f32.const 0x0p+0))
-(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const infinity)) (f32.const -0x0p+0))
-(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const -infinity)) (f32.const -0x0p+0))
-(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const infinity)) (f32.const 0x0p+0))
+(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const -inf)) (f32.const 0x0p+0))
+(assert_return (invoke "div" (f32.const -0x1.fffffep+127) (f32.const inf)) (f32.const -0x0p+0))
+(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const -inf)) (f32.const -0x0p+0))
+(assert_return (invoke "div" (f32.const 0x1.fffffep+127) (f32.const inf)) (f32.const 0x0p+0))
 (assert_return_canonical_nan (invoke "div" (f32.const -0x1.fffffep+127) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -0x1.fffffep+127) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "div" (f32.const -0x1.fffffep+127) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -0x1.fffffep+127) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "div" (f32.const 0x1.fffffep+127) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const 0x1.fffffep+127) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "div" (f32.const 0x1.fffffep+127) (f32.const nan)))
-(assert_return (invoke "div" (f32.const -infinity) (f32.const -0x0p+0)) (f32.const infinity))
-(assert_return (invoke "div" (f32.const -infinity) (f32.const 0x0p+0)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const infinity) (f32.const -0x0p+0)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const infinity) (f32.const 0x0p+0)) (f32.const infinity))
-(assert_return (invoke "div" (f32.const -infinity) (f32.const -0x1p-149)) (f32.const infinity))
-(assert_return (invoke "div" (f32.const -infinity) (f32.const 0x1p-149)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const infinity) (f32.const -0x1p-149)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const infinity) (f32.const 0x1p-149)) (f32.const infinity))
-(assert_return (invoke "div" (f32.const -infinity) (f32.const -0x1p-126)) (f32.const infinity))
-(assert_return (invoke "div" (f32.const -infinity) (f32.const 0x1p-126)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const infinity) (f32.const -0x1p-126)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const infinity) (f32.const 0x1p-126)) (f32.const infinity))
-(assert_return (invoke "div" (f32.const -infinity) (f32.const -0x1p-1)) (f32.const infinity))
-(assert_return (invoke "div" (f32.const -infinity) (f32.const 0x1p-1)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const infinity) (f32.const -0x1p-1)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const infinity) (f32.const 0x1p-1)) (f32.const infinity))
-(assert_return (invoke "div" (f32.const -infinity) (f32.const -0x1p+0)) (f32.const infinity))
-(assert_return (invoke "div" (f32.const -infinity) (f32.const 0x1p+0)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const infinity) (f32.const -0x1p+0)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const infinity) (f32.const 0x1p+0)) (f32.const infinity))
-(assert_return (invoke "div" (f32.const -infinity) (f32.const -0x1.921fb6p+2)) (f32.const infinity))
-(assert_return (invoke "div" (f32.const -infinity) (f32.const 0x1.921fb6p+2)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const infinity) (f32.const -0x1.921fb6p+2)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const infinity) (f32.const 0x1.921fb6p+2)) (f32.const infinity))
-(assert_return (invoke "div" (f32.const -infinity) (f32.const -0x1.fffffep+127)) (f32.const infinity))
-(assert_return (invoke "div" (f32.const -infinity) (f32.const 0x1.fffffep+127)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const infinity) (f32.const -0x1.fffffep+127)) (f32.const -infinity))
-(assert_return (invoke "div" (f32.const infinity) (f32.const 0x1.fffffep+127)) (f32.const infinity))
-(assert_return_canonical_nan (invoke "div" (f32.const -infinity) (f32.const -infinity)))
-(assert_return_canonical_nan (invoke "div" (f32.const -infinity) (f32.const infinity)))
-(assert_return_canonical_nan (invoke "div" (f32.const infinity) (f32.const -infinity)))
-(assert_return_canonical_nan (invoke "div" (f32.const infinity) (f32.const infinity)))
-(assert_return_canonical_nan (invoke "div" (f32.const -infinity) (f32.const -nan)))
-(assert_return_canonical_nan (invoke "div" (f32.const -infinity) (f32.const nan)))
-(assert_return_canonical_nan (invoke "div" (f32.const infinity) (f32.const -nan)))
-(assert_return_canonical_nan (invoke "div" (f32.const infinity) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const 0x1.fffffep+127) (f32.const nan:0x200000)))
+(assert_return (invoke "div" (f32.const -inf) (f32.const -0x0p+0)) (f32.const inf))
+(assert_return (invoke "div" (f32.const -inf) (f32.const 0x0p+0)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const inf) (f32.const -0x0p+0)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const inf) (f32.const 0x0p+0)) (f32.const inf))
+(assert_return (invoke "div" (f32.const -inf) (f32.const -0x1p-149)) (f32.const inf))
+(assert_return (invoke "div" (f32.const -inf) (f32.const 0x1p-149)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const inf) (f32.const -0x1p-149)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const inf) (f32.const 0x1p-149)) (f32.const inf))
+(assert_return (invoke "div" (f32.const -inf) (f32.const -0x1p-126)) (f32.const inf))
+(assert_return (invoke "div" (f32.const -inf) (f32.const 0x1p-126)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const inf) (f32.const -0x1p-126)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const inf) (f32.const 0x1p-126)) (f32.const inf))
+(assert_return (invoke "div" (f32.const -inf) (f32.const -0x1p-1)) (f32.const inf))
+(assert_return (invoke "div" (f32.const -inf) (f32.const 0x1p-1)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const inf) (f32.const -0x1p-1)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const inf) (f32.const 0x1p-1)) (f32.const inf))
+(assert_return (invoke "div" (f32.const -inf) (f32.const -0x1p+0)) (f32.const inf))
+(assert_return (invoke "div" (f32.const -inf) (f32.const 0x1p+0)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const inf) (f32.const -0x1p+0)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const inf) (f32.const 0x1p+0)) (f32.const inf))
+(assert_return (invoke "div" (f32.const -inf) (f32.const -0x1.921fb6p+2)) (f32.const inf))
+(assert_return (invoke "div" (f32.const -inf) (f32.const 0x1.921fb6p+2)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const inf) (f32.const -0x1.921fb6p+2)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const inf) (f32.const 0x1.921fb6p+2)) (f32.const inf))
+(assert_return (invoke "div" (f32.const -inf) (f32.const -0x1.fffffep+127)) (f32.const inf))
+(assert_return (invoke "div" (f32.const -inf) (f32.const 0x1.fffffep+127)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const inf) (f32.const -0x1.fffffep+127)) (f32.const -inf))
+(assert_return (invoke "div" (f32.const inf) (f32.const 0x1.fffffep+127)) (f32.const inf))
+(assert_return_canonical_nan (invoke "div" (f32.const -inf) (f32.const -inf)))
+(assert_return_canonical_nan (invoke "div" (f32.const -inf) (f32.const inf)))
+(assert_return_canonical_nan (invoke "div" (f32.const inf) (f32.const -inf)))
+(assert_return_canonical_nan (invoke "div" (f32.const inf) (f32.const inf)))
+(assert_return_canonical_nan (invoke "div" (f32.const -inf) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -inf) (f32.const -nan:0x200000)))
+(assert_return_canonical_nan (invoke "div" (f32.const -inf) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -inf) (f32.const nan:0x200000)))
+(assert_return_canonical_nan (invoke "div" (f32.const inf) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const inf) (f32.const -nan:0x200000)))
+(assert_return_canonical_nan (invoke "div" (f32.const inf) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const inf) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "div" (f32.const -nan) (f32.const -0x0p+0)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -nan:0x200000) (f32.const -0x0p+0)))
 (assert_return_canonical_nan (invoke "div" (f32.const -nan) (f32.const 0x0p+0)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -nan:0x200000) (f32.const 0x0p+0)))
 (assert_return_canonical_nan (invoke "div" (f32.const nan) (f32.const -0x0p+0)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const nan:0x200000) (f32.const -0x0p+0)))
 (assert_return_canonical_nan (invoke "div" (f32.const nan) (f32.const 0x0p+0)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const nan:0x200000) (f32.const 0x0p+0)))
 (assert_return_canonical_nan (invoke "div" (f32.const -nan) (f32.const -0x1p-149)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -nan:0x200000) (f32.const -0x1p-149)))
 (assert_return_canonical_nan (invoke "div" (f32.const -nan) (f32.const 0x1p-149)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -nan:0x200000) (f32.const 0x1p-149)))
 (assert_return_canonical_nan (invoke "div" (f32.const nan) (f32.const -0x1p-149)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const nan:0x200000) (f32.const -0x1p-149)))
 (assert_return_canonical_nan (invoke "div" (f32.const nan) (f32.const 0x1p-149)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const nan:0x200000) (f32.const 0x1p-149)))
 (assert_return_canonical_nan (invoke "div" (f32.const -nan) (f32.const -0x1p-126)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -nan:0x200000) (f32.const -0x1p-126)))
 (assert_return_canonical_nan (invoke "div" (f32.const -nan) (f32.const 0x1p-126)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -nan:0x200000) (f32.const 0x1p-126)))
 (assert_return_canonical_nan (invoke "div" (f32.const nan) (f32.const -0x1p-126)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const nan:0x200000) (f32.const -0x1p-126)))
 (assert_return_canonical_nan (invoke "div" (f32.const nan) (f32.const 0x1p-126)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const nan:0x200000) (f32.const 0x1p-126)))
 (assert_return_canonical_nan (invoke "div" (f32.const -nan) (f32.const -0x1p-1)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -nan:0x200000) (f32.const -0x1p-1)))
 (assert_return_canonical_nan (invoke "div" (f32.const -nan) (f32.const 0x1p-1)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -nan:0x200000) (f32.const 0x1p-1)))
 (assert_return_canonical_nan (invoke "div" (f32.const nan) (f32.const -0x1p-1)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const nan:0x200000) (f32.const -0x1p-1)))
 (assert_return_canonical_nan (invoke "div" (f32.const nan) (f32.const 0x1p-1)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const nan:0x200000) (f32.const 0x1p-1)))
 (assert_return_canonical_nan (invoke "div" (f32.const -nan) (f32.const -0x1p+0)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -nan:0x200000) (f32.const -0x1p+0)))
 (assert_return_canonical_nan (invoke "div" (f32.const -nan) (f32.const 0x1p+0)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -nan:0x200000) (f32.const 0x1p+0)))
 (assert_return_canonical_nan (invoke "div" (f32.const nan) (f32.const -0x1p+0)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const nan:0x200000) (f32.const -0x1p+0)))
 (assert_return_canonical_nan (invoke "div" (f32.const nan) (f32.const 0x1p+0)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const nan:0x200000) (f32.const 0x1p+0)))
 (assert_return_canonical_nan (invoke "div" (f32.const -nan) (f32.const -0x1.921fb6p+2)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -nan:0x200000) (f32.const -0x1.921fb6p+2)))
 (assert_return_canonical_nan (invoke "div" (f32.const -nan) (f32.const 0x1.921fb6p+2)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -nan:0x200000) (f32.const 0x1.921fb6p+2)))
 (assert_return_canonical_nan (invoke "div" (f32.const nan) (f32.const -0x1.921fb6p+2)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const nan:0x200000) (f32.const -0x1.921fb6p+2)))
 (assert_return_canonical_nan (invoke "div" (f32.const nan) (f32.const 0x1.921fb6p+2)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const nan:0x200000) (f32.const 0x1.921fb6p+2)))
 (assert_return_canonical_nan (invoke "div" (f32.const -nan) (f32.const -0x1.fffffep+127)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -nan:0x200000) (f32.const -0x1.fffffep+127)))
 (assert_return_canonical_nan (invoke "div" (f32.const -nan) (f32.const 0x1.fffffep+127)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -nan:0x200000) (f32.const 0x1.fffffep+127)))
 (assert_return_canonical_nan (invoke "div" (f32.const nan) (f32.const -0x1.fffffep+127)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const nan:0x200000) (f32.const -0x1.fffffep+127)))
 (assert_return_canonical_nan (invoke "div" (f32.const nan) (f32.const 0x1.fffffep+127)))
-(assert_return_canonical_nan (invoke "div" (f32.const -nan) (f32.const -infinity)))
-(assert_return_canonical_nan (invoke "div" (f32.const -nan) (f32.const infinity)))
-(assert_return_canonical_nan (invoke "div" (f32.const nan) (f32.const -infinity)))
-(assert_return_canonical_nan (invoke "div" (f32.const nan) (f32.const infinity)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const nan:0x200000) (f32.const 0x1.fffffep+127)))
+(assert_return_canonical_nan (invoke "div" (f32.const -nan) (f32.const -inf)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -nan:0x200000) (f32.const -inf)))
+(assert_return_canonical_nan (invoke "div" (f32.const -nan) (f32.const inf)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -nan:0x200000) (f32.const inf)))
+(assert_return_canonical_nan (invoke "div" (f32.const nan) (f32.const -inf)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const nan:0x200000) (f32.const -inf)))
+(assert_return_canonical_nan (invoke "div" (f32.const nan) (f32.const inf)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const nan:0x200000) (f32.const inf)))
 (assert_return_canonical_nan (invoke "div" (f32.const -nan) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -nan:0x200000) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -nan) (f32.const -nan:0x200000)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -nan:0x200000) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "div" (f32.const -nan) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -nan:0x200000) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -nan) (f32.const nan:0x200000)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const -nan:0x200000) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "div" (f32.const nan) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const nan:0x200000) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const nan) (f32.const -nan:0x200000)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const nan:0x200000) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "div" (f32.const nan) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const nan:0x200000) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const nan) (f32.const nan:0x200000)))
+(assert_return_arithmetic_nan (invoke "div" (f32.const nan:0x200000) (f32.const nan:0x200000)))
 (assert_return (invoke "min" (f32.const -0x0p+0) (f32.const -0x0p+0)) (f32.const -0x0p+0))
 (assert_return (invoke "min" (f32.const -0x0p+0) (f32.const 0x0p+0)) (f32.const -0x0p+0))
 (assert_return (invoke "min" (f32.const 0x0p+0) (f32.const -0x0p+0)) (f32.const -0x0p+0))
@@ -1342,14 +1644,16 @@
 (assert_return (invoke "min" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const -0x0p+0))
 (assert_return (invoke "min" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "min" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x0p+0))
-(assert_return (invoke "min" (f32.const -0x0p+0) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "min" (f32.const -0x0p+0) (f32.const infinity)) (f32.const -0x0p+0))
-(assert_return (invoke "min" (f32.const 0x0p+0) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "min" (f32.const 0x0p+0) (f32.const infinity)) (f32.const 0x0p+0))
+(assert_return (invoke "min" (f32.const -0x0p+0) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "min" (f32.const -0x0p+0) (f32.const inf)) (f32.const -0x0p+0))
+(assert_return (invoke "min" (f32.const 0x0p+0) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "min" (f32.const 0x0p+0) (f32.const inf)) (f32.const 0x0p+0))
 (assert_return_canonical_nan (invoke "min" (f32.const -0x0p+0) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const -0x0p+0) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "min" (f32.const -0x0p+0) (f32.const nan)))
 (assert_return_arithmetic_nan (invoke "min" (f32.const -0x0p+0) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "min" (f32.const 0x0p+0) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const 0x0p+0) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "min" (f32.const 0x0p+0) (f32.const nan)))
 (assert_return_arithmetic_nan (invoke "min" (f32.const 0x0p+0) (f32.const nan:0x200000)))
 (assert_return (invoke "min" (f32.const -0x1p-149) (f32.const -0x0p+0)) (f32.const -0x1p-149))
@@ -1380,14 +1684,16 @@
 (assert_return (invoke "min" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const -0x1p-149))
 (assert_return (invoke "min" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "min" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-149))
-(assert_return (invoke "min" (f32.const -0x1p-149) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "min" (f32.const -0x1p-149) (f32.const infinity)) (f32.const -0x1p-149))
-(assert_return (invoke "min" (f32.const 0x1p-149) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "min" (f32.const 0x1p-149) (f32.const infinity)) (f32.const 0x1p-149))
+(assert_return (invoke "min" (f32.const -0x1p-149) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "min" (f32.const -0x1p-149) (f32.const inf)) (f32.const -0x1p-149))
+(assert_return (invoke "min" (f32.const 0x1p-149) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "min" (f32.const 0x1p-149) (f32.const inf)) (f32.const 0x1p-149))
 (assert_return_canonical_nan (invoke "min" (f32.const -0x1p-149) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const -0x1p-149) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "min" (f32.const -0x1p-149) (f32.const nan)))
 (assert_return_arithmetic_nan (invoke "min" (f32.const -0x1p-149) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "min" (f32.const 0x1p-149) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const 0x1p-149) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "min" (f32.const 0x1p-149) (f32.const nan)))
 (assert_return_arithmetic_nan (invoke "min" (f32.const 0x1p-149) (f32.const nan:0x200000)))
 (assert_return (invoke "min" (f32.const -0x1p-126) (f32.const -0x0p+0)) (f32.const -0x1p-126))
@@ -1418,14 +1724,16 @@
 (assert_return (invoke "min" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const -0x1p-126))
 (assert_return (invoke "min" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "min" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-126))
-(assert_return (invoke "min" (f32.const -0x1p-126) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "min" (f32.const -0x1p-126) (f32.const infinity)) (f32.const -0x1p-126))
-(assert_return (invoke "min" (f32.const 0x1p-126) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "min" (f32.const 0x1p-126) (f32.const infinity)) (f32.const 0x1p-126))
+(assert_return (invoke "min" (f32.const -0x1p-126) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "min" (f32.const -0x1p-126) (f32.const inf)) (f32.const -0x1p-126))
+(assert_return (invoke "min" (f32.const 0x1p-126) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "min" (f32.const 0x1p-126) (f32.const inf)) (f32.const 0x1p-126))
 (assert_return_canonical_nan (invoke "min" (f32.const -0x1p-126) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const -0x1p-126) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "min" (f32.const -0x1p-126) (f32.const nan)))
 (assert_return_arithmetic_nan (invoke "min" (f32.const -0x1p-126) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "min" (f32.const 0x1p-126) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const 0x1p-126) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "min" (f32.const 0x1p-126) (f32.const nan)))
 (assert_return_arithmetic_nan (invoke "min" (f32.const 0x1p-126) (f32.const nan:0x200000)))
 (assert_return (invoke "min" (f32.const -0x1p-1) (f32.const -0x0p+0)) (f32.const -0x1p-1))
@@ -1456,14 +1764,16 @@
 (assert_return (invoke "min" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const -0x1p-1))
 (assert_return (invoke "min" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "min" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-1))
-(assert_return (invoke "min" (f32.const -0x1p-1) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "min" (f32.const -0x1p-1) (f32.const infinity)) (f32.const -0x1p-1))
-(assert_return (invoke "min" (f32.const 0x1p-1) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "min" (f32.const 0x1p-1) (f32.const infinity)) (f32.const 0x1p-1))
+(assert_return (invoke "min" (f32.const -0x1p-1) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "min" (f32.const -0x1p-1) (f32.const inf)) (f32.const -0x1p-1))
+(assert_return (invoke "min" (f32.const 0x1p-1) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "min" (f32.const 0x1p-1) (f32.const inf)) (f32.const 0x1p-1))
 (assert_return_canonical_nan (invoke "min" (f32.const -0x1p-1) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const -0x1p-1) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "min" (f32.const -0x1p-1) (f32.const nan)))
 (assert_return_arithmetic_nan (invoke "min" (f32.const -0x1p-1) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "min" (f32.const 0x1p-1) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const 0x1p-1) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "min" (f32.const 0x1p-1) (f32.const nan)))
 (assert_return_arithmetic_nan (invoke "min" (f32.const 0x1p-1) (f32.const nan:0x200000)))
 (assert_return (invoke "min" (f32.const -0x1p+0) (f32.const -0x0p+0)) (f32.const -0x1p+0))
@@ -1494,14 +1804,16 @@
 (assert_return (invoke "min" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const -0x1p+0))
 (assert_return (invoke "min" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "min" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1p+0))
-(assert_return (invoke "min" (f32.const -0x1p+0) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "min" (f32.const -0x1p+0) (f32.const infinity)) (f32.const -0x1p+0))
-(assert_return (invoke "min" (f32.const 0x1p+0) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "min" (f32.const 0x1p+0) (f32.const infinity)) (f32.const 0x1p+0))
+(assert_return (invoke "min" (f32.const -0x1p+0) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "min" (f32.const -0x1p+0) (f32.const inf)) (f32.const -0x1p+0))
+(assert_return (invoke "min" (f32.const 0x1p+0) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "min" (f32.const 0x1p+0) (f32.const inf)) (f32.const 0x1p+0))
 (assert_return_canonical_nan (invoke "min" (f32.const -0x1p+0) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const -0x1p+0) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "min" (f32.const -0x1p+0) (f32.const nan)))
 (assert_return_arithmetic_nan (invoke "min" (f32.const -0x1p+0) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "min" (f32.const 0x1p+0) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const 0x1p+0) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "min" (f32.const 0x1p+0) (f32.const nan)))
 (assert_return_arithmetic_nan (invoke "min" (f32.const 0x1p+0) (f32.const nan:0x200000)))
 (assert_return (invoke "min" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const -0x1.921fb6p+2))
@@ -1532,14 +1844,16 @@
 (assert_return (invoke "min" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const -0x1.921fb6p+2))
 (assert_return (invoke "min" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "min" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const 0x1.921fb6p+2))
-(assert_return (invoke "min" (f32.const -0x1.921fb6p+2) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "min" (f32.const -0x1.921fb6p+2) (f32.const infinity)) (f32.const -0x1.921fb6p+2))
-(assert_return (invoke "min" (f32.const 0x1.921fb6p+2) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "min" (f32.const 0x1.921fb6p+2) (f32.const infinity)) (f32.const 0x1.921fb6p+2))
+(assert_return (invoke "min" (f32.const -0x1.921fb6p+2) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "min" (f32.const -0x1.921fb6p+2) (f32.const inf)) (f32.const -0x1.921fb6p+2))
+(assert_return (invoke "min" (f32.const 0x1.921fb6p+2) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "min" (f32.const 0x1.921fb6p+2) (f32.const inf)) (f32.const 0x1.921fb6p+2))
 (assert_return_canonical_nan (invoke "min" (f32.const -0x1.921fb6p+2) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const -0x1.921fb6p+2) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "min" (f32.const -0x1.921fb6p+2) (f32.const nan)))
 (assert_return_arithmetic_nan (invoke "min" (f32.const -0x1.921fb6p+2) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "min" (f32.const 0x1.921fb6p+2) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const 0x1.921fb6p+2) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "min" (f32.const 0x1.921fb6p+2) (f32.const nan)))
 (assert_return_arithmetic_nan (invoke "min" (f32.const 0x1.921fb6p+2) (f32.const nan:0x200000)))
 (assert_return (invoke "min" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const -0x1.fffffep+127))
@@ -1570,108 +1884,138 @@
 (assert_return (invoke "min" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "min" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "min" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "min" (f32.const -0x1.fffffep+127) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "min" (f32.const -0x1.fffffep+127) (f32.const infinity)) (f32.const -0x1.fffffep+127))
-(assert_return (invoke "min" (f32.const 0x1.fffffep+127) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "min" (f32.const 0x1.fffffep+127) (f32.const infinity)) (f32.const 0x1.fffffep+127))
+(assert_return (invoke "min" (f32.const -0x1.fffffep+127) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "min" (f32.const -0x1.fffffep+127) (f32.const inf)) (f32.const -0x1.fffffep+127))
+(assert_return (invoke "min" (f32.const 0x1.fffffep+127) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "min" (f32.const 0x1.fffffep+127) (f32.const inf)) (f32.const 0x1.fffffep+127))
 (assert_return_canonical_nan (invoke "min" (f32.const -0x1.fffffep+127) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const -0x1.fffffep+127) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "min" (f32.const -0x1.fffffep+127) (f32.const nan)))
 (assert_return_arithmetic_nan (invoke "min" (f32.const -0x1.fffffep+127) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "min" (f32.const 0x1.fffffep+127) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const 0x1.fffffep+127) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "min" (f32.const 0x1.fffffep+127) (f32.const nan)))
 (assert_return_arithmetic_nan (invoke "min" (f32.const 0x1.fffffep+127) (f32.const nan:0x200000)))
-(assert_return (invoke "min" (f32.const -infinity) (f32.const -0x0p+0)) (f32.const -infinity))
-(assert_return (invoke "min" (f32.const -infinity) (f32.const 0x0p+0)) (f32.const -infinity))
-(assert_return (invoke "min" (f32.const infinity) (f32.const -0x0p+0)) (f32.const -0x0p+0))
-(assert_return (invoke "min" (f32.const infinity) (f32.const 0x0p+0)) (f32.const 0x0p+0))
-(assert_return (invoke "min" (f32.const -infinity) (f32.const -0x1p-149)) (f32.const -infinity))
-(assert_return (invoke "min" (f32.const -infinity) (f32.const 0x1p-149)) (f32.const -infinity))
-(assert_return (invoke "min" (f32.const infinity) (f32.const -0x1p-149)) (f32.const -0x1p-149))
-(assert_return (invoke "min" (f32.const infinity) (f32.const 0x1p-149)) (f32.const 0x1p-149))
-(assert_return (invoke "min" (f32.const -infinity) (f32.const -0x1p-126)) (f32.const -infinity))
-(assert_return (invoke "min" (f32.const -infinity) (f32.const 0x1p-126)) (f32.const -infinity))
-(assert_return (invoke "min" (f32.const infinity) (f32.const -0x1p-126)) (f32.const -0x1p-126))
-(assert_return (invoke "min" (f32.const infinity) (f32.const 0x1p-126)) (f32.const 0x1p-126))
-(assert_return (invoke "min" (f32.const -infinity) (f32.const -0x1p-1)) (f32.const -infinity))
-(assert_return (invoke "min" (f32.const -infinity) (f32.const 0x1p-1)) (f32.const -infinity))
-(assert_return (invoke "min" (f32.const infinity) (f32.const -0x1p-1)) (f32.const -0x1p-1))
-(assert_return (invoke "min" (f32.const infinity) (f32.const 0x1p-1)) (f32.const 0x1p-1))
-(assert_return (invoke "min" (f32.const -infinity) (f32.const -0x1p+0)) (f32.const -infinity))
-(assert_return (invoke "min" (f32.const -infinity) (f32.const 0x1p+0)) (f32.const -infinity))
-(assert_return (invoke "min" (f32.const infinity) (f32.const -0x1p+0)) (f32.const -0x1p+0))
-(assert_return (invoke "min" (f32.const infinity) (f32.const 0x1p+0)) (f32.const 0x1p+0))
-(assert_return (invoke "min" (f32.const -infinity) (f32.const -0x1.921fb6p+2)) (f32.const -infinity))
-(assert_return (invoke "min" (f32.const -infinity) (f32.const 0x1.921fb6p+2)) (f32.const -infinity))
-(assert_return (invoke "min" (f32.const infinity) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))
-(assert_return (invoke "min" (f32.const infinity) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))
-(assert_return (invoke "min" (f32.const -infinity) (f32.const -0x1.fffffep+127)) (f32.const -infinity))
-(assert_return (invoke "min" (f32.const -infinity) (f32.const 0x1.fffffep+127)) (f32.const -infinity))
-(assert_return (invoke "min" (f32.const infinity) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
-(assert_return (invoke "min" (f32.const infinity) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "min" (f32.const -infinity) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "min" (f32.const -infinity) (f32.const infinity)) (f32.const -infinity))
-(assert_return (invoke "min" (f32.const infinity) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "min" (f32.const infinity) (f32.const infinity)) (f32.const infinity))
-(assert_return_canonical_nan (invoke "min" (f32.const -infinity) (f32.const -nan)))
-(assert_return_canonical_nan (invoke "min" (f32.const -infinity) (f32.const nan)))
-(assert_return_arithmetic_nan (invoke "min" (f32.const -infinity) (f32.const nan:0x200000)))
-(assert_return_canonical_nan (invoke "min" (f32.const infinity) (f32.const -nan)))
-(assert_return_canonical_nan (invoke "min" (f32.const infinity) (f32.const nan)))
-(assert_return_arithmetic_nan (invoke "min" (f32.const infinity) (f32.const nan:0x200000)))
+(assert_return (invoke "min" (f32.const -inf) (f32.const -0x0p+0)) (f32.const -inf))
+(assert_return (invoke "min" (f32.const -inf) (f32.const 0x0p+0)) (f32.const -inf))
+(assert_return (invoke "min" (f32.const inf) (f32.const -0x0p+0)) (f32.const -0x0p+0))
+(assert_return (invoke "min" (f32.const inf) (f32.const 0x0p+0)) (f32.const 0x0p+0))
+(assert_return (invoke "min" (f32.const -inf) (f32.const -0x1p-149)) (f32.const -inf))
+(assert_return (invoke "min" (f32.const -inf) (f32.const 0x1p-149)) (f32.const -inf))
+(assert_return (invoke "min" (f32.const inf) (f32.const -0x1p-149)) (f32.const -0x1p-149))
+(assert_return (invoke "min" (f32.const inf) (f32.const 0x1p-149)) (f32.const 0x1p-149))
+(assert_return (invoke "min" (f32.const -inf) (f32.const -0x1p-126)) (f32.const -inf))
+(assert_return (invoke "min" (f32.const -inf) (f32.const 0x1p-126)) (f32.const -inf))
+(assert_return (invoke "min" (f32.const inf) (f32.const -0x1p-126)) (f32.const -0x1p-126))
+(assert_return (invoke "min" (f32.const inf) (f32.const 0x1p-126)) (f32.const 0x1p-126))
+(assert_return (invoke "min" (f32.const -inf) (f32.const -0x1p-1)) (f32.const -inf))
+(assert_return (invoke "min" (f32.const -inf) (f32.const 0x1p-1)) (f32.const -inf))
+(assert_return (invoke "min" (f32.const inf) (f32.const -0x1p-1)) (f32.const -0x1p-1))
+(assert_return (invoke "min" (f32.const inf) (f32.const 0x1p-1)) (f32.const 0x1p-1))
+(assert_return (invoke "min" (f32.const -inf) (f32.const -0x1p+0)) (f32.const -inf))
+(assert_return (invoke "min" (f32.const -inf) (f32.const 0x1p+0)) (f32.const -inf))
+(assert_return (invoke "min" (f32.const inf) (f32.const -0x1p+0)) (f32.const -0x1p+0))
+(assert_return (invoke "min" (f32.const inf) (f32.const 0x1p+0)) (f32.const 0x1p+0))
+(assert_return (invoke "min" (f32.const -inf) (f32.const -0x1.921fb6p+2)) (f32.const -inf))
+(assert_return (invoke "min" (f32.const -inf) (f32.const 0x1.921fb6p+2)) (f32.const -inf))
+(assert_return (invoke "min" (f32.const inf) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))
+(assert_return (invoke "min" (f32.const inf) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))
+(assert_return (invoke "min" (f32.const -inf) (f32.const -0x1.fffffep+127)) (f32.const -inf))
+(assert_return (invoke "min" (f32.const -inf) (f32.const 0x1.fffffep+127)) (f32.const -inf))
+(assert_return (invoke "min" (f32.const inf) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
+(assert_return (invoke "min" (f32.const inf) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
+(assert_return (invoke "min" (f32.const -inf) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "min" (f32.const -inf) (f32.const inf)) (f32.const -inf))
+(assert_return (invoke "min" (f32.const inf) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "min" (f32.const inf) (f32.const inf)) (f32.const inf))
+(assert_return_canonical_nan (invoke "min" (f32.const -inf) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const -inf) (f32.const -nan:0x200000)))
+(assert_return_canonical_nan (invoke "min" (f32.const -inf) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const -inf) (f32.const nan:0x200000)))
+(assert_return_canonical_nan (invoke "min" (f32.const inf) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const inf) (f32.const -nan:0x200000)))
+(assert_return_canonical_nan (invoke "min" (f32.const inf) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const inf) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "min" (f32.const -nan) (f32.const -0x0p+0)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const -nan:0x200000) (f32.const -0x0p+0)))
 (assert_return_canonical_nan (invoke "min" (f32.const -nan) (f32.const 0x0p+0)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const -nan:0x200000) (f32.const 0x0p+0)))
 (assert_return_canonical_nan (invoke "min" (f32.const nan) (f32.const -0x0p+0)))
-(assert_return_canonical_nan (invoke "min" (f32.const nan) (f32.const 0x0p+0)))
 (assert_return_arithmetic_nan (invoke "min" (f32.const nan:0x200000) (f32.const -0x0p+0)))
+(assert_return_canonical_nan (invoke "min" (f32.const nan) (f32.const 0x0p+0)))
 (assert_return_arithmetic_nan (invoke "min" (f32.const nan:0x200000) (f32.const 0x0p+0)))
 (assert_return_canonical_nan (invoke "min" (f32.const -nan) (f32.const -0x1p-149)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const -nan:0x200000) (f32.const -0x1p-149)))
 (assert_return_canonical_nan (invoke "min" (f32.const -nan) (f32.const 0x1p-149)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const -nan:0x200000) (f32.const 0x1p-149)))
 (assert_return_canonical_nan (invoke "min" (f32.const nan) (f32.const -0x1p-149)))
-(assert_return_canonical_nan (invoke "min" (f32.const nan) (f32.const 0x1p-149)))
 (assert_return_arithmetic_nan (invoke "min" (f32.const nan:0x200000) (f32.const -0x1p-149)))
+(assert_return_canonical_nan (invoke "min" (f32.const nan) (f32.const 0x1p-149)))
 (assert_return_arithmetic_nan (invoke "min" (f32.const nan:0x200000) (f32.const 0x1p-149)))
 (assert_return_canonical_nan (invoke "min" (f32.const -nan) (f32.const -0x1p-126)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const -nan:0x200000) (f32.const -0x1p-126)))
 (assert_return_canonical_nan (invoke "min" (f32.const -nan) (f32.const 0x1p-126)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const -nan:0x200000) (f32.const 0x1p-126)))
 (assert_return_canonical_nan (invoke "min" (f32.const nan) (f32.const -0x1p-126)))
-(assert_return_canonical_nan (invoke "min" (f32.const nan) (f32.const 0x1p-126)))
 (assert_return_arithmetic_nan (invoke "min" (f32.const nan:0x200000) (f32.const -0x1p-126)))
+(assert_return_canonical_nan (invoke "min" (f32.const nan) (f32.const 0x1p-126)))
 (assert_return_arithmetic_nan (invoke "min" (f32.const nan:0x200000) (f32.const 0x1p-126)))
 (assert_return_canonical_nan (invoke "min" (f32.const -nan) (f32.const -0x1p-1)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const -nan:0x200000) (f32.const -0x1p-1)))
 (assert_return_canonical_nan (invoke "min" (f32.const -nan) (f32.const 0x1p-1)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const -nan:0x200000) (f32.const 0x1p-1)))
 (assert_return_canonical_nan (invoke "min" (f32.const nan) (f32.const -0x1p-1)))
-(assert_return_canonical_nan (invoke "min" (f32.const nan) (f32.const 0x1p-1)))
 (assert_return_arithmetic_nan (invoke "min" (f32.const nan:0x200000) (f32.const -0x1p-1)))
+(assert_return_canonical_nan (invoke "min" (f32.const nan) (f32.const 0x1p-1)))
 (assert_return_arithmetic_nan (invoke "min" (f32.const nan:0x200000) (f32.const 0x1p-1)))
 (assert_return_canonical_nan (invoke "min" (f32.const -nan) (f32.const -0x1p+0)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const -nan:0x200000) (f32.const -0x1p+0)))
 (assert_return_canonical_nan (invoke "min" (f32.const -nan) (f32.const 0x1p+0)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const -nan:0x200000) (f32.const 0x1p+0)))
 (assert_return_canonical_nan (invoke "min" (f32.const nan) (f32.const -0x1p+0)))
-(assert_return_canonical_nan (invoke "min" (f32.const nan) (f32.const 0x1p+0)))
 (assert_return_arithmetic_nan (invoke "min" (f32.const nan:0x200000) (f32.const -0x1p+0)))
+(assert_return_canonical_nan (invoke "min" (f32.const nan) (f32.const 0x1p+0)))
 (assert_return_arithmetic_nan (invoke "min" (f32.const nan:0x200000) (f32.const 0x1p+0)))
 (assert_return_canonical_nan (invoke "min" (f32.const -nan) (f32.const -0x1.921fb6p+2)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const -nan:0x200000) (f32.const -0x1.921fb6p+2)))
 (assert_return_canonical_nan (invoke "min" (f32.const -nan) (f32.const 0x1.921fb6p+2)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const -nan:0x200000) (f32.const 0x1.921fb6p+2)))
 (assert_return_canonical_nan (invoke "min" (f32.const nan) (f32.const -0x1.921fb6p+2)))
-(assert_return_canonical_nan (invoke "min" (f32.const nan) (f32.const 0x1.921fb6p+2)))
 (assert_return_arithmetic_nan (invoke "min" (f32.const nan:0x200000) (f32.const -0x1.921fb6p+2)))
+(assert_return_canonical_nan (invoke "min" (f32.const nan) (f32.const 0x1.921fb6p+2)))
 (assert_return_arithmetic_nan (invoke "min" (f32.const nan:0x200000) (f32.const 0x1.921fb6p+2)))
 (assert_return_canonical_nan (invoke "min" (f32.const -nan) (f32.const -0x1.fffffep+127)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const -nan:0x200000) (f32.const -0x1.fffffep+127)))
 (assert_return_canonical_nan (invoke "min" (f32.const -nan) (f32.const 0x1.fffffep+127)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const -nan:0x200000) (f32.const 0x1.fffffep+127)))
 (assert_return_canonical_nan (invoke "min" (f32.const nan) (f32.const -0x1.fffffep+127)))
-(assert_return_canonical_nan (invoke "min" (f32.const nan) (f32.const 0x1.fffffep+127)))
 (assert_return_arithmetic_nan (invoke "min" (f32.const nan:0x200000) (f32.const -0x1.fffffep+127)))
+(assert_return_canonical_nan (invoke "min" (f32.const nan) (f32.const 0x1.fffffep+127)))
 (assert_return_arithmetic_nan (invoke "min" (f32.const nan:0x200000) (f32.const 0x1.fffffep+127)))
-(assert_return_canonical_nan (invoke "min" (f32.const -nan) (f32.const -infinity)))
-(assert_return_canonical_nan (invoke "min" (f32.const -nan) (f32.const infinity)))
-(assert_return_canonical_nan (invoke "min" (f32.const nan) (f32.const -infinity)))
-(assert_return_canonical_nan (invoke "min" (f32.const nan) (f32.const infinity)))
-(assert_return_arithmetic_nan (invoke "min" (f32.const nan:0x200000) (f32.const -infinity)))
-(assert_return_arithmetic_nan (invoke "min" (f32.const nan:0x200000) (f32.const infinity)))
+(assert_return_canonical_nan (invoke "min" (f32.const -nan) (f32.const -inf)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const -nan:0x200000) (f32.const -inf)))
+(assert_return_canonical_nan (invoke "min" (f32.const -nan) (f32.const inf)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const -nan:0x200000) (f32.const inf)))
+(assert_return_canonical_nan (invoke "min" (f32.const nan) (f32.const -inf)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const nan:0x200000) (f32.const -inf)))
+(assert_return_canonical_nan (invoke "min" (f32.const nan) (f32.const inf)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const nan:0x200000) (f32.const inf)))
 (assert_return_canonical_nan (invoke "min" (f32.const -nan) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const -nan:0x200000) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const -nan) (f32.const -nan:0x200000)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const -nan:0x200000) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "min" (f32.const -nan) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const -nan:0x200000) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const -nan) (f32.const nan:0x200000)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const -nan:0x200000) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "min" (f32.const nan) (f32.const -nan)))
-(assert_return_canonical_nan (invoke "min" (f32.const nan) (f32.const nan)))
 (assert_return_arithmetic_nan (invoke "min" (f32.const nan:0x200000) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const nan) (f32.const -nan:0x200000)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const nan:0x200000) (f32.const -nan:0x200000)))
+(assert_return_canonical_nan (invoke "min" (f32.const nan) (f32.const nan)))
 (assert_return_arithmetic_nan (invoke "min" (f32.const nan:0x200000) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const nan) (f32.const nan:0x200000)))
+(assert_return_arithmetic_nan (invoke "min" (f32.const nan:0x200000) (f32.const nan:0x200000)))
 (assert_return (invoke "max" (f32.const -0x0p+0) (f32.const -0x0p+0)) (f32.const -0x0p+0))
 (assert_return (invoke "max" (f32.const -0x0p+0) (f32.const 0x0p+0)) (f32.const 0x0p+0))
 (assert_return (invoke "max" (f32.const 0x0p+0) (f32.const -0x0p+0)) (f32.const 0x0p+0))
@@ -1700,14 +2044,16 @@
 (assert_return (invoke "max" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
 (assert_return (invoke "max" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const 0x0p+0))
 (assert_return (invoke "max" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "max" (f32.const -0x0p+0) (f32.const -infinity)) (f32.const -0x0p+0))
-(assert_return (invoke "max" (f32.const -0x0p+0) (f32.const infinity)) (f32.const infinity))
-(assert_return (invoke "max" (f32.const 0x0p+0) (f32.const -infinity)) (f32.const 0x0p+0))
-(assert_return (invoke "max" (f32.const 0x0p+0) (f32.const infinity)) (f32.const infinity))
+(assert_return (invoke "max" (f32.const -0x0p+0) (f32.const -inf)) (f32.const -0x0p+0))
+(assert_return (invoke "max" (f32.const -0x0p+0) (f32.const inf)) (f32.const inf))
+(assert_return (invoke "max" (f32.const 0x0p+0) (f32.const -inf)) (f32.const 0x0p+0))
+(assert_return (invoke "max" (f32.const 0x0p+0) (f32.const inf)) (f32.const inf))
 (assert_return_canonical_nan (invoke "max" (f32.const -0x0p+0) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const -0x0p+0) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "max" (f32.const -0x0p+0) (f32.const nan)))
 (assert_return_arithmetic_nan (invoke "max" (f32.const -0x0p+0) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "max" (f32.const 0x0p+0) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const 0x0p+0) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "max" (f32.const 0x0p+0) (f32.const nan)))
 (assert_return_arithmetic_nan (invoke "max" (f32.const 0x0p+0) (f32.const nan:0x200000)))
 (assert_return (invoke "max" (f32.const -0x1p-149) (f32.const -0x0p+0)) (f32.const -0x0p+0))
@@ -1738,14 +2084,16 @@
 (assert_return (invoke "max" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
 (assert_return (invoke "max" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const 0x1p-149))
 (assert_return (invoke "max" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "max" (f32.const -0x1p-149) (f32.const -infinity)) (f32.const -0x1p-149))
-(assert_return (invoke "max" (f32.const -0x1p-149) (f32.const infinity)) (f32.const infinity))
-(assert_return (invoke "max" (f32.const 0x1p-149) (f32.const -infinity)) (f32.const 0x1p-149))
-(assert_return (invoke "max" (f32.const 0x1p-149) (f32.const infinity)) (f32.const infinity))
+(assert_return (invoke "max" (f32.const -0x1p-149) (f32.const -inf)) (f32.const -0x1p-149))
+(assert_return (invoke "max" (f32.const -0x1p-149) (f32.const inf)) (f32.const inf))
+(assert_return (invoke "max" (f32.const 0x1p-149) (f32.const -inf)) (f32.const 0x1p-149))
+(assert_return (invoke "max" (f32.const 0x1p-149) (f32.const inf)) (f32.const inf))
 (assert_return_canonical_nan (invoke "max" (f32.const -0x1p-149) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const -0x1p-149) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "max" (f32.const -0x1p-149) (f32.const nan)))
 (assert_return_arithmetic_nan (invoke "max" (f32.const -0x1p-149) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "max" (f32.const 0x1p-149) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const 0x1p-149) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "max" (f32.const 0x1p-149) (f32.const nan)))
 (assert_return_arithmetic_nan (invoke "max" (f32.const 0x1p-149) (f32.const nan:0x200000)))
 (assert_return (invoke "max" (f32.const -0x1p-126) (f32.const -0x0p+0)) (f32.const -0x0p+0))
@@ -1776,14 +2124,16 @@
 (assert_return (invoke "max" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
 (assert_return (invoke "max" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const 0x1p-126))
 (assert_return (invoke "max" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "max" (f32.const -0x1p-126) (f32.const -infinity)) (f32.const -0x1p-126))
-(assert_return (invoke "max" (f32.const -0x1p-126) (f32.const infinity)) (f32.const infinity))
-(assert_return (invoke "max" (f32.const 0x1p-126) (f32.const -infinity)) (f32.const 0x1p-126))
-(assert_return (invoke "max" (f32.const 0x1p-126) (f32.const infinity)) (f32.const infinity))
+(assert_return (invoke "max" (f32.const -0x1p-126) (f32.const -inf)) (f32.const -0x1p-126))
+(assert_return (invoke "max" (f32.const -0x1p-126) (f32.const inf)) (f32.const inf))
+(assert_return (invoke "max" (f32.const 0x1p-126) (f32.const -inf)) (f32.const 0x1p-126))
+(assert_return (invoke "max" (f32.const 0x1p-126) (f32.const inf)) (f32.const inf))
 (assert_return_canonical_nan (invoke "max" (f32.const -0x1p-126) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const -0x1p-126) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "max" (f32.const -0x1p-126) (f32.const nan)))
 (assert_return_arithmetic_nan (invoke "max" (f32.const -0x1p-126) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "max" (f32.const 0x1p-126) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const 0x1p-126) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "max" (f32.const 0x1p-126) (f32.const nan)))
 (assert_return_arithmetic_nan (invoke "max" (f32.const 0x1p-126) (f32.const nan:0x200000)))
 (assert_return (invoke "max" (f32.const -0x1p-1) (f32.const -0x0p+0)) (f32.const -0x0p+0))
@@ -1814,14 +2164,16 @@
 (assert_return (invoke "max" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
 (assert_return (invoke "max" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const 0x1p-1))
 (assert_return (invoke "max" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "max" (f32.const -0x1p-1) (f32.const -infinity)) (f32.const -0x1p-1))
-(assert_return (invoke "max" (f32.const -0x1p-1) (f32.const infinity)) (f32.const infinity))
-(assert_return (invoke "max" (f32.const 0x1p-1) (f32.const -infinity)) (f32.const 0x1p-1))
-(assert_return (invoke "max" (f32.const 0x1p-1) (f32.const infinity)) (f32.const infinity))
+(assert_return (invoke "max" (f32.const -0x1p-1) (f32.const -inf)) (f32.const -0x1p-1))
+(assert_return (invoke "max" (f32.const -0x1p-1) (f32.const inf)) (f32.const inf))
+(assert_return (invoke "max" (f32.const 0x1p-1) (f32.const -inf)) (f32.const 0x1p-1))
+(assert_return (invoke "max" (f32.const 0x1p-1) (f32.const inf)) (f32.const inf))
 (assert_return_canonical_nan (invoke "max" (f32.const -0x1p-1) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const -0x1p-1) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "max" (f32.const -0x1p-1) (f32.const nan)))
 (assert_return_arithmetic_nan (invoke "max" (f32.const -0x1p-1) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "max" (f32.const 0x1p-1) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const 0x1p-1) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "max" (f32.const 0x1p-1) (f32.const nan)))
 (assert_return_arithmetic_nan (invoke "max" (f32.const 0x1p-1) (f32.const nan:0x200000)))
 (assert_return (invoke "max" (f32.const -0x1p+0) (f32.const -0x0p+0)) (f32.const -0x0p+0))
@@ -1852,14 +2204,16 @@
 (assert_return (invoke "max" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
 (assert_return (invoke "max" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const 0x1p+0))
 (assert_return (invoke "max" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "max" (f32.const -0x1p+0) (f32.const -infinity)) (f32.const -0x1p+0))
-(assert_return (invoke "max" (f32.const -0x1p+0) (f32.const infinity)) (f32.const infinity))
-(assert_return (invoke "max" (f32.const 0x1p+0) (f32.const -infinity)) (f32.const 0x1p+0))
-(assert_return (invoke "max" (f32.const 0x1p+0) (f32.const infinity)) (f32.const infinity))
+(assert_return (invoke "max" (f32.const -0x1p+0) (f32.const -inf)) (f32.const -0x1p+0))
+(assert_return (invoke "max" (f32.const -0x1p+0) (f32.const inf)) (f32.const inf))
+(assert_return (invoke "max" (f32.const 0x1p+0) (f32.const -inf)) (f32.const 0x1p+0))
+(assert_return (invoke "max" (f32.const 0x1p+0) (f32.const inf)) (f32.const inf))
 (assert_return_canonical_nan (invoke "max" (f32.const -0x1p+0) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const -0x1p+0) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "max" (f32.const -0x1p+0) (f32.const nan)))
 (assert_return_arithmetic_nan (invoke "max" (f32.const -0x1p+0) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "max" (f32.const 0x1p+0) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const 0x1p+0) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "max" (f32.const 0x1p+0) (f32.const nan)))
 (assert_return_arithmetic_nan (invoke "max" (f32.const 0x1p+0) (f32.const nan:0x200000)))
 (assert_return (invoke "max" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const -0x0p+0))
@@ -1890,14 +2244,16 @@
 (assert_return (invoke "max" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
 (assert_return (invoke "max" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const 0x1.921fb6p+2))
 (assert_return (invoke "max" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "max" (f32.const -0x1.921fb6p+2) (f32.const -infinity)) (f32.const -0x1.921fb6p+2))
-(assert_return (invoke "max" (f32.const -0x1.921fb6p+2) (f32.const infinity)) (f32.const infinity))
-(assert_return (invoke "max" (f32.const 0x1.921fb6p+2) (f32.const -infinity)) (f32.const 0x1.921fb6p+2))
-(assert_return (invoke "max" (f32.const 0x1.921fb6p+2) (f32.const infinity)) (f32.const infinity))
+(assert_return (invoke "max" (f32.const -0x1.921fb6p+2) (f32.const -inf)) (f32.const -0x1.921fb6p+2))
+(assert_return (invoke "max" (f32.const -0x1.921fb6p+2) (f32.const inf)) (f32.const inf))
+(assert_return (invoke "max" (f32.const 0x1.921fb6p+2) (f32.const -inf)) (f32.const 0x1.921fb6p+2))
+(assert_return (invoke "max" (f32.const 0x1.921fb6p+2) (f32.const inf)) (f32.const inf))
 (assert_return_canonical_nan (invoke "max" (f32.const -0x1.921fb6p+2) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const -0x1.921fb6p+2) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "max" (f32.const -0x1.921fb6p+2) (f32.const nan)))
 (assert_return_arithmetic_nan (invoke "max" (f32.const -0x1.921fb6p+2) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "max" (f32.const 0x1.921fb6p+2) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const 0x1.921fb6p+2) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "max" (f32.const 0x1.921fb6p+2) (f32.const nan)))
 (assert_return_arithmetic_nan (invoke "max" (f32.const 0x1.921fb6p+2) (f32.const nan:0x200000)))
 (assert_return (invoke "max" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const -0x0p+0))
@@ -1928,416 +2284,138 @@
 (assert_return (invoke "max" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
 (assert_return (invoke "max" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
 (assert_return (invoke "max" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "max" (f32.const -0x1.fffffep+127) (f32.const -infinity)) (f32.const -0x1.fffffep+127))
-(assert_return (invoke "max" (f32.const -0x1.fffffep+127) (f32.const infinity)) (f32.const infinity))
-(assert_return (invoke "max" (f32.const 0x1.fffffep+127) (f32.const -infinity)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "max" (f32.const 0x1.fffffep+127) (f32.const infinity)) (f32.const infinity))
+(assert_return (invoke "max" (f32.const -0x1.fffffep+127) (f32.const -inf)) (f32.const -0x1.fffffep+127))
+(assert_return (invoke "max" (f32.const -0x1.fffffep+127) (f32.const inf)) (f32.const inf))
+(assert_return (invoke "max" (f32.const 0x1.fffffep+127) (f32.const -inf)) (f32.const 0x1.fffffep+127))
+(assert_return (invoke "max" (f32.const 0x1.fffffep+127) (f32.const inf)) (f32.const inf))
 (assert_return_canonical_nan (invoke "max" (f32.const -0x1.fffffep+127) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const -0x1.fffffep+127) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "max" (f32.const -0x1.fffffep+127) (f32.const nan)))
 (assert_return_arithmetic_nan (invoke "max" (f32.const -0x1.fffffep+127) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "max" (f32.const 0x1.fffffep+127) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const 0x1.fffffep+127) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "max" (f32.const 0x1.fffffep+127) (f32.const nan)))
 (assert_return_arithmetic_nan (invoke "max" (f32.const 0x1.fffffep+127) (f32.const nan:0x200000)))
-(assert_return (invoke "max" (f32.const -infinity) (f32.const -0x0p+0)) (f32.const -0x0p+0))
-(assert_return (invoke "max" (f32.const -infinity) (f32.const 0x0p+0)) (f32.const 0x0p+0))
-(assert_return (invoke "max" (f32.const infinity) (f32.const -0x0p+0)) (f32.const infinity))
-(assert_return (invoke "max" (f32.const infinity) (f32.const 0x0p+0)) (f32.const infinity))
-(assert_return (invoke "max" (f32.const -infinity) (f32.const -0x1p-149)) (f32.const -0x1p-149))
-(assert_return (invoke "max" (f32.const -infinity) (f32.const 0x1p-149)) (f32.const 0x1p-149))
-(assert_return (invoke "max" (f32.const infinity) (f32.const -0x1p-149)) (f32.const infinity))
-(assert_return (invoke "max" (f32.const infinity) (f32.const 0x1p-149)) (f32.const infinity))
-(assert_return (invoke "max" (f32.const -infinity) (f32.const -0x1p-126)) (f32.const -0x1p-126))
-(assert_return (invoke "max" (f32.const -infinity) (f32.const 0x1p-126)) (f32.const 0x1p-126))
-(assert_return (invoke "max" (f32.const infinity) (f32.const -0x1p-126)) (f32.const infinity))
-(assert_return (invoke "max" (f32.const infinity) (f32.const 0x1p-126)) (f32.const infinity))
-(assert_return (invoke "max" (f32.const -infinity) (f32.const -0x1p-1)) (f32.const -0x1p-1))
-(assert_return (invoke "max" (f32.const -infinity) (f32.const 0x1p-1)) (f32.const 0x1p-1))
-(assert_return (invoke "max" (f32.const infinity) (f32.const -0x1p-1)) (f32.const infinity))
-(assert_return (invoke "max" (f32.const infinity) (f32.const 0x1p-1)) (f32.const infinity))
-(assert_return (invoke "max" (f32.const -infinity) (f32.const -0x1p+0)) (f32.const -0x1p+0))
-(assert_return (invoke "max" (f32.const -infinity) (f32.const 0x1p+0)) (f32.const 0x1p+0))
-(assert_return (invoke "max" (f32.const infinity) (f32.const -0x1p+0)) (f32.const infinity))
-(assert_return (invoke "max" (f32.const infinity) (f32.const 0x1p+0)) (f32.const infinity))
-(assert_return (invoke "max" (f32.const -infinity) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))
-(assert_return (invoke "max" (f32.const -infinity) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))
-(assert_return (invoke "max" (f32.const infinity) (f32.const -0x1.921fb6p+2)) (f32.const infinity))
-(assert_return (invoke "max" (f32.const infinity) (f32.const 0x1.921fb6p+2)) (f32.const infinity))
-(assert_return (invoke "max" (f32.const -infinity) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
-(assert_return (invoke "max" (f32.const -infinity) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "max" (f32.const infinity) (f32.const -0x1.fffffep+127)) (f32.const infinity))
-(assert_return (invoke "max" (f32.const infinity) (f32.const 0x1.fffffep+127)) (f32.const infinity))
-(assert_return (invoke "max" (f32.const -infinity) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "max" (f32.const -infinity) (f32.const infinity)) (f32.const infinity))
-(assert_return (invoke "max" (f32.const infinity) (f32.const -infinity)) (f32.const infinity))
-(assert_return (invoke "max" (f32.const infinity) (f32.const infinity)) (f32.const infinity))
-(assert_return_canonical_nan (invoke "max" (f32.const -infinity) (f32.const -nan)))
-(assert_return_canonical_nan (invoke "max" (f32.const -infinity) (f32.const nan)))
-(assert_return_arithmetic_nan (invoke "max" (f32.const -infinity) (f32.const nan:0x200000)))
-(assert_return_canonical_nan (invoke "max" (f32.const infinity) (f32.const -nan)))
-(assert_return_canonical_nan (invoke "max" (f32.const infinity) (f32.const nan)))
-(assert_return_arithmetic_nan (invoke "max" (f32.const infinity) (f32.const nan:0x200000)))
+(assert_return (invoke "max" (f32.const -inf) (f32.const -0x0p+0)) (f32.const -0x0p+0))
+(assert_return (invoke "max" (f32.const -inf) (f32.const 0x0p+0)) (f32.const 0x0p+0))
+(assert_return (invoke "max" (f32.const inf) (f32.const -0x0p+0)) (f32.const inf))
+(assert_return (invoke "max" (f32.const inf) (f32.const 0x0p+0)) (f32.const inf))
+(assert_return (invoke "max" (f32.const -inf) (f32.const -0x1p-149)) (f32.const -0x1p-149))
+(assert_return (invoke "max" (f32.const -inf) (f32.const 0x1p-149)) (f32.const 0x1p-149))
+(assert_return (invoke "max" (f32.const inf) (f32.const -0x1p-149)) (f32.const inf))
+(assert_return (invoke "max" (f32.const inf) (f32.const 0x1p-149)) (f32.const inf))
+(assert_return (invoke "max" (f32.const -inf) (f32.const -0x1p-126)) (f32.const -0x1p-126))
+(assert_return (invoke "max" (f32.const -inf) (f32.const 0x1p-126)) (f32.const 0x1p-126))
+(assert_return (invoke "max" (f32.const inf) (f32.const -0x1p-126)) (f32.const inf))
+(assert_return (invoke "max" (f32.const inf) (f32.const 0x1p-126)) (f32.const inf))
+(assert_return (invoke "max" (f32.const -inf) (f32.const -0x1p-1)) (f32.const -0x1p-1))
+(assert_return (invoke "max" (f32.const -inf) (f32.const 0x1p-1)) (f32.const 0x1p-1))
+(assert_return (invoke "max" (f32.const inf) (f32.const -0x1p-1)) (f32.const inf))
+(assert_return (invoke "max" (f32.const inf) (f32.const 0x1p-1)) (f32.const inf))
+(assert_return (invoke "max" (f32.const -inf) (f32.const -0x1p+0)) (f32.const -0x1p+0))
+(assert_return (invoke "max" (f32.const -inf) (f32.const 0x1p+0)) (f32.const 0x1p+0))
+(assert_return (invoke "max" (f32.const inf) (f32.const -0x1p+0)) (f32.const inf))
+(assert_return (invoke "max" (f32.const inf) (f32.const 0x1p+0)) (f32.const inf))
+(assert_return (invoke "max" (f32.const -inf) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))
+(assert_return (invoke "max" (f32.const -inf) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))
+(assert_return (invoke "max" (f32.const inf) (f32.const -0x1.921fb6p+2)) (f32.const inf))
+(assert_return (invoke "max" (f32.const inf) (f32.const 0x1.921fb6p+2)) (f32.const inf))
+(assert_return (invoke "max" (f32.const -inf) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
+(assert_return (invoke "max" (f32.const -inf) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
+(assert_return (invoke "max" (f32.const inf) (f32.const -0x1.fffffep+127)) (f32.const inf))
+(assert_return (invoke "max" (f32.const inf) (f32.const 0x1.fffffep+127)) (f32.const inf))
+(assert_return (invoke "max" (f32.const -inf) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "max" (f32.const -inf) (f32.const inf)) (f32.const inf))
+(assert_return (invoke "max" (f32.const inf) (f32.const -inf)) (f32.const inf))
+(assert_return (invoke "max" (f32.const inf) (f32.const inf)) (f32.const inf))
+(assert_return_canonical_nan (invoke "max" (f32.const -inf) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const -inf) (f32.const -nan:0x200000)))
+(assert_return_canonical_nan (invoke "max" (f32.const -inf) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const -inf) (f32.const nan:0x200000)))
+(assert_return_canonical_nan (invoke "max" (f32.const inf) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const inf) (f32.const -nan:0x200000)))
+(assert_return_canonical_nan (invoke "max" (f32.const inf) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const inf) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "max" (f32.const -nan) (f32.const -0x0p+0)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const -nan:0x200000) (f32.const -0x0p+0)))
 (assert_return_canonical_nan (invoke "max" (f32.const -nan) (f32.const 0x0p+0)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const -nan:0x200000) (f32.const 0x0p+0)))
 (assert_return_canonical_nan (invoke "max" (f32.const nan) (f32.const -0x0p+0)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const nan:0x200000) (f32.const -0x0p+0)))
 (assert_return_canonical_nan (invoke "max" (f32.const nan) (f32.const 0x0p+0)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const nan:0x200000) (f32.const 0x0p+0)))
 (assert_return_canonical_nan (invoke "max" (f32.const -nan) (f32.const -0x1p-149)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const -nan:0x200000) (f32.const -0x1p-149)))
 (assert_return_canonical_nan (invoke "max" (f32.const -nan) (f32.const 0x1p-149)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const -nan:0x200000) (f32.const 0x1p-149)))
 (assert_return_canonical_nan (invoke "max" (f32.const nan) (f32.const -0x1p-149)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const nan:0x200000) (f32.const -0x1p-149)))
 (assert_return_canonical_nan (invoke "max" (f32.const nan) (f32.const 0x1p-149)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const nan:0x200000) (f32.const 0x1p-149)))
 (assert_return_canonical_nan (invoke "max" (f32.const -nan) (f32.const -0x1p-126)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const -nan:0x200000) (f32.const -0x1p-126)))
 (assert_return_canonical_nan (invoke "max" (f32.const -nan) (f32.const 0x1p-126)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const -nan:0x200000) (f32.const 0x1p-126)))
 (assert_return_canonical_nan (invoke "max" (f32.const nan) (f32.const -0x1p-126)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const nan:0x200000) (f32.const -0x1p-126)))
 (assert_return_canonical_nan (invoke "max" (f32.const nan) (f32.const 0x1p-126)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const nan:0x200000) (f32.const 0x1p-126)))
 (assert_return_canonical_nan (invoke "max" (f32.const -nan) (f32.const -0x1p-1)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const -nan:0x200000) (f32.const -0x1p-1)))
 (assert_return_canonical_nan (invoke "max" (f32.const -nan) (f32.const 0x1p-1)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const -nan:0x200000) (f32.const 0x1p-1)))
 (assert_return_canonical_nan (invoke "max" (f32.const nan) (f32.const -0x1p-1)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const nan:0x200000) (f32.const -0x1p-1)))
 (assert_return_canonical_nan (invoke "max" (f32.const nan) (f32.const 0x1p-1)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const nan:0x200000) (f32.const 0x1p-1)))
 (assert_return_canonical_nan (invoke "max" (f32.const -nan) (f32.const -0x1p+0)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const -nan:0x200000) (f32.const -0x1p+0)))
 (assert_return_canonical_nan (invoke "max" (f32.const -nan) (f32.const 0x1p+0)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const -nan:0x200000) (f32.const 0x1p+0)))
 (assert_return_canonical_nan (invoke "max" (f32.const nan) (f32.const -0x1p+0)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const nan:0x200000) (f32.const -0x1p+0)))
 (assert_return_canonical_nan (invoke "max" (f32.const nan) (f32.const 0x1p+0)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const nan:0x200000) (f32.const 0x1p+0)))
 (assert_return_canonical_nan (invoke "max" (f32.const -nan) (f32.const -0x1.921fb6p+2)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const -nan:0x200000) (f32.const -0x1.921fb6p+2)))
 (assert_return_canonical_nan (invoke "max" (f32.const -nan) (f32.const 0x1.921fb6p+2)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const -nan:0x200000) (f32.const 0x1.921fb6p+2)))
 (assert_return_canonical_nan (invoke "max" (f32.const nan) (f32.const -0x1.921fb6p+2)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const nan:0x200000) (f32.const -0x1.921fb6p+2)))
 (assert_return_canonical_nan (invoke "max" (f32.const nan) (f32.const 0x1.921fb6p+2)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const nan:0x200000) (f32.const 0x1.921fb6p+2)))
 (assert_return_canonical_nan (invoke "max" (f32.const -nan) (f32.const -0x1.fffffep+127)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const -nan:0x200000) (f32.const -0x1.fffffep+127)))
 (assert_return_canonical_nan (invoke "max" (f32.const -nan) (f32.const 0x1.fffffep+127)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const -nan:0x200000) (f32.const 0x1.fffffep+127)))
 (assert_return_canonical_nan (invoke "max" (f32.const nan) (f32.const -0x1.fffffep+127)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const nan:0x200000) (f32.const -0x1.fffffep+127)))
 (assert_return_canonical_nan (invoke "max" (f32.const nan) (f32.const 0x1.fffffep+127)))
-(assert_return_canonical_nan (invoke "max" (f32.const -nan) (f32.const -infinity)))
-(assert_return_canonical_nan (invoke "max" (f32.const -nan) (f32.const infinity)))
-(assert_return_canonical_nan (invoke "max" (f32.const nan) (f32.const -infinity)))
-(assert_return_canonical_nan (invoke "max" (f32.const nan) (f32.const infinity)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const nan:0x200000) (f32.const 0x1.fffffep+127)))
+(assert_return_canonical_nan (invoke "max" (f32.const -nan) (f32.const -inf)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const -nan:0x200000) (f32.const -inf)))
+(assert_return_canonical_nan (invoke "max" (f32.const -nan) (f32.const inf)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const -nan:0x200000) (f32.const inf)))
+(assert_return_canonical_nan (invoke "max" (f32.const nan) (f32.const -inf)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const nan:0x200000) (f32.const -inf)))
+(assert_return_canonical_nan (invoke "max" (f32.const nan) (f32.const inf)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const nan:0x200000) (f32.const inf)))
 (assert_return_canonical_nan (invoke "max" (f32.const -nan) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const -nan:0x200000) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const -nan) (f32.const -nan:0x200000)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const -nan:0x200000) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "max" (f32.const -nan) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const -nan:0x200000) (f32.const nan)))
 (assert_return_arithmetic_nan (invoke "max" (f32.const -nan) (f32.const nan:0x200000)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const -nan:0x200000) (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "max" (f32.const nan) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const nan:0x200000) (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const nan) (f32.const -nan:0x200000)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const nan:0x200000) (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "max" (f32.const nan) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const nan:0x200000) (f32.const nan)))
 (assert_return_arithmetic_nan (invoke "max" (f32.const nan) (f32.const nan:0x200000)))
-(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const -0x0p+0)) (f32.const -0x0p+0))
-(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const 0x0p+0)) (f32.const 0x0p+0))
-(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const -0x0p+0)) (f32.const -0x0p+0))
-(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const 0x0p+0)) (f32.const 0x0p+0))
-(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const -0x1p-149)) (f32.const -0x0p+0))
-(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const 0x1p-149)) (f32.const 0x0p+0))
-(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const -0x1p-149)) (f32.const -0x0p+0))
-(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const 0x1p-149)) (f32.const 0x0p+0))
-(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const -0x1p-126)) (f32.const -0x0p+0))
-(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const 0x1p-126)) (f32.const 0x0p+0))
-(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const -0x1p-126)) (f32.const -0x0p+0))
-(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const 0x1p-126)) (f32.const 0x0p+0))
-(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const -0x1p-1)) (f32.const -0x0p+0))
-(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const 0x1p-1)) (f32.const 0x0p+0))
-(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const -0x1p-1)) (f32.const -0x0p+0))
-(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const 0x1p-1)) (f32.const 0x0p+0))
-(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const -0x1p+0)) (f32.const -0x0p+0))
-(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const 0x1p+0)) (f32.const 0x0p+0))
-(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const -0x1p+0)) (f32.const -0x0p+0))
-(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const 0x1p+0)) (f32.const 0x0p+0))
-(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x0p+0))
-(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x0p+0))
-(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x0p+0))
-(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x0p+0))
-(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x0p+0))
-(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x0p+0))
-(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x0p+0))
-(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x0p+0))
-(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const -infinity)) (f32.const -0x0p+0))
-(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const infinity)) (f32.const 0x0p+0))
-(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const -infinity)) (f32.const -0x0p+0))
-(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const infinity)) (f32.const 0x0p+0))
-(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const -nan)) (f32.const -0x0p+0))
-(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const nan)) (f32.const 0x0p+0))
-(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const -nan)) (f32.const -0x0p+0))
-(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const nan)) (f32.const 0x0p+0))
-(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const -0x0p+0)) (f32.const -0x1p-149))
-(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const 0x0p+0)) (f32.const 0x1p-149))
-(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const -0x0p+0)) (f32.const -0x1p-149))
-(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const 0x0p+0)) (f32.const 0x1p-149))
-(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const -0x1p-149)) (f32.const -0x1p-149))
-(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const 0x1p-149)) (f32.const 0x1p-149))
-(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const -0x1p-149)) (f32.const -0x1p-149))
-(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const 0x1p-149)) (f32.const 0x1p-149))
-(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const -0x1p-126)) (f32.const -0x1p-149))
-(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const 0x1p-126)) (f32.const 0x1p-149))
-(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const -0x1p-126)) (f32.const -0x1p-149))
-(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const 0x1p-126)) (f32.const 0x1p-149))
-(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const -0x1p-1)) (f32.const -0x1p-149))
-(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const 0x1p-1)) (f32.const 0x1p-149))
-(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const -0x1p-1)) (f32.const -0x1p-149))
-(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const 0x1p-1)) (f32.const 0x1p-149))
-(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const -0x1p+0)) (f32.const -0x1p-149))
-(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const 0x1p+0)) (f32.const 0x1p-149))
-(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const -0x1p+0)) (f32.const -0x1p-149))
-(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const 0x1p+0)) (f32.const 0x1p-149))
-(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p-149))
-(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p-149))
-(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p-149))
-(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p-149))
-(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-149))
-(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-149))
-(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-149))
-(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-149))
-(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const -infinity)) (f32.const -0x1p-149))
-(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const infinity)) (f32.const 0x1p-149))
-(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const -infinity)) (f32.const -0x1p-149))
-(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const infinity)) (f32.const 0x1p-149))
-(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const -nan)) (f32.const -0x1p-149))
-(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const nan)) (f32.const 0x1p-149))
-(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const -nan)) (f32.const -0x1p-149))
-(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const nan)) (f32.const 0x1p-149))
-(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const -0x0p+0)) (f32.const -0x1p-126))
-(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const 0x0p+0)) (f32.const 0x1p-126))
-(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const -0x0p+0)) (f32.const -0x1p-126))
-(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const 0x0p+0)) (f32.const 0x1p-126))
-(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const -0x1p-149)) (f32.const -0x1p-126))
-(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const 0x1p-149)) (f32.const 0x1p-126))
-(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const -0x1p-149)) (f32.const -0x1p-126))
-(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const 0x1p-149)) (f32.const 0x1p-126))
-(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const -0x1p-126)) (f32.const -0x1p-126))
-(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const 0x1p-126)) (f32.const 0x1p-126))
-(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const -0x1p-126)) (f32.const -0x1p-126))
-(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const 0x1p-126)) (f32.const 0x1p-126))
-(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const -0x1p-1)) (f32.const -0x1p-126))
-(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const 0x1p-1)) (f32.const 0x1p-126))
-(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const -0x1p-1)) (f32.const -0x1p-126))
-(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const 0x1p-1)) (f32.const 0x1p-126))
-(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const -0x1p+0)) (f32.const -0x1p-126))
-(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const 0x1p+0)) (f32.const 0x1p-126))
-(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const -0x1p+0)) (f32.const -0x1p-126))
-(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const 0x1p+0)) (f32.const 0x1p-126))
-(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p-126))
-(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p-126))
-(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p-126))
-(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p-126))
-(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-126))
-(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-126))
-(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-126))
-(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-126))
-(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const -infinity)) (f32.const -0x1p-126))
-(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const infinity)) (f32.const 0x1p-126))
-(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const -infinity)) (f32.const -0x1p-126))
-(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const infinity)) (f32.const 0x1p-126))
-(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const -nan)) (f32.const -0x1p-126))
-(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const nan)) (f32.const 0x1p-126))
-(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const -nan)) (f32.const -0x1p-126))
-(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const nan)) (f32.const 0x1p-126))
-(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const -0x0p+0)) (f32.const -0x1p-1))
-(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const 0x0p+0)) (f32.const 0x1p-1))
-(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const -0x0p+0)) (f32.const -0x1p-1))
-(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const 0x0p+0)) (f32.const 0x1p-1))
-(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const -0x1p-149)) (f32.const -0x1p-1))
-(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const 0x1p-149)) (f32.const 0x1p-1))
-(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const -0x1p-149)) (f32.const -0x1p-1))
-(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const 0x1p-149)) (f32.const 0x1p-1))
-(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const -0x1p-126)) (f32.const -0x1p-1))
-(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const 0x1p-126)) (f32.const 0x1p-1))
-(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const -0x1p-126)) (f32.const -0x1p-1))
-(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const 0x1p-126)) (f32.const 0x1p-1))
-(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const -0x1p-1)) (f32.const -0x1p-1))
-(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const 0x1p-1)) (f32.const 0x1p-1))
-(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const -0x1p-1)) (f32.const -0x1p-1))
-(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const 0x1p-1)) (f32.const 0x1p-1))
-(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const -0x1p+0)) (f32.const -0x1p-1))
-(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const 0x1p+0)) (f32.const 0x1p-1))
-(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const -0x1p+0)) (f32.const -0x1p-1))
-(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const 0x1p+0)) (f32.const 0x1p-1))
-(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p-1))
-(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p-1))
-(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p-1))
-(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p-1))
-(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-1))
-(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-1))
-(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-1))
-(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-1))
-(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const -infinity)) (f32.const -0x1p-1))
-(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const infinity)) (f32.const 0x1p-1))
-(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const -infinity)) (f32.const -0x1p-1))
-(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const infinity)) (f32.const 0x1p-1))
-(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const -nan)) (f32.const -0x1p-1))
-(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const nan)) (f32.const 0x1p-1))
-(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const -nan)) (f32.const -0x1p-1))
-(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const nan)) (f32.const 0x1p-1))
-(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const -0x0p+0)) (f32.const -0x1p+0))
-(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const 0x0p+0)) (f32.const 0x1p+0))
-(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const -0x0p+0)) (f32.const -0x1p+0))
-(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const 0x0p+0)) (f32.const 0x1p+0))
-(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const -0x1p-149)) (f32.const -0x1p+0))
-(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const 0x1p-149)) (f32.const 0x1p+0))
-(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const -0x1p-149)) (f32.const -0x1p+0))
-(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const 0x1p-149)) (f32.const 0x1p+0))
-(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const -0x1p-126)) (f32.const -0x1p+0))
-(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const 0x1p-126)) (f32.const 0x1p+0))
-(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const -0x1p-126)) (f32.const -0x1p+0))
-(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const 0x1p-126)) (f32.const 0x1p+0))
-(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const -0x1p-1)) (f32.const -0x1p+0))
-(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const 0x1p-1)) (f32.const 0x1p+0))
-(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const -0x1p-1)) (f32.const -0x1p+0))
-(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const 0x1p-1)) (f32.const 0x1p+0))
-(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const -0x1p+0)) (f32.const -0x1p+0))
-(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const 0x1p+0)) (f32.const 0x1p+0))
-(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const -0x1p+0)) (f32.const -0x1p+0))
-(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const 0x1p+0)) (f32.const 0x1p+0))
-(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p+0))
-(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p+0))
-(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p+0))
-(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p+0))
-(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1p+0))
-(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1p+0))
-(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1p+0))
-(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1p+0))
-(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const -infinity)) (f32.const -0x1p+0))
-(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const infinity)) (f32.const 0x1p+0))
-(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const -infinity)) (f32.const -0x1p+0))
-(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const infinity)) (f32.const 0x1p+0))
-(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const -nan)) (f32.const -0x1p+0))
-(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const nan)) (f32.const 0x1p+0))
-(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const -nan)) (f32.const -0x1p+0))
-(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const nan)) (f32.const 0x1p+0))
-(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const -0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const 0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const -0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const 0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const -0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const 0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const -0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const 0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const -0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const 0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const -0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const 0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const -0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-1)) (f32.const 0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const -0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-1)) (f32.const 0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const -0x1p+0)) (f32.const -0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const 0x1p+0)) (f32.const 0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const -0x1p+0)) (f32.const -0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const 0x1p+0)) (f32.const 0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const -0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const 0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const -0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const 0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const -infinity)) (f32.const -0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const infinity)) (f32.const 0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const -infinity)) (f32.const -0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const infinity)) (f32.const 0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const -nan)) (f32.const -0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const nan)) (f32.const 0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const -nan)) (f32.const -0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const nan)) (f32.const 0x1.921fb6p+2))
-(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const -0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const -0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const -0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const -0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const -0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const -0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const -0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const -0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const -0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const -0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const -infinity)) (f32.const -0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const infinity)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const -infinity)) (f32.const -0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const infinity)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const -nan)) (f32.const -0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const nan)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const -nan)) (f32.const -0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const nan)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "copysign" (f32.const -infinity) (f32.const -0x0p+0)) (f32.const -infinity))
-(assert_return (invoke "copysign" (f32.const -infinity) (f32.const 0x0p+0)) (f32.const infinity))
-(assert_return (invoke "copysign" (f32.const infinity) (f32.const -0x0p+0)) (f32.const -infinity))
-(assert_return (invoke "copysign" (f32.const infinity) (f32.const 0x0p+0)) (f32.const infinity))
-(assert_return (invoke "copysign" (f32.const -infinity) (f32.const -0x1p-149)) (f32.const -infinity))
-(assert_return (invoke "copysign" (f32.const -infinity) (f32.const 0x1p-149)) (f32.const infinity))
-(assert_return (invoke "copysign" (f32.const infinity) (f32.const -0x1p-149)) (f32.const -infinity))
-(assert_return (invoke "copysign" (f32.const infinity) (f32.const 0x1p-149)) (f32.const infinity))
-(assert_return (invoke "copysign" (f32.const -infinity) (f32.const -0x1p-126)) (f32.const -infinity))
-(assert_return (invoke "copysign" (f32.const -infinity) (f32.const 0x1p-126)) (f32.const infinity))
-(assert_return (invoke "copysign" (f32.const infinity) (f32.const -0x1p-126)) (f32.const -infinity))
-(assert_return (invoke "copysign" (f32.const infinity) (f32.const 0x1p-126)) (f32.const infinity))
-(assert_return (invoke "copysign" (f32.const -infinity) (f32.const -0x1p-1)) (f32.const -infinity))
-(assert_return (invoke "copysign" (f32.const -infinity) (f32.const 0x1p-1)) (f32.const infinity))
-(assert_return (invoke "copysign" (f32.const infinity) (f32.const -0x1p-1)) (f32.const -infinity))
-(assert_return (invoke "copysign" (f32.const infinity) (f32.const 0x1p-1)) (f32.const infinity))
-(assert_return (invoke "copysign" (f32.const -infinity) (f32.const -0x1p+0)) (f32.const -infinity))
-(assert_return (invoke "copysign" (f32.const -infinity) (f32.const 0x1p+0)) (f32.const infinity))
-(assert_return (invoke "copysign" (f32.const infinity) (f32.const -0x1p+0)) (f32.const -infinity))
-(assert_return (invoke "copysign" (f32.const infinity) (f32.const 0x1p+0)) (f32.const infinity))
-(assert_return (invoke "copysign" (f32.const -infinity) (f32.const -0x1.921fb6p+2)) (f32.const -infinity))
-(assert_return (invoke "copysign" (f32.const -infinity) (f32.const 0x1.921fb6p+2)) (f32.const infinity))
-(assert_return (invoke "copysign" (f32.const infinity) (f32.const -0x1.921fb6p+2)) (f32.const -infinity))
-(assert_return (invoke "copysign" (f32.const infinity) (f32.const 0x1.921fb6p+2)) (f32.const infinity))
-(assert_return (invoke "copysign" (f32.const -infinity) (f32.const -0x1.fffffep+127)) (f32.const -infinity))
-(assert_return (invoke "copysign" (f32.const -infinity) (f32.const 0x1.fffffep+127)) (f32.const infinity))
-(assert_return (invoke "copysign" (f32.const infinity) (f32.const -0x1.fffffep+127)) (f32.const -infinity))
-(assert_return (invoke "copysign" (f32.const infinity) (f32.const 0x1.fffffep+127)) (f32.const infinity))
-(assert_return (invoke "copysign" (f32.const -infinity) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "copysign" (f32.const -infinity) (f32.const infinity)) (f32.const infinity))
-(assert_return (invoke "copysign" (f32.const infinity) (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "copysign" (f32.const infinity) (f32.const infinity)) (f32.const infinity))
-(assert_return (invoke "copysign" (f32.const -infinity) (f32.const -nan)) (f32.const -infinity))
-(assert_return (invoke "copysign" (f32.const -infinity) (f32.const nan)) (f32.const infinity))
-(assert_return (invoke "copysign" (f32.const infinity) (f32.const -nan)) (f32.const -infinity))
-(assert_return (invoke "copysign" (f32.const infinity) (f32.const nan)) (f32.const infinity))
-(assert_return_canonical_nan (invoke "copysign" (f32.const -nan) (f32.const -0x0p+0)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const -nan) (f32.const 0x0p+0)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const nan) (f32.const -0x0p+0)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const nan) (f32.const 0x0p+0)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const -nan) (f32.const -0x1p-149)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const -nan) (f32.const 0x1p-149)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const nan) (f32.const -0x1p-149)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const nan) (f32.const 0x1p-149)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const -nan) (f32.const -0x1p-126)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const -nan) (f32.const 0x1p-126)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const nan) (f32.const -0x1p-126)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const nan) (f32.const 0x1p-126)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const -nan) (f32.const -0x1p-1)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const -nan) (f32.const 0x1p-1)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const nan) (f32.const -0x1p-1)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const nan) (f32.const 0x1p-1)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const -nan) (f32.const -0x1p+0)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const -nan) (f32.const 0x1p+0)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const nan) (f32.const -0x1p+0)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const nan) (f32.const 0x1p+0)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const -nan) (f32.const -0x1.921fb6p+2)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const -nan) (f32.const 0x1.921fb6p+2)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const nan) (f32.const -0x1.921fb6p+2)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const nan) (f32.const 0x1.921fb6p+2)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const -nan) (f32.const -0x1.fffffep+127)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const -nan) (f32.const 0x1.fffffep+127)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const nan) (f32.const -0x1.fffffep+127)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const nan) (f32.const 0x1.fffffep+127)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const -nan) (f32.const -infinity)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const -nan) (f32.const infinity)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const nan) (f32.const -infinity)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const nan) (f32.const infinity)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const -nan) (f32.const -nan)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const -nan) (f32.const nan)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const nan) (f32.const -nan)))
-(assert_return_canonical_nan (invoke "copysign" (f32.const nan) (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "max" (f32.const nan:0x200000) (f32.const nan:0x200000)))
 (assert_return (invoke "sqrt" (f32.const -0x0p+0)) (f32.const -0x0p+0))
 (assert_return (invoke "sqrt" (f32.const 0x0p+0)) (f32.const 0x0p+0))
 (assert_return_canonical_nan (invoke "sqrt" (f32.const -0x1p-149)))
@@ -2352,10 +2430,12 @@
 (assert_return (invoke "sqrt" (f32.const 0x1.921fb6p+2)) (f32.const 0x1.40d932p+1))
 (assert_return_canonical_nan (invoke "sqrt" (f32.const -0x1.fffffep+127)))
 (assert_return (invoke "sqrt" (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+63))
-(assert_return_canonical_nan (invoke "sqrt" (f32.const -infinity)))
-(assert_return (invoke "sqrt" (f32.const infinity)) (f32.const infinity))
+(assert_return_canonical_nan (invoke "sqrt" (f32.const -inf)))
+(assert_return (invoke "sqrt" (f32.const inf)) (f32.const inf))
 (assert_return_canonical_nan (invoke "sqrt" (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "sqrt" (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "sqrt" (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "sqrt" (f32.const nan:0x200000)))
 (assert_return (invoke "floor" (f32.const -0x0p+0)) (f32.const -0x0p+0))
 (assert_return (invoke "floor" (f32.const 0x0p+0)) (f32.const 0x0p+0))
 (assert_return (invoke "floor" (f32.const -0x1p-149)) (f32.const -0x1p+0))
@@ -2370,10 +2450,12 @@
 (assert_return (invoke "floor" (f32.const 0x1.921fb6p+2)) (f32.const 0x1.8p+2))
 (assert_return (invoke "floor" (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "floor" (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "floor" (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "floor" (f32.const infinity)) (f32.const infinity))
+(assert_return (invoke "floor" (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "floor" (f32.const inf)) (f32.const inf))
 (assert_return_canonical_nan (invoke "floor" (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "floor" (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "floor" (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "floor" (f32.const nan:0x200000)))
 (assert_return (invoke "ceil" (f32.const -0x0p+0)) (f32.const -0x0p+0))
 (assert_return (invoke "ceil" (f32.const 0x0p+0)) (f32.const 0x0p+0))
 (assert_return (invoke "ceil" (f32.const -0x1p-149)) (f32.const -0x0p+0))
@@ -2388,10 +2470,12 @@
 (assert_return (invoke "ceil" (f32.const 0x1.921fb6p+2)) (f32.const 0x1.cp+2))
 (assert_return (invoke "ceil" (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "ceil" (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "ceil" (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "ceil" (f32.const infinity)) (f32.const infinity))
+(assert_return (invoke "ceil" (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "ceil" (f32.const inf)) (f32.const inf))
 (assert_return_canonical_nan (invoke "ceil" (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "ceil" (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "ceil" (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "ceil" (f32.const nan:0x200000)))
 (assert_return (invoke "trunc" (f32.const -0x0p+0)) (f32.const -0x0p+0))
 (assert_return (invoke "trunc" (f32.const 0x0p+0)) (f32.const 0x0p+0))
 (assert_return (invoke "trunc" (f32.const -0x1p-149)) (f32.const -0x0p+0))
@@ -2406,10 +2490,12 @@
 (assert_return (invoke "trunc" (f32.const 0x1.921fb6p+2)) (f32.const 0x1.8p+2))
 (assert_return (invoke "trunc" (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "trunc" (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "trunc" (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "trunc" (f32.const infinity)) (f32.const infinity))
+(assert_return (invoke "trunc" (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "trunc" (f32.const inf)) (f32.const inf))
 (assert_return_canonical_nan (invoke "trunc" (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "trunc" (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "trunc" (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "trunc" (f32.const nan:0x200000)))
 (assert_return (invoke "nearest" (f32.const -0x0p+0)) (f32.const -0x0p+0))
 (assert_return (invoke "nearest" (f32.const 0x0p+0)) (f32.const 0x0p+0))
 (assert_return (invoke "nearest" (f32.const -0x1p-149)) (f32.const -0x0p+0))
@@ -2424,43 +2510,9 @@
 (assert_return (invoke "nearest" (f32.const 0x1.921fb6p+2)) (f32.const 0x1.8p+2))
 (assert_return (invoke "nearest" (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
 (assert_return (invoke "nearest" (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "nearest" (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "nearest" (f32.const infinity)) (f32.const infinity))
+(assert_return (invoke "nearest" (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "nearest" (f32.const inf)) (f32.const inf))
 (assert_return_canonical_nan (invoke "nearest" (f32.const -nan)))
+(assert_return_arithmetic_nan (invoke "nearest" (f32.const -nan:0x200000)))
 (assert_return_canonical_nan (invoke "nearest" (f32.const nan)))
-(assert_return (invoke "abs" (f32.const -0x0p+0)) (f32.const 0x0p+0))
-(assert_return (invoke "abs" (f32.const 0x0p+0)) (f32.const 0x0p+0))
-(assert_return (invoke "abs" (f32.const -0x1p-149)) (f32.const 0x1p-149))
-(assert_return (invoke "abs" (f32.const 0x1p-149)) (f32.const 0x1p-149))
-(assert_return (invoke "abs" (f32.const -0x1p-126)) (f32.const 0x1p-126))
-(assert_return (invoke "abs" (f32.const 0x1p-126)) (f32.const 0x1p-126))
-(assert_return (invoke "abs" (f32.const -0x1p-1)) (f32.const 0x1p-1))
-(assert_return (invoke "abs" (f32.const 0x1p-1)) (f32.const 0x1p-1))
-(assert_return (invoke "abs" (f32.const -0x1p+0)) (f32.const 0x1p+0))
-(assert_return (invoke "abs" (f32.const 0x1p+0)) (f32.const 0x1p+0))
-(assert_return (invoke "abs" (f32.const -0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))
-(assert_return (invoke "abs" (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))
-(assert_return (invoke "abs" (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "abs" (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "abs" (f32.const -infinity)) (f32.const infinity))
-(assert_return (invoke "abs" (f32.const infinity)) (f32.const infinity))
-(assert_return_canonical_nan (invoke "abs" (f32.const -nan)))
-(assert_return_canonical_nan (invoke "abs" (f32.const nan)))
-(assert_return (invoke "neg" (f32.const -0x0p+0)) (f32.const 0x0p+0))
-(assert_return (invoke "neg" (f32.const 0x0p+0)) (f32.const -0x0p+0))
-(assert_return (invoke "neg" (f32.const -0x1p-149)) (f32.const 0x1p-149))
-(assert_return (invoke "neg" (f32.const 0x1p-149)) (f32.const -0x1p-149))
-(assert_return (invoke "neg" (f32.const -0x1p-126)) (f32.const 0x1p-126))
-(assert_return (invoke "neg" (f32.const 0x1p-126)) (f32.const -0x1p-126))
-(assert_return (invoke "neg" (f32.const -0x1p-1)) (f32.const 0x1p-1))
-(assert_return (invoke "neg" (f32.const 0x1p-1)) (f32.const -0x1p-1))
-(assert_return (invoke "neg" (f32.const -0x1p+0)) (f32.const 0x1p+0))
-(assert_return (invoke "neg" (f32.const 0x1p+0)) (f32.const -0x1p+0))
-(assert_return (invoke "neg" (f32.const -0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))
-(assert_return (invoke "neg" (f32.const 0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))
-(assert_return (invoke "neg" (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
-(assert_return (invoke "neg" (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
-(assert_return (invoke "neg" (f32.const -infinity)) (f32.const infinity))
-(assert_return (invoke "neg" (f32.const infinity)) (f32.const -infinity))
-(assert_return_canonical_nan (invoke "neg" (f32.const -nan)))
-(assert_return_canonical_nan (invoke "neg" (f32.const nan)))
+(assert_return_arithmetic_nan (invoke "nearest" (f32.const nan:0x200000)))
diff --git a/test/WasmSpec/testsuite/core/f32_bitwise.wast b/test/WasmSpec/testsuite/core/f32_bitwise.wast
new file mode 100644
index 0000000..12bdb86
--- /dev/null
+++ b/test/WasmSpec/testsuite/core/f32_bitwise.wast
@@ -0,0 +1,369 @@
+;; Test all the f32 bitwise operators on major boundary values and all special
+;; values.
+
+(module
+  (func (export "abs") (param $x f32) (result f32) (f32.abs (get_local $x)))
+  (func (export "neg") (param $x f32) (result f32) (f32.neg (get_local $x)))
+  (func (export "copysign") (param $x f32) (param $y f32) (result f32) (f32.copysign (get_local $x) (get_local $y)))
+)
+
+(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const -0x0p+0)) (f32.const -0x0p+0))
+(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const 0x0p+0)) (f32.const 0x0p+0))
+(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const -0x0p+0)) (f32.const -0x0p+0))
+(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const 0x0p+0)) (f32.const 0x0p+0))
+(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const -0x1p-149)) (f32.const -0x0p+0))
+(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const 0x1p-149)) (f32.const 0x0p+0))
+(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const -0x1p-149)) (f32.const -0x0p+0))
+(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const 0x1p-149)) (f32.const 0x0p+0))
+(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const -0x1p-126)) (f32.const -0x0p+0))
+(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const 0x1p-126)) (f32.const 0x0p+0))
+(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const -0x1p-126)) (f32.const -0x0p+0))
+(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const 0x1p-126)) (f32.const 0x0p+0))
+(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const -0x1p-1)) (f32.const -0x0p+0))
+(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const 0x1p-1)) (f32.const 0x0p+0))
+(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const -0x1p-1)) (f32.const -0x0p+0))
+(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const 0x1p-1)) (f32.const 0x0p+0))
+(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const -0x1p+0)) (f32.const -0x0p+0))
+(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const 0x1p+0)) (f32.const 0x0p+0))
+(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const -0x1p+0)) (f32.const -0x0p+0))
+(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const 0x1p+0)) (f32.const 0x0p+0))
+(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x0p+0))
+(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x0p+0))
+(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x0p+0))
+(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x0p+0))
+(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x0p+0))
+(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x0p+0))
+(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x0p+0))
+(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x0p+0))
+(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const -inf)) (f32.const -0x0p+0))
+(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const inf)) (f32.const 0x0p+0))
+(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const -inf)) (f32.const -0x0p+0))
+(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const inf)) (f32.const 0x0p+0))
+(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const -nan)) (f32.const -0x0p+0))
+(assert_return (invoke "copysign" (f32.const -0x0p+0) (f32.const nan)) (f32.const 0x0p+0))
+(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const -nan)) (f32.const -0x0p+0))
+(assert_return (invoke "copysign" (f32.const 0x0p+0) (f32.const nan)) (f32.const 0x0p+0))
+(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const -0x0p+0)) (f32.const -0x1p-149))
+(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const 0x0p+0)) (f32.const 0x1p-149))
+(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const -0x0p+0)) (f32.const -0x1p-149))
+(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const 0x0p+0)) (f32.const 0x1p-149))
+(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const -0x1p-149)) (f32.const -0x1p-149))
+(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const 0x1p-149)) (f32.const 0x1p-149))
+(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const -0x1p-149)) (f32.const -0x1p-149))
+(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const 0x1p-149)) (f32.const 0x1p-149))
+(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const -0x1p-126)) (f32.const -0x1p-149))
+(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const 0x1p-126)) (f32.const 0x1p-149))
+(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const -0x1p-126)) (f32.const -0x1p-149))
+(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const 0x1p-126)) (f32.const 0x1p-149))
+(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const -0x1p-1)) (f32.const -0x1p-149))
+(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const 0x1p-1)) (f32.const 0x1p-149))
+(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const -0x1p-1)) (f32.const -0x1p-149))
+(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const 0x1p-1)) (f32.const 0x1p-149))
+(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const -0x1p+0)) (f32.const -0x1p-149))
+(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const 0x1p+0)) (f32.const 0x1p-149))
+(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const -0x1p+0)) (f32.const -0x1p-149))
+(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const 0x1p+0)) (f32.const 0x1p-149))
+(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p-149))
+(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p-149))
+(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p-149))
+(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p-149))
+(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-149))
+(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-149))
+(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-149))
+(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-149))
+(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const -inf)) (f32.const -0x1p-149))
+(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const inf)) (f32.const 0x1p-149))
+(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const -inf)) (f32.const -0x1p-149))
+(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const inf)) (f32.const 0x1p-149))
+(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const -nan)) (f32.const -0x1p-149))
+(assert_return (invoke "copysign" (f32.const -0x1p-149) (f32.const nan)) (f32.const 0x1p-149))
+(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const -nan)) (f32.const -0x1p-149))
+(assert_return (invoke "copysign" (f32.const 0x1p-149) (f32.const nan)) (f32.const 0x1p-149))
+(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const -0x0p+0)) (f32.const -0x1p-126))
+(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const 0x0p+0)) (f32.const 0x1p-126))
+(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const -0x0p+0)) (f32.const -0x1p-126))
+(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const 0x0p+0)) (f32.const 0x1p-126))
+(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const -0x1p-149)) (f32.const -0x1p-126))
+(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const 0x1p-149)) (f32.const 0x1p-126))
+(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const -0x1p-149)) (f32.const -0x1p-126))
+(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const 0x1p-149)) (f32.const 0x1p-126))
+(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const -0x1p-126)) (f32.const -0x1p-126))
+(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const 0x1p-126)) (f32.const 0x1p-126))
+(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const -0x1p-126)) (f32.const -0x1p-126))
+(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const 0x1p-126)) (f32.const 0x1p-126))
+(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const -0x1p-1)) (f32.const -0x1p-126))
+(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const 0x1p-1)) (f32.const 0x1p-126))
+(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const -0x1p-1)) (f32.const -0x1p-126))
+(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const 0x1p-1)) (f32.const 0x1p-126))
+(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const -0x1p+0)) (f32.const -0x1p-126))
+(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const 0x1p+0)) (f32.const 0x1p-126))
+(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const -0x1p+0)) (f32.const -0x1p-126))
+(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const 0x1p+0)) (f32.const 0x1p-126))
+(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p-126))
+(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p-126))
+(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p-126))
+(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p-126))
+(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-126))
+(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-126))
+(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-126))
+(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-126))
+(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const -inf)) (f32.const -0x1p-126))
+(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const inf)) (f32.const 0x1p-126))
+(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const -inf)) (f32.const -0x1p-126))
+(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const inf)) (f32.const 0x1p-126))
+(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const -nan)) (f32.const -0x1p-126))
+(assert_return (invoke "copysign" (f32.const -0x1p-126) (f32.const nan)) (f32.const 0x1p-126))
+(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const -nan)) (f32.const -0x1p-126))
+(assert_return (invoke "copysign" (f32.const 0x1p-126) (f32.const nan)) (f32.const 0x1p-126))
+(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const -0x0p+0)) (f32.const -0x1p-1))
+(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const 0x0p+0)) (f32.const 0x1p-1))
+(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const -0x0p+0)) (f32.const -0x1p-1))
+(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const 0x0p+0)) (f32.const 0x1p-1))
+(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const -0x1p-149)) (f32.const -0x1p-1))
+(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const 0x1p-149)) (f32.const 0x1p-1))
+(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const -0x1p-149)) (f32.const -0x1p-1))
+(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const 0x1p-149)) (f32.const 0x1p-1))
+(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const -0x1p-126)) (f32.const -0x1p-1))
+(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const 0x1p-126)) (f32.const 0x1p-1))
+(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const -0x1p-126)) (f32.const -0x1p-1))
+(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const 0x1p-126)) (f32.const 0x1p-1))
+(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const -0x1p-1)) (f32.const -0x1p-1))
+(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const 0x1p-1)) (f32.const 0x1p-1))
+(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const -0x1p-1)) (f32.const -0x1p-1))
+(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const 0x1p-1)) (f32.const 0x1p-1))
+(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const -0x1p+0)) (f32.const -0x1p-1))
+(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const 0x1p+0)) (f32.const 0x1p-1))
+(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const -0x1p+0)) (f32.const -0x1p-1))
+(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const 0x1p+0)) (f32.const 0x1p-1))
+(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p-1))
+(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p-1))
+(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p-1))
+(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p-1))
+(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-1))
+(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-1))
+(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (f32.const -0x1p-1))
+(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (f32.const 0x1p-1))
+(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const -inf)) (f32.const -0x1p-1))
+(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const inf)) (f32.const 0x1p-1))
+(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const -inf)) (f32.const -0x1p-1))
+(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const inf)) (f32.const 0x1p-1))
+(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const -nan)) (f32.const -0x1p-1))
+(assert_return (invoke "copysign" (f32.const -0x1p-1) (f32.const nan)) (f32.const 0x1p-1))
+(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const -nan)) (f32.const -0x1p-1))
+(assert_return (invoke "copysign" (f32.const 0x1p-1) (f32.const nan)) (f32.const 0x1p-1))
+(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const -0x0p+0)) (f32.const -0x1p+0))
+(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const 0x0p+0)) (f32.const 0x1p+0))
+(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const -0x0p+0)) (f32.const -0x1p+0))
+(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const 0x0p+0)) (f32.const 0x1p+0))
+(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const -0x1p-149)) (f32.const -0x1p+0))
+(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const 0x1p-149)) (f32.const 0x1p+0))
+(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const -0x1p-149)) (f32.const -0x1p+0))
+(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const 0x1p-149)) (f32.const 0x1p+0))
+(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const -0x1p-126)) (f32.const -0x1p+0))
+(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const 0x1p-126)) (f32.const 0x1p+0))
+(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const -0x1p-126)) (f32.const -0x1p+0))
+(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const 0x1p-126)) (f32.const 0x1p+0))
+(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const -0x1p-1)) (f32.const -0x1p+0))
+(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const 0x1p-1)) (f32.const 0x1p+0))
+(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const -0x1p-1)) (f32.const -0x1p+0))
+(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const 0x1p-1)) (f32.const 0x1p+0))
+(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const -0x1p+0)) (f32.const -0x1p+0))
+(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const 0x1p+0)) (f32.const 0x1p+0))
+(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const -0x1p+0)) (f32.const -0x1p+0))
+(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const 0x1p+0)) (f32.const 0x1p+0))
+(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p+0))
+(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p+0))
+(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const -0x1.921fb6p+2)) (f32.const -0x1p+0))
+(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const 0x1.921fb6p+2)) (f32.const 0x1p+0))
+(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1p+0))
+(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1p+0))
+(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (f32.const -0x1p+0))
+(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (f32.const 0x1p+0))
+(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const -inf)) (f32.const -0x1p+0))
+(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const inf)) (f32.const 0x1p+0))
+(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const -inf)) (f32.const -0x1p+0))
+(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const inf)) (f32.const 0x1p+0))
+(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const -nan)) (f32.const -0x1p+0))
+(assert_return (invoke "copysign" (f32.const -0x1p+0) (f32.const nan)) (f32.const 0x1p+0))
+(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const -nan)) (f32.const -0x1p+0))
+(assert_return (invoke "copysign" (f32.const 0x1p+0) (f32.const nan)) (f32.const 0x1p+0))
+(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const -0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const 0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (f32.const -0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const 0x0p+0)) (f32.const 0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const -0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const 0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-149)) (f32.const -0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-149)) (f32.const 0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const -0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const 0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-126)) (f32.const -0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-126)) (f32.const 0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const -0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const 0x1p-1)) (f32.const 0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const -0x1p-1)) (f32.const -0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const 0x1p-1)) (f32.const 0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const -0x1p+0)) (f32.const -0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const 0x1p+0)) (f32.const 0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const -0x1p+0)) (f32.const -0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const 0x1p+0)) (f32.const 0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const -0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const 0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (f32.const -0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (f32.const 0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const -inf)) (f32.const -0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const inf)) (f32.const 0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const -inf)) (f32.const -0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const inf)) (f32.const 0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const -nan)) (f32.const -0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const -0x1.921fb6p+2) (f32.const nan)) (f32.const 0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const -nan)) (f32.const -0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const 0x1.921fb6p+2) (f32.const nan)) (f32.const 0x1.921fb6p+2))
+(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const -0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const 0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (f32.const -0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const 0x0p+0)) (f32.const 0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const -0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const 0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const -0x1p-149)) (f32.const -0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const 0x1p-149)) (f32.const 0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const -0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const 0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const -0x1p-126)) (f32.const -0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const 0x1p-126)) (f32.const 0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const -0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const 0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const -0x1p-1)) (f32.const -0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const 0x1p-1)) (f32.const 0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const -0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const 0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const -0x1p+0)) (f32.const -0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const 0x1p+0)) (f32.const 0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const -0x1.921fb6p+2)) (f32.const -0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const 0x1.921fb6p+2)) (f32.const 0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const -inf)) (f32.const -0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const inf)) (f32.const 0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const -inf)) (f32.const -0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const inf)) (f32.const 0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const -nan)) (f32.const -0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const -0x1.fffffep+127) (f32.const nan)) (f32.const 0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const -nan)) (f32.const -0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const 0x1.fffffep+127) (f32.const nan)) (f32.const 0x1.fffffep+127))
+(assert_return (invoke "copysign" (f32.const -inf) (f32.const -0x0p+0)) (f32.const -inf))
+(assert_return (invoke "copysign" (f32.const -inf) (f32.const 0x0p+0)) (f32.const inf))
+(assert_return (invoke "copysign" (f32.const inf) (f32.const -0x0p+0)) (f32.const -inf))
+(assert_return (invoke "copysign" (f32.const inf) (f32.const 0x0p+0)) (f32.const inf))
+(assert_return (invoke "copysign" (f32.const -inf) (f32.const -0x1p-149)) (f32.const -inf))
+(assert_return (invoke "copysign" (f32.const -inf) (f32.const 0x1p-149)) (f32.const inf))
+(assert_return (invoke "copysign" (f32.const inf) (f32.const -0x1p-149)) (f32.const -inf))
+(assert_return (invoke "copysign" (f32.const inf) (f32.const 0x1p-149)) (f32.const inf))
+(assert_return (invoke "copysign" (f32.const -inf) (f32.const -0x1p-126)) (f32.const -inf))
+(assert_return (invoke "copysign" (f32.const -inf) (f32.const 0x1p-126)) (f32.const inf))
+(assert_return (invoke "copysign" (f32.const inf) (f32.const -0x1p-126)) (f32.const -inf))
+(assert_return (invoke "copysign" (f32.const inf) (f32.const 0x1p-126)) (f32.const inf))
+(assert_return (invoke "copysign" (f32.const -inf) (f32.const -0x1p-1)) (f32.const -inf))
+(assert_return (invoke "copysign" (f32.const -inf) (f32.const 0x1p-1)) (f32.const inf))
+(assert_return (invoke "copysign" (f32.const inf) (f32.const -0x1p-1)) (f32.const -inf))
+(assert_return (invoke "copysign" (f32.const inf) (f32.const 0x1p-1)) (f32.const inf))
+(assert_return (invoke "copysign" (f32.const -inf) (f32.const -0x1p+0)) (f32.const -inf))
+(assert_return (invoke "copysign" (f32.const -inf) (f32.const 0x1p+0)) (f32.const inf))
+(assert_return (invoke "copysign" (f32.const inf) (f32.const -0x1p+0)) (f32.const -inf))
+(assert_return (invoke "copysign" (f32.const inf) (f32.const 0x1p+0)) (f32.const inf))
+(assert_return (invoke "copysign" (f32.const -inf) (f32.const -0x1.921fb6p+2)) (f32.const -inf))
+(assert_return (invoke "copysign" (f32.const -inf) (f32.const 0x1.921fb6p+2)) (f32.const inf))
+(assert_return (invoke "copysign" (f32.const inf) (f32.const -0x1.921fb6p+2)) (f32.const -inf))
+(assert_return (invoke "copysign" (f32.const inf) (f32.const 0x1.921fb6p+2)) (f32.const inf))
+(assert_return (invoke "copysign" (f32.const -inf) (f32.const -0x1.fffffep+127)) (f32.const -inf))
+(assert_return (invoke "copysign" (f32.const -inf) (f32.const 0x1.fffffep+127)) (f32.const inf))
+(assert_return (invoke "copysign" (f32.const inf) (f32.const -0x1.fffffep+127)) (f32.const -inf))
+(assert_return (invoke "copysign" (f32.const inf) (f32.const 0x1.fffffep+127)) (f32.const inf))
+(assert_return (invoke "copysign" (f32.const -inf) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "copysign" (f32.const -inf) (f32.const inf)) (f32.const inf))
+(assert_return (invoke "copysign" (f32.const inf) (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "copysign" (f32.const inf) (f32.const inf)) (f32.const inf))
+(assert_return (invoke "copysign" (f32.const -inf) (f32.const -nan)) (f32.const -inf))
+(assert_return (invoke "copysign" (f32.const -inf) (f32.const nan)) (f32.const inf))
+(assert_return (invoke "copysign" (f32.const inf) (f32.const -nan)) (f32.const -inf))
+(assert_return (invoke "copysign" (f32.const inf) (f32.const nan)) (f32.const inf))
+(assert_return (invoke "copysign" (f32.const -nan) (f32.const -0x0p+0)) (f32.const -nan))
+(assert_return (invoke "copysign" (f32.const -nan) (f32.const 0x0p+0)) (f32.const nan))
+(assert_return (invoke "copysign" (f32.const nan) (f32.const -0x0p+0)) (f32.const -nan))
+(assert_return (invoke "copysign" (f32.const nan) (f32.const 0x0p+0)) (f32.const nan))
+(assert_return (invoke "copysign" (f32.const -nan) (f32.const -0x1p-149)) (f32.const -nan))
+(assert_return (invoke "copysign" (f32.const -nan) (f32.const 0x1p-149)) (f32.const nan))
+(assert_return (invoke "copysign" (f32.const nan) (f32.const -0x1p-149)) (f32.const -nan))
+(assert_return (invoke "copysign" (f32.const nan) (f32.const 0x1p-149)) (f32.const nan))
+(assert_return (invoke "copysign" (f32.const -nan) (f32.const -0x1p-126)) (f32.const -nan))
+(assert_return (invoke "copysign" (f32.const -nan) (f32.const 0x1p-126)) (f32.const nan))
+(assert_return (invoke "copysign" (f32.const nan) (f32.const -0x1p-126)) (f32.const -nan))
+(assert_return (invoke "copysign" (f32.const nan) (f32.const 0x1p-126)) (f32.const nan))
+(assert_return (invoke "copysign" (f32.const -nan) (f32.const -0x1p-1)) (f32.const -nan))
+(assert_return (invoke "copysign" (f32.const -nan) (f32.const 0x1p-1)) (f32.const nan))
+(assert_return (invoke "copysign" (f32.const nan) (f32.const -0x1p-1)) (f32.const -nan))
+(assert_return (invoke "copysign" (f32.const nan) (f32.const 0x1p-1)) (f32.const nan))
+(assert_return (invoke "copysign" (f32.const -nan) (f32.const -0x1p+0)) (f32.const -nan))
+(assert_return (invoke "copysign" (f32.const -nan) (f32.const 0x1p+0)) (f32.const nan))
+(assert_return (invoke "copysign" (f32.const nan) (f32.const -0x1p+0)) (f32.const -nan))
+(assert_return (invoke "copysign" (f32.const nan) (f32.const 0x1p+0)) (f32.const nan))
+(assert_return (invoke "copysign" (f32.const -nan) (f32.const -0x1.921fb6p+2)) (f32.const -nan))
+(assert_return (invoke "copysign" (f32.const -nan) (f32.const 0x1.921fb6p+2)) (f32.const nan))
+(assert_return (invoke "copysign" (f32.const nan) (f32.const -0x1.921fb6p+2)) (f32.const -nan))
+(assert_return (invoke "copysign" (f32.const nan) (f32.const 0x1.921fb6p+2)) (f32.const nan))
+(assert_return (invoke "copysign" (f32.const -nan) (f32.const -0x1.fffffep+127)) (f32.const -nan))
+(assert_return (invoke "copysign" (f32.const -nan) (f32.const 0x1.fffffep+127)) (f32.const nan))
+(assert_return (invoke "copysign" (f32.const nan) (f32.const -0x1.fffffep+127)) (f32.const -nan))
+(assert_return (invoke "copysign" (f32.const nan) (f32.const 0x1.fffffep+127)) (f32.const nan))
+(assert_return (invoke "copysign" (f32.const -nan) (f32.const -inf)) (f32.const -nan))
+(assert_return (invoke "copysign" (f32.const -nan) (f32.const inf)) (f32.const nan))
+(assert_return (invoke "copysign" (f32.const nan) (f32.const -inf)) (f32.const -nan))
+(assert_return (invoke "copysign" (f32.const nan) (f32.const inf)) (f32.const nan))
+(assert_return (invoke "copysign" (f32.const -nan) (f32.const -nan)) (f32.const -nan))
+(assert_return (invoke "copysign" (f32.const -nan) (f32.const nan)) (f32.const nan))
+(assert_return (invoke "copysign" (f32.const nan) (f32.const -nan)) (f32.const -nan))
+(assert_return (invoke "copysign" (f32.const nan) (f32.const nan)) (f32.const nan))
+(assert_return (invoke "abs" (f32.const -0x0p+0)) (f32.const 0x0p+0))
+(assert_return (invoke "abs" (f32.const 0x0p+0)) (f32.const 0x0p+0))
+(assert_return (invoke "abs" (f32.const -0x1p-149)) (f32.const 0x1p-149))
+(assert_return (invoke "abs" (f32.const 0x1p-149)) (f32.const 0x1p-149))
+(assert_return (invoke "abs" (f32.const -0x1p-126)) (f32.const 0x1p-126))
+(assert_return (invoke "abs" (f32.const 0x1p-126)) (f32.const 0x1p-126))
+(assert_return (invoke "abs" (f32.const -0x1p-1)) (f32.const 0x1p-1))
+(assert_return (invoke "abs" (f32.const 0x1p-1)) (f32.const 0x1p-1))
+(assert_return (invoke "abs" (f32.const -0x1p+0)) (f32.const 0x1p+0))
+(assert_return (invoke "abs" (f32.const 0x1p+0)) (f32.const 0x1p+0))
+(assert_return (invoke "abs" (f32.const -0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))
+(assert_return (invoke "abs" (f32.const 0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))
+(assert_return (invoke "abs" (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
+(assert_return (invoke "abs" (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
+(assert_return (invoke "abs" (f32.const -inf)) (f32.const inf))
+(assert_return (invoke "abs" (f32.const inf)) (f32.const inf))
+(assert_return (invoke "abs" (f32.const -nan)) (f32.const nan))
+(assert_return (invoke "abs" (f32.const nan)) (f32.const nan))
+(assert_return (invoke "neg" (f32.const -0x0p+0)) (f32.const 0x0p+0))
+(assert_return (invoke "neg" (f32.const 0x0p+0)) (f32.const -0x0p+0))
+(assert_return (invoke "neg" (f32.const -0x1p-149)) (f32.const 0x1p-149))
+(assert_return (invoke "neg" (f32.const 0x1p-149)) (f32.const -0x1p-149))
+(assert_return (invoke "neg" (f32.const -0x1p-126)) (f32.const 0x1p-126))
+(assert_return (invoke "neg" (f32.const 0x1p-126)) (f32.const -0x1p-126))
+(assert_return (invoke "neg" (f32.const -0x1p-1)) (f32.const 0x1p-1))
+(assert_return (invoke "neg" (f32.const 0x1p-1)) (f32.const -0x1p-1))
+(assert_return (invoke "neg" (f32.const -0x1p+0)) (f32.const 0x1p+0))
+(assert_return (invoke "neg" (f32.const 0x1p+0)) (f32.const -0x1p+0))
+(assert_return (invoke "neg" (f32.const -0x1.921fb6p+2)) (f32.const 0x1.921fb6p+2))
+(assert_return (invoke "neg" (f32.const 0x1.921fb6p+2)) (f32.const -0x1.921fb6p+2))
+(assert_return (invoke "neg" (f32.const -0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
+(assert_return (invoke "neg" (f32.const 0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
+(assert_return (invoke "neg" (f32.const -inf)) (f32.const inf))
+(assert_return (invoke "neg" (f32.const inf)) (f32.const -inf))
+(assert_return (invoke "neg" (f32.const -nan)) (f32.const nan))
+(assert_return (invoke "neg" (f32.const nan)) (f32.const -nan))
diff --git a/test/WasmSpec/testsuite/core/f32_cmp.wast b/test/WasmSpec/testsuite/core/f32_cmp.wast
index 9458069..5bae18b 100644
--- a/test/WasmSpec/testsuite/core/f32_cmp.wast
+++ b/test/WasmSpec/testsuite/core/f32_cmp.wast
@@ -38,14 +38,18 @@
 (assert_return (invoke "eq" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const -0x0p+0) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const -0x0p+0) (f32.const infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const 0x0p+0) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const 0x0p+0) (f32.const infinity)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -0x0p+0) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -0x0p+0) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const 0x0p+0) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const 0x0p+0) (f32.const inf)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -0x0p+0) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -0x0p+0) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -0x0p+0) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -0x0p+0) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x0p+0) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const 0x0p+0) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x0p+0) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const 0x0p+0) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -0x1p-149) (f32.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -0x1p-149) (f32.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x1p-149) (f32.const -0x0p+0)) (i32.const 0))
@@ -74,14 +78,18 @@
 (assert_return (invoke "eq" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const -0x1p-149) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const -0x1p-149) (f32.const infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const 0x1p-149) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const 0x1p-149) (f32.const infinity)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -0x1p-149) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -0x1p-149) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const 0x1p-149) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const 0x1p-149) (f32.const inf)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -0x1p-149) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -0x1p-149) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -0x1p-149) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -0x1p-149) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x1p-149) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const 0x1p-149) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x1p-149) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const 0x1p-149) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -0x1p-126) (f32.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -0x1p-126) (f32.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x1p-126) (f32.const -0x0p+0)) (i32.const 0))
@@ -110,14 +118,18 @@
 (assert_return (invoke "eq" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const -0x1p-126) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const -0x1p-126) (f32.const infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const 0x1p-126) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const 0x1p-126) (f32.const infinity)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -0x1p-126) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -0x1p-126) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const 0x1p-126) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const 0x1p-126) (f32.const inf)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -0x1p-126) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -0x1p-126) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -0x1p-126) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -0x1p-126) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x1p-126) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const 0x1p-126) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x1p-126) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const 0x1p-126) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -0x1p-1) (f32.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -0x1p-1) (f32.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x1p-1) (f32.const -0x0p+0)) (i32.const 0))
@@ -146,14 +158,18 @@
 (assert_return (invoke "eq" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const -0x1p-1) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const -0x1p-1) (f32.const infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const 0x1p-1) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const 0x1p-1) (f32.const infinity)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -0x1p-1) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -0x1p-1) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const 0x1p-1) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const 0x1p-1) (f32.const inf)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -0x1p-1) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -0x1p-1) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -0x1p-1) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -0x1p-1) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x1p-1) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const 0x1p-1) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x1p-1) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const 0x1p-1) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -0x1p+0) (f32.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -0x1p+0) (f32.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x1p+0) (f32.const -0x0p+0)) (i32.const 0))
@@ -182,14 +198,18 @@
 (assert_return (invoke "eq" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const -0x1p+0) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const -0x1p+0) (f32.const infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const 0x1p+0) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const 0x1p+0) (f32.const infinity)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -0x1p+0) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -0x1p+0) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const 0x1p+0) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const 0x1p+0) (f32.const inf)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -0x1p+0) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -0x1p+0) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -0x1p+0) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -0x1p+0) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x1p+0) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const 0x1p+0) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x1p+0) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const 0x1p+0) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 0))
@@ -218,14 +238,18 @@
 (assert_return (invoke "eq" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const -0x1.921fb6p+2) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const -0x1.921fb6p+2) (f32.const infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const 0x1.921fb6p+2) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const 0x1.921fb6p+2) (f32.const infinity)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -0x1.921fb6p+2) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -0x1.921fb6p+2) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const 0x1.921fb6p+2) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const 0x1.921fb6p+2) (f32.const inf)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -0x1.921fb6p+2) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -0x1.921fb6p+2) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -0x1.921fb6p+2) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -0x1.921fb6p+2) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x1.921fb6p+2) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const 0x1.921fb6p+2) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x1.921fb6p+2) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const 0x1.921fb6p+2) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 0))
@@ -254,86 +278,138 @@
 (assert_return (invoke "eq" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "eq" (f32.const -0x1.fffffep+127) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const -0x1.fffffep+127) (f32.const infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const 0x1.fffffep+127) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const 0x1.fffffep+127) (f32.const infinity)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -0x1.fffffep+127) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -0x1.fffffep+127) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const 0x1.fffffep+127) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const 0x1.fffffep+127) (f32.const inf)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -0x1.fffffep+127) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -0x1.fffffep+127) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -0x1.fffffep+127) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -0x1.fffffep+127) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x1.fffffep+127) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const 0x1.fffffep+127) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const 0x1.fffffep+127) (f32.const nan)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const -infinity) (f32.const -0x0p+0)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const -infinity) (f32.const 0x0p+0)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const infinity) (f32.const -0x0p+0)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const infinity) (f32.const 0x0p+0)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const -infinity) (f32.const -0x1p-149)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const -infinity) (f32.const 0x1p-149)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const infinity) (f32.const -0x1p-149)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const infinity) (f32.const 0x1p-149)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const -infinity) (f32.const -0x1p-126)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const -infinity) (f32.const 0x1p-126)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const infinity) (f32.const -0x1p-126)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const infinity) (f32.const 0x1p-126)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const -infinity) (f32.const -0x1p-1)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const -infinity) (f32.const 0x1p-1)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const infinity) (f32.const -0x1p-1)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const infinity) (f32.const 0x1p-1)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const -infinity) (f32.const -0x1p+0)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const -infinity) (f32.const 0x1p+0)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const infinity) (f32.const -0x1p+0)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const infinity) (f32.const 0x1p+0)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const -infinity) (f32.const -0x1.921fb6p+2)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const -infinity) (f32.const 0x1.921fb6p+2)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const infinity) (f32.const -0x1.921fb6p+2)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const infinity) (f32.const 0x1.921fb6p+2)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const -infinity) (f32.const -0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const -infinity) (f32.const 0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const infinity) (f32.const -0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const infinity) (f32.const 0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const -infinity) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "eq" (f32.const -infinity) (f32.const infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const infinity) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const infinity) (f32.const infinity)) (i32.const 1))
-(assert_return (invoke "eq" (f32.const -infinity) (f32.const -nan)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const -infinity) (f32.const nan)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const infinity) (f32.const -nan)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const infinity) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const 0x1.fffffep+127) (f32.const nan:0x200000)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -inf) (f32.const -0x0p+0)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -inf) (f32.const 0x0p+0)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const inf) (f32.const -0x0p+0)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const inf) (f32.const 0x0p+0)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -inf) (f32.const -0x1p-149)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -inf) (f32.const 0x1p-149)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const inf) (f32.const -0x1p-149)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const inf) (f32.const 0x1p-149)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -inf) (f32.const -0x1p-126)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -inf) (f32.const 0x1p-126)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const inf) (f32.const -0x1p-126)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const inf) (f32.const 0x1p-126)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -inf) (f32.const -0x1p-1)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -inf) (f32.const 0x1p-1)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const inf) (f32.const -0x1p-1)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const inf) (f32.const 0x1p-1)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -inf) (f32.const -0x1p+0)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -inf) (f32.const 0x1p+0)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const inf) (f32.const -0x1p+0)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const inf) (f32.const 0x1p+0)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -inf) (f32.const -0x1.921fb6p+2)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -inf) (f32.const 0x1.921fb6p+2)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const inf) (f32.const -0x1.921fb6p+2)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const inf) (f32.const 0x1.921fb6p+2)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -inf) (f32.const -0x1.fffffep+127)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -inf) (f32.const 0x1.fffffep+127)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const inf) (f32.const -0x1.fffffep+127)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const inf) (f32.const 0x1.fffffep+127)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -inf) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "eq" (f32.const -inf) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const inf) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const inf) (f32.const inf)) (i32.const 1))
+(assert_return (invoke "eq" (f32.const -inf) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -inf) (f32.const -nan:0x200000)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -inf) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -inf) (f32.const nan:0x200000)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const inf) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const inf) (f32.const -nan:0x200000)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const inf) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const inf) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -nan) (f32.const -0x0p+0)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -nan:0x200000) (f32.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -nan) (f32.const 0x0p+0)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -nan:0x200000) (f32.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const nan) (f32.const -0x0p+0)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const nan:0x200000) (f32.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const nan) (f32.const 0x0p+0)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const nan:0x200000) (f32.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -nan) (f32.const -0x1p-149)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -nan:0x200000) (f32.const -0x1p-149)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -nan) (f32.const 0x1p-149)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -nan:0x200000) (f32.const 0x1p-149)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const nan) (f32.const -0x1p-149)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const nan:0x200000) (f32.const -0x1p-149)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const nan) (f32.const 0x1p-149)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const nan:0x200000) (f32.const 0x1p-149)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -nan) (f32.const -0x1p-126)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -nan:0x200000) (f32.const -0x1p-126)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -nan) (f32.const 0x1p-126)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -nan:0x200000) (f32.const 0x1p-126)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const nan) (f32.const -0x1p-126)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const nan:0x200000) (f32.const -0x1p-126)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const nan) (f32.const 0x1p-126)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const nan:0x200000) (f32.const 0x1p-126)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -nan) (f32.const -0x1p-1)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -nan:0x200000) (f32.const -0x1p-1)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -nan) (f32.const 0x1p-1)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -nan:0x200000) (f32.const 0x1p-1)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const nan) (f32.const -0x1p-1)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const nan:0x200000) (f32.const -0x1p-1)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const nan) (f32.const 0x1p-1)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const nan:0x200000) (f32.const 0x1p-1)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -nan) (f32.const -0x1p+0)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -nan:0x200000) (f32.const -0x1p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -nan) (f32.const 0x1p+0)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -nan:0x200000) (f32.const 0x1p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const nan) (f32.const -0x1p+0)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const nan:0x200000) (f32.const -0x1p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const nan) (f32.const 0x1p+0)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const nan:0x200000) (f32.const 0x1p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -nan) (f32.const -0x1.921fb6p+2)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -nan:0x200000) (f32.const -0x1.921fb6p+2)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -nan) (f32.const 0x1.921fb6p+2)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -nan:0x200000) (f32.const 0x1.921fb6p+2)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const nan) (f32.const -0x1.921fb6p+2)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const nan:0x200000) (f32.const -0x1.921fb6p+2)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const nan) (f32.const 0x1.921fb6p+2)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const nan:0x200000) (f32.const 0x1.921fb6p+2)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -nan) (f32.const -0x1.fffffep+127)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -nan:0x200000) (f32.const -0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -nan) (f32.const 0x1.fffffep+127)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -nan:0x200000) (f32.const 0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const nan) (f32.const -0x1.fffffep+127)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const nan:0x200000) (f32.const -0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const nan) (f32.const 0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const -nan) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const -nan) (f32.const infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const nan) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f32.const nan) (f32.const infinity)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const nan:0x200000) (f32.const 0x1.fffffep+127)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -nan) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -nan:0x200000) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -nan) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -nan:0x200000) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const nan) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const nan:0x200000) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const nan) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const nan:0x200000) (f32.const inf)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -nan) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -nan:0x200000) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -nan) (f32.const -nan:0x200000)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -nan:0x200000) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const -nan) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -nan:0x200000) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -nan) (f32.const nan:0x200000)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const -nan:0x200000) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const nan) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const nan:0x200000) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const nan) (f32.const -nan:0x200000)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const nan:0x200000) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "eq" (f32.const nan) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const nan:0x200000) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const nan) (f32.const nan:0x200000)) (i32.const 0))
+(assert_return (invoke "eq" (f32.const nan:0x200000) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "ne" (f32.const -0x0p+0) (f32.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "ne" (f32.const -0x0p+0) (f32.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "ne" (f32.const 0x0p+0) (f32.const -0x0p+0)) (i32.const 0))
@@ -362,14 +438,18 @@
 (assert_return (invoke "ne" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const -0x0p+0) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const -0x0p+0) (f32.const infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const 0x0p+0) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const 0x0p+0) (f32.const infinity)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -0x0p+0) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -0x0p+0) (f32.const inf)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const 0x0p+0) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const 0x0p+0) (f32.const inf)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -0x0p+0) (f32.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -0x0p+0) (f32.const -nan:0x200000)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -0x0p+0) (f32.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -0x0p+0) (f32.const nan:0x200000)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x0p+0) (f32.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const 0x0p+0) (f32.const -nan:0x200000)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x0p+0) (f32.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const 0x0p+0) (f32.const nan:0x200000)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -0x1p-149) (f32.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -0x1p-149) (f32.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x1p-149) (f32.const -0x0p+0)) (i32.const 1))
@@ -398,14 +478,18 @@
 (assert_return (invoke "ne" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const -0x1p-149) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const -0x1p-149) (f32.const infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const 0x1p-149) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const 0x1p-149) (f32.const infinity)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -0x1p-149) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -0x1p-149) (f32.const inf)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const 0x1p-149) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const 0x1p-149) (f32.const inf)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -0x1p-149) (f32.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -0x1p-149) (f32.const -nan:0x200000)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -0x1p-149) (f32.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -0x1p-149) (f32.const nan:0x200000)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x1p-149) (f32.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const 0x1p-149) (f32.const -nan:0x200000)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x1p-149) (f32.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const 0x1p-149) (f32.const nan:0x200000)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -0x1p-126) (f32.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -0x1p-126) (f32.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x1p-126) (f32.const -0x0p+0)) (i32.const 1))
@@ -434,14 +518,18 @@
 (assert_return (invoke "ne" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const -0x1p-126) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const -0x1p-126) (f32.const infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const 0x1p-126) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const 0x1p-126) (f32.const infinity)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -0x1p-126) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -0x1p-126) (f32.const inf)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const 0x1p-126) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const 0x1p-126) (f32.const inf)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -0x1p-126) (f32.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -0x1p-126) (f32.const -nan:0x200000)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -0x1p-126) (f32.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -0x1p-126) (f32.const nan:0x200000)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x1p-126) (f32.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const 0x1p-126) (f32.const -nan:0x200000)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x1p-126) (f32.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const 0x1p-126) (f32.const nan:0x200000)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -0x1p-1) (f32.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -0x1p-1) (f32.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x1p-1) (f32.const -0x0p+0)) (i32.const 1))
@@ -470,14 +558,18 @@
 (assert_return (invoke "ne" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const -0x1p-1) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const -0x1p-1) (f32.const infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const 0x1p-1) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const 0x1p-1) (f32.const infinity)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -0x1p-1) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -0x1p-1) (f32.const inf)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const 0x1p-1) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const 0x1p-1) (f32.const inf)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -0x1p-1) (f32.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -0x1p-1) (f32.const -nan:0x200000)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -0x1p-1) (f32.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -0x1p-1) (f32.const nan:0x200000)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x1p-1) (f32.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const 0x1p-1) (f32.const -nan:0x200000)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x1p-1) (f32.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const 0x1p-1) (f32.const nan:0x200000)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -0x1p+0) (f32.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -0x1p+0) (f32.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x1p+0) (f32.const -0x0p+0)) (i32.const 1))
@@ -506,14 +598,18 @@
 (assert_return (invoke "ne" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const -0x1p+0) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const -0x1p+0) (f32.const infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const 0x1p+0) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const 0x1p+0) (f32.const infinity)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -0x1p+0) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -0x1p+0) (f32.const inf)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const 0x1p+0) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const 0x1p+0) (f32.const inf)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -0x1p+0) (f32.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -0x1p+0) (f32.const -nan:0x200000)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -0x1p+0) (f32.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -0x1p+0) (f32.const nan:0x200000)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x1p+0) (f32.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const 0x1p+0) (f32.const -nan:0x200000)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x1p+0) (f32.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const 0x1p+0) (f32.const nan:0x200000)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 1))
@@ -542,14 +638,18 @@
 (assert_return (invoke "ne" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const -0x1.921fb6p+2) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const -0x1.921fb6p+2) (f32.const infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const 0x1.921fb6p+2) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const 0x1.921fb6p+2) (f32.const infinity)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -0x1.921fb6p+2) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -0x1.921fb6p+2) (f32.const inf)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const 0x1.921fb6p+2) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const 0x1.921fb6p+2) (f32.const inf)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -0x1.921fb6p+2) (f32.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -0x1.921fb6p+2) (f32.const -nan:0x200000)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -0x1.921fb6p+2) (f32.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -0x1.921fb6p+2) (f32.const nan:0x200000)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x1.921fb6p+2) (f32.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const 0x1.921fb6p+2) (f32.const -nan:0x200000)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x1.921fb6p+2) (f32.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const 0x1.921fb6p+2) (f32.const nan:0x200000)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 1))
@@ -578,86 +678,138 @@
 (assert_return (invoke "ne" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "ne" (f32.const -0x1.fffffep+127) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const -0x1.fffffep+127) (f32.const infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const 0x1.fffffep+127) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const 0x1.fffffep+127) (f32.const infinity)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -0x1.fffffep+127) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -0x1.fffffep+127) (f32.const inf)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const 0x1.fffffep+127) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const 0x1.fffffep+127) (f32.const inf)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -0x1.fffffep+127) (f32.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -0x1.fffffep+127) (f32.const -nan:0x200000)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -0x1.fffffep+127) (f32.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -0x1.fffffep+127) (f32.const nan:0x200000)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x1.fffffep+127) (f32.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const 0x1.fffffep+127) (f32.const -nan:0x200000)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const 0x1.fffffep+127) (f32.const nan)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const -infinity) (f32.const -0x0p+0)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const -infinity) (f32.const 0x0p+0)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const infinity) (f32.const -0x0p+0)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const infinity) (f32.const 0x0p+0)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const -infinity) (f32.const -0x1p-149)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const -infinity) (f32.const 0x1p-149)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const infinity) (f32.const -0x1p-149)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const infinity) (f32.const 0x1p-149)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const -infinity) (f32.const -0x1p-126)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const -infinity) (f32.const 0x1p-126)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const infinity) (f32.const -0x1p-126)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const infinity) (f32.const 0x1p-126)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const -infinity) (f32.const -0x1p-1)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const -infinity) (f32.const 0x1p-1)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const infinity) (f32.const -0x1p-1)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const infinity) (f32.const 0x1p-1)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const -infinity) (f32.const -0x1p+0)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const -infinity) (f32.const 0x1p+0)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const infinity) (f32.const -0x1p+0)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const infinity) (f32.const 0x1p+0)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const -infinity) (f32.const -0x1.921fb6p+2)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const -infinity) (f32.const 0x1.921fb6p+2)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const infinity) (f32.const -0x1.921fb6p+2)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const infinity) (f32.const 0x1.921fb6p+2)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const -infinity) (f32.const -0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const -infinity) (f32.const 0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const infinity) (f32.const -0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const infinity) (f32.const 0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const -infinity) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "ne" (f32.const -infinity) (f32.const infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const infinity) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const infinity) (f32.const infinity)) (i32.const 0))
-(assert_return (invoke "ne" (f32.const -infinity) (f32.const -nan)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const -infinity) (f32.const nan)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const infinity) (f32.const -nan)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const infinity) (f32.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const 0x1.fffffep+127) (f32.const nan:0x200000)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -inf) (f32.const -0x0p+0)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -inf) (f32.const 0x0p+0)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const inf) (f32.const -0x0p+0)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const inf) (f32.const 0x0p+0)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -inf) (f32.const -0x1p-149)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -inf) (f32.const 0x1p-149)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const inf) (f32.const -0x1p-149)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const inf) (f32.const 0x1p-149)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -inf) (f32.const -0x1p-126)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -inf) (f32.const 0x1p-126)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const inf) (f32.const -0x1p-126)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const inf) (f32.const 0x1p-126)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -inf) (f32.const -0x1p-1)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -inf) (f32.const 0x1p-1)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const inf) (f32.const -0x1p-1)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const inf) (f32.const 0x1p-1)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -inf) (f32.const -0x1p+0)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -inf) (f32.const 0x1p+0)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const inf) (f32.const -0x1p+0)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const inf) (f32.const 0x1p+0)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -inf) (f32.const -0x1.921fb6p+2)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -inf) (f32.const 0x1.921fb6p+2)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const inf) (f32.const -0x1.921fb6p+2)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const inf) (f32.const 0x1.921fb6p+2)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -inf) (f32.const -0x1.fffffep+127)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -inf) (f32.const 0x1.fffffep+127)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const inf) (f32.const -0x1.fffffep+127)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const inf) (f32.const 0x1.fffffep+127)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -inf) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "ne" (f32.const -inf) (f32.const inf)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const inf) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const inf) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "ne" (f32.const -inf) (f32.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -inf) (f32.const -nan:0x200000)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -inf) (f32.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -inf) (f32.const nan:0x200000)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const inf) (f32.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const inf) (f32.const -nan:0x200000)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const inf) (f32.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const inf) (f32.const nan:0x200000)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -nan) (f32.const -0x0p+0)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -nan:0x200000) (f32.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -nan) (f32.const 0x0p+0)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -nan:0x200000) (f32.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const nan) (f32.const -0x0p+0)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const nan:0x200000) (f32.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const nan) (f32.const 0x0p+0)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const nan:0x200000) (f32.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -nan) (f32.const -0x1p-149)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -nan:0x200000) (f32.const -0x1p-149)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -nan) (f32.const 0x1p-149)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -nan:0x200000) (f32.const 0x1p-149)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const nan) (f32.const -0x1p-149)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const nan:0x200000) (f32.const -0x1p-149)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const nan) (f32.const 0x1p-149)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const nan:0x200000) (f32.const 0x1p-149)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -nan) (f32.const -0x1p-126)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -nan:0x200000) (f32.const -0x1p-126)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -nan) (f32.const 0x1p-126)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -nan:0x200000) (f32.const 0x1p-126)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const nan) (f32.const -0x1p-126)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const nan:0x200000) (f32.const -0x1p-126)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const nan) (f32.const 0x1p-126)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const nan:0x200000) (f32.const 0x1p-126)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -nan) (f32.const -0x1p-1)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -nan:0x200000) (f32.const -0x1p-1)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -nan) (f32.const 0x1p-1)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -nan:0x200000) (f32.const 0x1p-1)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const nan) (f32.const -0x1p-1)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const nan:0x200000) (f32.const -0x1p-1)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const nan) (f32.const 0x1p-1)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const nan:0x200000) (f32.const 0x1p-1)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -nan) (f32.const -0x1p+0)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -nan:0x200000) (f32.const -0x1p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -nan) (f32.const 0x1p+0)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -nan:0x200000) (f32.const 0x1p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const nan) (f32.const -0x1p+0)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const nan:0x200000) (f32.const -0x1p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const nan) (f32.const 0x1p+0)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const nan:0x200000) (f32.const 0x1p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -nan) (f32.const -0x1.921fb6p+2)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -nan:0x200000) (f32.const -0x1.921fb6p+2)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -nan) (f32.const 0x1.921fb6p+2)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -nan:0x200000) (f32.const 0x1.921fb6p+2)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const nan) (f32.const -0x1.921fb6p+2)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const nan:0x200000) (f32.const -0x1.921fb6p+2)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const nan) (f32.const 0x1.921fb6p+2)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const nan:0x200000) (f32.const 0x1.921fb6p+2)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -nan) (f32.const -0x1.fffffep+127)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -nan:0x200000) (f32.const -0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -nan) (f32.const 0x1.fffffep+127)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -nan:0x200000) (f32.const 0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const nan) (f32.const -0x1.fffffep+127)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const nan:0x200000) (f32.const -0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const nan) (f32.const 0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const -nan) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const -nan) (f32.const infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const nan) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f32.const nan) (f32.const infinity)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const nan:0x200000) (f32.const 0x1.fffffep+127)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -nan) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -nan:0x200000) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -nan) (f32.const inf)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -nan:0x200000) (f32.const inf)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const nan) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const nan:0x200000) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const nan) (f32.const inf)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const nan:0x200000) (f32.const inf)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -nan) (f32.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -nan:0x200000) (f32.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -nan) (f32.const -nan:0x200000)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -nan:0x200000) (f32.const -nan:0x200000)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const -nan) (f32.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -nan:0x200000) (f32.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -nan) (f32.const nan:0x200000)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const -nan:0x200000) (f32.const nan:0x200000)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const nan) (f32.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const nan:0x200000) (f32.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const nan) (f32.const -nan:0x200000)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const nan:0x200000) (f32.const -nan:0x200000)) (i32.const 1))
 (assert_return (invoke "ne" (f32.const nan) (f32.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const nan:0x200000) (f32.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const nan) (f32.const nan:0x200000)) (i32.const 1))
+(assert_return (invoke "ne" (f32.const nan:0x200000) (f32.const nan:0x200000)) (i32.const 1))
 (assert_return (invoke "lt" (f32.const -0x0p+0) (f32.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const -0x0p+0) (f32.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const 0x0p+0) (f32.const -0x0p+0)) (i32.const 0))
@@ -686,14 +838,18 @@
 (assert_return (invoke "lt" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "lt" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "lt" (f32.const -0x0p+0) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const -0x0p+0) (f32.const infinity)) (i32.const 1))
-(assert_return (invoke "lt" (f32.const 0x0p+0) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const 0x0p+0) (f32.const infinity)) (i32.const 1))
+(assert_return (invoke "lt" (f32.const -0x0p+0) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -0x0p+0) (f32.const inf)) (i32.const 1))
+(assert_return (invoke "lt" (f32.const 0x0p+0) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const 0x0p+0) (f32.const inf)) (i32.const 1))
 (assert_return (invoke "lt" (f32.const -0x0p+0) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -0x0p+0) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const -0x0p+0) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -0x0p+0) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const 0x0p+0) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const 0x0p+0) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const 0x0p+0) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const 0x0p+0) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const -0x1p-149) (f32.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "lt" (f32.const -0x1p-149) (f32.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "lt" (f32.const 0x1p-149) (f32.const -0x0p+0)) (i32.const 0))
@@ -722,14 +878,18 @@
 (assert_return (invoke "lt" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "lt" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "lt" (f32.const -0x1p-149) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const -0x1p-149) (f32.const infinity)) (i32.const 1))
-(assert_return (invoke "lt" (f32.const 0x1p-149) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const 0x1p-149) (f32.const infinity)) (i32.const 1))
+(assert_return (invoke "lt" (f32.const -0x1p-149) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -0x1p-149) (f32.const inf)) (i32.const 1))
+(assert_return (invoke "lt" (f32.const 0x1p-149) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const 0x1p-149) (f32.const inf)) (i32.const 1))
 (assert_return (invoke "lt" (f32.const -0x1p-149) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -0x1p-149) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const -0x1p-149) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -0x1p-149) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const 0x1p-149) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const 0x1p-149) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const 0x1p-149) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const 0x1p-149) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const -0x1p-126) (f32.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "lt" (f32.const -0x1p-126) (f32.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "lt" (f32.const 0x1p-126) (f32.const -0x0p+0)) (i32.const 0))
@@ -758,14 +918,18 @@
 (assert_return (invoke "lt" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "lt" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "lt" (f32.const -0x1p-126) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const -0x1p-126) (f32.const infinity)) (i32.const 1))
-(assert_return (invoke "lt" (f32.const 0x1p-126) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const 0x1p-126) (f32.const infinity)) (i32.const 1))
+(assert_return (invoke "lt" (f32.const -0x1p-126) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -0x1p-126) (f32.const inf)) (i32.const 1))
+(assert_return (invoke "lt" (f32.const 0x1p-126) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const 0x1p-126) (f32.const inf)) (i32.const 1))
 (assert_return (invoke "lt" (f32.const -0x1p-126) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -0x1p-126) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const -0x1p-126) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -0x1p-126) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const 0x1p-126) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const 0x1p-126) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const 0x1p-126) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const 0x1p-126) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const -0x1p-1) (f32.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "lt" (f32.const -0x1p-1) (f32.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "lt" (f32.const 0x1p-1) (f32.const -0x0p+0)) (i32.const 0))
@@ -794,14 +958,18 @@
 (assert_return (invoke "lt" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "lt" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "lt" (f32.const -0x1p-1) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const -0x1p-1) (f32.const infinity)) (i32.const 1))
-(assert_return (invoke "lt" (f32.const 0x1p-1) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const 0x1p-1) (f32.const infinity)) (i32.const 1))
+(assert_return (invoke "lt" (f32.const -0x1p-1) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -0x1p-1) (f32.const inf)) (i32.const 1))
+(assert_return (invoke "lt" (f32.const 0x1p-1) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const 0x1p-1) (f32.const inf)) (i32.const 1))
 (assert_return (invoke "lt" (f32.const -0x1p-1) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -0x1p-1) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const -0x1p-1) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -0x1p-1) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const 0x1p-1) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const 0x1p-1) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const 0x1p-1) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const 0x1p-1) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const -0x1p+0) (f32.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "lt" (f32.const -0x1p+0) (f32.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "lt" (f32.const 0x1p+0) (f32.const -0x0p+0)) (i32.const 0))
@@ -830,14 +998,18 @@
 (assert_return (invoke "lt" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "lt" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "lt" (f32.const -0x1p+0) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const -0x1p+0) (f32.const infinity)) (i32.const 1))
-(assert_return (invoke "lt" (f32.const 0x1p+0) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const 0x1p+0) (f32.const infinity)) (i32.const 1))
+(assert_return (invoke "lt" (f32.const -0x1p+0) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -0x1p+0) (f32.const inf)) (i32.const 1))
+(assert_return (invoke "lt" (f32.const 0x1p+0) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const 0x1p+0) (f32.const inf)) (i32.const 1))
 (assert_return (invoke "lt" (f32.const -0x1p+0) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -0x1p+0) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const -0x1p+0) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -0x1p+0) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const 0x1p+0) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const 0x1p+0) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const 0x1p+0) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const 0x1p+0) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "lt" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "lt" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 0))
@@ -866,14 +1038,18 @@
 (assert_return (invoke "lt" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "lt" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "lt" (f32.const -0x1.921fb6p+2) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const -0x1.921fb6p+2) (f32.const infinity)) (i32.const 1))
-(assert_return (invoke "lt" (f32.const 0x1.921fb6p+2) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const 0x1.921fb6p+2) (f32.const infinity)) (i32.const 1))
+(assert_return (invoke "lt" (f32.const -0x1.921fb6p+2) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -0x1.921fb6p+2) (f32.const inf)) (i32.const 1))
+(assert_return (invoke "lt" (f32.const 0x1.921fb6p+2) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const 0x1.921fb6p+2) (f32.const inf)) (i32.const 1))
 (assert_return (invoke "lt" (f32.const -0x1.921fb6p+2) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -0x1.921fb6p+2) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const -0x1.921fb6p+2) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -0x1.921fb6p+2) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const 0x1.921fb6p+2) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const 0x1.921fb6p+2) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const 0x1.921fb6p+2) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const 0x1.921fb6p+2) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "lt" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "lt" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 0))
@@ -902,86 +1078,138 @@
 (assert_return (invoke "lt" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "lt" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const -0x1.fffffep+127) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const -0x1.fffffep+127) (f32.const infinity)) (i32.const 1))
-(assert_return (invoke "lt" (f32.const 0x1.fffffep+127) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const 0x1.fffffep+127) (f32.const infinity)) (i32.const 1))
+(assert_return (invoke "lt" (f32.const -0x1.fffffep+127) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -0x1.fffffep+127) (f32.const inf)) (i32.const 1))
+(assert_return (invoke "lt" (f32.const 0x1.fffffep+127) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const 0x1.fffffep+127) (f32.const inf)) (i32.const 1))
 (assert_return (invoke "lt" (f32.const -0x1.fffffep+127) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -0x1.fffffep+127) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const -0x1.fffffep+127) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -0x1.fffffep+127) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const 0x1.fffffep+127) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const 0x1.fffffep+127) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const 0x1.fffffep+127) (f32.const nan)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const -infinity) (f32.const -0x0p+0)) (i32.const 1))
-(assert_return (invoke "lt" (f32.const -infinity) (f32.const 0x0p+0)) (i32.const 1))
-(assert_return (invoke "lt" (f32.const infinity) (f32.const -0x0p+0)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const infinity) (f32.const 0x0p+0)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const -infinity) (f32.const -0x1p-149)) (i32.const 1))
-(assert_return (invoke "lt" (f32.const -infinity) (f32.const 0x1p-149)) (i32.const 1))
-(assert_return (invoke "lt" (f32.const infinity) (f32.const -0x1p-149)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const infinity) (f32.const 0x1p-149)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const -infinity) (f32.const -0x1p-126)) (i32.const 1))
-(assert_return (invoke "lt" (f32.const -infinity) (f32.const 0x1p-126)) (i32.const 1))
-(assert_return (invoke "lt" (f32.const infinity) (f32.const -0x1p-126)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const infinity) (f32.const 0x1p-126)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const -infinity) (f32.const -0x1p-1)) (i32.const 1))
-(assert_return (invoke "lt" (f32.const -infinity) (f32.const 0x1p-1)) (i32.const 1))
-(assert_return (invoke "lt" (f32.const infinity) (f32.const -0x1p-1)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const infinity) (f32.const 0x1p-1)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const -infinity) (f32.const -0x1p+0)) (i32.const 1))
-(assert_return (invoke "lt" (f32.const -infinity) (f32.const 0x1p+0)) (i32.const 1))
-(assert_return (invoke "lt" (f32.const infinity) (f32.const -0x1p+0)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const infinity) (f32.const 0x1p+0)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const -infinity) (f32.const -0x1.921fb6p+2)) (i32.const 1))
-(assert_return (invoke "lt" (f32.const -infinity) (f32.const 0x1.921fb6p+2)) (i32.const 1))
-(assert_return (invoke "lt" (f32.const infinity) (f32.const -0x1.921fb6p+2)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const infinity) (f32.const 0x1.921fb6p+2)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const -infinity) (f32.const -0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "lt" (f32.const -infinity) (f32.const 0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "lt" (f32.const infinity) (f32.const -0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const infinity) (f32.const 0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const -infinity) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const -infinity) (f32.const infinity)) (i32.const 1))
-(assert_return (invoke "lt" (f32.const infinity) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const infinity) (f32.const infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const -infinity) (f32.const -nan)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const -infinity) (f32.const nan)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const infinity) (f32.const -nan)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const infinity) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const 0x1.fffffep+127) (f32.const nan:0x200000)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -inf) (f32.const -0x0p+0)) (i32.const 1))
+(assert_return (invoke "lt" (f32.const -inf) (f32.const 0x0p+0)) (i32.const 1))
+(assert_return (invoke "lt" (f32.const inf) (f32.const -0x0p+0)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const inf) (f32.const 0x0p+0)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -inf) (f32.const -0x1p-149)) (i32.const 1))
+(assert_return (invoke "lt" (f32.const -inf) (f32.const 0x1p-149)) (i32.const 1))
+(assert_return (invoke "lt" (f32.const inf) (f32.const -0x1p-149)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const inf) (f32.const 0x1p-149)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -inf) (f32.const -0x1p-126)) (i32.const 1))
+(assert_return (invoke "lt" (f32.const -inf) (f32.const 0x1p-126)) (i32.const 1))
+(assert_return (invoke "lt" (f32.const inf) (f32.const -0x1p-126)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const inf) (f32.const 0x1p-126)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -inf) (f32.const -0x1p-1)) (i32.const 1))
+(assert_return (invoke "lt" (f32.const -inf) (f32.const 0x1p-1)) (i32.const 1))
+(assert_return (invoke "lt" (f32.const inf) (f32.const -0x1p-1)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const inf) (f32.const 0x1p-1)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -inf) (f32.const -0x1p+0)) (i32.const 1))
+(assert_return (invoke "lt" (f32.const -inf) (f32.const 0x1p+0)) (i32.const 1))
+(assert_return (invoke "lt" (f32.const inf) (f32.const -0x1p+0)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const inf) (f32.const 0x1p+0)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -inf) (f32.const -0x1.921fb6p+2)) (i32.const 1))
+(assert_return (invoke "lt" (f32.const -inf) (f32.const 0x1.921fb6p+2)) (i32.const 1))
+(assert_return (invoke "lt" (f32.const inf) (f32.const -0x1.921fb6p+2)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const inf) (f32.const 0x1.921fb6p+2)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -inf) (f32.const -0x1.fffffep+127)) (i32.const 1))
+(assert_return (invoke "lt" (f32.const -inf) (f32.const 0x1.fffffep+127)) (i32.const 1))
+(assert_return (invoke "lt" (f32.const inf) (f32.const -0x1.fffffep+127)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const inf) (f32.const 0x1.fffffep+127)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -inf) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -inf) (f32.const inf)) (i32.const 1))
+(assert_return (invoke "lt" (f32.const inf) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const inf) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -inf) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -inf) (f32.const -nan:0x200000)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -inf) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -inf) (f32.const nan:0x200000)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const inf) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const inf) (f32.const -nan:0x200000)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const inf) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const inf) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const -nan) (f32.const -0x0p+0)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -nan:0x200000) (f32.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const -nan) (f32.const 0x0p+0)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -nan:0x200000) (f32.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const nan) (f32.const -0x0p+0)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const nan:0x200000) (f32.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const nan) (f32.const 0x0p+0)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const nan:0x200000) (f32.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const -nan) (f32.const -0x1p-149)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -nan:0x200000) (f32.const -0x1p-149)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const -nan) (f32.const 0x1p-149)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -nan:0x200000) (f32.const 0x1p-149)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const nan) (f32.const -0x1p-149)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const nan:0x200000) (f32.const -0x1p-149)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const nan) (f32.const 0x1p-149)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const nan:0x200000) (f32.const 0x1p-149)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const -nan) (f32.const -0x1p-126)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -nan:0x200000) (f32.const -0x1p-126)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const -nan) (f32.const 0x1p-126)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -nan:0x200000) (f32.const 0x1p-126)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const nan) (f32.const -0x1p-126)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const nan:0x200000) (f32.const -0x1p-126)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const nan) (f32.const 0x1p-126)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const nan:0x200000) (f32.const 0x1p-126)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const -nan) (f32.const -0x1p-1)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -nan:0x200000) (f32.const -0x1p-1)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const -nan) (f32.const 0x1p-1)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -nan:0x200000) (f32.const 0x1p-1)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const nan) (f32.const -0x1p-1)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const nan:0x200000) (f32.const -0x1p-1)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const nan) (f32.const 0x1p-1)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const nan:0x200000) (f32.const 0x1p-1)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const -nan) (f32.const -0x1p+0)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -nan:0x200000) (f32.const -0x1p+0)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const -nan) (f32.const 0x1p+0)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -nan:0x200000) (f32.const 0x1p+0)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const nan) (f32.const -0x1p+0)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const nan:0x200000) (f32.const -0x1p+0)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const nan) (f32.const 0x1p+0)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const nan:0x200000) (f32.const 0x1p+0)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const -nan) (f32.const -0x1.921fb6p+2)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -nan:0x200000) (f32.const -0x1.921fb6p+2)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const -nan) (f32.const 0x1.921fb6p+2)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -nan:0x200000) (f32.const 0x1.921fb6p+2)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const nan) (f32.const -0x1.921fb6p+2)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const nan:0x200000) (f32.const -0x1.921fb6p+2)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const nan) (f32.const 0x1.921fb6p+2)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const nan:0x200000) (f32.const 0x1.921fb6p+2)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const -nan) (f32.const -0x1.fffffep+127)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -nan:0x200000) (f32.const -0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const -nan) (f32.const 0x1.fffffep+127)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -nan:0x200000) (f32.const 0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const nan) (f32.const -0x1.fffffep+127)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const nan:0x200000) (f32.const -0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const nan) (f32.const 0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const -nan) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const -nan) (f32.const infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const nan) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f32.const nan) (f32.const infinity)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const nan:0x200000) (f32.const 0x1.fffffep+127)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -nan) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -nan:0x200000) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -nan) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -nan:0x200000) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const nan) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const nan:0x200000) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const nan) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const nan:0x200000) (f32.const inf)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const -nan) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -nan:0x200000) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -nan) (f32.const -nan:0x200000)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -nan:0x200000) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const -nan) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -nan:0x200000) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -nan) (f32.const nan:0x200000)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const -nan:0x200000) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const nan) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const nan:0x200000) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const nan) (f32.const -nan:0x200000)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const nan:0x200000) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "lt" (f32.const nan) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const nan:0x200000) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const nan) (f32.const nan:0x200000)) (i32.const 0))
+(assert_return (invoke "lt" (f32.const nan:0x200000) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "le" (f32.const -0x0p+0) (f32.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "le" (f32.const -0x0p+0) (f32.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "le" (f32.const 0x0p+0) (f32.const -0x0p+0)) (i32.const 1))
@@ -1010,14 +1238,18 @@
 (assert_return (invoke "le" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "le" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "le" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "le" (f32.const -0x0p+0) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f32.const -0x0p+0) (f32.const infinity)) (i32.const 1))
-(assert_return (invoke "le" (f32.const 0x0p+0) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f32.const 0x0p+0) (f32.const infinity)) (i32.const 1))
+(assert_return (invoke "le" (f32.const -0x0p+0) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -0x0p+0) (f32.const inf)) (i32.const 1))
+(assert_return (invoke "le" (f32.const 0x0p+0) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f32.const 0x0p+0) (f32.const inf)) (i32.const 1))
 (assert_return (invoke "le" (f32.const -0x0p+0) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -0x0p+0) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "le" (f32.const -0x0p+0) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -0x0p+0) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "le" (f32.const 0x0p+0) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const 0x0p+0) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "le" (f32.const 0x0p+0) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const 0x0p+0) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "le" (f32.const -0x1p-149) (f32.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "le" (f32.const -0x1p-149) (f32.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "le" (f32.const 0x1p-149) (f32.const -0x0p+0)) (i32.const 0))
@@ -1046,14 +1278,18 @@
 (assert_return (invoke "le" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "le" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "le" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "le" (f32.const -0x1p-149) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f32.const -0x1p-149) (f32.const infinity)) (i32.const 1))
-(assert_return (invoke "le" (f32.const 0x1p-149) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f32.const 0x1p-149) (f32.const infinity)) (i32.const 1))
+(assert_return (invoke "le" (f32.const -0x1p-149) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -0x1p-149) (f32.const inf)) (i32.const 1))
+(assert_return (invoke "le" (f32.const 0x1p-149) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f32.const 0x1p-149) (f32.const inf)) (i32.const 1))
 (assert_return (invoke "le" (f32.const -0x1p-149) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -0x1p-149) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "le" (f32.const -0x1p-149) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -0x1p-149) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "le" (f32.const 0x1p-149) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const 0x1p-149) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "le" (f32.const 0x1p-149) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const 0x1p-149) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "le" (f32.const -0x1p-126) (f32.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "le" (f32.const -0x1p-126) (f32.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "le" (f32.const 0x1p-126) (f32.const -0x0p+0)) (i32.const 0))
@@ -1082,14 +1318,18 @@
 (assert_return (invoke "le" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "le" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "le" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "le" (f32.const -0x1p-126) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f32.const -0x1p-126) (f32.const infinity)) (i32.const 1))
-(assert_return (invoke "le" (f32.const 0x1p-126) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f32.const 0x1p-126) (f32.const infinity)) (i32.const 1))
+(assert_return (invoke "le" (f32.const -0x1p-126) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -0x1p-126) (f32.const inf)) (i32.const 1))
+(assert_return (invoke "le" (f32.const 0x1p-126) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f32.const 0x1p-126) (f32.const inf)) (i32.const 1))
 (assert_return (invoke "le" (f32.const -0x1p-126) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -0x1p-126) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "le" (f32.const -0x1p-126) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -0x1p-126) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "le" (f32.const 0x1p-126) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const 0x1p-126) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "le" (f32.const 0x1p-126) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const 0x1p-126) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "le" (f32.const -0x1p-1) (f32.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "le" (f32.const -0x1p-1) (f32.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "le" (f32.const 0x1p-1) (f32.const -0x0p+0)) (i32.const 0))
@@ -1118,14 +1358,18 @@
 (assert_return (invoke "le" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "le" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "le" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "le" (f32.const -0x1p-1) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f32.const -0x1p-1) (f32.const infinity)) (i32.const 1))
-(assert_return (invoke "le" (f32.const 0x1p-1) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f32.const 0x1p-1) (f32.const infinity)) (i32.const 1))
+(assert_return (invoke "le" (f32.const -0x1p-1) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -0x1p-1) (f32.const inf)) (i32.const 1))
+(assert_return (invoke "le" (f32.const 0x1p-1) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f32.const 0x1p-1) (f32.const inf)) (i32.const 1))
 (assert_return (invoke "le" (f32.const -0x1p-1) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -0x1p-1) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "le" (f32.const -0x1p-1) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -0x1p-1) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "le" (f32.const 0x1p-1) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const 0x1p-1) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "le" (f32.const 0x1p-1) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const 0x1p-1) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "le" (f32.const -0x1p+0) (f32.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "le" (f32.const -0x1p+0) (f32.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "le" (f32.const 0x1p+0) (f32.const -0x0p+0)) (i32.const 0))
@@ -1154,14 +1398,18 @@
 (assert_return (invoke "le" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "le" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "le" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "le" (f32.const -0x1p+0) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f32.const -0x1p+0) (f32.const infinity)) (i32.const 1))
-(assert_return (invoke "le" (f32.const 0x1p+0) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f32.const 0x1p+0) (f32.const infinity)) (i32.const 1))
+(assert_return (invoke "le" (f32.const -0x1p+0) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -0x1p+0) (f32.const inf)) (i32.const 1))
+(assert_return (invoke "le" (f32.const 0x1p+0) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f32.const 0x1p+0) (f32.const inf)) (i32.const 1))
 (assert_return (invoke "le" (f32.const -0x1p+0) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -0x1p+0) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "le" (f32.const -0x1p+0) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -0x1p+0) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "le" (f32.const 0x1p+0) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const 0x1p+0) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "le" (f32.const 0x1p+0) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const 0x1p+0) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "le" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "le" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "le" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 0))
@@ -1190,14 +1438,18 @@
 (assert_return (invoke "le" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "le" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "le" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "le" (f32.const -0x1.921fb6p+2) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f32.const -0x1.921fb6p+2) (f32.const infinity)) (i32.const 1))
-(assert_return (invoke "le" (f32.const 0x1.921fb6p+2) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f32.const 0x1.921fb6p+2) (f32.const infinity)) (i32.const 1))
+(assert_return (invoke "le" (f32.const -0x1.921fb6p+2) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -0x1.921fb6p+2) (f32.const inf)) (i32.const 1))
+(assert_return (invoke "le" (f32.const 0x1.921fb6p+2) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f32.const 0x1.921fb6p+2) (f32.const inf)) (i32.const 1))
 (assert_return (invoke "le" (f32.const -0x1.921fb6p+2) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -0x1.921fb6p+2) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "le" (f32.const -0x1.921fb6p+2) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -0x1.921fb6p+2) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "le" (f32.const 0x1.921fb6p+2) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const 0x1.921fb6p+2) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "le" (f32.const 0x1.921fb6p+2) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const 0x1.921fb6p+2) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "le" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "le" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "le" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 0))
@@ -1226,86 +1478,138 @@
 (assert_return (invoke "le" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "le" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "le" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "le" (f32.const -0x1.fffffep+127) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f32.const -0x1.fffffep+127) (f32.const infinity)) (i32.const 1))
-(assert_return (invoke "le" (f32.const 0x1.fffffep+127) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f32.const 0x1.fffffep+127) (f32.const infinity)) (i32.const 1))
+(assert_return (invoke "le" (f32.const -0x1.fffffep+127) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -0x1.fffffep+127) (f32.const inf)) (i32.const 1))
+(assert_return (invoke "le" (f32.const 0x1.fffffep+127) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f32.const 0x1.fffffep+127) (f32.const inf)) (i32.const 1))
 (assert_return (invoke "le" (f32.const -0x1.fffffep+127) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -0x1.fffffep+127) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "le" (f32.const -0x1.fffffep+127) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -0x1.fffffep+127) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "le" (f32.const 0x1.fffffep+127) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const 0x1.fffffep+127) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "le" (f32.const 0x1.fffffep+127) (f32.const nan)) (i32.const 0))
-(assert_return (invoke "le" (f32.const -infinity) (f32.const -0x0p+0)) (i32.const 1))
-(assert_return (invoke "le" (f32.const -infinity) (f32.const 0x0p+0)) (i32.const 1))
-(assert_return (invoke "le" (f32.const infinity) (f32.const -0x0p+0)) (i32.const 0))
-(assert_return (invoke "le" (f32.const infinity) (f32.const 0x0p+0)) (i32.const 0))
-(assert_return (invoke "le" (f32.const -infinity) (f32.const -0x1p-149)) (i32.const 1))
-(assert_return (invoke "le" (f32.const -infinity) (f32.const 0x1p-149)) (i32.const 1))
-(assert_return (invoke "le" (f32.const infinity) (f32.const -0x1p-149)) (i32.const 0))
-(assert_return (invoke "le" (f32.const infinity) (f32.const 0x1p-149)) (i32.const 0))
-(assert_return (invoke "le" (f32.const -infinity) (f32.const -0x1p-126)) (i32.const 1))
-(assert_return (invoke "le" (f32.const -infinity) (f32.const 0x1p-126)) (i32.const 1))
-(assert_return (invoke "le" (f32.const infinity) (f32.const -0x1p-126)) (i32.const 0))
-(assert_return (invoke "le" (f32.const infinity) (f32.const 0x1p-126)) (i32.const 0))
-(assert_return (invoke "le" (f32.const -infinity) (f32.const -0x1p-1)) (i32.const 1))
-(assert_return (invoke "le" (f32.const -infinity) (f32.const 0x1p-1)) (i32.const 1))
-(assert_return (invoke "le" (f32.const infinity) (f32.const -0x1p-1)) (i32.const 0))
-(assert_return (invoke "le" (f32.const infinity) (f32.const 0x1p-1)) (i32.const 0))
-(assert_return (invoke "le" (f32.const -infinity) (f32.const -0x1p+0)) (i32.const 1))
-(assert_return (invoke "le" (f32.const -infinity) (f32.const 0x1p+0)) (i32.const 1))
-(assert_return (invoke "le" (f32.const infinity) (f32.const -0x1p+0)) (i32.const 0))
-(assert_return (invoke "le" (f32.const infinity) (f32.const 0x1p+0)) (i32.const 0))
-(assert_return (invoke "le" (f32.const -infinity) (f32.const -0x1.921fb6p+2)) (i32.const 1))
-(assert_return (invoke "le" (f32.const -infinity) (f32.const 0x1.921fb6p+2)) (i32.const 1))
-(assert_return (invoke "le" (f32.const infinity) (f32.const -0x1.921fb6p+2)) (i32.const 0))
-(assert_return (invoke "le" (f32.const infinity) (f32.const 0x1.921fb6p+2)) (i32.const 0))
-(assert_return (invoke "le" (f32.const -infinity) (f32.const -0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "le" (f32.const -infinity) (f32.const 0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "le" (f32.const infinity) (f32.const -0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "le" (f32.const infinity) (f32.const 0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "le" (f32.const -infinity) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "le" (f32.const -infinity) (f32.const infinity)) (i32.const 1))
-(assert_return (invoke "le" (f32.const infinity) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f32.const infinity) (f32.const infinity)) (i32.const 1))
-(assert_return (invoke "le" (f32.const -infinity) (f32.const -nan)) (i32.const 0))
-(assert_return (invoke "le" (f32.const -infinity) (f32.const nan)) (i32.const 0))
-(assert_return (invoke "le" (f32.const infinity) (f32.const -nan)) (i32.const 0))
-(assert_return (invoke "le" (f32.const infinity) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const 0x1.fffffep+127) (f32.const nan:0x200000)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -inf) (f32.const -0x0p+0)) (i32.const 1))
+(assert_return (invoke "le" (f32.const -inf) (f32.const 0x0p+0)) (i32.const 1))
+(assert_return (invoke "le" (f32.const inf) (f32.const -0x0p+0)) (i32.const 0))
+(assert_return (invoke "le" (f32.const inf) (f32.const 0x0p+0)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -inf) (f32.const -0x1p-149)) (i32.const 1))
+(assert_return (invoke "le" (f32.const -inf) (f32.const 0x1p-149)) (i32.const 1))
+(assert_return (invoke "le" (f32.const inf) (f32.const -0x1p-149)) (i32.const 0))
+(assert_return (invoke "le" (f32.const inf) (f32.const 0x1p-149)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -inf) (f32.const -0x1p-126)) (i32.const 1))
+(assert_return (invoke "le" (f32.const -inf) (f32.const 0x1p-126)) (i32.const 1))
+(assert_return (invoke "le" (f32.const inf) (f32.const -0x1p-126)) (i32.const 0))
+(assert_return (invoke "le" (f32.const inf) (f32.const 0x1p-126)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -inf) (f32.const -0x1p-1)) (i32.const 1))
+(assert_return (invoke "le" (f32.const -inf) (f32.const 0x1p-1)) (i32.const 1))
+(assert_return (invoke "le" (f32.const inf) (f32.const -0x1p-1)) (i32.const 0))
+(assert_return (invoke "le" (f32.const inf) (f32.const 0x1p-1)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -inf) (f32.const -0x1p+0)) (i32.const 1))
+(assert_return (invoke "le" (f32.const -inf) (f32.const 0x1p+0)) (i32.const 1))
+(assert_return (invoke "le" (f32.const inf) (f32.const -0x1p+0)) (i32.const 0))
+(assert_return (invoke "le" (f32.const inf) (f32.const 0x1p+0)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -inf) (f32.const -0x1.921fb6p+2)) (i32.const 1))
+(assert_return (invoke "le" (f32.const -inf) (f32.const 0x1.921fb6p+2)) (i32.const 1))
+(assert_return (invoke "le" (f32.const inf) (f32.const -0x1.921fb6p+2)) (i32.const 0))
+(assert_return (invoke "le" (f32.const inf) (f32.const 0x1.921fb6p+2)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -inf) (f32.const -0x1.fffffep+127)) (i32.const 1))
+(assert_return (invoke "le" (f32.const -inf) (f32.const 0x1.fffffep+127)) (i32.const 1))
+(assert_return (invoke "le" (f32.const inf) (f32.const -0x1.fffffep+127)) (i32.const 0))
+(assert_return (invoke "le" (f32.const inf) (f32.const 0x1.fffffep+127)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -inf) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "le" (f32.const -inf) (f32.const inf)) (i32.const 1))
+(assert_return (invoke "le" (f32.const inf) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f32.const inf) (f32.const inf)) (i32.const 1))
+(assert_return (invoke "le" (f32.const -inf) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -inf) (f32.const -nan:0x200000)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -inf) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -inf) (f32.const nan:0x200000)) (i32.const 0))
+(assert_return (invoke "le" (f32.const inf) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const inf) (f32.const -nan:0x200000)) (i32.const 0))
+(assert_return (invoke "le" (f32.const inf) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const inf) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "le" (f32.const -nan) (f32.const -0x0p+0)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -nan:0x200000) (f32.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "le" (f32.const -nan) (f32.const 0x0p+0)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -nan:0x200000) (f32.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "le" (f32.const nan) (f32.const -0x0p+0)) (i32.const 0))
+(assert_return (invoke "le" (f32.const nan:0x200000) (f32.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "le" (f32.const nan) (f32.const 0x0p+0)) (i32.const 0))
+(assert_return (invoke "le" (f32.const nan:0x200000) (f32.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "le" (f32.const -nan) (f32.const -0x1p-149)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -nan:0x200000) (f32.const -0x1p-149)) (i32.const 0))
 (assert_return (invoke "le" (f32.const -nan) (f32.const 0x1p-149)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -nan:0x200000) (f32.const 0x1p-149)) (i32.const 0))
 (assert_return (invoke "le" (f32.const nan) (f32.const -0x1p-149)) (i32.const 0))
+(assert_return (invoke "le" (f32.const nan:0x200000) (f32.const -0x1p-149)) (i32.const 0))
 (assert_return (invoke "le" (f32.const nan) (f32.const 0x1p-149)) (i32.const 0))
+(assert_return (invoke "le" (f32.const nan:0x200000) (f32.const 0x1p-149)) (i32.const 0))
 (assert_return (invoke "le" (f32.const -nan) (f32.const -0x1p-126)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -nan:0x200000) (f32.const -0x1p-126)) (i32.const 0))
 (assert_return (invoke "le" (f32.const -nan) (f32.const 0x1p-126)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -nan:0x200000) (f32.const 0x1p-126)) (i32.const 0))
 (assert_return (invoke "le" (f32.const nan) (f32.const -0x1p-126)) (i32.const 0))
+(assert_return (invoke "le" (f32.const nan:0x200000) (f32.const -0x1p-126)) (i32.const 0))
 (assert_return (invoke "le" (f32.const nan) (f32.const 0x1p-126)) (i32.const 0))
+(assert_return (invoke "le" (f32.const nan:0x200000) (f32.const 0x1p-126)) (i32.const 0))
 (assert_return (invoke "le" (f32.const -nan) (f32.const -0x1p-1)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -nan:0x200000) (f32.const -0x1p-1)) (i32.const 0))
 (assert_return (invoke "le" (f32.const -nan) (f32.const 0x1p-1)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -nan:0x200000) (f32.const 0x1p-1)) (i32.const 0))
 (assert_return (invoke "le" (f32.const nan) (f32.const -0x1p-1)) (i32.const 0))
+(assert_return (invoke "le" (f32.const nan:0x200000) (f32.const -0x1p-1)) (i32.const 0))
 (assert_return (invoke "le" (f32.const nan) (f32.const 0x1p-1)) (i32.const 0))
+(assert_return (invoke "le" (f32.const nan:0x200000) (f32.const 0x1p-1)) (i32.const 0))
 (assert_return (invoke "le" (f32.const -nan) (f32.const -0x1p+0)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -nan:0x200000) (f32.const -0x1p+0)) (i32.const 0))
 (assert_return (invoke "le" (f32.const -nan) (f32.const 0x1p+0)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -nan:0x200000) (f32.const 0x1p+0)) (i32.const 0))
 (assert_return (invoke "le" (f32.const nan) (f32.const -0x1p+0)) (i32.const 0))
+(assert_return (invoke "le" (f32.const nan:0x200000) (f32.const -0x1p+0)) (i32.const 0))
 (assert_return (invoke "le" (f32.const nan) (f32.const 0x1p+0)) (i32.const 0))
+(assert_return (invoke "le" (f32.const nan:0x200000) (f32.const 0x1p+0)) (i32.const 0))
 (assert_return (invoke "le" (f32.const -nan) (f32.const -0x1.921fb6p+2)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -nan:0x200000) (f32.const -0x1.921fb6p+2)) (i32.const 0))
 (assert_return (invoke "le" (f32.const -nan) (f32.const 0x1.921fb6p+2)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -nan:0x200000) (f32.const 0x1.921fb6p+2)) (i32.const 0))
 (assert_return (invoke "le" (f32.const nan) (f32.const -0x1.921fb6p+2)) (i32.const 0))
+(assert_return (invoke "le" (f32.const nan:0x200000) (f32.const -0x1.921fb6p+2)) (i32.const 0))
 (assert_return (invoke "le" (f32.const nan) (f32.const 0x1.921fb6p+2)) (i32.const 0))
+(assert_return (invoke "le" (f32.const nan:0x200000) (f32.const 0x1.921fb6p+2)) (i32.const 0))
 (assert_return (invoke "le" (f32.const -nan) (f32.const -0x1.fffffep+127)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -nan:0x200000) (f32.const -0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "le" (f32.const -nan) (f32.const 0x1.fffffep+127)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -nan:0x200000) (f32.const 0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "le" (f32.const nan) (f32.const -0x1.fffffep+127)) (i32.const 0))
+(assert_return (invoke "le" (f32.const nan:0x200000) (f32.const -0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "le" (f32.const nan) (f32.const 0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "le" (f32.const -nan) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f32.const -nan) (f32.const infinity)) (i32.const 0))
-(assert_return (invoke "le" (f32.const nan) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f32.const nan) (f32.const infinity)) (i32.const 0))
+(assert_return (invoke "le" (f32.const nan:0x200000) (f32.const 0x1.fffffep+127)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -nan) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -nan:0x200000) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -nan) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -nan:0x200000) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "le" (f32.const nan) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f32.const nan:0x200000) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f32.const nan) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "le" (f32.const nan:0x200000) (f32.const inf)) (i32.const 0))
 (assert_return (invoke "le" (f32.const -nan) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -nan:0x200000) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -nan) (f32.const -nan:0x200000)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -nan:0x200000) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "le" (f32.const -nan) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -nan:0x200000) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -nan) (f32.const nan:0x200000)) (i32.const 0))
+(assert_return (invoke "le" (f32.const -nan:0x200000) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "le" (f32.const nan) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const nan:0x200000) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const nan) (f32.const -nan:0x200000)) (i32.const 0))
+(assert_return (invoke "le" (f32.const nan:0x200000) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "le" (f32.const nan) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const nan:0x200000) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f32.const nan) (f32.const nan:0x200000)) (i32.const 0))
+(assert_return (invoke "le" (f32.const nan:0x200000) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -0x0p+0) (f32.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -0x0p+0) (f32.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const 0x0p+0) (f32.const -0x0p+0)) (i32.const 0))
@@ -1334,14 +1638,18 @@
 (assert_return (invoke "gt" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "gt" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const -0x0p+0) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "gt" (f32.const -0x0p+0) (f32.const infinity)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const 0x0p+0) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "gt" (f32.const 0x0p+0) (f32.const infinity)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -0x0p+0) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "gt" (f32.const -0x0p+0) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const 0x0p+0) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "gt" (f32.const 0x0p+0) (f32.const inf)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -0x0p+0) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -0x0p+0) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -0x0p+0) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -0x0p+0) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const 0x0p+0) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const 0x0p+0) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const 0x0p+0) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const 0x0p+0) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -0x1p-149) (f32.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -0x1p-149) (f32.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const 0x1p-149) (f32.const -0x0p+0)) (i32.const 1))
@@ -1370,14 +1678,18 @@
 (assert_return (invoke "gt" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "gt" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const -0x1p-149) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "gt" (f32.const -0x1p-149) (f32.const infinity)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const 0x1p-149) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "gt" (f32.const 0x1p-149) (f32.const infinity)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -0x1p-149) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "gt" (f32.const -0x1p-149) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const 0x1p-149) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "gt" (f32.const 0x1p-149) (f32.const inf)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -0x1p-149) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -0x1p-149) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -0x1p-149) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -0x1p-149) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const 0x1p-149) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const 0x1p-149) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const 0x1p-149) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const 0x1p-149) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -0x1p-126) (f32.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -0x1p-126) (f32.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const 0x1p-126) (f32.const -0x0p+0)) (i32.const 1))
@@ -1406,14 +1718,18 @@
 (assert_return (invoke "gt" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "gt" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const -0x1p-126) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "gt" (f32.const -0x1p-126) (f32.const infinity)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const 0x1p-126) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "gt" (f32.const 0x1p-126) (f32.const infinity)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -0x1p-126) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "gt" (f32.const -0x1p-126) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const 0x1p-126) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "gt" (f32.const 0x1p-126) (f32.const inf)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -0x1p-126) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -0x1p-126) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -0x1p-126) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -0x1p-126) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const 0x1p-126) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const 0x1p-126) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const 0x1p-126) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const 0x1p-126) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -0x1p-1) (f32.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -0x1p-1) (f32.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const 0x1p-1) (f32.const -0x0p+0)) (i32.const 1))
@@ -1442,14 +1758,18 @@
 (assert_return (invoke "gt" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "gt" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const -0x1p-1) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "gt" (f32.const -0x1p-1) (f32.const infinity)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const 0x1p-1) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "gt" (f32.const 0x1p-1) (f32.const infinity)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -0x1p-1) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "gt" (f32.const -0x1p-1) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const 0x1p-1) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "gt" (f32.const 0x1p-1) (f32.const inf)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -0x1p-1) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -0x1p-1) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -0x1p-1) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -0x1p-1) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const 0x1p-1) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const 0x1p-1) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const 0x1p-1) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const 0x1p-1) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -0x1p+0) (f32.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -0x1p+0) (f32.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const 0x1p+0) (f32.const -0x0p+0)) (i32.const 1))
@@ -1478,14 +1798,18 @@
 (assert_return (invoke "gt" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "gt" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const -0x1p+0) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "gt" (f32.const -0x1p+0) (f32.const infinity)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const 0x1p+0) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "gt" (f32.const 0x1p+0) (f32.const infinity)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -0x1p+0) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "gt" (f32.const -0x1p+0) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const 0x1p+0) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "gt" (f32.const 0x1p+0) (f32.const inf)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -0x1p+0) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -0x1p+0) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -0x1p+0) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -0x1p+0) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const 0x1p+0) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const 0x1p+0) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const 0x1p+0) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const 0x1p+0) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 1))
@@ -1514,14 +1838,18 @@
 (assert_return (invoke "gt" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "gt" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const -0x1.921fb6p+2) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "gt" (f32.const -0x1.921fb6p+2) (f32.const infinity)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const 0x1.921fb6p+2) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "gt" (f32.const 0x1.921fb6p+2) (f32.const infinity)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -0x1.921fb6p+2) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "gt" (f32.const -0x1.921fb6p+2) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const 0x1.921fb6p+2) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "gt" (f32.const 0x1.921fb6p+2) (f32.const inf)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -0x1.921fb6p+2) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -0x1.921fb6p+2) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -0x1.921fb6p+2) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -0x1.921fb6p+2) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const 0x1.921fb6p+2) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const 0x1.921fb6p+2) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const 0x1.921fb6p+2) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const 0x1.921fb6p+2) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 1))
@@ -1550,86 +1878,138 @@
 (assert_return (invoke "gt" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "gt" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const -0x1.fffffep+127) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "gt" (f32.const -0x1.fffffep+127) (f32.const infinity)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const 0x1.fffffep+127) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "gt" (f32.const 0x1.fffffep+127) (f32.const infinity)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -0x1.fffffep+127) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "gt" (f32.const -0x1.fffffep+127) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const 0x1.fffffep+127) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "gt" (f32.const 0x1.fffffep+127) (f32.const inf)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -0x1.fffffep+127) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -0x1.fffffep+127) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -0x1.fffffep+127) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -0x1.fffffep+127) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const 0x1.fffffep+127) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const 0x1.fffffep+127) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const 0x1.fffffep+127) (f32.const nan)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const -infinity) (f32.const -0x0p+0)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const -infinity) (f32.const 0x0p+0)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const infinity) (f32.const -0x0p+0)) (i32.const 1))
-(assert_return (invoke "gt" (f32.const infinity) (f32.const 0x0p+0)) (i32.const 1))
-(assert_return (invoke "gt" (f32.const -infinity) (f32.const -0x1p-149)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const -infinity) (f32.const 0x1p-149)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const infinity) (f32.const -0x1p-149)) (i32.const 1))
-(assert_return (invoke "gt" (f32.const infinity) (f32.const 0x1p-149)) (i32.const 1))
-(assert_return (invoke "gt" (f32.const -infinity) (f32.const -0x1p-126)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const -infinity) (f32.const 0x1p-126)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const infinity) (f32.const -0x1p-126)) (i32.const 1))
-(assert_return (invoke "gt" (f32.const infinity) (f32.const 0x1p-126)) (i32.const 1))
-(assert_return (invoke "gt" (f32.const -infinity) (f32.const -0x1p-1)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const -infinity) (f32.const 0x1p-1)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const infinity) (f32.const -0x1p-1)) (i32.const 1))
-(assert_return (invoke "gt" (f32.const infinity) (f32.const 0x1p-1)) (i32.const 1))
-(assert_return (invoke "gt" (f32.const -infinity) (f32.const -0x1p+0)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const -infinity) (f32.const 0x1p+0)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const infinity) (f32.const -0x1p+0)) (i32.const 1))
-(assert_return (invoke "gt" (f32.const infinity) (f32.const 0x1p+0)) (i32.const 1))
-(assert_return (invoke "gt" (f32.const -infinity) (f32.const -0x1.921fb6p+2)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const -infinity) (f32.const 0x1.921fb6p+2)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const infinity) (f32.const -0x1.921fb6p+2)) (i32.const 1))
-(assert_return (invoke "gt" (f32.const infinity) (f32.const 0x1.921fb6p+2)) (i32.const 1))
-(assert_return (invoke "gt" (f32.const -infinity) (f32.const -0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const -infinity) (f32.const 0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const infinity) (f32.const -0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "gt" (f32.const infinity) (f32.const 0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "gt" (f32.const -infinity) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const -infinity) (f32.const infinity)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const infinity) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "gt" (f32.const infinity) (f32.const infinity)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const -infinity) (f32.const -nan)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const -infinity) (f32.const nan)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const infinity) (f32.const -nan)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const infinity) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const 0x1.fffffep+127) (f32.const nan:0x200000)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -inf) (f32.const -0x0p+0)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -inf) (f32.const 0x0p+0)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const inf) (f32.const -0x0p+0)) (i32.const 1))
+(assert_return (invoke "gt" (f32.const inf) (f32.const 0x0p+0)) (i32.const 1))
+(assert_return (invoke "gt" (f32.const -inf) (f32.const -0x1p-149)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -inf) (f32.const 0x1p-149)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const inf) (f32.const -0x1p-149)) (i32.const 1))
+(assert_return (invoke "gt" (f32.const inf) (f32.const 0x1p-149)) (i32.const 1))
+(assert_return (invoke "gt" (f32.const -inf) (f32.const -0x1p-126)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -inf) (f32.const 0x1p-126)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const inf) (f32.const -0x1p-126)) (i32.const 1))
+(assert_return (invoke "gt" (f32.const inf) (f32.const 0x1p-126)) (i32.const 1))
+(assert_return (invoke "gt" (f32.const -inf) (f32.const -0x1p-1)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -inf) (f32.const 0x1p-1)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const inf) (f32.const -0x1p-1)) (i32.const 1))
+(assert_return (invoke "gt" (f32.const inf) (f32.const 0x1p-1)) (i32.const 1))
+(assert_return (invoke "gt" (f32.const -inf) (f32.const -0x1p+0)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -inf) (f32.const 0x1p+0)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const inf) (f32.const -0x1p+0)) (i32.const 1))
+(assert_return (invoke "gt" (f32.const inf) (f32.const 0x1p+0)) (i32.const 1))
+(assert_return (invoke "gt" (f32.const -inf) (f32.const -0x1.921fb6p+2)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -inf) (f32.const 0x1.921fb6p+2)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const inf) (f32.const -0x1.921fb6p+2)) (i32.const 1))
+(assert_return (invoke "gt" (f32.const inf) (f32.const 0x1.921fb6p+2)) (i32.const 1))
+(assert_return (invoke "gt" (f32.const -inf) (f32.const -0x1.fffffep+127)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -inf) (f32.const 0x1.fffffep+127)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const inf) (f32.const -0x1.fffffep+127)) (i32.const 1))
+(assert_return (invoke "gt" (f32.const inf) (f32.const 0x1.fffffep+127)) (i32.const 1))
+(assert_return (invoke "gt" (f32.const -inf) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -inf) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const inf) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "gt" (f32.const inf) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -inf) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -inf) (f32.const -nan:0x200000)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -inf) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -inf) (f32.const nan:0x200000)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const inf) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const inf) (f32.const -nan:0x200000)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const inf) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const inf) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -nan) (f32.const -0x0p+0)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -nan:0x200000) (f32.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -nan) (f32.const 0x0p+0)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -nan:0x200000) (f32.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const nan) (f32.const -0x0p+0)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const nan:0x200000) (f32.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const nan) (f32.const 0x0p+0)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const nan:0x200000) (f32.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -nan) (f32.const -0x1p-149)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -nan:0x200000) (f32.const -0x1p-149)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -nan) (f32.const 0x1p-149)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -nan:0x200000) (f32.const 0x1p-149)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const nan) (f32.const -0x1p-149)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const nan:0x200000) (f32.const -0x1p-149)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const nan) (f32.const 0x1p-149)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const nan:0x200000) (f32.const 0x1p-149)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -nan) (f32.const -0x1p-126)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -nan:0x200000) (f32.const -0x1p-126)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -nan) (f32.const 0x1p-126)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -nan:0x200000) (f32.const 0x1p-126)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const nan) (f32.const -0x1p-126)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const nan:0x200000) (f32.const -0x1p-126)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const nan) (f32.const 0x1p-126)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const nan:0x200000) (f32.const 0x1p-126)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -nan) (f32.const -0x1p-1)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -nan:0x200000) (f32.const -0x1p-1)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -nan) (f32.const 0x1p-1)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -nan:0x200000) (f32.const 0x1p-1)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const nan) (f32.const -0x1p-1)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const nan:0x200000) (f32.const -0x1p-1)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const nan) (f32.const 0x1p-1)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const nan:0x200000) (f32.const 0x1p-1)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -nan) (f32.const -0x1p+0)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -nan:0x200000) (f32.const -0x1p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -nan) (f32.const 0x1p+0)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -nan:0x200000) (f32.const 0x1p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const nan) (f32.const -0x1p+0)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const nan:0x200000) (f32.const -0x1p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const nan) (f32.const 0x1p+0)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const nan:0x200000) (f32.const 0x1p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -nan) (f32.const -0x1.921fb6p+2)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -nan:0x200000) (f32.const -0x1.921fb6p+2)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -nan) (f32.const 0x1.921fb6p+2)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -nan:0x200000) (f32.const 0x1.921fb6p+2)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const nan) (f32.const -0x1.921fb6p+2)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const nan:0x200000) (f32.const -0x1.921fb6p+2)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const nan) (f32.const 0x1.921fb6p+2)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const nan:0x200000) (f32.const 0x1.921fb6p+2)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -nan) (f32.const -0x1.fffffep+127)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -nan:0x200000) (f32.const -0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -nan) (f32.const 0x1.fffffep+127)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -nan:0x200000) (f32.const 0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const nan) (f32.const -0x1.fffffep+127)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const nan:0x200000) (f32.const -0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const nan) (f32.const 0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const -nan) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const -nan) (f32.const infinity)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const nan) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "gt" (f32.const nan) (f32.const infinity)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const nan:0x200000) (f32.const 0x1.fffffep+127)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -nan) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -nan:0x200000) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -nan) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -nan:0x200000) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const nan) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const nan:0x200000) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const nan) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const nan:0x200000) (f32.const inf)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -nan) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -nan:0x200000) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -nan) (f32.const -nan:0x200000)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -nan:0x200000) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const -nan) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -nan:0x200000) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -nan) (f32.const nan:0x200000)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const -nan:0x200000) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const nan) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const nan:0x200000) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const nan) (f32.const -nan:0x200000)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const nan:0x200000) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "gt" (f32.const nan) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const nan:0x200000) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const nan) (f32.const nan:0x200000)) (i32.const 0))
+(assert_return (invoke "gt" (f32.const nan:0x200000) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -0x0p+0) (f32.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "ge" (f32.const -0x0p+0) (f32.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "ge" (f32.const 0x0p+0) (f32.const -0x0p+0)) (i32.const 1))
@@ -1658,14 +2038,18 @@
 (assert_return (invoke "ge" (f32.const -0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const 0x0p+0) (f32.const -0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "ge" (f32.const 0x0p+0) (f32.const 0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const -0x0p+0) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f32.const -0x0p+0) (f32.const infinity)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const 0x0p+0) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f32.const 0x0p+0) (f32.const infinity)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -0x0p+0) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ge" (f32.const -0x0p+0) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const 0x0p+0) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ge" (f32.const 0x0p+0) (f32.const inf)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -0x0p+0) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -0x0p+0) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -0x0p+0) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -0x0p+0) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const 0x0p+0) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const 0x0p+0) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const 0x0p+0) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const 0x0p+0) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -0x1p-149) (f32.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -0x1p-149) (f32.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const 0x1p-149) (f32.const -0x0p+0)) (i32.const 1))
@@ -1694,14 +2078,18 @@
 (assert_return (invoke "ge" (f32.const -0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const 0x1p-149) (f32.const -0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "ge" (f32.const 0x1p-149) (f32.const 0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const -0x1p-149) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f32.const -0x1p-149) (f32.const infinity)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const 0x1p-149) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f32.const 0x1p-149) (f32.const infinity)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -0x1p-149) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ge" (f32.const -0x1p-149) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const 0x1p-149) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ge" (f32.const 0x1p-149) (f32.const inf)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -0x1p-149) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -0x1p-149) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -0x1p-149) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -0x1p-149) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const 0x1p-149) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const 0x1p-149) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const 0x1p-149) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const 0x1p-149) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -0x1p-126) (f32.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -0x1p-126) (f32.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const 0x1p-126) (f32.const -0x0p+0)) (i32.const 1))
@@ -1730,14 +2118,18 @@
 (assert_return (invoke "ge" (f32.const -0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const 0x1p-126) (f32.const -0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "ge" (f32.const 0x1p-126) (f32.const 0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const -0x1p-126) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f32.const -0x1p-126) (f32.const infinity)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const 0x1p-126) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f32.const 0x1p-126) (f32.const infinity)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -0x1p-126) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ge" (f32.const -0x1p-126) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const 0x1p-126) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ge" (f32.const 0x1p-126) (f32.const inf)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -0x1p-126) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -0x1p-126) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -0x1p-126) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -0x1p-126) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const 0x1p-126) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const 0x1p-126) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const 0x1p-126) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const 0x1p-126) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -0x1p-1) (f32.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -0x1p-1) (f32.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const 0x1p-1) (f32.const -0x0p+0)) (i32.const 1))
@@ -1766,14 +2158,18 @@
 (assert_return (invoke "ge" (f32.const -0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const 0x1p-1) (f32.const -0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "ge" (f32.const 0x1p-1) (f32.const 0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const -0x1p-1) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f32.const -0x1p-1) (f32.const infinity)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const 0x1p-1) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f32.const 0x1p-1) (f32.const infinity)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -0x1p-1) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ge" (f32.const -0x1p-1) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const 0x1p-1) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ge" (f32.const 0x1p-1) (f32.const inf)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -0x1p-1) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -0x1p-1) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -0x1p-1) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -0x1p-1) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const 0x1p-1) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const 0x1p-1) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const 0x1p-1) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const 0x1p-1) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -0x1p+0) (f32.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -0x1p+0) (f32.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const 0x1p+0) (f32.const -0x0p+0)) (i32.const 1))
@@ -1802,14 +2198,18 @@
 (assert_return (invoke "ge" (f32.const -0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const 0x1p+0) (f32.const -0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "ge" (f32.const 0x1p+0) (f32.const 0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const -0x1p+0) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f32.const -0x1p+0) (f32.const infinity)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const 0x1p+0) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f32.const 0x1p+0) (f32.const infinity)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -0x1p+0) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ge" (f32.const -0x1p+0) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const 0x1p+0) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ge" (f32.const 0x1p+0) (f32.const inf)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -0x1p+0) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -0x1p+0) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -0x1p+0) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -0x1p+0) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const 0x1p+0) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const 0x1p+0) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const 0x1p+0) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const 0x1p+0) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -0x1.921fb6p+2) (f32.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const 0x1.921fb6p+2) (f32.const -0x0p+0)) (i32.const 1))
@@ -1838,14 +2238,18 @@
 (assert_return (invoke "ge" (f32.const -0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const 0x1.921fb6p+2) (f32.const -0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "ge" (f32.const 0x1.921fb6p+2) (f32.const 0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const -0x1.921fb6p+2) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f32.const -0x1.921fb6p+2) (f32.const infinity)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const 0x1.921fb6p+2) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f32.const 0x1.921fb6p+2) (f32.const infinity)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -0x1.921fb6p+2) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ge" (f32.const -0x1.921fb6p+2) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const 0x1.921fb6p+2) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ge" (f32.const 0x1.921fb6p+2) (f32.const inf)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -0x1.921fb6p+2) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -0x1.921fb6p+2) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -0x1.921fb6p+2) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -0x1.921fb6p+2) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const 0x1.921fb6p+2) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const 0x1.921fb6p+2) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const 0x1.921fb6p+2) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const 0x1.921fb6p+2) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -0x1.fffffep+127) (f32.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const 0x1.fffffep+127) (f32.const -0x0p+0)) (i32.const 1))
@@ -1874,83 +2278,135 @@
 (assert_return (invoke "ge" (f32.const -0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const 0x1.fffffep+127) (f32.const -0x1.fffffep+127)) (i32.const 1))
 (assert_return (invoke "ge" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "ge" (f32.const -0x1.fffffep+127) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f32.const -0x1.fffffep+127) (f32.const infinity)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const 0x1.fffffep+127) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f32.const 0x1.fffffep+127) (f32.const infinity)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -0x1.fffffep+127) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ge" (f32.const -0x1.fffffep+127) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const 0x1.fffffep+127) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ge" (f32.const 0x1.fffffep+127) (f32.const inf)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -0x1.fffffep+127) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -0x1.fffffep+127) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -0x1.fffffep+127) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -0x1.fffffep+127) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const 0x1.fffffep+127) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const 0x1.fffffep+127) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const 0x1.fffffep+127) (f32.const nan)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const -infinity) (f32.const -0x0p+0)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const -infinity) (f32.const 0x0p+0)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const infinity) (f32.const -0x0p+0)) (i32.const 1))
-(assert_return (invoke "ge" (f32.const infinity) (f32.const 0x0p+0)) (i32.const 1))
-(assert_return (invoke "ge" (f32.const -infinity) (f32.const -0x1p-149)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const -infinity) (f32.const 0x1p-149)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const infinity) (f32.const -0x1p-149)) (i32.const 1))
-(assert_return (invoke "ge" (f32.const infinity) (f32.const 0x1p-149)) (i32.const 1))
-(assert_return (invoke "ge" (f32.const -infinity) (f32.const -0x1p-126)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const -infinity) (f32.const 0x1p-126)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const infinity) (f32.const -0x1p-126)) (i32.const 1))
-(assert_return (invoke "ge" (f32.const infinity) (f32.const 0x1p-126)) (i32.const 1))
-(assert_return (invoke "ge" (f32.const -infinity) (f32.const -0x1p-1)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const -infinity) (f32.const 0x1p-1)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const infinity) (f32.const -0x1p-1)) (i32.const 1))
-(assert_return (invoke "ge" (f32.const infinity) (f32.const 0x1p-1)) (i32.const 1))
-(assert_return (invoke "ge" (f32.const -infinity) (f32.const -0x1p+0)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const -infinity) (f32.const 0x1p+0)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const infinity) (f32.const -0x1p+0)) (i32.const 1))
-(assert_return (invoke "ge" (f32.const infinity) (f32.const 0x1p+0)) (i32.const 1))
-(assert_return (invoke "ge" (f32.const -infinity) (f32.const -0x1.921fb6p+2)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const -infinity) (f32.const 0x1.921fb6p+2)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const infinity) (f32.const -0x1.921fb6p+2)) (i32.const 1))
-(assert_return (invoke "ge" (f32.const infinity) (f32.const 0x1.921fb6p+2)) (i32.const 1))
-(assert_return (invoke "ge" (f32.const -infinity) (f32.const -0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const -infinity) (f32.const 0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const infinity) (f32.const -0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "ge" (f32.const infinity) (f32.const 0x1.fffffep+127)) (i32.const 1))
-(assert_return (invoke "ge" (f32.const -infinity) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f32.const -infinity) (f32.const infinity)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const infinity) (f32.const -infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f32.const infinity) (f32.const infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f32.const -infinity) (f32.const -nan)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const -infinity) (f32.const nan)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const infinity) (f32.const -nan)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const infinity) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const 0x1.fffffep+127) (f32.const nan:0x200000)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -inf) (f32.const -0x0p+0)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -inf) (f32.const 0x0p+0)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const inf) (f32.const -0x0p+0)) (i32.const 1))
+(assert_return (invoke "ge" (f32.const inf) (f32.const 0x0p+0)) (i32.const 1))
+(assert_return (invoke "ge" (f32.const -inf) (f32.const -0x1p-149)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -inf) (f32.const 0x1p-149)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const inf) (f32.const -0x1p-149)) (i32.const 1))
+(assert_return (invoke "ge" (f32.const inf) (f32.const 0x1p-149)) (i32.const 1))
+(assert_return (invoke "ge" (f32.const -inf) (f32.const -0x1p-126)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -inf) (f32.const 0x1p-126)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const inf) (f32.const -0x1p-126)) (i32.const 1))
+(assert_return (invoke "ge" (f32.const inf) (f32.const 0x1p-126)) (i32.const 1))
+(assert_return (invoke "ge" (f32.const -inf) (f32.const -0x1p-1)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -inf) (f32.const 0x1p-1)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const inf) (f32.const -0x1p-1)) (i32.const 1))
+(assert_return (invoke "ge" (f32.const inf) (f32.const 0x1p-1)) (i32.const 1))
+(assert_return (invoke "ge" (f32.const -inf) (f32.const -0x1p+0)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -inf) (f32.const 0x1p+0)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const inf) (f32.const -0x1p+0)) (i32.const 1))
+(assert_return (invoke "ge" (f32.const inf) (f32.const 0x1p+0)) (i32.const 1))
+(assert_return (invoke "ge" (f32.const -inf) (f32.const -0x1.921fb6p+2)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -inf) (f32.const 0x1.921fb6p+2)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const inf) (f32.const -0x1.921fb6p+2)) (i32.const 1))
+(assert_return (invoke "ge" (f32.const inf) (f32.const 0x1.921fb6p+2)) (i32.const 1))
+(assert_return (invoke "ge" (f32.const -inf) (f32.const -0x1.fffffep+127)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -inf) (f32.const 0x1.fffffep+127)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const inf) (f32.const -0x1.fffffep+127)) (i32.const 1))
+(assert_return (invoke "ge" (f32.const inf) (f32.const 0x1.fffffep+127)) (i32.const 1))
+(assert_return (invoke "ge" (f32.const -inf) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ge" (f32.const -inf) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const inf) (f32.const -inf)) (i32.const 1))
+(assert_return (invoke "ge" (f32.const inf) (f32.const inf)) (i32.const 1))
+(assert_return (invoke "ge" (f32.const -inf) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -inf) (f32.const -nan:0x200000)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -inf) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -inf) (f32.const nan:0x200000)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const inf) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const inf) (f32.const -nan:0x200000)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const inf) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const inf) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -nan) (f32.const -0x0p+0)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -nan:0x200000) (f32.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -nan) (f32.const 0x0p+0)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -nan:0x200000) (f32.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const nan) (f32.const -0x0p+0)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const nan:0x200000) (f32.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const nan) (f32.const 0x0p+0)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const nan:0x200000) (f32.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -nan) (f32.const -0x1p-149)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -nan:0x200000) (f32.const -0x1p-149)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -nan) (f32.const 0x1p-149)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -nan:0x200000) (f32.const 0x1p-149)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const nan) (f32.const -0x1p-149)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const nan:0x200000) (f32.const -0x1p-149)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const nan) (f32.const 0x1p-149)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const nan:0x200000) (f32.const 0x1p-149)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -nan) (f32.const -0x1p-126)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -nan:0x200000) (f32.const -0x1p-126)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -nan) (f32.const 0x1p-126)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -nan:0x200000) (f32.const 0x1p-126)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const nan) (f32.const -0x1p-126)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const nan:0x200000) (f32.const -0x1p-126)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const nan) (f32.const 0x1p-126)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const nan:0x200000) (f32.const 0x1p-126)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -nan) (f32.const -0x1p-1)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -nan:0x200000) (f32.const -0x1p-1)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -nan) (f32.const 0x1p-1)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -nan:0x200000) (f32.const 0x1p-1)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const nan) (f32.const -0x1p-1)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const nan:0x200000) (f32.const -0x1p-1)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const nan) (f32.const 0x1p-1)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const nan:0x200000) (f32.const 0x1p-1)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -nan) (f32.const -0x1p+0)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -nan:0x200000) (f32.const -0x1p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -nan) (f32.const 0x1p+0)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -nan:0x200000) (f32.const 0x1p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const nan) (f32.const -0x1p+0)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const nan:0x200000) (f32.const -0x1p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const nan) (f32.const 0x1p+0)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const nan:0x200000) (f32.const 0x1p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -nan) (f32.const -0x1.921fb6p+2)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -nan:0x200000) (f32.const -0x1.921fb6p+2)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -nan) (f32.const 0x1.921fb6p+2)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -nan:0x200000) (f32.const 0x1.921fb6p+2)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const nan) (f32.const -0x1.921fb6p+2)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const nan:0x200000) (f32.const -0x1.921fb6p+2)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const nan) (f32.const 0x1.921fb6p+2)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const nan:0x200000) (f32.const 0x1.921fb6p+2)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -nan) (f32.const -0x1.fffffep+127)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -nan:0x200000) (f32.const -0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -nan) (f32.const 0x1.fffffep+127)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -nan:0x200000) (f32.const 0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const nan) (f32.const -0x1.fffffep+127)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const nan:0x200000) (f32.const -0x1.fffffep+127)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const nan) (f32.const 0x1.fffffep+127)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const -nan) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const -nan) (f32.const infinity)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const nan) (f32.const -infinity)) (i32.const 0))
-(assert_return (invoke "ge" (f32.const nan) (f32.const infinity)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const nan:0x200000) (f32.const 0x1.fffffep+127)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -nan) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -nan:0x200000) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -nan) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -nan:0x200000) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const nan) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const nan:0x200000) (f32.const -inf)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const nan) (f32.const inf)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const nan:0x200000) (f32.const inf)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -nan) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -nan:0x200000) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -nan) (f32.const -nan:0x200000)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -nan:0x200000) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const -nan) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -nan:0x200000) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -nan) (f32.const nan:0x200000)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const -nan:0x200000) (f32.const nan:0x200000)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const nan) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const nan:0x200000) (f32.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const nan) (f32.const -nan:0x200000)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const nan:0x200000) (f32.const -nan:0x200000)) (i32.const 0))
 (assert_return (invoke "ge" (f32.const nan) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const nan:0x200000) (f32.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const nan) (f32.const nan:0x200000)) (i32.const 0))
+(assert_return (invoke "ge" (f32.const nan:0x200000) (f32.const nan:0x200000)) (i32.const 0))
diff --git a/test/WasmSpec/testsuite/core/f64.load32.fail.wast b/test/WasmSpec/testsuite/core/f64.load32.fail.wast
deleted file mode 100644
index 38811ff..0000000
--- a/test/WasmSpec/testsuite/core/f64.load32.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (memory 1) (func (param i32) (result f64) (f64.load32 (get_local 0))))
diff --git a/test/WasmSpec/testsuite/core/f64.load64.fail.wast b/test/WasmSpec/testsuite/core/f64.load64.fail.wast
deleted file mode 100644
index f3c30ef..0000000
--- a/test/WasmSpec/testsuite/core/f64.load64.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (memory 1) (func (param i32) (result f64) (f64.load64 (get_local 0))))
diff --git a/test/WasmSpec/testsuite/core/f64.store32.fail.wast b/test/WasmSpec/testsuite/core/f64.store32.fail.wast
deleted file mode 100644
index 92858a3..0000000
--- a/test/WasmSpec/testsuite/core/f64.store32.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (memory 1) (func (param i32) (param f32) (f64.store32 (get_local 0) (get_local 1))))
diff --git a/test/WasmSpec/testsuite/core/f64.store64.fail.wast b/test/WasmSpec/testsuite/core/f64.store64.fail.wast
deleted file mode 100644
index 2b49017..0000000
--- a/test/WasmSpec/testsuite/core/f64.store64.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (memory 1) (func (param i32) (param f64) (f64.store64 (get_local 0) (get_local 1))))
diff --git a/test/WasmSpec/testsuite/core/f64.wast b/test/WasmSpec/testsuite/core/f64.wast
index 00eff4d..50db4e7 100644
--- a/test/WasmSpec/testsuite/core/f64.wast
+++ b/test/WasmSpec/testsuite/core/f64.wast
@@ -1,5 +1,6 @@
 ;; Test all the f64 operators on major boundary values and all special
-;; values (except comparison operators, which are tested in f64_cmp.wast).
+;; values (except comparison and bitwise operators, which are tested in
+;; f64_bitwise.wast and f64_cmp.wast).
 
 (module
   (func (export "add") (param $x f64) (param $y f64) (result f64) (f64.add (get_local $x) (get_local $y)))
@@ -13,9 +14,6 @@
   (func (export "floor") (param $x f64) (result f64) (f64.floor (get_local $x)))
   (func (export "trunc") (param $x f64) (result f64) (f64.trunc (get_local $x)))
   (func (export "nearest") (param $x f64) (result f64) (f64.nearest (get_local $x)))
-  (func (export "abs") (param $x f64) (result f64) (f64.abs (get_local $x)))
-  (func (export "neg") (param $x f64) (result f64) (f64.neg (get_local $x)))
-  (func (export "copysign") (param $x f64) (param $y f64) (result f64) (f64.copysign (get_local $x) (get_local $y)))
 )
 
 (assert_return (invoke "add" (f64.const -0x0p+0) (f64.const -0x0p+0)) (f64.const -0x0p+0))
@@ -46,14 +44,18 @@
 (assert_return (invoke "add" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
 (assert_return (invoke "add" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "add" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "add" (f64.const -0x0p+0) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "add" (f64.const -0x0p+0) (f64.const infinity)) (f64.const infinity))
-(assert_return (invoke "add" (f64.const 0x0p+0) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "add" (f64.const 0x0p+0) (f64.const infinity)) (f64.const infinity))
+(assert_return (invoke "add" (f64.const -0x0p+0) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "add" (f64.const -0x0p+0) (f64.const inf)) (f64.const inf))
+(assert_return (invoke "add" (f64.const 0x0p+0) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "add" (f64.const 0x0p+0) (f64.const inf)) (f64.const inf))
 (assert_return_canonical_nan (invoke "add" (f64.const -0x0p+0) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -0x0p+0) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "add" (f64.const -0x0p+0) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -0x0p+0) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "add" (f64.const 0x0p+0) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const 0x0p+0) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "add" (f64.const 0x0p+0) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const 0x0p+0) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "add" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const -0x0.0000000000001p-1022))
 (assert_return (invoke "add" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const -0x0.0000000000001p-1022))
 (assert_return (invoke "add" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const 0x0.0000000000001p-1022))
@@ -82,14 +84,18 @@
 (assert_return (invoke "add" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
 (assert_return (invoke "add" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "add" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "add" (f64.const -0x0.0000000000001p-1022) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "add" (f64.const -0x0.0000000000001p-1022) (f64.const infinity)) (f64.const infinity))
-(assert_return (invoke "add" (f64.const 0x0.0000000000001p-1022) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "add" (f64.const 0x0.0000000000001p-1022) (f64.const infinity)) (f64.const infinity))
+(assert_return (invoke "add" (f64.const -0x0.0000000000001p-1022) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "add" (f64.const -0x0.0000000000001p-1022) (f64.const inf)) (f64.const inf))
+(assert_return (invoke "add" (f64.const 0x0.0000000000001p-1022) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "add" (f64.const 0x0.0000000000001p-1022) (f64.const inf)) (f64.const inf))
 (assert_return_canonical_nan (invoke "add" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "add" (f64.const -0x0.0000000000001p-1022) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "add" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const 0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "add" (f64.const 0x0.0000000000001p-1022) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const 0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "add" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (f64.const -0x1p-1022))
 (assert_return (invoke "add" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (f64.const -0x1p-1022))
 (assert_return (invoke "add" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (f64.const 0x1p-1022))
@@ -118,14 +124,18 @@
 (assert_return (invoke "add" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
 (assert_return (invoke "add" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "add" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "add" (f64.const -0x1p-1022) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "add" (f64.const -0x1p-1022) (f64.const infinity)) (f64.const infinity))
-(assert_return (invoke "add" (f64.const 0x1p-1022) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "add" (f64.const 0x1p-1022) (f64.const infinity)) (f64.const infinity))
+(assert_return (invoke "add" (f64.const -0x1p-1022) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "add" (f64.const -0x1p-1022) (f64.const inf)) (f64.const inf))
+(assert_return (invoke "add" (f64.const 0x1p-1022) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "add" (f64.const 0x1p-1022) (f64.const inf)) (f64.const inf))
 (assert_return_canonical_nan (invoke "add" (f64.const -0x1p-1022) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -0x1p-1022) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "add" (f64.const -0x1p-1022) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -0x1p-1022) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "add" (f64.const 0x1p-1022) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const 0x1p-1022) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "add" (f64.const 0x1p-1022) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const 0x1p-1022) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "add" (f64.const -0x1p-1) (f64.const -0x0p+0)) (f64.const -0x1p-1))
 (assert_return (invoke "add" (f64.const -0x1p-1) (f64.const 0x0p+0)) (f64.const -0x1p-1))
 (assert_return (invoke "add" (f64.const 0x1p-1) (f64.const -0x0p+0)) (f64.const 0x1p-1))
@@ -154,14 +164,18 @@
 (assert_return (invoke "add" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
 (assert_return (invoke "add" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "add" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "add" (f64.const -0x1p-1) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "add" (f64.const -0x1p-1) (f64.const infinity)) (f64.const infinity))
-(assert_return (invoke "add" (f64.const 0x1p-1) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "add" (f64.const 0x1p-1) (f64.const infinity)) (f64.const infinity))
+(assert_return (invoke "add" (f64.const -0x1p-1) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "add" (f64.const -0x1p-1) (f64.const inf)) (f64.const inf))
+(assert_return (invoke "add" (f64.const 0x1p-1) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "add" (f64.const 0x1p-1) (f64.const inf)) (f64.const inf))
 (assert_return_canonical_nan (invoke "add" (f64.const -0x1p-1) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -0x1p-1) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "add" (f64.const -0x1p-1) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -0x1p-1) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "add" (f64.const 0x1p-1) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const 0x1p-1) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "add" (f64.const 0x1p-1) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const 0x1p-1) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "add" (f64.const -0x1p+0) (f64.const -0x0p+0)) (f64.const -0x1p+0))
 (assert_return (invoke "add" (f64.const -0x1p+0) (f64.const 0x0p+0)) (f64.const -0x1p+0))
 (assert_return (invoke "add" (f64.const 0x1p+0) (f64.const -0x0p+0)) (f64.const 0x1p+0))
@@ -190,14 +204,18 @@
 (assert_return (invoke "add" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
 (assert_return (invoke "add" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "add" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "add" (f64.const -0x1p+0) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "add" (f64.const -0x1p+0) (f64.const infinity)) (f64.const infinity))
-(assert_return (invoke "add" (f64.const 0x1p+0) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "add" (f64.const 0x1p+0) (f64.const infinity)) (f64.const infinity))
+(assert_return (invoke "add" (f64.const -0x1p+0) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "add" (f64.const -0x1p+0) (f64.const inf)) (f64.const inf))
+(assert_return (invoke "add" (f64.const 0x1p+0) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "add" (f64.const 0x1p+0) (f64.const inf)) (f64.const inf))
 (assert_return_canonical_nan (invoke "add" (f64.const -0x1p+0) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -0x1p+0) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "add" (f64.const -0x1p+0) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -0x1p+0) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "add" (f64.const 0x1p+0) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const 0x1p+0) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "add" (f64.const 0x1p+0) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const 0x1p+0) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "add" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const -0x1.921fb54442d18p+2))
 (assert_return (invoke "add" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const -0x1.921fb54442d18p+2))
 (assert_return (invoke "add" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const 0x1.921fb54442d18p+2))
@@ -226,14 +244,18 @@
 (assert_return (invoke "add" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
 (assert_return (invoke "add" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "add" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "add" (f64.const -0x1.921fb54442d18p+2) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "add" (f64.const -0x1.921fb54442d18p+2) (f64.const infinity)) (f64.const infinity))
-(assert_return (invoke "add" (f64.const 0x1.921fb54442d18p+2) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "add" (f64.const 0x1.921fb54442d18p+2) (f64.const infinity)) (f64.const infinity))
+(assert_return (invoke "add" (f64.const -0x1.921fb54442d18p+2) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "add" (f64.const -0x1.921fb54442d18p+2) (f64.const inf)) (f64.const inf))
+(assert_return (invoke "add" (f64.const 0x1.921fb54442d18p+2) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "add" (f64.const 0x1.921fb54442d18p+2) (f64.const inf)) (f64.const inf))
 (assert_return_canonical_nan (invoke "add" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "add" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "add" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "add" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const 0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "add" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "add" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "add" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const 0x1.fffffffffffffp+1023))
@@ -258,90 +280,142 @@
 (assert_return (invoke "add" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "add" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.fffffffffffffp+1023))
 (assert_return (invoke "add" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "add" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -infinity))
+(assert_return (invoke "add" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -inf))
 (assert_return (invoke "add" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0p+0))
 (assert_return (invoke "add" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x0p+0))
-(assert_return (invoke "add" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const infinity))
-(assert_return (invoke "add" (f64.const -0x1.fffffffffffffp+1023) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "add" (f64.const -0x1.fffffffffffffp+1023) (f64.const infinity)) (f64.const infinity))
-(assert_return (invoke "add" (f64.const 0x1.fffffffffffffp+1023) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "add" (f64.const 0x1.fffffffffffffp+1023) (f64.const infinity)) (f64.const infinity))
+(assert_return (invoke "add" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const inf))
+(assert_return (invoke "add" (f64.const -0x1.fffffffffffffp+1023) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "add" (f64.const -0x1.fffffffffffffp+1023) (f64.const inf)) (f64.const inf))
+(assert_return (invoke "add" (f64.const 0x1.fffffffffffffp+1023) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "add" (f64.const 0x1.fffffffffffffp+1023) (f64.const inf)) (f64.const inf))
 (assert_return_canonical_nan (invoke "add" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "add" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "add" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "add" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)))
-(assert_return (invoke "add" (f64.const -infinity) (f64.const -0x0p+0)) (f64.const -infinity))
-(assert_return (invoke "add" (f64.const -infinity) (f64.const 0x0p+0)) (f64.const -infinity))
-(assert_return (invoke "add" (f64.const infinity) (f64.const -0x0p+0)) (f64.const infinity))
-(assert_return (invoke "add" (f64.const infinity) (f64.const 0x0p+0)) (f64.const infinity))
-(assert_return (invoke "add" (f64.const -infinity) (f64.const -0x0.0000000000001p-1022)) (f64.const -infinity))
-(assert_return (invoke "add" (f64.const -infinity) (f64.const 0x0.0000000000001p-1022)) (f64.const -infinity))
-(assert_return (invoke "add" (f64.const infinity) (f64.const -0x0.0000000000001p-1022)) (f64.const infinity))
-(assert_return (invoke "add" (f64.const infinity) (f64.const 0x0.0000000000001p-1022)) (f64.const infinity))
-(assert_return (invoke "add" (f64.const -infinity) (f64.const -0x1p-1022)) (f64.const -infinity))
-(assert_return (invoke "add" (f64.const -infinity) (f64.const 0x1p-1022)) (f64.const -infinity))
-(assert_return (invoke "add" (f64.const infinity) (f64.const -0x1p-1022)) (f64.const infinity))
-(assert_return (invoke "add" (f64.const infinity) (f64.const 0x1p-1022)) (f64.const infinity))
-(assert_return (invoke "add" (f64.const -infinity) (f64.const -0x1p-1)) (f64.const -infinity))
-(assert_return (invoke "add" (f64.const -infinity) (f64.const 0x1p-1)) (f64.const -infinity))
-(assert_return (invoke "add" (f64.const infinity) (f64.const -0x1p-1)) (f64.const infinity))
-(assert_return (invoke "add" (f64.const infinity) (f64.const 0x1p-1)) (f64.const infinity))
-(assert_return (invoke "add" (f64.const -infinity) (f64.const -0x1p+0)) (f64.const -infinity))
-(assert_return (invoke "add" (f64.const -infinity) (f64.const 0x1p+0)) (f64.const -infinity))
-(assert_return (invoke "add" (f64.const infinity) (f64.const -0x1p+0)) (f64.const infinity))
-(assert_return (invoke "add" (f64.const infinity) (f64.const 0x1p+0)) (f64.const infinity))
-(assert_return (invoke "add" (f64.const -infinity) (f64.const -0x1.921fb54442d18p+2)) (f64.const -infinity))
-(assert_return (invoke "add" (f64.const -infinity) (f64.const 0x1.921fb54442d18p+2)) (f64.const -infinity))
-(assert_return (invoke "add" (f64.const infinity) (f64.const -0x1.921fb54442d18p+2)) (f64.const infinity))
-(assert_return (invoke "add" (f64.const infinity) (f64.const 0x1.921fb54442d18p+2)) (f64.const infinity))
-(assert_return (invoke "add" (f64.const -infinity) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -infinity))
-(assert_return (invoke "add" (f64.const -infinity) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -infinity))
-(assert_return (invoke "add" (f64.const infinity) (f64.const -0x1.fffffffffffffp+1023)) (f64.const infinity))
-(assert_return (invoke "add" (f64.const infinity) (f64.const 0x1.fffffffffffffp+1023)) (f64.const infinity))
-(assert_return (invoke "add" (f64.const -infinity) (f64.const -infinity)) (f64.const -infinity))
-(assert_return_canonical_nan (invoke "add" (f64.const -infinity) (f64.const infinity)))
-(assert_return_canonical_nan (invoke "add" (f64.const infinity) (f64.const -infinity)))
-(assert_return (invoke "add" (f64.const infinity) (f64.const infinity)) (f64.const infinity))
-(assert_return_canonical_nan (invoke "add" (f64.const -infinity) (f64.const -nan)))
-(assert_return_canonical_nan (invoke "add" (f64.const -infinity) (f64.const nan)))
-(assert_return_canonical_nan (invoke "add" (f64.const infinity) (f64.const -nan)))
-(assert_return_canonical_nan (invoke "add" (f64.const infinity) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)))
+(assert_return (invoke "add" (f64.const -inf) (f64.const -0x0p+0)) (f64.const -inf))
+(assert_return (invoke "add" (f64.const -inf) (f64.const 0x0p+0)) (f64.const -inf))
+(assert_return (invoke "add" (f64.const inf) (f64.const -0x0p+0)) (f64.const inf))
+(assert_return (invoke "add" (f64.const inf) (f64.const 0x0p+0)) (f64.const inf))
+(assert_return (invoke "add" (f64.const -inf) (f64.const -0x0.0000000000001p-1022)) (f64.const -inf))
+(assert_return (invoke "add" (f64.const -inf) (f64.const 0x0.0000000000001p-1022)) (f64.const -inf))
+(assert_return (invoke "add" (f64.const inf) (f64.const -0x0.0000000000001p-1022)) (f64.const inf))
+(assert_return (invoke "add" (f64.const inf) (f64.const 0x0.0000000000001p-1022)) (f64.const inf))
+(assert_return (invoke "add" (f64.const -inf) (f64.const -0x1p-1022)) (f64.const -inf))
+(assert_return (invoke "add" (f64.const -inf) (f64.const 0x1p-1022)) (f64.const -inf))
+(assert_return (invoke "add" (f64.const inf) (f64.const -0x1p-1022)) (f64.const inf))
+(assert_return (invoke "add" (f64.const inf) (f64.const 0x1p-1022)) (f64.const inf))
+(assert_return (invoke "add" (f64.const -inf) (f64.const -0x1p-1)) (f64.const -inf))
+(assert_return (invoke "add" (f64.const -inf) (f64.const 0x1p-1)) (f64.const -inf))
+(assert_return (invoke "add" (f64.const inf) (f64.const -0x1p-1)) (f64.const inf))
+(assert_return (invoke "add" (f64.const inf) (f64.const 0x1p-1)) (f64.const inf))
+(assert_return (invoke "add" (f64.const -inf) (f64.const -0x1p+0)) (f64.const -inf))
+(assert_return (invoke "add" (f64.const -inf) (f64.const 0x1p+0)) (f64.const -inf))
+(assert_return (invoke "add" (f64.const inf) (f64.const -0x1p+0)) (f64.const inf))
+(assert_return (invoke "add" (f64.const inf) (f64.const 0x1p+0)) (f64.const inf))
+(assert_return (invoke "add" (f64.const -inf) (f64.const -0x1.921fb54442d18p+2)) (f64.const -inf))
+(assert_return (invoke "add" (f64.const -inf) (f64.const 0x1.921fb54442d18p+2)) (f64.const -inf))
+(assert_return (invoke "add" (f64.const inf) (f64.const -0x1.921fb54442d18p+2)) (f64.const inf))
+(assert_return (invoke "add" (f64.const inf) (f64.const 0x1.921fb54442d18p+2)) (f64.const inf))
+(assert_return (invoke "add" (f64.const -inf) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -inf))
+(assert_return (invoke "add" (f64.const -inf) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -inf))
+(assert_return (invoke "add" (f64.const inf) (f64.const -0x1.fffffffffffffp+1023)) (f64.const inf))
+(assert_return (invoke "add" (f64.const inf) (f64.const 0x1.fffffffffffffp+1023)) (f64.const inf))
+(assert_return (invoke "add" (f64.const -inf) (f64.const -inf)) (f64.const -inf))
+(assert_return_canonical_nan (invoke "add" (f64.const -inf) (f64.const inf)))
+(assert_return_canonical_nan (invoke "add" (f64.const inf) (f64.const -inf)))
+(assert_return (invoke "add" (f64.const inf) (f64.const inf)) (f64.const inf))
+(assert_return_canonical_nan (invoke "add" (f64.const -inf) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -inf) (f64.const -nan:0x4000000000000)))
+(assert_return_canonical_nan (invoke "add" (f64.const -inf) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -inf) (f64.const nan:0x4000000000000)))
+(assert_return_canonical_nan (invoke "add" (f64.const inf) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const inf) (f64.const -nan:0x4000000000000)))
+(assert_return_canonical_nan (invoke "add" (f64.const inf) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const inf) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "add" (f64.const -nan) (f64.const -0x0p+0)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -nan:0x4000000000000) (f64.const -0x0p+0)))
 (assert_return_canonical_nan (invoke "add" (f64.const -nan) (f64.const 0x0p+0)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -nan:0x4000000000000) (f64.const 0x0p+0)))
 (assert_return_canonical_nan (invoke "add" (f64.const nan) (f64.const -0x0p+0)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const nan:0x4000000000000) (f64.const -0x0p+0)))
 (assert_return_canonical_nan (invoke "add" (f64.const nan) (f64.const 0x0p+0)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const nan:0x4000000000000) (f64.const 0x0p+0)))
 (assert_return_canonical_nan (invoke "add" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)))
 (assert_return_canonical_nan (invoke "add" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)))
 (assert_return_canonical_nan (invoke "add" (f64.const nan) (f64.const -0x0.0000000000001p-1022)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)))
 (assert_return_canonical_nan (invoke "add" (f64.const nan) (f64.const 0x0.0000000000001p-1022)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)))
 (assert_return_canonical_nan (invoke "add" (f64.const -nan) (f64.const -0x1p-1022)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1022)))
 (assert_return_canonical_nan (invoke "add" (f64.const -nan) (f64.const 0x1p-1022)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1022)))
 (assert_return_canonical_nan (invoke "add" (f64.const nan) (f64.const -0x1p-1022)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const nan:0x4000000000000) (f64.const -0x1p-1022)))
 (assert_return_canonical_nan (invoke "add" (f64.const nan) (f64.const 0x1p-1022)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const nan:0x4000000000000) (f64.const 0x1p-1022)))
 (assert_return_canonical_nan (invoke "add" (f64.const -nan) (f64.const -0x1p-1)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1)))
 (assert_return_canonical_nan (invoke "add" (f64.const -nan) (f64.const 0x1p-1)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1)))
 (assert_return_canonical_nan (invoke "add" (f64.const nan) (f64.const -0x1p-1)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const nan:0x4000000000000) (f64.const -0x1p-1)))
 (assert_return_canonical_nan (invoke "add" (f64.const nan) (f64.const 0x1p-1)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const nan:0x4000000000000) (f64.const 0x1p-1)))
 (assert_return_canonical_nan (invoke "add" (f64.const -nan) (f64.const -0x1p+0)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -nan:0x4000000000000) (f64.const -0x1p+0)))
 (assert_return_canonical_nan (invoke "add" (f64.const -nan) (f64.const 0x1p+0)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -nan:0x4000000000000) (f64.const 0x1p+0)))
 (assert_return_canonical_nan (invoke "add" (f64.const nan) (f64.const -0x1p+0)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const nan:0x4000000000000) (f64.const -0x1p+0)))
 (assert_return_canonical_nan (invoke "add" (f64.const nan) (f64.const 0x1p+0)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const nan:0x4000000000000) (f64.const 0x1p+0)))
 (assert_return_canonical_nan (invoke "add" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)))
 (assert_return_canonical_nan (invoke "add" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)))
 (assert_return_canonical_nan (invoke "add" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)))
 (assert_return_canonical_nan (invoke "add" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)))
 (assert_return_canonical_nan (invoke "add" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)))
 (assert_return_canonical_nan (invoke "add" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)))
 (assert_return_canonical_nan (invoke "add" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)))
 (assert_return_canonical_nan (invoke "add" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)))
-(assert_return_canonical_nan (invoke "add" (f64.const -nan) (f64.const -infinity)))
-(assert_return_canonical_nan (invoke "add" (f64.const -nan) (f64.const infinity)))
-(assert_return_canonical_nan (invoke "add" (f64.const nan) (f64.const -infinity)))
-(assert_return_canonical_nan (invoke "add" (f64.const nan) (f64.const infinity)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)))
+(assert_return_canonical_nan (invoke "add" (f64.const -nan) (f64.const -inf)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -nan:0x4000000000000) (f64.const -inf)))
+(assert_return_canonical_nan (invoke "add" (f64.const -nan) (f64.const inf)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -nan:0x4000000000000) (f64.const inf)))
+(assert_return_canonical_nan (invoke "add" (f64.const nan) (f64.const -inf)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const nan:0x4000000000000) (f64.const -inf)))
+(assert_return_canonical_nan (invoke "add" (f64.const nan) (f64.const inf)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const nan:0x4000000000000) (f64.const inf)))
 (assert_return_canonical_nan (invoke "add" (f64.const -nan) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -nan:0x4000000000000) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -nan) (f64.const -nan:0x4000000000000)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -nan:0x4000000000000) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "add" (f64.const -nan) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -nan:0x4000000000000) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -nan) (f64.const nan:0x4000000000000)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const -nan:0x4000000000000) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "add" (f64.const nan) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const nan:0x4000000000000) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const nan) (f64.const -nan:0x4000000000000)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const nan:0x4000000000000) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "add" (f64.const nan) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const nan:0x4000000000000) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const nan) (f64.const nan:0x4000000000000)))
+(assert_return_arithmetic_nan (invoke "add" (f64.const nan:0x4000000000000) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "sub" (f64.const -0x0p+0) (f64.const -0x0p+0)) (f64.const 0x0p+0))
 (assert_return (invoke "sub" (f64.const -0x0p+0) (f64.const 0x0p+0)) (f64.const -0x0p+0))
 (assert_return (invoke "sub" (f64.const 0x0p+0) (f64.const -0x0p+0)) (f64.const 0x0p+0))
@@ -370,14 +444,18 @@
 (assert_return (invoke "sub" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "sub" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
 (assert_return (invoke "sub" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
-(assert_return (invoke "sub" (f64.const -0x0p+0) (f64.const -infinity)) (f64.const infinity))
-(assert_return (invoke "sub" (f64.const -0x0p+0) (f64.const infinity)) (f64.const -infinity))
-(assert_return (invoke "sub" (f64.const 0x0p+0) (f64.const -infinity)) (f64.const infinity))
-(assert_return (invoke "sub" (f64.const 0x0p+0) (f64.const infinity)) (f64.const -infinity))
+(assert_return (invoke "sub" (f64.const -0x0p+0) (f64.const -inf)) (f64.const inf))
+(assert_return (invoke "sub" (f64.const -0x0p+0) (f64.const inf)) (f64.const -inf))
+(assert_return (invoke "sub" (f64.const 0x0p+0) (f64.const -inf)) (f64.const inf))
+(assert_return (invoke "sub" (f64.const 0x0p+0) (f64.const inf)) (f64.const -inf))
 (assert_return_canonical_nan (invoke "sub" (f64.const -0x0p+0) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -0x0p+0) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "sub" (f64.const -0x0p+0) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -0x0p+0) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "sub" (f64.const 0x0p+0) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const 0x0p+0) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "sub" (f64.const 0x0p+0) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const 0x0p+0) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "sub" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const -0x0.0000000000001p-1022))
 (assert_return (invoke "sub" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const -0x0.0000000000001p-1022))
 (assert_return (invoke "sub" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const 0x0.0000000000001p-1022))
@@ -406,14 +484,18 @@
 (assert_return (invoke "sub" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "sub" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
 (assert_return (invoke "sub" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
-(assert_return (invoke "sub" (f64.const -0x0.0000000000001p-1022) (f64.const -infinity)) (f64.const infinity))
-(assert_return (invoke "sub" (f64.const -0x0.0000000000001p-1022) (f64.const infinity)) (f64.const -infinity))
-(assert_return (invoke "sub" (f64.const 0x0.0000000000001p-1022) (f64.const -infinity)) (f64.const infinity))
-(assert_return (invoke "sub" (f64.const 0x0.0000000000001p-1022) (f64.const infinity)) (f64.const -infinity))
+(assert_return (invoke "sub" (f64.const -0x0.0000000000001p-1022) (f64.const -inf)) (f64.const inf))
+(assert_return (invoke "sub" (f64.const -0x0.0000000000001p-1022) (f64.const inf)) (f64.const -inf))
+(assert_return (invoke "sub" (f64.const 0x0.0000000000001p-1022) (f64.const -inf)) (f64.const inf))
+(assert_return (invoke "sub" (f64.const 0x0.0000000000001p-1022) (f64.const inf)) (f64.const -inf))
 (assert_return_canonical_nan (invoke "sub" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "sub" (f64.const -0x0.0000000000001p-1022) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "sub" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const 0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "sub" (f64.const 0x0.0000000000001p-1022) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const 0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "sub" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (f64.const -0x1p-1022))
 (assert_return (invoke "sub" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (f64.const -0x1p-1022))
 (assert_return (invoke "sub" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (f64.const 0x1p-1022))
@@ -442,14 +524,18 @@
 (assert_return (invoke "sub" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "sub" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
 (assert_return (invoke "sub" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
-(assert_return (invoke "sub" (f64.const -0x1p-1022) (f64.const -infinity)) (f64.const infinity))
-(assert_return (invoke "sub" (f64.const -0x1p-1022) (f64.const infinity)) (f64.const -infinity))
-(assert_return (invoke "sub" (f64.const 0x1p-1022) (f64.const -infinity)) (f64.const infinity))
-(assert_return (invoke "sub" (f64.const 0x1p-1022) (f64.const infinity)) (f64.const -infinity))
+(assert_return (invoke "sub" (f64.const -0x1p-1022) (f64.const -inf)) (f64.const inf))
+(assert_return (invoke "sub" (f64.const -0x1p-1022) (f64.const inf)) (f64.const -inf))
+(assert_return (invoke "sub" (f64.const 0x1p-1022) (f64.const -inf)) (f64.const inf))
+(assert_return (invoke "sub" (f64.const 0x1p-1022) (f64.const inf)) (f64.const -inf))
 (assert_return_canonical_nan (invoke "sub" (f64.const -0x1p-1022) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -0x1p-1022) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "sub" (f64.const -0x1p-1022) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -0x1p-1022) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "sub" (f64.const 0x1p-1022) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const 0x1p-1022) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "sub" (f64.const 0x1p-1022) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const 0x1p-1022) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "sub" (f64.const -0x1p-1) (f64.const -0x0p+0)) (f64.const -0x1p-1))
 (assert_return (invoke "sub" (f64.const -0x1p-1) (f64.const 0x0p+0)) (f64.const -0x1p-1))
 (assert_return (invoke "sub" (f64.const 0x1p-1) (f64.const -0x0p+0)) (f64.const 0x1p-1))
@@ -478,14 +564,18 @@
 (assert_return (invoke "sub" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "sub" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
 (assert_return (invoke "sub" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
-(assert_return (invoke "sub" (f64.const -0x1p-1) (f64.const -infinity)) (f64.const infinity))
-(assert_return (invoke "sub" (f64.const -0x1p-1) (f64.const infinity)) (f64.const -infinity))
-(assert_return (invoke "sub" (f64.const 0x1p-1) (f64.const -infinity)) (f64.const infinity))
-(assert_return (invoke "sub" (f64.const 0x1p-1) (f64.const infinity)) (f64.const -infinity))
+(assert_return (invoke "sub" (f64.const -0x1p-1) (f64.const -inf)) (f64.const inf))
+(assert_return (invoke "sub" (f64.const -0x1p-1) (f64.const inf)) (f64.const -inf))
+(assert_return (invoke "sub" (f64.const 0x1p-1) (f64.const -inf)) (f64.const inf))
+(assert_return (invoke "sub" (f64.const 0x1p-1) (f64.const inf)) (f64.const -inf))
 (assert_return_canonical_nan (invoke "sub" (f64.const -0x1p-1) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -0x1p-1) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "sub" (f64.const -0x1p-1) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -0x1p-1) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "sub" (f64.const 0x1p-1) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const 0x1p-1) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "sub" (f64.const 0x1p-1) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const 0x1p-1) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "sub" (f64.const -0x1p+0) (f64.const -0x0p+0)) (f64.const -0x1p+0))
 (assert_return (invoke "sub" (f64.const -0x1p+0) (f64.const 0x0p+0)) (f64.const -0x1p+0))
 (assert_return (invoke "sub" (f64.const 0x1p+0) (f64.const -0x0p+0)) (f64.const 0x1p+0))
@@ -514,14 +604,18 @@
 (assert_return (invoke "sub" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "sub" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
 (assert_return (invoke "sub" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
-(assert_return (invoke "sub" (f64.const -0x1p+0) (f64.const -infinity)) (f64.const infinity))
-(assert_return (invoke "sub" (f64.const -0x1p+0) (f64.const infinity)) (f64.const -infinity))
-(assert_return (invoke "sub" (f64.const 0x1p+0) (f64.const -infinity)) (f64.const infinity))
-(assert_return (invoke "sub" (f64.const 0x1p+0) (f64.const infinity)) (f64.const -infinity))
+(assert_return (invoke "sub" (f64.const -0x1p+0) (f64.const -inf)) (f64.const inf))
+(assert_return (invoke "sub" (f64.const -0x1p+0) (f64.const inf)) (f64.const -inf))
+(assert_return (invoke "sub" (f64.const 0x1p+0) (f64.const -inf)) (f64.const inf))
+(assert_return (invoke "sub" (f64.const 0x1p+0) (f64.const inf)) (f64.const -inf))
 (assert_return_canonical_nan (invoke "sub" (f64.const -0x1p+0) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -0x1p+0) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "sub" (f64.const -0x1p+0) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -0x1p+0) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "sub" (f64.const 0x1p+0) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const 0x1p+0) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "sub" (f64.const 0x1p+0) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const 0x1p+0) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "sub" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const -0x1.921fb54442d18p+2))
 (assert_return (invoke "sub" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const -0x1.921fb54442d18p+2))
 (assert_return (invoke "sub" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const 0x1.921fb54442d18p+2))
@@ -550,14 +644,18 @@
 (assert_return (invoke "sub" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "sub" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
 (assert_return (invoke "sub" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
-(assert_return (invoke "sub" (f64.const -0x1.921fb54442d18p+2) (f64.const -infinity)) (f64.const infinity))
-(assert_return (invoke "sub" (f64.const -0x1.921fb54442d18p+2) (f64.const infinity)) (f64.const -infinity))
-(assert_return (invoke "sub" (f64.const 0x1.921fb54442d18p+2) (f64.const -infinity)) (f64.const infinity))
-(assert_return (invoke "sub" (f64.const 0x1.921fb54442d18p+2) (f64.const infinity)) (f64.const -infinity))
+(assert_return (invoke "sub" (f64.const -0x1.921fb54442d18p+2) (f64.const -inf)) (f64.const inf))
+(assert_return (invoke "sub" (f64.const -0x1.921fb54442d18p+2) (f64.const inf)) (f64.const -inf))
+(assert_return (invoke "sub" (f64.const 0x1.921fb54442d18p+2) (f64.const -inf)) (f64.const inf))
+(assert_return (invoke "sub" (f64.const 0x1.921fb54442d18p+2) (f64.const inf)) (f64.const -inf))
 (assert_return_canonical_nan (invoke "sub" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "sub" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "sub" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "sub" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const 0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "sub" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "sub" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const 0x1.fffffffffffffp+1023))
@@ -583,89 +681,141 @@
 (assert_return (invoke "sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.fffffffffffffp+1023))
 (assert_return (invoke "sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.fffffffffffffp+1023))
 (assert_return (invoke "sub" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x0p+0))
-(assert_return (invoke "sub" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -infinity))
-(assert_return (invoke "sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const infinity))
+(assert_return (invoke "sub" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -inf))
+(assert_return (invoke "sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const inf))
 (assert_return (invoke "sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0p+0))
-(assert_return (invoke "sub" (f64.const -0x1.fffffffffffffp+1023) (f64.const -infinity)) (f64.const infinity))
-(assert_return (invoke "sub" (f64.const -0x1.fffffffffffffp+1023) (f64.const infinity)) (f64.const -infinity))
-(assert_return (invoke "sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const -infinity)) (f64.const infinity))
-(assert_return (invoke "sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const infinity)) (f64.const -infinity))
+(assert_return (invoke "sub" (f64.const -0x1.fffffffffffffp+1023) (f64.const -inf)) (f64.const inf))
+(assert_return (invoke "sub" (f64.const -0x1.fffffffffffffp+1023) (f64.const inf)) (f64.const -inf))
+(assert_return (invoke "sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const -inf)) (f64.const inf))
+(assert_return (invoke "sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const inf)) (f64.const -inf))
 (assert_return_canonical_nan (invoke "sub" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "sub" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)))
-(assert_return (invoke "sub" (f64.const -infinity) (f64.const -0x0p+0)) (f64.const -infinity))
-(assert_return (invoke "sub" (f64.const -infinity) (f64.const 0x0p+0)) (f64.const -infinity))
-(assert_return (invoke "sub" (f64.const infinity) (f64.const -0x0p+0)) (f64.const infinity))
-(assert_return (invoke "sub" (f64.const infinity) (f64.const 0x0p+0)) (f64.const infinity))
-(assert_return (invoke "sub" (f64.const -infinity) (f64.const -0x0.0000000000001p-1022)) (f64.const -infinity))
-(assert_return (invoke "sub" (f64.const -infinity) (f64.const 0x0.0000000000001p-1022)) (f64.const -infinity))
-(assert_return (invoke "sub" (f64.const infinity) (f64.const -0x0.0000000000001p-1022)) (f64.const infinity))
-(assert_return (invoke "sub" (f64.const infinity) (f64.const 0x0.0000000000001p-1022)) (f64.const infinity))
-(assert_return (invoke "sub" (f64.const -infinity) (f64.const -0x1p-1022)) (f64.const -infinity))
-(assert_return (invoke "sub" (f64.const -infinity) (f64.const 0x1p-1022)) (f64.const -infinity))
-(assert_return (invoke "sub" (f64.const infinity) (f64.const -0x1p-1022)) (f64.const infinity))
-(assert_return (invoke "sub" (f64.const infinity) (f64.const 0x1p-1022)) (f64.const infinity))
-(assert_return (invoke "sub" (f64.const -infinity) (f64.const -0x1p-1)) (f64.const -infinity))
-(assert_return (invoke "sub" (f64.const -infinity) (f64.const 0x1p-1)) (f64.const -infinity))
-(assert_return (invoke "sub" (f64.const infinity) (f64.const -0x1p-1)) (f64.const infinity))
-(assert_return (invoke "sub" (f64.const infinity) (f64.const 0x1p-1)) (f64.const infinity))
-(assert_return (invoke "sub" (f64.const -infinity) (f64.const -0x1p+0)) (f64.const -infinity))
-(assert_return (invoke "sub" (f64.const -infinity) (f64.const 0x1p+0)) (f64.const -infinity))
-(assert_return (invoke "sub" (f64.const infinity) (f64.const -0x1p+0)) (f64.const infinity))
-(assert_return (invoke "sub" (f64.const infinity) (f64.const 0x1p+0)) (f64.const infinity))
-(assert_return (invoke "sub" (f64.const -infinity) (f64.const -0x1.921fb54442d18p+2)) (f64.const -infinity))
-(assert_return (invoke "sub" (f64.const -infinity) (f64.const 0x1.921fb54442d18p+2)) (f64.const -infinity))
-(assert_return (invoke "sub" (f64.const infinity) (f64.const -0x1.921fb54442d18p+2)) (f64.const infinity))
-(assert_return (invoke "sub" (f64.const infinity) (f64.const 0x1.921fb54442d18p+2)) (f64.const infinity))
-(assert_return (invoke "sub" (f64.const -infinity) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -infinity))
-(assert_return (invoke "sub" (f64.const -infinity) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -infinity))
-(assert_return (invoke "sub" (f64.const infinity) (f64.const -0x1.fffffffffffffp+1023)) (f64.const infinity))
-(assert_return (invoke "sub" (f64.const infinity) (f64.const 0x1.fffffffffffffp+1023)) (f64.const infinity))
-(assert_return_canonical_nan (invoke "sub" (f64.const -infinity) (f64.const -infinity)))
-(assert_return (invoke "sub" (f64.const -infinity) (f64.const infinity)) (f64.const -infinity))
-(assert_return (invoke "sub" (f64.const infinity) (f64.const -infinity)) (f64.const infinity))
-(assert_return_canonical_nan (invoke "sub" (f64.const infinity) (f64.const infinity)))
-(assert_return_canonical_nan (invoke "sub" (f64.const -infinity) (f64.const -nan)))
-(assert_return_canonical_nan (invoke "sub" (f64.const -infinity) (f64.const nan)))
-(assert_return_canonical_nan (invoke "sub" (f64.const infinity) (f64.const -nan)))
-(assert_return_canonical_nan (invoke "sub" (f64.const infinity) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)))
+(assert_return (invoke "sub" (f64.const -inf) (f64.const -0x0p+0)) (f64.const -inf))
+(assert_return (invoke "sub" (f64.const -inf) (f64.const 0x0p+0)) (f64.const -inf))
+(assert_return (invoke "sub" (f64.const inf) (f64.const -0x0p+0)) (f64.const inf))
+(assert_return (invoke "sub" (f64.const inf) (f64.const 0x0p+0)) (f64.const inf))
+(assert_return (invoke "sub" (f64.const -inf) (f64.const -0x0.0000000000001p-1022)) (f64.const -inf))
+(assert_return (invoke "sub" (f64.const -inf) (f64.const 0x0.0000000000001p-1022)) (f64.const -inf))
+(assert_return (invoke "sub" (f64.const inf) (f64.const -0x0.0000000000001p-1022)) (f64.const inf))
+(assert_return (invoke "sub" (f64.const inf) (f64.const 0x0.0000000000001p-1022)) (f64.const inf))
+(assert_return (invoke "sub" (f64.const -inf) (f64.const -0x1p-1022)) (f64.const -inf))
+(assert_return (invoke "sub" (f64.const -inf) (f64.const 0x1p-1022)) (f64.const -inf))
+(assert_return (invoke "sub" (f64.const inf) (f64.const -0x1p-1022)) (f64.const inf))
+(assert_return (invoke "sub" (f64.const inf) (f64.const 0x1p-1022)) (f64.const inf))
+(assert_return (invoke "sub" (f64.const -inf) (f64.const -0x1p-1)) (f64.const -inf))
+(assert_return (invoke "sub" (f64.const -inf) (f64.const 0x1p-1)) (f64.const -inf))
+(assert_return (invoke "sub" (f64.const inf) (f64.const -0x1p-1)) (f64.const inf))
+(assert_return (invoke "sub" (f64.const inf) (f64.const 0x1p-1)) (f64.const inf))
+(assert_return (invoke "sub" (f64.const -inf) (f64.const -0x1p+0)) (f64.const -inf))
+(assert_return (invoke "sub" (f64.const -inf) (f64.const 0x1p+0)) (f64.const -inf))
+(assert_return (invoke "sub" (f64.const inf) (f64.const -0x1p+0)) (f64.const inf))
+(assert_return (invoke "sub" (f64.const inf) (f64.const 0x1p+0)) (f64.const inf))
+(assert_return (invoke "sub" (f64.const -inf) (f64.const -0x1.921fb54442d18p+2)) (f64.const -inf))
+(assert_return (invoke "sub" (f64.const -inf) (f64.const 0x1.921fb54442d18p+2)) (f64.const -inf))
+(assert_return (invoke "sub" (f64.const inf) (f64.const -0x1.921fb54442d18p+2)) (f64.const inf))
+(assert_return (invoke "sub" (f64.const inf) (f64.const 0x1.921fb54442d18p+2)) (f64.const inf))
+(assert_return (invoke "sub" (f64.const -inf) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -inf))
+(assert_return (invoke "sub" (f64.const -inf) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -inf))
+(assert_return (invoke "sub" (f64.const inf) (f64.const -0x1.fffffffffffffp+1023)) (f64.const inf))
+(assert_return (invoke "sub" (f64.const inf) (f64.const 0x1.fffffffffffffp+1023)) (f64.const inf))
+(assert_return_canonical_nan (invoke "sub" (f64.const -inf) (f64.const -inf)))
+(assert_return (invoke "sub" (f64.const -inf) (f64.const inf)) (f64.const -inf))
+(assert_return (invoke "sub" (f64.const inf) (f64.const -inf)) (f64.const inf))
+(assert_return_canonical_nan (invoke "sub" (f64.const inf) (f64.const inf)))
+(assert_return_canonical_nan (invoke "sub" (f64.const -inf) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -inf) (f64.const -nan:0x4000000000000)))
+(assert_return_canonical_nan (invoke "sub" (f64.const -inf) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -inf) (f64.const nan:0x4000000000000)))
+(assert_return_canonical_nan (invoke "sub" (f64.const inf) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const inf) (f64.const -nan:0x4000000000000)))
+(assert_return_canonical_nan (invoke "sub" (f64.const inf) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const inf) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "sub" (f64.const -nan) (f64.const -0x0p+0)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -nan:0x4000000000000) (f64.const -0x0p+0)))
 (assert_return_canonical_nan (invoke "sub" (f64.const -nan) (f64.const 0x0p+0)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -nan:0x4000000000000) (f64.const 0x0p+0)))
 (assert_return_canonical_nan (invoke "sub" (f64.const nan) (f64.const -0x0p+0)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const nan:0x4000000000000) (f64.const -0x0p+0)))
 (assert_return_canonical_nan (invoke "sub" (f64.const nan) (f64.const 0x0p+0)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const nan:0x4000000000000) (f64.const 0x0p+0)))
 (assert_return_canonical_nan (invoke "sub" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)))
 (assert_return_canonical_nan (invoke "sub" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)))
 (assert_return_canonical_nan (invoke "sub" (f64.const nan) (f64.const -0x0.0000000000001p-1022)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)))
 (assert_return_canonical_nan (invoke "sub" (f64.const nan) (f64.const 0x0.0000000000001p-1022)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)))
 (assert_return_canonical_nan (invoke "sub" (f64.const -nan) (f64.const -0x1p-1022)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1022)))
 (assert_return_canonical_nan (invoke "sub" (f64.const -nan) (f64.const 0x1p-1022)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1022)))
 (assert_return_canonical_nan (invoke "sub" (f64.const nan) (f64.const -0x1p-1022)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const nan:0x4000000000000) (f64.const -0x1p-1022)))
 (assert_return_canonical_nan (invoke "sub" (f64.const nan) (f64.const 0x1p-1022)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const nan:0x4000000000000) (f64.const 0x1p-1022)))
 (assert_return_canonical_nan (invoke "sub" (f64.const -nan) (f64.const -0x1p-1)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1)))
 (assert_return_canonical_nan (invoke "sub" (f64.const -nan) (f64.const 0x1p-1)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1)))
 (assert_return_canonical_nan (invoke "sub" (f64.const nan) (f64.const -0x1p-1)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const nan:0x4000000000000) (f64.const -0x1p-1)))
 (assert_return_canonical_nan (invoke "sub" (f64.const nan) (f64.const 0x1p-1)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const nan:0x4000000000000) (f64.const 0x1p-1)))
 (assert_return_canonical_nan (invoke "sub" (f64.const -nan) (f64.const -0x1p+0)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -nan:0x4000000000000) (f64.const -0x1p+0)))
 (assert_return_canonical_nan (invoke "sub" (f64.const -nan) (f64.const 0x1p+0)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -nan:0x4000000000000) (f64.const 0x1p+0)))
 (assert_return_canonical_nan (invoke "sub" (f64.const nan) (f64.const -0x1p+0)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const nan:0x4000000000000) (f64.const -0x1p+0)))
 (assert_return_canonical_nan (invoke "sub" (f64.const nan) (f64.const 0x1p+0)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const nan:0x4000000000000) (f64.const 0x1p+0)))
 (assert_return_canonical_nan (invoke "sub" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)))
 (assert_return_canonical_nan (invoke "sub" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)))
 (assert_return_canonical_nan (invoke "sub" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)))
 (assert_return_canonical_nan (invoke "sub" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)))
 (assert_return_canonical_nan (invoke "sub" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)))
 (assert_return_canonical_nan (invoke "sub" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)))
 (assert_return_canonical_nan (invoke "sub" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)))
 (assert_return_canonical_nan (invoke "sub" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)))
-(assert_return_canonical_nan (invoke "sub" (f64.const -nan) (f64.const -infinity)))
-(assert_return_canonical_nan (invoke "sub" (f64.const -nan) (f64.const infinity)))
-(assert_return_canonical_nan (invoke "sub" (f64.const nan) (f64.const -infinity)))
-(assert_return_canonical_nan (invoke "sub" (f64.const nan) (f64.const infinity)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)))
+(assert_return_canonical_nan (invoke "sub" (f64.const -nan) (f64.const -inf)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -nan:0x4000000000000) (f64.const -inf)))
+(assert_return_canonical_nan (invoke "sub" (f64.const -nan) (f64.const inf)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -nan:0x4000000000000) (f64.const inf)))
+(assert_return_canonical_nan (invoke "sub" (f64.const nan) (f64.const -inf)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const nan:0x4000000000000) (f64.const -inf)))
+(assert_return_canonical_nan (invoke "sub" (f64.const nan) (f64.const inf)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const nan:0x4000000000000) (f64.const inf)))
 (assert_return_canonical_nan (invoke "sub" (f64.const -nan) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -nan:0x4000000000000) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -nan) (f64.const -nan:0x4000000000000)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -nan:0x4000000000000) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "sub" (f64.const -nan) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -nan:0x4000000000000) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -nan) (f64.const nan:0x4000000000000)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const -nan:0x4000000000000) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "sub" (f64.const nan) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const nan:0x4000000000000) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const nan) (f64.const -nan:0x4000000000000)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const nan:0x4000000000000) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "sub" (f64.const nan) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const nan:0x4000000000000) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const nan) (f64.const nan:0x4000000000000)))
+(assert_return_arithmetic_nan (invoke "sub" (f64.const nan:0x4000000000000) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "mul" (f64.const -0x0p+0) (f64.const -0x0p+0)) (f64.const 0x0p+0))
 (assert_return (invoke "mul" (f64.const -0x0p+0) (f64.const 0x0p+0)) (f64.const -0x0p+0))
 (assert_return (invoke "mul" (f64.const 0x0p+0) (f64.const -0x0p+0)) (f64.const -0x0p+0))
@@ -694,14 +844,18 @@
 (assert_return (invoke "mul" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x0p+0))
 (assert_return (invoke "mul" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0p+0))
 (assert_return (invoke "mul" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0p+0))
-(assert_return_canonical_nan (invoke "mul" (f64.const -0x0p+0) (f64.const -infinity)))
-(assert_return_canonical_nan (invoke "mul" (f64.const -0x0p+0) (f64.const infinity)))
-(assert_return_canonical_nan (invoke "mul" (f64.const 0x0p+0) (f64.const -infinity)))
-(assert_return_canonical_nan (invoke "mul" (f64.const 0x0p+0) (f64.const infinity)))
+(assert_return_canonical_nan (invoke "mul" (f64.const -0x0p+0) (f64.const -inf)))
+(assert_return_canonical_nan (invoke "mul" (f64.const -0x0p+0) (f64.const inf)))
+(assert_return_canonical_nan (invoke "mul" (f64.const 0x0p+0) (f64.const -inf)))
+(assert_return_canonical_nan (invoke "mul" (f64.const 0x0p+0) (f64.const inf)))
 (assert_return_canonical_nan (invoke "mul" (f64.const -0x0p+0) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -0x0p+0) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "mul" (f64.const -0x0p+0) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -0x0p+0) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "mul" (f64.const 0x0p+0) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const 0x0p+0) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "mul" (f64.const 0x0p+0) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const 0x0p+0) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "mul" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const 0x0p+0))
 (assert_return (invoke "mul" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const -0x0p+0))
 (assert_return (invoke "mul" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const -0x0p+0))
@@ -730,14 +884,18 @@
 (assert_return (invoke "mul" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp-51))
 (assert_return (invoke "mul" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp-51))
 (assert_return (invoke "mul" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp-51))
-(assert_return (invoke "mul" (f64.const -0x0.0000000000001p-1022) (f64.const -infinity)) (f64.const infinity))
-(assert_return (invoke "mul" (f64.const -0x0.0000000000001p-1022) (f64.const infinity)) (f64.const -infinity))
-(assert_return (invoke "mul" (f64.const 0x0.0000000000001p-1022) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "mul" (f64.const 0x0.0000000000001p-1022) (f64.const infinity)) (f64.const infinity))
+(assert_return (invoke "mul" (f64.const -0x0.0000000000001p-1022) (f64.const -inf)) (f64.const inf))
+(assert_return (invoke "mul" (f64.const -0x0.0000000000001p-1022) (f64.const inf)) (f64.const -inf))
+(assert_return (invoke "mul" (f64.const 0x0.0000000000001p-1022) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "mul" (f64.const 0x0.0000000000001p-1022) (f64.const inf)) (f64.const inf))
 (assert_return_canonical_nan (invoke "mul" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "mul" (f64.const -0x0.0000000000001p-1022) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "mul" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const 0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "mul" (f64.const 0x0.0000000000001p-1022) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const 0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "mul" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (f64.const 0x0p+0))
 (assert_return (invoke "mul" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (f64.const -0x0p+0))
 (assert_return (invoke "mul" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (f64.const -0x0p+0))
@@ -766,14 +924,18 @@
 (assert_return (invoke "mul" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1))
 (assert_return (invoke "mul" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1))
 (assert_return (invoke "mul" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1))
-(assert_return (invoke "mul" (f64.const -0x1p-1022) (f64.const -infinity)) (f64.const infinity))
-(assert_return (invoke "mul" (f64.const -0x1p-1022) (f64.const infinity)) (f64.const -infinity))
-(assert_return (invoke "mul" (f64.const 0x1p-1022) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "mul" (f64.const 0x1p-1022) (f64.const infinity)) (f64.const infinity))
+(assert_return (invoke "mul" (f64.const -0x1p-1022) (f64.const -inf)) (f64.const inf))
+(assert_return (invoke "mul" (f64.const -0x1p-1022) (f64.const inf)) (f64.const -inf))
+(assert_return (invoke "mul" (f64.const 0x1p-1022) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "mul" (f64.const 0x1p-1022) (f64.const inf)) (f64.const inf))
 (assert_return_canonical_nan (invoke "mul" (f64.const -0x1p-1022) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -0x1p-1022) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "mul" (f64.const -0x1p-1022) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -0x1p-1022) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "mul" (f64.const 0x1p-1022) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const 0x1p-1022) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "mul" (f64.const 0x1p-1022) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const 0x1p-1022) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "mul" (f64.const -0x1p-1) (f64.const -0x0p+0)) (f64.const 0x0p+0))
 (assert_return (invoke "mul" (f64.const -0x1p-1) (f64.const 0x0p+0)) (f64.const -0x0p+0))
 (assert_return (invoke "mul" (f64.const 0x1p-1) (f64.const -0x0p+0)) (f64.const -0x0p+0))
@@ -802,14 +964,18 @@
 (assert_return (invoke "mul" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1022))
 (assert_return (invoke "mul" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1022))
 (assert_return (invoke "mul" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1022))
-(assert_return (invoke "mul" (f64.const -0x1p-1) (f64.const -infinity)) (f64.const infinity))
-(assert_return (invoke "mul" (f64.const -0x1p-1) (f64.const infinity)) (f64.const -infinity))
-(assert_return (invoke "mul" (f64.const 0x1p-1) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "mul" (f64.const 0x1p-1) (f64.const infinity)) (f64.const infinity))
+(assert_return (invoke "mul" (f64.const -0x1p-1) (f64.const -inf)) (f64.const inf))
+(assert_return (invoke "mul" (f64.const -0x1p-1) (f64.const inf)) (f64.const -inf))
+(assert_return (invoke "mul" (f64.const 0x1p-1) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "mul" (f64.const 0x1p-1) (f64.const inf)) (f64.const inf))
 (assert_return_canonical_nan (invoke "mul" (f64.const -0x1p-1) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -0x1p-1) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "mul" (f64.const -0x1p-1) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -0x1p-1) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "mul" (f64.const 0x1p-1) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const 0x1p-1) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "mul" (f64.const 0x1p-1) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const 0x1p-1) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "mul" (f64.const -0x1p+0) (f64.const -0x0p+0)) (f64.const 0x0p+0))
 (assert_return (invoke "mul" (f64.const -0x1p+0) (f64.const 0x0p+0)) (f64.const -0x0p+0))
 (assert_return (invoke "mul" (f64.const 0x1p+0) (f64.const -0x0p+0)) (f64.const -0x0p+0))
@@ -838,14 +1004,18 @@
 (assert_return (invoke "mul" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "mul" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "mul" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "mul" (f64.const -0x1p+0) (f64.const -infinity)) (f64.const infinity))
-(assert_return (invoke "mul" (f64.const -0x1p+0) (f64.const infinity)) (f64.const -infinity))
-(assert_return (invoke "mul" (f64.const 0x1p+0) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "mul" (f64.const 0x1p+0) (f64.const infinity)) (f64.const infinity))
+(assert_return (invoke "mul" (f64.const -0x1p+0) (f64.const -inf)) (f64.const inf))
+(assert_return (invoke "mul" (f64.const -0x1p+0) (f64.const inf)) (f64.const -inf))
+(assert_return (invoke "mul" (f64.const 0x1p+0) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "mul" (f64.const 0x1p+0) (f64.const inf)) (f64.const inf))
 (assert_return_canonical_nan (invoke "mul" (f64.const -0x1p+0) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -0x1p+0) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "mul" (f64.const -0x1p+0) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -0x1p+0) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "mul" (f64.const 0x1p+0) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const 0x1p+0) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "mul" (f64.const 0x1p+0) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const 0x1p+0) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "mul" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const 0x0p+0))
 (assert_return (invoke "mul" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const -0x0p+0))
 (assert_return (invoke "mul" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const -0x0p+0))
@@ -870,18 +1040,22 @@
 (assert_return (invoke "mul" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.3bd3cc9be45dep+5))
 (assert_return (invoke "mul" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.3bd3cc9be45dep+5))
 (assert_return (invoke "mul" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.3bd3cc9be45dep+5))
-(assert_return (invoke "mul" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const infinity))
-(assert_return (invoke "mul" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -infinity))
-(assert_return (invoke "mul" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -infinity))
-(assert_return (invoke "mul" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const infinity))
-(assert_return (invoke "mul" (f64.const -0x1.921fb54442d18p+2) (f64.const -infinity)) (f64.const infinity))
-(assert_return (invoke "mul" (f64.const -0x1.921fb54442d18p+2) (f64.const infinity)) (f64.const -infinity))
-(assert_return (invoke "mul" (f64.const 0x1.921fb54442d18p+2) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "mul" (f64.const 0x1.921fb54442d18p+2) (f64.const infinity)) (f64.const infinity))
+(assert_return (invoke "mul" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const inf))
+(assert_return (invoke "mul" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -inf))
+(assert_return (invoke "mul" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -inf))
+(assert_return (invoke "mul" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const inf))
+(assert_return (invoke "mul" (f64.const -0x1.921fb54442d18p+2) (f64.const -inf)) (f64.const inf))
+(assert_return (invoke "mul" (f64.const -0x1.921fb54442d18p+2) (f64.const inf)) (f64.const -inf))
+(assert_return (invoke "mul" (f64.const 0x1.921fb54442d18p+2) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "mul" (f64.const 0x1.921fb54442d18p+2) (f64.const inf)) (f64.const inf))
 (assert_return_canonical_nan (invoke "mul" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "mul" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "mul" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "mul" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const 0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const 0x0p+0))
 (assert_return (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const -0x0p+0))
 (assert_return (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const -0x0p+0))
@@ -902,94 +1076,146 @@
 (assert_return (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const infinity))
-(assert_return (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const -infinity))
-(assert_return (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const -infinity))
-(assert_return (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const infinity))
-(assert_return (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const infinity))
-(assert_return (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -infinity))
-(assert_return (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -infinity))
-(assert_return (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const infinity))
-(assert_return (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const -infinity)) (f64.const infinity))
-(assert_return (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const infinity)) (f64.const -infinity))
-(assert_return (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const infinity)) (f64.const infinity))
+(assert_return (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const inf))
+(assert_return (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const -inf))
+(assert_return (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const -inf))
+(assert_return (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const inf))
+(assert_return (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const inf))
+(assert_return (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -inf))
+(assert_return (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -inf))
+(assert_return (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const inf))
+(assert_return (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const -inf)) (f64.const inf))
+(assert_return (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const inf)) (f64.const -inf))
+(assert_return (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const inf)) (f64.const inf))
 (assert_return_canonical_nan (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)))
-(assert_return_canonical_nan (invoke "mul" (f64.const -infinity) (f64.const -0x0p+0)))
-(assert_return_canonical_nan (invoke "mul" (f64.const -infinity) (f64.const 0x0p+0)))
-(assert_return_canonical_nan (invoke "mul" (f64.const infinity) (f64.const -0x0p+0)))
-(assert_return_canonical_nan (invoke "mul" (f64.const infinity) (f64.const 0x0p+0)))
-(assert_return (invoke "mul" (f64.const -infinity) (f64.const -0x0.0000000000001p-1022)) (f64.const infinity))
-(assert_return (invoke "mul" (f64.const -infinity) (f64.const 0x0.0000000000001p-1022)) (f64.const -infinity))
-(assert_return (invoke "mul" (f64.const infinity) (f64.const -0x0.0000000000001p-1022)) (f64.const -infinity))
-(assert_return (invoke "mul" (f64.const infinity) (f64.const 0x0.0000000000001p-1022)) (f64.const infinity))
-(assert_return (invoke "mul" (f64.const -infinity) (f64.const -0x1p-1022)) (f64.const infinity))
-(assert_return (invoke "mul" (f64.const -infinity) (f64.const 0x1p-1022)) (f64.const -infinity))
-(assert_return (invoke "mul" (f64.const infinity) (f64.const -0x1p-1022)) (f64.const -infinity))
-(assert_return (invoke "mul" (f64.const infinity) (f64.const 0x1p-1022)) (f64.const infinity))
-(assert_return (invoke "mul" (f64.const -infinity) (f64.const -0x1p-1)) (f64.const infinity))
-(assert_return (invoke "mul" (f64.const -infinity) (f64.const 0x1p-1)) (f64.const -infinity))
-(assert_return (invoke "mul" (f64.const infinity) (f64.const -0x1p-1)) (f64.const -infinity))
-(assert_return (invoke "mul" (f64.const infinity) (f64.const 0x1p-1)) (f64.const infinity))
-(assert_return (invoke "mul" (f64.const -infinity) (f64.const -0x1p+0)) (f64.const infinity))
-(assert_return (invoke "mul" (f64.const -infinity) (f64.const 0x1p+0)) (f64.const -infinity))
-(assert_return (invoke "mul" (f64.const infinity) (f64.const -0x1p+0)) (f64.const -infinity))
-(assert_return (invoke "mul" (f64.const infinity) (f64.const 0x1p+0)) (f64.const infinity))
-(assert_return (invoke "mul" (f64.const -infinity) (f64.const -0x1.921fb54442d18p+2)) (f64.const infinity))
-(assert_return (invoke "mul" (f64.const -infinity) (f64.const 0x1.921fb54442d18p+2)) (f64.const -infinity))
-(assert_return (invoke "mul" (f64.const infinity) (f64.const -0x1.921fb54442d18p+2)) (f64.const -infinity))
-(assert_return (invoke "mul" (f64.const infinity) (f64.const 0x1.921fb54442d18p+2)) (f64.const infinity))
-(assert_return (invoke "mul" (f64.const -infinity) (f64.const -0x1.fffffffffffffp+1023)) (f64.const infinity))
-(assert_return (invoke "mul" (f64.const -infinity) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -infinity))
-(assert_return (invoke "mul" (f64.const infinity) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -infinity))
-(assert_return (invoke "mul" (f64.const infinity) (f64.const 0x1.fffffffffffffp+1023)) (f64.const infinity))
-(assert_return (invoke "mul" (f64.const -infinity) (f64.const -infinity)) (f64.const infinity))
-(assert_return (invoke "mul" (f64.const -infinity) (f64.const infinity)) (f64.const -infinity))
-(assert_return (invoke "mul" (f64.const infinity) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "mul" (f64.const infinity) (f64.const infinity)) (f64.const infinity))
-(assert_return_canonical_nan (invoke "mul" (f64.const -infinity) (f64.const -nan)))
-(assert_return_canonical_nan (invoke "mul" (f64.const -infinity) (f64.const nan)))
-(assert_return_canonical_nan (invoke "mul" (f64.const infinity) (f64.const -nan)))
-(assert_return_canonical_nan (invoke "mul" (f64.const infinity) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)))
+(assert_return_canonical_nan (invoke "mul" (f64.const -inf) (f64.const -0x0p+0)))
+(assert_return_canonical_nan (invoke "mul" (f64.const -inf) (f64.const 0x0p+0)))
+(assert_return_canonical_nan (invoke "mul" (f64.const inf) (f64.const -0x0p+0)))
+(assert_return_canonical_nan (invoke "mul" (f64.const inf) (f64.const 0x0p+0)))
+(assert_return (invoke "mul" (f64.const -inf) (f64.const -0x0.0000000000001p-1022)) (f64.const inf))
+(assert_return (invoke "mul" (f64.const -inf) (f64.const 0x0.0000000000001p-1022)) (f64.const -inf))
+(assert_return (invoke "mul" (f64.const inf) (f64.const -0x0.0000000000001p-1022)) (f64.const -inf))
+(assert_return (invoke "mul" (f64.const inf) (f64.const 0x0.0000000000001p-1022)) (f64.const inf))
+(assert_return (invoke "mul" (f64.const -inf) (f64.const -0x1p-1022)) (f64.const inf))
+(assert_return (invoke "mul" (f64.const -inf) (f64.const 0x1p-1022)) (f64.const -inf))
+(assert_return (invoke "mul" (f64.const inf) (f64.const -0x1p-1022)) (f64.const -inf))
+(assert_return (invoke "mul" (f64.const inf) (f64.const 0x1p-1022)) (f64.const inf))
+(assert_return (invoke "mul" (f64.const -inf) (f64.const -0x1p-1)) (f64.const inf))
+(assert_return (invoke "mul" (f64.const -inf) (f64.const 0x1p-1)) (f64.const -inf))
+(assert_return (invoke "mul" (f64.const inf) (f64.const -0x1p-1)) (f64.const -inf))
+(assert_return (invoke "mul" (f64.const inf) (f64.const 0x1p-1)) (f64.const inf))
+(assert_return (invoke "mul" (f64.const -inf) (f64.const -0x1p+0)) (f64.const inf))
+(assert_return (invoke "mul" (f64.const -inf) (f64.const 0x1p+0)) (f64.const -inf))
+(assert_return (invoke "mul" (f64.const inf) (f64.const -0x1p+0)) (f64.const -inf))
+(assert_return (invoke "mul" (f64.const inf) (f64.const 0x1p+0)) (f64.const inf))
+(assert_return (invoke "mul" (f64.const -inf) (f64.const -0x1.921fb54442d18p+2)) (f64.const inf))
+(assert_return (invoke "mul" (f64.const -inf) (f64.const 0x1.921fb54442d18p+2)) (f64.const -inf))
+(assert_return (invoke "mul" (f64.const inf) (f64.const -0x1.921fb54442d18p+2)) (f64.const -inf))
+(assert_return (invoke "mul" (f64.const inf) (f64.const 0x1.921fb54442d18p+2)) (f64.const inf))
+(assert_return (invoke "mul" (f64.const -inf) (f64.const -0x1.fffffffffffffp+1023)) (f64.const inf))
+(assert_return (invoke "mul" (f64.const -inf) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -inf))
+(assert_return (invoke "mul" (f64.const inf) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -inf))
+(assert_return (invoke "mul" (f64.const inf) (f64.const 0x1.fffffffffffffp+1023)) (f64.const inf))
+(assert_return (invoke "mul" (f64.const -inf) (f64.const -inf)) (f64.const inf))
+(assert_return (invoke "mul" (f64.const -inf) (f64.const inf)) (f64.const -inf))
+(assert_return (invoke "mul" (f64.const inf) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "mul" (f64.const inf) (f64.const inf)) (f64.const inf))
+(assert_return_canonical_nan (invoke "mul" (f64.const -inf) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -inf) (f64.const -nan:0x4000000000000)))
+(assert_return_canonical_nan (invoke "mul" (f64.const -inf) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -inf) (f64.const nan:0x4000000000000)))
+(assert_return_canonical_nan (invoke "mul" (f64.const inf) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const inf) (f64.const -nan:0x4000000000000)))
+(assert_return_canonical_nan (invoke "mul" (f64.const inf) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const inf) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "mul" (f64.const -nan) (f64.const -0x0p+0)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -nan:0x4000000000000) (f64.const -0x0p+0)))
 (assert_return_canonical_nan (invoke "mul" (f64.const -nan) (f64.const 0x0p+0)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -nan:0x4000000000000) (f64.const 0x0p+0)))
 (assert_return_canonical_nan (invoke "mul" (f64.const nan) (f64.const -0x0p+0)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const nan:0x4000000000000) (f64.const -0x0p+0)))
 (assert_return_canonical_nan (invoke "mul" (f64.const nan) (f64.const 0x0p+0)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const nan:0x4000000000000) (f64.const 0x0p+0)))
 (assert_return_canonical_nan (invoke "mul" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)))
 (assert_return_canonical_nan (invoke "mul" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)))
 (assert_return_canonical_nan (invoke "mul" (f64.const nan) (f64.const -0x0.0000000000001p-1022)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)))
 (assert_return_canonical_nan (invoke "mul" (f64.const nan) (f64.const 0x0.0000000000001p-1022)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)))
 (assert_return_canonical_nan (invoke "mul" (f64.const -nan) (f64.const -0x1p-1022)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1022)))
 (assert_return_canonical_nan (invoke "mul" (f64.const -nan) (f64.const 0x1p-1022)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1022)))
 (assert_return_canonical_nan (invoke "mul" (f64.const nan) (f64.const -0x1p-1022)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const nan:0x4000000000000) (f64.const -0x1p-1022)))
 (assert_return_canonical_nan (invoke "mul" (f64.const nan) (f64.const 0x1p-1022)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const nan:0x4000000000000) (f64.const 0x1p-1022)))
 (assert_return_canonical_nan (invoke "mul" (f64.const -nan) (f64.const -0x1p-1)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1)))
 (assert_return_canonical_nan (invoke "mul" (f64.const -nan) (f64.const 0x1p-1)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1)))
 (assert_return_canonical_nan (invoke "mul" (f64.const nan) (f64.const -0x1p-1)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const nan:0x4000000000000) (f64.const -0x1p-1)))
 (assert_return_canonical_nan (invoke "mul" (f64.const nan) (f64.const 0x1p-1)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const nan:0x4000000000000) (f64.const 0x1p-1)))
 (assert_return_canonical_nan (invoke "mul" (f64.const -nan) (f64.const -0x1p+0)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -nan:0x4000000000000) (f64.const -0x1p+0)))
 (assert_return_canonical_nan (invoke "mul" (f64.const -nan) (f64.const 0x1p+0)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -nan:0x4000000000000) (f64.const 0x1p+0)))
 (assert_return_canonical_nan (invoke "mul" (f64.const nan) (f64.const -0x1p+0)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const nan:0x4000000000000) (f64.const -0x1p+0)))
 (assert_return_canonical_nan (invoke "mul" (f64.const nan) (f64.const 0x1p+0)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const nan:0x4000000000000) (f64.const 0x1p+0)))
 (assert_return_canonical_nan (invoke "mul" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)))
 (assert_return_canonical_nan (invoke "mul" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)))
 (assert_return_canonical_nan (invoke "mul" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)))
 (assert_return_canonical_nan (invoke "mul" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)))
 (assert_return_canonical_nan (invoke "mul" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)))
 (assert_return_canonical_nan (invoke "mul" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)))
 (assert_return_canonical_nan (invoke "mul" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)))
 (assert_return_canonical_nan (invoke "mul" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)))
-(assert_return_canonical_nan (invoke "mul" (f64.const -nan) (f64.const -infinity)))
-(assert_return_canonical_nan (invoke "mul" (f64.const -nan) (f64.const infinity)))
-(assert_return_canonical_nan (invoke "mul" (f64.const nan) (f64.const -infinity)))
-(assert_return_canonical_nan (invoke "mul" (f64.const nan) (f64.const infinity)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)))
+(assert_return_canonical_nan (invoke "mul" (f64.const -nan) (f64.const -inf)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -nan:0x4000000000000) (f64.const -inf)))
+(assert_return_canonical_nan (invoke "mul" (f64.const -nan) (f64.const inf)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -nan:0x4000000000000) (f64.const inf)))
+(assert_return_canonical_nan (invoke "mul" (f64.const nan) (f64.const -inf)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const nan:0x4000000000000) (f64.const -inf)))
+(assert_return_canonical_nan (invoke "mul" (f64.const nan) (f64.const inf)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const nan:0x4000000000000) (f64.const inf)))
 (assert_return_canonical_nan (invoke "mul" (f64.const -nan) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -nan:0x4000000000000) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -nan) (f64.const -nan:0x4000000000000)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -nan:0x4000000000000) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "mul" (f64.const -nan) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -nan:0x4000000000000) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -nan) (f64.const nan:0x4000000000000)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const -nan:0x4000000000000) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "mul" (f64.const nan) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const nan:0x4000000000000) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const nan) (f64.const -nan:0x4000000000000)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const nan:0x4000000000000) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "mul" (f64.const nan) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const nan:0x4000000000000) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const nan) (f64.const nan:0x4000000000000)))
+(assert_return_arithmetic_nan (invoke "mul" (f64.const nan:0x4000000000000) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "div" (f64.const -0x0p+0) (f64.const -0x0p+0)))
 (assert_return_canonical_nan (invoke "div" (f64.const -0x0p+0) (f64.const 0x0p+0)))
 (assert_return_canonical_nan (invoke "div" (f64.const 0x0p+0) (f64.const -0x0p+0)))
@@ -1018,18 +1244,22 @@
 (assert_return (invoke "div" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x0p+0))
 (assert_return (invoke "div" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0p+0))
 (assert_return (invoke "div" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0p+0))
-(assert_return (invoke "div" (f64.const -0x0p+0) (f64.const -infinity)) (f64.const 0x0p+0))
-(assert_return (invoke "div" (f64.const -0x0p+0) (f64.const infinity)) (f64.const -0x0p+0))
-(assert_return (invoke "div" (f64.const 0x0p+0) (f64.const -infinity)) (f64.const -0x0p+0))
-(assert_return (invoke "div" (f64.const 0x0p+0) (f64.const infinity)) (f64.const 0x0p+0))
+(assert_return (invoke "div" (f64.const -0x0p+0) (f64.const -inf)) (f64.const 0x0p+0))
+(assert_return (invoke "div" (f64.const -0x0p+0) (f64.const inf)) (f64.const -0x0p+0))
+(assert_return (invoke "div" (f64.const 0x0p+0) (f64.const -inf)) (f64.const -0x0p+0))
+(assert_return (invoke "div" (f64.const 0x0p+0) (f64.const inf)) (f64.const 0x0p+0))
 (assert_return_canonical_nan (invoke "div" (f64.const -0x0p+0) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -0x0p+0) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "div" (f64.const -0x0p+0) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -0x0p+0) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "div" (f64.const 0x0p+0) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const 0x0p+0) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "div" (f64.const 0x0p+0) (f64.const nan)))
-(assert_return (invoke "div" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const infinity))
-(assert_return (invoke "div" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const infinity))
+(assert_return_arithmetic_nan (invoke "div" (f64.const 0x0p+0) (f64.const nan:0x4000000000000)))
+(assert_return (invoke "div" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const inf))
+(assert_return (invoke "div" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const inf))
 (assert_return (invoke "div" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1p+0))
 (assert_return (invoke "div" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1p+0))
 (assert_return (invoke "div" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p+0))
@@ -1054,18 +1284,22 @@
 (assert_return (invoke "div" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x0p+0))
 (assert_return (invoke "div" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0p+0))
 (assert_return (invoke "div" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0p+0))
-(assert_return (invoke "div" (f64.const -0x0.0000000000001p-1022) (f64.const -infinity)) (f64.const 0x0p+0))
-(assert_return (invoke "div" (f64.const -0x0.0000000000001p-1022) (f64.const infinity)) (f64.const -0x0p+0))
-(assert_return (invoke "div" (f64.const 0x0.0000000000001p-1022) (f64.const -infinity)) (f64.const -0x0p+0))
-(assert_return (invoke "div" (f64.const 0x0.0000000000001p-1022) (f64.const infinity)) (f64.const 0x0p+0))
+(assert_return (invoke "div" (f64.const -0x0.0000000000001p-1022) (f64.const -inf)) (f64.const 0x0p+0))
+(assert_return (invoke "div" (f64.const -0x0.0000000000001p-1022) (f64.const inf)) (f64.const -0x0p+0))
+(assert_return (invoke "div" (f64.const 0x0.0000000000001p-1022) (f64.const -inf)) (f64.const -0x0p+0))
+(assert_return (invoke "div" (f64.const 0x0.0000000000001p-1022) (f64.const inf)) (f64.const 0x0p+0))
 (assert_return_canonical_nan (invoke "div" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "div" (f64.const -0x0.0000000000001p-1022) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "div" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const 0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "div" (f64.const 0x0.0000000000001p-1022) (f64.const nan)))
-(assert_return (invoke "div" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (f64.const infinity))
-(assert_return (invoke "div" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const 0x1p-1022) (f64.const 0x0p+0)) (f64.const infinity))
+(assert_return_arithmetic_nan (invoke "div" (f64.const 0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)))
+(assert_return (invoke "div" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (f64.const inf))
+(assert_return (invoke "div" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const 0x1p-1022) (f64.const 0x0p+0)) (f64.const inf))
 (assert_return (invoke "div" (f64.const -0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const 0x1p+52))
 (assert_return (invoke "div" (f64.const -0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const -0x1p+52))
 (assert_return (invoke "div" (f64.const 0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p+52))
@@ -1090,22 +1324,26 @@
 (assert_return (invoke "div" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x0p+0))
 (assert_return (invoke "div" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0p+0))
 (assert_return (invoke "div" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0p+0))
-(assert_return (invoke "div" (f64.const -0x1p-1022) (f64.const -infinity)) (f64.const 0x0p+0))
-(assert_return (invoke "div" (f64.const -0x1p-1022) (f64.const infinity)) (f64.const -0x0p+0))
-(assert_return (invoke "div" (f64.const 0x1p-1022) (f64.const -infinity)) (f64.const -0x0p+0))
-(assert_return (invoke "div" (f64.const 0x1p-1022) (f64.const infinity)) (f64.const 0x0p+0))
+(assert_return (invoke "div" (f64.const -0x1p-1022) (f64.const -inf)) (f64.const 0x0p+0))
+(assert_return (invoke "div" (f64.const -0x1p-1022) (f64.const inf)) (f64.const -0x0p+0))
+(assert_return (invoke "div" (f64.const 0x1p-1022) (f64.const -inf)) (f64.const -0x0p+0))
+(assert_return (invoke "div" (f64.const 0x1p-1022) (f64.const inf)) (f64.const 0x0p+0))
 (assert_return_canonical_nan (invoke "div" (f64.const -0x1p-1022) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -0x1p-1022) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "div" (f64.const -0x1p-1022) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -0x1p-1022) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "div" (f64.const 0x1p-1022) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const 0x1p-1022) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "div" (f64.const 0x1p-1022) (f64.const nan)))
-(assert_return (invoke "div" (f64.const -0x1p-1) (f64.const -0x0p+0)) (f64.const infinity))
-(assert_return (invoke "div" (f64.const -0x1p-1) (f64.const 0x0p+0)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const 0x1p-1) (f64.const -0x0p+0)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const 0x1p-1) (f64.const 0x0p+0)) (f64.const infinity))
-(assert_return (invoke "div" (f64.const -0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const infinity))
-(assert_return (invoke "div" (f64.const -0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const 0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const 0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const infinity))
+(assert_return_arithmetic_nan (invoke "div" (f64.const 0x1p-1022) (f64.const nan:0x4000000000000)))
+(assert_return (invoke "div" (f64.const -0x1p-1) (f64.const -0x0p+0)) (f64.const inf))
+(assert_return (invoke "div" (f64.const -0x1p-1) (f64.const 0x0p+0)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const 0x1p-1) (f64.const -0x0p+0)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const 0x1p-1) (f64.const 0x0p+0)) (f64.const inf))
+(assert_return (invoke "div" (f64.const -0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const inf))
+(assert_return (invoke "div" (f64.const -0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const 0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const 0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const inf))
 (assert_return (invoke "div" (f64.const -0x1p-1) (f64.const -0x1p-1022)) (f64.const 0x1p+1021))
 (assert_return (invoke "div" (f64.const -0x1p-1) (f64.const 0x1p-1022)) (f64.const -0x1p+1021))
 (assert_return (invoke "div" (f64.const 0x1p-1) (f64.const -0x1p-1022)) (f64.const -0x1p+1021))
@@ -1126,22 +1364,26 @@
 (assert_return (invoke "div" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x0.2p-1022))
 (assert_return (invoke "div" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0.2p-1022))
 (assert_return (invoke "div" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0.2p-1022))
-(assert_return (invoke "div" (f64.const -0x1p-1) (f64.const -infinity)) (f64.const 0x0p+0))
-(assert_return (invoke "div" (f64.const -0x1p-1) (f64.const infinity)) (f64.const -0x0p+0))
-(assert_return (invoke "div" (f64.const 0x1p-1) (f64.const -infinity)) (f64.const -0x0p+0))
-(assert_return (invoke "div" (f64.const 0x1p-1) (f64.const infinity)) (f64.const 0x0p+0))
+(assert_return (invoke "div" (f64.const -0x1p-1) (f64.const -inf)) (f64.const 0x0p+0))
+(assert_return (invoke "div" (f64.const -0x1p-1) (f64.const inf)) (f64.const -0x0p+0))
+(assert_return (invoke "div" (f64.const 0x1p-1) (f64.const -inf)) (f64.const -0x0p+0))
+(assert_return (invoke "div" (f64.const 0x1p-1) (f64.const inf)) (f64.const 0x0p+0))
 (assert_return_canonical_nan (invoke "div" (f64.const -0x1p-1) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -0x1p-1) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "div" (f64.const -0x1p-1) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -0x1p-1) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "div" (f64.const 0x1p-1) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const 0x1p-1) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "div" (f64.const 0x1p-1) (f64.const nan)))
-(assert_return (invoke "div" (f64.const -0x1p+0) (f64.const -0x0p+0)) (f64.const infinity))
-(assert_return (invoke "div" (f64.const -0x1p+0) (f64.const 0x0p+0)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const 0x1p+0) (f64.const -0x0p+0)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const 0x1p+0) (f64.const 0x0p+0)) (f64.const infinity))
-(assert_return (invoke "div" (f64.const -0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const infinity))
-(assert_return (invoke "div" (f64.const -0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const 0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const 0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const infinity))
+(assert_return_arithmetic_nan (invoke "div" (f64.const 0x1p-1) (f64.const nan:0x4000000000000)))
+(assert_return (invoke "div" (f64.const -0x1p+0) (f64.const -0x0p+0)) (f64.const inf))
+(assert_return (invoke "div" (f64.const -0x1p+0) (f64.const 0x0p+0)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const 0x1p+0) (f64.const -0x0p+0)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const 0x1p+0) (f64.const 0x0p+0)) (f64.const inf))
+(assert_return (invoke "div" (f64.const -0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const inf))
+(assert_return (invoke "div" (f64.const -0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const 0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const 0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const inf))
 (assert_return (invoke "div" (f64.const -0x1p+0) (f64.const -0x1p-1022)) (f64.const 0x1p+1022))
 (assert_return (invoke "div" (f64.const -0x1p+0) (f64.const 0x1p-1022)) (f64.const -0x1p+1022))
 (assert_return (invoke "div" (f64.const 0x1p+0) (f64.const -0x1p-1022)) (f64.const -0x1p+1022))
@@ -1162,26 +1404,30 @@
 (assert_return (invoke "div" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x0.4p-1022))
 (assert_return (invoke "div" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0.4p-1022))
 (assert_return (invoke "div" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0.4p-1022))
-(assert_return (invoke "div" (f64.const -0x1p+0) (f64.const -infinity)) (f64.const 0x0p+0))
-(assert_return (invoke "div" (f64.const -0x1p+0) (f64.const infinity)) (f64.const -0x0p+0))
-(assert_return (invoke "div" (f64.const 0x1p+0) (f64.const -infinity)) (f64.const -0x0p+0))
-(assert_return (invoke "div" (f64.const 0x1p+0) (f64.const infinity)) (f64.const 0x0p+0))
+(assert_return (invoke "div" (f64.const -0x1p+0) (f64.const -inf)) (f64.const 0x0p+0))
+(assert_return (invoke "div" (f64.const -0x1p+0) (f64.const inf)) (f64.const -0x0p+0))
+(assert_return (invoke "div" (f64.const 0x1p+0) (f64.const -inf)) (f64.const -0x0p+0))
+(assert_return (invoke "div" (f64.const 0x1p+0) (f64.const inf)) (f64.const 0x0p+0))
 (assert_return_canonical_nan (invoke "div" (f64.const -0x1p+0) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -0x1p+0) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "div" (f64.const -0x1p+0) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -0x1p+0) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "div" (f64.const 0x1p+0) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const 0x1p+0) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "div" (f64.const 0x1p+0) (f64.const nan)))
-(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const infinity))
-(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const infinity))
-(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const infinity))
-(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const infinity))
-(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const infinity))
-(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const infinity))
+(assert_return_arithmetic_nan (invoke "div" (f64.const 0x1p+0) (f64.const nan:0x4000000000000)))
+(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const inf))
+(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const inf))
+(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const inf))
+(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const inf))
+(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const inf))
+(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const inf))
 (assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const 0x1.921fb54442d18p+3))
 (assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (f64.const -0x1.921fb54442d18p+3))
 (assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const -0x1.921fb54442d18p+3))
@@ -1198,30 +1444,34 @@
 (assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.921fb54442d19p-1022))
 (assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.921fb54442d19p-1022))
 (assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.921fb54442d19p-1022))
-(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const -infinity)) (f64.const 0x0p+0))
-(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const infinity)) (f64.const -0x0p+0))
-(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const -infinity)) (f64.const -0x0p+0))
-(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const infinity)) (f64.const 0x0p+0))
+(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const -inf)) (f64.const 0x0p+0))
+(assert_return (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const inf)) (f64.const -0x0p+0))
+(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const -inf)) (f64.const -0x0p+0))
+(assert_return (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const inf)) (f64.const 0x0p+0))
 (assert_return_canonical_nan (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)))
-(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const infinity))
-(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const infinity))
-(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const infinity))
-(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const infinity))
-(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const infinity))
-(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const infinity))
-(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const infinity))
-(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const infinity))
+(assert_return_arithmetic_nan (invoke "div" (f64.const 0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)))
+(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const inf))
+(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const inf))
+(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const inf))
+(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const inf))
+(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const inf))
+(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const inf))
+(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const inf))
+(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const inf))
 (assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const 0x1.fffffffffffffp+1023))
 (assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const -0x1.fffffffffffffp+1023))
@@ -1234,86 +1484,138 @@
 (assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1p+0))
 (assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1p+0))
 (assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p+0))
-(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const -infinity)) (f64.const 0x0p+0))
-(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const infinity)) (f64.const -0x0p+0))
-(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const -infinity)) (f64.const -0x0p+0))
-(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const infinity)) (f64.const 0x0p+0))
+(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const -inf)) (f64.const 0x0p+0))
+(assert_return (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const inf)) (f64.const -0x0p+0))
+(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const -inf)) (f64.const -0x0p+0))
+(assert_return (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const inf)) (f64.const 0x0p+0))
 (assert_return_canonical_nan (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)))
-(assert_return (invoke "div" (f64.const -infinity) (f64.const -0x0p+0)) (f64.const infinity))
-(assert_return (invoke "div" (f64.const -infinity) (f64.const 0x0p+0)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const infinity) (f64.const -0x0p+0)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const infinity) (f64.const 0x0p+0)) (f64.const infinity))
-(assert_return (invoke "div" (f64.const -infinity) (f64.const -0x0.0000000000001p-1022)) (f64.const infinity))
-(assert_return (invoke "div" (f64.const -infinity) (f64.const 0x0.0000000000001p-1022)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const infinity) (f64.const -0x0.0000000000001p-1022)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const infinity) (f64.const 0x0.0000000000001p-1022)) (f64.const infinity))
-(assert_return (invoke "div" (f64.const -infinity) (f64.const -0x1p-1022)) (f64.const infinity))
-(assert_return (invoke "div" (f64.const -infinity) (f64.const 0x1p-1022)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const infinity) (f64.const -0x1p-1022)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const infinity) (f64.const 0x1p-1022)) (f64.const infinity))
-(assert_return (invoke "div" (f64.const -infinity) (f64.const -0x1p-1)) (f64.const infinity))
-(assert_return (invoke "div" (f64.const -infinity) (f64.const 0x1p-1)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const infinity) (f64.const -0x1p-1)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const infinity) (f64.const 0x1p-1)) (f64.const infinity))
-(assert_return (invoke "div" (f64.const -infinity) (f64.const -0x1p+0)) (f64.const infinity))
-(assert_return (invoke "div" (f64.const -infinity) (f64.const 0x1p+0)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const infinity) (f64.const -0x1p+0)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const infinity) (f64.const 0x1p+0)) (f64.const infinity))
-(assert_return (invoke "div" (f64.const -infinity) (f64.const -0x1.921fb54442d18p+2)) (f64.const infinity))
-(assert_return (invoke "div" (f64.const -infinity) (f64.const 0x1.921fb54442d18p+2)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const infinity) (f64.const -0x1.921fb54442d18p+2)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const infinity) (f64.const 0x1.921fb54442d18p+2)) (f64.const infinity))
-(assert_return (invoke "div" (f64.const -infinity) (f64.const -0x1.fffffffffffffp+1023)) (f64.const infinity))
-(assert_return (invoke "div" (f64.const -infinity) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const infinity) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -infinity))
-(assert_return (invoke "div" (f64.const infinity) (f64.const 0x1.fffffffffffffp+1023)) (f64.const infinity))
-(assert_return_canonical_nan (invoke "div" (f64.const -infinity) (f64.const -infinity)))
-(assert_return_canonical_nan (invoke "div" (f64.const -infinity) (f64.const infinity)))
-(assert_return_canonical_nan (invoke "div" (f64.const infinity) (f64.const -infinity)))
-(assert_return_canonical_nan (invoke "div" (f64.const infinity) (f64.const infinity)))
-(assert_return_canonical_nan (invoke "div" (f64.const -infinity) (f64.const -nan)))
-(assert_return_canonical_nan (invoke "div" (f64.const -infinity) (f64.const nan)))
-(assert_return_canonical_nan (invoke "div" (f64.const infinity) (f64.const -nan)))
-(assert_return_canonical_nan (invoke "div" (f64.const infinity) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)))
+(assert_return (invoke "div" (f64.const -inf) (f64.const -0x0p+0)) (f64.const inf))
+(assert_return (invoke "div" (f64.const -inf) (f64.const 0x0p+0)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const inf) (f64.const -0x0p+0)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const inf) (f64.const 0x0p+0)) (f64.const inf))
+(assert_return (invoke "div" (f64.const -inf) (f64.const -0x0.0000000000001p-1022)) (f64.const inf))
+(assert_return (invoke "div" (f64.const -inf) (f64.const 0x0.0000000000001p-1022)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const inf) (f64.const -0x0.0000000000001p-1022)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const inf) (f64.const 0x0.0000000000001p-1022)) (f64.const inf))
+(assert_return (invoke "div" (f64.const -inf) (f64.const -0x1p-1022)) (f64.const inf))
+(assert_return (invoke "div" (f64.const -inf) (f64.const 0x1p-1022)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const inf) (f64.const -0x1p-1022)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const inf) (f64.const 0x1p-1022)) (f64.const inf))
+(assert_return (invoke "div" (f64.const -inf) (f64.const -0x1p-1)) (f64.const inf))
+(assert_return (invoke "div" (f64.const -inf) (f64.const 0x1p-1)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const inf) (f64.const -0x1p-1)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const inf) (f64.const 0x1p-1)) (f64.const inf))
+(assert_return (invoke "div" (f64.const -inf) (f64.const -0x1p+0)) (f64.const inf))
+(assert_return (invoke "div" (f64.const -inf) (f64.const 0x1p+0)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const inf) (f64.const -0x1p+0)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const inf) (f64.const 0x1p+0)) (f64.const inf))
+(assert_return (invoke "div" (f64.const -inf) (f64.const -0x1.921fb54442d18p+2)) (f64.const inf))
+(assert_return (invoke "div" (f64.const -inf) (f64.const 0x1.921fb54442d18p+2)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const inf) (f64.const -0x1.921fb54442d18p+2)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const inf) (f64.const 0x1.921fb54442d18p+2)) (f64.const inf))
+(assert_return (invoke "div" (f64.const -inf) (f64.const -0x1.fffffffffffffp+1023)) (f64.const inf))
+(assert_return (invoke "div" (f64.const -inf) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const inf) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -inf))
+(assert_return (invoke "div" (f64.const inf) (f64.const 0x1.fffffffffffffp+1023)) (f64.const inf))
+(assert_return_canonical_nan (invoke "div" (f64.const -inf) (f64.const -inf)))
+(assert_return_canonical_nan (invoke "div" (f64.const -inf) (f64.const inf)))
+(assert_return_canonical_nan (invoke "div" (f64.const inf) (f64.const -inf)))
+(assert_return_canonical_nan (invoke "div" (f64.const inf) (f64.const inf)))
+(assert_return_canonical_nan (invoke "div" (f64.const -inf) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -inf) (f64.const -nan:0x4000000000000)))
+(assert_return_canonical_nan (invoke "div" (f64.const -inf) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -inf) (f64.const nan:0x4000000000000)))
+(assert_return_canonical_nan (invoke "div" (f64.const inf) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const inf) (f64.const -nan:0x4000000000000)))
+(assert_return_canonical_nan (invoke "div" (f64.const inf) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const inf) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "div" (f64.const -nan) (f64.const -0x0p+0)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -nan:0x4000000000000) (f64.const -0x0p+0)))
 (assert_return_canonical_nan (invoke "div" (f64.const -nan) (f64.const 0x0p+0)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -nan:0x4000000000000) (f64.const 0x0p+0)))
 (assert_return_canonical_nan (invoke "div" (f64.const nan) (f64.const -0x0p+0)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const nan:0x4000000000000) (f64.const -0x0p+0)))
 (assert_return_canonical_nan (invoke "div" (f64.const nan) (f64.const 0x0p+0)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const nan:0x4000000000000) (f64.const 0x0p+0)))
 (assert_return_canonical_nan (invoke "div" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)))
 (assert_return_canonical_nan (invoke "div" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)))
 (assert_return_canonical_nan (invoke "div" (f64.const nan) (f64.const -0x0.0000000000001p-1022)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)))
 (assert_return_canonical_nan (invoke "div" (f64.const nan) (f64.const 0x0.0000000000001p-1022)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)))
 (assert_return_canonical_nan (invoke "div" (f64.const -nan) (f64.const -0x1p-1022)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1022)))
 (assert_return_canonical_nan (invoke "div" (f64.const -nan) (f64.const 0x1p-1022)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1022)))
 (assert_return_canonical_nan (invoke "div" (f64.const nan) (f64.const -0x1p-1022)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const nan:0x4000000000000) (f64.const -0x1p-1022)))
 (assert_return_canonical_nan (invoke "div" (f64.const nan) (f64.const 0x1p-1022)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const nan:0x4000000000000) (f64.const 0x1p-1022)))
 (assert_return_canonical_nan (invoke "div" (f64.const -nan) (f64.const -0x1p-1)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1)))
 (assert_return_canonical_nan (invoke "div" (f64.const -nan) (f64.const 0x1p-1)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1)))
 (assert_return_canonical_nan (invoke "div" (f64.const nan) (f64.const -0x1p-1)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const nan:0x4000000000000) (f64.const -0x1p-1)))
 (assert_return_canonical_nan (invoke "div" (f64.const nan) (f64.const 0x1p-1)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const nan:0x4000000000000) (f64.const 0x1p-1)))
 (assert_return_canonical_nan (invoke "div" (f64.const -nan) (f64.const -0x1p+0)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -nan:0x4000000000000) (f64.const -0x1p+0)))
 (assert_return_canonical_nan (invoke "div" (f64.const -nan) (f64.const 0x1p+0)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -nan:0x4000000000000) (f64.const 0x1p+0)))
 (assert_return_canonical_nan (invoke "div" (f64.const nan) (f64.const -0x1p+0)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const nan:0x4000000000000) (f64.const -0x1p+0)))
 (assert_return_canonical_nan (invoke "div" (f64.const nan) (f64.const 0x1p+0)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const nan:0x4000000000000) (f64.const 0x1p+0)))
 (assert_return_canonical_nan (invoke "div" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)))
 (assert_return_canonical_nan (invoke "div" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)))
 (assert_return_canonical_nan (invoke "div" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)))
 (assert_return_canonical_nan (invoke "div" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)))
 (assert_return_canonical_nan (invoke "div" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)))
 (assert_return_canonical_nan (invoke "div" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)))
 (assert_return_canonical_nan (invoke "div" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)))
 (assert_return_canonical_nan (invoke "div" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)))
-(assert_return_canonical_nan (invoke "div" (f64.const -nan) (f64.const -infinity)))
-(assert_return_canonical_nan (invoke "div" (f64.const -nan) (f64.const infinity)))
-(assert_return_canonical_nan (invoke "div" (f64.const nan) (f64.const -infinity)))
-(assert_return_canonical_nan (invoke "div" (f64.const nan) (f64.const infinity)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)))
+(assert_return_canonical_nan (invoke "div" (f64.const -nan) (f64.const -inf)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -nan:0x4000000000000) (f64.const -inf)))
+(assert_return_canonical_nan (invoke "div" (f64.const -nan) (f64.const inf)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -nan:0x4000000000000) (f64.const inf)))
+(assert_return_canonical_nan (invoke "div" (f64.const nan) (f64.const -inf)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const nan:0x4000000000000) (f64.const -inf)))
+(assert_return_canonical_nan (invoke "div" (f64.const nan) (f64.const inf)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const nan:0x4000000000000) (f64.const inf)))
 (assert_return_canonical_nan (invoke "div" (f64.const -nan) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -nan:0x4000000000000) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -nan) (f64.const -nan:0x4000000000000)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -nan:0x4000000000000) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "div" (f64.const -nan) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -nan:0x4000000000000) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -nan) (f64.const nan:0x4000000000000)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const -nan:0x4000000000000) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "div" (f64.const nan) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const nan:0x4000000000000) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const nan) (f64.const -nan:0x4000000000000)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const nan:0x4000000000000) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "div" (f64.const nan) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const nan:0x4000000000000) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const nan) (f64.const nan:0x4000000000000)))
+(assert_return_arithmetic_nan (invoke "div" (f64.const nan:0x4000000000000) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "min" (f64.const -0x0p+0) (f64.const -0x0p+0)) (f64.const -0x0p+0))
 (assert_return (invoke "min" (f64.const -0x0p+0) (f64.const 0x0p+0)) (f64.const -0x0p+0))
 (assert_return (invoke "min" (f64.const 0x0p+0) (f64.const -0x0p+0)) (f64.const -0x0p+0))
@@ -1342,14 +1644,16 @@
 (assert_return (invoke "min" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x0p+0))
 (assert_return (invoke "min" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "min" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0p+0))
-(assert_return (invoke "min" (f64.const -0x0p+0) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "min" (f64.const -0x0p+0) (f64.const infinity)) (f64.const -0x0p+0))
-(assert_return (invoke "min" (f64.const 0x0p+0) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "min" (f64.const 0x0p+0) (f64.const infinity)) (f64.const 0x0p+0))
+(assert_return (invoke "min" (f64.const -0x0p+0) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "min" (f64.const -0x0p+0) (f64.const inf)) (f64.const -0x0p+0))
+(assert_return (invoke "min" (f64.const 0x0p+0) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "min" (f64.const 0x0p+0) (f64.const inf)) (f64.const 0x0p+0))
 (assert_return_canonical_nan (invoke "min" (f64.const -0x0p+0) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const -0x0p+0) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "min" (f64.const -0x0p+0) (f64.const nan)))
 (assert_return_arithmetic_nan (invoke "min" (f64.const -0x0p+0) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "min" (f64.const 0x0p+0) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const 0x0p+0) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "min" (f64.const 0x0p+0) (f64.const nan)))
 (assert_return_arithmetic_nan (invoke "min" (f64.const 0x0p+0) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "min" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const -0x0.0000000000001p-1022))
@@ -1380,14 +1684,16 @@
 (assert_return (invoke "min" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x0.0000000000001p-1022))
 (assert_return (invoke "min" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "min" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0.0000000000001p-1022))
-(assert_return (invoke "min" (f64.const -0x0.0000000000001p-1022) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "min" (f64.const -0x0.0000000000001p-1022) (f64.const infinity)) (f64.const -0x0.0000000000001p-1022))
-(assert_return (invoke "min" (f64.const 0x0.0000000000001p-1022) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "min" (f64.const 0x0.0000000000001p-1022) (f64.const infinity)) (f64.const 0x0.0000000000001p-1022))
+(assert_return (invoke "min" (f64.const -0x0.0000000000001p-1022) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "min" (f64.const -0x0.0000000000001p-1022) (f64.const inf)) (f64.const -0x0.0000000000001p-1022))
+(assert_return (invoke "min" (f64.const 0x0.0000000000001p-1022) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "min" (f64.const 0x0.0000000000001p-1022) (f64.const inf)) (f64.const 0x0.0000000000001p-1022))
 (assert_return_canonical_nan (invoke "min" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const -0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "min" (f64.const -0x0.0000000000001p-1022) (f64.const nan)))
 (assert_return_arithmetic_nan (invoke "min" (f64.const -0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "min" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const 0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "min" (f64.const 0x0.0000000000001p-1022) (f64.const nan)))
 (assert_return_arithmetic_nan (invoke "min" (f64.const 0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "min" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (f64.const -0x1p-1022))
@@ -1418,14 +1724,16 @@
 (assert_return (invoke "min" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1p-1022))
 (assert_return (invoke "min" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "min" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p-1022))
-(assert_return (invoke "min" (f64.const -0x1p-1022) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "min" (f64.const -0x1p-1022) (f64.const infinity)) (f64.const -0x1p-1022))
-(assert_return (invoke "min" (f64.const 0x1p-1022) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "min" (f64.const 0x1p-1022) (f64.const infinity)) (f64.const 0x1p-1022))
+(assert_return (invoke "min" (f64.const -0x1p-1022) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "min" (f64.const -0x1p-1022) (f64.const inf)) (f64.const -0x1p-1022))
+(assert_return (invoke "min" (f64.const 0x1p-1022) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "min" (f64.const 0x1p-1022) (f64.const inf)) (f64.const 0x1p-1022))
 (assert_return_canonical_nan (invoke "min" (f64.const -0x1p-1022) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const -0x1p-1022) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "min" (f64.const -0x1p-1022) (f64.const nan)))
 (assert_return_arithmetic_nan (invoke "min" (f64.const -0x1p-1022) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "min" (f64.const 0x1p-1022) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const 0x1p-1022) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "min" (f64.const 0x1p-1022) (f64.const nan)))
 (assert_return_arithmetic_nan (invoke "min" (f64.const 0x1p-1022) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "min" (f64.const -0x1p-1) (f64.const -0x0p+0)) (f64.const -0x1p-1))
@@ -1456,14 +1764,16 @@
 (assert_return (invoke "min" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1p-1))
 (assert_return (invoke "min" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "min" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p-1))
-(assert_return (invoke "min" (f64.const -0x1p-1) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "min" (f64.const -0x1p-1) (f64.const infinity)) (f64.const -0x1p-1))
-(assert_return (invoke "min" (f64.const 0x1p-1) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "min" (f64.const 0x1p-1) (f64.const infinity)) (f64.const 0x1p-1))
+(assert_return (invoke "min" (f64.const -0x1p-1) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "min" (f64.const -0x1p-1) (f64.const inf)) (f64.const -0x1p-1))
+(assert_return (invoke "min" (f64.const 0x1p-1) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "min" (f64.const 0x1p-1) (f64.const inf)) (f64.const 0x1p-1))
 (assert_return_canonical_nan (invoke "min" (f64.const -0x1p-1) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const -0x1p-1) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "min" (f64.const -0x1p-1) (f64.const nan)))
 (assert_return_arithmetic_nan (invoke "min" (f64.const -0x1p-1) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "min" (f64.const 0x1p-1) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const 0x1p-1) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "min" (f64.const 0x1p-1) (f64.const nan)))
 (assert_return_arithmetic_nan (invoke "min" (f64.const 0x1p-1) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "min" (f64.const -0x1p+0) (f64.const -0x0p+0)) (f64.const -0x1p+0))
@@ -1494,14 +1804,16 @@
 (assert_return (invoke "min" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1p+0))
 (assert_return (invoke "min" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "min" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p+0))
-(assert_return (invoke "min" (f64.const -0x1p+0) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "min" (f64.const -0x1p+0) (f64.const infinity)) (f64.const -0x1p+0))
-(assert_return (invoke "min" (f64.const 0x1p+0) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "min" (f64.const 0x1p+0) (f64.const infinity)) (f64.const 0x1p+0))
+(assert_return (invoke "min" (f64.const -0x1p+0) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "min" (f64.const -0x1p+0) (f64.const inf)) (f64.const -0x1p+0))
+(assert_return (invoke "min" (f64.const 0x1p+0) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "min" (f64.const 0x1p+0) (f64.const inf)) (f64.const 0x1p+0))
 (assert_return_canonical_nan (invoke "min" (f64.const -0x1p+0) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const -0x1p+0) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "min" (f64.const -0x1p+0) (f64.const nan)))
 (assert_return_arithmetic_nan (invoke "min" (f64.const -0x1p+0) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "min" (f64.const 0x1p+0) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const 0x1p+0) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "min" (f64.const 0x1p+0) (f64.const nan)))
 (assert_return_arithmetic_nan (invoke "min" (f64.const 0x1p+0) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "min" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const -0x1.921fb54442d18p+2))
@@ -1532,14 +1844,16 @@
 (assert_return (invoke "min" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.921fb54442d18p+2))
 (assert_return (invoke "min" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "min" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.921fb54442d18p+2))
-(assert_return (invoke "min" (f64.const -0x1.921fb54442d18p+2) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "min" (f64.const -0x1.921fb54442d18p+2) (f64.const infinity)) (f64.const -0x1.921fb54442d18p+2))
-(assert_return (invoke "min" (f64.const 0x1.921fb54442d18p+2) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "min" (f64.const 0x1.921fb54442d18p+2) (f64.const infinity)) (f64.const 0x1.921fb54442d18p+2))
+(assert_return (invoke "min" (f64.const -0x1.921fb54442d18p+2) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "min" (f64.const -0x1.921fb54442d18p+2) (f64.const inf)) (f64.const -0x1.921fb54442d18p+2))
+(assert_return (invoke "min" (f64.const 0x1.921fb54442d18p+2) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "min" (f64.const 0x1.921fb54442d18p+2) (f64.const inf)) (f64.const 0x1.921fb54442d18p+2))
 (assert_return_canonical_nan (invoke "min" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "min" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)))
 (assert_return_arithmetic_nan (invoke "min" (f64.const -0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "min" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "min" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)))
 (assert_return_arithmetic_nan (invoke "min" (f64.const 0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "min" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const -0x1.fffffffffffffp+1023))
@@ -1570,108 +1884,138 @@
 (assert_return (invoke "min" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "min" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "min" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "min" (f64.const -0x1.fffffffffffffp+1023) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "min" (f64.const -0x1.fffffffffffffp+1023) (f64.const infinity)) (f64.const -0x1.fffffffffffffp+1023))
-(assert_return (invoke "min" (f64.const 0x1.fffffffffffffp+1023) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "min" (f64.const 0x1.fffffffffffffp+1023) (f64.const infinity)) (f64.const 0x1.fffffffffffffp+1023))
+(assert_return (invoke "min" (f64.const -0x1.fffffffffffffp+1023) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "min" (f64.const -0x1.fffffffffffffp+1023) (f64.const inf)) (f64.const -0x1.fffffffffffffp+1023))
+(assert_return (invoke "min" (f64.const 0x1.fffffffffffffp+1023) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "min" (f64.const 0x1.fffffffffffffp+1023) (f64.const inf)) (f64.const 0x1.fffffffffffffp+1023))
 (assert_return_canonical_nan (invoke "min" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "min" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)))
 (assert_return_arithmetic_nan (invoke "min" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "min" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "min" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)))
 (assert_return_arithmetic_nan (invoke "min" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)))
-(assert_return (invoke "min" (f64.const -infinity) (f64.const -0x0p+0)) (f64.const -infinity))
-(assert_return (invoke "min" (f64.const -infinity) (f64.const 0x0p+0)) (f64.const -infinity))
-(assert_return (invoke "min" (f64.const infinity) (f64.const -0x0p+0)) (f64.const -0x0p+0))
-(assert_return (invoke "min" (f64.const infinity) (f64.const 0x0p+0)) (f64.const 0x0p+0))
-(assert_return (invoke "min" (f64.const -infinity) (f64.const -0x0.0000000000001p-1022)) (f64.const -infinity))
-(assert_return (invoke "min" (f64.const -infinity) (f64.const 0x0.0000000000001p-1022)) (f64.const -infinity))
-(assert_return (invoke "min" (f64.const infinity) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))
-(assert_return (invoke "min" (f64.const infinity) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))
-(assert_return (invoke "min" (f64.const -infinity) (f64.const -0x1p-1022)) (f64.const -infinity))
-(assert_return (invoke "min" (f64.const -infinity) (f64.const 0x1p-1022)) (f64.const -infinity))
-(assert_return (invoke "min" (f64.const infinity) (f64.const -0x1p-1022)) (f64.const -0x1p-1022))
-(assert_return (invoke "min" (f64.const infinity) (f64.const 0x1p-1022)) (f64.const 0x1p-1022))
-(assert_return (invoke "min" (f64.const -infinity) (f64.const -0x1p-1)) (f64.const -infinity))
-(assert_return (invoke "min" (f64.const -infinity) (f64.const 0x1p-1)) (f64.const -infinity))
-(assert_return (invoke "min" (f64.const infinity) (f64.const -0x1p-1)) (f64.const -0x1p-1))
-(assert_return (invoke "min" (f64.const infinity) (f64.const 0x1p-1)) (f64.const 0x1p-1))
-(assert_return (invoke "min" (f64.const -infinity) (f64.const -0x1p+0)) (f64.const -infinity))
-(assert_return (invoke "min" (f64.const -infinity) (f64.const 0x1p+0)) (f64.const -infinity))
-(assert_return (invoke "min" (f64.const infinity) (f64.const -0x1p+0)) (f64.const -0x1p+0))
-(assert_return (invoke "min" (f64.const infinity) (f64.const 0x1p+0)) (f64.const 0x1p+0))
-(assert_return (invoke "min" (f64.const -infinity) (f64.const -0x1.921fb54442d18p+2)) (f64.const -infinity))
-(assert_return (invoke "min" (f64.const -infinity) (f64.const 0x1.921fb54442d18p+2)) (f64.const -infinity))
-(assert_return (invoke "min" (f64.const infinity) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))
-(assert_return (invoke "min" (f64.const infinity) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))
-(assert_return (invoke "min" (f64.const -infinity) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -infinity))
-(assert_return (invoke "min" (f64.const -infinity) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -infinity))
-(assert_return (invoke "min" (f64.const infinity) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
-(assert_return (invoke "min" (f64.const infinity) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "min" (f64.const -infinity) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "min" (f64.const -infinity) (f64.const infinity)) (f64.const -infinity))
-(assert_return (invoke "min" (f64.const infinity) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "min" (f64.const infinity) (f64.const infinity)) (f64.const infinity))
-(assert_return_canonical_nan (invoke "min" (f64.const -infinity) (f64.const -nan)))
-(assert_return_canonical_nan (invoke "min" (f64.const -infinity) (f64.const nan)))
-(assert_return_arithmetic_nan (invoke "min" (f64.const -infinity) (f64.const nan:0x4000000000000)))
-(assert_return_canonical_nan (invoke "min" (f64.const infinity) (f64.const -nan)))
-(assert_return_canonical_nan (invoke "min" (f64.const infinity) (f64.const nan)))
-(assert_return_arithmetic_nan (invoke "min" (f64.const infinity) (f64.const nan:0x4000000000000)))
+(assert_return (invoke "min" (f64.const -inf) (f64.const -0x0p+0)) (f64.const -inf))
+(assert_return (invoke "min" (f64.const -inf) (f64.const 0x0p+0)) (f64.const -inf))
+(assert_return (invoke "min" (f64.const inf) (f64.const -0x0p+0)) (f64.const -0x0p+0))
+(assert_return (invoke "min" (f64.const inf) (f64.const 0x0p+0)) (f64.const 0x0p+0))
+(assert_return (invoke "min" (f64.const -inf) (f64.const -0x0.0000000000001p-1022)) (f64.const -inf))
+(assert_return (invoke "min" (f64.const -inf) (f64.const 0x0.0000000000001p-1022)) (f64.const -inf))
+(assert_return (invoke "min" (f64.const inf) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))
+(assert_return (invoke "min" (f64.const inf) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))
+(assert_return (invoke "min" (f64.const -inf) (f64.const -0x1p-1022)) (f64.const -inf))
+(assert_return (invoke "min" (f64.const -inf) (f64.const 0x1p-1022)) (f64.const -inf))
+(assert_return (invoke "min" (f64.const inf) (f64.const -0x1p-1022)) (f64.const -0x1p-1022))
+(assert_return (invoke "min" (f64.const inf) (f64.const 0x1p-1022)) (f64.const 0x1p-1022))
+(assert_return (invoke "min" (f64.const -inf) (f64.const -0x1p-1)) (f64.const -inf))
+(assert_return (invoke "min" (f64.const -inf) (f64.const 0x1p-1)) (f64.const -inf))
+(assert_return (invoke "min" (f64.const inf) (f64.const -0x1p-1)) (f64.const -0x1p-1))
+(assert_return (invoke "min" (f64.const inf) (f64.const 0x1p-1)) (f64.const 0x1p-1))
+(assert_return (invoke "min" (f64.const -inf) (f64.const -0x1p+0)) (f64.const -inf))
+(assert_return (invoke "min" (f64.const -inf) (f64.const 0x1p+0)) (f64.const -inf))
+(assert_return (invoke "min" (f64.const inf) (f64.const -0x1p+0)) (f64.const -0x1p+0))
+(assert_return (invoke "min" (f64.const inf) (f64.const 0x1p+0)) (f64.const 0x1p+0))
+(assert_return (invoke "min" (f64.const -inf) (f64.const -0x1.921fb54442d18p+2)) (f64.const -inf))
+(assert_return (invoke "min" (f64.const -inf) (f64.const 0x1.921fb54442d18p+2)) (f64.const -inf))
+(assert_return (invoke "min" (f64.const inf) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))
+(assert_return (invoke "min" (f64.const inf) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))
+(assert_return (invoke "min" (f64.const -inf) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -inf))
+(assert_return (invoke "min" (f64.const -inf) (f64.const 0x1.fffffffffffffp+1023)) (f64.const -inf))
+(assert_return (invoke "min" (f64.const inf) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
+(assert_return (invoke "min" (f64.const inf) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
+(assert_return (invoke "min" (f64.const -inf) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "min" (f64.const -inf) (f64.const inf)) (f64.const -inf))
+(assert_return (invoke "min" (f64.const inf) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "min" (f64.const inf) (f64.const inf)) (f64.const inf))
+(assert_return_canonical_nan (invoke "min" (f64.const -inf) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const -inf) (f64.const -nan:0x4000000000000)))
+(assert_return_canonical_nan (invoke "min" (f64.const -inf) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const -inf) (f64.const nan:0x4000000000000)))
+(assert_return_canonical_nan (invoke "min" (f64.const inf) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const inf) (f64.const -nan:0x4000000000000)))
+(assert_return_canonical_nan (invoke "min" (f64.const inf) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const inf) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "min" (f64.const -nan) (f64.const -0x0p+0)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const -nan:0x4000000000000) (f64.const -0x0p+0)))
 (assert_return_canonical_nan (invoke "min" (f64.const -nan) (f64.const 0x0p+0)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const -nan:0x4000000000000) (f64.const 0x0p+0)))
 (assert_return_canonical_nan (invoke "min" (f64.const nan) (f64.const -0x0p+0)))
-(assert_return_canonical_nan (invoke "min" (f64.const nan) (f64.const 0x0p+0)))
 (assert_return_arithmetic_nan (invoke "min" (f64.const nan:0x4000000000000) (f64.const -0x0p+0)))
+(assert_return_canonical_nan (invoke "min" (f64.const nan) (f64.const 0x0p+0)))
 (assert_return_arithmetic_nan (invoke "min" (f64.const nan:0x4000000000000) (f64.const 0x0p+0)))
 (assert_return_canonical_nan (invoke "min" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const -nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)))
 (assert_return_canonical_nan (invoke "min" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const -nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)))
 (assert_return_canonical_nan (invoke "min" (f64.const nan) (f64.const -0x0.0000000000001p-1022)))
-(assert_return_canonical_nan (invoke "min" (f64.const nan) (f64.const 0x0.0000000000001p-1022)))
 (assert_return_arithmetic_nan (invoke "min" (f64.const nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)))
+(assert_return_canonical_nan (invoke "min" (f64.const nan) (f64.const 0x0.0000000000001p-1022)))
 (assert_return_arithmetic_nan (invoke "min" (f64.const nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)))
 (assert_return_canonical_nan (invoke "min" (f64.const -nan) (f64.const -0x1p-1022)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1022)))
 (assert_return_canonical_nan (invoke "min" (f64.const -nan) (f64.const 0x1p-1022)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1022)))
 (assert_return_canonical_nan (invoke "min" (f64.const nan) (f64.const -0x1p-1022)))
-(assert_return_canonical_nan (invoke "min" (f64.const nan) (f64.const 0x1p-1022)))
 (assert_return_arithmetic_nan (invoke "min" (f64.const nan:0x4000000000000) (f64.const -0x1p-1022)))
+(assert_return_canonical_nan (invoke "min" (f64.const nan) (f64.const 0x1p-1022)))
 (assert_return_arithmetic_nan (invoke "min" (f64.const nan:0x4000000000000) (f64.const 0x1p-1022)))
 (assert_return_canonical_nan (invoke "min" (f64.const -nan) (f64.const -0x1p-1)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1)))
 (assert_return_canonical_nan (invoke "min" (f64.const -nan) (f64.const 0x1p-1)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1)))
 (assert_return_canonical_nan (invoke "min" (f64.const nan) (f64.const -0x1p-1)))
-(assert_return_canonical_nan (invoke "min" (f64.const nan) (f64.const 0x1p-1)))
 (assert_return_arithmetic_nan (invoke "min" (f64.const nan:0x4000000000000) (f64.const -0x1p-1)))
+(assert_return_canonical_nan (invoke "min" (f64.const nan) (f64.const 0x1p-1)))
 (assert_return_arithmetic_nan (invoke "min" (f64.const nan:0x4000000000000) (f64.const 0x1p-1)))
 (assert_return_canonical_nan (invoke "min" (f64.const -nan) (f64.const -0x1p+0)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const -nan:0x4000000000000) (f64.const -0x1p+0)))
 (assert_return_canonical_nan (invoke "min" (f64.const -nan) (f64.const 0x1p+0)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const -nan:0x4000000000000) (f64.const 0x1p+0)))
 (assert_return_canonical_nan (invoke "min" (f64.const nan) (f64.const -0x1p+0)))
-(assert_return_canonical_nan (invoke "min" (f64.const nan) (f64.const 0x1p+0)))
 (assert_return_arithmetic_nan (invoke "min" (f64.const nan:0x4000000000000) (f64.const -0x1p+0)))
+(assert_return_canonical_nan (invoke "min" (f64.const nan) (f64.const 0x1p+0)))
 (assert_return_arithmetic_nan (invoke "min" (f64.const nan:0x4000000000000) (f64.const 0x1p+0)))
 (assert_return_canonical_nan (invoke "min" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const -nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)))
 (assert_return_canonical_nan (invoke "min" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const -nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)))
 (assert_return_canonical_nan (invoke "min" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)))
-(assert_return_canonical_nan (invoke "min" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)))
 (assert_return_arithmetic_nan (invoke "min" (f64.const nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)))
+(assert_return_canonical_nan (invoke "min" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)))
 (assert_return_arithmetic_nan (invoke "min" (f64.const nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)))
 (assert_return_canonical_nan (invoke "min" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const -nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)))
 (assert_return_canonical_nan (invoke "min" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const -nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)))
 (assert_return_canonical_nan (invoke "min" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)))
-(assert_return_canonical_nan (invoke "min" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)))
 (assert_return_arithmetic_nan (invoke "min" (f64.const nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)))
+(assert_return_canonical_nan (invoke "min" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)))
 (assert_return_arithmetic_nan (invoke "min" (f64.const nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)))
-(assert_return_canonical_nan (invoke "min" (f64.const -nan) (f64.const -infinity)))
-(assert_return_canonical_nan (invoke "min" (f64.const -nan) (f64.const infinity)))
-(assert_return_canonical_nan (invoke "min" (f64.const nan) (f64.const -infinity)))
-(assert_return_canonical_nan (invoke "min" (f64.const nan) (f64.const infinity)))
-(assert_return_arithmetic_nan (invoke "min" (f64.const nan:0x4000000000000) (f64.const -infinity)))
-(assert_return_arithmetic_nan (invoke "min" (f64.const nan:0x4000000000000) (f64.const infinity)))
+(assert_return_canonical_nan (invoke "min" (f64.const -nan) (f64.const -inf)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const -nan:0x4000000000000) (f64.const -inf)))
+(assert_return_canonical_nan (invoke "min" (f64.const -nan) (f64.const inf)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const -nan:0x4000000000000) (f64.const inf)))
+(assert_return_canonical_nan (invoke "min" (f64.const nan) (f64.const -inf)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const nan:0x4000000000000) (f64.const -inf)))
+(assert_return_canonical_nan (invoke "min" (f64.const nan) (f64.const inf)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const nan:0x4000000000000) (f64.const inf)))
 (assert_return_canonical_nan (invoke "min" (f64.const -nan) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const -nan:0x4000000000000) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const -nan) (f64.const -nan:0x4000000000000)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const -nan:0x4000000000000) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "min" (f64.const -nan) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const -nan:0x4000000000000) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const -nan) (f64.const nan:0x4000000000000)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const -nan:0x4000000000000) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "min" (f64.const nan) (f64.const -nan)))
-(assert_return_canonical_nan (invoke "min" (f64.const nan) (f64.const nan)))
 (assert_return_arithmetic_nan (invoke "min" (f64.const nan:0x4000000000000) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const nan) (f64.const -nan:0x4000000000000)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const nan:0x4000000000000) (f64.const -nan:0x4000000000000)))
+(assert_return_canonical_nan (invoke "min" (f64.const nan) (f64.const nan)))
 (assert_return_arithmetic_nan (invoke "min" (f64.const nan:0x4000000000000) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const nan) (f64.const nan:0x4000000000000)))
+(assert_return_arithmetic_nan (invoke "min" (f64.const nan:0x4000000000000) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "max" (f64.const -0x0p+0) (f64.const -0x0p+0)) (f64.const -0x0p+0))
 (assert_return (invoke "max" (f64.const -0x0p+0) (f64.const 0x0p+0)) (f64.const 0x0p+0))
 (assert_return (invoke "max" (f64.const 0x0p+0) (f64.const -0x0p+0)) (f64.const 0x0p+0))
@@ -1700,14 +2044,16 @@
 (assert_return (invoke "max" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
 (assert_return (invoke "max" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x0p+0))
 (assert_return (invoke "max" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "max" (f64.const -0x0p+0) (f64.const -infinity)) (f64.const -0x0p+0))
-(assert_return (invoke "max" (f64.const -0x0p+0) (f64.const infinity)) (f64.const infinity))
-(assert_return (invoke "max" (f64.const 0x0p+0) (f64.const -infinity)) (f64.const 0x0p+0))
-(assert_return (invoke "max" (f64.const 0x0p+0) (f64.const infinity)) (f64.const infinity))
+(assert_return (invoke "max" (f64.const -0x0p+0) (f64.const -inf)) (f64.const -0x0p+0))
+(assert_return (invoke "max" (f64.const -0x0p+0) (f64.const inf)) (f64.const inf))
+(assert_return (invoke "max" (f64.const 0x0p+0) (f64.const -inf)) (f64.const 0x0p+0))
+(assert_return (invoke "max" (f64.const 0x0p+0) (f64.const inf)) (f64.const inf))
 (assert_return_canonical_nan (invoke "max" (f64.const -0x0p+0) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const -0x0p+0) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "max" (f64.const -0x0p+0) (f64.const nan)))
 (assert_return_arithmetic_nan (invoke "max" (f64.const -0x0p+0) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "max" (f64.const 0x0p+0) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const 0x0p+0) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "max" (f64.const 0x0p+0) (f64.const nan)))
 (assert_return_arithmetic_nan (invoke "max" (f64.const 0x0p+0) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "max" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const -0x0p+0))
@@ -1738,14 +2084,16 @@
 (assert_return (invoke "max" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
 (assert_return (invoke "max" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x0.0000000000001p-1022))
 (assert_return (invoke "max" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "max" (f64.const -0x0.0000000000001p-1022) (f64.const -infinity)) (f64.const -0x0.0000000000001p-1022))
-(assert_return (invoke "max" (f64.const -0x0.0000000000001p-1022) (f64.const infinity)) (f64.const infinity))
-(assert_return (invoke "max" (f64.const 0x0.0000000000001p-1022) (f64.const -infinity)) (f64.const 0x0.0000000000001p-1022))
-(assert_return (invoke "max" (f64.const 0x0.0000000000001p-1022) (f64.const infinity)) (f64.const infinity))
+(assert_return (invoke "max" (f64.const -0x0.0000000000001p-1022) (f64.const -inf)) (f64.const -0x0.0000000000001p-1022))
+(assert_return (invoke "max" (f64.const -0x0.0000000000001p-1022) (f64.const inf)) (f64.const inf))
+(assert_return (invoke "max" (f64.const 0x0.0000000000001p-1022) (f64.const -inf)) (f64.const 0x0.0000000000001p-1022))
+(assert_return (invoke "max" (f64.const 0x0.0000000000001p-1022) (f64.const inf)) (f64.const inf))
 (assert_return_canonical_nan (invoke "max" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const -0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "max" (f64.const -0x0.0000000000001p-1022) (f64.const nan)))
 (assert_return_arithmetic_nan (invoke "max" (f64.const -0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "max" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const 0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "max" (f64.const 0x0.0000000000001p-1022) (f64.const nan)))
 (assert_return_arithmetic_nan (invoke "max" (f64.const 0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "max" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (f64.const -0x0p+0))
@@ -1776,14 +2124,16 @@
 (assert_return (invoke "max" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
 (assert_return (invoke "max" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1p-1022))
 (assert_return (invoke "max" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "max" (f64.const -0x1p-1022) (f64.const -infinity)) (f64.const -0x1p-1022))
-(assert_return (invoke "max" (f64.const -0x1p-1022) (f64.const infinity)) (f64.const infinity))
-(assert_return (invoke "max" (f64.const 0x1p-1022) (f64.const -infinity)) (f64.const 0x1p-1022))
-(assert_return (invoke "max" (f64.const 0x1p-1022) (f64.const infinity)) (f64.const infinity))
+(assert_return (invoke "max" (f64.const -0x1p-1022) (f64.const -inf)) (f64.const -0x1p-1022))
+(assert_return (invoke "max" (f64.const -0x1p-1022) (f64.const inf)) (f64.const inf))
+(assert_return (invoke "max" (f64.const 0x1p-1022) (f64.const -inf)) (f64.const 0x1p-1022))
+(assert_return (invoke "max" (f64.const 0x1p-1022) (f64.const inf)) (f64.const inf))
 (assert_return_canonical_nan (invoke "max" (f64.const -0x1p-1022) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const -0x1p-1022) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "max" (f64.const -0x1p-1022) (f64.const nan)))
 (assert_return_arithmetic_nan (invoke "max" (f64.const -0x1p-1022) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "max" (f64.const 0x1p-1022) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const 0x1p-1022) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "max" (f64.const 0x1p-1022) (f64.const nan)))
 (assert_return_arithmetic_nan (invoke "max" (f64.const 0x1p-1022) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "max" (f64.const -0x1p-1) (f64.const -0x0p+0)) (f64.const -0x0p+0))
@@ -1814,14 +2164,16 @@
 (assert_return (invoke "max" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
 (assert_return (invoke "max" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1p-1))
 (assert_return (invoke "max" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "max" (f64.const -0x1p-1) (f64.const -infinity)) (f64.const -0x1p-1))
-(assert_return (invoke "max" (f64.const -0x1p-1) (f64.const infinity)) (f64.const infinity))
-(assert_return (invoke "max" (f64.const 0x1p-1) (f64.const -infinity)) (f64.const 0x1p-1))
-(assert_return (invoke "max" (f64.const 0x1p-1) (f64.const infinity)) (f64.const infinity))
+(assert_return (invoke "max" (f64.const -0x1p-1) (f64.const -inf)) (f64.const -0x1p-1))
+(assert_return (invoke "max" (f64.const -0x1p-1) (f64.const inf)) (f64.const inf))
+(assert_return (invoke "max" (f64.const 0x1p-1) (f64.const -inf)) (f64.const 0x1p-1))
+(assert_return (invoke "max" (f64.const 0x1p-1) (f64.const inf)) (f64.const inf))
 (assert_return_canonical_nan (invoke "max" (f64.const -0x1p-1) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const -0x1p-1) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "max" (f64.const -0x1p-1) (f64.const nan)))
 (assert_return_arithmetic_nan (invoke "max" (f64.const -0x1p-1) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "max" (f64.const 0x1p-1) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const 0x1p-1) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "max" (f64.const 0x1p-1) (f64.const nan)))
 (assert_return_arithmetic_nan (invoke "max" (f64.const 0x1p-1) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "max" (f64.const -0x1p+0) (f64.const -0x0p+0)) (f64.const -0x0p+0))
@@ -1852,14 +2204,16 @@
 (assert_return (invoke "max" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
 (assert_return (invoke "max" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1p+0))
 (assert_return (invoke "max" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "max" (f64.const -0x1p+0) (f64.const -infinity)) (f64.const -0x1p+0))
-(assert_return (invoke "max" (f64.const -0x1p+0) (f64.const infinity)) (f64.const infinity))
-(assert_return (invoke "max" (f64.const 0x1p+0) (f64.const -infinity)) (f64.const 0x1p+0))
-(assert_return (invoke "max" (f64.const 0x1p+0) (f64.const infinity)) (f64.const infinity))
+(assert_return (invoke "max" (f64.const -0x1p+0) (f64.const -inf)) (f64.const -0x1p+0))
+(assert_return (invoke "max" (f64.const -0x1p+0) (f64.const inf)) (f64.const inf))
+(assert_return (invoke "max" (f64.const 0x1p+0) (f64.const -inf)) (f64.const 0x1p+0))
+(assert_return (invoke "max" (f64.const 0x1p+0) (f64.const inf)) (f64.const inf))
 (assert_return_canonical_nan (invoke "max" (f64.const -0x1p+0) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const -0x1p+0) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "max" (f64.const -0x1p+0) (f64.const nan)))
 (assert_return_arithmetic_nan (invoke "max" (f64.const -0x1p+0) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "max" (f64.const 0x1p+0) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const 0x1p+0) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "max" (f64.const 0x1p+0) (f64.const nan)))
 (assert_return_arithmetic_nan (invoke "max" (f64.const 0x1p+0) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "max" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const -0x0p+0))
@@ -1890,14 +2244,16 @@
 (assert_return (invoke "max" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
 (assert_return (invoke "max" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.921fb54442d18p+2))
 (assert_return (invoke "max" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "max" (f64.const -0x1.921fb54442d18p+2) (f64.const -infinity)) (f64.const -0x1.921fb54442d18p+2))
-(assert_return (invoke "max" (f64.const -0x1.921fb54442d18p+2) (f64.const infinity)) (f64.const infinity))
-(assert_return (invoke "max" (f64.const 0x1.921fb54442d18p+2) (f64.const -infinity)) (f64.const 0x1.921fb54442d18p+2))
-(assert_return (invoke "max" (f64.const 0x1.921fb54442d18p+2) (f64.const infinity)) (f64.const infinity))
+(assert_return (invoke "max" (f64.const -0x1.921fb54442d18p+2) (f64.const -inf)) (f64.const -0x1.921fb54442d18p+2))
+(assert_return (invoke "max" (f64.const -0x1.921fb54442d18p+2) (f64.const inf)) (f64.const inf))
+(assert_return (invoke "max" (f64.const 0x1.921fb54442d18p+2) (f64.const -inf)) (f64.const 0x1.921fb54442d18p+2))
+(assert_return (invoke "max" (f64.const 0x1.921fb54442d18p+2) (f64.const inf)) (f64.const inf))
 (assert_return_canonical_nan (invoke "max" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "max" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)))
 (assert_return_arithmetic_nan (invoke "max" (f64.const -0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "max" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "max" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)))
 (assert_return_arithmetic_nan (invoke "max" (f64.const 0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "max" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const -0x0p+0))
@@ -1928,432 +2284,138 @@
 (assert_return (invoke "max" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
 (assert_return (invoke "max" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
 (assert_return (invoke "max" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "max" (f64.const -0x1.fffffffffffffp+1023) (f64.const -infinity)) (f64.const -0x1.fffffffffffffp+1023))
-(assert_return (invoke "max" (f64.const -0x1.fffffffffffffp+1023) (f64.const infinity)) (f64.const infinity))
-(assert_return (invoke "max" (f64.const 0x1.fffffffffffffp+1023) (f64.const -infinity)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "max" (f64.const 0x1.fffffffffffffp+1023) (f64.const infinity)) (f64.const infinity))
+(assert_return (invoke "max" (f64.const -0x1.fffffffffffffp+1023) (f64.const -inf)) (f64.const -0x1.fffffffffffffp+1023))
+(assert_return (invoke "max" (f64.const -0x1.fffffffffffffp+1023) (f64.const inf)) (f64.const inf))
+(assert_return (invoke "max" (f64.const 0x1.fffffffffffffp+1023) (f64.const -inf)) (f64.const 0x1.fffffffffffffp+1023))
+(assert_return (invoke "max" (f64.const 0x1.fffffffffffffp+1023) (f64.const inf)) (f64.const inf))
 (assert_return_canonical_nan (invoke "max" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "max" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)))
 (assert_return_arithmetic_nan (invoke "max" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "max" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "max" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)))
 (assert_return_arithmetic_nan (invoke "max" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)))
-(assert_return (invoke "max" (f64.const -infinity) (f64.const -0x0p+0)) (f64.const -0x0p+0))
-(assert_return (invoke "max" (f64.const -infinity) (f64.const 0x0p+0)) (f64.const 0x0p+0))
-(assert_return (invoke "max" (f64.const infinity) (f64.const -0x0p+0)) (f64.const infinity))
-(assert_return (invoke "max" (f64.const infinity) (f64.const 0x0p+0)) (f64.const infinity))
-(assert_return (invoke "max" (f64.const -infinity) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))
-(assert_return (invoke "max" (f64.const -infinity) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))
-(assert_return (invoke "max" (f64.const infinity) (f64.const -0x0.0000000000001p-1022)) (f64.const infinity))
-(assert_return (invoke "max" (f64.const infinity) (f64.const 0x0.0000000000001p-1022)) (f64.const infinity))
-(assert_return (invoke "max" (f64.const -infinity) (f64.const -0x1p-1022)) (f64.const -0x1p-1022))
-(assert_return (invoke "max" (f64.const -infinity) (f64.const 0x1p-1022)) (f64.const 0x1p-1022))
-(assert_return (invoke "max" (f64.const infinity) (f64.const -0x1p-1022)) (f64.const infinity))
-(assert_return (invoke "max" (f64.const infinity) (f64.const 0x1p-1022)) (f64.const infinity))
-(assert_return (invoke "max" (f64.const -infinity) (f64.const -0x1p-1)) (f64.const -0x1p-1))
-(assert_return (invoke "max" (f64.const -infinity) (f64.const 0x1p-1)) (f64.const 0x1p-1))
-(assert_return (invoke "max" (f64.const infinity) (f64.const -0x1p-1)) (f64.const infinity))
-(assert_return (invoke "max" (f64.const infinity) (f64.const 0x1p-1)) (f64.const infinity))
-(assert_return (invoke "max" (f64.const -infinity) (f64.const -0x1p+0)) (f64.const -0x1p+0))
-(assert_return (invoke "max" (f64.const -infinity) (f64.const 0x1p+0)) (f64.const 0x1p+0))
-(assert_return (invoke "max" (f64.const infinity) (f64.const -0x1p+0)) (f64.const infinity))
-(assert_return (invoke "max" (f64.const infinity) (f64.const 0x1p+0)) (f64.const infinity))
-(assert_return (invoke "max" (f64.const -infinity) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))
-(assert_return (invoke "max" (f64.const -infinity) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))
-(assert_return (invoke "max" (f64.const infinity) (f64.const -0x1.921fb54442d18p+2)) (f64.const infinity))
-(assert_return (invoke "max" (f64.const infinity) (f64.const 0x1.921fb54442d18p+2)) (f64.const infinity))
-(assert_return (invoke "max" (f64.const -infinity) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
-(assert_return (invoke "max" (f64.const -infinity) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "max" (f64.const infinity) (f64.const -0x1.fffffffffffffp+1023)) (f64.const infinity))
-(assert_return (invoke "max" (f64.const infinity) (f64.const 0x1.fffffffffffffp+1023)) (f64.const infinity))
-(assert_return (invoke "max" (f64.const -infinity) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "max" (f64.const -infinity) (f64.const infinity)) (f64.const infinity))
-(assert_return (invoke "max" (f64.const infinity) (f64.const -infinity)) (f64.const infinity))
-(assert_return (invoke "max" (f64.const infinity) (f64.const infinity)) (f64.const infinity))
-(assert_return_canonical_nan (invoke "max" (f64.const -infinity) (f64.const -nan)))
-(assert_return_canonical_nan (invoke "max" (f64.const -infinity) (f64.const nan)))
-(assert_return_arithmetic_nan (invoke "max" (f64.const -infinity) (f64.const nan:0x4000000000000)))
-(assert_return_canonical_nan (invoke "max" (f64.const infinity) (f64.const -nan)))
-(assert_return_canonical_nan (invoke "max" (f64.const infinity) (f64.const nan)))
-(assert_return_arithmetic_nan (invoke "max" (f64.const infinity) (f64.const nan:0x4000000000000)))
+(assert_return (invoke "max" (f64.const -inf) (f64.const -0x0p+0)) (f64.const -0x0p+0))
+(assert_return (invoke "max" (f64.const -inf) (f64.const 0x0p+0)) (f64.const 0x0p+0))
+(assert_return (invoke "max" (f64.const inf) (f64.const -0x0p+0)) (f64.const inf))
+(assert_return (invoke "max" (f64.const inf) (f64.const 0x0p+0)) (f64.const inf))
+(assert_return (invoke "max" (f64.const -inf) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))
+(assert_return (invoke "max" (f64.const -inf) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))
+(assert_return (invoke "max" (f64.const inf) (f64.const -0x0.0000000000001p-1022)) (f64.const inf))
+(assert_return (invoke "max" (f64.const inf) (f64.const 0x0.0000000000001p-1022)) (f64.const inf))
+(assert_return (invoke "max" (f64.const -inf) (f64.const -0x1p-1022)) (f64.const -0x1p-1022))
+(assert_return (invoke "max" (f64.const -inf) (f64.const 0x1p-1022)) (f64.const 0x1p-1022))
+(assert_return (invoke "max" (f64.const inf) (f64.const -0x1p-1022)) (f64.const inf))
+(assert_return (invoke "max" (f64.const inf) (f64.const 0x1p-1022)) (f64.const inf))
+(assert_return (invoke "max" (f64.const -inf) (f64.const -0x1p-1)) (f64.const -0x1p-1))
+(assert_return (invoke "max" (f64.const -inf) (f64.const 0x1p-1)) (f64.const 0x1p-1))
+(assert_return (invoke "max" (f64.const inf) (f64.const -0x1p-1)) (f64.const inf))
+(assert_return (invoke "max" (f64.const inf) (f64.const 0x1p-1)) (f64.const inf))
+(assert_return (invoke "max" (f64.const -inf) (f64.const -0x1p+0)) (f64.const -0x1p+0))
+(assert_return (invoke "max" (f64.const -inf) (f64.const 0x1p+0)) (f64.const 0x1p+0))
+(assert_return (invoke "max" (f64.const inf) (f64.const -0x1p+0)) (f64.const inf))
+(assert_return (invoke "max" (f64.const inf) (f64.const 0x1p+0)) (f64.const inf))
+(assert_return (invoke "max" (f64.const -inf) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))
+(assert_return (invoke "max" (f64.const -inf) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))
+(assert_return (invoke "max" (f64.const inf) (f64.const -0x1.921fb54442d18p+2)) (f64.const inf))
+(assert_return (invoke "max" (f64.const inf) (f64.const 0x1.921fb54442d18p+2)) (f64.const inf))
+(assert_return (invoke "max" (f64.const -inf) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
+(assert_return (invoke "max" (f64.const -inf) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
+(assert_return (invoke "max" (f64.const inf) (f64.const -0x1.fffffffffffffp+1023)) (f64.const inf))
+(assert_return (invoke "max" (f64.const inf) (f64.const 0x1.fffffffffffffp+1023)) (f64.const inf))
+(assert_return (invoke "max" (f64.const -inf) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "max" (f64.const -inf) (f64.const inf)) (f64.const inf))
+(assert_return (invoke "max" (f64.const inf) (f64.const -inf)) (f64.const inf))
+(assert_return (invoke "max" (f64.const inf) (f64.const inf)) (f64.const inf))
+(assert_return_canonical_nan (invoke "max" (f64.const -inf) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const -inf) (f64.const -nan:0x4000000000000)))
+(assert_return_canonical_nan (invoke "max" (f64.const -inf) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const -inf) (f64.const nan:0x4000000000000)))
+(assert_return_canonical_nan (invoke "max" (f64.const inf) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const inf) (f64.const -nan:0x4000000000000)))
+(assert_return_canonical_nan (invoke "max" (f64.const inf) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const inf) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "max" (f64.const -nan) (f64.const -0x0p+0)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const -nan:0x4000000000000) (f64.const -0x0p+0)))
 (assert_return_canonical_nan (invoke "max" (f64.const -nan) (f64.const 0x0p+0)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const -nan:0x4000000000000) (f64.const 0x0p+0)))
 (assert_return_canonical_nan (invoke "max" (f64.const nan) (f64.const -0x0p+0)))
-(assert_return_canonical_nan (invoke "max" (f64.const nan) (f64.const 0x0p+0)))
 (assert_return_arithmetic_nan (invoke "max" (f64.const nan:0x4000000000000) (f64.const -0x0p+0)))
+(assert_return_canonical_nan (invoke "max" (f64.const nan) (f64.const 0x0p+0)))
 (assert_return_arithmetic_nan (invoke "max" (f64.const nan:0x4000000000000) (f64.const 0x0p+0)))
 (assert_return_canonical_nan (invoke "max" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const -nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)))
 (assert_return_canonical_nan (invoke "max" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const -nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)))
 (assert_return_canonical_nan (invoke "max" (f64.const nan) (f64.const -0x0.0000000000001p-1022)))
-(assert_return_canonical_nan (invoke "max" (f64.const nan) (f64.const 0x0.0000000000001p-1022)))
 (assert_return_arithmetic_nan (invoke "max" (f64.const nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)))
+(assert_return_canonical_nan (invoke "max" (f64.const nan) (f64.const 0x0.0000000000001p-1022)))
 (assert_return_arithmetic_nan (invoke "max" (f64.const nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)))
 (assert_return_canonical_nan (invoke "max" (f64.const -nan) (f64.const -0x1p-1022)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1022)))
 (assert_return_canonical_nan (invoke "max" (f64.const -nan) (f64.const 0x1p-1022)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1022)))
 (assert_return_canonical_nan (invoke "max" (f64.const nan) (f64.const -0x1p-1022)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const nan:0x4000000000000) (f64.const -0x1p-1022)))
 (assert_return_canonical_nan (invoke "max" (f64.const nan) (f64.const 0x1p-1022)))
 (assert_return_arithmetic_nan (invoke "max" (f64.const nan:0x4000000000000) (f64.const 0x1p-1022)))
-(assert_return_arithmetic_nan (invoke "max" (f64.const nan:0x4000000000000) (f64.const 0x1p-1022)))
 (assert_return_canonical_nan (invoke "max" (f64.const -nan) (f64.const -0x1p-1)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1)))
 (assert_return_canonical_nan (invoke "max" (f64.const -nan) (f64.const 0x1p-1)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1)))
 (assert_return_canonical_nan (invoke "max" (f64.const nan) (f64.const -0x1p-1)))
-(assert_return_canonical_nan (invoke "max" (f64.const nan) (f64.const 0x1p-1)))
 (assert_return_arithmetic_nan (invoke "max" (f64.const nan:0x4000000000000) (f64.const -0x1p-1)))
+(assert_return_canonical_nan (invoke "max" (f64.const nan) (f64.const 0x1p-1)))
 (assert_return_arithmetic_nan (invoke "max" (f64.const nan:0x4000000000000) (f64.const 0x1p-1)))
 (assert_return_canonical_nan (invoke "max" (f64.const -nan) (f64.const -0x1p+0)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const -nan:0x4000000000000) (f64.const -0x1p+0)))
 (assert_return_canonical_nan (invoke "max" (f64.const -nan) (f64.const 0x1p+0)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const -nan:0x4000000000000) (f64.const 0x1p+0)))
 (assert_return_canonical_nan (invoke "max" (f64.const nan) (f64.const -0x1p+0)))
-(assert_return_canonical_nan (invoke "max" (f64.const nan) (f64.const 0x1p+0)))
 (assert_return_arithmetic_nan (invoke "max" (f64.const nan:0x4000000000000) (f64.const -0x1p+0)))
+(assert_return_canonical_nan (invoke "max" (f64.const nan) (f64.const 0x1p+0)))
 (assert_return_arithmetic_nan (invoke "max" (f64.const nan:0x4000000000000) (f64.const 0x1p+0)))
 (assert_return_canonical_nan (invoke "max" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const -nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)))
 (assert_return_canonical_nan (invoke "max" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const -nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)))
 (assert_return_canonical_nan (invoke "max" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)))
-(assert_return_canonical_nan (invoke "max" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)))
 (assert_return_arithmetic_nan (invoke "max" (f64.const nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)))
+(assert_return_canonical_nan (invoke "max" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)))
 (assert_return_arithmetic_nan (invoke "max" (f64.const nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)))
 (assert_return_canonical_nan (invoke "max" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const -nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)))
 (assert_return_canonical_nan (invoke "max" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const -nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)))
 (assert_return_canonical_nan (invoke "max" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)))
-(assert_return_canonical_nan (invoke "max" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)))
 (assert_return_arithmetic_nan (invoke "max" (f64.const nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)))
+(assert_return_canonical_nan (invoke "max" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)))
 (assert_return_arithmetic_nan (invoke "max" (f64.const nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)))
-(assert_return_canonical_nan (invoke "max" (f64.const -nan) (f64.const -infinity)))
-(assert_return_canonical_nan (invoke "max" (f64.const -nan) (f64.const infinity)))
-(assert_return_canonical_nan (invoke "max" (f64.const nan) (f64.const -infinity)))
-(assert_return_canonical_nan (invoke "max" (f64.const nan) (f64.const infinity)))
-(assert_return_arithmetic_nan (invoke "max" (f64.const nan:0x4000000000000) (f64.const -infinity)))
-(assert_return_arithmetic_nan (invoke "max" (f64.const nan:0x4000000000000) (f64.const infinity)))
+(assert_return_canonical_nan (invoke "max" (f64.const -nan) (f64.const -inf)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const -nan:0x4000000000000) (f64.const -inf)))
+(assert_return_canonical_nan (invoke "max" (f64.const -nan) (f64.const inf)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const -nan:0x4000000000000) (f64.const inf)))
+(assert_return_canonical_nan (invoke "max" (f64.const nan) (f64.const -inf)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const nan:0x4000000000000) (f64.const -inf)))
+(assert_return_canonical_nan (invoke "max" (f64.const nan) (f64.const inf)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const nan:0x4000000000000) (f64.const inf)))
 (assert_return_canonical_nan (invoke "max" (f64.const -nan) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const -nan:0x4000000000000) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const -nan) (f64.const -nan:0x4000000000000)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const -nan:0x4000000000000) (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "max" (f64.const -nan) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const -nan:0x4000000000000) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const -nan) (f64.const nan:0x4000000000000)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const -nan:0x4000000000000) (f64.const nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "max" (f64.const nan) (f64.const -nan)))
-(assert_return_canonical_nan (invoke "max" (f64.const nan) (f64.const nan)))
 (assert_return_arithmetic_nan (invoke "max" (f64.const nan:0x4000000000000) (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const nan) (f64.const -nan:0x4000000000000)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const nan:0x4000000000000) (f64.const -nan:0x4000000000000)))
+(assert_return_canonical_nan (invoke "max" (f64.const nan) (f64.const nan)))
 (assert_return_arithmetic_nan (invoke "max" (f64.const nan:0x4000000000000) (f64.const nan)))
-(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const -0x0p+0)) (f64.const -0x0p+0))
-(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const 0x0p+0)) (f64.const 0x0p+0))
-(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const -0x0p+0)) (f64.const -0x0p+0))
-(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const 0x0p+0)) (f64.const 0x0p+0))
-(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0p+0))
-(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0p+0))
-(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0p+0))
-(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0p+0))
-(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const -0x1p-1022)) (f64.const -0x0p+0))
-(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const 0x1p-1022)) (f64.const 0x0p+0))
-(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const -0x1p-1022)) (f64.const -0x0p+0))
-(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const 0x1p-1022)) (f64.const 0x0p+0))
-(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const -0x1p-1)) (f64.const -0x0p+0))
-(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const 0x1p-1)) (f64.const 0x0p+0))
-(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const -0x1p-1)) (f64.const -0x0p+0))
-(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const 0x1p-1)) (f64.const 0x0p+0))
-(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const -0x1p+0)) (f64.const -0x0p+0))
-(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const 0x1p+0)) (f64.const 0x0p+0))
-(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const -0x1p+0)) (f64.const -0x0p+0))
-(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const 0x1p+0)) (f64.const 0x0p+0))
-(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x0p+0))
-(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0p+0))
-(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x0p+0))
-(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0p+0))
-(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0p+0))
-(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0p+0))
-(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0p+0))
-(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0p+0))
-(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const -infinity)) (f64.const -0x0p+0))
-(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const infinity)) (f64.const 0x0p+0))
-(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const -infinity)) (f64.const -0x0p+0))
-(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const infinity)) (f64.const 0x0p+0))
-(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const -nan)) (f64.const -0x0p+0))
-(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const nan)) (f64.const 0x0p+0))
-(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const -nan)) (f64.const -0x0p+0))
-(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const nan)) (f64.const 0x0p+0))
-(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const -0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const 0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const -0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const 0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (f64.const -0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (f64.const 0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (f64.const -0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (f64.const 0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1)) (f64.const -0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1)) (f64.const 0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1)) (f64.const -0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1)) (f64.const 0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p+0)) (f64.const -0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p+0)) (f64.const 0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p+0)) (f64.const -0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p+0)) (f64.const 0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const -infinity)) (f64.const -0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const infinity)) (f64.const 0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const -infinity)) (f64.const -0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const infinity)) (f64.const 0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)) (f64.const -0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const nan)) (f64.const 0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)) (f64.const -0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const nan)) (f64.const 0x0.0000000000001p-1022))
-(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (f64.const -0x1p-1022))
-(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (f64.const 0x1p-1022))
-(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (f64.const -0x1p-1022))
-(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const 0x0p+0)) (f64.const 0x1p-1022))
-(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p-1022))
-(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p-1022))
-(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p-1022))
-(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p-1022))
-(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const -0x1p-1022)) (f64.const -0x1p-1022))
-(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const 0x1p-1022)) (f64.const 0x1p-1022))
-(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const -0x1p-1022)) (f64.const -0x1p-1022))
-(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const 0x1p-1022)) (f64.const 0x1p-1022))
-(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const -0x1p-1)) (f64.const -0x1p-1022))
-(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const 0x1p-1)) (f64.const 0x1p-1022))
-(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const -0x1p-1)) (f64.const -0x1p-1022))
-(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const 0x1p-1)) (f64.const 0x1p-1022))
-(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const -0x1p+0)) (f64.const -0x1p-1022))
-(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const 0x1p+0)) (f64.const 0x1p-1022))
-(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const -0x1p+0)) (f64.const -0x1p-1022))
-(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const 0x1p+0)) (f64.const 0x1p-1022))
-(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1p-1022))
-(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1p-1022))
-(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1p-1022))
-(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1p-1022))
-(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1p-1022))
-(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p-1022))
-(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1p-1022))
-(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p-1022))
-(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const -infinity)) (f64.const -0x1p-1022))
-(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const infinity)) (f64.const 0x1p-1022))
-(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const -infinity)) (f64.const -0x1p-1022))
-(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const infinity)) (f64.const 0x1p-1022))
-(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const -nan)) (f64.const -0x1p-1022))
-(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const nan)) (f64.const 0x1p-1022))
-(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const -nan)) (f64.const -0x1p-1022))
-(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const nan)) (f64.const 0x1p-1022))
-(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const -0x0p+0)) (f64.const -0x1p-1))
-(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const 0x0p+0)) (f64.const 0x1p-1))
-(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const -0x0p+0)) (f64.const -0x1p-1))
-(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const 0x0p+0)) (f64.const 0x1p-1))
-(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p-1))
-(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p-1))
-(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p-1))
-(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p-1))
-(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const -0x1p-1022)) (f64.const -0x1p-1))
-(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const 0x1p-1022)) (f64.const 0x1p-1))
-(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const -0x1p-1022)) (f64.const -0x1p-1))
-(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const 0x1p-1022)) (f64.const 0x1p-1))
-(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const -0x1p-1)) (f64.const -0x1p-1))
-(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const 0x1p-1)) (f64.const 0x1p-1))
-(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const -0x1p-1)) (f64.const -0x1p-1))
-(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const 0x1p-1)) (f64.const 0x1p-1))
-(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const -0x1p+0)) (f64.const -0x1p-1))
-(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const 0x1p+0)) (f64.const 0x1p-1))
-(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const -0x1p+0)) (f64.const -0x1p-1))
-(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const 0x1p+0)) (f64.const 0x1p-1))
-(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1p-1))
-(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1p-1))
-(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1p-1))
-(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1p-1))
-(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1p-1))
-(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p-1))
-(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1p-1))
-(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p-1))
-(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const -infinity)) (f64.const -0x1p-1))
-(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const infinity)) (f64.const 0x1p-1))
-(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const -infinity)) (f64.const -0x1p-1))
-(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const infinity)) (f64.const 0x1p-1))
-(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const -nan)) (f64.const -0x1p-1))
-(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const nan)) (f64.const 0x1p-1))
-(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const -nan)) (f64.const -0x1p-1))
-(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const nan)) (f64.const 0x1p-1))
-(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const -0x0p+0)) (f64.const -0x1p+0))
-(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const 0x0p+0)) (f64.const 0x1p+0))
-(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const -0x0p+0)) (f64.const -0x1p+0))
-(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const 0x0p+0)) (f64.const 0x1p+0))
-(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p+0))
-(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p+0))
-(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p+0))
-(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p+0))
-(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const -0x1p-1022)) (f64.const -0x1p+0))
-(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const 0x1p-1022)) (f64.const 0x1p+0))
-(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const -0x1p-1022)) (f64.const -0x1p+0))
-(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const 0x1p-1022)) (f64.const 0x1p+0))
-(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const -0x1p-1)) (f64.const -0x1p+0))
-(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const 0x1p-1)) (f64.const 0x1p+0))
-(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const -0x1p-1)) (f64.const -0x1p+0))
-(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const 0x1p-1)) (f64.const 0x1p+0))
-(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const -0x1p+0)) (f64.const -0x1p+0))
-(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const 0x1p+0)) (f64.const 0x1p+0))
-(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const -0x1p+0)) (f64.const -0x1p+0))
-(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const 0x1p+0)) (f64.const 0x1p+0))
-(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1p+0))
-(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1p+0))
-(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1p+0))
-(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1p+0))
-(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1p+0))
-(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p+0))
-(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1p+0))
-(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p+0))
-(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const -infinity)) (f64.const -0x1p+0))
-(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const infinity)) (f64.const 0x1p+0))
-(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const -infinity)) (f64.const -0x1p+0))
-(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const infinity)) (f64.const 0x1p+0))
-(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const -nan)) (f64.const -0x1p+0))
-(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const nan)) (f64.const 0x1p+0))
-(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const -nan)) (f64.const -0x1p+0))
-(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const nan)) (f64.const 0x1p+0))
-(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const -0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const 0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const -0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const 0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const -0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const 0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const -0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const 0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const -0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (f64.const 0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const -0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (f64.const 0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (f64.const -0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (f64.const 0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (f64.const -0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (f64.const 0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const -infinity)) (f64.const -0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const infinity)) (f64.const 0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const -infinity)) (f64.const -0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const infinity)) (f64.const 0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)) (f64.const -0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)) (f64.const 0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)) (f64.const -0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)) (f64.const 0x1.921fb54442d18p+2))
-(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const -0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const -0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const -0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const -0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const -0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const -0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const -0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const -0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const -infinity)) (f64.const -0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const infinity)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const -infinity)) (f64.const -0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const infinity)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)) (f64.const -0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)) (f64.const -0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "copysign" (f64.const -infinity) (f64.const -0x0p+0)) (f64.const -infinity))
-(assert_return (invoke "copysign" (f64.const -infinity) (f64.const 0x0p+0)) (f64.const infinity))
-(assert_return (invoke "copysign" (f64.const infinity) (f64.const -0x0p+0)) (f64.const -infinity))
-(assert_return (invoke "copysign" (f64.const infinity) (f64.const 0x0p+0)) (f64.const infinity))
-(assert_return (invoke "copysign" (f64.const -infinity) (f64.const -0x0.0000000000001p-1022)) (f64.const -infinity))
-(assert_return (invoke "copysign" (f64.const -infinity) (f64.const 0x0.0000000000001p-1022)) (f64.const infinity))
-(assert_return (invoke "copysign" (f64.const infinity) (f64.const -0x0.0000000000001p-1022)) (f64.const -infinity))
-(assert_return (invoke "copysign" (f64.const infinity) (f64.const 0x0.0000000000001p-1022)) (f64.const infinity))
-(assert_return (invoke "copysign" (f64.const -infinity) (f64.const -0x1p-1022)) (f64.const -infinity))
-(assert_return (invoke "copysign" (f64.const -infinity) (f64.const 0x1p-1022)) (f64.const infinity))
-(assert_return (invoke "copysign" (f64.const infinity) (f64.const -0x1p-1022)) (f64.const -infinity))
-(assert_return (invoke "copysign" (f64.const infinity) (f64.const 0x1p-1022)) (f64.const infinity))
-(assert_return (invoke "copysign" (f64.const -infinity) (f64.const -0x1p-1)) (f64.const -infinity))
-(assert_return (invoke "copysign" (f64.const -infinity) (f64.const 0x1p-1)) (f64.const infinity))
-(assert_return (invoke "copysign" (f64.const infinity) (f64.const -0x1p-1)) (f64.const -infinity))
-(assert_return (invoke "copysign" (f64.const infinity) (f64.const 0x1p-1)) (f64.const infinity))
-(assert_return (invoke "copysign" (f64.const -infinity) (f64.const -0x1p+0)) (f64.const -infinity))
-(assert_return (invoke "copysign" (f64.const -infinity) (f64.const 0x1p+0)) (f64.const infinity))
-(assert_return (invoke "copysign" (f64.const infinity) (f64.const -0x1p+0)) (f64.const -infinity))
-(assert_return (invoke "copysign" (f64.const infinity) (f64.const 0x1p+0)) (f64.const infinity))
-(assert_return (invoke "copysign" (f64.const -infinity) (f64.const -0x1.921fb54442d18p+2)) (f64.const -infinity))
-(assert_return (invoke "copysign" (f64.const -infinity) (f64.const 0x1.921fb54442d18p+2)) (f64.const infinity))
-(assert_return (invoke "copysign" (f64.const infinity) (f64.const -0x1.921fb54442d18p+2)) (f64.const -infinity))
-(assert_return (invoke "copysign" (f64.const infinity) (f64.const 0x1.921fb54442d18p+2)) (f64.const infinity))
-(assert_return (invoke "copysign" (f64.const -infinity) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -infinity))
-(assert_return (invoke "copysign" (f64.const -infinity) (f64.const 0x1.fffffffffffffp+1023)) (f64.const infinity))
-(assert_return (invoke "copysign" (f64.const infinity) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -infinity))
-(assert_return (invoke "copysign" (f64.const infinity) (f64.const 0x1.fffffffffffffp+1023)) (f64.const infinity))
-(assert_return (invoke "copysign" (f64.const -infinity) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "copysign" (f64.const -infinity) (f64.const infinity)) (f64.const infinity))
-(assert_return (invoke "copysign" (f64.const infinity) (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "copysign" (f64.const infinity) (f64.const infinity)) (f64.const infinity))
-(assert_return (invoke "copysign" (f64.const -infinity) (f64.const -nan)) (f64.const -infinity))
-(assert_return (invoke "copysign" (f64.const -infinity) (f64.const nan)) (f64.const infinity))
-(assert_return (invoke "copysign" (f64.const infinity) (f64.const -nan)) (f64.const -infinity))
-(assert_return (invoke "copysign" (f64.const infinity) (f64.const nan)) (f64.const infinity))
-(assert_return_canonical_nan (invoke "copysign" (f64.const -nan) (f64.const -0x0p+0)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const -nan) (f64.const 0x0p+0)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const nan) (f64.const -0x0p+0)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const nan) (f64.const 0x0p+0)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const nan) (f64.const -0x0.0000000000001p-1022)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const nan) (f64.const 0x0.0000000000001p-1022)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const -nan) (f64.const -0x1p-1022)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const -nan) (f64.const 0x1p-1022)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const nan) (f64.const -0x1p-1022)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const nan) (f64.const 0x1p-1022)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const -nan) (f64.const -0x1p-1)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const -nan) (f64.const 0x1p-1)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const nan) (f64.const -0x1p-1)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const nan) (f64.const 0x1p-1)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const -nan) (f64.const -0x1p+0)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const -nan) (f64.const 0x1p+0)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const nan) (f64.const -0x1p+0)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const nan) (f64.const 0x1p+0)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const -nan) (f64.const -infinity)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const -nan) (f64.const infinity)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const nan) (f64.const -infinity)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const nan) (f64.const infinity)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const -nan) (f64.const -nan)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const -nan) (f64.const nan)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const nan) (f64.const -nan)))
-(assert_return_canonical_nan (invoke "copysign" (f64.const nan) (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const nan) (f64.const nan:0x4000000000000)))
+(assert_return_arithmetic_nan (invoke "max" (f64.const nan:0x4000000000000) (f64.const nan:0x4000000000000)))
 (assert_return (invoke "sqrt" (f64.const -0x0p+0)) (f64.const -0x0p+0))
 (assert_return (invoke "sqrt" (f64.const 0x0p+0)) (f64.const 0x0p+0))
 (assert_return_canonical_nan (invoke "sqrt" (f64.const -0x0.0000000000001p-1022)))
@@ -2368,10 +2430,12 @@
 (assert_return (invoke "sqrt" (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.40d931ff62705p+1))
 (assert_return_canonical_nan (invoke "sqrt" (f64.const -0x1.fffffffffffffp+1023)))
 (assert_return (invoke "sqrt" (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+511))
-(assert_return_canonical_nan (invoke "sqrt" (f64.const -infinity)))
-(assert_return (invoke "sqrt" (f64.const infinity)) (f64.const infinity))
+(assert_return_canonical_nan (invoke "sqrt" (f64.const -inf)))
+(assert_return (invoke "sqrt" (f64.const inf)) (f64.const inf))
 (assert_return_canonical_nan (invoke "sqrt" (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "sqrt" (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "sqrt" (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "sqrt" (f64.const nan:0x4000000000000)))
 (assert_return (invoke "floor" (f64.const -0x0p+0)) (f64.const -0x0p+0))
 (assert_return (invoke "floor" (f64.const 0x0p+0)) (f64.const 0x0p+0))
 (assert_return (invoke "floor" (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p+0))
@@ -2386,10 +2450,12 @@
 (assert_return (invoke "floor" (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.8p+2))
 (assert_return (invoke "floor" (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "floor" (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "floor" (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "floor" (f64.const infinity)) (f64.const infinity))
+(assert_return (invoke "floor" (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "floor" (f64.const inf)) (f64.const inf))
 (assert_return_canonical_nan (invoke "floor" (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "floor" (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "floor" (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "floor" (f64.const nan:0x4000000000000)))
 (assert_return (invoke "ceil" (f64.const -0x0p+0)) (f64.const -0x0p+0))
 (assert_return (invoke "ceil" (f64.const 0x0p+0)) (f64.const 0x0p+0))
 (assert_return (invoke "ceil" (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0p+0))
@@ -2404,10 +2470,12 @@
 (assert_return (invoke "ceil" (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.cp+2))
 (assert_return (invoke "ceil" (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "ceil" (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "ceil" (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "ceil" (f64.const infinity)) (f64.const infinity))
+(assert_return (invoke "ceil" (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "ceil" (f64.const inf)) (f64.const inf))
 (assert_return_canonical_nan (invoke "ceil" (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "ceil" (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "ceil" (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "ceil" (f64.const nan:0x4000000000000)))
 (assert_return (invoke "trunc" (f64.const -0x0p+0)) (f64.const -0x0p+0))
 (assert_return (invoke "trunc" (f64.const 0x0p+0)) (f64.const 0x0p+0))
 (assert_return (invoke "trunc" (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0p+0))
@@ -2422,10 +2490,12 @@
 (assert_return (invoke "trunc" (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.8p+2))
 (assert_return (invoke "trunc" (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "trunc" (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "trunc" (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "trunc" (f64.const infinity)) (f64.const infinity))
+(assert_return (invoke "trunc" (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "trunc" (f64.const inf)) (f64.const inf))
 (assert_return_canonical_nan (invoke "trunc" (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "trunc" (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "trunc" (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "trunc" (f64.const nan:0x4000000000000)))
 (assert_return (invoke "nearest" (f64.const -0x0p+0)) (f64.const -0x0p+0))
 (assert_return (invoke "nearest" (f64.const 0x0p+0)) (f64.const 0x0p+0))
 (assert_return (invoke "nearest" (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0p+0))
@@ -2440,43 +2510,9 @@
 (assert_return (invoke "nearest" (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.8p+2))
 (assert_return (invoke "nearest" (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
 (assert_return (invoke "nearest" (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "nearest" (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "nearest" (f64.const infinity)) (f64.const infinity))
+(assert_return (invoke "nearest" (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "nearest" (f64.const inf)) (f64.const inf))
 (assert_return_canonical_nan (invoke "nearest" (f64.const -nan)))
+(assert_return_arithmetic_nan (invoke "nearest" (f64.const -nan:0x4000000000000)))
 (assert_return_canonical_nan (invoke "nearest" (f64.const nan)))
-(assert_return (invoke "abs" (f64.const -0x0p+0)) (f64.const 0x0p+0))
-(assert_return (invoke "abs" (f64.const 0x0p+0)) (f64.const 0x0p+0))
-(assert_return (invoke "abs" (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))
-(assert_return (invoke "abs" (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))
-(assert_return (invoke "abs" (f64.const -0x1p-1022)) (f64.const 0x1p-1022))
-(assert_return (invoke "abs" (f64.const 0x1p-1022)) (f64.const 0x1p-1022))
-(assert_return (invoke "abs" (f64.const -0x1p-1)) (f64.const 0x1p-1))
-(assert_return (invoke "abs" (f64.const 0x1p-1)) (f64.const 0x1p-1))
-(assert_return (invoke "abs" (f64.const -0x1p+0)) (f64.const 0x1p+0))
-(assert_return (invoke "abs" (f64.const 0x1p+0)) (f64.const 0x1p+0))
-(assert_return (invoke "abs" (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))
-(assert_return (invoke "abs" (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))
-(assert_return (invoke "abs" (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "abs" (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "abs" (f64.const -infinity)) (f64.const infinity))
-(assert_return (invoke "abs" (f64.const infinity)) (f64.const infinity))
-(assert_return_canonical_nan (invoke "abs" (f64.const -nan)))
-(assert_return_canonical_nan (invoke "abs" (f64.const nan)))
-(assert_return (invoke "neg" (f64.const -0x0p+0)) (f64.const 0x0p+0))
-(assert_return (invoke "neg" (f64.const 0x0p+0)) (f64.const -0x0p+0))
-(assert_return (invoke "neg" (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))
-(assert_return (invoke "neg" (f64.const 0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))
-(assert_return (invoke "neg" (f64.const -0x1p-1022)) (f64.const 0x1p-1022))
-(assert_return (invoke "neg" (f64.const 0x1p-1022)) (f64.const -0x1p-1022))
-(assert_return (invoke "neg" (f64.const -0x1p-1)) (f64.const 0x1p-1))
-(assert_return (invoke "neg" (f64.const 0x1p-1)) (f64.const -0x1p-1))
-(assert_return (invoke "neg" (f64.const -0x1p+0)) (f64.const 0x1p+0))
-(assert_return (invoke "neg" (f64.const 0x1p+0)) (f64.const -0x1p+0))
-(assert_return (invoke "neg" (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))
-(assert_return (invoke "neg" (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))
-(assert_return (invoke "neg" (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
-(assert_return (invoke "neg" (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
-(assert_return (invoke "neg" (f64.const -infinity)) (f64.const infinity))
-(assert_return (invoke "neg" (f64.const infinity)) (f64.const -infinity))
-(assert_return_canonical_nan (invoke "neg" (f64.const -nan)))
-(assert_return_canonical_nan (invoke "neg" (f64.const nan)))
+(assert_return_arithmetic_nan (invoke "nearest" (f64.const nan:0x4000000000000)))
diff --git a/test/WasmSpec/testsuite/core/f64_bitwise.wast b/test/WasmSpec/testsuite/core/f64_bitwise.wast
new file mode 100644
index 0000000..86c64b5
--- /dev/null
+++ b/test/WasmSpec/testsuite/core/f64_bitwise.wast
@@ -0,0 +1,369 @@
+;; Test all the f64 bitwise operators on major boundary values and all special
+;; values.
+
+(module
+  (func (export "abs") (param $x f64) (result f64) (f64.abs (get_local $x)))
+  (func (export "neg") (param $x f64) (result f64) (f64.neg (get_local $x)))
+  (func (export "copysign") (param $x f64) (param $y f64) (result f64) (f64.copysign (get_local $x) (get_local $y)))
+)
+
+(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const -0x0p+0)) (f64.const -0x0p+0))
+(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const 0x0p+0)) (f64.const 0x0p+0))
+(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const -0x0p+0)) (f64.const -0x0p+0))
+(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const 0x0p+0)) (f64.const 0x0p+0))
+(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0p+0))
+(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0p+0))
+(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0p+0))
+(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0p+0))
+(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const -0x1p-1022)) (f64.const -0x0p+0))
+(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const 0x1p-1022)) (f64.const 0x0p+0))
+(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const -0x1p-1022)) (f64.const -0x0p+0))
+(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const 0x1p-1022)) (f64.const 0x0p+0))
+(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const -0x1p-1)) (f64.const -0x0p+0))
+(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const 0x1p-1)) (f64.const 0x0p+0))
+(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const -0x1p-1)) (f64.const -0x0p+0))
+(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const 0x1p-1)) (f64.const 0x0p+0))
+(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const -0x1p+0)) (f64.const -0x0p+0))
+(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const 0x1p+0)) (f64.const 0x0p+0))
+(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const -0x1p+0)) (f64.const -0x0p+0))
+(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const 0x1p+0)) (f64.const 0x0p+0))
+(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x0p+0))
+(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0p+0))
+(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x0p+0))
+(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0p+0))
+(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0p+0))
+(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0p+0))
+(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0p+0))
+(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0p+0))
+(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const -inf)) (f64.const -0x0p+0))
+(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const inf)) (f64.const 0x0p+0))
+(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const -inf)) (f64.const -0x0p+0))
+(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const inf)) (f64.const 0x0p+0))
+(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const -nan)) (f64.const -0x0p+0))
+(assert_return (invoke "copysign" (f64.const -0x0p+0) (f64.const nan)) (f64.const 0x0p+0))
+(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const -nan)) (f64.const -0x0p+0))
+(assert_return (invoke "copysign" (f64.const 0x0p+0) (f64.const nan)) (f64.const 0x0p+0))
+(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const -0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const 0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (f64.const -0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0p+0)) (f64.const 0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (f64.const -0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (f64.const 0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1022)) (f64.const -0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1022)) (f64.const 0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p-1)) (f64.const -0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p-1)) (f64.const 0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p-1)) (f64.const -0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p-1)) (f64.const 0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1p+0)) (f64.const -0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1p+0)) (f64.const 0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1p+0)) (f64.const -0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1p+0)) (f64.const 0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const -inf)) (f64.const -0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const inf)) (f64.const 0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const -inf)) (f64.const -0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const inf)) (f64.const 0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)) (f64.const -0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const -0x0.0000000000001p-1022) (f64.const nan)) (f64.const 0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)) (f64.const -0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const 0x0.0000000000001p-1022) (f64.const nan)) (f64.const 0x0.0000000000001p-1022))
+(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (f64.const -0x1p-1022))
+(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (f64.const 0x1p-1022))
+(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (f64.const -0x1p-1022))
+(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const 0x0p+0)) (f64.const 0x1p-1022))
+(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p-1022))
+(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p-1022))
+(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p-1022))
+(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p-1022))
+(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const -0x1p-1022)) (f64.const -0x1p-1022))
+(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const 0x1p-1022)) (f64.const 0x1p-1022))
+(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const -0x1p-1022)) (f64.const -0x1p-1022))
+(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const 0x1p-1022)) (f64.const 0x1p-1022))
+(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const -0x1p-1)) (f64.const -0x1p-1022))
+(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const 0x1p-1)) (f64.const 0x1p-1022))
+(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const -0x1p-1)) (f64.const -0x1p-1022))
+(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const 0x1p-1)) (f64.const 0x1p-1022))
+(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const -0x1p+0)) (f64.const -0x1p-1022))
+(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const 0x1p+0)) (f64.const 0x1p-1022))
+(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const -0x1p+0)) (f64.const -0x1p-1022))
+(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const 0x1p+0)) (f64.const 0x1p-1022))
+(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1p-1022))
+(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1p-1022))
+(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1p-1022))
+(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1p-1022))
+(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1p-1022))
+(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p-1022))
+(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1p-1022))
+(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p-1022))
+(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const -inf)) (f64.const -0x1p-1022))
+(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const inf)) (f64.const 0x1p-1022))
+(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const -inf)) (f64.const -0x1p-1022))
+(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const inf)) (f64.const 0x1p-1022))
+(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const -nan)) (f64.const -0x1p-1022))
+(assert_return (invoke "copysign" (f64.const -0x1p-1022) (f64.const nan)) (f64.const 0x1p-1022))
+(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const -nan)) (f64.const -0x1p-1022))
+(assert_return (invoke "copysign" (f64.const 0x1p-1022) (f64.const nan)) (f64.const 0x1p-1022))
+(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const -0x0p+0)) (f64.const -0x1p-1))
+(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const 0x0p+0)) (f64.const 0x1p-1))
+(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const -0x0p+0)) (f64.const -0x1p-1))
+(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const 0x0p+0)) (f64.const 0x1p-1))
+(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p-1))
+(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p-1))
+(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p-1))
+(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p-1))
+(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const -0x1p-1022)) (f64.const -0x1p-1))
+(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const 0x1p-1022)) (f64.const 0x1p-1))
+(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const -0x1p-1022)) (f64.const -0x1p-1))
+(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const 0x1p-1022)) (f64.const 0x1p-1))
+(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const -0x1p-1)) (f64.const -0x1p-1))
+(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const 0x1p-1)) (f64.const 0x1p-1))
+(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const -0x1p-1)) (f64.const -0x1p-1))
+(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const 0x1p-1)) (f64.const 0x1p-1))
+(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const -0x1p+0)) (f64.const -0x1p-1))
+(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const 0x1p+0)) (f64.const 0x1p-1))
+(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const -0x1p+0)) (f64.const -0x1p-1))
+(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const 0x1p+0)) (f64.const 0x1p-1))
+(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1p-1))
+(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1p-1))
+(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1p-1))
+(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1p-1))
+(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1p-1))
+(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p-1))
+(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1p-1))
+(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p-1))
+(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const -inf)) (f64.const -0x1p-1))
+(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const inf)) (f64.const 0x1p-1))
+(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const -inf)) (f64.const -0x1p-1))
+(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const inf)) (f64.const 0x1p-1))
+(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const -nan)) (f64.const -0x1p-1))
+(assert_return (invoke "copysign" (f64.const -0x1p-1) (f64.const nan)) (f64.const 0x1p-1))
+(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const -nan)) (f64.const -0x1p-1))
+(assert_return (invoke "copysign" (f64.const 0x1p-1) (f64.const nan)) (f64.const 0x1p-1))
+(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const -0x0p+0)) (f64.const -0x1p+0))
+(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const 0x0p+0)) (f64.const 0x1p+0))
+(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const -0x0p+0)) (f64.const -0x1p+0))
+(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const 0x0p+0)) (f64.const 0x1p+0))
+(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p+0))
+(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p+0))
+(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1p+0))
+(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p+0))
+(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const -0x1p-1022)) (f64.const -0x1p+0))
+(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const 0x1p-1022)) (f64.const 0x1p+0))
+(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const -0x1p-1022)) (f64.const -0x1p+0))
+(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const 0x1p-1022)) (f64.const 0x1p+0))
+(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const -0x1p-1)) (f64.const -0x1p+0))
+(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const 0x1p-1)) (f64.const 0x1p+0))
+(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const -0x1p-1)) (f64.const -0x1p+0))
+(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const 0x1p-1)) (f64.const 0x1p+0))
+(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const -0x1p+0)) (f64.const -0x1p+0))
+(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const 0x1p+0)) (f64.const 0x1p+0))
+(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const -0x1p+0)) (f64.const -0x1p+0))
+(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const 0x1p+0)) (f64.const 0x1p+0))
+(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1p+0))
+(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1p+0))
+(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1p+0))
+(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1p+0))
+(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1p+0))
+(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p+0))
+(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1p+0))
+(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1p+0))
+(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const -inf)) (f64.const -0x1p+0))
+(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const inf)) (f64.const 0x1p+0))
+(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const -inf)) (f64.const -0x1p+0))
+(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const inf)) (f64.const 0x1p+0))
+(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const -nan)) (f64.const -0x1p+0))
+(assert_return (invoke "copysign" (f64.const -0x1p+0) (f64.const nan)) (f64.const 0x1p+0))
+(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const -nan)) (f64.const -0x1p+0))
+(assert_return (invoke "copysign" (f64.const 0x1p+0) (f64.const nan)) (f64.const 0x1p+0))
+(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const -0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const 0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (f64.const -0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (f64.const 0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const -0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const 0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1022)) (f64.const -0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1022)) (f64.const 0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const -0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (f64.const 0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p-1)) (f64.const -0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p-1)) (f64.const 0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (f64.const -0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (f64.const 0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1p+0)) (f64.const -0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1p+0)) (f64.const 0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const -inf)) (f64.const -0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const inf)) (f64.const 0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const -inf)) (f64.const -0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const inf)) (f64.const 0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)) (f64.const -0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)) (f64.const 0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)) (f64.const -0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)) (f64.const 0x1.921fb54442d18p+2))
+(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const -0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const 0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (f64.const -0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (f64.const 0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0.0000000000001p-1022)) (f64.const -0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const -0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const 0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1022)) (f64.const -0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1022)) (f64.const 0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const -0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const 0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p-1)) (f64.const -0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p-1)) (f64.const 0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const -0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const 0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1p+0)) (f64.const -0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p+0)) (f64.const 0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.921fb54442d18p+2)) (f64.const -0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const -inf)) (f64.const -0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const inf)) (f64.const 0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const -inf)) (f64.const -0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const inf)) (f64.const 0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)) (f64.const -0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)) (f64.const 0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)) (f64.const -0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)) (f64.const 0x1.fffffffffffffp+1023))
+(assert_return (invoke "copysign" (f64.const -inf) (f64.const -0x0p+0)) (f64.const -inf))
+(assert_return (invoke "copysign" (f64.const -inf) (f64.const 0x0p+0)) (f64.const inf))
+(assert_return (invoke "copysign" (f64.const inf) (f64.const -0x0p+0)) (f64.const -inf))
+(assert_return (invoke "copysign" (f64.const inf) (f64.const 0x0p+0)) (f64.const inf))
+(assert_return (invoke "copysign" (f64.const -inf) (f64.const -0x0.0000000000001p-1022)) (f64.const -inf))
+(assert_return (invoke "copysign" (f64.const -inf) (f64.const 0x0.0000000000001p-1022)) (f64.const inf))
+(assert_return (invoke "copysign" (f64.const inf) (f64.const -0x0.0000000000001p-1022)) (f64.const -inf))
+(assert_return (invoke "copysign" (f64.const inf) (f64.const 0x0.0000000000001p-1022)) (f64.const inf))
+(assert_return (invoke "copysign" (f64.const -inf) (f64.const -0x1p-1022)) (f64.const -inf))
+(assert_return (invoke "copysign" (f64.const -inf) (f64.const 0x1p-1022)) (f64.const inf))
+(assert_return (invoke "copysign" (f64.const inf) (f64.const -0x1p-1022)) (f64.const -inf))
+(assert_return (invoke "copysign" (f64.const inf) (f64.const 0x1p-1022)) (f64.const inf))
+(assert_return (invoke "copysign" (f64.const -inf) (f64.const -0x1p-1)) (f64.const -inf))
+(assert_return (invoke "copysign" (f64.const -inf) (f64.const 0x1p-1)) (f64.const inf))
+(assert_return (invoke "copysign" (f64.const inf) (f64.const -0x1p-1)) (f64.const -inf))
+(assert_return (invoke "copysign" (f64.const inf) (f64.const 0x1p-1)) (f64.const inf))
+(assert_return (invoke "copysign" (f64.const -inf) (f64.const -0x1p+0)) (f64.const -inf))
+(assert_return (invoke "copysign" (f64.const -inf) (f64.const 0x1p+0)) (f64.const inf))
+(assert_return (invoke "copysign" (f64.const inf) (f64.const -0x1p+0)) (f64.const -inf))
+(assert_return (invoke "copysign" (f64.const inf) (f64.const 0x1p+0)) (f64.const inf))
+(assert_return (invoke "copysign" (f64.const -inf) (f64.const -0x1.921fb54442d18p+2)) (f64.const -inf))
+(assert_return (invoke "copysign" (f64.const -inf) (f64.const 0x1.921fb54442d18p+2)) (f64.const inf))
+(assert_return (invoke "copysign" (f64.const inf) (f64.const -0x1.921fb54442d18p+2)) (f64.const -inf))
+(assert_return (invoke "copysign" (f64.const inf) (f64.const 0x1.921fb54442d18p+2)) (f64.const inf))
+(assert_return (invoke "copysign" (f64.const -inf) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -inf))
+(assert_return (invoke "copysign" (f64.const -inf) (f64.const 0x1.fffffffffffffp+1023)) (f64.const inf))
+(assert_return (invoke "copysign" (f64.const inf) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -inf))
+(assert_return (invoke "copysign" (f64.const inf) (f64.const 0x1.fffffffffffffp+1023)) (f64.const inf))
+(assert_return (invoke "copysign" (f64.const -inf) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "copysign" (f64.const -inf) (f64.const inf)) (f64.const inf))
+(assert_return (invoke "copysign" (f64.const inf) (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "copysign" (f64.const inf) (f64.const inf)) (f64.const inf))
+(assert_return (invoke "copysign" (f64.const -inf) (f64.const -nan)) (f64.const -inf))
+(assert_return (invoke "copysign" (f64.const -inf) (f64.const nan)) (f64.const inf))
+(assert_return (invoke "copysign" (f64.const inf) (f64.const -nan)) (f64.const -inf))
+(assert_return (invoke "copysign" (f64.const inf) (f64.const nan)) (f64.const inf))
+(assert_return (invoke "copysign" (f64.const -nan) (f64.const -0x0p+0)) (f64.const -nan))
+(assert_return (invoke "copysign" (f64.const -nan) (f64.const 0x0p+0)) (f64.const nan))
+(assert_return (invoke "copysign" (f64.const nan) (f64.const -0x0p+0)) (f64.const -nan))
+(assert_return (invoke "copysign" (f64.const nan) (f64.const 0x0p+0)) (f64.const nan))
+(assert_return (invoke "copysign" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)) (f64.const -nan))
+(assert_return (invoke "copysign" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)) (f64.const nan))
+(assert_return (invoke "copysign" (f64.const nan) (f64.const -0x0.0000000000001p-1022)) (f64.const -nan))
+(assert_return (invoke "copysign" (f64.const nan) (f64.const 0x0.0000000000001p-1022)) (f64.const nan))
+(assert_return (invoke "copysign" (f64.const -nan) (f64.const -0x1p-1022)) (f64.const -nan))
+(assert_return (invoke "copysign" (f64.const -nan) (f64.const 0x1p-1022)) (f64.const nan))
+(assert_return (invoke "copysign" (f64.const nan) (f64.const -0x1p-1022)) (f64.const -nan))
+(assert_return (invoke "copysign" (f64.const nan) (f64.const 0x1p-1022)) (f64.const nan))
+(assert_return (invoke "copysign" (f64.const -nan) (f64.const -0x1p-1)) (f64.const -nan))
+(assert_return (invoke "copysign" (f64.const -nan) (f64.const 0x1p-1)) (f64.const nan))
+(assert_return (invoke "copysign" (f64.const nan) (f64.const -0x1p-1)) (f64.const -nan))
+(assert_return (invoke "copysign" (f64.const nan) (f64.const 0x1p-1)) (f64.const nan))
+(assert_return (invoke "copysign" (f64.const -nan) (f64.const -0x1p+0)) (f64.const -nan))
+(assert_return (invoke "copysign" (f64.const -nan) (f64.const 0x1p+0)) (f64.const nan))
+(assert_return (invoke "copysign" (f64.const nan) (f64.const -0x1p+0)) (f64.const -nan))
+(assert_return (invoke "copysign" (f64.const nan) (f64.const 0x1p+0)) (f64.const nan))
+(assert_return (invoke "copysign" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)) (f64.const -nan))
+(assert_return (invoke "copysign" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan))
+(assert_return (invoke "copysign" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)) (f64.const -nan))
+(assert_return (invoke "copysign" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)) (f64.const nan))
+(assert_return (invoke "copysign" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -nan))
+(assert_return (invoke "copysign" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan))
+(assert_return (invoke "copysign" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)) (f64.const -nan))
+(assert_return (invoke "copysign" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)) (f64.const nan))
+(assert_return (invoke "copysign" (f64.const -nan) (f64.const -inf)) (f64.const -nan))
+(assert_return (invoke "copysign" (f64.const -nan) (f64.const inf)) (f64.const nan))
+(assert_return (invoke "copysign" (f64.const nan) (f64.const -inf)) (f64.const -nan))
+(assert_return (invoke "copysign" (f64.const nan) (f64.const inf)) (f64.const nan))
+(assert_return (invoke "copysign" (f64.const -nan) (f64.const -nan)) (f64.const -nan))
+(assert_return (invoke "copysign" (f64.const -nan) (f64.const nan)) (f64.const nan))
+(assert_return (invoke "copysign" (f64.const nan) (f64.const -nan)) (f64.const -nan))
+(assert_return (invoke "copysign" (f64.const nan) (f64.const nan)) (f64.const nan))
+(assert_return (invoke "abs" (f64.const -0x0p+0)) (f64.const 0x0p+0))
+(assert_return (invoke "abs" (f64.const 0x0p+0)) (f64.const 0x0p+0))
+(assert_return (invoke "abs" (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))
+(assert_return (invoke "abs" (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))
+(assert_return (invoke "abs" (f64.const -0x1p-1022)) (f64.const 0x1p-1022))
+(assert_return (invoke "abs" (f64.const 0x1p-1022)) (f64.const 0x1p-1022))
+(assert_return (invoke "abs" (f64.const -0x1p-1)) (f64.const 0x1p-1))
+(assert_return (invoke "abs" (f64.const 0x1p-1)) (f64.const 0x1p-1))
+(assert_return (invoke "abs" (f64.const -0x1p+0)) (f64.const 0x1p+0))
+(assert_return (invoke "abs" (f64.const 0x1p+0)) (f64.const 0x1p+0))
+(assert_return (invoke "abs" (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))
+(assert_return (invoke "abs" (f64.const 0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))
+(assert_return (invoke "abs" (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
+(assert_return (invoke "abs" (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
+(assert_return (invoke "abs" (f64.const -inf)) (f64.const inf))
+(assert_return (invoke "abs" (f64.const inf)) (f64.const inf))
+(assert_return (invoke "abs" (f64.const -nan)) (f64.const nan))
+(assert_return (invoke "abs" (f64.const nan)) (f64.const nan))
+(assert_return (invoke "neg" (f64.const -0x0p+0)) (f64.const 0x0p+0))
+(assert_return (invoke "neg" (f64.const 0x0p+0)) (f64.const -0x0p+0))
+(assert_return (invoke "neg" (f64.const -0x0.0000000000001p-1022)) (f64.const 0x0.0000000000001p-1022))
+(assert_return (invoke "neg" (f64.const 0x0.0000000000001p-1022)) (f64.const -0x0.0000000000001p-1022))
+(assert_return (invoke "neg" (f64.const -0x1p-1022)) (f64.const 0x1p-1022))
+(assert_return (invoke "neg" (f64.const 0x1p-1022)) (f64.const -0x1p-1022))
+(assert_return (invoke "neg" (f64.const -0x1p-1)) (f64.const 0x1p-1))
+(assert_return (invoke "neg" (f64.const 0x1p-1)) (f64.const -0x1p-1))
+(assert_return (invoke "neg" (f64.const -0x1p+0)) (f64.const 0x1p+0))
+(assert_return (invoke "neg" (f64.const 0x1p+0)) (f64.const -0x1p+0))
+(assert_return (invoke "neg" (f64.const -0x1.921fb54442d18p+2)) (f64.const 0x1.921fb54442d18p+2))
+(assert_return (invoke "neg" (f64.const 0x1.921fb54442d18p+2)) (f64.const -0x1.921fb54442d18p+2))
+(assert_return (invoke "neg" (f64.const -0x1.fffffffffffffp+1023)) (f64.const 0x1.fffffffffffffp+1023))
+(assert_return (invoke "neg" (f64.const 0x1.fffffffffffffp+1023)) (f64.const -0x1.fffffffffffffp+1023))
+(assert_return (invoke "neg" (f64.const -inf)) (f64.const inf))
+(assert_return (invoke "neg" (f64.const inf)) (f64.const -inf))
+(assert_return (invoke "neg" (f64.const -nan)) (f64.const nan))
+(assert_return (invoke "neg" (f64.const nan)) (f64.const -nan))
diff --git a/test/WasmSpec/testsuite/core/f64_cmp.wast b/test/WasmSpec/testsuite/core/f64_cmp.wast
index f4958b8..8fe9be4 100644
--- a/test/WasmSpec/testsuite/core/f64_cmp.wast
+++ b/test/WasmSpec/testsuite/core/f64_cmp.wast
@@ -38,14 +38,18 @@
 (assert_return (invoke "eq" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const -0x0p+0) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const -0x0p+0) (f64.const infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const 0x0p+0) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const 0x0p+0) (f64.const infinity)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -0x0p+0) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -0x0p+0) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const 0x0p+0) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const 0x0p+0) (f64.const inf)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -0x0p+0) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -0x0p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -0x0p+0) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -0x0p+0) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x0p+0) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const 0x0p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x0p+0) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const 0x0p+0) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 0))
@@ -74,14 +78,18 @@
 (assert_return (invoke "eq" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const -0x0.0000000000001p-1022) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const -0x0.0000000000001p-1022) (f64.const infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const 0x0.0000000000001p-1022) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const 0x0.0000000000001p-1022) (f64.const infinity)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -0x0.0000000000001p-1022) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -0x0.0000000000001p-1022) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const 0x0.0000000000001p-1022) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const 0x0.0000000000001p-1022) (f64.const inf)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -0x0.0000000000001p-1022) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const 0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x0.0000000000001p-1022) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const 0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (i32.const 0))
@@ -110,14 +118,18 @@
 (assert_return (invoke "eq" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const -0x1p-1022) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const -0x1p-1022) (f64.const infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const 0x1p-1022) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const 0x1p-1022) (f64.const infinity)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -0x1p-1022) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -0x1p-1022) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const 0x1p-1022) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const 0x1p-1022) (f64.const inf)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -0x1p-1022) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -0x1p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -0x1p-1022) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -0x1p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x1p-1022) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const 0x1p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x1p-1022) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const 0x1p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -0x1p-1) (f64.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -0x1p-1) (f64.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x1p-1) (f64.const -0x0p+0)) (i32.const 0))
@@ -146,14 +158,18 @@
 (assert_return (invoke "eq" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const -0x1p-1) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const -0x1p-1) (f64.const infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const 0x1p-1) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const 0x1p-1) (f64.const infinity)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -0x1p-1) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -0x1p-1) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const 0x1p-1) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const 0x1p-1) (f64.const inf)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -0x1p-1) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -0x1p-1) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -0x1p-1) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -0x1p-1) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x1p-1) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const 0x1p-1) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x1p-1) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const 0x1p-1) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -0x1p+0) (f64.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -0x1p+0) (f64.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x1p+0) (f64.const -0x0p+0)) (i32.const 0))
@@ -182,14 +198,18 @@
 (assert_return (invoke "eq" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const -0x1p+0) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const -0x1p+0) (f64.const infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const 0x1p+0) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const 0x1p+0) (f64.const infinity)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -0x1p+0) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -0x1p+0) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const 0x1p+0) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const 0x1p+0) (f64.const inf)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -0x1p+0) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -0x1p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -0x1p+0) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -0x1p+0) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x1p+0) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const 0x1p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x1p+0) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const 0x1p+0) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 0))
@@ -218,14 +238,18 @@
 (assert_return (invoke "eq" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const -0x1.921fb54442d18p+2) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const -0x1.921fb54442d18p+2) (f64.const infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const 0x1.921fb54442d18p+2) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const 0x1.921fb54442d18p+2) (f64.const infinity)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -0x1.921fb54442d18p+2) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -0x1.921fb54442d18p+2) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const 0x1.921fb54442d18p+2) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const 0x1.921fb54442d18p+2) (f64.const inf)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const 0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 0))
@@ -254,86 +278,138 @@
 (assert_return (invoke "eq" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "eq" (f64.const -0x1.fffffffffffffp+1023) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const -0x1.fffffffffffffp+1023) (f64.const infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const 0x1.fffffffffffffp+1023) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const 0x1.fffffffffffffp+1023) (f64.const infinity)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -0x1.fffffffffffffp+1023) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -0x1.fffffffffffffp+1023) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const 0x1.fffffffffffffp+1023) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const 0x1.fffffffffffffp+1023) (f64.const inf)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const -infinity) (f64.const -0x0p+0)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const -infinity) (f64.const 0x0p+0)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const infinity) (f64.const -0x0p+0)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const infinity) (f64.const 0x0p+0)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const -infinity) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const -infinity) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const infinity) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const infinity) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const -infinity) (f64.const -0x1p-1022)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const -infinity) (f64.const 0x1p-1022)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const infinity) (f64.const -0x1p-1022)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const infinity) (f64.const 0x1p-1022)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const -infinity) (f64.const -0x1p-1)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const -infinity) (f64.const 0x1p-1)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const infinity) (f64.const -0x1p-1)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const infinity) (f64.const 0x1p-1)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const -infinity) (f64.const -0x1p+0)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const -infinity) (f64.const 0x1p+0)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const infinity) (f64.const -0x1p+0)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const infinity) (f64.const 0x1p+0)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const -infinity) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const -infinity) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const infinity) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const infinity) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const -infinity) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const -infinity) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const infinity) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const infinity) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const -infinity) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "eq" (f64.const -infinity) (f64.const infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const infinity) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const infinity) (f64.const infinity)) (i32.const 1))
-(assert_return (invoke "eq" (f64.const -infinity) (f64.const -nan)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const -infinity) (f64.const nan)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const infinity) (f64.const -nan)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const infinity) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -inf) (f64.const -0x0p+0)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -inf) (f64.const 0x0p+0)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const inf) (f64.const -0x0p+0)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const inf) (f64.const 0x0p+0)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -inf) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -inf) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const inf) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const inf) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -inf) (f64.const -0x1p-1022)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -inf) (f64.const 0x1p-1022)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const inf) (f64.const -0x1p-1022)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const inf) (f64.const 0x1p-1022)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -inf) (f64.const -0x1p-1)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -inf) (f64.const 0x1p-1)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const inf) (f64.const -0x1p-1)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const inf) (f64.const 0x1p-1)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -inf) (f64.const -0x1p+0)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -inf) (f64.const 0x1p+0)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const inf) (f64.const -0x1p+0)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const inf) (f64.const 0x1p+0)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -inf) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -inf) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const inf) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const inf) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -inf) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -inf) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const inf) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const inf) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -inf) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "eq" (f64.const -inf) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const inf) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const inf) (f64.const inf)) (i32.const 1))
+(assert_return (invoke "eq" (f64.const -inf) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -inf) (f64.const -nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -inf) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -inf) (f64.const nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const inf) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const inf) (f64.const -nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const inf) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const inf) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -nan) (f64.const -0x0p+0)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -nan:0x4000000000000) (f64.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -nan) (f64.const 0x0p+0)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -nan:0x4000000000000) (f64.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const nan) (f64.const -0x0p+0)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const nan:0x4000000000000) (f64.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const nan) (f64.const 0x0p+0)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const nan:0x4000000000000) (f64.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -nan) (f64.const -0x1p-1022)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1022)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -nan) (f64.const 0x1p-1022)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1022)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const nan) (f64.const -0x1p-1022)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const nan:0x4000000000000) (f64.const -0x1p-1022)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const nan) (f64.const 0x1p-1022)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const nan:0x4000000000000) (f64.const 0x1p-1022)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -nan) (f64.const -0x1p-1)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -nan) (f64.const 0x1p-1)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const nan) (f64.const -0x1p-1)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const nan:0x4000000000000) (f64.const -0x1p-1)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const nan) (f64.const 0x1p-1)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const nan:0x4000000000000) (f64.const 0x1p-1)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -nan) (f64.const -0x1p+0)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -nan:0x4000000000000) (f64.const -0x1p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -nan) (f64.const 0x1p+0)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -nan:0x4000000000000) (f64.const 0x1p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const nan) (f64.const -0x1p+0)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const nan:0x4000000000000) (f64.const -0x1p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const nan) (f64.const 0x1p+0)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const nan:0x4000000000000) (f64.const 0x1p+0)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const -nan) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const -nan) (f64.const infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const nan) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "eq" (f64.const nan) (f64.const infinity)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -nan) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -nan:0x4000000000000) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -nan) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -nan:0x4000000000000) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const nan) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const nan:0x4000000000000) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const nan) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const nan:0x4000000000000) (f64.const inf)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -nan) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -nan:0x4000000000000) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -nan) (f64.const -nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const -nan) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -nan:0x4000000000000) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -nan) (f64.const nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const -nan:0x4000000000000) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const nan) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const nan:0x4000000000000) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const nan) (f64.const -nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "eq" (f64.const nan) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const nan:0x4000000000000) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const nan) (f64.const nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "eq" (f64.const nan:0x4000000000000) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "ne" (f64.const -0x0p+0) (f64.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "ne" (f64.const -0x0p+0) (f64.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "ne" (f64.const 0x0p+0) (f64.const -0x0p+0)) (i32.const 0))
@@ -362,14 +438,18 @@
 (assert_return (invoke "ne" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const -0x0p+0) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const -0x0p+0) (f64.const infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const 0x0p+0) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const 0x0p+0) (f64.const infinity)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -0x0p+0) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -0x0p+0) (f64.const inf)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const 0x0p+0) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const 0x0p+0) (f64.const inf)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -0x0p+0) (f64.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -0x0p+0) (f64.const -nan:0x4000000000000)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -0x0p+0) (f64.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -0x0p+0) (f64.const nan:0x4000000000000)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x0p+0) (f64.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const 0x0p+0) (f64.const -nan:0x4000000000000)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x0p+0) (f64.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const 0x0p+0) (f64.const nan:0x4000000000000)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 1))
@@ -398,14 +478,18 @@
 (assert_return (invoke "ne" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const -0x0.0000000000001p-1022) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const -0x0.0000000000001p-1022) (f64.const infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const 0x0.0000000000001p-1022) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const 0x0.0000000000001p-1022) (f64.const infinity)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -0x0.0000000000001p-1022) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -0x0.0000000000001p-1022) (f64.const inf)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const 0x0.0000000000001p-1022) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const 0x0.0000000000001p-1022) (f64.const inf)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -0x0.0000000000001p-1022) (f64.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const 0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x0.0000000000001p-1022) (f64.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const 0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (i32.const 1))
@@ -434,14 +518,18 @@
 (assert_return (invoke "ne" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const -0x1p-1022) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const -0x1p-1022) (f64.const infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const 0x1p-1022) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const 0x1p-1022) (f64.const infinity)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -0x1p-1022) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -0x1p-1022) (f64.const inf)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const 0x1p-1022) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const 0x1p-1022) (f64.const inf)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -0x1p-1022) (f64.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -0x1p-1022) (f64.const -nan:0x4000000000000)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -0x1p-1022) (f64.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -0x1p-1022) (f64.const nan:0x4000000000000)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x1p-1022) (f64.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const 0x1p-1022) (f64.const -nan:0x4000000000000)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x1p-1022) (f64.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const 0x1p-1022) (f64.const nan:0x4000000000000)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -0x1p-1) (f64.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -0x1p-1) (f64.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x1p-1) (f64.const -0x0p+0)) (i32.const 1))
@@ -470,14 +558,18 @@
 (assert_return (invoke "ne" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const -0x1p-1) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const -0x1p-1) (f64.const infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const 0x1p-1) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const 0x1p-1) (f64.const infinity)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -0x1p-1) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -0x1p-1) (f64.const inf)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const 0x1p-1) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const 0x1p-1) (f64.const inf)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -0x1p-1) (f64.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -0x1p-1) (f64.const -nan:0x4000000000000)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -0x1p-1) (f64.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -0x1p-1) (f64.const nan:0x4000000000000)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x1p-1) (f64.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const 0x1p-1) (f64.const -nan:0x4000000000000)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x1p-1) (f64.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const 0x1p-1) (f64.const nan:0x4000000000000)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -0x1p+0) (f64.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -0x1p+0) (f64.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x1p+0) (f64.const -0x0p+0)) (i32.const 1))
@@ -506,14 +598,18 @@
 (assert_return (invoke "ne" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const -0x1p+0) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const -0x1p+0) (f64.const infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const 0x1p+0) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const 0x1p+0) (f64.const infinity)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -0x1p+0) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -0x1p+0) (f64.const inf)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const 0x1p+0) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const 0x1p+0) (f64.const inf)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -0x1p+0) (f64.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -0x1p+0) (f64.const -nan:0x4000000000000)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -0x1p+0) (f64.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -0x1p+0) (f64.const nan:0x4000000000000)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x1p+0) (f64.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const 0x1p+0) (f64.const -nan:0x4000000000000)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x1p+0) (f64.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const 0x1p+0) (f64.const nan:0x4000000000000)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 1))
@@ -542,14 +638,18 @@
 (assert_return (invoke "ne" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const -0x1.921fb54442d18p+2) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const -0x1.921fb54442d18p+2) (f64.const infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const 0x1.921fb54442d18p+2) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const 0x1.921fb54442d18p+2) (f64.const infinity)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -0x1.921fb54442d18p+2) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -0x1.921fb54442d18p+2) (f64.const inf)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const 0x1.921fb54442d18p+2) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const 0x1.921fb54442d18p+2) (f64.const inf)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const 0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 1))
@@ -578,86 +678,138 @@
 (assert_return (invoke "ne" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "ne" (f64.const -0x1.fffffffffffffp+1023) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const -0x1.fffffffffffffp+1023) (f64.const infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const 0x1.fffffffffffffp+1023) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const 0x1.fffffffffffffp+1023) (f64.const infinity)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -0x1.fffffffffffffp+1023) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -0x1.fffffffffffffp+1023) (f64.const inf)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const 0x1.fffffffffffffp+1023) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const 0x1.fffffffffffffp+1023) (f64.const inf)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const -infinity) (f64.const -0x0p+0)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const -infinity) (f64.const 0x0p+0)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const infinity) (f64.const -0x0p+0)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const infinity) (f64.const 0x0p+0)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const -infinity) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const -infinity) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const infinity) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const infinity) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const -infinity) (f64.const -0x1p-1022)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const -infinity) (f64.const 0x1p-1022)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const infinity) (f64.const -0x1p-1022)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const infinity) (f64.const 0x1p-1022)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const -infinity) (f64.const -0x1p-1)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const -infinity) (f64.const 0x1p-1)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const infinity) (f64.const -0x1p-1)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const infinity) (f64.const 0x1p-1)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const -infinity) (f64.const -0x1p+0)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const -infinity) (f64.const 0x1p+0)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const infinity) (f64.const -0x1p+0)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const infinity) (f64.const 0x1p+0)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const -infinity) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const -infinity) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const infinity) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const infinity) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const -infinity) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const -infinity) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const infinity) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const infinity) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const -infinity) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "ne" (f64.const -infinity) (f64.const infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const infinity) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const infinity) (f64.const infinity)) (i32.const 0))
-(assert_return (invoke "ne" (f64.const -infinity) (f64.const -nan)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const -infinity) (f64.const nan)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const infinity) (f64.const -nan)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const infinity) (f64.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -inf) (f64.const -0x0p+0)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -inf) (f64.const 0x0p+0)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const inf) (f64.const -0x0p+0)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const inf) (f64.const 0x0p+0)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -inf) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -inf) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const inf) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const inf) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -inf) (f64.const -0x1p-1022)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -inf) (f64.const 0x1p-1022)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const inf) (f64.const -0x1p-1022)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const inf) (f64.const 0x1p-1022)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -inf) (f64.const -0x1p-1)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -inf) (f64.const 0x1p-1)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const inf) (f64.const -0x1p-1)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const inf) (f64.const 0x1p-1)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -inf) (f64.const -0x1p+0)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -inf) (f64.const 0x1p+0)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const inf) (f64.const -0x1p+0)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const inf) (f64.const 0x1p+0)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -inf) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -inf) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const inf) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const inf) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -inf) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -inf) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const inf) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const inf) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -inf) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "ne" (f64.const -inf) (f64.const inf)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const inf) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const inf) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "ne" (f64.const -inf) (f64.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -inf) (f64.const -nan:0x4000000000000)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -inf) (f64.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -inf) (f64.const nan:0x4000000000000)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const inf) (f64.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const inf) (f64.const -nan:0x4000000000000)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const inf) (f64.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const inf) (f64.const nan:0x4000000000000)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -nan) (f64.const -0x0p+0)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -nan:0x4000000000000) (f64.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -nan) (f64.const 0x0p+0)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -nan:0x4000000000000) (f64.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const nan) (f64.const -0x0p+0)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const nan:0x4000000000000) (f64.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const nan) (f64.const 0x0p+0)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const nan:0x4000000000000) (f64.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -nan) (f64.const -0x1p-1022)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1022)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -nan) (f64.const 0x1p-1022)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1022)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const nan) (f64.const -0x1p-1022)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const nan:0x4000000000000) (f64.const -0x1p-1022)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const nan) (f64.const 0x1p-1022)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const nan:0x4000000000000) (f64.const 0x1p-1022)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -nan) (f64.const -0x1p-1)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -nan) (f64.const 0x1p-1)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const nan) (f64.const -0x1p-1)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const nan:0x4000000000000) (f64.const -0x1p-1)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const nan) (f64.const 0x1p-1)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const nan:0x4000000000000) (f64.const 0x1p-1)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -nan) (f64.const -0x1p+0)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -nan:0x4000000000000) (f64.const -0x1p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -nan) (f64.const 0x1p+0)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -nan:0x4000000000000) (f64.const 0x1p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const nan) (f64.const -0x1p+0)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const nan:0x4000000000000) (f64.const -0x1p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const nan) (f64.const 0x1p+0)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const nan:0x4000000000000) (f64.const 0x1p+0)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const -nan) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const -nan) (f64.const infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const nan) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "ne" (f64.const nan) (f64.const infinity)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -nan) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -nan:0x4000000000000) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -nan) (f64.const inf)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -nan:0x4000000000000) (f64.const inf)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const nan) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const nan:0x4000000000000) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const nan) (f64.const inf)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const nan:0x4000000000000) (f64.const inf)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -nan) (f64.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -nan:0x4000000000000) (f64.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -nan) (f64.const -nan:0x4000000000000)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const -nan) (f64.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -nan:0x4000000000000) (f64.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -nan) (f64.const nan:0x4000000000000)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const -nan:0x4000000000000) (f64.const nan:0x4000000000000)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const nan) (f64.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const nan:0x4000000000000) (f64.const -nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const nan) (f64.const -nan:0x4000000000000)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (i32.const 1))
 (assert_return (invoke "ne" (f64.const nan) (f64.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const nan:0x4000000000000) (f64.const nan)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const nan) (f64.const nan:0x4000000000000)) (i32.const 1))
+(assert_return (invoke "ne" (f64.const nan:0x4000000000000) (f64.const nan:0x4000000000000)) (i32.const 1))
 (assert_return (invoke "lt" (f64.const -0x0p+0) (f64.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const -0x0p+0) (f64.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const 0x0p+0) (f64.const -0x0p+0)) (i32.const 0))
@@ -686,14 +838,18 @@
 (assert_return (invoke "lt" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "lt" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "lt" (f64.const -0x0p+0) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const -0x0p+0) (f64.const infinity)) (i32.const 1))
-(assert_return (invoke "lt" (f64.const 0x0p+0) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const 0x0p+0) (f64.const infinity)) (i32.const 1))
+(assert_return (invoke "lt" (f64.const -0x0p+0) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -0x0p+0) (f64.const inf)) (i32.const 1))
+(assert_return (invoke "lt" (f64.const 0x0p+0) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const 0x0p+0) (f64.const inf)) (i32.const 1))
 (assert_return (invoke "lt" (f64.const -0x0p+0) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -0x0p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const -0x0p+0) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -0x0p+0) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const 0x0p+0) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const 0x0p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const 0x0p+0) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const 0x0p+0) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "lt" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "lt" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 0))
@@ -722,14 +878,18 @@
 (assert_return (invoke "lt" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "lt" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "lt" (f64.const -0x0.0000000000001p-1022) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const -0x0.0000000000001p-1022) (f64.const infinity)) (i32.const 1))
-(assert_return (invoke "lt" (f64.const 0x0.0000000000001p-1022) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const 0x0.0000000000001p-1022) (f64.const infinity)) (i32.const 1))
+(assert_return (invoke "lt" (f64.const -0x0.0000000000001p-1022) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -0x0.0000000000001p-1022) (f64.const inf)) (i32.const 1))
+(assert_return (invoke "lt" (f64.const 0x0.0000000000001p-1022) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const 0x0.0000000000001p-1022) (f64.const inf)) (i32.const 1))
 (assert_return (invoke "lt" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const -0x0.0000000000001p-1022) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const 0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const 0x0.0000000000001p-1022) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const 0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "lt" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "lt" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (i32.const 0))
@@ -758,14 +918,18 @@
 (assert_return (invoke "lt" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "lt" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "lt" (f64.const -0x1p-1022) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const -0x1p-1022) (f64.const infinity)) (i32.const 1))
-(assert_return (invoke "lt" (f64.const 0x1p-1022) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const 0x1p-1022) (f64.const infinity)) (i32.const 1))
+(assert_return (invoke "lt" (f64.const -0x1p-1022) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -0x1p-1022) (f64.const inf)) (i32.const 1))
+(assert_return (invoke "lt" (f64.const 0x1p-1022) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const 0x1p-1022) (f64.const inf)) (i32.const 1))
 (assert_return (invoke "lt" (f64.const -0x1p-1022) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -0x1p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const -0x1p-1022) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -0x1p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const 0x1p-1022) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const 0x1p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const 0x1p-1022) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const 0x1p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const -0x1p-1) (f64.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "lt" (f64.const -0x1p-1) (f64.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "lt" (f64.const 0x1p-1) (f64.const -0x0p+0)) (i32.const 0))
@@ -794,14 +958,18 @@
 (assert_return (invoke "lt" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "lt" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "lt" (f64.const -0x1p-1) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const -0x1p-1) (f64.const infinity)) (i32.const 1))
-(assert_return (invoke "lt" (f64.const 0x1p-1) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const 0x1p-1) (f64.const infinity)) (i32.const 1))
+(assert_return (invoke "lt" (f64.const -0x1p-1) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -0x1p-1) (f64.const inf)) (i32.const 1))
+(assert_return (invoke "lt" (f64.const 0x1p-1) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const 0x1p-1) (f64.const inf)) (i32.const 1))
 (assert_return (invoke "lt" (f64.const -0x1p-1) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -0x1p-1) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const -0x1p-1) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -0x1p-1) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const 0x1p-1) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const 0x1p-1) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const 0x1p-1) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const 0x1p-1) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const -0x1p+0) (f64.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "lt" (f64.const -0x1p+0) (f64.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "lt" (f64.const 0x1p+0) (f64.const -0x0p+0)) (i32.const 0))
@@ -830,14 +998,18 @@
 (assert_return (invoke "lt" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "lt" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "lt" (f64.const -0x1p+0) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const -0x1p+0) (f64.const infinity)) (i32.const 1))
-(assert_return (invoke "lt" (f64.const 0x1p+0) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const 0x1p+0) (f64.const infinity)) (i32.const 1))
+(assert_return (invoke "lt" (f64.const -0x1p+0) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -0x1p+0) (f64.const inf)) (i32.const 1))
+(assert_return (invoke "lt" (f64.const 0x1p+0) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const 0x1p+0) (f64.const inf)) (i32.const 1))
 (assert_return (invoke "lt" (f64.const -0x1p+0) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -0x1p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const -0x1p+0) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -0x1p+0) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const 0x1p+0) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const 0x1p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const 0x1p+0) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const 0x1p+0) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "lt" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "lt" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 0))
@@ -866,14 +1038,18 @@
 (assert_return (invoke "lt" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "lt" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "lt" (f64.const -0x1.921fb54442d18p+2) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const -0x1.921fb54442d18p+2) (f64.const infinity)) (i32.const 1))
-(assert_return (invoke "lt" (f64.const 0x1.921fb54442d18p+2) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const 0x1.921fb54442d18p+2) (f64.const infinity)) (i32.const 1))
+(assert_return (invoke "lt" (f64.const -0x1.921fb54442d18p+2) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -0x1.921fb54442d18p+2) (f64.const inf)) (i32.const 1))
+(assert_return (invoke "lt" (f64.const 0x1.921fb54442d18p+2) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const 0x1.921fb54442d18p+2) (f64.const inf)) (i32.const 1))
 (assert_return (invoke "lt" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const 0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "lt" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "lt" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 0))
@@ -902,86 +1078,138 @@
 (assert_return (invoke "lt" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "lt" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const -0x1.fffffffffffffp+1023) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const -0x1.fffffffffffffp+1023) (f64.const infinity)) (i32.const 1))
-(assert_return (invoke "lt" (f64.const 0x1.fffffffffffffp+1023) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const 0x1.fffffffffffffp+1023) (f64.const infinity)) (i32.const 1))
+(assert_return (invoke "lt" (f64.const -0x1.fffffffffffffp+1023) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -0x1.fffffffffffffp+1023) (f64.const inf)) (i32.const 1))
+(assert_return (invoke "lt" (f64.const 0x1.fffffffffffffp+1023) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const 0x1.fffffffffffffp+1023) (f64.const inf)) (i32.const 1))
 (assert_return (invoke "lt" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const -infinity) (f64.const -0x0p+0)) (i32.const 1))
-(assert_return (invoke "lt" (f64.const -infinity) (f64.const 0x0p+0)) (i32.const 1))
-(assert_return (invoke "lt" (f64.const infinity) (f64.const -0x0p+0)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const infinity) (f64.const 0x0p+0)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const -infinity) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))
-(assert_return (invoke "lt" (f64.const -infinity) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))
-(assert_return (invoke "lt" (f64.const infinity) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const infinity) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const -infinity) (f64.const -0x1p-1022)) (i32.const 1))
-(assert_return (invoke "lt" (f64.const -infinity) (f64.const 0x1p-1022)) (i32.const 1))
-(assert_return (invoke "lt" (f64.const infinity) (f64.const -0x1p-1022)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const infinity) (f64.const 0x1p-1022)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const -infinity) (f64.const -0x1p-1)) (i32.const 1))
-(assert_return (invoke "lt" (f64.const -infinity) (f64.const 0x1p-1)) (i32.const 1))
-(assert_return (invoke "lt" (f64.const infinity) (f64.const -0x1p-1)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const infinity) (f64.const 0x1p-1)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const -infinity) (f64.const -0x1p+0)) (i32.const 1))
-(assert_return (invoke "lt" (f64.const -infinity) (f64.const 0x1p+0)) (i32.const 1))
-(assert_return (invoke "lt" (f64.const infinity) (f64.const -0x1p+0)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const infinity) (f64.const 0x1p+0)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const -infinity) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))
-(assert_return (invoke "lt" (f64.const -infinity) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))
-(assert_return (invoke "lt" (f64.const infinity) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const infinity) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const -infinity) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "lt" (f64.const -infinity) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "lt" (f64.const infinity) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const infinity) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const -infinity) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const -infinity) (f64.const infinity)) (i32.const 1))
-(assert_return (invoke "lt" (f64.const infinity) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const infinity) (f64.const infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const -infinity) (f64.const -nan)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const -infinity) (f64.const nan)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const infinity) (f64.const -nan)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const infinity) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -inf) (f64.const -0x0p+0)) (i32.const 1))
+(assert_return (invoke "lt" (f64.const -inf) (f64.const 0x0p+0)) (i32.const 1))
+(assert_return (invoke "lt" (f64.const inf) (f64.const -0x0p+0)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const inf) (f64.const 0x0p+0)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -inf) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))
+(assert_return (invoke "lt" (f64.const -inf) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))
+(assert_return (invoke "lt" (f64.const inf) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const inf) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -inf) (f64.const -0x1p-1022)) (i32.const 1))
+(assert_return (invoke "lt" (f64.const -inf) (f64.const 0x1p-1022)) (i32.const 1))
+(assert_return (invoke "lt" (f64.const inf) (f64.const -0x1p-1022)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const inf) (f64.const 0x1p-1022)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -inf) (f64.const -0x1p-1)) (i32.const 1))
+(assert_return (invoke "lt" (f64.const -inf) (f64.const 0x1p-1)) (i32.const 1))
+(assert_return (invoke "lt" (f64.const inf) (f64.const -0x1p-1)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const inf) (f64.const 0x1p-1)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -inf) (f64.const -0x1p+0)) (i32.const 1))
+(assert_return (invoke "lt" (f64.const -inf) (f64.const 0x1p+0)) (i32.const 1))
+(assert_return (invoke "lt" (f64.const inf) (f64.const -0x1p+0)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const inf) (f64.const 0x1p+0)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -inf) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))
+(assert_return (invoke "lt" (f64.const -inf) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))
+(assert_return (invoke "lt" (f64.const inf) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const inf) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -inf) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
+(assert_return (invoke "lt" (f64.const -inf) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
+(assert_return (invoke "lt" (f64.const inf) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const inf) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -inf) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -inf) (f64.const inf)) (i32.const 1))
+(assert_return (invoke "lt" (f64.const inf) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const inf) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -inf) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -inf) (f64.const -nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -inf) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -inf) (f64.const nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const inf) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const inf) (f64.const -nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const inf) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const inf) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const -nan) (f64.const -0x0p+0)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -nan:0x4000000000000) (f64.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const -nan) (f64.const 0x0p+0)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -nan:0x4000000000000) (f64.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const nan) (f64.const -0x0p+0)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const nan:0x4000000000000) (f64.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const nan) (f64.const 0x0p+0)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const nan:0x4000000000000) (f64.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const -nan) (f64.const -0x1p-1022)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1022)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const -nan) (f64.const 0x1p-1022)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1022)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const nan) (f64.const -0x1p-1022)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const nan:0x4000000000000) (f64.const -0x1p-1022)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const nan) (f64.const 0x1p-1022)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const nan:0x4000000000000) (f64.const 0x1p-1022)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const -nan) (f64.const -0x1p-1)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const -nan) (f64.const 0x1p-1)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const nan) (f64.const -0x1p-1)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const nan:0x4000000000000) (f64.const -0x1p-1)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const nan) (f64.const 0x1p-1)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const nan:0x4000000000000) (f64.const 0x1p-1)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const -nan) (f64.const -0x1p+0)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -nan:0x4000000000000) (f64.const -0x1p+0)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const -nan) (f64.const 0x1p+0)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -nan:0x4000000000000) (f64.const 0x1p+0)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const nan) (f64.const -0x1p+0)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const nan:0x4000000000000) (f64.const -0x1p+0)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const nan) (f64.const 0x1p+0)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const nan:0x4000000000000) (f64.const 0x1p+0)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const -nan) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const -nan) (f64.const infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const nan) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "lt" (f64.const nan) (f64.const infinity)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -nan) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -nan:0x4000000000000) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -nan) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -nan:0x4000000000000) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const nan) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const nan:0x4000000000000) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const nan) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const nan:0x4000000000000) (f64.const inf)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const -nan) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -nan:0x4000000000000) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -nan) (f64.const -nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const -nan) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -nan:0x4000000000000) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -nan) (f64.const nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const -nan:0x4000000000000) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const nan) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const nan:0x4000000000000) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const nan) (f64.const -nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "lt" (f64.const nan) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const nan:0x4000000000000) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const nan) (f64.const nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "lt" (f64.const nan:0x4000000000000) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "le" (f64.const -0x0p+0) (f64.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "le" (f64.const -0x0p+0) (f64.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "le" (f64.const 0x0p+0) (f64.const -0x0p+0)) (i32.const 1))
@@ -1010,14 +1238,18 @@
 (assert_return (invoke "le" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "le" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "le" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "le" (f64.const -0x0p+0) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f64.const -0x0p+0) (f64.const infinity)) (i32.const 1))
-(assert_return (invoke "le" (f64.const 0x0p+0) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f64.const 0x0p+0) (f64.const infinity)) (i32.const 1))
+(assert_return (invoke "le" (f64.const -0x0p+0) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -0x0p+0) (f64.const inf)) (i32.const 1))
+(assert_return (invoke "le" (f64.const 0x0p+0) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f64.const 0x0p+0) (f64.const inf)) (i32.const 1))
 (assert_return (invoke "le" (f64.const -0x0p+0) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -0x0p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "le" (f64.const -0x0p+0) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -0x0p+0) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "le" (f64.const 0x0p+0) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const 0x0p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "le" (f64.const 0x0p+0) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const 0x0p+0) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "le" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "le" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "le" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 0))
@@ -1046,14 +1278,18 @@
 (assert_return (invoke "le" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "le" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "le" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "le" (f64.const -0x0.0000000000001p-1022) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f64.const -0x0.0000000000001p-1022) (f64.const infinity)) (i32.const 1))
-(assert_return (invoke "le" (f64.const 0x0.0000000000001p-1022) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f64.const 0x0.0000000000001p-1022) (f64.const infinity)) (i32.const 1))
+(assert_return (invoke "le" (f64.const -0x0.0000000000001p-1022) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -0x0.0000000000001p-1022) (f64.const inf)) (i32.const 1))
+(assert_return (invoke "le" (f64.const 0x0.0000000000001p-1022) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f64.const 0x0.0000000000001p-1022) (f64.const inf)) (i32.const 1))
 (assert_return (invoke "le" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "le" (f64.const -0x0.0000000000001p-1022) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "le" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const 0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "le" (f64.const 0x0.0000000000001p-1022) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const 0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "le" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "le" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "le" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (i32.const 0))
@@ -1082,14 +1318,18 @@
 (assert_return (invoke "le" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "le" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "le" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "le" (f64.const -0x1p-1022) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f64.const -0x1p-1022) (f64.const infinity)) (i32.const 1))
-(assert_return (invoke "le" (f64.const 0x1p-1022) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f64.const 0x1p-1022) (f64.const infinity)) (i32.const 1))
+(assert_return (invoke "le" (f64.const -0x1p-1022) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -0x1p-1022) (f64.const inf)) (i32.const 1))
+(assert_return (invoke "le" (f64.const 0x1p-1022) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f64.const 0x1p-1022) (f64.const inf)) (i32.const 1))
 (assert_return (invoke "le" (f64.const -0x1p-1022) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -0x1p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "le" (f64.const -0x1p-1022) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -0x1p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "le" (f64.const 0x1p-1022) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const 0x1p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "le" (f64.const 0x1p-1022) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const 0x1p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "le" (f64.const -0x1p-1) (f64.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "le" (f64.const -0x1p-1) (f64.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "le" (f64.const 0x1p-1) (f64.const -0x0p+0)) (i32.const 0))
@@ -1118,14 +1358,18 @@
 (assert_return (invoke "le" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "le" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "le" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "le" (f64.const -0x1p-1) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f64.const -0x1p-1) (f64.const infinity)) (i32.const 1))
-(assert_return (invoke "le" (f64.const 0x1p-1) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f64.const 0x1p-1) (f64.const infinity)) (i32.const 1))
+(assert_return (invoke "le" (f64.const -0x1p-1) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -0x1p-1) (f64.const inf)) (i32.const 1))
+(assert_return (invoke "le" (f64.const 0x1p-1) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f64.const 0x1p-1) (f64.const inf)) (i32.const 1))
 (assert_return (invoke "le" (f64.const -0x1p-1) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -0x1p-1) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "le" (f64.const -0x1p-1) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -0x1p-1) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "le" (f64.const 0x1p-1) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const 0x1p-1) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "le" (f64.const 0x1p-1) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const 0x1p-1) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "le" (f64.const -0x1p+0) (f64.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "le" (f64.const -0x1p+0) (f64.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "le" (f64.const 0x1p+0) (f64.const -0x0p+0)) (i32.const 0))
@@ -1154,14 +1398,18 @@
 (assert_return (invoke "le" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "le" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "le" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "le" (f64.const -0x1p+0) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f64.const -0x1p+0) (f64.const infinity)) (i32.const 1))
-(assert_return (invoke "le" (f64.const 0x1p+0) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f64.const 0x1p+0) (f64.const infinity)) (i32.const 1))
+(assert_return (invoke "le" (f64.const -0x1p+0) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -0x1p+0) (f64.const inf)) (i32.const 1))
+(assert_return (invoke "le" (f64.const 0x1p+0) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f64.const 0x1p+0) (f64.const inf)) (i32.const 1))
 (assert_return (invoke "le" (f64.const -0x1p+0) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -0x1p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "le" (f64.const -0x1p+0) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -0x1p+0) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "le" (f64.const 0x1p+0) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const 0x1p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "le" (f64.const 0x1p+0) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const 0x1p+0) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "le" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "le" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "le" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 0))
@@ -1190,14 +1438,18 @@
 (assert_return (invoke "le" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "le" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "le" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "le" (f64.const -0x1.921fb54442d18p+2) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f64.const -0x1.921fb54442d18p+2) (f64.const infinity)) (i32.const 1))
-(assert_return (invoke "le" (f64.const 0x1.921fb54442d18p+2) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f64.const 0x1.921fb54442d18p+2) (f64.const infinity)) (i32.const 1))
+(assert_return (invoke "le" (f64.const -0x1.921fb54442d18p+2) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -0x1.921fb54442d18p+2) (f64.const inf)) (i32.const 1))
+(assert_return (invoke "le" (f64.const 0x1.921fb54442d18p+2) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f64.const 0x1.921fb54442d18p+2) (f64.const inf)) (i32.const 1))
 (assert_return (invoke "le" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "le" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "le" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "le" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const 0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "le" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "le" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "le" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 0))
@@ -1226,86 +1478,138 @@
 (assert_return (invoke "le" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "le" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "le" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "le" (f64.const -0x1.fffffffffffffp+1023) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f64.const -0x1.fffffffffffffp+1023) (f64.const infinity)) (i32.const 1))
-(assert_return (invoke "le" (f64.const 0x1.fffffffffffffp+1023) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f64.const 0x1.fffffffffffffp+1023) (f64.const infinity)) (i32.const 1))
+(assert_return (invoke "le" (f64.const -0x1.fffffffffffffp+1023) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -0x1.fffffffffffffp+1023) (f64.const inf)) (i32.const 1))
+(assert_return (invoke "le" (f64.const 0x1.fffffffffffffp+1023) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f64.const 0x1.fffffffffffffp+1023) (f64.const inf)) (i32.const 1))
 (assert_return (invoke "le" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "le" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "le" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "le" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 0))
-(assert_return (invoke "le" (f64.const -infinity) (f64.const -0x0p+0)) (i32.const 1))
-(assert_return (invoke "le" (f64.const -infinity) (f64.const 0x0p+0)) (i32.const 1))
-(assert_return (invoke "le" (f64.const infinity) (f64.const -0x0p+0)) (i32.const 0))
-(assert_return (invoke "le" (f64.const infinity) (f64.const 0x0p+0)) (i32.const 0))
-(assert_return (invoke "le" (f64.const -infinity) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))
-(assert_return (invoke "le" (f64.const -infinity) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))
-(assert_return (invoke "le" (f64.const infinity) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))
-(assert_return (invoke "le" (f64.const infinity) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))
-(assert_return (invoke "le" (f64.const -infinity) (f64.const -0x1p-1022)) (i32.const 1))
-(assert_return (invoke "le" (f64.const -infinity) (f64.const 0x1p-1022)) (i32.const 1))
-(assert_return (invoke "le" (f64.const infinity) (f64.const -0x1p-1022)) (i32.const 0))
-(assert_return (invoke "le" (f64.const infinity) (f64.const 0x1p-1022)) (i32.const 0))
-(assert_return (invoke "le" (f64.const -infinity) (f64.const -0x1p-1)) (i32.const 1))
-(assert_return (invoke "le" (f64.const -infinity) (f64.const 0x1p-1)) (i32.const 1))
-(assert_return (invoke "le" (f64.const infinity) (f64.const -0x1p-1)) (i32.const 0))
-(assert_return (invoke "le" (f64.const infinity) (f64.const 0x1p-1)) (i32.const 0))
-(assert_return (invoke "le" (f64.const -infinity) (f64.const -0x1p+0)) (i32.const 1))
-(assert_return (invoke "le" (f64.const -infinity) (f64.const 0x1p+0)) (i32.const 1))
-(assert_return (invoke "le" (f64.const infinity) (f64.const -0x1p+0)) (i32.const 0))
-(assert_return (invoke "le" (f64.const infinity) (f64.const 0x1p+0)) (i32.const 0))
-(assert_return (invoke "le" (f64.const -infinity) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))
-(assert_return (invoke "le" (f64.const -infinity) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))
-(assert_return (invoke "le" (f64.const infinity) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))
-(assert_return (invoke "le" (f64.const infinity) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))
-(assert_return (invoke "le" (f64.const -infinity) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "le" (f64.const -infinity) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "le" (f64.const infinity) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "le" (f64.const infinity) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "le" (f64.const -infinity) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "le" (f64.const -infinity) (f64.const infinity)) (i32.const 1))
-(assert_return (invoke "le" (f64.const infinity) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f64.const infinity) (f64.const infinity)) (i32.const 1))
-(assert_return (invoke "le" (f64.const -infinity) (f64.const -nan)) (i32.const 0))
-(assert_return (invoke "le" (f64.const -infinity) (f64.const nan)) (i32.const 0))
-(assert_return (invoke "le" (f64.const infinity) (f64.const -nan)) (i32.const 0))
-(assert_return (invoke "le" (f64.const infinity) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -inf) (f64.const -0x0p+0)) (i32.const 1))
+(assert_return (invoke "le" (f64.const -inf) (f64.const 0x0p+0)) (i32.const 1))
+(assert_return (invoke "le" (f64.const inf) (f64.const -0x0p+0)) (i32.const 0))
+(assert_return (invoke "le" (f64.const inf) (f64.const 0x0p+0)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -inf) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))
+(assert_return (invoke "le" (f64.const -inf) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))
+(assert_return (invoke "le" (f64.const inf) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))
+(assert_return (invoke "le" (f64.const inf) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -inf) (f64.const -0x1p-1022)) (i32.const 1))
+(assert_return (invoke "le" (f64.const -inf) (f64.const 0x1p-1022)) (i32.const 1))
+(assert_return (invoke "le" (f64.const inf) (f64.const -0x1p-1022)) (i32.const 0))
+(assert_return (invoke "le" (f64.const inf) (f64.const 0x1p-1022)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -inf) (f64.const -0x1p-1)) (i32.const 1))
+(assert_return (invoke "le" (f64.const -inf) (f64.const 0x1p-1)) (i32.const 1))
+(assert_return (invoke "le" (f64.const inf) (f64.const -0x1p-1)) (i32.const 0))
+(assert_return (invoke "le" (f64.const inf) (f64.const 0x1p-1)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -inf) (f64.const -0x1p+0)) (i32.const 1))
+(assert_return (invoke "le" (f64.const -inf) (f64.const 0x1p+0)) (i32.const 1))
+(assert_return (invoke "le" (f64.const inf) (f64.const -0x1p+0)) (i32.const 0))
+(assert_return (invoke "le" (f64.const inf) (f64.const 0x1p+0)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -inf) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))
+(assert_return (invoke "le" (f64.const -inf) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))
+(assert_return (invoke "le" (f64.const inf) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))
+(assert_return (invoke "le" (f64.const inf) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -inf) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
+(assert_return (invoke "le" (f64.const -inf) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
+(assert_return (invoke "le" (f64.const inf) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
+(assert_return (invoke "le" (f64.const inf) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -inf) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "le" (f64.const -inf) (f64.const inf)) (i32.const 1))
+(assert_return (invoke "le" (f64.const inf) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f64.const inf) (f64.const inf)) (i32.const 1))
+(assert_return (invoke "le" (f64.const -inf) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -inf) (f64.const -nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -inf) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -inf) (f64.const nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "le" (f64.const inf) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const inf) (f64.const -nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "le" (f64.const inf) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const inf) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "le" (f64.const -nan) (f64.const -0x0p+0)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -nan:0x4000000000000) (f64.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "le" (f64.const -nan) (f64.const 0x0p+0)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -nan:0x4000000000000) (f64.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "le" (f64.const nan) (f64.const -0x0p+0)) (i32.const 0))
+(assert_return (invoke "le" (f64.const nan:0x4000000000000) (f64.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "le" (f64.const nan) (f64.const 0x0p+0)) (i32.const 0))
+(assert_return (invoke "le" (f64.const nan:0x4000000000000) (f64.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "le" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))
 (assert_return (invoke "le" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))
 (assert_return (invoke "le" (f64.const nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))
+(assert_return (invoke "le" (f64.const nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))
 (assert_return (invoke "le" (f64.const nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))
+(assert_return (invoke "le" (f64.const nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))
 (assert_return (invoke "le" (f64.const -nan) (f64.const -0x1p-1022)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1022)) (i32.const 0))
 (assert_return (invoke "le" (f64.const -nan) (f64.const 0x1p-1022)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1022)) (i32.const 0))
 (assert_return (invoke "le" (f64.const nan) (f64.const -0x1p-1022)) (i32.const 0))
+(assert_return (invoke "le" (f64.const nan:0x4000000000000) (f64.const -0x1p-1022)) (i32.const 0))
 (assert_return (invoke "le" (f64.const nan) (f64.const 0x1p-1022)) (i32.const 0))
+(assert_return (invoke "le" (f64.const nan:0x4000000000000) (f64.const 0x1p-1022)) (i32.const 0))
 (assert_return (invoke "le" (f64.const -nan) (f64.const -0x1p-1)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1)) (i32.const 0))
 (assert_return (invoke "le" (f64.const -nan) (f64.const 0x1p-1)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1)) (i32.const 0))
 (assert_return (invoke "le" (f64.const nan) (f64.const -0x1p-1)) (i32.const 0))
+(assert_return (invoke "le" (f64.const nan:0x4000000000000) (f64.const -0x1p-1)) (i32.const 0))
 (assert_return (invoke "le" (f64.const nan) (f64.const 0x1p-1)) (i32.const 0))
+(assert_return (invoke "le" (f64.const nan:0x4000000000000) (f64.const 0x1p-1)) (i32.const 0))
 (assert_return (invoke "le" (f64.const -nan) (f64.const -0x1p+0)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -nan:0x4000000000000) (f64.const -0x1p+0)) (i32.const 0))
 (assert_return (invoke "le" (f64.const -nan) (f64.const 0x1p+0)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -nan:0x4000000000000) (f64.const 0x1p+0)) (i32.const 0))
 (assert_return (invoke "le" (f64.const nan) (f64.const -0x1p+0)) (i32.const 0))
+(assert_return (invoke "le" (f64.const nan:0x4000000000000) (f64.const -0x1p+0)) (i32.const 0))
 (assert_return (invoke "le" (f64.const nan) (f64.const 0x1p+0)) (i32.const 0))
+(assert_return (invoke "le" (f64.const nan:0x4000000000000) (f64.const 0x1p+0)) (i32.const 0))
 (assert_return (invoke "le" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))
 (assert_return (invoke "le" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))
 (assert_return (invoke "le" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))
+(assert_return (invoke "le" (f64.const nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))
 (assert_return (invoke "le" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))
+(assert_return (invoke "le" (f64.const nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))
 (assert_return (invoke "le" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "le" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "le" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
+(assert_return (invoke "le" (f64.const nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "le" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "le" (f64.const -nan) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f64.const -nan) (f64.const infinity)) (i32.const 0))
-(assert_return (invoke "le" (f64.const nan) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "le" (f64.const nan) (f64.const infinity)) (i32.const 0))
+(assert_return (invoke "le" (f64.const nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -nan) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -nan:0x4000000000000) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -nan) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -nan:0x4000000000000) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "le" (f64.const nan) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f64.const nan:0x4000000000000) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "le" (f64.const nan) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "le" (f64.const nan:0x4000000000000) (f64.const inf)) (i32.const 0))
 (assert_return (invoke "le" (f64.const -nan) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -nan:0x4000000000000) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -nan) (f64.const -nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "le" (f64.const -nan) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -nan:0x4000000000000) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -nan) (f64.const nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "le" (f64.const -nan:0x4000000000000) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "le" (f64.const nan) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const nan:0x4000000000000) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const nan) (f64.const -nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "le" (f64.const nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "le" (f64.const nan) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const nan:0x4000000000000) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "le" (f64.const nan) (f64.const nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "le" (f64.const nan:0x4000000000000) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -0x0p+0) (f64.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -0x0p+0) (f64.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const 0x0p+0) (f64.const -0x0p+0)) (i32.const 0))
@@ -1334,14 +1638,18 @@
 (assert_return (invoke "gt" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "gt" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const -0x0p+0) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "gt" (f64.const -0x0p+0) (f64.const infinity)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const 0x0p+0) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "gt" (f64.const 0x0p+0) (f64.const infinity)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -0x0p+0) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "gt" (f64.const -0x0p+0) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const 0x0p+0) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "gt" (f64.const 0x0p+0) (f64.const inf)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -0x0p+0) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -0x0p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -0x0p+0) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -0x0p+0) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const 0x0p+0) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const 0x0p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const 0x0p+0) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const 0x0p+0) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 1))
@@ -1370,14 +1678,18 @@
 (assert_return (invoke "gt" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "gt" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const -0x0.0000000000001p-1022) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "gt" (f64.const -0x0.0000000000001p-1022) (f64.const infinity)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const 0x0.0000000000001p-1022) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "gt" (f64.const 0x0.0000000000001p-1022) (f64.const infinity)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -0x0.0000000000001p-1022) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "gt" (f64.const -0x0.0000000000001p-1022) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const 0x0.0000000000001p-1022) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "gt" (f64.const 0x0.0000000000001p-1022) (f64.const inf)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -0x0.0000000000001p-1022) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const 0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const 0x0.0000000000001p-1022) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const 0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (i32.const 1))
@@ -1406,14 +1718,18 @@
 (assert_return (invoke "gt" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "gt" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const -0x1p-1022) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "gt" (f64.const -0x1p-1022) (f64.const infinity)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const 0x1p-1022) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "gt" (f64.const 0x1p-1022) (f64.const infinity)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -0x1p-1022) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "gt" (f64.const -0x1p-1022) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const 0x1p-1022) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "gt" (f64.const 0x1p-1022) (f64.const inf)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -0x1p-1022) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -0x1p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -0x1p-1022) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -0x1p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const 0x1p-1022) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const 0x1p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const 0x1p-1022) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const 0x1p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -0x1p-1) (f64.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -0x1p-1) (f64.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const 0x1p-1) (f64.const -0x0p+0)) (i32.const 1))
@@ -1442,14 +1758,18 @@
 (assert_return (invoke "gt" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "gt" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const -0x1p-1) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "gt" (f64.const -0x1p-1) (f64.const infinity)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const 0x1p-1) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "gt" (f64.const 0x1p-1) (f64.const infinity)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -0x1p-1) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "gt" (f64.const -0x1p-1) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const 0x1p-1) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "gt" (f64.const 0x1p-1) (f64.const inf)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -0x1p-1) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -0x1p-1) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -0x1p-1) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -0x1p-1) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const 0x1p-1) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const 0x1p-1) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const 0x1p-1) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const 0x1p-1) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -0x1p+0) (f64.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -0x1p+0) (f64.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const 0x1p+0) (f64.const -0x0p+0)) (i32.const 1))
@@ -1478,14 +1798,18 @@
 (assert_return (invoke "gt" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "gt" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const -0x1p+0) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "gt" (f64.const -0x1p+0) (f64.const infinity)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const 0x1p+0) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "gt" (f64.const 0x1p+0) (f64.const infinity)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -0x1p+0) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "gt" (f64.const -0x1p+0) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const 0x1p+0) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "gt" (f64.const 0x1p+0) (f64.const inf)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -0x1p+0) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -0x1p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -0x1p+0) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -0x1p+0) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const 0x1p+0) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const 0x1p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const 0x1p+0) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const 0x1p+0) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 1))
@@ -1514,14 +1838,18 @@
 (assert_return (invoke "gt" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "gt" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const -0x1.921fb54442d18p+2) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "gt" (f64.const -0x1.921fb54442d18p+2) (f64.const infinity)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const 0x1.921fb54442d18p+2) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "gt" (f64.const 0x1.921fb54442d18p+2) (f64.const infinity)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -0x1.921fb54442d18p+2) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "gt" (f64.const -0x1.921fb54442d18p+2) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const 0x1.921fb54442d18p+2) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "gt" (f64.const 0x1.921fb54442d18p+2) (f64.const inf)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const 0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 1))
@@ -1550,86 +1878,138 @@
 (assert_return (invoke "gt" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "gt" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const -0x1.fffffffffffffp+1023) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "gt" (f64.const -0x1.fffffffffffffp+1023) (f64.const infinity)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const 0x1.fffffffffffffp+1023) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "gt" (f64.const 0x1.fffffffffffffp+1023) (f64.const infinity)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -0x1.fffffffffffffp+1023) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "gt" (f64.const -0x1.fffffffffffffp+1023) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const 0x1.fffffffffffffp+1023) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "gt" (f64.const 0x1.fffffffffffffp+1023) (f64.const inf)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const -infinity) (f64.const -0x0p+0)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const -infinity) (f64.const 0x0p+0)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const infinity) (f64.const -0x0p+0)) (i32.const 1))
-(assert_return (invoke "gt" (f64.const infinity) (f64.const 0x0p+0)) (i32.const 1))
-(assert_return (invoke "gt" (f64.const -infinity) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const -infinity) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const infinity) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))
-(assert_return (invoke "gt" (f64.const infinity) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))
-(assert_return (invoke "gt" (f64.const -infinity) (f64.const -0x1p-1022)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const -infinity) (f64.const 0x1p-1022)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const infinity) (f64.const -0x1p-1022)) (i32.const 1))
-(assert_return (invoke "gt" (f64.const infinity) (f64.const 0x1p-1022)) (i32.const 1))
-(assert_return (invoke "gt" (f64.const -infinity) (f64.const -0x1p-1)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const -infinity) (f64.const 0x1p-1)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const infinity) (f64.const -0x1p-1)) (i32.const 1))
-(assert_return (invoke "gt" (f64.const infinity) (f64.const 0x1p-1)) (i32.const 1))
-(assert_return (invoke "gt" (f64.const -infinity) (f64.const -0x1p+0)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const -infinity) (f64.const 0x1p+0)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const infinity) (f64.const -0x1p+0)) (i32.const 1))
-(assert_return (invoke "gt" (f64.const infinity) (f64.const 0x1p+0)) (i32.const 1))
-(assert_return (invoke "gt" (f64.const -infinity) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const -infinity) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const infinity) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))
-(assert_return (invoke "gt" (f64.const infinity) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))
-(assert_return (invoke "gt" (f64.const -infinity) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const -infinity) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const infinity) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "gt" (f64.const infinity) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "gt" (f64.const -infinity) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const -infinity) (f64.const infinity)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const infinity) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "gt" (f64.const infinity) (f64.const infinity)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const -infinity) (f64.const -nan)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const -infinity) (f64.const nan)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const infinity) (f64.const -nan)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const infinity) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -inf) (f64.const -0x0p+0)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -inf) (f64.const 0x0p+0)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const inf) (f64.const -0x0p+0)) (i32.const 1))
+(assert_return (invoke "gt" (f64.const inf) (f64.const 0x0p+0)) (i32.const 1))
+(assert_return (invoke "gt" (f64.const -inf) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -inf) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const inf) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))
+(assert_return (invoke "gt" (f64.const inf) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))
+(assert_return (invoke "gt" (f64.const -inf) (f64.const -0x1p-1022)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -inf) (f64.const 0x1p-1022)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const inf) (f64.const -0x1p-1022)) (i32.const 1))
+(assert_return (invoke "gt" (f64.const inf) (f64.const 0x1p-1022)) (i32.const 1))
+(assert_return (invoke "gt" (f64.const -inf) (f64.const -0x1p-1)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -inf) (f64.const 0x1p-1)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const inf) (f64.const -0x1p-1)) (i32.const 1))
+(assert_return (invoke "gt" (f64.const inf) (f64.const 0x1p-1)) (i32.const 1))
+(assert_return (invoke "gt" (f64.const -inf) (f64.const -0x1p+0)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -inf) (f64.const 0x1p+0)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const inf) (f64.const -0x1p+0)) (i32.const 1))
+(assert_return (invoke "gt" (f64.const inf) (f64.const 0x1p+0)) (i32.const 1))
+(assert_return (invoke "gt" (f64.const -inf) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -inf) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const inf) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))
+(assert_return (invoke "gt" (f64.const inf) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))
+(assert_return (invoke "gt" (f64.const -inf) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -inf) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const inf) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
+(assert_return (invoke "gt" (f64.const inf) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
+(assert_return (invoke "gt" (f64.const -inf) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -inf) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const inf) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "gt" (f64.const inf) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -inf) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -inf) (f64.const -nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -inf) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -inf) (f64.const nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const inf) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const inf) (f64.const -nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const inf) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const inf) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -nan) (f64.const -0x0p+0)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -nan:0x4000000000000) (f64.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -nan) (f64.const 0x0p+0)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -nan:0x4000000000000) (f64.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const nan) (f64.const -0x0p+0)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const nan:0x4000000000000) (f64.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const nan) (f64.const 0x0p+0)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const nan:0x4000000000000) (f64.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -nan) (f64.const -0x1p-1022)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1022)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -nan) (f64.const 0x1p-1022)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1022)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const nan) (f64.const -0x1p-1022)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const nan:0x4000000000000) (f64.const -0x1p-1022)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const nan) (f64.const 0x1p-1022)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const nan:0x4000000000000) (f64.const 0x1p-1022)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -nan) (f64.const -0x1p-1)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -nan) (f64.const 0x1p-1)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const nan) (f64.const -0x1p-1)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const nan:0x4000000000000) (f64.const -0x1p-1)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const nan) (f64.const 0x1p-1)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const nan:0x4000000000000) (f64.const 0x1p-1)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -nan) (f64.const -0x1p+0)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -nan:0x4000000000000) (f64.const -0x1p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -nan) (f64.const 0x1p+0)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -nan:0x4000000000000) (f64.const 0x1p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const nan) (f64.const -0x1p+0)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const nan:0x4000000000000) (f64.const -0x1p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const nan) (f64.const 0x1p+0)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const nan:0x4000000000000) (f64.const 0x1p+0)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const -nan) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const -nan) (f64.const infinity)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const nan) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "gt" (f64.const nan) (f64.const infinity)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -nan) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -nan:0x4000000000000) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -nan) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -nan:0x4000000000000) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const nan) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const nan:0x4000000000000) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const nan) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const nan:0x4000000000000) (f64.const inf)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -nan) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -nan:0x4000000000000) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -nan) (f64.const -nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const -nan) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -nan:0x4000000000000) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -nan) (f64.const nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const -nan:0x4000000000000) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const nan) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const nan:0x4000000000000) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const nan) (f64.const -nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "gt" (f64.const nan) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const nan:0x4000000000000) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const nan) (f64.const nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "gt" (f64.const nan:0x4000000000000) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -0x0p+0) (f64.const -0x0p+0)) (i32.const 1))
 (assert_return (invoke "ge" (f64.const -0x0p+0) (f64.const 0x0p+0)) (i32.const 1))
 (assert_return (invoke "ge" (f64.const 0x0p+0) (f64.const -0x0p+0)) (i32.const 1))
@@ -1658,14 +2038,18 @@
 (assert_return (invoke "ge" (f64.const -0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const 0x0p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "ge" (f64.const 0x0p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const -0x0p+0) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f64.const -0x0p+0) (f64.const infinity)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const 0x0p+0) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f64.const 0x0p+0) (f64.const infinity)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -0x0p+0) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ge" (f64.const -0x0p+0) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const 0x0p+0) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ge" (f64.const 0x0p+0) (f64.const inf)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -0x0p+0) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -0x0p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -0x0p+0) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -0x0p+0) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const 0x0p+0) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const 0x0p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const 0x0p+0) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const 0x0p+0) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -0x0.0000000000001p-1022) (f64.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const 0x0.0000000000001p-1022) (f64.const -0x0p+0)) (i32.const 1))
@@ -1694,14 +2078,18 @@
 (assert_return (invoke "ge" (f64.const -0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const 0x0.0000000000001p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "ge" (f64.const 0x0.0000000000001p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const -0x0.0000000000001p-1022) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f64.const -0x0.0000000000001p-1022) (f64.const infinity)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const 0x0.0000000000001p-1022) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f64.const 0x0.0000000000001p-1022) (f64.const infinity)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -0x0.0000000000001p-1022) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ge" (f64.const -0x0.0000000000001p-1022) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const 0x0.0000000000001p-1022) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ge" (f64.const 0x0.0000000000001p-1022) (f64.const inf)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -0x0.0000000000001p-1022) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const 0x0.0000000000001p-1022) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const 0x0.0000000000001p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const 0x0.0000000000001p-1022) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const 0x0.0000000000001p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -0x1p-1022) (f64.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -0x1p-1022) (f64.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const 0x1p-1022) (f64.const -0x0p+0)) (i32.const 1))
@@ -1730,14 +2118,18 @@
 (assert_return (invoke "ge" (f64.const -0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const 0x1p-1022) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "ge" (f64.const 0x1p-1022) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const -0x1p-1022) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f64.const -0x1p-1022) (f64.const infinity)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const 0x1p-1022) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f64.const 0x1p-1022) (f64.const infinity)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -0x1p-1022) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ge" (f64.const -0x1p-1022) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const 0x1p-1022) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ge" (f64.const 0x1p-1022) (f64.const inf)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -0x1p-1022) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -0x1p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -0x1p-1022) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -0x1p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const 0x1p-1022) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const 0x1p-1022) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const 0x1p-1022) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const 0x1p-1022) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -0x1p-1) (f64.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -0x1p-1) (f64.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const 0x1p-1) (f64.const -0x0p+0)) (i32.const 1))
@@ -1766,14 +2158,18 @@
 (assert_return (invoke "ge" (f64.const -0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const 0x1p-1) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "ge" (f64.const 0x1p-1) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const -0x1p-1) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f64.const -0x1p-1) (f64.const infinity)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const 0x1p-1) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f64.const 0x1p-1) (f64.const infinity)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -0x1p-1) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ge" (f64.const -0x1p-1) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const 0x1p-1) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ge" (f64.const 0x1p-1) (f64.const inf)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -0x1p-1) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -0x1p-1) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -0x1p-1) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -0x1p-1) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const 0x1p-1) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const 0x1p-1) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const 0x1p-1) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const 0x1p-1) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -0x1p+0) (f64.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -0x1p+0) (f64.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const 0x1p+0) (f64.const -0x0p+0)) (i32.const 1))
@@ -1802,14 +2198,18 @@
 (assert_return (invoke "ge" (f64.const -0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const 0x1p+0) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "ge" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const -0x1p+0) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f64.const -0x1p+0) (f64.const infinity)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const 0x1p+0) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f64.const 0x1p+0) (f64.const infinity)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -0x1p+0) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ge" (f64.const -0x1p+0) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const 0x1p+0) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ge" (f64.const 0x1p+0) (f64.const inf)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -0x1p+0) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -0x1p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -0x1p+0) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -0x1p+0) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const 0x1p+0) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const 0x1p+0) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const 0x1p+0) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const 0x1p+0) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x0p+0)) (i32.const 1))
@@ -1838,14 +2238,18 @@
 (assert_return (invoke "ge" (f64.const -0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const 0x1.921fb54442d18p+2) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "ge" (f64.const 0x1.921fb54442d18p+2) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const -0x1.921fb54442d18p+2) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f64.const -0x1.921fb54442d18p+2) (f64.const infinity)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const 0x1.921fb54442d18p+2) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f64.const 0x1.921fb54442d18p+2) (f64.const infinity)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -0x1.921fb54442d18p+2) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ge" (f64.const -0x1.921fb54442d18p+2) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const 0x1.921fb54442d18p+2) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ge" (f64.const 0x1.921fb54442d18p+2) (f64.const inf)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const 0x1.921fb54442d18p+2) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const 0x1.921fb54442d18p+2) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const 0x1.921fb54442d18p+2) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x0p+0)) (i32.const 1))
@@ -1874,83 +2278,135 @@
 (assert_return (invoke "ge" (f64.const -0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const 0x1.fffffffffffffp+1023) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
 (assert_return (invoke "ge" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "ge" (f64.const -0x1.fffffffffffffp+1023) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f64.const -0x1.fffffffffffffp+1023) (f64.const infinity)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const 0x1.fffffffffffffp+1023) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f64.const 0x1.fffffffffffffp+1023) (f64.const infinity)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -0x1.fffffffffffffp+1023) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ge" (f64.const -0x1.fffffffffffffp+1023) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const 0x1.fffffffffffffp+1023) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ge" (f64.const 0x1.fffffffffffffp+1023) (f64.const inf)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const 0x1.fffffffffffffp+1023) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const -infinity) (f64.const -0x0p+0)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const -infinity) (f64.const 0x0p+0)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const infinity) (f64.const -0x0p+0)) (i32.const 1))
-(assert_return (invoke "ge" (f64.const infinity) (f64.const 0x0p+0)) (i32.const 1))
-(assert_return (invoke "ge" (f64.const -infinity) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const -infinity) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const infinity) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))
-(assert_return (invoke "ge" (f64.const infinity) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))
-(assert_return (invoke "ge" (f64.const -infinity) (f64.const -0x1p-1022)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const -infinity) (f64.const 0x1p-1022)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const infinity) (f64.const -0x1p-1022)) (i32.const 1))
-(assert_return (invoke "ge" (f64.const infinity) (f64.const 0x1p-1022)) (i32.const 1))
-(assert_return (invoke "ge" (f64.const -infinity) (f64.const -0x1p-1)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const -infinity) (f64.const 0x1p-1)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const infinity) (f64.const -0x1p-1)) (i32.const 1))
-(assert_return (invoke "ge" (f64.const infinity) (f64.const 0x1p-1)) (i32.const 1))
-(assert_return (invoke "ge" (f64.const -infinity) (f64.const -0x1p+0)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const -infinity) (f64.const 0x1p+0)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const infinity) (f64.const -0x1p+0)) (i32.const 1))
-(assert_return (invoke "ge" (f64.const infinity) (f64.const 0x1p+0)) (i32.const 1))
-(assert_return (invoke "ge" (f64.const -infinity) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const -infinity) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const infinity) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))
-(assert_return (invoke "ge" (f64.const infinity) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))
-(assert_return (invoke "ge" (f64.const -infinity) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const -infinity) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const infinity) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "ge" (f64.const infinity) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
-(assert_return (invoke "ge" (f64.const -infinity) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f64.const -infinity) (f64.const infinity)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const infinity) (f64.const -infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f64.const infinity) (f64.const infinity)) (i32.const 1))
-(assert_return (invoke "ge" (f64.const -infinity) (f64.const -nan)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const -infinity) (f64.const nan)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const infinity) (f64.const -nan)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const infinity) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const 0x1.fffffffffffffp+1023) (f64.const nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -inf) (f64.const -0x0p+0)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -inf) (f64.const 0x0p+0)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const inf) (f64.const -0x0p+0)) (i32.const 1))
+(assert_return (invoke "ge" (f64.const inf) (f64.const 0x0p+0)) (i32.const 1))
+(assert_return (invoke "ge" (f64.const -inf) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -inf) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const inf) (f64.const -0x0.0000000000001p-1022)) (i32.const 1))
+(assert_return (invoke "ge" (f64.const inf) (f64.const 0x0.0000000000001p-1022)) (i32.const 1))
+(assert_return (invoke "ge" (f64.const -inf) (f64.const -0x1p-1022)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -inf) (f64.const 0x1p-1022)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const inf) (f64.const -0x1p-1022)) (i32.const 1))
+(assert_return (invoke "ge" (f64.const inf) (f64.const 0x1p-1022)) (i32.const 1))
+(assert_return (invoke "ge" (f64.const -inf) (f64.const -0x1p-1)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -inf) (f64.const 0x1p-1)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const inf) (f64.const -0x1p-1)) (i32.const 1))
+(assert_return (invoke "ge" (f64.const inf) (f64.const 0x1p-1)) (i32.const 1))
+(assert_return (invoke "ge" (f64.const -inf) (f64.const -0x1p+0)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -inf) (f64.const 0x1p+0)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const inf) (f64.const -0x1p+0)) (i32.const 1))
+(assert_return (invoke "ge" (f64.const inf) (f64.const 0x1p+0)) (i32.const 1))
+(assert_return (invoke "ge" (f64.const -inf) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -inf) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const inf) (f64.const -0x1.921fb54442d18p+2)) (i32.const 1))
+(assert_return (invoke "ge" (f64.const inf) (f64.const 0x1.921fb54442d18p+2)) (i32.const 1))
+(assert_return (invoke "ge" (f64.const -inf) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -inf) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const inf) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 1))
+(assert_return (invoke "ge" (f64.const inf) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 1))
+(assert_return (invoke "ge" (f64.const -inf) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ge" (f64.const -inf) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const inf) (f64.const -inf)) (i32.const 1))
+(assert_return (invoke "ge" (f64.const inf) (f64.const inf)) (i32.const 1))
+(assert_return (invoke "ge" (f64.const -inf) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -inf) (f64.const -nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -inf) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -inf) (f64.const nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const inf) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const inf) (f64.const -nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const inf) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const inf) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -nan) (f64.const -0x0p+0)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -nan:0x4000000000000) (f64.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -nan) (f64.const 0x0p+0)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -nan:0x4000000000000) (f64.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const nan) (f64.const -0x0p+0)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const nan:0x4000000000000) (f64.const -0x0p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const nan) (f64.const 0x0p+0)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const nan:0x4000000000000) (f64.const 0x0p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const nan) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const nan:0x4000000000000) (f64.const -0x0.0000000000001p-1022)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const nan) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const nan:0x4000000000000) (f64.const 0x0.0000000000001p-1022)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -nan) (f64.const -0x1p-1022)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1022)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -nan) (f64.const 0x1p-1022)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1022)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const nan) (f64.const -0x1p-1022)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const nan:0x4000000000000) (f64.const -0x1p-1022)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const nan) (f64.const 0x1p-1022)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const nan:0x4000000000000) (f64.const 0x1p-1022)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -nan) (f64.const -0x1p-1)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -nan:0x4000000000000) (f64.const -0x1p-1)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -nan) (f64.const 0x1p-1)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -nan:0x4000000000000) (f64.const 0x1p-1)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const nan) (f64.const -0x1p-1)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const nan:0x4000000000000) (f64.const -0x1p-1)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const nan) (f64.const 0x1p-1)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const nan:0x4000000000000) (f64.const 0x1p-1)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -nan) (f64.const -0x1p+0)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -nan:0x4000000000000) (f64.const -0x1p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -nan) (f64.const 0x1p+0)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -nan:0x4000000000000) (f64.const 0x1p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const nan) (f64.const -0x1p+0)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const nan:0x4000000000000) (f64.const -0x1p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const nan) (f64.const 0x1p+0)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const nan:0x4000000000000) (f64.const 0x1p+0)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const nan) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const nan:0x4000000000000) (f64.const -0x1.921fb54442d18p+2)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const nan) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const nan:0x4000000000000) (f64.const 0x1.921fb54442d18p+2)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const nan) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const nan:0x4000000000000) (f64.const -0x1.fffffffffffffp+1023)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const nan) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const -nan) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const -nan) (f64.const infinity)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const nan) (f64.const -infinity)) (i32.const 0))
-(assert_return (invoke "ge" (f64.const nan) (f64.const infinity)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const nan:0x4000000000000) (f64.const 0x1.fffffffffffffp+1023)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -nan) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -nan:0x4000000000000) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -nan) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -nan:0x4000000000000) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const nan) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const nan:0x4000000000000) (f64.const -inf)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const nan) (f64.const inf)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const nan:0x4000000000000) (f64.const inf)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -nan) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -nan:0x4000000000000) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -nan) (f64.const -nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const -nan) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -nan:0x4000000000000) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -nan) (f64.const nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const -nan:0x4000000000000) (f64.const nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const nan) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const nan:0x4000000000000) (f64.const -nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const nan) (f64.const -nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const nan:0x4000000000000) (f64.const -nan:0x4000000000000)) (i32.const 0))
 (assert_return (invoke "ge" (f64.const nan) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const nan:0x4000000000000) (f64.const nan)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const nan) (f64.const nan:0x4000000000000)) (i32.const 0))
+(assert_return (invoke "ge" (f64.const nan:0x4000000000000) (f64.const nan:0x4000000000000)) (i32.const 0))
diff --git a/test/WasmSpec/testsuite/core/fac.wast b/test/WasmSpec/testsuite/core/fac.wast
index 3b388e2..acc8962 100644
--- a/test/WasmSpec/testsuite/core/fac.wast
+++ b/test/WasmSpec/testsuite/core/fac.wast
@@ -1,19 +1,23 @@
 (module
   ;; Recursive factorial
   (func (export "fac-rec") (param i64) (result i64)
-    (if i64 (i64.eq (get_local 0) (i64.const 0))
-      (i64.const 1)
-      (i64.mul (get_local 0) (call 0 (i64.sub (get_local 0) (i64.const 1))))
+    (if (result i64) (i64.eq (get_local 0) (i64.const 0))
+      (then (i64.const 1))
+      (else
+        (i64.mul (get_local 0) (call 0 (i64.sub (get_local 0) (i64.const 1))))
+      )
     )
   )
 
   ;; Recursive factorial named
   (func $fac-rec-named (export "fac-rec-named") (param $n i64) (result i64)
-    (if i64 (i64.eq (get_local $n) (i64.const 0))
-      (i64.const 1)
-      (i64.mul
-        (get_local $n)
-        (call $fac-rec-named (i64.sub (get_local $n) (i64.const 1)))
+    (if (result i64) (i64.eq (get_local $n) (i64.const 0))
+      (then (i64.const 1))
+      (else
+        (i64.mul
+          (get_local $n)
+          (call $fac-rec-named (i64.sub (get_local $n) (i64.const 1)))
+        )
       )
     )
   )
@@ -27,8 +31,8 @@
       (loop
         (if
           (i64.eq (get_local 1) (i64.const 0))
-          (br 2)
-          (block
+          (then (br 2))
+          (else
             (set_local 2 (i64.mul (get_local 1) (get_local 2)))
             (set_local 1 (i64.sub (get_local 1) (i64.const 1)))
           )
@@ -49,8 +53,8 @@
       (loop $loop
         (if
           (i64.eq (get_local $i) (i64.const 0))
-          (br $done)
-          (block
+          (then (br $done))
+          (else
             (set_local $res (i64.mul (get_local $i) (get_local $res)))
             (set_local $i (i64.sub (get_local $i) (i64.const 1)))
           )
diff --git a/test/WasmSpec/testsuite/core/float_exprs.wast b/test/WasmSpec/testsuite/core/float_exprs.wast
index b163ac6..33b3637 100644
--- a/test/WasmSpec/testsuite/core/float_exprs.wast
+++ b/test/WasmSpec/testsuite/core/float_exprs.wast
@@ -205,11 +205,29 @@
     (f64.sub (get_local $x) (get_local $x)))
 )
 
-(assert_return_canonical_nan (invoke "f32.no_fold_sub_self" (f32.const infinity)))
+(assert_return_canonical_nan (invoke "f32.no_fold_sub_self" (f32.const inf)))
 (assert_return_canonical_nan (invoke "f32.no_fold_sub_self" (f32.const nan)))
-(assert_return_canonical_nan (invoke "f64.no_fold_sub_self" (f64.const infinity)))
+(assert_return_canonical_nan (invoke "f64.no_fold_sub_self" (f64.const inf)))
 (assert_return_canonical_nan (invoke "f64.no_fold_sub_self" (f64.const nan)))
 
+;; Test that x / x is not folded to 1.0.
+
+(module
+  (func (export "f32.no_fold_div_self") (param $x f32) (result f32)
+    (f32.div (get_local $x) (get_local $x)))
+  (func (export "f64.no_fold_div_self") (param $x f64) (result f64)
+    (f64.div (get_local $x) (get_local $x)))
+)
+
+(assert_return_canonical_nan (invoke "f32.no_fold_div_self" (f32.const inf)))
+(assert_return_canonical_nan (invoke "f32.no_fold_div_self" (f32.const nan)))
+(assert_return_canonical_nan (invoke "f32.no_fold_div_self" (f32.const 0.0)))
+(assert_return_canonical_nan (invoke "f32.no_fold_div_self" (f32.const -0.0)))
+(assert_return_canonical_nan (invoke "f64.no_fold_div_self" (f64.const inf)))
+(assert_return_canonical_nan (invoke "f64.no_fold_div_self" (f64.const nan)))
+(assert_return_canonical_nan (invoke "f64.no_fold_div_self" (f64.const 0.0)))
+(assert_return_canonical_nan (invoke "f64.no_fold_div_self" (f64.const -0.0)))
+
 ;; Test that x/3 is not folded to x*(1/3).
 
 (module
@@ -230,7 +248,7 @@
 (assert_return (invoke "f64.no_fold_div_3" (f64.const -0x1.0138bf530a53cp+1007)) (f64.const -0x1.56f6546eb86fbp+1005))
 (assert_return (invoke "f64.no_fold_div_3" (f64.const 0x1.052b87f9d794dp+415)) (f64.const 0x1.5c3a0aa274c67p+413))
 
-;; Test that (x*z)+(y*z) is not folded to (x+y)*z
+;; Test that (x*z)+(y*z) is not folded to (x+y)*z.
 
 (module
   (func (export "f32.no_factor") (param $x f32) (param $y f32) (param $z f32) (result f32)
@@ -250,7 +268,7 @@
 (assert_return (invoke "f64.no_factor" (f64.const -0x1.c4ded58a6f389p-289) (f64.const 0x1.ba6fdef5d59c9p-260) (f64.const -0x1.c1201c0470205p-253)) (f64.const -0x1.841ada2e0f184p-512))
 (assert_return (invoke "f64.no_factor" (f64.const 0x1.9d3688f8e375ap-608) (f64.const 0x1.bf91311588256p-579) (f64.const -0x1.1605a6b5d5ff8p+489)) (f64.const -0x1.e6118ca76af53p-90))
 
-;; Test that (x+y)*z is not folded to (x*z)+(y*z)
+;; Test that (x+y)*z is not folded to (x*z)+(y*z).
 
 (module
   (func (export "f32.no_distribute") (param $x f32) (param $y f32) (param $z f32) (result f32)
@@ -270,7 +288,7 @@
 (assert_return (invoke "f64.no_distribute" (f64.const -0x1.c4ded58a6f389p-289) (f64.const 0x1.ba6fdef5d59c9p-260) (f64.const -0x1.c1201c0470205p-253)) (f64.const -0x1.841ada2e0f183p-512))
 (assert_return (invoke "f64.no_distribute" (f64.const 0x1.9d3688f8e375ap-608) (f64.const 0x1.bf91311588256p-579) (f64.const -0x1.1605a6b5d5ff8p+489)) (f64.const -0x1.e6118ca76af52p-90))
 
-;; Test that x*(y/z) is not folded to (x*y)/z
+;; Test that x*(y/z) is not folded to (x*y)/z.
 
 (module
   (func (export "f32.no_regroup_div_mul") (param $x f32) (param $y f32) (param $z f32) (result f32)
@@ -286,11 +304,11 @@
 (assert_return (invoke "f32.no_regroup_div_mul" (f32.const 0x1.c6ae76p+112) (f32.const 0x1.fc953cp+24) (f32.const -0x1.60b3e8p+71)) (f32.const -0x1.47d0eap+66))
 (assert_return (invoke "f64.no_regroup_div_mul" (f64.const 0x1.3c04b815e30bp-423) (f64.const -0x1.379646fd98127p-119) (f64.const 0x1.bddb158506031p-642)) (f64.const -0x1.b9b3301f2dd2dp+99))
 (assert_return (invoke "f64.no_regroup_div_mul" (f64.const 0x1.46b3a402f86d5p+337) (f64.const 0x1.6fbf1b9e1798dp-447) (f64.const -0x1.bd9704a5a6a06p+797)) (f64.const -0x0p+0))
-(assert_return (invoke "f64.no_regroup_div_mul" (f64.const 0x1.6c9765bb4347fp-479) (f64.const 0x1.a4af42e34a141p+902) (f64.const 0x1.d2dde70eb68f9p-448)) (f64.const infinity))
+(assert_return (invoke "f64.no_regroup_div_mul" (f64.const 0x1.6c9765bb4347fp-479) (f64.const 0x1.a4af42e34a141p+902) (f64.const 0x1.d2dde70eb68f9p-448)) (f64.const inf))
 (assert_return (invoke "f64.no_regroup_div_mul" (f64.const -0x1.706023645be72p+480) (f64.const -0x1.6c229f7d9101dp+611) (f64.const -0x1.4d50fa68d3d9ep+836)) (f64.const -0x1.926fa3cacc651p+255))
 (assert_return (invoke "f64.no_regroup_div_mul" (f64.const 0x1.8cc63d8caf4c7p-599) (f64.const 0x1.8671ac4c35753p-878) (f64.const -0x1.ef35b1695e659p-838)) (f64.const -0x1.38d55f56406dp-639))
 
-;; Test that (x*y)/z is not folded to x*(y/z)
+;; Test that (x*y)/z is not folded to x*(y/z).
 
 (module
   (func (export "f32.no_regroup_mul_div") (param $x f32) (param $y f32) (param $z f32) (result f32)
@@ -303,11 +321,11 @@
 (assert_return (invoke "f32.no_regroup_mul_div" (f32.const -0x1.454738p+91) (f32.const -0x1.b28a66p-115) (f32.const -0x1.f53908p+72)) (f32.const -0x1.1a00e8p-96))
 (assert_return (invoke "f32.no_regroup_mul_div" (f32.const -0x1.6be56ep+16) (f32.const -0x1.b46fc6p-21) (f32.const -0x1.a51df6p-123)) (f32.const -0x1.79225ap+118))
 (assert_return (invoke "f32.no_regroup_mul_div" (f32.const -0x1.c343f8p-94) (f32.const 0x1.e4d906p+73) (f32.const 0x1.be69f8p+68)) (f32.const -0x1.ea1df4p-89))
-(assert_return (invoke "f32.no_regroup_mul_div" (f32.const 0x1.c6ae76p+112) (f32.const 0x1.fc953cp+24) (f32.const -0x1.60b3e8p+71)) (f32.const -infinity))
+(assert_return (invoke "f32.no_regroup_mul_div" (f32.const 0x1.c6ae76p+112) (f32.const 0x1.fc953cp+24) (f32.const -0x1.60b3e8p+71)) (f32.const -inf))
 (assert_return (invoke "f64.no_regroup_mul_div" (f64.const 0x1.3c04b815e30bp-423) (f64.const -0x1.379646fd98127p-119) (f64.const 0x1.bddb158506031p-642)) (f64.const -0x1.b9b3301f2dd2ep+99))
 (assert_return (invoke "f64.no_regroup_mul_div" (f64.const 0x1.46b3a402f86d5p+337) (f64.const 0x1.6fbf1b9e1798dp-447) (f64.const -0x1.bd9704a5a6a06p+797)) (f64.const -0x1.0da0b6328e09p-907))
 (assert_return (invoke "f64.no_regroup_mul_div" (f64.const 0x1.6c9765bb4347fp-479) (f64.const 0x1.a4af42e34a141p+902) (f64.const 0x1.d2dde70eb68f9p-448)) (f64.const 0x1.4886b6d9a9a79p+871))
-(assert_return (invoke "f64.no_regroup_mul_div" (f64.const -0x1.706023645be72p+480) (f64.const -0x1.6c229f7d9101dp+611) (f64.const -0x1.4d50fa68d3d9ep+836)) (f64.const -infinity))
+(assert_return (invoke "f64.no_regroup_mul_div" (f64.const -0x1.706023645be72p+480) (f64.const -0x1.6c229f7d9101dp+611) (f64.const -0x1.4d50fa68d3d9ep+836)) (f64.const -inf))
 (assert_return (invoke "f64.no_regroup_mul_div" (f64.const 0x1.8cc63d8caf4c7p-599) (f64.const 0x1.8671ac4c35753p-878) (f64.const -0x1.ef35b1695e659p-838)) (f64.const -0x0p+0))
 
 ;; Test that x+y+z+w is not reassociated.
@@ -359,18 +377,18 @@
     (f64.div (get_local $x) (f64.const 0.0)))
 )
 
-(assert_return (invoke "f32.no_fold_div_0" (f32.const 1.0)) (f32.const infinity))
-(assert_return (invoke "f32.no_fold_div_0" (f32.const -1.0)) (f32.const -infinity))
-(assert_return (invoke "f32.no_fold_div_0" (f32.const infinity)) (f32.const infinity))
-(assert_return (invoke "f32.no_fold_div_0" (f32.const -infinity)) (f32.const -infinity))
+(assert_return (invoke "f32.no_fold_div_0" (f32.const 1.0)) (f32.const inf))
+(assert_return (invoke "f32.no_fold_div_0" (f32.const -1.0)) (f32.const -inf))
+(assert_return (invoke "f32.no_fold_div_0" (f32.const inf)) (f32.const inf))
+(assert_return (invoke "f32.no_fold_div_0" (f32.const -inf)) (f32.const -inf))
 (assert_return_canonical_nan (invoke "f32.no_fold_div_0" (f32.const 0)))
 (assert_return_canonical_nan (invoke "f32.no_fold_div_0" (f32.const -0)))
 (assert_return_arithmetic_nan (invoke "f32.no_fold_div_0" (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "f32.no_fold_div_0" (f32.const nan)))
-(assert_return (invoke "f64.no_fold_div_0" (f64.const 1.0)) (f64.const infinity))
-(assert_return (invoke "f64.no_fold_div_0" (f64.const -1.0)) (f64.const -infinity))
-(assert_return (invoke "f64.no_fold_div_0" (f64.const infinity)) (f64.const infinity))
-(assert_return (invoke "f64.no_fold_div_0" (f64.const -infinity)) (f64.const -infinity))
+(assert_return (invoke "f64.no_fold_div_0" (f64.const 1.0)) (f64.const inf))
+(assert_return (invoke "f64.no_fold_div_0" (f64.const -1.0)) (f64.const -inf))
+(assert_return (invoke "f64.no_fold_div_0" (f64.const inf)) (f64.const inf))
+(assert_return (invoke "f64.no_fold_div_0" (f64.const -inf)) (f64.const -inf))
 (assert_return_canonical_nan (invoke "f64.no_fold_div_0" (f64.const 0)))
 (assert_return_canonical_nan (invoke "f64.no_fold_div_0" (f64.const -0)))
 (assert_return_canonical_nan (invoke "f64.no_fold_div_0" (f64.const nan)))
@@ -385,18 +403,18 @@
     (f64.div (get_local $x) (f64.const -0.0)))
 )
 
-(assert_return (invoke "f32.no_fold_div_neg0" (f32.const 1.0)) (f32.const -infinity))
-(assert_return (invoke "f32.no_fold_div_neg0" (f32.const -1.0)) (f32.const infinity))
-(assert_return (invoke "f32.no_fold_div_neg0" (f32.const infinity)) (f32.const -infinity))
-(assert_return (invoke "f32.no_fold_div_neg0" (f32.const -infinity)) (f32.const infinity))
+(assert_return (invoke "f32.no_fold_div_neg0" (f32.const 1.0)) (f32.const -inf))
+(assert_return (invoke "f32.no_fold_div_neg0" (f32.const -1.0)) (f32.const inf))
+(assert_return (invoke "f32.no_fold_div_neg0" (f32.const inf)) (f32.const -inf))
+(assert_return (invoke "f32.no_fold_div_neg0" (f32.const -inf)) (f32.const inf))
 (assert_return_canonical_nan (invoke "f32.no_fold_div_neg0" (f32.const 0)))
 (assert_return_canonical_nan (invoke "f32.no_fold_div_neg0" (f32.const -0)))
 (assert_return_arithmetic_nan (invoke "f32.no_fold_div_neg0" (f32.const nan:0x200000)))
 (assert_return_canonical_nan (invoke "f32.no_fold_div_neg0" (f32.const nan)))
-(assert_return (invoke "f64.no_fold_div_neg0" (f64.const 1.0)) (f64.const -infinity))
-(assert_return (invoke "f64.no_fold_div_neg0" (f64.const -1.0)) (f64.const infinity))
-(assert_return (invoke "f64.no_fold_div_neg0" (f64.const infinity)) (f64.const -infinity))
-(assert_return (invoke "f64.no_fold_div_neg0" (f64.const -infinity)) (f64.const infinity))
+(assert_return (invoke "f64.no_fold_div_neg0" (f64.const 1.0)) (f64.const -inf))
+(assert_return (invoke "f64.no_fold_div_neg0" (f64.const -1.0)) (f64.const inf))
+(assert_return (invoke "f64.no_fold_div_neg0" (f64.const inf)) (f64.const -inf))
+(assert_return (invoke "f64.no_fold_div_neg0" (f64.const -inf)) (f64.const inf))
 (assert_return_canonical_nan (invoke "f64.no_fold_div_neg0" (f64.const 0)))
 (assert_return_canonical_nan (invoke "f64.no_fold_div_neg0" (f64.const -0)))
 (assert_return_canonical_nan (invoke "f64.no_fold_div_neg0" (f64.const nan)))
@@ -471,7 +489,7 @@
 (assert_return (invoke "f32.no_approximate_sqrt_reciprocal" (f32.const 0x1.ba4c5p+13)) (f32.const 0x1.136f16p-7))
 (assert_return (invoke "f32.no_approximate_sqrt_reciprocal" (f32.const 0x1.4a5be2p+104)) (f32.const 0x1.c2b5bp-53))
 
-;; Test that converting i32/i64 to f32/f64 and back isn't folded away
+;; Test that converting i32/i64 to f32/f64 and back isn't folded away.
 
 (module
   (func (export "i32.no_fold_f32_s") (param i32) (result i32)
@@ -584,6 +602,18 @@
 (assert_return (invoke "f64.no_fold_div_mul" (f64.const -0x1.e75859d2f0765p-278) (f64.const -0x1.5f19b6ab497f9p+283)) (f64.const -0x1.e75859d2f0764p-278))
 (assert_return (invoke "f64.no_fold_div_mul" (f64.const -0x1.515fe9c3b5f5p+620) (f64.const 0x1.36be869c99f7ap+989)) (f64.const -0x1.515fe9c3b5f4fp+620))
 
+;; Test that x/2*2 is not folded to x.
+
+(module
+  (func (export "f32.no_fold_div2_mul2") (param $x f32) (result f32)
+    (f32.mul (f32.div (get_local $x) (f32.const 2.0)) (f32.const 2.0)))
+  (func (export "f64.no_fold_div2_mul2") (param $x f64) (result f64)
+    (f64.mul (f64.div (get_local $x) (f64.const 2.0)) (f64.const 2.0)))
+)
+
+(assert_return (invoke "f32.no_fold_div2_mul2" (f32.const 0x1.fffffep-126)) (f32.const 0x1p-125))
+(assert_return (invoke "f64.no_fold_div2_mul2" (f64.const 0x1.fffffffffffffp-1022)) (f64.const 0x1p-1021))
+
 ;; Test that promote(demote(x)) is not folded to x.
 
 (module
@@ -616,8 +646,8 @@
 (assert_return (invoke "no_fold_promote_demote" (f32.const -0x1p-126)) (f32.const -0x1p-126))
 (assert_return (invoke "no_fold_promote_demote" (f32.const 0x1.fffffep+127)) (f32.const 0x1.fffffep+127))
 (assert_return (invoke "no_fold_promote_demote" (f32.const -0x1.fffffep+127)) (f32.const -0x1.fffffep+127))
-(assert_return (invoke "no_fold_promote_demote" (f32.const infinity)) (f32.const infinity))
-(assert_return (invoke "no_fold_promote_demote" (f32.const -infinity)) (f32.const -infinity))
+(assert_return (invoke "no_fold_promote_demote" (f32.const inf)) (f32.const inf))
+(assert_return (invoke "no_fold_promote_demote" (f32.const -inf)) (f32.const -inf))
 
 ;; Test that demote(x+promote(y)) is not folded to demote(x)+y.
 
@@ -861,35 +891,35 @@
   (func (export "f64.no_fold_ge_select") (param $x f64) (param $y f64) (result f64) (select (get_local $x) (get_local $y) (f64.ge (get_local $x) (get_local $y))))
 )
 
-(assert_return_canonical_nan (invoke "f32.no_fold_lt_select" (f32.const 0.0) (f32.const nan)))
+(assert_return (invoke "f32.no_fold_lt_select" (f32.const 0.0) (f32.const nan)) (f32.const nan))
 (assert_return (invoke "f32.no_fold_lt_select" (f32.const nan) (f32.const 0.0)) (f32.const 0.0))
 (assert_return (invoke "f32.no_fold_lt_select" (f32.const 0.0) (f32.const -0.0)) (f32.const -0.0))
 (assert_return (invoke "f32.no_fold_lt_select" (f32.const -0.0) (f32.const 0.0)) (f32.const 0.0))
-(assert_return_canonical_nan (invoke "f32.no_fold_le_select" (f32.const 0.0) (f32.const nan)))
+(assert_return (invoke "f32.no_fold_le_select" (f32.const 0.0) (f32.const nan)) (f32.const nan))
 (assert_return (invoke "f32.no_fold_le_select" (f32.const nan) (f32.const 0.0)) (f32.const 0.0))
 (assert_return (invoke "f32.no_fold_le_select" (f32.const 0.0) (f32.const -0.0)) (f32.const 0.0))
 (assert_return (invoke "f32.no_fold_le_select" (f32.const -0.0) (f32.const 0.0)) (f32.const -0.0))
-(assert_return_canonical_nan (invoke "f32.no_fold_gt_select" (f32.const 0.0) (f32.const nan)))
+(assert_return (invoke "f32.no_fold_gt_select" (f32.const 0.0) (f32.const nan)) (f32.const nan))
 (assert_return (invoke "f32.no_fold_gt_select" (f32.const nan) (f32.const 0.0)) (f32.const 0.0))
 (assert_return (invoke "f32.no_fold_gt_select" (f32.const 0.0) (f32.const -0.0)) (f32.const -0.0))
 (assert_return (invoke "f32.no_fold_gt_select" (f32.const -0.0) (f32.const 0.0)) (f32.const 0.0))
-(assert_return_canonical_nan (invoke "f32.no_fold_ge_select" (f32.const 0.0) (f32.const nan)))
+(assert_return (invoke "f32.no_fold_ge_select" (f32.const 0.0) (f32.const nan)) (f32.const nan))
 (assert_return (invoke "f32.no_fold_ge_select" (f32.const nan) (f32.const 0.0)) (f32.const 0.0))
 (assert_return (invoke "f32.no_fold_ge_select" (f32.const 0.0) (f32.const -0.0)) (f32.const 0.0))
 (assert_return (invoke "f32.no_fold_ge_select" (f32.const -0.0) (f32.const 0.0)) (f32.const -0.0))
-(assert_return_canonical_nan (invoke "f64.no_fold_lt_select" (f64.const 0.0) (f64.const nan)))
+(assert_return (invoke "f64.no_fold_lt_select" (f64.const 0.0) (f64.const nan)) (f64.const nan))
 (assert_return (invoke "f64.no_fold_lt_select" (f64.const nan) (f64.const 0.0)) (f64.const 0.0))
 (assert_return (invoke "f64.no_fold_lt_select" (f64.const 0.0) (f64.const -0.0)) (f64.const -0.0))
 (assert_return (invoke "f64.no_fold_lt_select" (f64.const -0.0) (f64.const 0.0)) (f64.const 0.0))
-(assert_return_canonical_nan (invoke "f64.no_fold_le_select" (f64.const 0.0) (f64.const nan)))
+(assert_return (invoke "f64.no_fold_le_select" (f64.const 0.0) (f64.const nan)) (f64.const nan))
 (assert_return (invoke "f64.no_fold_le_select" (f64.const nan) (f64.const 0.0)) (f64.const 0.0))
 (assert_return (invoke "f64.no_fold_le_select" (f64.const 0.0) (f64.const -0.0)) (f64.const 0.0))
 (assert_return (invoke "f64.no_fold_le_select" (f64.const -0.0) (f64.const 0.0)) (f64.const -0.0))
-(assert_return_canonical_nan (invoke "f64.no_fold_gt_select" (f64.const 0.0) (f64.const nan)))
+(assert_return (invoke "f64.no_fold_gt_select" (f64.const 0.0) (f64.const nan)) (f64.const nan))
 (assert_return (invoke "f64.no_fold_gt_select" (f64.const nan) (f64.const 0.0)) (f64.const 0.0))
 (assert_return (invoke "f64.no_fold_gt_select" (f64.const 0.0) (f64.const -0.0)) (f64.const -0.0))
 (assert_return (invoke "f64.no_fold_gt_select" (f64.const -0.0) (f64.const 0.0)) (f64.const 0.0))
-(assert_return_canonical_nan (invoke "f64.no_fold_ge_select" (f64.const 0.0) (f64.const nan)))
+(assert_return (invoke "f64.no_fold_ge_select" (f64.const 0.0) (f64.const nan)) (f64.const nan))
 (assert_return (invoke "f64.no_fold_ge_select" (f64.const nan) (f64.const 0.0)) (f64.const 0.0))
 (assert_return (invoke "f64.no_fold_ge_select" (f64.const 0.0) (f64.const -0.0)) (f64.const 0.0))
 (assert_return (invoke "f64.no_fold_ge_select" (f64.const -0.0) (f64.const 0.0)) (f64.const -0.0))
@@ -897,51 +927,83 @@
 ;; Test that x<y?x:y, etc. using if and else aren't folded to min, etc.
 
 (module
-  (func (export "f32.no_fold_lt_if") (param $x f32) (param $y f32) (result f32) (if f32 (f32.lt (get_local $x) (get_local $y)) (get_local $x) (get_local $y)))
-  (func (export "f32.no_fold_le_if") (param $x f32) (param $y f32) (result f32) (if f32 (f32.le (get_local $x) (get_local $y)) (get_local $x) (get_local $y)))
-  (func (export "f32.no_fold_gt_if") (param $x f32) (param $y f32) (result f32) (if f32 (f32.gt (get_local $x) (get_local $y)) (get_local $x) (get_local $y)))
-  (func (export "f32.no_fold_ge_if") (param $x f32) (param $y f32) (result f32) (if f32 (f32.ge (get_local $x) (get_local $y)) (get_local $x) (get_local $y)))
+  (func (export "f32.no_fold_lt_if") (param $x f32) (param $y f32) (result f32)
+    (if (result f32) (f32.lt (get_local $x) (get_local $y))
+      (then (get_local $x)) (else (get_local $y))
+    )
+  )
+  (func (export "f32.no_fold_le_if") (param $x f32) (param $y f32) (result f32)
+    (if (result f32) (f32.le (get_local $x) (get_local $y))
+      (then (get_local $x)) (else (get_local $y))
+    )
+  )
+  (func (export "f32.no_fold_gt_if") (param $x f32) (param $y f32) (result f32)
+    (if (result f32) (f32.gt (get_local $x) (get_local $y))
+      (then (get_local $x)) (else (get_local $y))
+    )
+  )
+  (func (export "f32.no_fold_ge_if") (param $x f32) (param $y f32) (result f32)
+    (if (result f32) (f32.ge (get_local $x) (get_local $y))
+      (then (get_local $x)) (else (get_local $y))
+    )
+  )
 
-  (func (export "f64.no_fold_lt_if") (param $x f64) (param $y f64) (result f64) (if f64 (f64.lt (get_local $x) (get_local $y)) (get_local $x) (get_local $y)))
-  (func (export "f64.no_fold_le_if") (param $x f64) (param $y f64) (result f64) (if f64 (f64.le (get_local $x) (get_local $y)) (get_local $x) (get_local $y)))
-  (func (export "f64.no_fold_gt_if") (param $x f64) (param $y f64) (result f64) (if f64 (f64.gt (get_local $x) (get_local $y)) (get_local $x) (get_local $y)))
-  (func (export "f64.no_fold_ge_if") (param $x f64) (param $y f64) (result f64) (if f64 (f64.ge (get_local $x) (get_local $y)) (get_local $x) (get_local $y)))
+  (func (export "f64.no_fold_lt_if") (param $x f64) (param $y f64) (result f64)
+    (if (result f64) (f64.lt (get_local $x) (get_local $y))
+      (then (get_local $x)) (else (get_local $y))
+    )
+  )
+  (func (export "f64.no_fold_le_if") (param $x f64) (param $y f64) (result f64)
+    (if (result f64) (f64.le (get_local $x) (get_local $y))
+      (then (get_local $x)) (else (get_local $y))
+    )
+  )
+  (func (export "f64.no_fold_gt_if") (param $x f64) (param $y f64) (result f64)
+    (if (result f64) (f64.gt (get_local $x) (get_local $y))
+      (then (get_local $x)) (else (get_local $y))
+    )
+  )
+  (func (export "f64.no_fold_ge_if") (param $x f64) (param $y f64) (result f64)
+    (if (result f64) (f64.ge (get_local $x) (get_local $y))
+      (then (get_local $x)) (else (get_local $y))
+    )
+  )
 )
 
-(assert_return_canonical_nan (invoke "f32.no_fold_lt_if" (f32.const 0.0) (f32.const nan)))
+(assert_return (invoke "f32.no_fold_lt_if" (f32.const 0.0) (f32.const nan)) (f32.const nan))
 (assert_return (invoke "f32.no_fold_lt_if" (f32.const nan) (f32.const 0.0)) (f32.const 0.0))
 (assert_return (invoke "f32.no_fold_lt_if" (f32.const 0.0) (f32.const -0.0)) (f32.const -0.0))
 (assert_return (invoke "f32.no_fold_lt_if" (f32.const -0.0) (f32.const 0.0)) (f32.const 0.0))
-(assert_return_canonical_nan (invoke "f32.no_fold_le_if" (f32.const 0.0) (f32.const nan)))
+(assert_return (invoke "f32.no_fold_le_if" (f32.const 0.0) (f32.const nan)) (f32.const nan))
 (assert_return (invoke "f32.no_fold_le_if" (f32.const nan) (f32.const 0.0)) (f32.const 0.0))
 (assert_return (invoke "f32.no_fold_le_if" (f32.const 0.0) (f32.const -0.0)) (f32.const 0.0))
 (assert_return (invoke "f32.no_fold_le_if" (f32.const -0.0) (f32.const 0.0)) (f32.const -0.0))
-(assert_return_canonical_nan (invoke "f32.no_fold_gt_if" (f32.const 0.0) (f32.const nan)))
+(assert_return (invoke "f32.no_fold_gt_if" (f32.const 0.0) (f32.const nan)) (f32.const nan))
 (assert_return (invoke "f32.no_fold_gt_if" (f32.const nan) (f32.const 0.0)) (f32.const 0.0))
 (assert_return (invoke "f32.no_fold_gt_if" (f32.const 0.0) (f32.const -0.0)) (f32.const -0.0))
 (assert_return (invoke "f32.no_fold_gt_if" (f32.const -0.0) (f32.const 0.0)) (f32.const 0.0))
-(assert_return_canonical_nan (invoke "f32.no_fold_ge_if" (f32.const 0.0) (f32.const nan)))
+(assert_return (invoke "f32.no_fold_ge_if" (f32.const 0.0) (f32.const nan)) (f32.const nan))
 (assert_return (invoke "f32.no_fold_ge_if" (f32.const nan) (f32.const 0.0)) (f32.const 0.0))
 (assert_return (invoke "f32.no_fold_ge_if" (f32.const 0.0) (f32.const -0.0)) (f32.const 0.0))
 (assert_return (invoke "f32.no_fold_ge_if" (f32.const -0.0) (f32.const 0.0)) (f32.const -0.0))
-(assert_return_canonical_nan (invoke "f64.no_fold_lt_if" (f64.const 0.0) (f64.const nan)))
+(assert_return (invoke "f64.no_fold_lt_if" (f64.const 0.0) (f64.const nan)) (f64.const nan))
 (assert_return (invoke "f64.no_fold_lt_if" (f64.const nan) (f64.const 0.0)) (f64.const 0.0))
 (assert_return (invoke "f64.no_fold_lt_if" (f64.const 0.0) (f64.const -0.0)) (f64.const -0.0))
 (assert_return (invoke "f64.no_fold_lt_if" (f64.const -0.0) (f64.const 0.0)) (f64.const 0.0))
-(assert_return_canonical_nan (invoke "f64.no_fold_le_if" (f64.const 0.0) (f64.const nan)))
+(assert_return (invoke "f64.no_fold_le_if" (f64.const 0.0) (f64.const nan)) (f64.const nan))
 (assert_return (invoke "f64.no_fold_le_if" (f64.const nan) (f64.const 0.0)) (f64.const 0.0))
 (assert_return (invoke "f64.no_fold_le_if" (f64.const 0.0) (f64.const -0.0)) (f64.const 0.0))
 (assert_return (invoke "f64.no_fold_le_if" (f64.const -0.0) (f64.const 0.0)) (f64.const -0.0))
-(assert_return_canonical_nan (invoke "f64.no_fold_gt_if" (f64.const 0.0) (f64.const nan)))
+(assert_return (invoke "f64.no_fold_gt_if" (f64.const 0.0) (f64.const nan)) (f64.const nan))
 (assert_return (invoke "f64.no_fold_gt_if" (f64.const nan) (f64.const 0.0)) (f64.const 0.0))
 (assert_return (invoke "f64.no_fold_gt_if" (f64.const 0.0) (f64.const -0.0)) (f64.const -0.0))
 (assert_return (invoke "f64.no_fold_gt_if" (f64.const -0.0) (f64.const 0.0)) (f64.const 0.0))
-(assert_return_canonical_nan (invoke "f64.no_fold_ge_if" (f64.const 0.0) (f64.const nan)))
+(assert_return (invoke "f64.no_fold_ge_if" (f64.const 0.0) (f64.const nan)) (f64.const nan))
 (assert_return (invoke "f64.no_fold_ge_if" (f64.const nan) (f64.const 0.0)) (f64.const 0.0))
 (assert_return (invoke "f64.no_fold_ge_if" (f64.const 0.0) (f64.const -0.0)) (f64.const 0.0))
 (assert_return (invoke "f64.no_fold_ge_if" (f64.const -0.0) (f64.const 0.0)) (f64.const -0.0))
 
-;; Test that x<0?-x:0, etc. using select aren't folded to abs
+;; Test that x<0?-x:x, etc. using select aren't folded to abs.
 
 (module
   (func (export "f32.no_fold_lt_select_to_abs") (param $x f32) (result f32) (select (f32.neg (get_local $x)) (get_local $x) (f32.lt (get_local $x) (f32.const 0.0))))
@@ -955,83 +1017,115 @@
   (func (export "f64.no_fold_ge_select_to_abs") (param $x f64) (result f64) (select (get_local $x) (f64.neg (get_local $x)) (f64.ge (get_local $x) (f64.const 0.0))))
 )
 
-(assert_return_arithmetic_nan (invoke "f32.no_fold_lt_select_to_abs" (f32.const nan:0x200000)))
-(assert_return_canonical_nan (invoke "f32.no_fold_lt_select_to_abs" (f32.const -nan)))
+(assert_return (invoke "f32.no_fold_lt_select_to_abs" (f32.const nan:0x200000)) (f32.const nan:0x200000))
+(assert_return (invoke "f32.no_fold_lt_select_to_abs" (f32.const -nan)) (f32.const -nan))
 (assert_return (invoke "f32.no_fold_lt_select_to_abs" (f32.const 0.0)) (f32.const 0.0))
 (assert_return (invoke "f32.no_fold_lt_select_to_abs" (f32.const -0.0)) (f32.const -0.0))
-(assert_return_arithmetic_nan (invoke "f32.no_fold_le_select_to_abs" (f32.const nan:0x200000)))
-(assert_return_canonical_nan (invoke "f32.no_fold_le_select_to_abs" (f32.const -nan)))
+(assert_return (invoke "f32.no_fold_le_select_to_abs" (f32.const nan:0x200000)) (f32.const nan:0x200000))
+(assert_return (invoke "f32.no_fold_le_select_to_abs" (f32.const -nan))(f32.const -nan))
 (assert_return (invoke "f32.no_fold_le_select_to_abs" (f32.const 0.0)) (f32.const -0.0))
 (assert_return (invoke "f32.no_fold_le_select_to_abs" (f32.const -0.0)) (f32.const 0.0))
-(assert_return_arithmetic_nan (invoke "f32.no_fold_gt_select_to_abs" (f32.const nan:0x200000)))
-(assert_return_canonical_nan (invoke "f32.no_fold_gt_select_to_abs" (f32.const -nan)))
+(assert_return (invoke "f32.no_fold_gt_select_to_abs" (f32.const nan:0x200000)) (f32.const -nan:0x200000))
+(assert_return (invoke "f32.no_fold_gt_select_to_abs" (f32.const -nan)) (f32.const nan))
 (assert_return (invoke "f32.no_fold_gt_select_to_abs" (f32.const 0.0)) (f32.const -0.0))
 (assert_return (invoke "f32.no_fold_gt_select_to_abs" (f32.const -0.0)) (f32.const 0.0))
-(assert_return_arithmetic_nan (invoke "f32.no_fold_ge_select_to_abs" (f32.const nan:0x200000)))
-(assert_return_canonical_nan (invoke "f32.no_fold_ge_select_to_abs" (f32.const -nan)))
+(assert_return (invoke "f32.no_fold_ge_select_to_abs" (f32.const nan:0x200000)) (f32.const -nan:0x200000))
+(assert_return (invoke "f32.no_fold_ge_select_to_abs" (f32.const -nan)) (f32.const nan))
 (assert_return (invoke "f32.no_fold_ge_select_to_abs" (f32.const 0.0)) (f32.const 0.0))
 (assert_return (invoke "f32.no_fold_ge_select_to_abs" (f32.const -0.0)) (f32.const -0.0))
-(assert_return_arithmetic_nan (invoke "f64.no_fold_lt_select_to_abs" (f64.const nan:0x4000000000000)))
-(assert_return_canonical_nan (invoke "f64.no_fold_lt_select_to_abs" (f64.const -nan)))
+(assert_return (invoke "f64.no_fold_lt_select_to_abs" (f64.const nan:0x4000000000000)) (f64.const nan:0x4000000000000))
+(assert_return (invoke "f64.no_fold_lt_select_to_abs" (f64.const -nan)) (f64.const -nan))
 (assert_return (invoke "f64.no_fold_lt_select_to_abs" (f64.const 0.0)) (f64.const 0.0))
 (assert_return (invoke "f64.no_fold_lt_select_to_abs" (f64.const -0.0)) (f64.const -0.0))
-(assert_return_arithmetic_nan (invoke "f64.no_fold_le_select_to_abs" (f64.const nan:0x4000000000000)))
-(assert_return_canonical_nan (invoke "f64.no_fold_le_select_to_abs" (f64.const -nan)))
+(assert_return (invoke "f64.no_fold_le_select_to_abs" (f64.const nan:0x4000000000000)) (f64.const nan:0x4000000000000))
+(assert_return (invoke "f64.no_fold_le_select_to_abs" (f64.const -nan)) (f64.const -nan))
 (assert_return (invoke "f64.no_fold_le_select_to_abs" (f64.const 0.0)) (f64.const -0.0))
 (assert_return (invoke "f64.no_fold_le_select_to_abs" (f64.const -0.0)) (f64.const 0.0))
-(assert_return_arithmetic_nan (invoke "f64.no_fold_gt_select_to_abs" (f64.const nan:0x4000000000000)))
-(assert_return_canonical_nan (invoke "f64.no_fold_gt_select_to_abs" (f64.const -nan)))
+(assert_return (invoke "f64.no_fold_gt_select_to_abs" (f64.const nan:0x4000000000000)) (f64.const -nan:0x4000000000000))
+(assert_return (invoke "f64.no_fold_gt_select_to_abs" (f64.const -nan)) (f64.const nan))
 (assert_return (invoke "f64.no_fold_gt_select_to_abs" (f64.const 0.0)) (f64.const -0.0))
 (assert_return (invoke "f64.no_fold_gt_select_to_abs" (f64.const -0.0)) (f64.const 0.0))
-(assert_return_arithmetic_nan (invoke "f64.no_fold_ge_select_to_abs" (f64.const nan:0x4000000000000)))
-(assert_return_canonical_nan (invoke "f64.no_fold_ge_select_to_abs" (f64.const -nan)))
+(assert_return (invoke "f64.no_fold_ge_select_to_abs" (f64.const nan:0x4000000000000)) (f64.const -nan:0x4000000000000))
+(assert_return (invoke "f64.no_fold_ge_select_to_abs" (f64.const -nan)) (f64.const nan))
 (assert_return (invoke "f64.no_fold_ge_select_to_abs" (f64.const 0.0)) (f64.const 0.0))
 (assert_return (invoke "f64.no_fold_ge_select_to_abs" (f64.const -0.0)) (f64.const -0.0))
 
-;; Test that x<0?-x:0, etc. using if aren't folded to abs
+;; Test that x<0?-x:x, etc. using if aren't folded to abs.
 
 (module
-  (func (export "f32.no_fold_lt_if_to_abs") (param $x f32) (result f32) (if f32 (f32.lt (get_local $x) (f32.const 0.0)) (f32.neg (get_local $x)) (get_local $x)))
-  (func (export "f32.no_fold_le_if_to_abs") (param $x f32) (result f32) (if f32 (f32.le (get_local $x) (f32.const -0.0)) (f32.neg (get_local $x)) (get_local $x)))
-  (func (export "f32.no_fold_gt_if_to_abs") (param $x f32) (result f32) (if f32 (f32.gt (get_local $x) (f32.const -0.0)) (get_local $x) (f32.neg (get_local $x))))
-  (func (export "f32.no_fold_ge_if_to_abs") (param $x f32) (result f32) (if f32 (f32.ge (get_local $x) (f32.const 0.0)) (get_local $x) (f32.neg (get_local $x))))
+  (func (export "f32.no_fold_lt_if_to_abs") (param $x f32) (result f32)
+    (if (result f32) (f32.lt (get_local $x) (f32.const 0.0))
+      (then (f32.neg (get_local $x))) (else (get_local $x))
+    )
+  )
+  (func (export "f32.no_fold_le_if_to_abs") (param $x f32) (result f32)
+    (if (result f32) (f32.le (get_local $x) (f32.const -0.0))
+      (then (f32.neg (get_local $x))) (else (get_local $x))
+    )
+  )
+  (func (export "f32.no_fold_gt_if_to_abs") (param $x f32) (result f32)
+    (if (result f32) (f32.gt (get_local $x) (f32.const -0.0))
+      (then (get_local $x)) (else (f32.neg (get_local $x)))
+    )
+  )
+  (func (export "f32.no_fold_ge_if_to_abs") (param $x f32) (result f32)
+    (if (result f32) (f32.ge (get_local $x) (f32.const 0.0))
+      (then (get_local $x)) (else (f32.neg (get_local $x)))
+    )
+  )
 
-  (func (export "f64.no_fold_lt_if_to_abs") (param $x f64) (result f64) (if f64 (f64.lt (get_local $x) (f64.const 0.0)) (f64.neg (get_local $x)) (get_local $x)))
-  (func (export "f64.no_fold_le_if_to_abs") (param $x f64) (result f64) (if f64 (f64.le (get_local $x) (f64.const -0.0)) (f64.neg (get_local $x)) (get_local $x)))
-  (func (export "f64.no_fold_gt_if_to_abs") (param $x f64) (result f64) (if f64 (f64.gt (get_local $x) (f64.const -0.0)) (get_local $x) (f64.neg (get_local $x))))
-  (func (export "f64.no_fold_ge_if_to_abs") (param $x f64) (result f64) (if f64 (f64.ge (get_local $x) (f64.const 0.0)) (get_local $x) (f64.neg (get_local $x))))
+  (func (export "f64.no_fold_lt_if_to_abs") (param $x f64) (result f64)
+    (if (result f64) (f64.lt (get_local $x) (f64.const 0.0))
+      (then (f64.neg (get_local $x))) (else (get_local $x))
+    )
+  )
+  (func (export "f64.no_fold_le_if_to_abs") (param $x f64) (result f64)
+    (if (result f64) (f64.le (get_local $x) (f64.const -0.0))
+      (then (f64.neg (get_local $x))) (else (get_local $x))
+    )
+  )
+  (func (export "f64.no_fold_gt_if_to_abs") (param $x f64) (result f64)
+    (if (result f64) (f64.gt (get_local $x) (f64.const -0.0))
+      (then (get_local $x)) (else (f64.neg (get_local $x)))
+    )
+  )
+  (func (export "f64.no_fold_ge_if_to_abs") (param $x f64) (result f64)
+    (if (result f64) (f64.ge (get_local $x) (f64.const 0.0))
+      (then (get_local $x)) (else (f64.neg (get_local $x)))
+    )
+  )
 )
 
-(assert_return_arithmetic_nan (invoke "f32.no_fold_lt_if_to_abs" (f32.const nan:0x200000)))
-(assert_return_canonical_nan (invoke "f32.no_fold_lt_if_to_abs" (f32.const -nan)))
+(assert_return (invoke "f32.no_fold_lt_if_to_abs" (f32.const nan:0x200000)) (f32.const nan:0x200000))
+(assert_return (invoke "f32.no_fold_lt_if_to_abs" (f32.const -nan)) (f32.const -nan))
 (assert_return (invoke "f32.no_fold_lt_if_to_abs" (f32.const 0.0)) (f32.const 0.0))
 (assert_return (invoke "f32.no_fold_lt_if_to_abs" (f32.const -0.0)) (f32.const -0.0))
-(assert_return_arithmetic_nan (invoke "f32.no_fold_le_if_to_abs" (f32.const nan:0x200000)))
-(assert_return_canonical_nan (invoke "f32.no_fold_le_if_to_abs" (f32.const -nan)))
+(assert_return (invoke "f32.no_fold_le_if_to_abs" (f32.const nan:0x200000)) (f32.const nan:0x200000))
+(assert_return (invoke "f32.no_fold_le_if_to_abs" (f32.const -nan)) (f32.const -nan))
 (assert_return (invoke "f32.no_fold_le_if_to_abs" (f32.const 0.0)) (f32.const -0.0))
 (assert_return (invoke "f32.no_fold_le_if_to_abs" (f32.const -0.0)) (f32.const 0.0))
-(assert_return_arithmetic_nan (invoke "f32.no_fold_gt_if_to_abs" (f32.const nan:0x200000)))
-(assert_return_canonical_nan (invoke "f32.no_fold_gt_if_to_abs" (f32.const -nan)))
+(assert_return (invoke "f32.no_fold_gt_if_to_abs" (f32.const nan:0x200000)) (f32.const -nan:0x200000))
+(assert_return (invoke "f32.no_fold_gt_if_to_abs" (f32.const -nan)) (f32.const nan))
 (assert_return (invoke "f32.no_fold_gt_if_to_abs" (f32.const 0.0)) (f32.const -0.0))
 (assert_return (invoke "f32.no_fold_gt_if_to_abs" (f32.const -0.0)) (f32.const 0.0))
-(assert_return_arithmetic_nan (invoke "f32.no_fold_ge_if_to_abs" (f32.const nan:0x200000)))
-(assert_return_canonical_nan (invoke "f32.no_fold_ge_if_to_abs" (f32.const -nan)))
+(assert_return (invoke "f32.no_fold_ge_if_to_abs" (f32.const nan:0x200000)) (f32.const -nan:0x200000))
+(assert_return (invoke "f32.no_fold_ge_if_to_abs" (f32.const -nan)) (f32.const nan))
 (assert_return (invoke "f32.no_fold_ge_if_to_abs" (f32.const 0.0)) (f32.const 0.0))
 (assert_return (invoke "f32.no_fold_ge_if_to_abs" (f32.const -0.0)) (f32.const -0.0))
-(assert_return_arithmetic_nan (invoke "f64.no_fold_lt_if_to_abs" (f64.const nan:0x4000000000000)))
-(assert_return_canonical_nan (invoke "f64.no_fold_lt_if_to_abs" (f64.const -nan)))
+(assert_return (invoke "f64.no_fold_lt_if_to_abs" (f64.const nan:0x4000000000000)) (f64.const nan:0x4000000000000))
+(assert_return (invoke "f64.no_fold_lt_if_to_abs" (f64.const -nan)) (f64.const -nan))
 (assert_return (invoke "f64.no_fold_lt_if_to_abs" (f64.const 0.0)) (f64.const 0.0))
 (assert_return (invoke "f64.no_fold_lt_if_to_abs" (f64.const -0.0)) (f64.const -0.0))
-(assert_return_arithmetic_nan (invoke "f64.no_fold_le_if_to_abs" (f64.const nan:0x4000000000000)))
-(assert_return_canonical_nan (invoke "f64.no_fold_le_if_to_abs" (f64.const -nan)))
+(assert_return (invoke "f64.no_fold_le_if_to_abs" (f64.const nan:0x4000000000000)) (f64.const nan:0x4000000000000))
+(assert_return (invoke "f64.no_fold_le_if_to_abs" (f64.const -nan)) (f64.const -nan))
 (assert_return (invoke "f64.no_fold_le_if_to_abs" (f64.const 0.0)) (f64.const -0.0))
 (assert_return (invoke "f64.no_fold_le_if_to_abs" (f64.const -0.0)) (f64.const 0.0))
-(assert_return_arithmetic_nan (invoke "f64.no_fold_gt_if_to_abs" (f64.const nan:0x4000000000000)))
-(assert_return_canonical_nan (invoke "f64.no_fold_gt_if_to_abs" (f64.const -nan)))
+(assert_return (invoke "f64.no_fold_gt_if_to_abs" (f64.const nan:0x4000000000000)) (f64.const -nan:0x4000000000000))
+(assert_return (invoke "f64.no_fold_gt_if_to_abs" (f64.const -nan)) (f64.const nan))
 (assert_return (invoke "f64.no_fold_gt_if_to_abs" (f64.const 0.0)) (f64.const -0.0))
 (assert_return (invoke "f64.no_fold_gt_if_to_abs" (f64.const -0.0)) (f64.const 0.0))
-(assert_return_arithmetic_nan (invoke "f64.no_fold_ge_if_to_abs" (f64.const nan:0x4000000000000)))
-(assert_return_canonical_nan (invoke "f64.no_fold_ge_if_to_abs" (f64.const -nan)))
+(assert_return (invoke "f64.no_fold_ge_if_to_abs" (f64.const nan:0x4000000000000)) (f64.const -nan:0x4000000000000))
+(assert_return (invoke "f64.no_fold_ge_if_to_abs" (f64.const -nan)) (f64.const nan))
 (assert_return (invoke "f64.no_fold_ge_if_to_abs" (f64.const 0.0)) (f64.const 0.0))
 (assert_return (invoke "f64.no_fold_ge_if_to_abs" (f64.const -0.0)) (f64.const -0.0))
 
@@ -1039,20 +1133,16 @@
 ;; https://support.microsoft.com/en-us/kb/78113
 
 (module
-  (func (export "incorrect_correction") (result f32)
+  (func (export "f32.incorrect_correction") (result f32)
     (f32.sub (f32.sub (f32.add (f32.const 1.333) (f32.const 1.225)) (f32.const 1.333)) (f32.const 1.225))
   )
-)
-
-(assert_return (invoke "incorrect_correction") (f32.const 0x1p-23))
-
-(module
-  (func (export "incorrect_correction") (result f64)
+  (func (export "f64.incorrect_correction") (result f64)
     (f64.sub (f64.sub (f64.add (f64.const 1.333) (f64.const 1.225)) (f64.const 1.333)) (f64.const 1.225))
   )
 )
 
-(assert_return (invoke "incorrect_correction") (f64.const -0x1p-52))
+(assert_return (invoke "f32.incorrect_correction") (f32.const 0x1p-23))
+(assert_return (invoke "f64.incorrect_correction") (f64.const -0x1p-52))
 
 ;; Test for a historical calculator bug.
 ;; http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/articles.cgi?read=735
@@ -1200,8 +1290,8 @@
 
 (assert_return (invoke "f32.no_fold_recip_recip" (f32.const -0x0p+0)) (f32.const -0x0p+0))
 (assert_return (invoke "f32.no_fold_recip_recip" (f32.const 0x0p+0)) (f32.const 0x0p+0))
-(assert_return (invoke "f32.no_fold_recip_recip" (f32.const -infinity)) (f32.const -infinity))
-(assert_return (invoke "f32.no_fold_recip_recip" (f32.const infinity)) (f32.const infinity))
+(assert_return (invoke "f32.no_fold_recip_recip" (f32.const -inf)) (f32.const -inf))
+(assert_return (invoke "f32.no_fold_recip_recip" (f32.const inf)) (f32.const inf))
 
 (assert_return (invoke "f64.no_fold_recip_recip" (f64.const -0x1.d81248dda63dp+148)) (f64.const -0x1.d81248dda63d1p+148))
 (assert_return (invoke "f64.no_fold_recip_recip" (f64.const -0x1.f4750312039e3p+66)) (f64.const -0x1.f4750312039e2p+66))
@@ -1211,8 +1301,8 @@
 
 (assert_return (invoke "f64.no_fold_recip_recip" (f64.const -0x0p+0)) (f64.const -0x0p+0))
 (assert_return (invoke "f64.no_fold_recip_recip" (f64.const 0x0p+0)) (f64.const 0x0p+0))
-(assert_return (invoke "f64.no_fold_recip_recip" (f64.const -infinity)) (f64.const -infinity))
-(assert_return (invoke "f64.no_fold_recip_recip" (f64.const infinity)) (f64.const infinity))
+(assert_return (invoke "f64.no_fold_recip_recip" (f64.const -inf)) (f64.const -inf))
+(assert_return (invoke "f64.no_fold_recip_recip" (f64.const inf)) (f64.const inf))
 
 ;; Test that (x+y) * (x-y) is not optimized to x*x - y*y.
 
@@ -1262,6 +1352,87 @@
 (assert_return (invoke "f64.no_algebraic_factoring" (f64.const -0x1.be663e4c0e4b2p+182) (f64.const -0x1.da85703760d25p+166)) (f64.const 0x1.853434f1a2ffep+365))
 (assert_return (invoke "f64.no_algebraic_factoring" (f64.const -0x1.230e09952df1cp-236) (f64.const -0x1.fa2752adfadc9p-237)) (f64.const 0x1.42e43156bd1b8p-474))
 
+;; Test that platforms where SIMD instructions flush subnormals don't implicitly
+;; optimize using SIMD instructions.
+
+(module
+  (memory (data
+    "\01\00\00\00\01\00\00\80\01\00\00\00\01\00\00\80"
+    "\01\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00"
+    "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
+  ))
+
+  (func (export "f32.simple_x4_sum")
+    (param $i i32)
+    (param $j i32)
+    (param $k i32)
+    (local $x0 f32) (local $x1 f32) (local $x2 f32) (local $x3 f32)
+    (local $y0 f32) (local $y1 f32) (local $y2 f32) (local $y3 f32)
+    (set_local $x0 (f32.load offset=0 (get_local $i)))
+    (set_local $x1 (f32.load offset=4 (get_local $i)))
+    (set_local $x2 (f32.load offset=8 (get_local $i)))
+    (set_local $x3 (f32.load offset=12 (get_local $i)))
+    (set_local $y0 (f32.load offset=0 (get_local $j)))
+    (set_local $y1 (f32.load offset=4 (get_local $j)))
+    (set_local $y2 (f32.load offset=8 (get_local $j)))
+    (set_local $y3 (f32.load offset=12 (get_local $j)))
+    (f32.store offset=0 (get_local $k) (f32.add (get_local $x0) (get_local $y0)))
+    (f32.store offset=4 (get_local $k) (f32.add (get_local $x1) (get_local $y1)))
+    (f32.store offset=8 (get_local $k) (f32.add (get_local $x2) (get_local $y2)))
+    (f32.store offset=12 (get_local $k) (f32.add (get_local $x3) (get_local $y3)))
+  )
+
+  (func (export "f32.load")
+    (param $k i32) (result f32)
+    (f32.load (get_local $k))
+  )
+)
+
+(assert_return (invoke "f32.simple_x4_sum" (i32.const 0) (i32.const 16) (i32.const 32)))
+(assert_return (invoke "f32.load" (i32.const 32)) (f32.const 0x1p-148))
+(assert_return (invoke "f32.load" (i32.const 36)) (f32.const 0x0p+0))
+(assert_return (invoke "f32.load" (i32.const 40)) (f32.const 0x1p-149))
+(assert_return (invoke "f32.load" (i32.const 44)) (f32.const -0x1p-149))
+
+(module
+  (memory (data
+    "\01\00\00\00\00\00\00\00\01\00\00\00\00\00\00\80\01\00\00\00\00\00\00\00\01\00\00\00\00\00\00\80"
+    "\01\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
+    "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
+  ))
+
+  (func (export "f64.simple_x4_sum")
+    (param $i i32)
+    (param $j i32)
+    (param $k i32)
+    (local $x0 f64) (local $x1 f64) (local $x2 f64) (local $x3 f64)
+    (local $y0 f64) (local $y1 f64) (local $y2 f64) (local $y3 f64)
+    (set_local $x0 (f64.load offset=0 (get_local $i)))
+    (set_local $x1 (f64.load offset=8 (get_local $i)))
+    (set_local $x2 (f64.load offset=16 (get_local $i)))
+    (set_local $x3 (f64.load offset=24 (get_local $i)))
+    (set_local $y0 (f64.load offset=0 (get_local $j)))
+    (set_local $y1 (f64.load offset=8 (get_local $j)))
+    (set_local $y2 (f64.load offset=16 (get_local $j)))
+    (set_local $y3 (f64.load offset=24 (get_local $j)))
+    (f64.store offset=0 (get_local $k) (f64.add (get_local $x0) (get_local $y0)))
+    (f64.store offset=8 (get_local $k) (f64.add (get_local $x1) (get_local $y1)))
+    (f64.store offset=16 (get_local $k) (f64.add (get_local $x2) (get_local $y2)))
+    (f64.store offset=24 (get_local $k) (f64.add (get_local $x3) (get_local $y3)))
+  )
+
+  (func (export "f64.load")
+    (param $k i32) (result f64)
+    (f64.load (get_local $k))
+  )
+)
+
+(assert_return (invoke "f64.simple_x4_sum" (i32.const 0) (i32.const 32) (i32.const 64)))
+(assert_return (invoke "f64.load" (i32.const 64)) (f64.const 0x0.0000000000001p-1021))
+(assert_return (invoke "f64.load" (i32.const 72)) (f64.const 0x0p+0))
+(assert_return (invoke "f64.load" (i32.const 80)) (f64.const 0x0.0000000000001p-1022))
+(assert_return (invoke "f64.load" (i32.const 88)) (f64.const -0x0.0000000000001p-1022))
+
 ;; Test that plain summation is not reassociated, and that Kahan summation
 ;; isn't optimized into plain summation.
 
@@ -1430,6 +1601,46 @@
 (assert_return (invoke "f64.no_fold_neg_sub" (f64.const -0.0) (f64.const 0.0)) (f64.const 0.0))
 (assert_return (invoke "f64.no_fold_neg_sub" (f64.const 0.0) (f64.const 0.0)) (f64.const -0.0))
 
+;; Test that -(x + y) is not folded to (-x + -y).
+
+(module
+  (func (export "f32.no_fold_neg_add") (param $x f32) (param $y f32) (result f32)
+    (f32.neg (f32.add (get_local $x) (get_local $y))))
+
+  (func (export "f64.no_fold_neg_add") (param $x f64) (param $y f64) (result f64)
+    (f64.neg (f64.add (get_local $x) (get_local $y))))
+)
+
+(assert_return (invoke "f32.no_fold_neg_add" (f32.const -0.0) (f32.const -0.0)) (f32.const 0.0))
+(assert_return (invoke "f32.no_fold_neg_add" (f32.const 0.0) (f32.const -0.0)) (f32.const -0.0))
+(assert_return (invoke "f32.no_fold_neg_add" (f32.const -0.0) (f32.const 0.0)) (f32.const -0.0))
+(assert_return (invoke "f32.no_fold_neg_add" (f32.const 0.0) (f32.const 0.0)) (f32.const -0.0))
+
+(assert_return (invoke "f64.no_fold_neg_add" (f64.const -0.0) (f64.const -0.0)) (f64.const 0.0))
+(assert_return (invoke "f64.no_fold_neg_add" (f64.const 0.0) (f64.const -0.0)) (f64.const -0.0))
+(assert_return (invoke "f64.no_fold_neg_add" (f64.const -0.0) (f64.const 0.0)) (f64.const -0.0))
+(assert_return (invoke "f64.no_fold_neg_add" (f64.const 0.0) (f64.const 0.0)) (f64.const -0.0))
+
+;; Test that (-x + -y) is not folded to -(x + y).
+
+(module
+  (func (export "f32.no_fold_add_neg_neg") (param $x f32) (param $y f32) (result f32)
+    (f32.add (f32.neg (get_local $x)) (f32.neg (get_local $y))))
+
+  (func (export "f64.no_fold_add_neg_neg") (param $x f64) (param $y f64) (result f64)
+    (f64.add (f64.neg (get_local $x)) (f64.neg (get_local $y))))
+)
+
+(assert_return (invoke "f32.no_fold_add_neg_neg" (f32.const -0.0) (f32.const -0.0)) (f32.const 0.0))
+(assert_return (invoke "f32.no_fold_add_neg_neg" (f32.const 0.0) (f32.const -0.0)) (f32.const 0.0))
+(assert_return (invoke "f32.no_fold_add_neg_neg" (f32.const -0.0) (f32.const 0.0)) (f32.const 0.0))
+(assert_return (invoke "f32.no_fold_add_neg_neg" (f32.const 0.0) (f32.const 0.0)) (f32.const -0.0))
+
+(assert_return (invoke "f64.no_fold_add_neg_neg" (f64.const -0.0) (f64.const -0.0)) (f64.const 0.0))
+(assert_return (invoke "f64.no_fold_add_neg_neg" (f64.const 0.0) (f64.const -0.0)) (f64.const 0.0))
+(assert_return (invoke "f64.no_fold_add_neg_neg" (f64.const -0.0) (f64.const 0.0)) (f64.const 0.0))
+(assert_return (invoke "f64.no_fold_add_neg_neg" (f64.const 0.0) (f64.const 0.0)) (f64.const -0.0))
+
 ;; Test that -x + x is not folded to 0.0.
 
 (module
@@ -1442,13 +1653,13 @@
 
 (assert_return (invoke "f32.no_fold_add_neg" (f32.const 0.0)) (f32.const 0.0))
 (assert_return (invoke "f32.no_fold_add_neg" (f32.const -0.0)) (f32.const 0.0))
-(assert_return_canonical_nan (invoke "f32.no_fold_add_neg" (f32.const infinity)))
-(assert_return_canonical_nan (invoke "f32.no_fold_add_neg" (f32.const -infinity)))
+(assert_return_canonical_nan (invoke "f32.no_fold_add_neg" (f32.const inf)))
+(assert_return_canonical_nan (invoke "f32.no_fold_add_neg" (f32.const -inf)))
 
 (assert_return (invoke "f64.no_fold_add_neg" (f64.const 0.0)) (f64.const 0.0))
 (assert_return (invoke "f64.no_fold_add_neg" (f64.const -0.0)) (f64.const 0.0))
-(assert_return_canonical_nan (invoke "f64.no_fold_add_neg" (f64.const infinity)))
-(assert_return_canonical_nan (invoke "f64.no_fold_add_neg" (f64.const -infinity)))
+(assert_return_canonical_nan (invoke "f64.no_fold_add_neg" (f64.const inf)))
+(assert_return_canonical_nan (invoke "f64.no_fold_add_neg" (f64.const -inf)))
 
 ;; Test that x+x+x+x+x+x is not folded to x * 6.
 
@@ -1491,14 +1702,14 @@
 
 (assert_return (invoke "f32.no_fold_div_div" (f32.const -0x1.f70228p+78) (f32.const -0x1.fbc612p-16) (f32.const -0x1.8c379p+10)) (f32.const -0x1.47b43cp+83))
 (assert_return (invoke "f32.no_fold_div_div" (f32.const 0x1.d29d2ep-70) (f32.const 0x1.f3a17ep+110) (f32.const -0x1.64d41p-112)) (f32.const -0x0p+0))
-(assert_return (invoke "f32.no_fold_div_div" (f32.const 0x1.867f98p+43) (f32.const 0x1.30acfcp-105) (f32.const 0x1.e210d8p+105)) (f32.const infinity))
+(assert_return (invoke "f32.no_fold_div_div" (f32.const 0x1.867f98p+43) (f32.const 0x1.30acfcp-105) (f32.const 0x1.e210d8p+105)) (f32.const inf))
 (assert_return (invoke "f32.no_fold_div_div" (f32.const -0x1.c4001ap-14) (f32.const -0x1.9beb6cp+124) (f32.const -0x1.74f34cp-43)) (f32.const -0x1.819874p-96))
 (assert_return (invoke "f32.no_fold_div_div" (f32.const 0x1.db0e6ep+46) (f32.const 0x1.55eea2p+56) (f32.const -0x1.f3134p+124)) (f32.const -0x1.6cep-135))
 
 (assert_return (invoke "f64.no_fold_div_div" (f64.const 0x1.b4dc8ec3c7777p+337) (f64.const 0x1.9f95ac2d1863p+584) (f64.const -0x1.d4318abba341ep-782)) (f64.const -0x1.2649159d87e02p+534))
 (assert_return (invoke "f64.no_fold_div_div" (f64.const -0x1.ac53af5eb445fp+791) (f64.const 0x1.8549c0a4ceb13p-29) (f64.const 0x1.64e384003c801p+316)) (f64.const -0x1.9417cdccbae91p+503))
 (assert_return (invoke "f64.no_fold_div_div" (f64.const -0x1.d2685afb27327p+2) (f64.const -0x1.abb1eeed3dbebp+880) (f64.const 0x1.a543e2e6968a3p+170)) (f64.const 0x0.0000002a69a5fp-1022))
-(assert_return (invoke "f64.no_fold_div_div" (f64.const -0x1.47ddede78ad1cp+825) (f64.const 0x1.6d932d070a367p-821) (f64.const 0x1.79cf18cc64fp+961)) (f64.const -infinity))
+(assert_return (invoke "f64.no_fold_div_div" (f64.const -0x1.47ddede78ad1cp+825) (f64.const 0x1.6d932d070a367p-821) (f64.const 0x1.79cf18cc64fp+961)) (f64.const -inf))
 (assert_return (invoke "f64.no_fold_div_div" (f64.const -0x1.f73d4979a9379p-888) (f64.const 0x1.4d83b53e97788p-596) (f64.const -0x1.f8f86c9603b5bp-139)) (f64.const 0x1.87a7bd89c586cp-154))
 
 ;; Test that (x/y)*(z/w) is not optimized to (x*z)/(y*w), example from
@@ -1516,11 +1727,11 @@
 (assert_return (invoke "f32.no_fold_mul_divs" (f32.const -0x1.c483bep-109) (f32.const 0x1.ee1c3cp-92) (f32.const 0x1.800756p-88) (f32.const -0x1.95b972p+4)) (f32.const 0x1.bbd30cp-110))
 (assert_return (invoke "f32.no_fold_mul_divs" (f32.const -0x1.0f4262p+102) (f32.const 0x1.248498p+25) (f32.const 0x1.f66a7cp-17) (f32.const 0x1.897fc8p-3)) (f32.const -0x1.2f1aa4p+63))
 (assert_return (invoke "f32.no_fold_mul_divs" (f32.const -0x1.df5f22p+33) (f32.const -0x1.fcee3ep+39) (f32.const -0x1.9ea914p+29) (f32.const -0x1.2c4d3p+10)) (f32.const 0x1.4cf51cp+13))
-(assert_return (invoke "f32.no_fold_mul_divs" (f32.const -0x1.f568bcp+109) (f32.const 0x1.d9963p-34) (f32.const 0x1.37a87ap-16) (f32.const 0x1.a1524ap+78)) (f32.const -infinity))
+(assert_return (invoke "f32.no_fold_mul_divs" (f32.const -0x1.f568bcp+109) (f32.const 0x1.d9963p-34) (f32.const 0x1.37a87ap-16) (f32.const 0x1.a1524ap+78)) (f32.const -inf))
 (assert_return (invoke "f32.no_fold_mul_divs" (f32.const 0x1.3dd592p-53) (f32.const -0x1.332c22p-64) (f32.const 0x1.b01064p-91) (f32.const 0x1.92bb3ap-36)) (f32.const -0x1.1c2dbp-44))
 
 (assert_return (invoke "f64.no_fold_mul_divs" (f64.const -0x1.363d6764f7b12p-819) (f64.const -0x1.ed5471f660b5fp-464) (f64.const -0x1.671b0a7f3a42p+547) (f64.const 0x1.0633be34ba1f2p+186)) (f64.const -0x1.b8fa2b76baeebp+5))
-(assert_return (invoke "f64.no_fold_mul_divs" (f64.const -0x1.37880182e0fa8p+115) (f64.const 0x1.f842631576147p-920) (f64.const -0x1.999372231d156p+362) (f64.const -0x1.d5db481ab9554p+467)) (f64.const -infinity))
+(assert_return (invoke "f64.no_fold_mul_divs" (f64.const -0x1.37880182e0fa8p+115) (f64.const 0x1.f842631576147p-920) (f64.const -0x1.999372231d156p+362) (f64.const -0x1.d5db481ab9554p+467)) (f64.const -inf))
 (assert_return (invoke "f64.no_fold_mul_divs" (f64.const -0x1.9a747c8d4b541p+308) (f64.const -0x1.99092ad6bbdc8p+192) (f64.const -0x1.cb23755c20101p-140) (f64.const -0x1.de8716f6b0b6ap+732)) (f64.const 0x1.ecf584c8466a5p-757))
 (assert_return (invoke "f64.no_fold_mul_divs" (f64.const -0x1.c424b2ece903dp+129) (f64.const -0x1.568ce281db37fp-347) (f64.const 0x1.53900b99fd3dp-957) (f64.const 0x1.5c33952254dadp+223)) (f64.const 0x0p+0))
 (assert_return (invoke "f64.no_fold_mul_divs" (f64.const 0x1.a8ec2cecb32a9p-18) (f64.const 0x1.58acab0051851p-277) (f64.const 0x1.35e87c9077f7fp-620) (f64.const -0x1.925ee37ffb386p+352)) (f64.const -0x1.e6286970b31bfp-714))
@@ -1561,13 +1772,13 @@
 (assert_return (invoke "f32.no_fold_sqrt_square" (f32.const -0x1.b0f9e4p-73)) (f32.const 0x1.b211b2p-73))
 (assert_return (invoke "f32.no_fold_sqrt_square" (f32.const -0x1.de417cp-71)) (f32.const 0x1.de65b8p-71))
 (assert_return (invoke "f32.no_fold_sqrt_square" (f32.const 0x1.64c872p-86)) (f32.const 0x0p+0))
-(assert_return (invoke "f32.no_fold_sqrt_square" (f32.const 0x1.e199e4p+108)) (f32.const infinity))
+(assert_return (invoke "f32.no_fold_sqrt_square" (f32.const 0x1.e199e4p+108)) (f32.const inf))
 
 (assert_return (invoke "f64.no_fold_sqrt_square" (f64.const 0x1.1759d657203fdp-529)) (f64.const 0x1.1759dd57545f3p-529))
 (assert_return (invoke "f64.no_fold_sqrt_square" (f64.const -0x1.4c68de1c78d83p-514)) (f64.const 0x1.4c68de1c78d81p-514))
 (assert_return (invoke "f64.no_fold_sqrt_square" (f64.const -0x1.214736edb6e1ep-521)) (f64.const 0x1.214736ed9cf8dp-521))
 (assert_return (invoke "f64.no_fold_sqrt_square" (f64.const -0x1.0864b9f68457p-616)) (f64.const 0x0p+0))
-(assert_return (invoke "f64.no_fold_sqrt_square" (f64.const 0x1.b2a9855995abap+856)) (f64.const infinity))
+(assert_return (invoke "f64.no_fold_sqrt_square" (f64.const 0x1.b2a9855995abap+856)) (f64.const inf))
 
 ;; Test that sqrt(x)*sqrt(y) is not optimized to sqrt(x*y).
 
@@ -1623,13 +1834,13 @@
     (f64.div (f64.mul (get_local $x) (f64.sqrt (get_local $y))) (get_local $y)))
 )
 
-(assert_return (invoke "f32.no_fold_mul_sqrt_div" (f32.const -0x1.f4a7cap+81) (f32.const 0x1.c09adep+92)) (f32.const -infinity))
+(assert_return (invoke "f32.no_fold_mul_sqrt_div" (f32.const -0x1.f4a7cap+81) (f32.const 0x1.c09adep+92)) (f32.const -inf))
 (assert_return (invoke "f32.no_fold_mul_sqrt_div" (f32.const -0x1.90bf1cp-120) (f32.const 0x1.8dbe88p-97)) (f32.const -0x0p+0))
 (assert_return (invoke "f32.no_fold_mul_sqrt_div" (f32.const 0x1.8570e8p+29) (f32.const 0x1.217d3p-128)) (f32.const 0x1.6e391ap+93))
 (assert_return (invoke "f32.no_fold_mul_sqrt_div" (f32.const -0x1.5b4652p+43) (f32.const 0x1.a9d71cp+112)) (f32.const -0x1.0d423ap-13))
 (assert_return (invoke "f32.no_fold_mul_sqrt_div" (f32.const -0x1.910604p+8) (f32.const 0x1.0ca912p+7)) (f32.const -0x1.14cdecp+5))
 
-(assert_return (invoke "f64.no_fold_mul_sqrt_div" (f64.const 0x1.1dcdeb857305fp+698) (f64.const 0x1.a066171c40eb9p+758)) (f64.const infinity))
+(assert_return (invoke "f64.no_fold_mul_sqrt_div" (f64.const 0x1.1dcdeb857305fp+698) (f64.const 0x1.a066171c40eb9p+758)) (f64.const inf))
 (assert_return (invoke "f64.no_fold_mul_sqrt_div" (f64.const -0x1.8b4f1c218e2abp-827) (f64.const 0x1.5e1ee65953b0bp-669)) (f64.const -0x0p+0))
 (assert_return (invoke "f64.no_fold_mul_sqrt_div" (f64.const 0x1.74ee531ddba38p-425) (f64.const 0x1.f370f758857f3p+560)) (f64.const 0x1.0aff34269583ep-705))
 (assert_return (invoke "f64.no_fold_mul_sqrt_div" (f64.const -0x1.27f216b0da6c5p+352) (f64.const 0x1.8e0b4e0b9fd7ep-483)) (f64.const -0x1.4fa558aad514ep+593))
@@ -1675,17 +1886,17 @@
     (f32.mul (f32.demote/f64 (get_local $x)) (get_local $y)))
 )
 
-(assert_return (invoke "f32.recoding_eq" (f32.const -infinity) (f32.const 3.0)) (i32.const 1))
-(assert_return (invoke "f32.recoding_le" (f32.const -infinity) (f32.const 3.0)) (i32.const 1))
-(assert_return (invoke "f32.recoding_lt" (f32.const -infinity) (f32.const 3.0)) (i32.const 0))
+(assert_return (invoke "f32.recoding_eq" (f32.const -inf) (f32.const 3.0)) (i32.const 1))
+(assert_return (invoke "f32.recoding_le" (f32.const -inf) (f32.const 3.0)) (i32.const 1))
+(assert_return (invoke "f32.recoding_lt" (f32.const -inf) (f32.const 3.0)) (i32.const 0))
 
 (assert_return (invoke "f32.recoding_eq" (f32.const 0x0p+0) (f32.const 0x1p+0)) (i32.const 1))
 (assert_return (invoke "f32.recoding_le" (f32.const 0x0p+0) (f32.const 0x1p+0)) (i32.const 1))
 (assert_return (invoke "f32.recoding_lt" (f32.const 0x0p+0) (f32.const 0x1p+0)) (i32.const 0))
 
-(assert_return (invoke "f64.recoding_eq" (f64.const -infinity) (f64.const 3.0)) (i32.const 1))
-(assert_return (invoke "f64.recoding_le" (f64.const -infinity) (f64.const 3.0)) (i32.const 1))
-(assert_return (invoke "f64.recoding_lt" (f64.const -infinity) (f64.const 3.0)) (i32.const 0))
+(assert_return (invoke "f64.recoding_eq" (f64.const -inf) (f64.const 3.0)) (i32.const 1))
+(assert_return (invoke "f64.recoding_le" (f64.const -inf) (f64.const 3.0)) (i32.const 1))
+(assert_return (invoke "f64.recoding_lt" (f64.const -inf) (f64.const 3.0)) (i32.const 0))
 
 (assert_return (invoke "f64.recoding_eq" (f64.const 0x0p+0) (f64.const 0x1p+0)) (i32.const 1))
 (assert_return (invoke "f64.recoding_le" (f64.const 0x0p+0) (f64.const 0x1p+0)) (i32.const 1))
@@ -1890,9 +2101,9 @@
 )
 
 (assert_return (invoke "f32.no_fold_add_le_monotonicity" (f32.const 0.0) (f32.const 0.0) (f32.const nan)) (i32.const 0))
-(assert_return (invoke "f32.no_fold_add_le_monotonicity" (f32.const infinity) (f32.const -infinity) (f32.const infinity)) (i32.const 0))
+(assert_return (invoke "f32.no_fold_add_le_monotonicity" (f32.const inf) (f32.const -inf) (f32.const inf)) (i32.const 0))
 (assert_return (invoke "f64.no_fold_add_le_monotonicity" (f64.const 0.0) (f64.const 0.0) (f64.const nan)) (i32.const 0))
-(assert_return (invoke "f64.no_fold_add_le_monotonicity" (f64.const infinity) (f64.const -infinity) (f64.const infinity)) (i32.const 0))
+(assert_return (invoke "f64.no_fold_add_le_monotonicity" (f64.const inf) (f64.const -inf) (f64.const inf)) (i32.const 0))
 
 ;; Test that !(x < y) and friends are not optimized to x >= y and friends.
 
@@ -1946,6 +2157,61 @@
 (assert_return (invoke "f32.epsilon") (f32.const -0x1p-23))
 (assert_return (invoke "f64.epsilon") (f64.const 0x1p-52))
 
+;; Test that a method for computing a "machine epsilon" produces the expected
+;; result.
+;; https://www.math.utah.edu/~beebe/software/ieee/
+
+(module
+  (func (export "f32.epsilon") (result f32)
+    (local $x f32)
+    (local $result f32)
+    (set_local $x (f32.const 1))
+    (loop $loop
+      (br_if $loop
+        (f32.gt
+          (f32.add
+            (tee_local $x
+              (f32.mul
+                (tee_local $result (get_local $x))
+                (f32.const 0.5)
+              )
+            )
+            (f32.const 1)
+          )
+          (f32.const 1)
+        )
+      )
+    )
+    (get_local $result)
+  )
+
+  (func (export "f64.epsilon") (result f64)
+    (local $x f64)
+    (local $result f64)
+    (set_local $x (f64.const 1))
+    (loop $loop
+      (br_if $loop
+        (f64.gt
+          (f64.add
+            (tee_local $x
+              (f64.mul
+                (tee_local $result (get_local $x))
+                (f64.const 0.5)
+              )
+            )
+            (f64.const 1)
+          )
+          (f64.const 1)
+        )
+      )
+    )
+    (get_local $result)
+  )
+)
+
+(assert_return (invoke "f32.epsilon") (f32.const 0x1p-23))
+(assert_return (invoke "f64.epsilon") (f64.const 0x1p-52))
+
 ;; Test that floating-point numbers are not optimized as if they form a
 ;; trichotomy.
 
@@ -2017,6 +2283,47 @@
   (func (export "f64.nonarithmetic_nan_bitpattern")
         (param $x i64) (result i64)
     (i64.reinterpret/f64 (f64.neg (f64.reinterpret/i64 (get_local $x)))))
+
+  ;; Versions of no_fold testcases that only care about NaN bitpatterns.
+  (func (export "f32.no_fold_sub_zero") (param $x i32) (result i32)
+    (i32.and (i32.reinterpret/f32 (f32.sub (f32.reinterpret/i32 (get_local $x)) (f32.const 0.0)))
+             (i32.const 0x7fc00000)))
+  (func (export "f32.no_fold_neg0_sub") (param $x i32) (result i32)
+    (i32.and (i32.reinterpret/f32 (f32.sub (f32.const -0.0) (f32.reinterpret/i32 (get_local $x))))
+             (i32.const 0x7fc00000)))
+  (func (export "f32.no_fold_mul_one") (param $x i32) (result i32)
+    (i32.and (i32.reinterpret/f32 (f32.mul (f32.reinterpret/i32 (get_local $x)) (f32.const 1.0)))
+             (i32.const 0x7fc00000)))
+  (func (export "f32.no_fold_neg1_mul") (param $x i32) (result i32)
+    (i32.and (i32.reinterpret/f32 (f32.mul (f32.const -1.0) (f32.reinterpret/i32 (get_local $x))))
+             (i32.const 0x7fc00000)))
+  (func (export "f32.no_fold_div_one") (param $x i32) (result i32)
+    (i32.and (i32.reinterpret/f32 (f32.div (f32.reinterpret/i32 (get_local $x)) (f32.const 1.0)))
+             (i32.const 0x7fc00000)))
+  (func (export "f32.no_fold_div_neg1") (param $x i32) (result i32)
+    (i32.and (i32.reinterpret/f32 (f32.div (f32.reinterpret/i32 (get_local $x)) (f32.const -1.0)))
+             (i32.const 0x7fc00000)))
+  (func (export "f64.no_fold_sub_zero") (param $x i64) (result i64)
+    (i64.and (i64.reinterpret/f64 (f64.sub (f64.reinterpret/i64 (get_local $x)) (f64.const 0.0)))
+             (i64.const 0x7ff8000000000000)))
+  (func (export "f64.no_fold_neg0_sub") (param $x i64) (result i64)
+    (i64.and (i64.reinterpret/f64 (f64.sub (f64.const -0.0) (f64.reinterpret/i64 (get_local $x))))
+             (i64.const 0x7ff8000000000000)))
+  (func (export "f64.no_fold_mul_one") (param $x i64) (result i64)
+    (i64.and (i64.reinterpret/f64 (f64.mul (f64.reinterpret/i64 (get_local $x)) (f64.const 1.0)))
+             (i64.const 0x7ff8000000000000)))
+  (func (export "f64.no_fold_neg1_mul") (param $x i64) (result i64)
+    (i64.and (i64.reinterpret/f64 (f64.mul (f64.const -1.0) (f64.reinterpret/i64 (get_local $x))))
+             (i64.const 0x7ff8000000000000)))
+  (func (export "f64.no_fold_div_one") (param $x i64) (result i64)
+    (i64.and (i64.reinterpret/f64 (f64.div (f64.reinterpret/i64 (get_local $x)) (f64.const 1.0)))
+             (i64.const 0x7ff8000000000000)))
+  (func (export "f64.no_fold_div_neg1") (param $x i64) (result i64)
+    (i64.and (i64.reinterpret/f64 (f64.div (f64.reinterpret/i64 (get_local $x)) (f64.const -1.0)))
+             (i64.const 0x7ff8000000000000)))
+  (func (export "no_fold_promote_demote") (param $x i32) (result i32)
+    (i32.and (i32.reinterpret/f32 (f32.demote/f64 (f64.promote/f32 (f32.reinterpret/i32 (get_local $x)))))
+             (i32.const 0x7fc00000)))
 )
 
 (assert_return (invoke "f32.arithmetic_nan_bitpattern" (i32.const 0x7f803210) (i32.const 0x7f803210)) (i32.const 0x7fc00000))
@@ -2039,3 +2346,225 @@
 (assert_return (invoke "f64.nonarithmetic_nan_bitpattern" (i64.const 0xfff8000000003210)) (i64.const 0x7ff8000000003210))
 ;;(assert_return (invoke "f64.nonarithmetic_nan_bitpattern" (i64.const 0x7ff0000000003210)) (i64.const 0xfff0000000003210))
 ;;(assert_return (invoke "f64.nonarithmetic_nan_bitpattern" (i64.const 0xfff0000000003210)) (i64.const 0x7ff0000000003210))
+(assert_return (invoke "f32.no_fold_sub_zero" (i32.const 0x7fa00000)) (i32.const 0x7fc00000))
+(assert_return (invoke "f32.no_fold_neg0_sub" (i32.const 0x7fa00000)) (i32.const 0x7fc00000))
+(assert_return (invoke "f32.no_fold_mul_one" (i32.const 0x7fa00000)) (i32.const 0x7fc00000))
+(assert_return (invoke "f32.no_fold_neg1_mul" (i32.const 0x7fa00000)) (i32.const 0x7fc00000))
+(assert_return (invoke "f32.no_fold_div_one" (i32.const 0x7fa00000)) (i32.const 0x7fc00000))
+(assert_return (invoke "f32.no_fold_div_neg1" (i32.const 0x7fa00000)) (i32.const 0x7fc00000))
+(assert_return (invoke "f64.no_fold_sub_zero" (i64.const 0x7ff4000000000000)) (i64.const 0x7ff8000000000000))
+(assert_return (invoke "f64.no_fold_neg0_sub" (i64.const 0x7ff4000000000000)) (i64.const 0x7ff8000000000000))
+(assert_return (invoke "f64.no_fold_mul_one" (i64.const 0x7ff4000000000000)) (i64.const 0x7ff8000000000000))
+(assert_return (invoke "f64.no_fold_neg1_mul" (i64.const 0x7ff4000000000000)) (i64.const 0x7ff8000000000000))
+(assert_return (invoke "f64.no_fold_div_one" (i64.const 0x7ff4000000000000)) (i64.const 0x7ff8000000000000))
+(assert_return (invoke "f64.no_fold_div_neg1" (i64.const 0x7ff4000000000000)) (i64.const 0x7ff8000000000000))
+(assert_return (invoke "no_fold_promote_demote" (i32.const 0x7fa00000)) (i32.const 0x7fc00000))
+
+;; Test that IEEE 754 double precision does, in fact, compute a certain dot
+;; product correctly.
+
+(module
+  (func (export "dot_product_example")
+        (param $x0 f64) (param $x1 f64) (param $x2 f64) (param $x3 f64)
+        (param $y0 f64) (param $y1 f64) (param $y2 f64) (param $y3 f64)
+        (result f64)
+    (f64.add (f64.add (f64.add
+      (f64.mul (get_local $x0) (get_local $y0))
+      (f64.mul (get_local $x1) (get_local $y1)))
+      (f64.mul (get_local $x2) (get_local $y2)))
+      (f64.mul (get_local $x3) (get_local $y3)))
+  )
+
+  (func (export "with_binary_sum_collapse")
+        (param $x0 f64) (param $x1 f64) (param $x2 f64) (param $x3 f64)
+        (param $y0 f64) (param $y1 f64) (param $y2 f64) (param $y3 f64)
+        (result f64)
+      (f64.add (f64.add (f64.mul (get_local $x0) (get_local $y0))
+                        (f64.mul (get_local $x1) (get_local $y1)))
+               (f64.add (f64.mul (get_local $x2) (get_local $y2))
+                        (f64.mul (get_local $x3) (get_local $y3))))
+  )
+)
+
+(assert_return (invoke "dot_product_example"
+    (f64.const 3.2e7) (f64.const 1.0) (f64.const -1.0) (f64.const 8.0e7)
+    (f64.const 4.0e7) (f64.const 1.0) (f64.const -1.0) (f64.const -1.6e7))
+  (f64.const 2.0))
+(assert_return (invoke "with_binary_sum_collapse"
+    (f64.const 3.2e7) (f64.const 1.0) (f64.const -1.0) (f64.const 8.0e7)
+    (f64.const 4.0e7) (f64.const 1.0) (f64.const -1.0) (f64.const -1.6e7))
+  (f64.const 2.0))
+
+;; http://www.vinc17.org/research/fptest.en.html#contract2fma
+
+(module
+  (func (export "f32.contract2fma")
+        (param $x f32) (param $y f32) (result f32)
+    (f32.sqrt (f32.sub (f32.mul (get_local $x) (get_local $x))
+                       (f32.mul (get_local $y) (get_local $y)))))
+  (func (export "f64.contract2fma")
+        (param $x f64) (param $y f64) (result f64)
+    (f64.sqrt (f64.sub (f64.mul (get_local $x) (get_local $x))
+                       (f64.mul (get_local $y) (get_local $y)))))
+)
+
+(assert_return (invoke "f32.contract2fma" (f32.const 1.0) (f32.const 1.0)) (f32.const 0.0))
+(assert_return (invoke "f32.contract2fma" (f32.const 0x1.19999ap+0) (f32.const 0x1.19999ap+0)) (f32.const 0.0))
+(assert_return (invoke "f32.contract2fma" (f32.const 0x1.333332p+0) (f32.const 0x1.333332p+0)) (f32.const 0.0))
+(assert_return (invoke "f64.contract2fma" (f64.const 1.0) (f64.const 1.0)) (f64.const 0.0))
+(assert_return (invoke "f64.contract2fma" (f64.const 0x1.199999999999ap+0) (f64.const 0x1.199999999999ap+0)) (f64.const 0.0))
+(assert_return (invoke "f64.contract2fma" (f64.const 0x1.3333333333333p+0) (f64.const 0x1.3333333333333p+0)) (f64.const 0.0))
+
+;; Test that floating-point isn't implemented with QuickBasic for MS-DOS.
+;; https://support.microsoft.com/en-us/help/42980/-complete-tutorial-to-understand-ieee-floating-point-errors
+
+(module
+  (func (export "f32.division_by_small_number")
+        (param $a f32) (param $b f32) (param $c f32) (result f32)
+    (f32.sub (get_local $a) (f32.div (get_local $b) (get_local $c))))
+  (func (export "f64.division_by_small_number")
+        (param $a f64) (param $b f64) (param $c f64) (result f64)
+    (f64.sub (get_local $a) (f64.div (get_local $b) (get_local $c))))
+)
+
+(assert_return (invoke "f32.division_by_small_number" (f32.const 112000000) (f32.const 100000) (f32.const 0.0009)) (f32.const 888888))
+(assert_return (invoke "f64.division_by_small_number" (f64.const 112000000) (f64.const 100000) (f64.const 0.0009)) (f64.const 888888.8888888806))
+
+;; Test a simple golden ratio computation.
+;; http://mathworld.wolfram.com/GoldenRatio.html
+
+(module
+  (func (export "f32.golden_ratio") (param $a f32) (param $b f32) (param $c f32) (result f32)
+    (f32.mul (get_local 0) (f32.add (get_local 1) (f32.sqrt (get_local 2)))))
+  (func (export "f64.golden_ratio") (param $a f64) (param $b f64) (param $c f64) (result f64)
+    (f64.mul (get_local 0) (f64.add (get_local 1) (f64.sqrt (get_local 2)))))
+)
+
+(assert_return (invoke "f32.golden_ratio" (f32.const 0.5) (f32.const 1.0) (f32.const 5.0)) (f32.const 1.618034))
+(assert_return (invoke "f64.golden_ratio" (f64.const 0.5) (f64.const 1.0) (f64.const 5.0)) (f64.const 1.618033988749895))
+
+;; Test some silver means computations.
+;; http://mathworld.wolfram.com/SilverRatio.html
+
+(module
+  (func (export "f32.silver_means") (param $n f32) (result f32)
+    (f32.mul (f32.const 0.5)
+             (f32.add (get_local $n)
+                      (f32.sqrt (f32.add (f32.mul (get_local $n) (get_local $n))
+                                         (f32.const 4.0))))))
+  (func (export "f64.silver_means") (param $n f64) (result f64)
+    (f64.mul (f64.const 0.5)
+             (f64.add (get_local $n)
+                      (f64.sqrt (f64.add (f64.mul (get_local $n) (get_local $n))
+                                         (f64.const 4.0))))))
+)
+
+(assert_return (invoke "f32.silver_means" (f32.const 0.0)) (f32.const 1.0))
+(assert_return (invoke "f32.silver_means" (f32.const 1.0)) (f32.const 1.6180340))
+(assert_return (invoke "f32.silver_means" (f32.const 2.0)) (f32.const 2.4142136))
+(assert_return (invoke "f32.silver_means" (f32.const 3.0)) (f32.const 3.3027756))
+(assert_return (invoke "f32.silver_means" (f32.const 4.0)) (f32.const 4.2360680))
+(assert_return (invoke "f32.silver_means" (f32.const 5.0)) (f32.const 5.1925821))
+(assert_return (invoke "f64.silver_means" (f64.const 0.0)) (f64.const 1.0))
+(assert_return (invoke "f64.silver_means" (f64.const 1.0)) (f64.const 1.618033988749895))
+(assert_return (invoke "f64.silver_means" (f64.const 2.0)) (f64.const 2.414213562373095))
+(assert_return (invoke "f64.silver_means" (f64.const 3.0)) (f64.const 3.302775637731995))
+(assert_return (invoke "f64.silver_means" (f64.const 4.0)) (f64.const 4.236067977499790))
+(assert_return (invoke "f64.silver_means" (f64.const 5.0)) (f64.const 5.192582403567252))
+
+;; Test that an f64 0.4 isn't double-rounded as via extended precision.
+;; https://bugs.llvm.org/show_bug.cgi?id=11200
+
+(module
+  (func (export "point_four") (param $four f64) (param $ten f64) (result i32)
+    (f64.lt (f64.div (get_local $four) (get_local $ten)) (f64.const 0.4)))
+)
+
+(assert_return (invoke "point_four" (f64.const 4.0) (f64.const 10.0)) (i32.const 0))
+
+;; Test an approximation function for tau; it should produces the correctly
+;; rounded result after (and only after) the expected number of iterations.
+
+(module
+  (func (export "tau") (param i32) (result f64)
+    (local f64 f64 f64 f64)
+    f64.const 0x0p+0
+    set_local 1
+    block
+      get_local 0
+      i32.const 1
+      i32.lt_s
+      br_if 0
+      f64.const 0x1p+0
+      set_local 2
+      f64.const 0x0p+0
+      set_local 3
+      loop
+        get_local 1
+        get_local 2
+        f64.const 0x1p+3
+        get_local 3
+        f64.const 0x1p+3
+        f64.mul
+        tee_local 4
+        f64.const 0x1p+0
+        f64.add
+        f64.div
+        f64.const 0x1p+2
+        get_local 4
+        f64.const 0x1p+2
+        f64.add
+        f64.div
+        f64.sub
+        f64.const 0x1p+1
+        get_local 4
+        f64.const 0x1.4p+2
+        f64.add
+        f64.div
+        f64.sub
+        f64.const 0x1p+1
+        get_local 4
+        f64.const 0x1.8p+2
+        f64.add
+        f64.div
+        f64.sub
+        f64.mul
+        f64.add
+        set_local 1
+        get_local 3
+        f64.const 0x1p+0
+        f64.add
+        set_local 3
+        get_local 2
+        f64.const 0x1p-4
+        f64.mul
+        set_local 2
+        get_local 0
+        i32.const -1
+        i32.add
+        tee_local 0
+        br_if 0
+      end
+    end
+    get_local 1
+  )
+)
+
+(assert_return (invoke "tau" (i32.const 10)) (f64.const 0x1.921fb54442d14p+2))
+(assert_return (invoke "tau" (i32.const 11)) (f64.const 0x1.921fb54442d18p+2))
+
+;; Test that y < 0 ? x : (x + 1) is not folded to x + (y < 0).
+
+(module
+  (func (export "f32.no_fold_conditional_inc") (param $x f32) (param $y f32) (result f32)
+    (select (get_local $x)
+            (f32.add (get_local $x) (f32.const 1.0))
+            (f32.lt (get_local $y) (f32.const 0.0))))
+  (func (export "f64.no_fold_conditional_inc") (param $x f64) (param $y f64) (result f64)
+    (select (get_local $x)
+            (f64.add (get_local $x) (f64.const 1.0))
+            (f64.lt (get_local $y) (f64.const 0.0))))
+)
+
+(assert_return (invoke "f32.no_fold_conditional_inc" (f32.const -0.0) (f32.const -1.0)) (f32.const -0.0))
+(assert_return (invoke "f64.no_fold_conditional_inc" (f64.const -0.0) (f64.const -1.0)) (f64.const -0.0))
diff --git a/test/WasmSpec/testsuite/core/float_literals.wast b/test/WasmSpec/testsuite/core/float_literals.wast
index 9eab764..494a0bd 100644
--- a/test/WasmSpec/testsuite/core/float_literals.wast
+++ b/test/WasmSpec/testsuite/core/float_literals.wast
@@ -11,9 +11,9 @@
   (func (export "f32.misc_nan") (result i32) (i32.reinterpret/f32 (f32.const nan:0x012345)))
   (func (export "f32.misc_positive_nan") (result i32) (i32.reinterpret/f32 (f32.const +nan:0x304050)))
   (func (export "f32.misc_negative_nan") (result i32) (i32.reinterpret/f32 (f32.const -nan:0x2abcde)))
-  (func (export "f32.infinity") (result i32) (i32.reinterpret/f32 (f32.const infinity)))
-  (func (export "f32.positive_infinity") (result i32) (i32.reinterpret/f32 (f32.const +infinity)))
-  (func (export "f32.negative_infinity") (result i32) (i32.reinterpret/f32 (f32.const -infinity)))
+  (func (export "f32.infinity") (result i32) (i32.reinterpret/f32 (f32.const inf)))
+  (func (export "f32.positive_infinity") (result i32) (i32.reinterpret/f32 (f32.const +inf)))
+  (func (export "f32.negative_infinity") (result i32) (i32.reinterpret/f32 (f32.const -inf)))
 
   ;; f32 numbers
   (func (export "f32.zero") (result i32) (i32.reinterpret/f32 (f32.const 0x0.0p0)))
@@ -47,9 +47,9 @@
   (func (export "f64.misc_nan") (result i64) (i64.reinterpret/f64 (f64.const nan:0x0123456789abc)))
   (func (export "f64.misc_positive_nan") (result i64) (i64.reinterpret/f64 (f64.const +nan:0x3040506070809)))
   (func (export "f64.misc_negative_nan") (result i64) (i64.reinterpret/f64 (f64.const -nan:0x2abcdef012345)))
-  (func (export "f64.infinity") (result i64) (i64.reinterpret/f64 (f64.const infinity)))
-  (func (export "f64.positive_infinity") (result i64) (i64.reinterpret/f64 (f64.const +infinity)))
-  (func (export "f64.negative_infinity") (result i64) (i64.reinterpret/f64 (f64.const -infinity)))
+  (func (export "f64.infinity") (result i64) (i64.reinterpret/f64 (f64.const inf)))
+  (func (export "f64.positive_infinity") (result i64) (i64.reinterpret/f64 (f64.const +inf)))
+  (func (export "f64.negative_infinity") (result i64) (i64.reinterpret/f64 (f64.const -inf)))
 
   ;; f64 numbers
   (func (export "f64.zero") (result i64) (i64.reinterpret/f64 (f64.const 0x0.0p0)))
diff --git a/test/WasmSpec/testsuite/core/float_memory.wast b/test/WasmSpec/testsuite/core/float_memory.wast
index 1c9ca1b..70bc009 100644
--- a/test/WasmSpec/testsuite/core/float_memory.wast
+++ b/test/WasmSpec/testsuite/core/float_memory.wast
@@ -13,19 +13,19 @@
 )
 
 (assert_return (invoke "i32.load") (i32.const 0x7fa00000))
-(assert_return_arithmetic_nan (invoke "f32.load"))
+(assert_return (invoke "f32.load") (f32.const nan:0x200000))
 (invoke "reset")
 (assert_return (invoke "i32.load") (i32.const 0x0))
 (assert_return (invoke "f32.load") (f32.const 0.0))
 (invoke "f32.store")
 ;;(assert_return (invoke "i32.load") (i32.const 0x7fa00000))
-(assert_return_arithmetic_nan (invoke "f32.load"))
+(assert_return (invoke "f32.load") (f32.const nan:0x200000))
 (invoke "reset")
 (assert_return (invoke "i32.load") (i32.const 0x0))
 (assert_return (invoke "f32.load") (f32.const 0.0))
 (invoke "i32.store")
 (assert_return (invoke "i32.load") (i32.const 0x7fa00000))
-(assert_return_arithmetic_nan (invoke "f32.load"))
+(assert_return (invoke "f32.load") (f32.const nan:0x200000))
 
 (module
   (memory (data "\00\00\00\00\00\00\f4\7f"))
@@ -38,19 +38,19 @@
 )
 
 (assert_return (invoke "i64.load") (i64.const 0x7ff4000000000000))
-(assert_return_arithmetic_nan (invoke "f64.load"))
+(assert_return (invoke "f64.load") (f64.const nan:0x4000000000000))
 (invoke "reset")
 (assert_return (invoke "i64.load") (i64.const 0x0))
 (assert_return (invoke "f64.load") (f64.const 0.0))
 (invoke "f64.store")
 ;;(assert_return (invoke "i64.load") (i64.const 0x7ff4000000000000))
-(assert_return_arithmetic_nan (invoke "f64.load"))
+(assert_return (invoke "f64.load") (f64.const nan:0x4000000000000))
 (invoke "reset")
 (assert_return (invoke "i64.load") (i64.const 0x0))
 (assert_return (invoke "f64.load") (f64.const 0.0))
 (invoke "i64.store")
 (assert_return (invoke "i64.load") (i64.const 0x7ff4000000000000))
-(assert_return_arithmetic_nan (invoke "f64.load"))
+(assert_return (invoke "f64.load") (f64.const nan:0x4000000000000))
 
 ;; Test that unaligned load and store do not canonicalize NaNs.
 
@@ -65,19 +65,19 @@
 )
 
 (assert_return (invoke "i32.load") (i32.const 0x7fa00000))
-(assert_return_arithmetic_nan (invoke "f32.load"))
+(assert_return (invoke "f32.load") (f32.const nan:0x200000))
 (invoke "reset")
 (assert_return (invoke "i32.load") (i32.const 0x0))
 (assert_return (invoke "f32.load") (f32.const 0.0))
 (invoke "f32.store")
 ;;(assert_return (invoke "i32.load") (i32.const 0x7fa00000))
-(assert_return_arithmetic_nan (invoke "f32.load"))
+(assert_return (invoke "f32.load") (f32.const nan:0x200000))
 (invoke "reset")
 (assert_return (invoke "i32.load") (i32.const 0x0))
 (assert_return (invoke "f32.load") (f32.const 0.0))
 (invoke "i32.store")
 (assert_return (invoke "i32.load") (i32.const 0x7fa00000))
-(assert_return_arithmetic_nan (invoke "f32.load"))
+(assert_return (invoke "f32.load") (f32.const nan:0x200000))
 
 (module
   (memory (data "\00\00\00\00\00\00\00\f4\7f"))
@@ -90,19 +90,19 @@
 )
 
 (assert_return (invoke "i64.load") (i64.const 0x7ff4000000000000))
-(assert_return_arithmetic_nan (invoke "f64.load"))
+(assert_return (invoke "f64.load") (f64.const nan:0x4000000000000))
 (invoke "reset")
 (assert_return (invoke "i64.load") (i64.const 0x0))
 (assert_return (invoke "f64.load") (f64.const 0.0))
 (invoke "f64.store")
 ;;(assert_return (invoke "i64.load") (i64.const 0x7ff4000000000000))
-(assert_return_arithmetic_nan (invoke "f64.load"))
+(assert_return (invoke "f64.load") (f64.const nan:0x4000000000000))
 (invoke "reset")
 (assert_return (invoke "i64.load") (i64.const 0x0))
 (assert_return (invoke "f64.load") (f64.const 0.0))
 (invoke "i64.store")
 (assert_return (invoke "i64.load") (i64.const 0x7ff4000000000000))
-(assert_return_arithmetic_nan (invoke "f64.load"))
+(assert_return (invoke "f64.load") (f64.const nan:0x4000000000000))
 
 ;; Test that load and store do not canonicalize NaNs as some JS engines do.
 
@@ -117,19 +117,19 @@
 )
 
 (assert_return (invoke "i32.load") (i32.const 0x7fd00001))
-(assert_return_arithmetic_nan (invoke "f32.load"))
+(assert_return (invoke "f32.load") (f32.const nan:0x500001))
 (invoke "reset")
 (assert_return (invoke "i32.load") (i32.const 0x0))
 (assert_return (invoke "f32.load") (f32.const 0.0))
 (invoke "f32.store")
 (assert_return (invoke "i32.load") (i32.const 0x7fd00001))
-(assert_return_arithmetic_nan (invoke "f32.load"))
+(assert_return (invoke "f32.load") (f32.const nan:0x500001))
 (invoke "reset")
 (assert_return (invoke "i32.load") (i32.const 0x0))
 (assert_return (invoke "f32.load") (f32.const 0.0))
 (invoke "i32.store")
 (assert_return (invoke "i32.load") (i32.const 0x7fd00001))
-(assert_return_arithmetic_nan (invoke "f32.load"))
+(assert_return (invoke "f32.load") (f32.const nan:0x500001))
 
 (module
   (memory (data "\01\00\00\00\00\00\fc\7f"))
@@ -142,16 +142,16 @@
 )
 
 (assert_return (invoke "i64.load") (i64.const 0x7ffc000000000001))
-(assert_return_arithmetic_nan (invoke "f64.load"))
+(assert_return (invoke "f64.load") (f64.const nan:0xc000000000001))
 (invoke "reset")
 (assert_return (invoke "i64.load") (i64.const 0x0))
 (assert_return (invoke "f64.load") (f64.const 0.0))
 (invoke "f64.store")
 (assert_return (invoke "i64.load") (i64.const 0x7ffc000000000001))
-(assert_return_arithmetic_nan (invoke "f64.load"))
+(assert_return (invoke "f64.load") (f64.const nan:0xc000000000001))
 (invoke "reset")
 (assert_return (invoke "i64.load") (i64.const 0x0))
 (assert_return (invoke "f64.load") (f64.const 0.0))
 (invoke "i64.store")
 (assert_return (invoke "i64.load") (i64.const 0x7ffc000000000001))
-(assert_return_arithmetic_nan (invoke "f64.load"))
+(assert_return (invoke "f64.load") (f64.const nan:0xc000000000001))
diff --git a/test/WasmSpec/testsuite/core/float_misc.wast b/test/WasmSpec/testsuite/core/float_misc.wast
index 39af1d0..095b8d8 100644
--- a/test/WasmSpec/testsuite/core/float_misc.wast
+++ b/test/WasmSpec/testsuite/core/float_misc.wast
@@ -10,9 +10,9 @@
 ;; value-changing optimizations, and (d) that the WebAssembly implementation
 ;; doesn't exhibit any known implementation bugs.
 ;;
-;; This file supplements f32.wast, f64.wast, f32_cmp.wast, and f64_cmp.wast with
-;; additional single-instruction tests covering additional miscellaneous
-;; interesting cases.
+;; This file supplements f32.wast, f64.wast, f32_bitwise.wast, f64_bitwise.wast,
+;; f32_cmp.wast, and f64_cmp.wast with additional single-instruction tests
+;; covering additional miscellaneous interesting cases.
 
 (module
   (func (export "f32.add") (param $x f32) (param $y f32) (result f32) (f32.add (get_local $x) (get_local $y)))
@@ -57,11 +57,7 @@
 (assert_return (invoke "f64.add" (f64.const 1.0) (f64.const 0x1p-53)) (f64.const 0x1.0p+0))
 (assert_return (invoke "f64.add" (f64.const 1.0) (f64.const 0x1.0000000000001p-53)) (f64.const 0x1.0000000000001p+0))
 
-;; Test that what some systems call signaling NaN behaves as a quiet NaN.
-(assert_return_arithmetic_nan (invoke "f32.add" (f32.const nan:0x200000) (f32.const 1.0)))
-(assert_return_arithmetic_nan (invoke "f64.add" (f64.const nan:0x4000000000000) (f64.const 1.0)))
-
-;; Max subnornmal + min subnormal = min normal.
+;; Max subnormal + min subnormal = min normal.
 (assert_return (invoke "f32.add" (f32.const 0x1p-149) (f32.const 0x1.fffffcp-127)) (f32.const 0x1p-126))
 (assert_return (invoke "f64.add" (f64.const 0x0.0000000000001p-1022) (f64.const 0x0.fffffffffffffp-1022)) (f64.const 0x1p-1022))
 
@@ -75,6 +71,12 @@
 ;; http://mmix.cs.hm.edu/bugs/bug_rounding.html
 (assert_return (invoke "f64.add" (f64.const -0x1p-1008) (f64.const 0x0.0000000001716p-1022)) (f64.const -0x1.fffffffffffffp-1009))
 
+;; http://www.vinc17.org/software/tst-ieee754.xsl
+(assert_return (invoke "f64.add" (f64.const 9007199254740992) (f64.const 1.00001)) (f64.const 9007199254740994))
+
+;; http://www.vinc17.org/software/test.java
+(assert_return (invoke "f64.add" (f64.const 9007199254740994) (f64.const 0x1.fffep-1)) (f64.const 9007199254740994))
+
 ;; Computations that round differently in ties-to-odd mode.
 (assert_return (invoke "f32.add" (f32.const 0x1p23) (f32.const 0x1p-1)) (f32.const 0x1p23))
 (assert_return (invoke "f32.add" (f32.const 0x1.000002p+23) (f32.const 0x1p-1)) (f32.const 0x1.000004p+23))
@@ -160,6 +162,16 @@
 (assert_return (invoke "f32.add" (f32.const 0x1.fffffcp+127) (f32.const 0x1p+104)) (f32.const 0x1.fffffep+127))
 (assert_return (invoke "f64.add" (f64.const 0x1.ffffffffffffep+1023) (f64.const 0x1p+971)) (f64.const 0x1.fffffffffffffp+1023))
 
+;; http://news.harvard.edu/gazette/story/2013/09/dawn-of-a-revolution/
+(assert_return (invoke "f32.add" (f32.const 2.0) (f32.const 2.0)) (f32.const 4.0))
+(assert_return (invoke "f64.add" (f64.const 2.0) (f64.const 2.0)) (f64.const 4.0))
+
+;; Test rounding above the greatest finite value.
+(assert_return (invoke "f32.add" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+102)) (f32.const 0x1.fffffep+127))
+(assert_return (invoke "f32.add" (f32.const 0x1.fffffep+127) (f32.const 0x1p+103)) (f32.const inf))
+(assert_return (invoke "f64.add" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+969)) (f64.const 0x1.fffffffffffffp+1023))
+(assert_return (invoke "f64.add" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p+970)) (f64.const inf))
+
 ;; Test for a historic spreadsheet bug.
 ;; https://blogs.office.com/2007/09/25/calculation-issue-update/
 (assert_return (invoke "f32.sub" (f32.const 65536.0) (f32.const 0x1p-37)) (f32.const 65536.0))
@@ -239,18 +251,29 @@
 (assert_return (invoke "f64.sub" (f64.const 400000000000002) (f64.const 400000000000001)) (f64.const 1.0))
 (assert_return (invoke "f64.sub" (f64.const 400000000000002) (f64.const 400000000000000)) (f64.const 2.0))
 
-;; Min normal - min subnormal = max subnornmal.
-(assert_return (invoke "f32.sub" (f32.const 0x1p-126) (f32.const 0x1p-149)) (f32.const 0x1.fffffcp-127))
-(assert_return (invoke "f64.sub" (f64.const 0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x0.fffffffffffffp-1022))
-
-;; Min normal - max subnormal = min subnornmal.
+;; Min normal - max subnormal = min subnormal.
 (assert_return (invoke "f32.sub" (f32.const 0x1p-126) (f32.const 0x1.fffffcp-127)) (f32.const 0x1p-149))
 (assert_return (invoke "f64.sub" (f64.const 0x1p-1022) (f64.const 0x0.fffffffffffffp-1022)) (f64.const 0x0.0000000000001p-1022))
 
+;; Test subtraction of numbers very close to 1.
+(assert_return (invoke "f32.sub" (f32.const 0x1.000002p+0) (f32.const 0x1.fffffep-1)) (f32.const 0x1.8p-23))
+(assert_return (invoke "f32.sub" (f32.const 0x1.000002p+0) (f32.const 0x1.0p+0)) (f32.const 0x1p-23))
+(assert_return (invoke "f32.sub" (f32.const 0x1p+0) (f32.const 0x1.fffffep-1)) (f32.const 0x1p-24))
+(assert_return (invoke "f64.sub" (f64.const 0x1.0000000000001p+0) (f64.const 0x1.fffffffffffffp-1)) (f64.const 0x1.8p-52))
+(assert_return (invoke "f64.sub" (f64.const 0x1.0000000000001p+0) (f64.const 0x1.0p+0)) (f64.const 0x1p-52))
+(assert_return (invoke "f64.sub" (f64.const 0x1p+0) (f64.const 0x1.fffffffffffffp-1)) (f64.const 0x1p-53))
+
+;; Test the least value that can be subtracted from the max value to produce a
+;; different value.
+(assert_return (invoke "f32.sub" (f32.const 0x1.fffffep+127) (f32.const 0x1.fffffep+102)) (f32.const 0x1.fffffep+127))
+(assert_return (invoke "f32.sub" (f32.const 0x1.fffffep+127) (f32.const 0x1p+103)) (f32.const 0x1.fffffcp+127))
+(assert_return (invoke "f64.sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1.fffffffffffffp+969)) (f64.const 0x1.fffffffffffffp+1023))
+(assert_return (invoke "f64.sub" (f64.const 0x1.fffffffffffffp+1023) (f64.const 0x1p+970)) (f64.const 0x1.ffffffffffffep+1023))
+
 ;; Miscellaneous values.
 (assert_return (invoke "f32.mul" (f32.const 1e15) (f32.const 1e15)) (f32.const 0x1.93e592p+99))
-(assert_return (invoke "f32.mul" (f32.const 1e20) (f32.const 1e20)) (f32.const infinity))
-(assert_return (invoke "f32.mul" (f32.const 1e25) (f32.const 1e25)) (f32.const infinity))
+(assert_return (invoke "f32.mul" (f32.const 1e20) (f32.const 1e20)) (f32.const inf))
+(assert_return (invoke "f32.mul" (f32.const 1e25) (f32.const 1e25)) (f32.const inf))
 (assert_return (invoke "f64.mul" (f64.const 1e15) (f64.const 1e15)) (f64.const 0x1.93e5939a08ceap+99))
 (assert_return (invoke "f64.mul" (f64.const 1e20) (f64.const 1e20)) (f64.const 0x1.d6329f1c35ca5p+132))
 (assert_return (invoke "f64.mul" (f64.const 1e25) (f64.const 1e25)) (f64.const 0x1.11b0ec57e649bp+166))
@@ -272,7 +295,7 @@
 (assert_return (invoke "f32.mul" (f32.const -0x1.b17694p+92) (f32.const -0x1.e4b56ap-97)) (f32.const 0x1.9a5baep-4))
 (assert_return (invoke "f32.mul" (f32.const -0x1.1626a6p+79) (f32.const -0x1.c57d7p-75)) (f32.const 0x1.ecbaaep+4))
 (assert_return (invoke "f32.mul" (f32.const 0x1.7acf72p+53) (f32.const 0x1.6c89acp+5)) (f32.const 0x1.0db556p+59))
-(assert_return (invoke "f64.mul" (f64.const -0x1.25c293f6f37e4p+425) (f64.const 0x1.f5fd4fa41c6d8p+945)) (f64.const -infinity))
+(assert_return (invoke "f64.mul" (f64.const -0x1.25c293f6f37e4p+425) (f64.const 0x1.f5fd4fa41c6d8p+945)) (f64.const -inf))
 (assert_return (invoke "f64.mul" (f64.const -0x1.cc1ae79fffc5bp-986) (f64.const -0x1.c36ccc2861ca6p-219)) (f64.const 0x0p+0))
 (assert_return (invoke "f64.mul" (f64.const 0x1.c0232b3e64b56p+606) (f64.const -0x1.f6939cf3affaap+106)) (f64.const -0x1.b7e3aedf190d3p+713))
 (assert_return (invoke "f64.mul" (f64.const -0x1.60f289966b271p-313) (f64.const 0x1.28a5497f0c259p+583)) (f64.const -0x1.98fc50bcec259p+270))
@@ -286,12 +309,12 @@
 (assert_return (invoke "f32.mul" (f32.const 0x1.936742p+30) (f32.const -0x1.a7a19p+66)) (f32.const -0x1.4dc71ap+97))
 (assert_return (invoke "f64.mul" (f64.const -0x1.ba737b4ca3b13p-639) (f64.const 0x1.8923309857438p-314)) (f64.const -0x1.53bc0d07baa37p-952))
 (assert_return (invoke "f64.mul" (f64.const 0x1.7c1932e610219p-276) (f64.const -0x1.2605db646489fp-635)) (f64.const -0x1.b48da2b0d2ae3p-911))
-(assert_return (invoke "f64.mul" (f64.const -0x1.e43cdf3b2108p+329) (f64.const -0x1.99d96abbd61d1p+835)) (f64.const infinity))
+(assert_return (invoke "f64.mul" (f64.const -0x1.e43cdf3b2108p+329) (f64.const -0x1.99d96abbd61d1p+835)) (f64.const inf))
 (assert_return (invoke "f64.mul" (f64.const 0x1.4c19466551da3p+947) (f64.const 0x1.0bdcd6c7646e9p-439)) (f64.const 0x1.5b7cd8c3f638ap+508))
 (assert_return (invoke "f64.mul" (f64.const 0x1.ff1da1726e3dfp+339) (f64.const -0x1.043c44f52b158p+169)) (f64.const -0x1.03c9364bb585cp+509))
 
 ;; Computations that round differently in round-toward-zero mode.
-(assert_return (invoke "f32.mul" (f32.const -0x1.907e8ap+46) (f32.const -0x1.5d3668p+95)) (f32.const infinity))
+(assert_return (invoke "f32.mul" (f32.const -0x1.907e8ap+46) (f32.const -0x1.5d3668p+95)) (f32.const inf))
 (assert_return (invoke "f32.mul" (f32.const -0x1.8c9f74p-3) (f32.const 0x1.e2b452p-99)) (f32.const -0x1.75edccp-101))
 (assert_return (invoke "f32.mul" (f32.const -0x1.cc605ap-19) (f32.const 0x1.ec321ap+105)) (f32.const -0x1.ba91a4p+87))
 (assert_return (invoke "f32.mul" (f32.const -0x1.5fbb7ap+56) (f32.const 0x1.a8965ep-96)) (f32.const -0x1.23ae8ep-39))
@@ -299,7 +322,7 @@
 (assert_return (invoke "f64.mul" (f64.const -0x1.5b0266454c26bp-496) (f64.const -0x1.af5787e3e0399p+433)) (f64.const 0x1.2457d81949e0bp-62))
 (assert_return (invoke "f64.mul" (f64.const 0x1.0d54a82393d45p+478) (f64.const -0x1.425760807ceaep-764)) (f64.const -0x1.532068c8d0d5dp-286))
 (assert_return (invoke "f64.mul" (f64.const -0x1.b532af981786p+172) (f64.const 0x1.ada95085ba36fp+359)) (f64.const -0x1.6ee38c1e01864p+532))
-(assert_return (invoke "f64.mul" (f64.const 0x1.e132f4d49d1cep+768) (f64.const -0x1.a75afe9a7d864p+374)) (f64.const -infinity))
+(assert_return (invoke "f64.mul" (f64.const 0x1.e132f4d49d1cep+768) (f64.const -0x1.a75afe9a7d864p+374)) (f64.const -inf))
 (assert_return (invoke "f64.mul" (f64.const 0x1.68bbf1cfff90ap+81) (f64.const 0x1.09cd17d652c5p+70)) (f64.const 0x1.768b8d67d794p+151))
 
 ;; Computations that round differently on x87.
@@ -331,15 +354,30 @@
 
 ;; Test the greatest positive value with a finite square.
 (assert_return (invoke "f32.mul" (f32.const 0x1.fffffep+63) (f32.const 0x1.fffffep+63)) (f32.const 0x1.fffffcp+127))
-(assert_return (invoke "f32.mul" (f32.const 0x1p+64) (f32.const 0x1p+64)) (f32.const infinity))
+(assert_return (invoke "f32.mul" (f32.const 0x1p+64) (f32.const 0x1p+64)) (f32.const inf))
 (assert_return (invoke "f64.mul" (f64.const 0x1.fffffffffffffp+511) (f64.const 0x1.fffffffffffffp+511)) (f64.const 0x1.ffffffffffffep+1023))
-(assert_return (invoke "f64.mul" (f64.const 0x1p+512) (f64.const 0x1p+512)) (f64.const infinity))
+(assert_return (invoke "f64.mul" (f64.const 0x1p+512) (f64.const 0x1p+512)) (f64.const inf))
+
+;; Test the squares of values very close to 1.
+(assert_return (invoke "f32.mul" (f32.const 0x1.000002p+0) (f32.const 0x1.000002p+0)) (f32.const 0x1.000004p+0))
+(assert_return (invoke "f32.mul" (f32.const 0x1.fffffep-1) (f32.const 0x1.fffffep-1)) (f32.const 0x1.fffffcp-1))
+(assert_return (invoke "f64.mul" (f64.const 0x1.0000000000001p+0) (f64.const 0x1.0000000000001p+0)) (f64.const 0x1.0000000000002p+0))
+(assert_return (invoke "f64.mul" (f64.const 0x1.fffffffffffffp-1) (f64.const 0x1.fffffffffffffp-1)) (f64.const 0x1.ffffffffffffep-1))
+
+;; Test multiplication of numbers very close to 1.
+(assert_return (invoke "f32.mul" (f32.const 0x1.000002p+0) (f32.const 0x1.fffffep-1)) (f32.const 0x1p+0))
+(assert_return (invoke "f32.mul" (f32.const 0x1.000004p+0) (f32.const 0x1.fffffcp-1)) (f32.const 0x1.000002p+0))
+(assert_return (invoke "f64.mul" (f64.const 0x1.0000000000001p+0) (f64.const 0x1.fffffffffffffp-1)) (f64.const 0x1p+0))
+(assert_return (invoke "f64.mul" (f64.const 0x1.0000000000002p+0) (f64.const 0x1.ffffffffffffep-1)) (f64.const 0x1.0000000000001p+0))
 
 ;; Test MIN * EPSILON.
 ;; http://www.mpfr.org/mpfr-2.0.1/patch2
 (assert_return (invoke "f32.mul" (f32.const 0x1p-126) (f32.const 0x1p-23)) (f32.const 0x1p-149))
 (assert_return (invoke "f64.mul" (f64.const 0x1p-1022) (f64.const 0x1p-52)) (f64.const 0x0.0000000000001p-1022))
 
+;; http://opencores.org/bug,view,2454
+(assert_return (invoke "f32.mul" (f32.const -0x1.0006p+4) (f32.const 0x1.ap-132)) (f32.const -0x1.a009cp-128))
+
 ;; Miscellaneous values.
 (assert_return (invoke "f32.div" (f32.const 1.123456789) (f32.const 100)) (f32.const 0x1.702264p-7))
 (assert_return (invoke "f32.div" (f32.const 8391667.0) (f32.const 12582905.0)) (f32.const 0x1.55754p-1))
@@ -370,7 +408,7 @@
 (assert_return (invoke "f64.div" (f64.const -0x1.44ca7539cc851p+540) (f64.const 0x1.58501bccc58fep+453)) (f64.const -0x1.e2f8657e0924ep+86))
 
 ;; Computations that round differently in round-downward mode.
-(assert_return (invoke "f32.div" (f32.const -0x1.c2c54ap+69) (f32.const -0x1.00d142p-86)) (f32.const infinity))
+(assert_return (invoke "f32.div" (f32.const -0x1.c2c54ap+69) (f32.const -0x1.00d142p-86)) (f32.const inf))
 (assert_return (invoke "f32.div" (f32.const 0x1.e35abep-46) (f32.const 0x1.c69dfp+44)) (f32.const 0x1.102eb4p-90))
 (assert_return (invoke "f32.div" (f32.const 0x1.45ff2ap+0) (f32.const -0x1.1e8754p+89)) (f32.const -0x1.23434ep-89))
 (assert_return (invoke "f32.div" (f32.const 0x1.8db18ap-51) (f32.const 0x1.47c678p-128)) (f32.const 0x1.369b96p+77))
@@ -382,13 +420,13 @@
 (assert_return (invoke "f64.div" (f64.const -0x1.91f58d7ed1237p+236) (f64.const -0x1.f190d808383c8p+55)) (f64.const 0x1.9d9eb0836f906p+180))
 
 ;; Computations that round differently in round-toward-zero mode.
-(assert_return (invoke "f32.div" (f32.const 0x1.64b2a4p+26) (f32.const 0x1.e95752p-119)) (f32.const infinity))
+(assert_return (invoke "f32.div" (f32.const 0x1.64b2a4p+26) (f32.const 0x1.e95752p-119)) (f32.const inf))
 (assert_return (invoke "f32.div" (f32.const -0x1.53c9b6p+77) (f32.const 0x1.d689ap+27)) (f32.const -0x1.71baa4p+49))
 (assert_return (invoke "f32.div" (f32.const 0x1.664a8ap+38) (f32.const -0x1.59dba2p+96)) (f32.const -0x1.0933f4p-58))
 (assert_return (invoke "f32.div" (f32.const -0x1.99e0fap+111) (f32.const -0x1.c2b5a8p+9)) (f32.const 0x1.d19de6p+101))
 (assert_return (invoke "f32.div" (f32.const -0x1.5a815ap+92) (f32.const -0x1.b5820ap+13)) (f32.const 0x1.9580b8p+78))
 (assert_return (invoke "f64.div" (f64.const -0x1.81fd1e2af7bebp-655) (f64.const 0x1.edefc4eae536cp-691)) (f64.const -0x1.901abdd91b661p+35))
-(assert_return (invoke "f64.div" (f64.const -0x1.47cf932953c43p+782) (f64.const -0x1.bc40496b1f2a1p-553)) (f64.const infinity))
+(assert_return (invoke "f64.div" (f64.const -0x1.47cf932953c43p+782) (f64.const -0x1.bc40496b1f2a1p-553)) (f64.const inf))
 (assert_return (invoke "f64.div" (f64.const -0x1.2bd2e8fbdcad7p-746) (f64.const 0x1.b115674cc476ep-65)) (f64.const -0x1.62752bf19fa81p-682))
 (assert_return (invoke "f64.div" (f64.const -0x1.f923e3fea9efep+317) (f64.const -0x1.8044c74d27a39p-588)) (f64.const 0x1.5086518cc7186p+905))
 (assert_return (invoke "f64.div" (f64.const 0x1.516ed2051d6bbp+181) (f64.const -0x1.c9f455eb9c2eep+214)) (f64.const -0x1.79414d67f2889p-34))
@@ -440,9 +478,9 @@
 (assert_return (invoke "f64.div" (f64.const 0x1p-51) (f64.const 0x1.fffffffffffffp+1023)) (f64.const 0x0.0000000000001p-1022))
 
 ;; Test the least positive value with a finite reciprocal.
-(assert_return (invoke "f32.div" (f32.const 1.0) (f32.const 0x1p-128)) (f32.const infinity))
+(assert_return (invoke "f32.div" (f32.const 1.0) (f32.const 0x1p-128)) (f32.const inf))
 (assert_return (invoke "f32.div" (f32.const 1.0) (f32.const 0x1.000008p-128)) (f32.const 0x1.fffffp+127))
-(assert_return (invoke "f64.div" (f64.const 1.0) (f64.const 0x0.4p-1022)) (f64.const infinity))
+(assert_return (invoke "f64.div" (f64.const 1.0) (f64.const 0x0.4p-1022)) (f64.const inf))
 (assert_return (invoke "f64.div" (f64.const 1.0) (f64.const 0x0.4000000000001p-1022)) (f64.const 0x1.ffffffffffff8p+1023))
 
 ;; Test the least positive value that has a subnormal reciprocal.
@@ -451,11 +489,6 @@
 (assert_return (invoke "f64.div" (f64.const 1.0) (f64.const 0x1.0000000000001p+1022)) (f64.const 0x0.fffffffffffffp-1022))
 (assert_return (invoke "f64.div" (f64.const 1.0) (f64.const 0x1p+1022)) (f64.const 0x1p-1022))
 
-;; Test the minimum positive normal number divided by the minimum positive
-;; subnormal number.
-(assert_return (invoke "f32.div" (f32.const 0x1p-126) (f32.const 0x1p-149)) (f32.const 0x1p+23))
-(assert_return (invoke "f64.div" (f64.const 0x1p-1022) (f64.const 0x0.0000000000001p-1022)) (f64.const 0x1p+52))
-
 ;; Test that the last binary digit of 1.0/3.0 is even in f32,
 ;; https://en.wikipedia.org/wiki/Single-precision_floating-point_format#Single-precision_examples
 ;;
@@ -471,6 +504,16 @@
 (assert_return (invoke "f64.div" (f64.const 0x3p+0) (f64.const 0x1.2p+3)) (f64.const 0x1.5555555555555p-2))
 (assert_return (invoke "f64.div" (f64.const 0x1.2p+3) (f64.const 0x1.bp+4)) (f64.const 0x1.5555555555555p-2))
 
+;; Test division of numbers very close to 1.
+(assert_return (invoke "f32.div" (f32.const 0x1.000002p+0) (f32.const 0x1.fffffep-1)) (f32.const 0x1.000004p+0))
+(assert_return (invoke "f32.div" (f32.const 0x1.fffffep-1) (f32.const 0x1.000002p+0)) (f32.const 0x1.fffffap-1))
+(assert_return (invoke "f32.div" (f32.const 0x1.0p+0) (f32.const 0x1.fffffep-1)) (f32.const 0x1.000002p+0))
+(assert_return (invoke "f32.div" (f32.const 0x1.0p+0) (f32.const 0x1.000002p+0)) (f32.const 0x1.fffffcp-1))
+(assert_return (invoke "f64.div" (f64.const 0x1.0000000000001p+0) (f64.const 0x1.fffffffffffffp-1)) (f64.const 0x1.0000000000002p+0))
+(assert_return (invoke "f64.div" (f64.const 0x1.fffffffffffffp-1) (f64.const 0x1.0000000000001p+0)) (f64.const 0x1.ffffffffffffdp-1))
+(assert_return (invoke "f64.div" (f64.const 0x1.0p+0) (f64.const 0x1.fffffffffffffp-1)) (f64.const 0x1.0000000000001p+0))
+(assert_return (invoke "f64.div" (f64.const 0x1.0p+0) (f64.const 0x1.0000000000001p+0)) (f64.const 0x1.ffffffffffffep-1))
+
 ;; Test for bugs found in an early RISC-V implementation.
 ;; https://github.com/riscv/riscv-tests/pull/8
 (assert_return (invoke "f32.sqrt" (f32.const 0x1.56p+7)) (f32.const 0x1.a2744cp+3))
@@ -532,54 +575,44 @@
 (assert_return (invoke "f64.sqrt" (f64.const 0x1.e5522a741babep-276)) (f64.const 0x1.607ae2b6feb7dp-138))
 (assert_return (invoke "f64.sqrt" (f64.const 0x1.4832badc0c061p+567)) (f64.const 0x1.99ec7934139b2p+283))
 
-;; Test the least greatest value with a sqrt that rounds to one.
+;; Test the least value with a sqrt that rounds to one.
 (assert_return (invoke "f32.sqrt" (f32.const 0x1.000002p+0)) (f32.const 0x1p+0))
 (assert_return (invoke "f32.sqrt" (f32.const 0x1.000004p+0)) (f32.const 0x1.000002p+0))
 (assert_return (invoke "f64.sqrt" (f64.const 0x1.0000000000001p+0)) (f64.const 0x1p+0))
 (assert_return (invoke "f64.sqrt" (f64.const 0x1.0000000000002p+0)) (f64.const 0x1.0000000000001p+0))
 
+;; Test the greatest value less than one for which sqrt is not an identity.
+(assert_return (invoke "f32.sqrt" (f32.const 0x1.fffffcp-1)) (f32.const 0x1.fffffep-1))
+(assert_return (invoke "f32.sqrt" (f32.const 0x1.fffffap-1)) (f32.const 0x1.fffffcp-1))
+(assert_return (invoke "f64.sqrt" (f64.const 0x1.ffffffffffffep-1)) (f64.const 0x1.fffffffffffffp-1))
+(assert_return (invoke "f64.sqrt" (f64.const 0x1.ffffffffffffdp-1)) (f64.const 0x1.ffffffffffffep-1))
+
 ;; Test that the bitwise floating point operators are bitwise on NaN.
 
-(assert_return_canonical_nan (invoke "f32.abs" (f32.const nan)))
-(assert_return_canonical_nan (invoke "f32.abs" (f32.const -nan)))
-(assert_return_arithmetic_nan (invoke "f32.abs" (f32.const nan:0x0f1e2)))
-(assert_return_arithmetic_nan (invoke "f32.abs" (f32.const -nan:0x0f1e2)))
-(assert_return_canonical_nan (invoke "f64.abs" (f64.const nan)))
-(assert_return_canonical_nan (invoke "f64.abs" (f64.const -nan)))
-(assert_return_arithmetic_nan (invoke "f64.abs" (f64.const nan:0x0f1e27a6b)))
-(assert_return_arithmetic_nan (invoke "f64.abs" (f64.const -nan:0x0f1e27a6b)))
+(assert_return (invoke "f32.abs" (f32.const nan:0x0f1e2)) (f32.const nan:0x0f1e2))
+(assert_return (invoke "f32.abs" (f32.const -nan:0x0f1e2)) (f32.const nan:0x0f1e2))
+(assert_return (invoke "f64.abs" (f64.const nan:0x0f1e27a6b)) (f64.const nan:0x0f1e27a6b))
+(assert_return (invoke "f64.abs" (f64.const -nan:0x0f1e27a6b)) (f64.const nan:0x0f1e27a6b))
 
-(assert_return_canonical_nan (invoke "f32.neg" (f32.const nan)))
-(assert_return_canonical_nan (invoke "f32.neg" (f32.const -nan)))
-(assert_return_arithmetic_nan (invoke "f32.neg" (f32.const nan:0x0f1e2)))
-(assert_return_arithmetic_nan (invoke "f32.neg" (f32.const -nan:0x0f1e2)))
-(assert_return_canonical_nan (invoke "f64.neg" (f64.const nan)))
-(assert_return_canonical_nan (invoke "f64.neg" (f64.const -nan)))
-(assert_return_arithmetic_nan (invoke "f64.neg" (f64.const nan:0x0f1e27a6b)))
-(assert_return_arithmetic_nan (invoke "f64.neg" (f64.const -nan:0x0f1e27a6b)))
+(assert_return (invoke "f32.neg" (f32.const nan:0x0f1e2)) (f32.const -nan:0x0f1e2))
+(assert_return (invoke "f32.neg" (f32.const -nan:0x0f1e2)) (f32.const nan:0x0f1e2))
+(assert_return (invoke "f64.neg" (f64.const nan:0x0f1e27a6b)) (f64.const -nan:0x0f1e27a6b))
+(assert_return (invoke "f64.neg" (f64.const -nan:0x0f1e27a6b)) (f64.const nan:0x0f1e27a6b))
 
-(assert_return_canonical_nan (invoke "f32.copysign" (f32.const nan) (f32.const nan)))
-(assert_return_canonical_nan (invoke "f32.copysign" (f32.const nan) (f32.const -nan)))
-(assert_return_canonical_nan (invoke "f32.copysign" (f32.const -nan) (f32.const nan)))
-(assert_return_canonical_nan (invoke "f32.copysign" (f32.const -nan) (f32.const -nan)))
-(assert_return_arithmetic_nan (invoke "f32.copysign" (f32.const nan:0x0f1e2) (f32.const nan)))
-(assert_return_arithmetic_nan (invoke "f32.copysign" (f32.const nan:0x0f1e2) (f32.const -nan)))
-(assert_return_arithmetic_nan (invoke "f32.copysign" (f32.const -nan:0x0f1e2) (f32.const nan)))
-(assert_return_arithmetic_nan (invoke "f32.copysign" (f32.const -nan:0x0f1e2) (f32.const -nan)))
-(assert_return_canonical_nan (invoke "f64.copysign" (f64.const nan) (f64.const nan)))
-(assert_return_canonical_nan (invoke "f64.copysign" (f64.const nan) (f64.const -nan)))
-(assert_return_canonical_nan (invoke "f64.copysign" (f64.const -nan) (f64.const nan)))
-(assert_return_canonical_nan (invoke "f64.copysign" (f64.const -nan) (f64.const -nan)))
-(assert_return_arithmetic_nan (invoke "f64.copysign" (f64.const nan:0x0f1e27a6b) (f64.const nan)))
-(assert_return_arithmetic_nan (invoke "f64.copysign" (f64.const nan:0x0f1e27a6b) (f64.const -nan)))
-(assert_return_arithmetic_nan (invoke "f64.copysign" (f64.const -nan:0x0f1e27a6b) (f64.const nan)))
-(assert_return_arithmetic_nan (invoke "f64.copysign" (f64.const -nan:0x0f1e27a6b) (f64.const -nan)))
+(assert_return (invoke "f32.copysign" (f32.const nan:0x0f1e2) (f32.const nan)) (f32.const nan:0x0f1e2))
+(assert_return (invoke "f32.copysign" (f32.const nan:0x0f1e2) (f32.const -nan)) (f32.const -nan:0x0f1e2))
+(assert_return (invoke "f32.copysign" (f32.const -nan:0x0f1e2) (f32.const nan)) (f32.const nan:0x0f1e2))
+(assert_return (invoke "f32.copysign" (f32.const -nan:0x0f1e2) (f32.const -nan)) (f32.const -nan:0x0f1e2))
+(assert_return (invoke "f64.copysign" (f64.const nan:0x0f1e27a6b) (f64.const nan)) (f64.const nan:0x0f1e27a6b))
+(assert_return (invoke "f64.copysign" (f64.const nan:0x0f1e27a6b) (f64.const -nan)) (f64.const -nan:0x0f1e27a6b))
+(assert_return (invoke "f64.copysign" (f64.const -nan:0x0f1e27a6b) (f64.const nan)) (f64.const nan:0x0f1e27a6b))
+(assert_return (invoke "f64.copysign" (f64.const -nan:0x0f1e27a6b) (f64.const -nan)) (f64.const -nan:0x0f1e27a6b))
 
-;; Test that ceil isn't implemented as adding 0.5 and rounding to nearest.
+;; Test values close to 1.0.
 (assert_return (invoke "f32.ceil" (f32.const 0x1.fffffep-1)) (f32.const 1.0))
-(assert_return (invoke "f32.ceil" (f32.const 0x1p-126)) (f32.const 1.0))
+(assert_return (invoke "f32.ceil" (f32.const 0x1.000002p+0)) (f32.const 2.0))
 (assert_return (invoke "f64.ceil" (f64.const 0x1.fffffffffffffp-1)) (f64.const 1.0))
-(assert_return (invoke "f64.ceil" (f64.const 0x1p-1022)) (f64.const 1.0))
+(assert_return (invoke "f64.ceil" (f64.const 0x1.0000000000001p+0)) (f64.const 2.0))
 
 ;; Test the maximum and minimum value for which ceil is not an identity operator.
 (assert_return (invoke "f32.ceil" (f32.const 0x1.fffffep+22)) (f32.const 0x1p+23))
@@ -587,11 +620,18 @@
 (assert_return (invoke "f64.ceil" (f64.const 0x1.fffffffffffffp+51)) (f64.const 0x1p+52))
 (assert_return (invoke "f64.ceil" (f64.const -0x1.fffffffffffffp+51)) (f64.const -0x1.ffffffffffffep+51))
 
-;; Test that floor isn't implemented as subtracting 0.5 and rounding to nearest.
+;; Test that implementations don't do the x+0x1p52-0x1p52 trick outside the
+;; range where it's safe.
+(assert_return (invoke "f32.ceil" (f32.const 0x1.fffffep+23)) (f32.const 0x1.fffffep+23))
+(assert_return (invoke "f32.ceil" (f32.const -0x1.fffffep+23)) (f32.const -0x1.fffffep+23))
+(assert_return (invoke "f64.ceil" (f64.const 0x1.fffffffffffffp+52)) (f64.const 0x1.fffffffffffffp+52))
+(assert_return (invoke "f64.ceil" (f64.const -0x1.fffffffffffffp+52)) (f64.const -0x1.fffffffffffffp+52))
+
+;; Test values close to -1.0.
 (assert_return (invoke "f32.floor" (f32.const -0x1.fffffep-1)) (f32.const -1.0))
-(assert_return (invoke "f32.floor" (f32.const -0x1p-126)) (f32.const -1.0))
+(assert_return (invoke "f32.floor" (f32.const -0x1.000002p+0)) (f32.const -2.0))
 (assert_return (invoke "f64.floor" (f64.const -0x1.fffffffffffffp-1)) (f64.const -1.0))
-(assert_return (invoke "f64.floor" (f64.const -0x1p-1022)) (f64.const -1.0))
+(assert_return (invoke "f64.floor" (f64.const -0x1.0000000000001p+0)) (f64.const -2.0))
 
 ;; Test the maximum and minimum value for which floor is not an identity operator.
 (assert_return (invoke "f32.floor" (f32.const -0x1.fffffep+22)) (f32.const -0x1p+23))
@@ -599,6 +639,11 @@
 (assert_return (invoke "f64.floor" (f64.const -0x1.fffffffffffffp+51)) (f64.const -0x1p+52))
 (assert_return (invoke "f64.floor" (f64.const 0x1.fffffffffffffp+51)) (f64.const 0x1.ffffffffffffep+51))
 
+;; Test that floor isn't implemented as XMVectorFloor.
+;; http://dss.stephanierct.com/DevBlog/?p=8#comment-4
+(assert_return (invoke "f32.floor" (f32.const 88607.0)) (f32.const 88607.0))
+(assert_return (invoke "f64.floor" (f64.const 88607.0)) (f64.const 88607.0))
+
 ;; Test the maximum and minimum value for which trunc is not an identity operator.
 (assert_return (invoke "f32.trunc" (f32.const -0x1.fffffep+22)) (f32.const -0x1.fffffcp+22))
 (assert_return (invoke "f32.trunc" (f32.const 0x1.fffffep+22)) (f32.const 0x1.fffffcp+22))
diff --git a/test/WasmSpec/testsuite/core/forward.wast b/test/WasmSpec/testsuite/core/forward.wast
index 43ab493..7074ed7 100644
--- a/test/WasmSpec/testsuite/core/forward.wast
+++ b/test/WasmSpec/testsuite/core/forward.wast
@@ -1,15 +1,15 @@
 (module
   (func $even (export "even") (param $n i32) (result i32)
-    (if i32 (i32.eq (get_local $n) (i32.const 0))
-      (i32.const 1)
-      (call $odd (i32.sub (get_local $n) (i32.const 1)))
+    (if (result i32) (i32.eq (get_local $n) (i32.const 0))
+      (then (i32.const 1))
+      (else (call $odd (i32.sub (get_local $n) (i32.const 1))))
     )
   )
 
   (func $odd (export "odd") (param $n i32) (result i32)
-    (if i32 (i32.eq (get_local $n) (i32.const 0))
-      (i32.const 0)
-      (call $even (i32.sub (get_local $n) (i32.const 1)))
+    (if (result i32) (i32.eq (get_local $n) (i32.const 0))
+      (then (i32.const 0))
+      (else (call $even (i32.sub (get_local $n) (i32.const 1))))
     )
   )
 )
diff --git a/test/WasmSpec/testsuite/core/func-local-after-body.fail.wast b/test/WasmSpec/testsuite/core/func-local-after-body.fail.wast
deleted file mode 100644
index 0c4cf8c..0000000
--- a/test/WasmSpec/testsuite/core/func-local-after-body.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (func (nop) (local i32)))
diff --git a/test/WasmSpec/testsuite/core/func-local-before-param.fail.wast b/test/WasmSpec/testsuite/core/func-local-before-param.fail.wast
deleted file mode 100644
index 66f35eb..0000000
--- a/test/WasmSpec/testsuite/core/func-local-before-param.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (func (local i32) (param i32)))
diff --git a/test/WasmSpec/testsuite/core/func-local-before-result.fail.wast b/test/WasmSpec/testsuite/core/func-local-before-result.fail.wast
deleted file mode 100644
index 52026cf..0000000
--- a/test/WasmSpec/testsuite/core/func-local-before-result.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (func (local i32) (result i32) (get_local 0)))
diff --git a/test/WasmSpec/testsuite/core/func-param-after-body.fail.wast b/test/WasmSpec/testsuite/core/func-param-after-body.fail.wast
deleted file mode 100644
index 399a151..0000000
--- a/test/WasmSpec/testsuite/core/func-param-after-body.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (func (nop) (param i32)))
diff --git a/test/WasmSpec/testsuite/core/func-result-after-body.fail.wast b/test/WasmSpec/testsuite/core/func-result-after-body.fail.wast
deleted file mode 100644
index 9617a2d..0000000
--- a/test/WasmSpec/testsuite/core/func-result-after-body.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (func (nop) (result i32)))
diff --git a/test/WasmSpec/testsuite/core/func-result-before-param.fail.wast b/test/WasmSpec/testsuite/core/func-result-before-param.fail.wast
deleted file mode 100644
index 93a930f..0000000
--- a/test/WasmSpec/testsuite/core/func-result-before-param.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (func (result i32) (param i32) (get_local 0)))
diff --git a/test/WasmSpec/testsuite/core/func.wast b/test/WasmSpec/testsuite/core/func.wast
index a9c71db..87e50f5 100644
--- a/test/WasmSpec/testsuite/core/func.wast
+++ b/test/WasmSpec/testsuite/core/func.wast
@@ -34,7 +34,7 @@
 
   (func $complex
     (param i32 f32) (param $x i64) (param) (param i32)
-    (result i32)
+    (result) (result i32) (result)
     (local f32) (local $y i32) (local i64 i32) (local) (local f64 i32)
     (unreachable) (unreachable)
   )
@@ -97,7 +97,7 @@
   (func (export "value-f64") (result f64) (f64.const 77.77))
   (func (export "value-block-void") (block (call $dummy) (call $dummy)))
   (func (export "value-block-i32") (result i32)
-    (block i32 (call $dummy) (i32.const 77))
+    (block (result i32) (call $dummy) (i32.const 77))
   )
 
   (func (export "return-empty") (return))
@@ -106,7 +106,7 @@
   (func (export "return-f32") (result f32) (return (f32.const 78.7)))
   (func (export "return-f64") (result f64) (return (f64.const 78.78)))
   (func (export "return-block-i32") (result i32)
-    (return (block i32 (call $dummy) (i32.const 77)))
+    (return (block (result i32) (call $dummy) (i32.const 77)))
   )
 
   (func (export "break-empty") (br 0))
@@ -115,7 +115,7 @@
   (func (export "break-f32") (result f32) (br 0 (f32.const 79.9)))
   (func (export "break-f64") (result f64) (br 0 (f64.const 79.79)))
   (func (export "break-block-i32") (result i32)
-    (br 0 (block i32 (call $dummy) (i32.const 77)))
+    (br 0 (block (result i32) (call $dummy) (i32.const 77)))
   )
 
   (func (export "break-br_if-empty") (param i32)
@@ -136,7 +136,9 @@
   )
   (func (export "break-br_table-nested-num") (param i32) (result i32)
     (i32.add
-      (block i32 (br_table 0 1 0 (i32.const 50) (get_local 0)) (i32.const 51))
+      (block (result i32)
+        (br_table 0 1 0 (i32.const 50) (get_local 0)) (i32.const 51)
+      )
       (i32.const 2)
     )
   )
@@ -486,3 +488,30 @@
   "type mismatch"
 )
 
+
+;; Syntax errors
+
+(assert_malformed
+  (module quote "(func (nop) (local i32))")
+  "unexpected token"
+)
+(assert_malformed
+  (module quote "(func (nop) (param i32))")
+  "unexpected token"
+)
+(assert_malformed
+  (module quote "(func (nop) (result i32))")
+  "unexpected token"
+)
+(assert_malformed
+  (module quote "(func (local i32) (param i32))")
+  "unexpected token"
+)
+(assert_malformed
+  (module quote "(func (local i32) (result i32) (get_local 0))")
+  "unexpected token"
+)
+(assert_malformed
+  (module quote "(func (result i32) (param i32) (get_local 0))")
+  "unexpected token"
+)
diff --git a/test/WasmSpec/testsuite/core/globals.wast b/test/WasmSpec/testsuite/core/globals.wast
index 9e90bb5..b8f9c8f 100644
--- a/test/WasmSpec/testsuite/core/globals.wast
+++ b/test/WasmSpec/testsuite/core/globals.wast
@@ -82,11 +82,36 @@
 )
 
 (assert_invalid
+  (module (global f32 (f32.neg (f32.const 1))))
+  "constant expression required"
+)
+
+(assert_invalid
+  (module (global i32 (i32.const 0) (nop)))
+  "constant expression required"
+)
+
+(assert_invalid
+  (module (global i32 (nop)))
+  "constant expression required"
+)
+
+(assert_invalid
   (module (global i32 (f32.const 0)))
   "type mismatch"
 )
 
 (assert_invalid
+  (module (global i32 (i32.const 0) (i32.const 0)))
+  "type mismatch"
+)
+
+(assert_invalid
+  (module (global i32 (;empty instruction sequence;)))
+  "type mismatch"
+)
+
+(assert_invalid
   (module (global i32 (get_global 0)))
   "unknown global"
 )
@@ -100,7 +125,7 @@
   (import "spectest" "global" (global i32))
 )
 (assert_malformed
-  (module
+  (module binary
     "\00asm" "\01\00\00\00"
     "\02\94\80\80\80\00"             ;; import section
       "\01"                          ;; length 1
@@ -113,7 +138,7 @@
   "invalid mutability"
 )
 (assert_malformed
-  (module
+  (module binary
     "\00asm" "\01\00\00\00"
     "\02\94\80\80\80\00"             ;; import section
       "\01"                          ;; length 1
@@ -130,7 +155,7 @@
   (global i32 (i32.const 0))
 )
 (assert_malformed
-  (module
+  (module binary
     "\00asm" "\01\00\00\00"
     "\06\86\80\80\80\00"  ;; global section
       "\01"               ;; length 1
@@ -142,7 +167,7 @@
   "invalid mutability"
 )
 (assert_malformed
-  (module
+  (module binary
     "\00asm" "\01\00\00\00"
     "\06\86\80\80\80\00"  ;; global section
       "\01"               ;; length 1
diff --git a/test/WasmSpec/testsuite/core/i32.load32_s.fail.wast b/test/WasmSpec/testsuite/core/i32.load32_s.fail.wast
deleted file mode 100644
index abf3896..0000000
--- a/test/WasmSpec/testsuite/core/i32.load32_s.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (memory 1) (func (param i32) (result i32) (i32.load32_s (get_local 0))))
diff --git a/test/WasmSpec/testsuite/core/i32.load32_u.fail.wast b/test/WasmSpec/testsuite/core/i32.load32_u.fail.wast
deleted file mode 100644
index 26df003..0000000
--- a/test/WasmSpec/testsuite/core/i32.load32_u.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (memory 1) (func (param i32) (result i32) (i32.load32_u (get_local 0))))
diff --git a/test/WasmSpec/testsuite/core/i32.load64_s.fail.wast b/test/WasmSpec/testsuite/core/i32.load64_s.fail.wast
deleted file mode 100644
index 78fa012..0000000
--- a/test/WasmSpec/testsuite/core/i32.load64_s.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (memory 1) (func (param i32) (result i32) (i32.load64_s (get_local 0))))
diff --git a/test/WasmSpec/testsuite/core/i32.load64_u.fail.wast b/test/WasmSpec/testsuite/core/i32.load64_u.fail.wast
deleted file mode 100644
index 01e8273..0000000
--- a/test/WasmSpec/testsuite/core/i32.load64_u.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (memory 1) (func (param i32) (result i32) (i32.load64_u (get_local 0))))
diff --git a/test/WasmSpec/testsuite/core/i32.store32.fail.wast b/test/WasmSpec/testsuite/core/i32.store32.fail.wast
deleted file mode 100644
index 8a6c528..0000000
--- a/test/WasmSpec/testsuite/core/i32.store32.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (memory 1) (func (param i32) (param i32) (i32.store32 (get_local 0) (get_local 1))))
diff --git a/test/WasmSpec/testsuite/core/i32.store64.fail.wast b/test/WasmSpec/testsuite/core/i32.store64.fail.wast
deleted file mode 100644
index cb176d2..0000000
--- a/test/WasmSpec/testsuite/core/i32.store64.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (memory 1) (func (param i32) (param i64) (i32.store64 (get_local 0) (get_local 1))))
diff --git a/test/WasmSpec/testsuite/core/i32.wast b/test/WasmSpec/testsuite/core/i32.wast
index ba28d7c..bd8722e 100644
--- a/test/WasmSpec/testsuite/core/i32.wast
+++ b/test/WasmSpec/testsuite/core/i32.wast
@@ -57,12 +57,14 @@
 (assert_return (invoke "mul" (i32.const 0x80000000) (i32.const -1)) (i32.const 0x80000000))
 (assert_return (invoke "mul" (i32.const 0x7fffffff) (i32.const -1)) (i32.const 0x80000001))
 (assert_return (invoke "mul" (i32.const 0x01234567) (i32.const 0x76543210)) (i32.const 0x358e7470))
+(assert_return (invoke "mul" (i32.const 0x7fffffff) (i32.const 0x7fffffff)) (i32.const 1))
 
 (assert_trap (invoke "div_s" (i32.const 1) (i32.const 0)) "integer divide by zero")
 (assert_trap (invoke "div_s" (i32.const 0) (i32.const 0)) "integer divide by zero")
 (assert_trap (invoke "div_s" (i32.const 0x80000000) (i32.const -1)) "integer overflow")
 (assert_return (invoke "div_s" (i32.const 1) (i32.const 1)) (i32.const 1))
 (assert_return (invoke "div_s" (i32.const 0) (i32.const 1)) (i32.const 0))
+(assert_return (invoke "div_s" (i32.const 0) (i32.const -1)) (i32.const 0))
 (assert_return (invoke "div_s" (i32.const -1) (i32.const -1)) (i32.const 1))
 (assert_return (invoke "div_s" (i32.const 0x80000000) (i32.const 2)) (i32.const 0xc0000000))
 (assert_return (invoke "div_s" (i32.const 0x80000001) (i32.const 1000)) (i32.const 0xffdf3b65))
@@ -99,6 +101,7 @@
 (assert_return (invoke "rem_s" (i32.const 0x7fffffff) (i32.const -1)) (i32.const 0))
 (assert_return (invoke "rem_s" (i32.const 1) (i32.const 1)) (i32.const 0))
 (assert_return (invoke "rem_s" (i32.const 0) (i32.const 1)) (i32.const 0))
+(assert_return (invoke "rem_s" (i32.const 0) (i32.const -1)) (i32.const 0))
 (assert_return (invoke "rem_s" (i32.const -1) (i32.const -1)) (i32.const 0))
 (assert_return (invoke "rem_s" (i32.const 0x80000000) (i32.const -1)) (i32.const 0))
 (assert_return (invoke "rem_s" (i32.const 0x80000000) (i32.const 2)) (i32.const 0))
@@ -208,19 +211,32 @@
 (assert_return (invoke "shr_u" (i32.const -1) (i32.const 0x7fffffff)) (i32.const 1))
 (assert_return (invoke "shr_u" (i32.const -1) (i32.const 0x80000000)) (i32.const -1))
 
-(assert_return (invoke "rotl" (i32.const 0xfe00dc00) (i32.const 4)) (i32.const 0xe00dc00f))
+(assert_return (invoke "rotl" (i32.const 1) (i32.const 1)) (i32.const 2))
+(assert_return (invoke "rotl" (i32.const 1) (i32.const 0)) (i32.const 1))
+(assert_return (invoke "rotl" (i32.const -1) (i32.const 1)) (i32.const -1))
+(assert_return (invoke "rotl" (i32.const 1) (i32.const 32)) (i32.const 1))
 (assert_return (invoke "rotl" (i32.const 0xabcd9876) (i32.const 1)) (i32.const 0x579b30ed))
+(assert_return (invoke "rotl" (i32.const 0xfe00dc00) (i32.const 4)) (i32.const 0xe00dc00f))
+(assert_return (invoke "rotl" (i32.const 0xb0c1d2e3) (i32.const 5)) (i32.const 0x183a5c76))
 (assert_return (invoke "rotl" (i32.const 0x00008000) (i32.const 37)) (i32.const 0x00100000))
+(assert_return (invoke "rotl" (i32.const 0xb0c1d2e3) (i32.const 0xff05)) (i32.const 0x183a5c76))
+(assert_return (invoke "rotl" (i32.const 0x769abcdf) (i32.const 0xffffffed)) (i32.const 0x579beed3))
 (assert_return (invoke "rotl" (i32.const 0x769abcdf) (i32.const 0x8000000d)) (i32.const 0x579beed3))
 (assert_return (invoke "rotl" (i32.const 1) (i32.const 31)) (i32.const 0x80000000))
 (assert_return (invoke "rotl" (i32.const 0x80000000) (i32.const 1)) (i32.const 1))
 
-(assert_return (invoke "rotr" (i32.const 0xb0c1d2e3) (i32.const 0x0005)) (i32.const 0x1d860e97))
-(assert_return (invoke "rotr" (i32.const 0xb0c1d2e3) (i32.const 0xff05)) (i32.const 0x1d860e97))
+(assert_return (invoke "rotr" (i32.const 1) (i32.const 1)) (i32.const 0x80000000))
+(assert_return (invoke "rotr" (i32.const 1) (i32.const 0)) (i32.const 1))
+(assert_return (invoke "rotr" (i32.const -1) (i32.const 1)) (i32.const -1))
+(assert_return (invoke "rotr" (i32.const 1) (i32.const 32)) (i32.const 1))
 (assert_return (invoke "rotr" (i32.const 0xff00cc00) (i32.const 1)) (i32.const 0x7f806600))
 (assert_return (invoke "rotr" (i32.const 0x00080000) (i32.const 4)) (i32.const 0x00008000))
+(assert_return (invoke "rotr" (i32.const 0xb0c1d2e3) (i32.const 5)) (i32.const 0x1d860e97))
+(assert_return (invoke "rotr" (i32.const 0x00008000) (i32.const 37)) (i32.const 0x00000400))
+(assert_return (invoke "rotr" (i32.const 0xb0c1d2e3) (i32.const 0xff05)) (i32.const 0x1d860e97))
 (assert_return (invoke "rotr" (i32.const 0x769abcdf) (i32.const 0xffffffed)) (i32.const 0xe6fbb4d5))
-(assert_return (invoke "rotr" (i32.const 1) (i32.const 1)) (i32.const 0x80000000))
+(assert_return (invoke "rotr" (i32.const 0x769abcdf) (i32.const 0x8000000d)) (i32.const 0xe6fbb4d5))
+(assert_return (invoke "rotr" (i32.const 1) (i32.const 31)) (i32.const 2))
 (assert_return (invoke "rotr" (i32.const 0x80000000) (i32.const 31)) (i32.const 1))
 
 (assert_return (invoke "clz" (i32.const 0xffffffff)) (i32.const 0))
@@ -252,6 +268,7 @@
 (assert_return (invoke "eqz" (i32.const 1)) (i32.const 0))
 (assert_return (invoke "eqz" (i32.const 0x80000000)) (i32.const 0))
 (assert_return (invoke "eqz" (i32.const 0x7fffffff)) (i32.const 0))
+(assert_return (invoke "eqz" (i32.const 0xffffffff)) (i32.const 0))
 
 (assert_return (invoke "eq" (i32.const 0) (i32.const 0)) (i32.const 1))
 (assert_return (invoke "eq" (i32.const 1) (i32.const 1)) (i32.const 1))
diff --git a/test/WasmSpec/testsuite/core/i64.load64_s.fail.wast b/test/WasmSpec/testsuite/core/i64.load64_s.fail.wast
deleted file mode 100644
index 335bac3..0000000
--- a/test/WasmSpec/testsuite/core/i64.load64_s.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (memory 1) (func (param i32) (result i64) (i64.load64_s (get_local 0))))
diff --git a/test/WasmSpec/testsuite/core/i64.load64_u.fail.wast b/test/WasmSpec/testsuite/core/i64.load64_u.fail.wast
deleted file mode 100644
index b9002e2..0000000
--- a/test/WasmSpec/testsuite/core/i64.load64_u.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (memory 1) (func (param i32) (result i64) (i64.load64_u (get_local 0))))
diff --git a/test/WasmSpec/testsuite/core/i64.store64.fail.wast b/test/WasmSpec/testsuite/core/i64.store64.fail.wast
deleted file mode 100644
index 918761f..0000000
--- a/test/WasmSpec/testsuite/core/i64.store64.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (memory 1) (func (param i32) (param i64) (i64.store64 (get_local 0) (get_local 1))))
diff --git a/test/WasmSpec/testsuite/core/i64.wast b/test/WasmSpec/testsuite/core/i64.wast
index 54b28c4..6bb8a31 100644
--- a/test/WasmSpec/testsuite/core/i64.wast
+++ b/test/WasmSpec/testsuite/core/i64.wast
@@ -57,12 +57,14 @@
 (assert_return (invoke "mul" (i64.const 0x8000000000000000) (i64.const -1)) (i64.const 0x8000000000000000))
 (assert_return (invoke "mul" (i64.const 0x7fffffffffffffff) (i64.const -1)) (i64.const 0x8000000000000001))
 (assert_return (invoke "mul" (i64.const 0x0123456789abcdef) (i64.const 0xfedcba9876543210)) (i64.const 0x2236d88fe5618cf0))
+(assert_return (invoke "mul" (i64.const 0x7fffffffffffffff) (i64.const 0x7fffffffffffffff)) (i64.const 1))
 
 (assert_trap (invoke "div_s" (i64.const 1) (i64.const 0)) "integer divide by zero")
 (assert_trap (invoke "div_s" (i64.const 0) (i64.const 0)) "integer divide by zero")
 (assert_trap (invoke "div_s" (i64.const 0x8000000000000000) (i64.const -1)) "integer overflow")
 (assert_return (invoke "div_s" (i64.const 1) (i64.const 1)) (i64.const 1))
 (assert_return (invoke "div_s" (i64.const 0) (i64.const 1)) (i64.const 0))
+(assert_return (invoke "div_s" (i64.const 0) (i64.const -1)) (i64.const 0))
 (assert_return (invoke "div_s" (i64.const -1) (i64.const -1)) (i64.const 1))
 (assert_return (invoke "div_s" (i64.const 0x8000000000000000) (i64.const 2)) (i64.const 0xc000000000000000))
 (assert_return (invoke "div_s" (i64.const 0x8000000000000001) (i64.const 1000)) (i64.const 0xffdf3b645a1cac09))
@@ -99,6 +101,7 @@
 (assert_return (invoke "rem_s" (i64.const 0x7fffffffffffffff) (i64.const -1)) (i64.const 0))
 (assert_return (invoke "rem_s" (i64.const 1) (i64.const 1)) (i64.const 0))
 (assert_return (invoke "rem_s" (i64.const 0) (i64.const 1)) (i64.const 0))
+(assert_return (invoke "rem_s" (i64.const 0) (i64.const -1)) (i64.const 0))
 (assert_return (invoke "rem_s" (i64.const -1) (i64.const -1)) (i64.const 0))
 (assert_return (invoke "rem_s" (i64.const 0x8000000000000000) (i64.const -1)) (i64.const 0))
 (assert_return (invoke "rem_s" (i64.const 0x8000000000000000) (i64.const 2)) (i64.const 0))
@@ -211,7 +214,13 @@
 (assert_return (invoke "rotl" (i64.const 1) (i64.const 1)) (i64.const 2))
 (assert_return (invoke "rotl" (i64.const 1) (i64.const 0)) (i64.const 1))
 (assert_return (invoke "rotl" (i64.const -1) (i64.const 1)) (i64.const -1))
+(assert_return (invoke "rotl" (i64.const 1) (i64.const 64)) (i64.const 1))
+(assert_return (invoke "rotl" (i64.const 0xabcd987602468ace) (i64.const 1)) (i64.const 0x579b30ec048d159d))
+(assert_return (invoke "rotl" (i64.const 0xfe000000dc000000) (i64.const 4)) (i64.const 0xe000000dc000000f))
+(assert_return (invoke "rotl" (i64.const 0xabcd1234ef567809) (i64.const 53)) (i64.const 0x013579a2469deacf))
 (assert_return (invoke "rotl" (i64.const 0xabd1234ef567809c) (i64.const 63)) (i64.const 0x55e891a77ab3c04e))
+(assert_return (invoke "rotl" (i64.const 0xabcd1234ef567809) (i64.const 0xf5)) (i64.const 0x013579a2469deacf))
+(assert_return (invoke "rotl" (i64.const 0xabcd7294ef567809) (i64.const 0xffffffffffffffed)) (i64.const 0xcf013579ae529dea))
 (assert_return (invoke "rotl" (i64.const 0xabd1234ef567809c) (i64.const 0x800000000000003f)) (i64.const 0x55e891a77ab3c04e))
 (assert_return (invoke "rotl" (i64.const 1) (i64.const 63)) (i64.const 0x8000000000000000))
 (assert_return (invoke "rotl" (i64.const 0x8000000000000000) (i64.const 1)) (i64.const 1))
@@ -219,10 +228,15 @@
 (assert_return (invoke "rotr" (i64.const 1) (i64.const 1)) (i64.const 0x8000000000000000))
 (assert_return (invoke "rotr" (i64.const 1) (i64.const 0)) (i64.const 1))
 (assert_return (invoke "rotr" (i64.const -1) (i64.const 1)) (i64.const -1))
+(assert_return (invoke "rotr" (i64.const 1) (i64.const 64)) (i64.const 1))
+(assert_return (invoke "rotr" (i64.const 0xabcd987602468ace) (i64.const 1)) (i64.const 0x55e6cc3b01234567))
+(assert_return (invoke "rotr" (i64.const 0xfe000000dc000000) (i64.const 4)) (i64.const 0x0fe000000dc00000))
 (assert_return (invoke "rotr" (i64.const 0xabcd1234ef567809) (i64.const 53)) (i64.const 0x6891a77ab3c04d5e))
-(assert_return (invoke "rotr" (i64.const 0xabcd1234ef567809) (i64.const 0x35)) (i64.const 0x6891a77ab3c04d5e))
+(assert_return (invoke "rotr" (i64.const 0xabd1234ef567809c) (i64.const 63)) (i64.const 0x57a2469deacf0139))
 (assert_return (invoke "rotr" (i64.const 0xabcd1234ef567809) (i64.const 0xf5)) (i64.const 0x6891a77ab3c04d5e))
-(assert_return (invoke "rotr" (i64.const 1) (i64.const 1)) (i64.const 0x8000000000000000))
+(assert_return (invoke "rotr" (i64.const 0xabcd7294ef567809) (i64.const 0xffffffffffffffed)) (i64.const 0x94a77ab3c04d5e6b))
+(assert_return (invoke "rotr" (i64.const 0xabd1234ef567809c) (i64.const 0x800000000000003f)) (i64.const 0x57a2469deacf0139))
+(assert_return (invoke "rotr" (i64.const 1) (i64.const 63)) (i64.const 2))
 (assert_return (invoke "rotr" (i64.const 0x8000000000000000) (i64.const 63)) (i64.const 1))
 
 (assert_return (invoke "clz" (i64.const 0xffffffffffffffff)) (i64.const 0))
@@ -254,6 +268,7 @@
 (assert_return (invoke "eqz" (i64.const 1)) (i32.const 0))
 (assert_return (invoke "eqz" (i64.const 0x8000000000000000)) (i32.const 0))
 (assert_return (invoke "eqz" (i64.const 0x7fffffffffffffff)) (i32.const 0))
+(assert_return (invoke "eqz" (i64.const 0xffffffffffffffff)) (i32.const 0))
 
 (assert_return (invoke "eq" (i64.const 0) (i64.const 0)) (i32.const 1))
 (assert_return (invoke "eq" (i64.const 1) (i64.const 1)) (i32.const 1))
diff --git a/test/WasmSpec/testsuite/core/if-else-end-label-mismatch.fail.wast b/test/WasmSpec/testsuite/core/if-else-end-label-mismatch.fail.wast
deleted file mode 100644
index 723f898..0000000
--- a/test/WasmSpec/testsuite/core/if-else-end-label-mismatch.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (func if $a else $l end $l))
diff --git a/test/WasmSpec/testsuite/core/if-else-end-label-superfluous.fail.wast b/test/WasmSpec/testsuite/core/if-else-end-label-superfluous.fail.wast
deleted file mode 100644
index bcdb6f6..0000000
--- a/test/WasmSpec/testsuite/core/if-else-end-label-superfluous.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (func if else $l end $l))
diff --git a/test/WasmSpec/testsuite/core/if-else-label-mismatch.fail.wast b/test/WasmSpec/testsuite/core/if-else-label-mismatch.fail.wast
deleted file mode 100644
index 6d9bfdb..0000000
--- a/test/WasmSpec/testsuite/core/if-else-label-mismatch.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (func if $a else $l end))
diff --git a/test/WasmSpec/testsuite/core/if-else-label-superfluous.fail.wast b/test/WasmSpec/testsuite/core/if-else-label-superfluous.fail.wast
deleted file mode 100644
index e678146..0000000
--- a/test/WasmSpec/testsuite/core/if-else-label-superfluous.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (func if else $l end))
diff --git a/test/WasmSpec/testsuite/core/if-end-label-mismatch.fail.wast b/test/WasmSpec/testsuite/core/if-end-label-mismatch.fail.wast
deleted file mode 100644
index 6598d45..0000000
--- a/test/WasmSpec/testsuite/core/if-end-label-mismatch.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (func if $a end $l))
diff --git a/test/WasmSpec/testsuite/core/if-end-label-superfluous.fail.wast b/test/WasmSpec/testsuite/core/if-end-label-superfluous.fail.wast
deleted file mode 100644
index c111352..0000000
--- a/test/WasmSpec/testsuite/core/if-end-label-superfluous.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (func if end $l))
diff --git a/test/WasmSpec/testsuite/core/if.wast b/test/WasmSpec/testsuite/core/if.wast
index 7ec1f2b..07a9ee2 100644
--- a/test/WasmSpec/testsuite/core/if.wast
+++ b/test/WasmSpec/testsuite/core/if.wast
@@ -14,24 +14,24 @@
   (func (export "singular") (param i32) (result i32)
     (if (get_local 0) (then (nop)))
     (if (get_local 0) (then (nop)) (else (nop)))
-    (if i32 (get_local 0) (then (i32.const 7)) (else (i32.const 8)))
+    (if (result i32) (get_local 0) (then (i32.const 7)) (else (i32.const 8)))
   )
 
   (func (export "multi") (param i32) (result i32)
     (if (get_local 0) (then (call $dummy) (call $dummy) (call $dummy)))
     (if (get_local 0) (then) (else (call $dummy) (call $dummy) (call $dummy)))
-    (if i32 (get_local 0)
+    (if (result i32) (get_local 0)
       (then (call $dummy) (call $dummy) (i32.const 8))
       (else (call $dummy) (call $dummy) (i32.const 9))
     )
   )
 
   (func (export "nested") (param i32 i32) (result i32)
-    (if i32 (get_local 0)
+    (if (result i32) (get_local 0)
       (then
         (if (get_local 1) (then (call $dummy) (block) (nop)))
         (if (get_local 1) (then) (else (call $dummy) (block) (nop)))
-        (if i32 (get_local 1)
+        (if (result i32) (get_local 1)
           (then (call $dummy) (i32.const 9))
           (else (call $dummy) (i32.const 10))
         )
@@ -39,7 +39,7 @@
       (else
         (if (get_local 1) (then (call $dummy) (block) (nop)))
         (if (get_local 1) (then) (else (call $dummy) (block) (nop)))
-        (if i32 (get_local 1)
+        (if (result i32) (get_local 1)
           (then (call $dummy) (i32.const 10))
           (else (call $dummy) (i32.const 11))
         )
@@ -49,7 +49,7 @@
 
   (func (export "as-unary-operand") (param i32) (result i32)
     (i32.ctz
-      (if i32 (get_local 0)
+      (if (result i32) (get_local 0)
         (then (call $dummy) (i32.const 13))
         (else (call $dummy) (i32.const -13))
       )
@@ -57,11 +57,11 @@
   )
   (func (export "as-binary-operand") (param i32 i32) (result i32)
     (i32.mul
-      (if i32 (get_local 0)
+      (if (result i32) (get_local 0)
         (then (call $dummy) (i32.const 3))
         (else (call $dummy) (i32.const -3))
       )
-      (if i32 (get_local 1)
+      (if (result i32) (get_local 1)
         (then (call $dummy) (i32.const 4))
         (else (call $dummy) (i32.const -5))
       )
@@ -69,7 +69,7 @@
   )
   (func (export "as-test-operand") (param i32) (result i32)
     (i32.eqz
-      (if i32 (get_local 0)
+      (if (result i32) (get_local 0)
         (then (call $dummy) (i32.const 13))
         (else (call $dummy) (i32.const 0))
       )
@@ -77,11 +77,11 @@
   )
   (func (export "as-compare-operand") (param i32 i32) (result i32)
     (f32.gt
-      (if f32 (get_local 0)
+      (if (result f32) (get_local 0)
         (then (call $dummy) (f32.const 3))
         (else (call $dummy) (f32.const -3))
       )
-      (if f32 (get_local 1)
+      (if (result f32) (get_local 1)
         (then (call $dummy) (f32.const 4))
         (else (call $dummy) (f32.const -4))
       )
@@ -102,7 +102,7 @@
   )
 
   (func (export "break-value") (param i32) (result i32)
-    (if i32 (get_local 0)
+    (if (result i32) (get_local 0)
       (then (br 0 (i32.const 18)) (i32.const 19))
       (else (br 0 (i32.const 21)) (i32.const 20))
     )
@@ -111,7 +111,7 @@
   (func (export "effects") (param i32) (result i32)
     (local i32)
     (if
-      (block i32 (set_local 1 (i32.const 1)) (get_local 0))
+      (block (result i32) (set_local 1 (i32.const 1)) (get_local 0))
       (then
         (set_local 1 (i32.mul (get_local 1) (i32.const 3)))
         (set_local 1 (i32.sub (get_local 1) (i32.const 5)))
@@ -240,76 +240,76 @@
 
 (assert_invalid
   (module (func $type-then-value-empty-vs-num (result i32)
-    (if i32 (i32.const 1) (then) (else (i32.const 0)))
+    (if (result i32) (i32.const 1) (then) (else (i32.const 0)))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-then-value-empty-vs-num (result i32)
-    (if i32 (i32.const 1) (then (i32.const 0)) (else))
+    (if (result i32) (i32.const 1) (then (i32.const 0)) (else))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-both-value-empty-vs-num (result i32)
-    (if i32 (i32.const 1) (then) (else))
+    (if (result i32) (i32.const 1) (then) (else))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-no-else-vs-num (result i32)
-    (if i32 (i32.const 1) (then (i32.const 1)))
+    (if (result i32) (i32.const 1) (then (i32.const 1)))
   ))
   "type mismatch"
 )
 
 (assert_invalid
   (module (func $type-then-value-void-vs-num (result i32)
-    (if i32 (i32.const 1) (then (nop)) (else (i32.const 0)))
+    (if (result i32) (i32.const 1) (then (nop)) (else (i32.const 0)))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-then-value-void-vs-num (result i32)
-    (if i32 (i32.const 1) (then (i32.const 0)) (else (nop)))
+    (if (result i32) (i32.const 1) (then (i32.const 0)) (else (nop)))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-both-value-void-vs-num (result i32)
-    (if i32 (i32.const 1) (then (nop)) (else (nop)))
+    (if (result i32) (i32.const 1) (then (nop)) (else (nop)))
   ))
   "type mismatch"
 )
 
 (assert_invalid
   (module (func $type-then-value-num-vs-num (result i32)
-    (if i32 (i32.const 1) (then (i64.const 1)) (else (i32.const 1)))
+    (if (result i32) (i32.const 1) (then (i64.const 1)) (else (i32.const 1)))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-then-value-num-vs-num (result i32)
-    (if i32 (i32.const 1) (then (i32.const 1)) (else (i64.const 1)))
+    (if (result i32) (i32.const 1) (then (i32.const 1)) (else (i64.const 1)))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-both-value-num-vs-num (result i32)
-    (if i32 (i32.const 1) (then (i64.const 1)) (else (i64.const 1)))
+    (if (result i32) (i32.const 1) (then (i64.const 1)) (else (i64.const 1)))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-both-different-value-num-vs-num (result i32)
-    (if i32 (i32.const 1) (then (i64.const 1)) (else (f64.const 1)))
+    (if (result i32) (i32.const 1) (then (i64.const 1)) (else (f64.const 1)))
   ))
   "type mismatch"
 )
 
 (assert_invalid
   (module (func $type-then-value-unreached-select (result i32)
-    (if i64
+    (if (result i64)
       (i32.const 0)
       (then (select (unreachable) (unreachable) (unreachable)))
       (else (i64.const 0))
@@ -319,7 +319,7 @@
 )
 (assert_invalid
   (module (func $type-else-value-unreached-select (result i32)
-    (if i64
+    (if (result i64)
       (i32.const 1)
       (then (i64.const 0))
       (else (select (unreachable) (unreachable) (unreachable)))
@@ -329,7 +329,7 @@
 )
 (assert_invalid
   (module (func $type-else-value-unreached-select (result i32)
-    (if i64
+    (if (result i64)
       (i32.const 1)
       (then (select (unreachable) (unreachable) (unreachable)))
       (else (select (unreachable) (unreachable) (unreachable)))
@@ -340,50 +340,110 @@
 
 (assert_invalid
   (module (func $type-then-break-last-void-vs-num (result i32)
-    (if i32 (i32.const 1) (then (br 0)) (else (i32.const 1)))
+    (if (result i32) (i32.const 1) (then (br 0)) (else (i32.const 1)))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-else-break-last-void-vs-num (result i32)
-    (if i32 (i32.const 1) (then (i32.const 1)) (else (br 0)))
+    (if (result i32) (i32.const 1) (then (i32.const 1)) (else (br 0)))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-then-break-empty-vs-num (result i32)
-    (if i32 (i32.const 1) (then (br 0) (i32.const 1)) (else (i32.const 1)))
+    (if (result i32) (i32.const 1)
+      (then (br 0) (i32.const 1))
+      (else (i32.const 1))
+    )
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-else-break-empty-vs-num (result i32)
-    (if i32 (i32.const 1) (then (i32.const 1)) (else (br 0) (i32.const 1)))
+    (if (result i32) (i32.const 1)
+      (then (i32.const 1))
+      (else (br 0) (i32.const 1))
+    )
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-then-break-void-vs-num (result i32)
-    (if i32 (i32.const 1) (then (br 0 (nop)) (i32.const 1)) (else (i32.const 1)))
+    (if (result i32) (i32.const 1)
+      (then (br 0 (nop)) (i32.const 1))
+      (else (i32.const 1))
+    )
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-else-break-void-vs-num (result i32)
-    (if i32 (i32.const 1) (then (i32.const 1)) (else (br 0 (nop)) (i32.const 1)))
+    (if (result i32) (i32.const 1)
+      (then (i32.const 1))
+      (else (br 0 (nop)) (i32.const 1))
+    )
   ))
   "type mismatch"
 )
 
 (assert_invalid
   (module (func $type-then-break-num-vs-num (result i32)
-    (if i32 (i32.const 1) (then (br 0 (i64.const 1)) (i32.const 1)) (else (i32.const 1)))
+    (if (result i32) (i32.const 1)
+      (then (br 0 (i64.const 1)) (i32.const 1))
+      (else (i32.const 1))
+    )
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-else-break-num-vs-num (result i32)
-    (if i32 (i32.const 1) (then (i32.const 1)) (else (br 0 (i64.const 1)) (i32.const 1)))
+    (if (result i32) (i32.const 1)
+      (then (i32.const 1))
+      (else (br 0 (i64.const 1)) (i32.const 1))
+    )
   ))
   "type mismatch"
 )
+
+
+(assert_malformed
+  (module quote "(func if end $l)")
+  "mismatching label"
+)
+(assert_malformed
+  (module quote "(func if $a end $l)")
+  "mismatching label"
+)
+(assert_malformed
+  (module quote "(func if else $l end)")
+  "mismatching label"
+)
+(assert_malformed
+  (module quote "(func if $a else $l end)")
+  "mismatching label"
+)
+(assert_malformed
+  (module quote "(func if else end $l)")
+  "mismatching label"
+)
+(assert_malformed
+  (module quote "(func if else $l end $l)")
+  "mismatching label"
+)
+(assert_malformed
+  (module quote "(func if else $l1 end $l2)")
+  "mismatching label"
+)
+(assert_malformed
+  (module quote "(func if $a else end $l)")
+  "mismatching label"
+)
+(assert_malformed
+  (module quote "(func if $a else $a end $l)")
+  "mismatching label"
+)
+(assert_malformed
+  (module quote "(func if $a else $l end $l)")
+  "mismatching label"
+)
diff --git a/test/WasmSpec/testsuite/core/import-after-func.fail.wast b/test/WasmSpec/testsuite/core/import-after-func.fail.wast
deleted file mode 100644
index ece33a7..0000000
--- a/test/WasmSpec/testsuite/core/import-after-func.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (func) (import "" "" (memory 0)))
diff --git a/test/WasmSpec/testsuite/core/import-after-global.fail.wast b/test/WasmSpec/testsuite/core/import-after-global.fail.wast
deleted file mode 100644
index 09cece1..0000000
--- a/test/WasmSpec/testsuite/core/import-after-global.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (global i64) (import "" "" (table 0 anyfunc)))
diff --git a/test/WasmSpec/testsuite/core/import-after-memory.fail.wast b/test/WasmSpec/testsuite/core/import-after-memory.fail.wast
deleted file mode 100644
index fbe582a..0000000
--- a/test/WasmSpec/testsuite/core/import-after-memory.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (memory 0) (import "" "" (global i32)))
diff --git a/test/WasmSpec/testsuite/core/import-after-table.fail.wast b/test/WasmSpec/testsuite/core/import-after-table.fail.wast
deleted file mode 100644
index bcd747a..0000000
--- a/test/WasmSpec/testsuite/core/import-after-table.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (table 0 anyfunc) (import "" "" (func)))
diff --git a/test/WasmSpec/testsuite/core/imports.wast b/test/WasmSpec/testsuite/core/imports.wast
index 8110959..69ccd0b 100644
--- a/test/WasmSpec/testsuite/core/imports.wast
+++ b/test/WasmSpec/testsuite/core/imports.wast
@@ -41,6 +41,12 @@
   (func $print_f64-2 (import "spectest" "print") (param f64))
   (import "test" "func-i64->i64" (func $i64->i64 (param i64) (result i64)))
 
+  (func (export "p1") (import "spectest" "print") (param i32))
+  (func $p (export "p2") (import "spectest" "print") (param i32))
+  (func (export "p3") (export "p4") (import "spectest" "print") (param i32))
+  (func (export "p5") (import "spectest" "print") (type 0))
+  (func (export "p6") (import "spectest" "print") (type 0) (param i32) (result))
+
   (table anyfunc (elem $print_i32 $print_f64))
 
   (func (export "print32") (param $i i32)
@@ -471,3 +477,74 @@
 (assert_return (invoke "grow" (i32.const 0)) (i32.const 2))
 (assert_return (invoke "grow" (i32.const 1)) (i32.const -1))
 (assert_return (invoke "grow" (i32.const 0)) (i32.const 2))
+
+
+;; Syntax errors
+
+(assert_malformed
+  (module quote "(func) (import \"\" \"\" (func))")
+  "import after function"
+)
+(assert_malformed
+  (module quote "(func) (import \"\" \"\" (global i64))")
+  "import after function"
+)
+(assert_malformed
+  (module quote "(func) (import \"\" \"\" (table 0 anyfunc))")
+  "import after function"
+)
+(assert_malformed
+  (module quote "(func) (import \"\" \"\" (memory 0))")
+  "import after function"
+)
+
+(assert_malformed
+  (module quote "(global i64 (i64.const 0)) (import \"\" \"\" (func))")
+  "import after global"
+)
+(assert_malformed
+  (module quote "(global i64 (i64.const 0)) (import \"\" \"\" (global f32))")
+  "import after global"
+)
+(assert_malformed
+  (module quote "(global i64 (i64.const 0)) (import \"\" \"\" (table 0 anyfunc))")
+  "import after global"
+)
+(assert_malformed
+  (module quote "(global i64 (i64.const 0)) (import \"\" \"\" (memory 0))")
+  "import after global"
+)
+
+(assert_malformed
+  (module quote "(table 0 anyfunc) (import \"\" \"\" (func))")
+  "import after table"
+)
+(assert_malformed
+  (module quote "(table 0 anyfunc) (import \"\" \"\" (global i32))")
+  "import after table"
+)
+(assert_malformed
+  (module quote "(table 0 anyfunc) (import \"\" \"\" (table 0 anyfunc))")
+  "import after table"
+)
+(assert_malformed
+  (module quote "(table 0 anyfunc) (import \"\" \"\" (memory 0))")
+  "import after table"
+)
+
+(assert_malformed
+  (module quote "(memory 0) (import \"\" \"\" (func))")
+  "import after memory"
+)
+(assert_malformed
+  (module quote "(memory 0) (import \"\" \"\" (global i32))")
+  "import after memory"
+)
+(assert_malformed
+  (module quote "(memory 0) (import \"\" \"\" (table 1 3 anyfunc))")
+  "import after memory"
+)
+(assert_malformed
+  (module quote "(memory 0) (import \"\" \"\" (memory 1 2))")
+  "import after memory"
+)
diff --git a/test/WasmSpec/testsuite/core/inline-module.wast b/test/WasmSpec/testsuite/core/inline-module.wast
new file mode 100644
index 0000000..dc7ead7
--- /dev/null
+++ b/test/WasmSpec/testsuite/core/inline-module.wast
@@ -0,0 +1 @@
+(func) (memory 0) (func (export "f"))
diff --git a/test/WasmSpec/testsuite/core/int_exprs.wast b/test/WasmSpec/testsuite/core/int_exprs.wast
index d8272fa..99396a8 100644
--- a/test/WasmSpec/testsuite/core/int_exprs.wast
+++ b/test/WasmSpec/testsuite/core/int_exprs.wast
@@ -1,7 +1,7 @@
 ;; Test interesting integer "expressions". These tests contain code
 ;; patterns which tempt common value-changing optimizations.
 
-;; Test that x+1<y+1 is not folded to x<y
+;; Test that x+1<y+1 is not folded to x<y.
 
 (module
   (func (export "i32.no_fold_cmp_s_offset") (param $x i32) (param $y i32) (result i32)
@@ -20,7 +20,7 @@
 (assert_return (invoke "i64.no_fold_cmp_s_offset" (i64.const 0x7fffffffffffffff) (i64.const 0)) (i32.const 1))
 (assert_return (invoke "i64.no_fold_cmp_u_offset" (i64.const 0xffffffffffffffff) (i64.const 0)) (i32.const 1))
 
-;; Test that wrap(extend_s(x)) is not folded to x
+;; Test that wrap(extend_s(x)) is not folded to x.
 
 (module
   (func (export "i64.no_fold_wrap_extend_s") (param $x i64) (result i64)
@@ -30,7 +30,7 @@
 (assert_return (invoke "i64.no_fold_wrap_extend_s" (i64.const 0x0010203040506070)) (i64.const 0x0000000040506070))
 (assert_return (invoke "i64.no_fold_wrap_extend_s" (i64.const 0x00a0b0c0d0e0f0a0)) (i64.const 0xffffffffd0e0f0a0))
 
-;; Test that wrap(extend_u(x)) is not folded to x
+;; Test that wrap(extend_u(x)) is not folded to x.
 
 (module
   (func (export "i64.no_fold_wrap_extend_u") (param $x i64) (result i64)
@@ -39,7 +39,7 @@
 
 (assert_return (invoke "i64.no_fold_wrap_extend_u" (i64.const 0x0010203040506070)) (i64.const 0x0000000040506070))
 
-;; Test that x<<n>>n is not folded to x
+;; Test that x<<n>>n is not folded to x.
 
 (module
   (func (export "i32.no_fold_shl_shr_s") (param $x i32) (result i32)
@@ -58,7 +58,7 @@
 (assert_return (invoke "i64.no_fold_shl_shr_s" (i64.const 0x8000000000000000)) (i64.const 0))
 (assert_return (invoke "i64.no_fold_shl_shr_u" (i64.const 0x8000000000000000)) (i64.const 0))
 
-;; Test that x>>n<<n is not folded to x
+;; Test that x>>n<<n is not folded to x.
 
 (module
   (func (export "i32.no_fold_shr_s_shl") (param $x i32) (result i32)
@@ -77,7 +77,7 @@
 (assert_return (invoke "i64.no_fold_shr_s_shl" (i64.const 1)) (i64.const 0))
 (assert_return (invoke "i64.no_fold_shr_u_shl" (i64.const 1)) (i64.const 0))
 
-;; Test that x/n*n is not folded to x
+;; Test that x/n*n is not folded to x.
 
 (module
   (func (export "i32.no_fold_div_s_mul") (param $x i32) (result i32)
@@ -96,7 +96,45 @@
 (assert_return (invoke "i64.no_fold_div_s_mul" (i64.const 1)) (i64.const 0))
 (assert_return (invoke "i64.no_fold_div_u_mul" (i64.const 1)) (i64.const 0))
 
-;; Test that x*n/n is not folded to x
+;; Test that x/x is not folded to 1.
+
+(module
+  (func (export "i32.no_fold_div_s_self") (param $x i32) (result i32)
+    (i32.div_s (get_local $x) (get_local $x)))
+  (func (export "i32.no_fold_div_u_self") (param $x i32) (result i32)
+    (i32.div_u (get_local $x) (get_local $x)))
+
+  (func (export "i64.no_fold_div_s_self") (param $x i64) (result i64)
+    (i64.div_s (get_local $x) (get_local $x)))
+  (func (export "i64.no_fold_div_u_self") (param $x i64) (result i64)
+    (i64.div_u (get_local $x) (get_local $x)))
+)
+
+(assert_trap (invoke "i32.no_fold_div_s_self" (i32.const 0)) "integer divide by zero")
+(assert_trap (invoke "i32.no_fold_div_u_self" (i32.const 0)) "integer divide by zero")
+(assert_trap (invoke "i64.no_fold_div_s_self" (i64.const 0)) "integer divide by zero")
+(assert_trap (invoke "i64.no_fold_div_u_self" (i64.const 0)) "integer divide by zero")
+
+;; Test that x%x is not folded to 0.
+
+(module
+  (func (export "i32.no_fold_rem_s_self") (param $x i32) (result i32)
+    (i32.rem_s (get_local $x) (get_local $x)))
+  (func (export "i32.no_fold_rem_u_self") (param $x i32) (result i32)
+    (i32.rem_u (get_local $x) (get_local $x)))
+
+  (func (export "i64.no_fold_rem_s_self") (param $x i64) (result i64)
+    (i64.rem_s (get_local $x) (get_local $x)))
+  (func (export "i64.no_fold_rem_u_self") (param $x i64) (result i64)
+    (i64.rem_u (get_local $x) (get_local $x)))
+)
+
+(assert_trap (invoke "i32.no_fold_rem_s_self" (i32.const 0)) "integer divide by zero")
+(assert_trap (invoke "i32.no_fold_rem_u_self" (i32.const 0)) "integer divide by zero")
+(assert_trap (invoke "i64.no_fold_rem_s_self" (i64.const 0)) "integer divide by zero")
+(assert_trap (invoke "i64.no_fold_rem_u_self" (i64.const 0)) "integer divide by zero")
+
+;; Test that x*n/n is not folded to x.
 
 (module
   (func (export "i32.no_fold_mul_div_s") (param $x i32) (result i32)
@@ -115,7 +153,7 @@
 (assert_return (invoke "i64.no_fold_mul_div_s" (i64.const 0x8000000000000000)) (i64.const 0))
 (assert_return (invoke "i64.no_fold_mul_div_u" (i64.const 0x8000000000000000)) (i64.const 0))
 
-;; Test that x/n where n is a known power of 2 is not folded to shr_s
+;; Test that x/n where n is a known power of 2 is not folded to shr_s.
 
 (module
   (func (export "i32.no_fold_div_s_2") (param $x i32) (result i32)
@@ -128,7 +166,7 @@
 (assert_return (invoke "i32.no_fold_div_s_2" (i32.const -11)) (i32.const -5))
 (assert_return (invoke "i64.no_fold_div_s_2" (i64.const -11)) (i64.const -5))
 
-;; Test that x%n where n is a known power of 2 is not folded to and
+;; Test that x%n where n is a known power of 2 is not folded to and.
 
 (module
   (func (export "i32.no_fold_rem_s_2") (param $x i32) (result i32)
@@ -141,26 +179,26 @@
 (assert_return (invoke "i32.no_fold_rem_s_2" (i32.const -11)) (i32.const -1))
 (assert_return (invoke "i64.no_fold_rem_s_2" (i64.const -11)) (i64.const -1))
 
-;; Test that x/0 works
+;; Test that x/0 works.
 
 (module
-  (func (export "i32.div_s_3") (param $x i32) (result i32)
+  (func (export "i32.div_s_0") (param $x i32) (result i32)
     (i32.div_s (get_local $x) (i32.const 0)))
-  (func (export "i32.div_u_3") (param $x i32) (result i32)
+  (func (export "i32.div_u_0") (param $x i32) (result i32)
     (i32.div_u (get_local $x) (i32.const 0)))
 
-  (func (export "i64.div_s_3") (param $x i64) (result i64)
+  (func (export "i64.div_s_0") (param $x i64) (result i64)
     (i64.div_s (get_local $x) (i64.const 0)))
-  (func (export "i64.div_u_3") (param $x i64) (result i64)
+  (func (export "i64.div_u_0") (param $x i64) (result i64)
     (i64.div_u (get_local $x) (i64.const 0)))
 )
 
-(assert_trap (invoke "i32.div_s_3" (i32.const 71)) "integer divide by zero")
-(assert_trap (invoke "i32.div_u_3" (i32.const 71)) "integer divide by zero")
-(assert_trap (invoke "i64.div_s_3" (i64.const 71)) "integer divide by zero")
-(assert_trap (invoke "i64.div_u_3" (i64.const 71)) "integer divide by zero")
+(assert_trap (invoke "i32.div_s_0" (i32.const 71)) "integer divide by zero")
+(assert_trap (invoke "i32.div_u_0" (i32.const 71)) "integer divide by zero")
+(assert_trap (invoke "i64.div_s_0" (i64.const 71)) "integer divide by zero")
+(assert_trap (invoke "i64.div_u_0" (i64.const 71)) "integer divide by zero")
 
-;; Test that x/3 works
+;; Test that x/3 works.
 
 (module
   (func (export "i32.div_s_3") (param $x i32) (result i32)
@@ -183,7 +221,7 @@
 (assert_return (invoke "i64.div_u_3" (i64.const 71)) (i64.const 23))
 (assert_return (invoke "i64.div_u_3" (i64.const 0xc000000000000000)) (i64.const 0x4000000000000000))
 
-;; Test that x/5 works
+;; Test that x/5 works.
 
 (module
   (func (export "i32.div_s_5") (param $x i32) (result i32)
@@ -206,7 +244,7 @@
 (assert_return (invoke "i64.div_u_5" (i64.const 71)) (i64.const 14))
 (assert_return (invoke "i64.div_u_5" (i64.const 0xa000000000000000)) (i64.const 0x2000000000000000))
 
-;; Test that x/7 works
+;; Test that x/7 works.
 
 (module
   (func (export "i32.div_s_7") (param $x i32) (result i32)
@@ -229,7 +267,7 @@
 (assert_return (invoke "i64.div_u_7" (i64.const 71)) (i64.const 10))
 (assert_return (invoke "i64.div_u_7" (i64.const 0xe000000000000000)) (i64.const 0x2000000000000000))
 
-;; Test that x%3 works
+;; Test that x%3 works.
 
 (module
   (func (export "i32.rem_s_3") (param $x i32) (result i32)
@@ -252,7 +290,7 @@
 (assert_return (invoke "i64.rem_u_3" (i64.const 71)) (i64.const 2))
 (assert_return (invoke "i64.rem_u_3" (i64.const 0xc000000000000000)) (i64.const 0))
 
-;; Test that x%5 works
+;; Test that x%5 works.
 
 (module
   (func (export "i32.rem_s_5") (param $x i32) (result i32)
@@ -275,7 +313,7 @@
 (assert_return (invoke "i64.rem_u_5" (i64.const 71)) (i64.const 1))
 (assert_return (invoke "i64.rem_u_5" (i64.const 0xa000000000000000)) (i64.const 0))
 
-;; Test that x%7 works
+;; Test that x%7 works.
 
 (module
   (func (export "i32.rem_s_7") (param $x i32) (result i32)
@@ -297,3 +335,16 @@
 (assert_return (invoke "i64.rem_s_7" (i64.const 0x7000000000000000)) (i64.const 0))
 (assert_return (invoke "i64.rem_u_7" (i64.const 71)) (i64.const 1))
 (assert_return (invoke "i64.rem_u_7" (i64.const 0xe000000000000000)) (i64.const 0))
+
+;; Test that x/-1 is not folded to -x.
+
+(module
+  (func (export "i32.no_fold_div_neg1") (param $x i32) (result i32)
+    (i32.div_s (get_local $x) (i32.const -1)))
+
+  (func (export "i64.no_fold_div_neg1") (param $x i64) (result i64)
+    (i64.div_s (get_local $x) (i64.const -1)))
+)
+
+(assert_trap (invoke "i32.no_fold_div_neg1" (i32.const 0x80000000)) "integer overflow")
+(assert_trap (invoke "i64.no_fold_div_neg1" (i64.const 0x8000000000000000)) "integer overflow")
diff --git a/test/WasmSpec/testsuite/core/labels.wast b/test/WasmSpec/testsuite/core/labels.wast
index 03e5bf7..02fea5f 100644
--- a/test/WasmSpec/testsuite/core/labels.wast
+++ b/test/WasmSpec/testsuite/core/labels.wast
@@ -1,6 +1,6 @@
 (module
   (func (export "block") (result i32)
-    (block $exit i32
+    (block $exit (result i32)
       (br $exit (i32.const 1))
       (i32.const 0)
     )
@@ -9,11 +9,11 @@
   (func (export "loop1") (result i32)
     (local $i i32)
     (set_local $i (i32.const 0))
-    (block $exit i32
-      (loop $cont i32
+    (block $exit (result i32)
+      (loop $cont (result i32)
         (set_local $i (i32.add (get_local $i) (i32.const 1)))
         (if (i32.eq (get_local $i) (i32.const 5))
-          (br $exit (get_local $i))
+          (then (br $exit (get_local $i)))
         )
         (br $cont)
       )
@@ -23,14 +23,14 @@
   (func (export "loop2") (result i32)
     (local $i i32)
     (set_local $i (i32.const 0))
-    (block $exit i32
-      (loop $cont i32
+    (block $exit (result i32)
+      (loop $cont (result i32)
         (set_local $i (i32.add (get_local $i) (i32.const 1)))
         (if (i32.eq (get_local $i) (i32.const 5))
-          (br $cont)
+          (then (br $cont))
         )
         (if (i32.eq (get_local $i) (i32.const 8))
-          (br $exit (get_local $i))
+          (then (br $exit (get_local $i)))
         )
         (set_local $i (i32.add (get_local $i) (i32.const 1)))
         (br $cont)
@@ -41,11 +41,11 @@
   (func (export "loop3") (result i32)
     (local $i i32)
     (set_local $i (i32.const 0))
-    (block $exit i32
-      (loop $cont i32
+    (block $exit (result i32)
+      (loop $cont (result i32)
         (set_local $i (i32.add (get_local $i) (i32.const 1)))
         (if (i32.eq (get_local $i) (i32.const 5))
-          (br $exit (get_local $i))
+          (then (br $exit (get_local $i)))
         )
         (get_local $i)
       )
@@ -55,11 +55,11 @@
   (func (export "loop4") (param $max i32) (result i32)
     (local $i i32)
     (set_local $i (i32.const 1))
-    (block $exit i32
-      (loop $cont i32
+    (block $exit (result i32)
+      (loop $cont (result i32)
         (set_local $i (i32.add (get_local $i) (get_local $i)))
         (if (i32.gt_u (get_local $i) (get_local $max))
-          (br $exit (get_local $i))
+          (then (br $exit (get_local $i)))
         )
         (br $cont)
       )
@@ -68,7 +68,7 @@
 
   (func (export "loop5") (result i32)
     (i32.add
-      (loop $l i32 (i32.const 1))
+      (loop $l (result i32) (i32.const 1))
       (i32.const 1)
     )
   )
@@ -148,9 +148,9 @@
   )
 
   (func (export "switch") (param i32) (result i32)
-    (block $ret i32
+    (block $ret (result i32)
       (i32.mul (i32.const 10)
-        (block $exit i32
+        (block $exit (result i32)
           (block $0
             (block $default
               (block $3
@@ -186,7 +186,7 @@
   (func (export "br_if0") (result i32)
     (local $i i32)
     (set_local $i (i32.const 0))
-    (block $outer i32
+    (block $outer (result i32)
       (block $inner
         (br_if $inner (i32.const 0))
         (set_local $i (i32.or (get_local $i) (i32.const 0x1)))
@@ -194,7 +194,7 @@
         (set_local $i (i32.or (get_local $i) (i32.const 0x2)))
       )
       (drop (br_if $outer
-        (block i32
+        (block (result i32)
           (set_local $i (i32.or (get_local $i) (i32.const 0x4)))
           (get_local $i)
         )
@@ -202,7 +202,7 @@
       ))
       (set_local $i (i32.or (get_local $i) (i32.const 0x8)))
       (drop (br_if $outer
-        (block i32
+        (block (result i32)
           (set_local $i (i32.or (get_local $i) (i32.const 0x10)))
           (get_local $i)
         )
@@ -213,16 +213,21 @@
   )
 
   (func (export "br_if1") (result i32)
-    (block $l0 i32
-      (drop (br_if $l0 (block $l1 i32 (br $l1 (i32.const 1))) (i32.const 1)))
+    (block $l0 (result i32)
+      (drop
+        (br_if $l0
+          (block $l1 (result i32) (br $l1 (i32.const 1)))
+          (i32.const 1)
+        )
+      )
       (i32.const 1)
     )
   )
 
   (func (export "br_if2") (result i32)
-    (block $l0 i32
+    (block $l0 (result i32)
       (if (i32.const 1)
-        (br $l0 (block $l1 i32 (br $l1 (i32.const 1))))
+        (then (br $l0 (block $l1 (result i32) (br $l1 (i32.const 1)))))
       )
       (i32.const 1)
     )
@@ -232,10 +237,10 @@
     (local $i1 i32)
     (drop
       (i32.add
-        (block $l0 i32
+        (block $l0 (result i32)
           (drop (br_if $l0
-            (block i32 (set_local $i1 (i32.const 1)) (get_local $i1))
-            (block i32 (set_local $i1 (i32.const 2)) (get_local $i1))
+            (block (result i32) (set_local $i1 (i32.const 1)) (get_local $i1))
+            (block (result i32) (set_local $i1 (i32.const 2)) (get_local $i1))
           ))
           (i32.const 0)
         )
@@ -246,24 +251,24 @@
   )
 
   (func (export "br") (result i32)
-    (block $l0 i32
+    (block $l0 (result i32)
       (if (i32.const 1)
-        (br $l0 (block $l1 i32 (br $l1 (i32.const 1))))
-        (block (drop (block $l1 i32 (br $l1 (i32.const 1)))))
+        (then (br $l0 (block $l1 (result i32) (br $l1 (i32.const 1)))))
+        (else (block (drop (block $l1 (result i32) (br $l1 (i32.const 1))))))
       )
       (i32.const 1)
     )
   )
 
   (func (export "shadowing") (result i32)
-    (block $l1 i32 (i32.xor (br $l1 (i32.const 1)) (i32.const 2)))
+    (block $l1 (result i32) (i32.xor (br $l1 (i32.const 1)) (i32.const 2)))
   )
 
   (func (export "redefinition") (result i32)
-    (block $l1 i32
+    (block $l1 (result i32)
       (i32.add
-        (block $l1 i32 (i32.const 2))
-        (block $l1 i32 (br $l1 (i32.const 3)))
+        (block $l1 (result i32) (i32.const 2))
+        (block $l1 (result i32) (br $l1 (i32.const 3)))
       )
     )
   )
diff --git a/test/WasmSpec/testsuite/core/left-to-right.wast b/test/WasmSpec/testsuite/core/left-to-right.wast
index 7eeda94..6214d0d 100644
--- a/test/WasmSpec/testsuite/core/left-to-right.wast
+++ b/test/WasmSpec/testsuite/core/left-to-right.wast
@@ -159,17 +159,17 @@
   (func (export "f64_select") (result i32) (call $reset) (drop (select (call $f64_left) (call $f64_right) (call $f64_bool))) (call $get))
 
   (func (export "br_if") (result i32)
-    (block i32
+    (block (result i32)
       (call $reset)
       (drop (br_if 0 (call $i32_left) (i32.and (call $i32_right) (i32.const 0))))
       (call $get)
     )
   )
   (func (export "br_table") (result i32)
-    (block $a i32
+    (block $a (result i32)
       (call $reset)
       (drop
-        (block $b i32
+        (block $b (result i32)
           (br_table $a $b (call $i32_left) (call $i32_right))
         )
       )
diff --git a/test/WasmSpec/testsuite/core/load-align-0.fail.wast b/test/WasmSpec/testsuite/core/load-align-0.fail.wast
deleted file mode 100644
index fb8ec03..0000000
--- a/test/WasmSpec/testsuite/core/load-align-0.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (memory 0) (func (drop (i64.load align=0 (i32.const 0)))))
diff --git a/test/WasmSpec/testsuite/core/load-align-odd.fail.wast b/test/WasmSpec/testsuite/core/load-align-odd.fail.wast
deleted file mode 100644
index 2132836..0000000
--- a/test/WasmSpec/testsuite/core/load-align-odd.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (memory 0) (func (drop (i64.load align=5 (i32.const 0)))))
diff --git a/test/WasmSpec/testsuite/core/loop-end-label-mismatch.fail.wast b/test/WasmSpec/testsuite/core/loop-end-label-mismatch.fail.wast
deleted file mode 100644
index 1ed0104..0000000
--- a/test/WasmSpec/testsuite/core/loop-end-label-mismatch.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (func loop $a end $l))
diff --git a/test/WasmSpec/testsuite/core/loop-end-label-superfluous.fail.wast b/test/WasmSpec/testsuite/core/loop-end-label-superfluous.fail.wast
deleted file mode 100644
index 85a2ea6..0000000
--- a/test/WasmSpec/testsuite/core/loop-end-label-superfluous.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (func loop end $l))
diff --git a/test/WasmSpec/testsuite/core/loop.wast b/test/WasmSpec/testsuite/core/loop.wast
index 16f849b..d51b703 100644
--- a/test/WasmSpec/testsuite/core/loop.wast
+++ b/test/WasmSpec/testsuite/core/loop.wast
@@ -10,55 +10,81 @@
 
   (func (export "singular") (result i32)
     (loop (nop))
-    (loop i32 (i32.const 7))
+    (loop (result i32) (i32.const 7))
   )
 
   (func (export "multi") (result i32)
     (loop (call $dummy) (call $dummy) (call $dummy) (call $dummy))
-    (loop i32 (call $dummy) (call $dummy) (call $dummy) (i32.const 8))
+    (loop (result i32) (call $dummy) (call $dummy) (call $dummy) (i32.const 8))
   )
 
   (func (export "nested") (result i32)
-    (loop i32
+    (loop (result i32)
       (loop (call $dummy) (block) (nop))
-      (loop i32 (call $dummy) (i32.const 9))
+      (loop (result i32) (call $dummy) (i32.const 9))
     )
   )
 
   (func (export "deep") (result i32)
-    (loop i32 (block i32 (loop i32 (block i32 (loop i32 (block i32
-      (loop i32 (block i32 (loop i32 (block i32 (loop i32 (block i32
-        (loop i32 (block i32 (loop i32 (block i32 (loop i32 (block i32
-          (loop i32 (block i32 (loop i32 (block i32 (loop i32 (block i32
-            (loop i32 (block i32 (loop i32 (block i32 (loop i32 (block i32
-              (loop i32 (block i32 (loop i32 (block i32 (loop i32 (block i32
-                (loop i32 (block i32 (loop i32 (block i32 (loop i32 (block i32
-                  (loop i32 (block i32 (call $dummy) (i32.const 150)))
-                ))))))
-              ))))))
-            ))))))
-          ))))))
-        ))))))
-      ))))))
-    ))))))
+    (loop (result i32) (block (result i32)
+      (loop (result i32) (block (result i32)
+        (loop (result i32) (block (result i32)
+          (loop (result i32) (block (result i32)
+            (loop (result i32) (block (result i32)
+              (loop (result i32) (block (result i32)
+                (loop (result i32) (block (result i32)
+                  (loop (result i32) (block (result i32)
+                    (loop (result i32) (block (result i32)
+                      (loop (result i32) (block (result i32)
+                        (loop (result i32) (block (result i32)
+                          (loop (result i32) (block (result i32)
+                            (loop (result i32) (block (result i32)
+                              (loop (result i32) (block (result i32)
+                                (loop (result i32) (block (result i32)
+                                  (loop (result i32) (block (result i32)
+                                    (loop (result i32) (block (result i32)
+                                      (loop (result i32) (block (result i32)
+                                        (loop (result i32) (block (result i32)
+                                          (loop (result i32) (block (result i32)
+                                            (call $dummy) (i32.const 150)
+                                          ))
+                                        ))
+                                      ))
+                                    ))
+                                  ))
+                                ))
+                              ))
+                            ))
+                          ))
+                        ))
+                      ))
+                    ))
+                  ))
+                ))
+              ))
+            ))
+          ))
+        ))
+      ))
+    ))
   )
 
   (func (export "as-unary-operand") (result i32)
-    (i32.ctz (loop i32 (call $dummy) (i32.const 13)))
+    (i32.ctz (loop (result i32) (call $dummy) (i32.const 13)))
   )
   (func (export "as-binary-operand") (result i32)
     (i32.mul
-      (loop i32 (call $dummy) (i32.const 3))
-      (loop i32 (call $dummy) (i32.const 4))
+      (loop (result i32) (call $dummy) (i32.const 3))
+      (loop (result i32) (call $dummy) (i32.const 4))
     )
   )
   (func (export "as-test-operand") (result i32)
-    (i32.eqz (loop i32 (call $dummy) (i32.const 13)))
+    (i32.eqz (loop (result i32) (call $dummy) (i32.const 13)))
   )
   (func (export "as-compare-operand") (result i32)
     (f32.gt
-      (loop f32 (call $dummy) (f32.const 3))
-      (loop f32 (call $dummy) (f32.const 3))
+      (loop (result f32) (call $dummy) (f32.const 3))
+      (loop (result f32) (call $dummy) (f32.const 3))
     )
   )
 
@@ -70,11 +96,13 @@
     (i32.const 19)
   )
   (func (export "break-value") (result i32)
-    (block i32 (loop i32 (br 1 (i32.const 18)) (br 0) (i32.const 19)))
+    (block (result i32)
+      (loop (result i32) (br 1 (i32.const 18)) (br 0) (i32.const 19))
+    )
   )
   (func (export "break-repeated") (result i32)
-    (block i32
-      (loop i32
+    (block (result i32)
+      (loop (result i32)
         (br 1 (i32.const 18))
         (br 1 (i32.const 19))
         (drop (br_if 1 (i32.const 20) (i32.const 0)))
@@ -89,19 +117,19 @@
   (func (export "break-inner") (result i32)
     (local i32)
     (set_local 0 (i32.const 0))
-    (set_local 0 (i32.add (get_local 0) (block i32 (loop i32 (block i32 (br 2 (i32.const 0x1)))))))
-    (set_local 0 (i32.add (get_local 0) (block i32 (loop i32 (loop i32 (br 2 (i32.const 0x2)))))))
-    (set_local 0 (i32.add (get_local 0) (block i32 (loop i32 (block i32 (loop i32 (br 1 (i32.const 0x4))))))))
-    (set_local 0 (i32.add (get_local 0) (block i32 (loop i32 (i32.ctz (br 1 (i32.const 0x8)))))))
-    (set_local 0 (i32.add (get_local 0) (block i32 (loop i32 (i32.ctz (loop i32 (br 2 (i32.const 0x10))))))))
+    (set_local 0 (i32.add (get_local 0) (block (result i32) (loop (result i32) (block (result i32) (br 2 (i32.const 0x1)))))))
+    (set_local 0 (i32.add (get_local 0) (block (result i32) (loop (result i32) (loop (result i32) (br 2 (i32.const 0x2)))))))
+    (set_local 0 (i32.add (get_local 0) (block (result i32) (loop (result i32) (block (result i32) (loop (result i32) (br 1 (i32.const 0x4))))))))
+    (set_local 0 (i32.add (get_local 0) (block (result i32) (loop (result i32) (i32.ctz (br 1 (i32.const 0x8)))))))
+    (set_local 0 (i32.add (get_local 0) (block (result i32) (loop (result i32) (i32.ctz (loop (result i32) (br 2 (i32.const 0x10))))))))
     (get_local 0)
   )
   (func (export "cont-inner") (result i32)
     (local i32)
     (set_local 0 (i32.const 0))
-    (set_local 0 (i32.add (get_local 0) (loop i32 (loop i32 (br 1)))))
-    (set_local 0 (i32.add (get_local 0) (loop i32 (i32.ctz (br 0)))))
-    (set_local 0 (i32.add (get_local 0) (loop i32 (i32.ctz (loop i32 (br 1))))))
+    (set_local 0 (i32.add (get_local 0) (loop (result i32) (loop (result i32) (br 1)))))
+    (set_local 0 (i32.add (get_local 0) (loop (result i32) (i32.ctz (br 0)))))
+    (set_local 0 (i32.add (get_local 0) (loop (result i32) (i32.ctz (loop (result i32) (br 1))))))
     (get_local 0)
   )
 
@@ -247,25 +275,35 @@
 )
 (assert_invalid
   (module (func $type-value-empty-vs-num (result i32)
-    (loop i32)
+    (loop (result i32))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-value-void-vs-num (result i32)
-    (loop i32 (nop))
+    (loop (result i32) (nop))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-value-num-vs-num (result i32)
-    (loop i32 (f32.const 0))
+    (loop (result i32) (f32.const 0))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-value-unreached-select (result i32)
-    (loop i64 (select (unreachable) (unreachable) (unreachable)))
+    (loop (result i64) (select (unreachable) (unreachable) (unreachable)))
   ))
   "type mismatch"
 )
+
+
+(assert_malformed
+  (module quote "(func loop end $l)")
+  "mismatching label"
+)
+(assert_malformed
+  (module quote "(func loop $a end $l)")
+  "mismatching label"
+)
diff --git a/test/WasmSpec/testsuite/core/memory.wast b/test/WasmSpec/testsuite/core/memory.wast
index c477ea4..346d8f8 100644
--- a/test/WasmSpec/testsuite/core/memory.wast
+++ b/test/WasmSpec/testsuite/core/memory.wast
@@ -237,14 +237,14 @@
       (loop
         (if
           (i32.eq (get_local 0) (i32.const 0))
-          (br 2)
+          (then (br 2))
         )
         (set_local 2 (i32.mul (get_local 0) (i32.const 4)))
         (i32.store (get_local 2) (get_local 0))
         (set_local 1 (i32.load (get_local 2)))
         (if
           (i32.ne (get_local 0) (get_local 1))
-          (return (i32.const 0))
+          (then (return (i32.const 0)))
         )
         (set_local 0 (i32.sub (get_local 0) (i32.const 1)))
         (br 0)
@@ -261,14 +261,14 @@
       (loop
         (if
           (i32.eq (get_local 0) (i32.const 0))
-          (br 2)
+          (then (br 2))
         )
         (set_local 2 (f64.convert_s/i32 (get_local 0)))
         (f64.store align=1 (get_local 0) (get_local 2))
         (set_local 1 (f64.load align=1 (get_local 0)))
         (if
           (f64.ne (get_local 2) (get_local 1))
-          (return (i32.const 0))
+          (then (return (i32.const 0)))
         )
         (set_local 0 (i32.sub (get_local 0) (i32.const 1)))
         (br 0)
@@ -285,7 +285,7 @@
         (f64.load (i32.const 8))
         (f64.reinterpret/i64 (i64.const -12345))
       )
-      (return (f64.const 0))
+      (then (return (f64.const 0)))
     )
     (i64.store align=1 (i32.const 9) (i64.const 0))
     (i32.store16 align=1 (i32.const 15) (i32.const 16453))
@@ -350,6 +350,15 @@
 (assert_return (invoke "i32_load16_s" (i32.const 20000)) (i32.const 20000))
 (assert_return (invoke "i32_load16_u" (i32.const 40000)) (i32.const 40000))
 
+(assert_return (invoke "i32_load8_s" (i32.const 0xfedc6543)) (i32.const 0x43))
+(assert_return (invoke "i32_load8_s" (i32.const 0x3456cdef)) (i32.const 0xffffffef))
+(assert_return (invoke "i32_load8_u" (i32.const 0xfedc6543)) (i32.const 0x43))
+(assert_return (invoke "i32_load8_u" (i32.const 0x3456cdef)) (i32.const 0xef))
+(assert_return (invoke "i32_load16_s" (i32.const 0xfedc6543)) (i32.const 0x6543))
+(assert_return (invoke "i32_load16_s" (i32.const 0x3456cdef)) (i32.const 0xffffcdef))
+(assert_return (invoke "i32_load16_u" (i32.const 0xfedc6543)) (i32.const 0x6543))
+(assert_return (invoke "i32_load16_u" (i32.const 0x3456cdef)) (i32.const 0xcdef))
+
 (assert_return (invoke "i64_load8_s" (i64.const -1)) (i64.const -1))
 (assert_return (invoke "i64_load8_u" (i64.const -1)) (i64.const 255))
 (assert_return (invoke "i64_load16_s" (i64.const -1)) (i64.const -1))
@@ -363,3 +372,160 @@
 (assert_return (invoke "i64_load16_u" (i64.const 40000)) (i64.const 40000))
 (assert_return (invoke "i64_load32_s" (i64.const 20000)) (i64.const 20000))
 (assert_return (invoke "i64_load32_u" (i64.const 40000)) (i64.const 40000))
+
+(assert_return (invoke "i64_load8_s" (i64.const 0xfedcba9856346543)) (i64.const 0x43))
+(assert_return (invoke "i64_load8_s" (i64.const 0x3456436598bacdef)) (i64.const 0xffffffffffffffef))
+(assert_return (invoke "i64_load8_u" (i64.const 0xfedcba9856346543)) (i64.const 0x43))
+(assert_return (invoke "i64_load8_u" (i64.const 0x3456436598bacdef)) (i64.const 0xef))
+(assert_return (invoke "i64_load16_s" (i64.const 0xfedcba9856346543)) (i64.const 0x6543))
+(assert_return (invoke "i64_load16_s" (i64.const 0x3456436598bacdef)) (i64.const 0xffffffffffffcdef))
+(assert_return (invoke "i64_load16_u" (i64.const 0xfedcba9856346543)) (i64.const 0x6543))
+(assert_return (invoke "i64_load16_u" (i64.const 0x3456436598bacdef)) (i64.const 0xcdef))
+(assert_return (invoke "i64_load32_s" (i64.const 0xfedcba9856346543)) (i64.const 0x56346543))
+(assert_return (invoke "i64_load32_s" (i64.const 0x3456436598bacdef)) (i64.const 0xffffffff98bacdef))
+(assert_return (invoke "i64_load32_u" (i64.const 0xfedcba9856346543)) (i64.const 0x56346543))
+(assert_return (invoke "i64_load32_u" (i64.const 0x3456436598bacdef)) (i64.const 0x98bacdef))
+
+(assert_malformed
+  (module quote
+    "(memory 1)"
+    "(func (param i32) (result i32) (i32.load32 (get_local 0)))"
+  )
+  "unknown operator"
+)
+(assert_malformed
+  (module quote
+    "(memory 1)"
+    "(func (param i32) (result i32) (i32.load32_u (get_local 0)))"
+  )
+  "unknown operator"
+)
+(assert_malformed
+  (module quote
+    "(memory 1)"
+    "(func (param i32) (result i32) (i32.load32_s (get_local 0)))"
+  )
+  "unknown operator"
+)
+(assert_malformed
+  (module quote
+    "(memory 1)"
+    "(func (param i32) (result i32) (i32.load64 (get_local 0)))"
+  )
+  "unknown operator"
+)
+(assert_malformed
+  (module quote
+    "(memory 1)"
+    "(func (param i32) (result i32) (i32.load64_u (get_local 0)))"
+  )
+  "unknown operator"
+)
+(assert_malformed
+  (module quote
+    "(memory 1)"
+    "(func (param i32) (result i32) (i32.load64_s (get_local 0)))"
+  )
+  "unknown operator"
+)
+(assert_malformed
+  (module quote
+    "(memory 1)"
+    "(func (param i32) (i32.store32 (get_local 0) (i32.const 0)))"
+  )
+  "unknown operator"
+)
+(assert_malformed
+  (module quote
+    "(memory 1)"
+    "(func (param i32) (i32.store64 (get_local 0) (i64.const 0)))"
+  )
+  "unknown operator"
+)
+
+(assert_malformed
+  (module quote
+    "(memory 1)"
+    "(func (param i32) (result i64) (i64.load64 (get_local 0)))"
+  )
+  "unknown operator"
+)
+(assert_malformed
+  (module quote
+    "(memory 1)"
+    "(func (param i32) (result i64) (i64.load64_u (get_local 0)))"
+  )
+  "unknown operator"
+)
+(assert_malformed
+  (module quote
+    "(memory 1)"
+    "(func (param i32) (result i64) (i64.load64_s (get_local 0)))"
+  )
+  "unknown operator"
+)
+(assert_malformed
+  (module quote
+    "(memory 1)"
+    "(func (param i32) (i64.store64 (get_local 0) (i64.const 0)))"
+  )
+  "unknown operator"
+)
+
+(assert_malformed
+  (module quote
+    "(memory 1)"
+    "(func (param i32) (result f32) (f32.load32 (get_local 0)))"
+  )
+  "unknown operator"
+)
+(assert_malformed
+  (module quote
+    "(memory 1)"
+    "(func (param i32) (result f32) (f32.load64 (get_local 0)))"
+  )
+  "unknown operator"
+)
+(assert_malformed
+  (module quote
+    "(memory 1)"
+    "(func (param i32) (f32.store32 (get_local 0) (f32.const 0)))"
+  )
+  "unknown operator"
+)
+(assert_malformed
+  (module quote
+    "(memory 1)"
+    "(func (param i32) (f32.store64 (get_local 0) (f64.const 0)))"
+  )
+  "unknown operator"
+)
+
+(assert_malformed
+  (module quote
+    "(memory 1)"
+    "(func (param i32) (result f64) (f64.load32 (get_local 0)))"
+  )
+  "unknown operator"
+)
+(assert_malformed
+  (module quote
+    "(memory 1)"
+    "(func (param i32) (result f64) (f64.load64 (get_local 0)))"
+  )
+  "unknown operator"
+)
+(assert_malformed
+  (module quote
+    "(memory 1)"
+    "(func (param i32) (f64.store32 (get_local 0) (f32.const 0)))"
+  )
+  "unknown operator"
+)
+(assert_malformed
+  (module quote
+    "(memory 1)"
+    "(func (param i32) (f64.store64 (get_local 0) (f64.const 0)))"
+  )
+  "unknown operator"
+)
diff --git a/test/WasmSpec/testsuite/core/memory_redundancy.wast b/test/WasmSpec/testsuite/core/memory_redundancy.wast
index 2911537..f16adc4 100644
--- a/test/WasmSpec/testsuite/core/memory_redundancy.wast
+++ b/test/WasmSpec/testsuite/core/memory_redundancy.wast
@@ -34,6 +34,26 @@
     (i32.store (i32.const 8) (i32.const 0))
     (get_local $t)
   )
+
+  ;; A function named "malloc" which implementations nonetheless shouldn't
+  ;; assume behaves like C malloc.
+  (func $malloc (export "malloc")
+     (param $size i32)
+     (result i32)
+     (i32.const 16)
+  )
+
+  ;; Call malloc twice, but unlike C malloc, we don't get non-aliasing pointers.
+  (func (export "malloc_aliasing")
+     (result i32)
+     (local $x i32)
+     (local $y i32)
+     (set_local $x (call $malloc (i32.const 4)))
+     (set_local $y (call $malloc (i32.const 4)))
+     (i32.store (get_local $x) (i32.const 42))
+     (i32.store (get_local $y) (i32.const 43))
+     (i32.load (get_local $x))
+  )
 )
 
 (assert_return (invoke "test_store_to_load") (i32.const 0x00000080))
@@ -41,3 +61,5 @@
 (assert_return (invoke "test_redundant_load") (i32.const 0x00000080))
 (invoke "zero_everything")
 (assert_return (invoke "test_dead_store") (f32.const 0x1.18p-144))
+(invoke "zero_everything")
+(assert_return (invoke "malloc_aliasing") (i32.const 43))
diff --git a/test/WasmSpec/testsuite/core/memory_trap.wast b/test/WasmSpec/testsuite/core/memory_trap.wast
index 80c3333..5fd193d 100644
--- a/test/WasmSpec/testsuite/core/memory_trap.wast
+++ b/test/WasmSpec/testsuite/core/memory_trap.wast
@@ -32,140 +32,239 @@
 (assert_trap (invoke "load" (i32.const 0x80000000)) "out of bounds memory access")
 (assert_return (invoke "grow_memory" (i32.const 0x10001)) (i32.const -1))
 
-
 (module
   (memory 1)
+  (data (i32.const 0) "abcdefgh")
+  (data (i32.const 0xfff8) "abcdefgh")
 
-  (func (export "i32.store16") (param $a i32) (param $v i32)
-    (i32.store16 (get_local $a) (get_local $v))
+  (func (export "i32.load") (param $a i32) (result i32)
+    (i32.load (get_local $a))
+  )
+  (func (export "i64.load") (param $a i32) (result i64)
+    (i64.load (get_local $a))
+  )
+  (func (export "f32.load") (param $a i32) (result f32)
+    (f32.load (get_local $a))
+  )
+  (func (export "f64.load") (param $a i32) (result f64)
+    (f64.load (get_local $a))
+  )
+  (func (export "i32.load8_s") (param $a i32) (result i32)
+    (i32.load8_s (get_local $a))
+  )
+  (func (export "i32.load8_u") (param $a i32) (result i32)
+    (i32.load8_u (get_local $a))
+  )
+  (func (export "i32.load16_s") (param $a i32) (result i32)
+    (i32.load16_s (get_local $a))
+  )
+  (func (export "i32.load16_u") (param $a i32) (result i32)
+    (i32.load16_u (get_local $a))
+  )
+  (func (export "i64.load8_s") (param $a i32) (result i64)
+    (i64.load8_s (get_local $a))
+  )
+  (func (export "i64.load8_u") (param $a i32) (result i64)
+    (i64.load8_u (get_local $a))
+  )
+  (func (export "i64.load16_s") (param $a i32) (result i64)
+    (i64.load16_s (get_local $a))
+  )
+  (func (export "i64.load16_u") (param $a i32) (result i64)
+    (i64.load16_u (get_local $a))
+  )
+  (func (export "i64.load32_s") (param $a i32) (result i64)
+    (i64.load32_s (get_local $a))
+  )
+  (func (export "i64.load32_u") (param $a i32) (result i64)
+    (i64.load32_u (get_local $a))
   )
   (func (export "i32.store") (param $a i32) (param $v i32)
     (i32.store (get_local $a) (get_local $v))
   )
+  (func (export "i64.store") (param $a i32) (param $v i64)
+    (i64.store (get_local $a) (get_local $v))
+  )
+  (func (export "f32.store") (param $a i32) (param $v f32)
+    (f32.store (get_local $a) (get_local $v))
+  )
+  (func (export "f64.store") (param $a i32) (param $v f64)
+    (f64.store (get_local $a) (get_local $v))
+  )
+  (func (export "i32.store8") (param $a i32) (param $v i32)
+    (i32.store8 (get_local $a) (get_local $v))
+  )
+  (func (export "i32.store16") (param $a i32) (param $v i32)
+    (i32.store16 (get_local $a) (get_local $v))
+  )
+  (func (export "i64.store8") (param $a i32) (param $v i64)
+    (i64.store8 (get_local $a) (get_local $v))
+  )
   (func (export "i64.store16") (param $a i32) (param $v i64)
     (i64.store16 (get_local $a) (get_local $v))
   )
   (func (export "i64.store32") (param $a i32) (param $v i64)
     (i64.store32 (get_local $a) (get_local $v))
   )
-  (func (export "i64.store") (param $a i32) (param $v i64)
-    (i64.store (get_local $a) (get_local $v))
-  )
-  (func (export "f32.store") (param $a i32) (param $v i32)
-    (f32.store (get_local $a) (f32.reinterpret/i32 (get_local $v)))
-  )
-  (func (export "f64.store") (param $a i32) (param $v i64)
-    (f64.store (get_local $a) (f64.reinterpret/i64 (get_local $v)))
-  )
-
-  (func (export "i64.load") (param $a i32) (result i64)
-    (i64.load (get_local $a))
-  )
 )
 
-(assert_trap
-  (invoke "i32.store16" (i32.const 0xffff) (i32.const 0x01234567))
-  "out of bounds memory access"
-)
-(assert_trap
-  (invoke "i32.store" (i32.const 0xffff) (i32.const 0x01234567))
-  "out of bounds memory access"
-)
-(assert_trap
-  (invoke "i32.store" (i32.const 0xfffe) (i32.const 0x01234567))
-  "out of bounds memory access"
-)
-(assert_trap
-  (invoke "i32.store" (i32.const 0xfffd) (i32.const 0x01234567))
-  "out of bounds memory access"
-)
-
-(assert_trap
-  (invoke "i64.store16" (i32.const 0xffff) (i64.const 0x0123456701234567))
-  "out of bounds memory access"
-)
-(assert_trap
-  (invoke "i64.store32" (i32.const 0xffff) (i64.const 0x0123456701234567))
-  "out of bounds memory access"
-)
-(assert_trap
-  (invoke "i64.store32" (i32.const 0xfffe) (i64.const 0x0123456701234567))
-  "out of bounds memory access"
-)
-(assert_trap
-  (invoke "i64.store32" (i32.const 0xfffd) (i64.const 0x0123456701234567))
-  "out of bounds memory access"
-)
-(assert_trap
-  (invoke "i64.store" (i32.const 0xffff) (i64.const 0x0123456701234567))
-  "out of bounds memory access"
-)
-(assert_trap
-  (invoke "i64.store" (i32.const 0xfffe) (i64.const 0x0123456701234567))
-  "out of bounds memory access"
-)
-(assert_trap
-  (invoke "i64.store" (i32.const 0xfffd) (i64.const 0x0123456701234567))
-  "out of bounds memory access"
-)
-(assert_trap
-  (invoke "i64.store" (i32.const 0xfffc) (i64.const 0x0123456701234567))
-  "out of bounds memory access"
-)
-(assert_trap
-  (invoke "i64.store" (i32.const 0xfffb) (i64.const 0x0123456701234567))
-  "out of bounds memory access"
-)
-(assert_trap
-  (invoke "i64.store" (i32.const 0xfffa) (i64.const 0x0123456701234567))
-  "out of bounds memory access"
-)
-(assert_trap
-  (invoke "i64.store" (i32.const 0xfff9) (i64.const 0x0123456701234567))
-  "out of bounds memory access"
-)
-
-(assert_trap
-  (invoke "f32.store" (i32.const 0xffff) (i32.const 0x01234567))
-  "out of bounds memory access"
-)
-(assert_trap
-  (invoke "f32.store" (i32.const 0xfffe) (i32.const 0x01234567))
-  "out of bounds memory access"
-)
-(assert_trap
-  (invoke "f32.store" (i32.const 0xfffd) (i32.const 0x01234567))
-  "out of bounds memory access"
-)
-
-(assert_trap
-  (invoke "f64.store" (i32.const 0xffff) (i64.const 0x0123456701234567))
-  "out of bounds memory access"
-)
-(assert_trap
-  (invoke "f64.store" (i32.const 0xfffe) (i64.const 0x0123456701234567))
-  "out of bounds memory access"
-)
-(assert_trap
-  (invoke "f64.store" (i32.const 0xfffd) (i64.const 0x0123456701234567))
-  "out of bounds memory access"
-)
-(assert_trap
-  (invoke "f64.store" (i32.const 0xfffc) (i64.const 0x0123456701234567))
-  "out of bounds memory access"
-)
-(assert_trap
-  (invoke "f64.store" (i32.const 0xfffb) (i64.const 0x0123456701234567))
-  "out of bounds memory access"
-)
-(assert_trap
-  (invoke "f64.store" (i32.const 0xfffa) (i64.const 0x0123456701234567))
-  "out of bounds memory access"
-)
-(assert_trap
-  (invoke "f64.store" (i32.const 0xfff9) (i64.const 0x0123456701234567))
-  "out of bounds memory access"
-)
+(assert_trap (invoke "i32.store" (i32.const 0x10000) (i32.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i32.store" (i32.const 0xffff) (i32.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i32.store" (i32.const 0xfffe) (i32.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i32.store" (i32.const 0xfffd) (i32.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i32.store" (i32.const -1) (i32.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i32.store" (i32.const -2) (i32.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i32.store" (i32.const -3) (i32.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i32.store" (i32.const -4) (i32.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i64.store" (i32.const 0x10000) (i64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i64.store" (i32.const 0xffff) (i64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i64.store" (i32.const 0xfffe) (i64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i64.store" (i32.const 0xfffd) (i64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i64.store" (i32.const 0xfffc) (i64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i64.store" (i32.const 0xfffb) (i64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i64.store" (i32.const 0xfffa) (i64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i64.store" (i32.const 0xfff9) (i64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i64.store" (i32.const -1) (i64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i64.store" (i32.const -2) (i64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i64.store" (i32.const -3) (i64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i64.store" (i32.const -4) (i64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i64.store" (i32.const -5) (i64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i64.store" (i32.const -6) (i64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i64.store" (i32.const -7) (i64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i64.store" (i32.const -8) (i64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "f32.store" (i32.const 0x10000) (f32.const 0)) "out of bounds memory access")
+(assert_trap (invoke "f32.store" (i32.const 0xffff) (f32.const 0)) "out of bounds memory access")
+(assert_trap (invoke "f32.store" (i32.const 0xfffe) (f32.const 0)) "out of bounds memory access")
+(assert_trap (invoke "f32.store" (i32.const 0xfffd) (f32.const 0)) "out of bounds memory access")
+(assert_trap (invoke "f32.store" (i32.const -1) (f32.const 0)) "out of bounds memory access")
+(assert_trap (invoke "f32.store" (i32.const -2) (f32.const 0)) "out of bounds memory access")
+(assert_trap (invoke "f32.store" (i32.const -3) (f32.const 0)) "out of bounds memory access")
+(assert_trap (invoke "f32.store" (i32.const -4) (f32.const 0)) "out of bounds memory access")
+(assert_trap (invoke "f64.store" (i32.const 0x10000) (f64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "f64.store" (i32.const 0xffff) (f64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "f64.store" (i32.const 0xfffe) (f64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "f64.store" (i32.const 0xfffd) (f64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "f64.store" (i32.const 0xfffc) (f64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "f64.store" (i32.const 0xfffb) (f64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "f64.store" (i32.const 0xfffa) (f64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "f64.store" (i32.const 0xfff9) (f64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "f64.store" (i32.const -1) (f64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "f64.store" (i32.const -2) (f64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "f64.store" (i32.const -3) (f64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "f64.store" (i32.const -4) (f64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "f64.store" (i32.const -5) (f64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "f64.store" (i32.const -6) (f64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "f64.store" (i32.const -7) (f64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "f64.store" (i32.const -8) (f64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i32.store8" (i32.const 0x10000) (i32.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i32.store8" (i32.const -1) (i32.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i32.store16" (i32.const 0x10000) (i32.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i32.store16" (i32.const 0xffff) (i32.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i32.store16" (i32.const -1) (i32.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i32.store16" (i32.const -2) (i32.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i64.store8" (i32.const 0x10000) (i64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i64.store8" (i32.const -1) (i64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i64.store16" (i32.const 0x10000) (i64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i64.store16" (i32.const 0xffff) (i64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i64.store16" (i32.const -1) (i64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i64.store16" (i32.const -2) (i64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i64.store32" (i32.const 0x10000) (i64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i64.store32" (i32.const 0xffff) (i64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i64.store32" (i32.const 0xfffe) (i64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i64.store32" (i32.const 0xfffd) (i64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i64.store32" (i32.const -1) (i64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i64.store32" (i32.const -2) (i64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i64.store32" (i32.const -3) (i64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i64.store32" (i32.const -4) (i64.const 0)) "out of bounds memory access")
+(assert_trap (invoke "i32.load" (i32.const 0x10000)) "out of bounds memory access")
+(assert_trap (invoke "i32.load" (i32.const 0xffff)) "out of bounds memory access")
+(assert_trap (invoke "i32.load" (i32.const 0xfffe)) "out of bounds memory access")
+(assert_trap (invoke "i32.load" (i32.const 0xfffd)) "out of bounds memory access")
+(assert_trap (invoke "i32.load" (i32.const -1)) "out of bounds memory access")
+(assert_trap (invoke "i32.load" (i32.const -2)) "out of bounds memory access")
+(assert_trap (invoke "i32.load" (i32.const -3)) "out of bounds memory access")
+(assert_trap (invoke "i32.load" (i32.const -4)) "out of bounds memory access")
+(assert_trap (invoke "i64.load" (i32.const 0x10000)) "out of bounds memory access")
+(assert_trap (invoke "i64.load" (i32.const 0xffff)) "out of bounds memory access")
+(assert_trap (invoke "i64.load" (i32.const 0xfffe)) "out of bounds memory access")
+(assert_trap (invoke "i64.load" (i32.const 0xfffd)) "out of bounds memory access")
+(assert_trap (invoke "i64.load" (i32.const 0xfffc)) "out of bounds memory access")
+(assert_trap (invoke "i64.load" (i32.const 0xfffb)) "out of bounds memory access")
+(assert_trap (invoke "i64.load" (i32.const 0xfffa)) "out of bounds memory access")
+(assert_trap (invoke "i64.load" (i32.const 0xfff9)) "out of bounds memory access")
+(assert_trap (invoke "i64.load" (i32.const -1)) "out of bounds memory access")
+(assert_trap (invoke "i64.load" (i32.const -2)) "out of bounds memory access")
+(assert_trap (invoke "i64.load" (i32.const -3)) "out of bounds memory access")
+(assert_trap (invoke "i64.load" (i32.const -4)) "out of bounds memory access")
+(assert_trap (invoke "i64.load" (i32.const -5)) "out of bounds memory access")
+(assert_trap (invoke "i64.load" (i32.const -6)) "out of bounds memory access")
+(assert_trap (invoke "i64.load" (i32.const -7)) "out of bounds memory access")
+(assert_trap (invoke "i64.load" (i32.const -8)) "out of bounds memory access")
+(assert_trap (invoke "f32.load" (i32.const 0x10000)) "out of bounds memory access")
+(assert_trap (invoke "f32.load" (i32.const 0xffff)) "out of bounds memory access")
+(assert_trap (invoke "f32.load" (i32.const 0xfffe)) "out of bounds memory access")
+(assert_trap (invoke "f32.load" (i32.const 0xfffd)) "out of bounds memory access")
+(assert_trap (invoke "f32.load" (i32.const -1)) "out of bounds memory access")
+(assert_trap (invoke "f32.load" (i32.const -2)) "out of bounds memory access")
+(assert_trap (invoke "f32.load" (i32.const -3)) "out of bounds memory access")
+(assert_trap (invoke "f32.load" (i32.const -4)) "out of bounds memory access")
+(assert_trap (invoke "f64.load" (i32.const 0x10000)) "out of bounds memory access")
+(assert_trap (invoke "f64.load" (i32.const 0xffff)) "out of bounds memory access")
+(assert_trap (invoke "f64.load" (i32.const 0xfffe)) "out of bounds memory access")
+(assert_trap (invoke "f64.load" (i32.const 0xfffd)) "out of bounds memory access")
+(assert_trap (invoke "f64.load" (i32.const 0xfffc)) "out of bounds memory access")
+(assert_trap (invoke "f64.load" (i32.const 0xfffb)) "out of bounds memory access")
+(assert_trap (invoke "f64.load" (i32.const 0xfffa)) "out of bounds memory access")
+(assert_trap (invoke "f64.load" (i32.const 0xfff9)) "out of bounds memory access")
+(assert_trap (invoke "f64.load" (i32.const -1)) "out of bounds memory access")
+(assert_trap (invoke "f64.load" (i32.const -2)) "out of bounds memory access")
+(assert_trap (invoke "f64.load" (i32.const -3)) "out of bounds memory access")
+(assert_trap (invoke "f64.load" (i32.const -4)) "out of bounds memory access")
+(assert_trap (invoke "f64.load" (i32.const -5)) "out of bounds memory access")
+(assert_trap (invoke "f64.load" (i32.const -6)) "out of bounds memory access")
+(assert_trap (invoke "f64.load" (i32.const -7)) "out of bounds memory access")
+(assert_trap (invoke "f64.load" (i32.const -8)) "out of bounds memory access")
+(assert_trap (invoke "i32.load8_s" (i32.const 0x10000)) "out of bounds memory access")
+(assert_trap (invoke "i32.load8_s" (i32.const -1)) "out of bounds memory access")
+(assert_trap (invoke "i32.load8_u" (i32.const 0x10000)) "out of bounds memory access")
+(assert_trap (invoke "i32.load8_u" (i32.const -1)) "out of bounds memory access")
+(assert_trap (invoke "i32.load16_s" (i32.const 0x10000)) "out of bounds memory access")
+(assert_trap (invoke "i32.load16_s" (i32.const 0xffff)) "out of bounds memory access")
+(assert_trap (invoke "i32.load16_s" (i32.const -1)) "out of bounds memory access")
+(assert_trap (invoke "i32.load16_s" (i32.const -2)) "out of bounds memory access")
+(assert_trap (invoke "i32.load16_u" (i32.const 0x10000)) "out of bounds memory access")
+(assert_trap (invoke "i32.load16_u" (i32.const 0xffff)) "out of bounds memory access")
+(assert_trap (invoke "i32.load16_u" (i32.const -1)) "out of bounds memory access")
+(assert_trap (invoke "i32.load16_u" (i32.const -2)) "out of bounds memory access")
+(assert_trap (invoke "i64.load8_s" (i32.const 0x10000)) "out of bounds memory access")
+(assert_trap (invoke "i64.load8_s" (i32.const -1)) "out of bounds memory access")
+(assert_trap (invoke "i64.load8_u" (i32.const 0x10000)) "out of bounds memory access")
+(assert_trap (invoke "i64.load8_u" (i32.const -1)) "out of bounds memory access")
+(assert_trap (invoke "i64.load16_s" (i32.const 0x10000)) "out of bounds memory access")
+(assert_trap (invoke "i64.load16_s" (i32.const 0xffff)) "out of bounds memory access")
+(assert_trap (invoke "i64.load16_s" (i32.const -1)) "out of bounds memory access")
+(assert_trap (invoke "i64.load16_s" (i32.const -2)) "out of bounds memory access")
+(assert_trap (invoke "i64.load16_u" (i32.const 0x10000)) "out of bounds memory access")
+(assert_trap (invoke "i64.load16_u" (i32.const 0xffff)) "out of bounds memory access")
+(assert_trap (invoke "i64.load16_u" (i32.const -1)) "out of bounds memory access")
+(assert_trap (invoke "i64.load16_u" (i32.const -2)) "out of bounds memory access")
+(assert_trap (invoke "i64.load32_s" (i32.const 0x10000)) "out of bounds memory access")
+(assert_trap (invoke "i64.load32_s" (i32.const 0xffff)) "out of bounds memory access")
+(assert_trap (invoke "i64.load32_s" (i32.const 0xfffe)) "out of bounds memory access")
+(assert_trap (invoke "i64.load32_s" (i32.const 0xfffd)) "out of bounds memory access")
+(assert_trap (invoke "i64.load32_s" (i32.const -1)) "out of bounds memory access")
+(assert_trap (invoke "i64.load32_s" (i32.const -2)) "out of bounds memory access")
+(assert_trap (invoke "i64.load32_s" (i32.const -3)) "out of bounds memory access")
+(assert_trap (invoke "i64.load32_s" (i32.const -4)) "out of bounds memory access")
+(assert_trap (invoke "i64.load32_u" (i32.const 0x10000)) "out of bounds memory access")
+(assert_trap (invoke "i64.load32_u" (i32.const 0xffff)) "out of bounds memory access")
+(assert_trap (invoke "i64.load32_u" (i32.const 0xfffe)) "out of bounds memory access")
+(assert_trap (invoke "i64.load32_u" (i32.const 0xfffd)) "out of bounds memory access")
+(assert_trap (invoke "i64.load32_u" (i32.const -1)) "out of bounds memory access")
+(assert_trap (invoke "i64.load32_u" (i32.const -2)) "out of bounds memory access")
+(assert_trap (invoke "i64.load32_u" (i32.const -3)) "out of bounds memory access")
+(assert_trap (invoke "i64.load32_u" (i32.const -4)) "out of bounds memory access")
 
 ;; No memory was changed
-(assert_return (invoke "i64.load" (i32.const 0xfff8)) (i64.const 0))
+(assert_return (invoke "i64.load" (i32.const 0xfff8)) (i64.const 0x6867666564636261))
+(assert_return (invoke "i64.load" (i32.const 0)) (i64.const 0x6867666564636261))
diff --git a/test/WasmSpec/testsuite/core/names.wast b/test/WasmSpec/testsuite/core/names.wast
index 07b4deb..b749b23 100644
--- a/test/WasmSpec/testsuite/core/names.wast
+++ b/test/WasmSpec/testsuite/core/names.wast
@@ -18,48 +18,1059 @@
 
 (module
   ;; Test that we can use the empty string as a symbol.
-  (func (export "") (result f32) (f32.const 0x1.91p+2))
+  (func (export "") (result i32) (i32.const 0))
 
   ;; Test that we can use names beginning with a digit.
-  (func (export "0") (result f32) (f32.const 0x1.97p+2))
+  (func (export "0") (result i32) (i32.const 1))
+
+  ;; Test that we can use names beginning with a dash.
+  (func (export "-0") (result i32) (i32.const 2))
 
   ;; Test that we can use names beginning with an underscore.
-  (func (export "_") (result f32) (f32.const 0x1.98p+2))
+  (func (export "_") (result i32) (i32.const 3))
 
   ;; Test that we can use names beginning with a dollar sign.
-  (func (export "$") (result f32) (f32.const 0x1.99p+2))
+  (func (export "$") (result i32) (i32.const 4))
 
   ;; Test that we can use names beginning with an at sign.
-  (func (export "@") (result f32) (f32.const 0x2.00p+2))
+  (func (export "@") (result i32) (i32.const 5))
 
   ;; Test that we can use non-alphanumeric names.
-  (func (export "~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./ ") (result f32) (f32.const 0x1.96p+2))
+  (func (export "~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./ ") (result i32) (i32.const 6))
 
   ;; Test that we can use names that have special meaning in JS.
-  (func (export "NaN") (result f32) (f32.const 0x2.01p+2))
-  (func (export "Infinity") (result f32) (f32.const 0x2.02p+2))
-  (func (export "if") (result f32) (f32.const 0x2.03p+2))
+  (func (export "NaN") (result i32) (i32.const 7))
+  (func (export "Infinity") (result i32) (i32.const 8))
+  (func (export "if") (result i32) (i32.const 9))
 
   ;; Test that we can use common libc names without conflict.
-  (func (export "malloc") (result f32) (f32.const 0x1.92p+2))
+  (func (export "malloc") (result i32) (i32.const 10))
 
   ;; Test that we can use some libc hidden names without conflict.
-  (func (export "_malloc") (result f32) (f32.const 0x1.93p+2))
-  (func (export "__malloc") (result f32) (f32.const 0x1.94p+2))
+  (func (export "_malloc") (result i32) (i32.const 11))
+  (func (export "__malloc") (result i32) (i32.const 12))
+
+  ;; Test that names are case-sensitive.
+  (func (export "a") (result i32) (i32.const 13))
+  (func (export "A") (result i32) (i32.const 14))
+
+  ;; Test that UTF-8 BOM code points can appear in identifiers.
+  (func (export "") (result i32) (i32.const 15))
+
+  ;; Test that Unicode normalization is not applied. These function names
+  ;; contain different codepoints which normalize to the same thing under
+  ;; NFC or NFD.
+  (func (export "Å") (result i32) (i32.const 16))
+  (func (export "Å") (result i32) (i32.const 17))
+  (func (export "Å") (result i32) (i32.const 18))
+
+  ;; Test that Unicode compatibility normalization is not applied. These
+  ;; function names contain different codepoints which normalize to the
+  ;; same thing under NFKC or NFKD.
+  (func (export "ffi") (result i32) (i32.const 19))
+  (func (export "ffi") (result i32) (i32.const 20))
+  (func (export "ffi") (result i32) (i32.const 21))
+
+  ;; Test the C0 control codes.
+  (func (export "\00\01\02\03\04\05\06\07\08\09\0a\0b\0c\0d\0e\0f") (result i32) (i32.const 22))
+  (func (export "\10\11\12\13\14\15\16\17\18\19\1a\1b\1c\1d\1e\1f") (result i32) (i32.const 23))
+  ;; Test miscellaneous control codes.
+  (func (export " \7f") (result i32) (i32.const 24))
+  ;; Test the C1 control codes.
+  (func (export "\c2\80\c2\81\c2\82\c2\83\c2\84\c2\85\c2\86\c2\87\c2\88\c2\89\c2\8a\c2\8b\c2\8c\c2\8d\c2\8e\c2\8f") (result i32) (i32.const 25))
+  (func (export "\c2\90\c2\91\c2\92\c2\93\c2\94\c2\95\c2\96\c2\97\c2\98\c2\99\c2\9a\c2\9b\c2\9c\c2\9d\c2\9e\c2\9f") (result i32) (i32.const 26))
+  ;; Test the Unicode Specials.
+  (func (export "\ef\bf\b0\ef\bf\b1\ef\bf\b2\ef\bf\b3\ef\bf\b4\ef\bf\b5\ef\bf\b6\ef\bf\b7") (result i32) (i32.const 27))
+  (func (export "\ef\bf\b8\ef\bf\b9\ef\bf\ba\ef\bf\bb\ef\bf\bc\ef\bf\bd\ef\bf\be\ef\bf\bf") (result i32) (i32.const 28))
+
+  ;; Test that the control pictures are distinct from the control codes they
+  ;; depict. These correspond to the C0 and miscellaneous control code tests
+  ;; above.
+  (func (export "␀␁␂␃␄␅␆␇␈␉␊␋␌␍␎␏") (result i32) (i32.const 29))
+  (func (export "␐␑␒␓␔␕␖␗␘␙␚␛␜␝␞␟") (result i32) (i32.const 30))
+  (func (export "␠␡") (result i32) (i32.const 31))
+
+  ;; Test the Unicode Specials in non-escaped form (excluding U+FFFE and
+  ;; U+FFFF, so that generic tools don't detect this file as non-UTF-8).
+  (func (export "￰￱￲￳￴￵￶￷￸�") (result i32) (i32.const 32))
+
+  ;; Test a bare ZWJ code point.
+  (func (export "‍") (result i32) (i32.const 33))
+  ;; Test a bare ZWNJ code point.
+  (func (export "‌") (result i32) (i32.const 34))
+
+  ;; Test various bare joiner code points.
+  (func (export "͏") (result i32) (i32.const 35))
+  (func (export "⁠") (result i32) (i32.const 36))
+  (func (export "⵿") (result i32) (i32.const 37))
+  (func (export "𑁿") (result i32) (i32.const 38))
+  (func (export "᠎") (result i32) (i32.const 39))
+
+  ;; Test various interesting code points: reverse BOM, zero-width space,
+  ;; no-break space, soft hyphen, word joiner, ogham space mark,
+  ;; right-to-left override, left-to-right override.
+  (func (export "￯​ ­⁠ ‮‭") (result i32) (i32.const 40))
+
+  ;; Test more interesting code points: left-to-right mark, right-to-left mark,
+  ;; non-breaking hyphen, line separator, paragraph separator,
+  ;; left-to-right embedding, right-to-left embedding,
+  ;; pop directional formatting, narrow no-break space, left-to-right isolate,
+  ;; right-to-left isolate, first strong isolate, pop directional isolate.
+  (func (export "‎‏‑

‪‫‬ ⁦⁧⁨⁩") (result i32) (i32.const 41))
+
+  ;; Test some deprecated code points: inhibit symmetric swapping,
+  ;; activate symmetric swapping, inhibit arabic form shaping,
+  ;; activate arabic form shaping, national digit shapes, nominal digit shapes.
+  (func (export "") (result i32) (i32.const 42))
+
+  ;; Test "invisible" operator code points.
+  (func (export "⁡⁢⁣⁤") (result i32) (i32.const 43))
+
+  ;; Test that code points outside the BMP are supported.
+  (func (export "𐀀󟿿􏿿") (result i32) (i32.const 44))
+
+  ;; Test that WebAssembly implementations cope in the presence of Zalgo.
+  (func (export "Z̴͇̫̥̪͓͈͔͎̗̞̺̯̱̞̙̱̜̖̠̏͆̆͛͌͘͞ḁ̶̰̳̭͙̲̱̹̝͎̼͗ͨ̎̄̆͗̿̀́͟͡l̶̷͉̩̹̫̝͖̙̲̼͇͚͍̮͎̥̞̈́͊͗ͦ̈́ͫ̇́̚ͅͅg̶͕͔͚̩̓̐̅ͮ̔̐̎̂̏̾͊̍͋͊ͧ́̆ͦ͞o̡͋̔͐ͪͩ͏̢̧̫̙̤̮͖͙͓̺̜̩̼̘̠́") (result i32) (i32.const 45))
+
+  ;; Test Hangul filler code points.
+  (func (export "ᅟᅠㅤᅠ") (result i32) (i32.const 46))
+
+  ;; Test variation selectors (which are also ID_Continue code points).
+  (func (export "︀") (result i32) (i32.const 47))
+  (func (export "︄") (result i32) (i32.const 48))
+  (func (export "󠄀") (result i32) (i32.const 49))
+  (func (export "󠇯") (result i32) (i32.const 50))
+
+  ;; Test an uncombined combining code point.
+  (func (export "̈") (result i32) (i32.const 51))
+
+  ;; Test that numerous different present and historical representations of the
+  ;; "newline" concept are distinct. Tests largely inspired by:
+  ;;   https://en.wikipedia.org/wiki/Newline#Representations
+  ;;   https://en.wikipedia.org/wiki/Newline#Unicode and
+  ;;   https://en.wikipedia.org/wiki/Newline#Reverse_and_partial_line_feeds
+  (func (export "\0a") (result i32) (i32.const 52))
+  (func (export "␤") (result i32) (i32.const 53))
+  (func (export "
") (result i32) (i32.const 54))
+  (func (export "\0d") (result i32) (i32.const 55))
+  (func (export "\0d\0a") (result i32) (i32.const 56))
+  (func (export "\0a\0d") (result i32) (i32.const 57))
+  (func (export "\1e") (result i32) (i32.const 58))
+  (func (export "\0b") (result i32) (i32.const 59))
+  (func (export "\0c") (result i32) (i32.const 60))
+  (func (export "\c2\85") (result i32) (i32.const 61))
+  (func (export "
") (result i32) (i32.const 62))
+  (func (export "…") (result i32) (i32.const 63))
+  (func (export "⏎") (result i32) (i32.const 64))
+  (func (export "\c2\8b") (result i32) (i32.const 65))
+  (func (export "\c2\8c") (result i32) (i32.const 66))
+  (func (export "\c2\8d") (result i32) (i32.const 67))
+  (func (export "↵") (result i32) (i32.const 68))
+  (func (export "↩") (result i32) (i32.const 69))
+  (func (export "⌤") (result i32) (i32.const 70))
+  (func (export "⤶") (result i32) (i32.const 71))
+  (func (export "↲") (result i32) (i32.const 72))
+  (func (export "⮨") (result i32) (i32.const 73))
+  (func (export "⮰") (result i32) (i32.const 74))
+
+  ;; Test that non-characters are not replaced by the replacement character.
+  (func (export "�") (result i32) (i32.const 75))
+  (func (export "\ef\b7\90") (result i32) (i32.const 76))
+  (func (export "\ef\b7\91") (result i32) (i32.const 77))
+  (func (export "\ef\b7\92") (result i32) (i32.const 78))
+  (func (export "\ef\b7\93") (result i32) (i32.const 79))
+  (func (export "\ef\b7\94") (result i32) (i32.const 80))
+  (func (export "\ef\b7\95") (result i32) (i32.const 81))
+  (func (export "\ef\b7\96") (result i32) (i32.const 82))
+  (func (export "\ef\b7\97") (result i32) (i32.const 83))
+  (func (export "\ef\b7\98") (result i32) (i32.const 84))
+  (func (export "\ef\b7\99") (result i32) (i32.const 85))
+  (func (export "\ef\b7\9a") (result i32) (i32.const 86))
+  (func (export "\ef\b7\9b") (result i32) (i32.const 87))
+  (func (export "\ef\b7\9c") (result i32) (i32.const 88))
+  (func (export "\ef\b7\9d") (result i32) (i32.const 89))
+  (func (export "\ef\b7\9e") (result i32) (i32.const 90))
+  (func (export "\ef\b7\9f") (result i32) (i32.const 91))
+  (func (export "\ef\b7\a0") (result i32) (i32.const 92))
+  (func (export "\ef\b7\a1") (result i32) (i32.const 93))
+  (func (export "\ef\b7\a2") (result i32) (i32.const 94))
+  (func (export "\ef\b7\a3") (result i32) (i32.const 95))
+  (func (export "\ef\b7\a4") (result i32) (i32.const 96))
+  (func (export "\ef\b7\a5") (result i32) (i32.const 97))
+  (func (export "\ef\b7\a6") (result i32) (i32.const 98))
+  (func (export "\ef\b7\a7") (result i32) (i32.const 99))
+  (func (export "\ef\b7\a8") (result i32) (i32.const 100))
+  (func (export "\ef\b7\a9") (result i32) (i32.const 101))
+  (func (export "\ef\b7\aa") (result i32) (i32.const 102))
+  (func (export "\ef\b7\ab") (result i32) (i32.const 103))
+  (func (export "\ef\b7\ac") (result i32) (i32.const 104))
+  (func (export "\ef\b7\ad") (result i32) (i32.const 105))
+  (func (export "\ef\b7\ae") (result i32) (i32.const 106))
+  (func (export "\ef\b7\af") (result i32) (i32.const 107))
+  (func (export "\ef\bf\be") (result i32) (i32.const 108))
+  (func (export "\ef\bf\bf") (result i32) (i32.const 109))
+  (func (export "\f0\9f\bf\be") (result i32) (i32.const 110))
+  (func (export "\f0\9f\bf\bf") (result i32) (i32.const 111))
+  (func (export "\f0\af\bf\be") (result i32) (i32.const 112))
+  (func (export "\f0\af\bf\bf") (result i32) (i32.const 113))
+  (func (export "\f0\bf\bf\be") (result i32) (i32.const 114))
+  (func (export "\f0\bf\bf\bf") (result i32) (i32.const 115))
+  (func (export "\f1\8f\bf\be") (result i32) (i32.const 116))
+  (func (export "\f1\8f\bf\bf") (result i32) (i32.const 117))
+  (func (export "\f1\9f\bf\be") (result i32) (i32.const 118))
+  (func (export "\f1\9f\bf\bf") (result i32) (i32.const 119))
+  (func (export "\f1\af\bf\be") (result i32) (i32.const 120))
+  (func (export "\f1\af\bf\bf") (result i32) (i32.const 121))
+  (func (export "\f1\bf\bf\be") (result i32) (i32.const 122))
+  (func (export "\f1\bf\bf\bf") (result i32) (i32.const 123))
+  (func (export "\f2\8f\bf\be") (result i32) (i32.const 124))
+  (func (export "\f2\8f\bf\bf") (result i32) (i32.const 125))
+  (func (export "\f2\9f\bf\be") (result i32) (i32.const 126))
+  (func (export "\f2\9f\bf\bf") (result i32) (i32.const 127))
+  (func (export "\f2\af\bf\be") (result i32) (i32.const 128))
+  (func (export "\f2\af\bf\bf") (result i32) (i32.const 129))
+  (func (export "\f2\bf\bf\be") (result i32) (i32.const 130))
+  (func (export "\f2\bf\bf\bf") (result i32) (i32.const 131))
+  (func (export "\f3\8f\bf\be") (result i32) (i32.const 132))
+  (func (export "\f3\8f\bf\bf") (result i32) (i32.const 133))
+  (func (export "\f3\9f\bf\be") (result i32) (i32.const 134))
+  (func (export "\f3\9f\bf\bf") (result i32) (i32.const 135))
+  (func (export "\f3\af\bf\be") (result i32) (i32.const 136))
+  (func (export "\f3\af\bf\bf") (result i32) (i32.const 137))
+  (func (export "\f3\bf\bf\be") (result i32) (i32.const 138))
+  (func (export "\f3\bf\bf\bf") (result i32) (i32.const 139))
+  (func (export "\f4\8f\bf\be") (result i32) (i32.const 140))
+  (func (export "\f4\8f\bf\bf") (result i32) (i32.const 141))
+
+  ;; Test an interrobang with combining diacritical marks above.
+  ;; https://xkcd.com/1209/
+  (func (export "̈‽̈̉") (result i32) (i32.const 142))
+
+  ;; Test that RLM/LRM don't change the logical byte order.
+  (func (export "abc") (result i32) (i32.const 143))
+  (func (export "‭abc") (result i32) (i32.const 144))
+  (func (export "‮cba") (result i32) (i32.const 145))
+  (func (export "‭abc‮") (result i32) (i32.const 146))
+  (func (export "‮cba‭") (result i32) (i32.const 147))
+
+  ;; Test that Unicode font variations are preserved.
+  (func (export "𝑨") (result i32) (i32.const 148))
+  (func (export "𝐴") (result i32) (i32.const 149))
+  (func (export "𝘈") (result i32) (i32.const 150))
+  (func (export "𝘼") (result i32) (i32.const 151))
+  (func (export "𝐀") (result i32) (i32.const 152))
+  (func (export "𝓐") (result i32) (i32.const 153))
+  (func (export "𝕬") (result i32) (i32.const 154))
+  (func (export "𝗔") (result i32) (i32.const 155))
+  (func (export "𝒜") (result i32) (i32.const 156))
+  (func (export "𝔄") (result i32) (i32.const 157))
+  (func (export "𝔸") (result i32) (i32.const 158))
+  (func (export "𝖠") (result i32) (i32.const 159))
+  (func (export "𝙰") (result i32) (i32.const 160))
+  (func (export "ᴀ") (result i32) (i32.const 161))
+
+  ;; Test that various additional letter variations are preserved.
+  ;; (U+0040, U+0061, U+0041, U+00C5, U+0041 U+030A, U+212B, and the font
+  ;; variations are covered above.)
+  (func (export "ᴬ") (result i32) (i32.const 162))
+  (func (export "Ⓐ") (result i32) (i32.const 163))
+  (func (export "A") (result i32) (i32.const 164))
+  (func (export "🄐") (result i32) (i32.const 165))
+  (func (export "🄰") (result i32) (i32.const 166))
+  (func (export "󠁁") (result i32) (i32.const 167))
+  (func (export "U+0041") (result i32) (i32.const 168))
+  (func (export "A​") (result i32) (i32.const 169))
+  (func (export "А") (result i32) (i32.const 170))
+  (func (export "Ꙗ") (result i32) (i32.const 171))
+  (func (export "ⷼ") (result i32) (i32.const 172))
+  (func (export "ⷶ") (result i32) (i32.const 173))
+  (func (export "Ɐ") (result i32) (i32.const 174))
+  (func (export "🅐") (result i32) (i32.const 175))
+  (func (export "🅰") (result i32) (i32.const 176))
+  (func (export "Ⱝ") (result i32) (i32.const 177))
+  (func (export "𐐂") (result i32) (i32.const 178))
+  (func (export "𐐈") (result i32) (i32.const 179))
+  (func (export "𐒰") (result i32) (i32.const 180))
+  (func (export "À") (result i32) (i32.const 181))
+  (func (export "Á") (result i32) (i32.const 182))
+  (func (export "Â") (result i32) (i32.const 183))
+  (func (export "Ã") (result i32) (i32.const 184))
+  (func (export "Ä") (result i32) (i32.const 185))
+  (func (export "Ā") (result i32) (i32.const 186))
+  (func (export "Ă") (result i32) (i32.const 187))
+  (func (export "Ą") (result i32) (i32.const 188))
+  (func (export "Ǎ") (result i32) (i32.const 189))
+  (func (export "Ǟ") (result i32) (i32.const 190))
+  (func (export "Ǡ") (result i32) (i32.const 191))
+  (func (export "Ǻ") (result i32) (i32.const 192))
+  (func (export "Ȁ") (result i32) (i32.const 193))
+  (func (export "Ȃ") (result i32) (i32.const 194))
+  (func (export "Ȧ") (result i32) (i32.const 195))
+  (func (export "Ⱥ") (result i32) (i32.const 196))
+  (func (export "Ӑ") (result i32) (i32.const 197))
+  (func (export "Ӓ") (result i32) (i32.const 198))
+  (func (export "ߊ") (result i32) (i32.const 199))
+  (func (export "ࠡ") (result i32) (i32.const 200))
+  (func (export "ࠢ") (result i32) (i32.const 201))
+  (func (export "ࠣ") (result i32) (i32.const 202))
+  (func (export "ࠤ") (result i32) (i32.const 203))
+  (func (export "ࠥ") (result i32) (i32.const 204))
+  (func (export "ऄ") (result i32) (i32.const 205))
+  (func (export "अ") (result i32) (i32.const 206))
+  (func (export "ॲ") (result i32) (i32.const 207))
+  (func (export "অ") (result i32) (i32.const 208))
+  (func (export "ਅ") (result i32) (i32.const 209))
+  (func (export "અ") (result i32) (i32.const 210))
+  (func (export "ଅ") (result i32) (i32.const 211))
+  (func (export "அ") (result i32) (i32.const 212))
+  (func (export "అ") (result i32) (i32.const 213))
+  (func (export "ಅ") (result i32) (i32.const 214))
+  (func (export "അ") (result i32) (i32.const 215))
+  (func (export "ะ") (result i32) (i32.const 216))
+  (func (export "ະ") (result i32) (i32.const 217))
+  (func (export "༁") (result i32) (i32.const 218))
+  (func (export "ཨ") (result i32) (i32.const 219))
+  (func (export "ྸ") (result i32) (i32.const 220))
+  (func (export "အ") (result i32) (i32.const 221))
+  (func (export "ဢ") (result i32) (i32.const 222))
+  (func (export "ႜ") (result i32) (i32.const 223))
+  (func (export "ᅡ") (result i32) (i32.const 224))
+  (func (export "አ") (result i32) (i32.const 225))
+  (func (export "ዐ") (result i32) (i32.const 226))
+  (func (export "Ꭰ") (result i32) (i32.const 227))
+  (func (export "ᐊ") (result i32) (i32.const 228))
+  (func (export "ᖳ") (result i32) (i32.const 229))
+  (func (export "ᚨ") (result i32) (i32.const 230))
+  (func (export "ᚪ") (result i32) (i32.const 231))
+  (func (export "ᛆ") (result i32) (i32.const 232))
+  (func (export "ᜀ") (result i32) (i32.const 233))
+  (func (export "ᜠ") (result i32) (i32.const 234))
+  (func (export "ᝀ") (result i32) (i32.const 235))
+  (func (export "ᝠ") (result i32) (i32.const 236))
+  (func (export "ᠠ") (result i32) (i32.const 237))
+  (func (export "ᢇ") (result i32) (i32.const 238))
+  (func (export "ᤠ") (result i32) (i32.const 239))
+  (func (export "ᥣ") (result i32) (i32.const 240))
+  (func (export "ᨕ") (result i32) (i32.const 241))
+  (func (export "ᩋ") (result i32) (i32.const 242))
+  (func (export "ᩡ") (result i32) (i32.const 243))
+  (func (export "ᮃ") (result i32) (i32.const 244))
+  (func (export "ᯀ") (result i32) (i32.const 245))
+  (func (export "ᯁ") (result i32) (i32.const 246))
+  (func (export "ᰣ") (result i32) (i32.const 247))
+  (func (export "Ḁ") (result i32) (i32.const 248))
+  (func (export "Ạ") (result i32) (i32.const 249))
+  (func (export "Ả") (result i32) (i32.const 250))
+  (func (export "Ấ") (result i32) (i32.const 251))
+  (func (export "Ầ") (result i32) (i32.const 252))
+  (func (export "Ẩ") (result i32) (i32.const 253))
+  (func (export "Ẫ") (result i32) (i32.const 254))
+  (func (export "Ậ") (result i32) (i32.const 255))
+  (func (export "Ắ") (result i32) (i32.const 256))
+  (func (export "Ằ") (result i32) (i32.const 257))
+  (func (export "Ẳ") (result i32) (i32.const 258))
+  (func (export "Ẵ") (result i32) (i32.const 259))
+  (func (export "Ặ") (result i32) (i32.const 260))
+  (func (export "あ") (result i32) (i32.const 261))
+  (func (export "ア") (result i32) (i32.const 262))
+  (func (export "ㄚ") (result i32) (i32.const 263))
+  (func (export "ㅏ") (result i32) (i32.const 264))
+  (func (export "㈎") (result i32) (i32.const 265))
+  (func (export "㈏") (result i32) (i32.const 266))
+  (func (export "㈐") (result i32) (i32.const 267))
+  (func (export "㈑") (result i32) (i32.const 268))
+  (func (export "㈒") (result i32) (i32.const 269))
+  (func (export "㈓") (result i32) (i32.const 270))
+  (func (export "㈔") (result i32) (i32.const 271))
+  (func (export "㈕") (result i32) (i32.const 272))
+  (func (export "㈖") (result i32) (i32.const 273))
+  (func (export "㈗") (result i32) (i32.const 274))
+  (func (export "㈘") (result i32) (i32.const 275))
+  (func (export "㈙") (result i32) (i32.const 276))
+  (func (export "㈚") (result i32) (i32.const 277))
+  (func (export "㈛") (result i32) (i32.const 278))
+  (func (export "㉮") (result i32) (i32.const 279))
+  (func (export "㉯") (result i32) (i32.const 280))
+  (func (export "㉰") (result i32) (i32.const 281))
+  (func (export "㉱") (result i32) (i32.const 282))
+  (func (export "㉲") (result i32) (i32.const 283))
+  (func (export "㉳") (result i32) (i32.const 284))
+  (func (export "㉴") (result i32) (i32.const 285))
+  (func (export "㉵") (result i32) (i32.const 286))
+  (func (export "㉶") (result i32) (i32.const 287))
+  (func (export "㉷") (result i32) (i32.const 288))
+  (func (export "㉸") (result i32) (i32.const 289))
+  (func (export "㉹") (result i32) (i32.const 290))
+  (func (export "㉺") (result i32) (i32.const 291))
+  (func (export "㉻") (result i32) (i32.const 292))
+  (func (export "㋐") (result i32) (i32.const 293))
+  (func (export "ꀊ") (result i32) (i32.const 294))
+  (func (export "ꓮ") (result i32) (i32.const 295))
+  (func (export "ꕉ") (result i32) (i32.const 296))
+  (func (export "ꚠ") (result i32) (i32.const 297))
+  (func (export "ꠀ") (result i32) (i32.const 298))
+  (func (export "ꠣ") (result i32) (i32.const 299))
+  (func (export "ꡝ") (result i32) (i32.const 300))
+  (func (export "ꢂ") (result i32) (i32.const 301))
+  (func (export "꣪") (result i32) (i32.const 302))
+  (func (export "ꤢ") (result i32) (i32.const 303))
+  (func (export "ꥆ") (result i32) (i32.const 304))
+  (func (export "ꦄ") (result i32) (i32.const 305))
+  (func (export "ꨀ") (result i32) (i32.const 306))
+  (func (export "ア") (result i32) (i32.const 307))
+  (func (export "ᅡ") (result i32) (i32.const 308))
+  (func (export "𐀀") (result i32) (i32.const 309))
+  (func (export "𐊀") (result i32) (i32.const 310))
+  (func (export "𐊠") (result i32) (i32.const 311))
+  (func (export "𐌀") (result i32) (i32.const 312))
+  (func (export "𐎠") (result i32) (i32.const 313))
+  (func (export "𐒖") (result i32) (i32.const 314))
+  (func (export "𐔀") (result i32) (i32.const 315))
+  (func (export "𐝀") (result i32) (i32.const 316))
+  (func (export "𐠀") (result i32) (i32.const 317))
+  (func (export "𐤠") (result i32) (i32.const 318))
+  (func (export "𐦀") (result i32) (i32.const 319))
+  (func (export "𐦠") (result i32) (i32.const 320))
+  (func (export "𐨀") (result i32) (i32.const 321))
+  (func (export "𐬀") (result i32) (i32.const 322))
+  (func (export "𐰀") (result i32) (i32.const 323))
+  (func (export "𐰁") (result i32) (i32.const 324))
+  (func (export "𐲀") (result i32) (i32.const 325))
+  (func (export "𑀅") (result i32) (i32.const 326))
+  (func (export "𑂃") (result i32) (i32.const 327))
+  (func (export "𑄧") (result i32) (i32.const 328))
+  (func (export "𑅐") (result i32) (i32.const 329))
+  (func (export "𑆃") (result i32) (i32.const 330))
+  (func (export "𑈀") (result i32) (i32.const 331))
+  (func (export "𑊀") (result i32) (i32.const 332))
+  (func (export "𑊰") (result i32) (i32.const 333))
+  (func (export "𑌅") (result i32) (i32.const 334))
+  (func (export "𑍰") (result i32) (i32.const 335))
+  (func (export "𑐀") (result i32) (i32.const 336))
+  (func (export "𑒁") (result i32) (i32.const 337))
+  (func (export "𑖀") (result i32) (i32.const 338))
+  (func (export "𑘀") (result i32) (i32.const 339))
+  (func (export "𑚀") (result i32) (i32.const 340))
+  (func (export "𑜒") (result i32) (i32.const 341))
+  (func (export "𑜠") (result i32) (i32.const 342))
+  (func (export "𑢡") (result i32) (i32.const 343))
+  (func (export "𑫕") (result i32) (i32.const 344))
+  (func (export "𑰀") (result i32) (i32.const 345))
+  (func (export "𑲏") (result i32) (i32.const 346))
+  (func (export "𑲯") (result i32) (i32.const 347))
+  (func (export "𒀀") (result i32) (i32.const 348))
+  (func (export "𖧕") (result i32) (i32.const 349))
+  (func (export "𖩆") (result i32) (i32.const 350))
+  (func (export "𖫧") (result i32) (i32.const 351))
+  (func (export "𖽔") (result i32) (i32.const 352))
+  (func (export "𛱁") (result i32) (i32.const 353))
+  (func (export "𛱤") (result i32) (i32.const 354))
+  (func (export "𞠣") (result i32) (i32.const 355))
+  (func (export "🇦") (result i32) (i32.const 356))
+  (func (export "Ɑ") (result i32) (i32.const 357))
+  (func (export "Λ") (result i32) (i32.const 358))
+  (func (export "Ɒ") (result i32) (i32.const 359))
+  (func (export "ª") (result i32) (i32.const 360))
+  (func (export "∀") (result i32) (i32.const 361))
+  (func (export "₳") (result i32) (i32.const 362))
+  (func (export "𐤀") (result i32) (i32.const 363))
+  (func (export "Ⲁ") (result i32) (i32.const 364))
+  (func (export "𐌰") (result i32) (i32.const 365))
+  (func (export "Ά") (result i32) (i32.const 366))
+  (func (export "Α") (result i32) (i32.const 367))
+  (func (export "Ἀ") (result i32) (i32.const 368))
+  (func (export "Ἁ") (result i32) (i32.const 369))
+  (func (export "Ἂ") (result i32) (i32.const 370))
+  (func (export "Ἃ") (result i32) (i32.const 371))
+  (func (export "Ἄ") (result i32) (i32.const 372))
+  (func (export "Ἅ") (result i32) (i32.const 373))
+  (func (export "Ἆ") (result i32) (i32.const 374))
+  (func (export "Ἇ") (result i32) (i32.const 375))
+  (func (export "ᾈ") (result i32) (i32.const 376))
+  (func (export "ᾉ") (result i32) (i32.const 377))
+  (func (export "ᾊ") (result i32) (i32.const 378))
+  (func (export "ᾋ") (result i32) (i32.const 379))
+  (func (export "ᾌ") (result i32) (i32.const 380))
+  (func (export "ᾍ") (result i32) (i32.const 381))
+  (func (export "ᾎ") (result i32) (i32.const 382))
+  (func (export "ᾏ") (result i32) (i32.const 383))
+  (func (export "Ᾰ") (result i32) (i32.const 384))
+  (func (export "Ᾱ") (result i32) (i32.const 385))
+  (func (export "Ὰ") (result i32) (i32.const 386))
+  (func (export "Ά") (result i32) (i32.const 387))
+  (func (export "ᾼ") (result i32) (i32.const 388))
+  (func (export "𝚨") (result i32) (i32.const 389))
+  (func (export "𝛢") (result i32) (i32.const 390))
+  (func (export "𝜜") (result i32) (i32.const 391))
+  (func (export "𝝖") (result i32) (i32.const 392))
+  (func (export "𝞐") (result i32) (i32.const 393))
+  (func (export "⍶") (result i32) (i32.const 394))
+  (func (export "⍺") (result i32) (i32.const 395))
+  (func (export "⩜") (result i32) (i32.const 396))
+  (func (export "ᗅ") (result i32) (i32.const 397))
+  (func (export "Ꭺ") (result i32) (i32.const 398))
+
+  ;; Test unmatched "closing" and "opening" code points.
+  (func (export ")˺˼𔗏𝅴𝅶𝅸𝅺⁾₎❩❫⟯﴿︶﹚)⦆󠀩❳❵⟧⟩⟫⟭⦈⦊⦖⸣⸥︘︸︺︼︾﹀﹂﹄﹈﹜﹞]}」󠁝󠁽»’”›❯") (result i32) (i32.const 399))
+  (func (export "(˹˻𔗎𝅳𝅵𝅷𝅹⁽₍❨❪⟮﴾︵﹙(⦅󠀨❲❴⟦⟨⟪⟬⦇⦉⦕⸢⸤︗︷︹︻︽︿﹁﹃﹇﹛﹝[{「󠁛󠁻«‘“‹❮") (result i32) (i32.const 400))
+  (func (export "𝪋𝪤") (result i32) (i32.const 401))
+  (func (export "𝪋") (result i32) (i32.const 402))
+
+  ;; Test that Unicode fraction normalization is not applied.
+  (func (export "½") (result i32) (i32.const 403))
+  (func (export "1⁄2") (result i32) (i32.const 404))
+  (func (export "1/2") (result i32) (i32.const 405))
+  (func (export "୳") (result i32) (i32.const 406))
+  (func (export "൴") (result i32) (i32.const 407))
+  (func (export "⳽") (result i32) (i32.const 408))
+  (func (export "꠱") (result i32) (i32.const 409))
+  (func (export "𐅁") (result i32) (i32.const 410))
+  (func (export "𐅵") (result i32) (i32.const 411))
+  (func (export "𐅶") (result i32) (i32.const 412))
+  (func (export "𐦽") (result i32) (i32.const 413))
+  (func (export "𐹻") (result i32) (i32.const 414))
+
+  ;; Test a full-width quote.
+  (func (export """) (result i32) (i32.const 415))
+
+  ;; Test that different present and historical representations of the "delete"
+  ;; concept are distinct.
+  (func (export "\7f") (result i32) (i32.const 416))
+  (func (export "\08") (result i32) (i32.const 417))
+  (func (export "⌫") (result i32) (i32.const 418))
+  (func (export "⌦") (result i32) (i32.const 419))
+  (func (export "␈") (result i32) (i32.const 420))
+  (func (export "␡") (result i32) (i32.const 421))
+  (func (export "᷻") (result i32) (i32.const 422))
+  (func (export "\0f") (result i32) (i32.const 423))
+  (func (export "←") (result i32) (i32.const 424))
+  (func (export "⌧") (result i32) (i32.const 425))
+  (func (export "⍒") (result i32) (i32.const 426))
+  (func (export "⍔") (result i32) (i32.const 427))
+  (func (export "⍢") (result i32) (i32.const 428))
+  (func (export "⍫") (result i32) (i32.const 429))
+
+  ;; Test that different representations of the "substitute" concept are
+  ;; distinct. (U+FFFD is covered above.)
+  (func (export "\1a") (result i32) (i32.const 430))
+  (func (export "␦") (result i32) (i32.const 431))
+  (func (export "␚") (result i32) (i32.const 432))
+  (func (export "") (result i32) (i32.const 433))
+  (func (export "?") (result i32) (i32.const 434))
+  (func (export "¿") (result i32) (i32.const 435))
+  (func (export "᥅") (result i32) (i32.const 436))
+  (func (export ";") (result i32) (i32.const 437))
+  (func (export "՞") (result i32) (i32.const 438))
+  (func (export "؟") (result i32) (i32.const 439))
+  (func (export "፧") (result i32) (i32.const 440))
+  (func (export "⁇") (result i32) (i32.const 441))
+  (func (export "⍰") (result i32) (i32.const 442))
+  (func (export "❓") (result i32) (i32.const 443))
+  (func (export "❔") (result i32) (i32.const 444))
+  (func (export "⳺") (result i32) (i32.const 445))
+  (func (export "⳻") (result i32) (i32.const 446))
+  (func (export "⸮") (result i32) (i32.const 447))
+  (func (export "㉄") (result i32) (i32.const 448))
+  (func (export "꘏") (result i32) (i32.const 449))
+  (func (export "꛷") (result i32) (i32.const 450))
+  (func (export "︖") (result i32) (i32.const 451))
+  (func (export "﹖") (result i32) (i32.const 452))
+  (func (export "?") (result i32) (i32.const 453))
+  (func (export "𑅃") (result i32) (i32.const 454))
+  (func (export "𞥟") (result i32) (i32.const 455))
+  (func (export "󠀿") (result i32) (i32.const 456))
+  (func (export "𖡄") (result i32) (i32.const 457))
+  (func (export "⯑") (result i32) (i32.const 458))
+
+  ;; Test that different present and historical representations of the
+  ;; "paragraph" concept are distinct. (U+2029 is covered above).
+  (func (export "¶") (result i32) (i32.const 459))
+  (func (export "⁋") (result i32) (i32.const 460))
+  (func (export "܀") (result i32) (i32.const 461))
+  (func (export "჻") (result i32) (i32.const 462))
+  (func (export "፨") (result i32) (i32.const 463))
+  (func (export "〷") (result i32) (i32.const 464))
+  (func (export "❡") (result i32) (i32.const 465))
+  (func (export "⸏") (result i32) (i32.const 466))
+  (func (export "⸐") (result i32) (i32.const 467))
+  (func (export "⸑") (result i32) (i32.const 468))
+  (func (export "⸎") (result i32) (i32.const 469))
+  (func (export "\14") (result i32) (i32.const 470)) ;; ¶ in CP437
+  (func (export "☙") (result i32) (i32.const 471))
 )
 
-(assert_return (invoke "") (f32.const 0x1.91p+2))
-(assert_return (invoke "malloc") (f32.const 0x1.92p+2))
-(assert_return (invoke "_malloc") (f32.const 0x1.93p+2))
-(assert_return (invoke "__malloc") (f32.const 0x1.94p+2))
-(assert_return (invoke "~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./ ") (f32.const 0x1.96p+2))
-(assert_return (invoke "0") (f32.const 0x1.97p+2))
-(assert_return (invoke "_") (f32.const 0x1.98p+2))
-(assert_return (invoke "$") (f32.const 0x1.99p+2))
-(assert_return (invoke "@") (f32.const 0x2.00p+2))
-(assert_return (invoke "NaN") (f32.const 0x2.01p+2))
-(assert_return (invoke "Infinity") (f32.const 0x2.02p+2))
-(assert_return (invoke "if") (f32.const 0x2.03p+2))
+(assert_return (invoke "") (i32.const 0))
+(assert_return (invoke "0") (i32.const 1))
+(assert_return (invoke "-0") (i32.const 2))
+(assert_return (invoke "_") (i32.const 3))
+(assert_return (invoke "$") (i32.const 4))
+(assert_return (invoke "@") (i32.const 5))
+(assert_return (invoke "~!@#$%^&*()_+`-={}|[]\\:\";'<>?,./ ") (i32.const 6))
+(assert_return (invoke "NaN") (i32.const 7))
+(assert_return (invoke "Infinity") (i32.const 8))
+(assert_return (invoke "if") (i32.const 9))
+(assert_return (invoke "malloc") (i32.const 10))
+(assert_return (invoke "_malloc") (i32.const 11))
+(assert_return (invoke "__malloc") (i32.const 12))
+(assert_return (invoke "a") (i32.const 13))
+(assert_return (invoke "A") (i32.const 14))
+(assert_return (invoke "") (i32.const 15))
+(assert_return (invoke "Å") (i32.const 16))
+(assert_return (invoke "Å") (i32.const 17))
+(assert_return (invoke "Å") (i32.const 18))
+(assert_return (invoke "ffi") (i32.const 19))
+(assert_return (invoke "ffi") (i32.const 20))
+(assert_return (invoke "ffi") (i32.const 21))
+(assert_return (invoke "\00\01\02\03\04\05\06\07\08\09\0a\0b\0c\0d\0e\0f") (i32.const 22))
+(assert_return (invoke "\10\11\12\13\14\15\16\17\18\19\1a\1b\1c\1d\1e\1f") (i32.const 23))
+(assert_return (invoke " \7f") (i32.const 24))
+(assert_return (invoke "\c2\80\c2\81\c2\82\c2\83\c2\84\c2\85\c2\86\c2\87\c2\88\c2\89\c2\8a\c2\8b\c2\8c\c2\8d\c2\8e\c2\8f") (i32.const 25))
+(assert_return (invoke "\c2\90\c2\91\c2\92\c2\93\c2\94\c2\95\c2\96\c2\97\c2\98\c2\99\c2\9a\c2\9b\c2\9c\c2\9d\c2\9e\c2\9f") (i32.const 26))
+(assert_return (invoke "\ef\bf\b0\ef\bf\b1\ef\bf\b2\ef\bf\b3\ef\bf\b4\ef\bf\b5\ef\bf\b6\ef\bf\b7") (i32.const 27))
+(assert_return (invoke "\ef\bf\b8\ef\bf\b9\ef\bf\ba\ef\bf\bb\ef\bf\bc\ef\bf\bd\ef\bf\be\ef\bf\bf") (i32.const 28))
+(assert_return (invoke "␀␁␂␃␄␅␆␇␈␉␊␋␌␍␎␏") (i32.const 29))
+(assert_return (invoke "␐␑␒␓␔␕␖␗␘␙␚␛␜␝␞␟") (i32.const 30))
+(assert_return (invoke "␠␡") (i32.const 31))
+(assert_return (invoke "￰￱￲￳￴￵￶￷￸�") (i32.const 32))
+(assert_return (invoke "‍") (i32.const 33))
+(assert_return (invoke "‌") (i32.const 34))
+(assert_return (invoke "͏") (i32.const 35))
+(assert_return (invoke "⁠") (i32.const 36))
+(assert_return (invoke "⵿") (i32.const 37))
+(assert_return (invoke "𑁿") (i32.const 38))
+(assert_return (invoke "᠎") (i32.const 39))
+(assert_return (invoke "￯​ ­⁠ ‮‭") (i32.const 40))
+(assert_return (invoke "‎‏‑

‪‫‬ ⁦⁧⁨⁩") (i32.const 41))
+(assert_return (invoke "") (i32.const 42))
+(assert_return (invoke "⁡⁢⁣⁤") (i32.const 43))
+(assert_return (invoke "𐀀󟿿􏿿") (i32.const 44))
+(assert_return (invoke "Z̴͇̫̥̪͓͈͔͎̗̞̺̯̱̞̙̱̜̖̠̏͆̆͛͌͘͞ḁ̶̰̳̭͙̲̱̹̝͎̼͗ͨ̎̄̆͗̿̀́͟͡l̶̷͉̩̹̫̝͖̙̲̼͇͚͍̮͎̥̞̈́͊͗ͦ̈́ͫ̇́̚ͅͅg̶͕͔͚̩̓̐̅ͮ̔̐̎̂̏̾͊̍͋͊ͧ́̆ͦ͞o̡͋̔͐ͪͩ͏̢̧̫̙̤̮͖͙͓̺̜̩̼̘̠́") (i32.const 45))
+(assert_return (invoke "ᅟᅠㅤᅠ") (i32.const 46))
+(assert_return (invoke "︀") (i32.const 47))
+(assert_return (invoke "︄") (i32.const 48))
+(assert_return (invoke "󠄀") (i32.const 49))
+(assert_return (invoke "󠇯") (i32.const 50))
+(assert_return (invoke "̈") (i32.const 51))
+(assert_return (invoke "\0a") (i32.const 52))
+(assert_return (invoke "␤") (i32.const 53))
+(assert_return (invoke "
") (i32.const 54))
+(assert_return (invoke "\0d") (i32.const 55))
+(assert_return (invoke "\0d\0a") (i32.const 56))
+(assert_return (invoke "\0a\0d") (i32.const 57))
+(assert_return (invoke "\1e") (i32.const 58))
+(assert_return (invoke "\0b") (i32.const 59))
+(assert_return (invoke "\0c") (i32.const 60))
+(assert_return (invoke "\c2\85") (i32.const 61))
+(assert_return (invoke "
") (i32.const 62))
+(assert_return (invoke "…") (i32.const 63))
+(assert_return (invoke "⏎") (i32.const 64))
+(assert_return (invoke "\c2\8b") (i32.const 65))
+(assert_return (invoke "\c2\8c") (i32.const 66))
+(assert_return (invoke "\c2\8d") (i32.const 67))
+(assert_return (invoke "↵") (i32.const 68))
+(assert_return (invoke "↩") (i32.const 69))
+(assert_return (invoke "⌤") (i32.const 70))
+(assert_return (invoke "⤶") (i32.const 71))
+(assert_return (invoke "↲") (i32.const 72))
+(assert_return (invoke "⮨") (i32.const 73))
+(assert_return (invoke "⮰") (i32.const 74))
+(assert_return (invoke "�") (i32.const 75))
+(assert_return (invoke "\ef\b7\90") (i32.const 76))
+(assert_return (invoke "\ef\b7\91") (i32.const 77))
+(assert_return (invoke "\ef\b7\92") (i32.const 78))
+(assert_return (invoke "\ef\b7\93") (i32.const 79))
+(assert_return (invoke "\ef\b7\94") (i32.const 80))
+(assert_return (invoke "\ef\b7\95") (i32.const 81))
+(assert_return (invoke "\ef\b7\96") (i32.const 82))
+(assert_return (invoke "\ef\b7\97") (i32.const 83))
+(assert_return (invoke "\ef\b7\98") (i32.const 84))
+(assert_return (invoke "\ef\b7\99") (i32.const 85))
+(assert_return (invoke "\ef\b7\9a") (i32.const 86))
+(assert_return (invoke "\ef\b7\9b") (i32.const 87))
+(assert_return (invoke "\ef\b7\9c") (i32.const 88))
+(assert_return (invoke "\ef\b7\9d") (i32.const 89))
+(assert_return (invoke "\ef\b7\9e") (i32.const 90))
+(assert_return (invoke "\ef\b7\9f") (i32.const 91))
+(assert_return (invoke "\ef\b7\a0") (i32.const 92))
+(assert_return (invoke "\ef\b7\a1") (i32.const 93))
+(assert_return (invoke "\ef\b7\a2") (i32.const 94))
+(assert_return (invoke "\ef\b7\a3") (i32.const 95))
+(assert_return (invoke "\ef\b7\a4") (i32.const 96))
+(assert_return (invoke "\ef\b7\a5") (i32.const 97))
+(assert_return (invoke "\ef\b7\a6") (i32.const 98))
+(assert_return (invoke "\ef\b7\a7") (i32.const 99))
+(assert_return (invoke "\ef\b7\a8") (i32.const 100))
+(assert_return (invoke "\ef\b7\a9") (i32.const 101))
+(assert_return (invoke "\ef\b7\aa") (i32.const 102))
+(assert_return (invoke "\ef\b7\ab") (i32.const 103))
+(assert_return (invoke "\ef\b7\ac") (i32.const 104))
+(assert_return (invoke "\ef\b7\ad") (i32.const 105))
+(assert_return (invoke "\ef\b7\ae") (i32.const 106))
+(assert_return (invoke "\ef\b7\af") (i32.const 107))
+(assert_return (invoke "\ef\bf\be") (i32.const 108))
+(assert_return (invoke "\ef\bf\bf") (i32.const 109))
+(assert_return (invoke "\f0\9f\bf\be") (i32.const 110))
+(assert_return (invoke "\f0\9f\bf\bf") (i32.const 111))
+(assert_return (invoke "\f0\af\bf\be") (i32.const 112))
+(assert_return (invoke "\f0\af\bf\bf") (i32.const 113))
+(assert_return (invoke "\f0\bf\bf\be") (i32.const 114))
+(assert_return (invoke "\f0\bf\bf\bf") (i32.const 115))
+(assert_return (invoke "\f1\8f\bf\be") (i32.const 116))
+(assert_return (invoke "\f1\8f\bf\bf") (i32.const 117))
+(assert_return (invoke "\f1\9f\bf\be") (i32.const 118))
+(assert_return (invoke "\f1\9f\bf\bf") (i32.const 119))
+(assert_return (invoke "\f1\af\bf\be") (i32.const 120))
+(assert_return (invoke "\f1\af\bf\bf") (i32.const 121))
+(assert_return (invoke "\f1\bf\bf\be") (i32.const 122))
+(assert_return (invoke "\f1\bf\bf\bf") (i32.const 123))
+(assert_return (invoke "\f2\8f\bf\be") (i32.const 124))
+(assert_return (invoke "\f2\8f\bf\bf") (i32.const 125))
+(assert_return (invoke "\f2\9f\bf\be") (i32.const 126))
+(assert_return (invoke "\f2\9f\bf\bf") (i32.const 127))
+(assert_return (invoke "\f2\af\bf\be") (i32.const 128))
+(assert_return (invoke "\f2\af\bf\bf") (i32.const 129))
+(assert_return (invoke "\f2\bf\bf\be") (i32.const 130))
+(assert_return (invoke "\f2\bf\bf\bf") (i32.const 131))
+(assert_return (invoke "\f3\8f\bf\be") (i32.const 132))
+(assert_return (invoke "\f3\8f\bf\bf") (i32.const 133))
+(assert_return (invoke "\f3\9f\bf\be") (i32.const 134))
+(assert_return (invoke "\f3\9f\bf\bf") (i32.const 135))
+(assert_return (invoke "\f3\af\bf\be") (i32.const 136))
+(assert_return (invoke "\f3\af\bf\bf") (i32.const 137))
+(assert_return (invoke "\f3\bf\bf\be") (i32.const 138))
+(assert_return (invoke "\f3\bf\bf\bf") (i32.const 139))
+(assert_return (invoke "\f4\8f\bf\be") (i32.const 140))
+(assert_return (invoke "\f4\8f\bf\bf") (i32.const 141))
+(assert_return (invoke "̈‽̈̉") (i32.const 142))
+(assert_return (invoke "abc") (i32.const 143))
+(assert_return (invoke "‭abc") (i32.const 144))
+(assert_return (invoke "‮cba") (i32.const 145))
+(assert_return (invoke "‭abc‮") (i32.const 146))
+(assert_return (invoke "‮cba‭") (i32.const 147))
+(assert_return (invoke "𝑨") (i32.const 148))
+(assert_return (invoke "𝐴") (i32.const 149))
+(assert_return (invoke "𝘈") (i32.const 150))
+(assert_return (invoke "𝘼") (i32.const 151))
+(assert_return (invoke "𝐀") (i32.const 152))
+(assert_return (invoke "𝓐") (i32.const 153))
+(assert_return (invoke "𝕬") (i32.const 154))
+(assert_return (invoke "𝗔") (i32.const 155))
+(assert_return (invoke "𝒜") (i32.const 156))
+(assert_return (invoke "𝔄") (i32.const 157))
+(assert_return (invoke "𝔸") (i32.const 158))
+(assert_return (invoke "𝖠") (i32.const 159))
+(assert_return (invoke "𝙰") (i32.const 160))
+(assert_return (invoke "ᴀ") (i32.const 161))
+(assert_return (invoke "ᴬ") (i32.const 162))
+(assert_return (invoke "Ⓐ") (i32.const 163))
+(assert_return (invoke "A") (i32.const 164))
+(assert_return (invoke "🄐") (i32.const 165))
+(assert_return (invoke "🄰") (i32.const 166))
+(assert_return (invoke "󠁁") (i32.const 167))
+(assert_return (invoke "U+0041") (i32.const 168))
+(assert_return (invoke "A​") (i32.const 169))
+(assert_return (invoke "А") (i32.const 170))
+(assert_return (invoke "Ꙗ") (i32.const 171))
+(assert_return (invoke "ⷼ") (i32.const 172))
+(assert_return (invoke "ⷶ") (i32.const 173))
+(assert_return (invoke "Ɐ") (i32.const 174))
+(assert_return (invoke "🅐") (i32.const 175))
+(assert_return (invoke "🅰") (i32.const 176))
+(assert_return (invoke "Ⱝ") (i32.const 177))
+(assert_return (invoke "𐐂") (i32.const 178))
+(assert_return (invoke "𐐈") (i32.const 179))
+(assert_return (invoke "𐒰") (i32.const 180))
+(assert_return (invoke "À") (i32.const 181))
+(assert_return (invoke "Á") (i32.const 182))
+(assert_return (invoke "Â") (i32.const 183))
+(assert_return (invoke "Ã") (i32.const 184))
+(assert_return (invoke "Ä") (i32.const 185))
+(assert_return (invoke "Ā") (i32.const 186))
+(assert_return (invoke "Ă") (i32.const 187))
+(assert_return (invoke "Ą") (i32.const 188))
+(assert_return (invoke "Ǎ") (i32.const 189))
+(assert_return (invoke "Ǟ") (i32.const 190))
+(assert_return (invoke "Ǡ") (i32.const 191))
+(assert_return (invoke "Ǻ") (i32.const 192))
+(assert_return (invoke "Ȁ") (i32.const 193))
+(assert_return (invoke "Ȃ") (i32.const 194))
+(assert_return (invoke "Ȧ") (i32.const 195))
+(assert_return (invoke "Ⱥ") (i32.const 196))
+(assert_return (invoke "Ӑ") (i32.const 197))
+(assert_return (invoke "Ӓ") (i32.const 198))
+(assert_return (invoke "ߊ") (i32.const 199))
+(assert_return (invoke "ࠡ") (i32.const 200))
+(assert_return (invoke "ࠢ") (i32.const 201))
+(assert_return (invoke "ࠣ") (i32.const 202))
+(assert_return (invoke "ࠤ") (i32.const 203))
+(assert_return (invoke "ࠥ") (i32.const 204))
+(assert_return (invoke "ऄ") (i32.const 205))
+(assert_return (invoke "अ") (i32.const 206))
+(assert_return (invoke "ॲ") (i32.const 207))
+(assert_return (invoke "অ") (i32.const 208))
+(assert_return (invoke "ਅ") (i32.const 209))
+(assert_return (invoke "અ") (i32.const 210))
+(assert_return (invoke "ଅ") (i32.const 211))
+(assert_return (invoke "அ") (i32.const 212))
+(assert_return (invoke "అ") (i32.const 213))
+(assert_return (invoke "ಅ") (i32.const 214))
+(assert_return (invoke "അ") (i32.const 215))
+(assert_return (invoke "ะ") (i32.const 216))
+(assert_return (invoke "ະ") (i32.const 217))
+(assert_return (invoke "༁") (i32.const 218))
+(assert_return (invoke "ཨ") (i32.const 219))
+(assert_return (invoke "ྸ") (i32.const 220))
+(assert_return (invoke "အ") (i32.const 221))
+(assert_return (invoke "ဢ") (i32.const 222))
+(assert_return (invoke "ႜ") (i32.const 223))
+(assert_return (invoke "ᅡ") (i32.const 224))
+(assert_return (invoke "አ") (i32.const 225))
+(assert_return (invoke "ዐ") (i32.const 226))
+(assert_return (invoke "Ꭰ") (i32.const 227))
+(assert_return (invoke "ᐊ") (i32.const 228))
+(assert_return (invoke "ᖳ") (i32.const 229))
+(assert_return (invoke "ᚨ") (i32.const 230))
+(assert_return (invoke "ᚪ") (i32.const 231))
+(assert_return (invoke "ᛆ") (i32.const 232))
+(assert_return (invoke "ᜀ") (i32.const 233))
+(assert_return (invoke "ᜠ") (i32.const 234))
+(assert_return (invoke "ᝀ") (i32.const 235))
+(assert_return (invoke "ᝠ") (i32.const 236))
+(assert_return (invoke "ᠠ") (i32.const 237))
+(assert_return (invoke "ᢇ") (i32.const 238))
+(assert_return (invoke "ᤠ") (i32.const 239))
+(assert_return (invoke "ᥣ") (i32.const 240))
+(assert_return (invoke "ᨕ") (i32.const 241))
+(assert_return (invoke "ᩋ") (i32.const 242))
+(assert_return (invoke "ᩡ") (i32.const 243))
+(assert_return (invoke "ᮃ") (i32.const 244))
+(assert_return (invoke "ᯀ") (i32.const 245))
+(assert_return (invoke "ᯁ") (i32.const 246))
+(assert_return (invoke "ᰣ") (i32.const 247))
+(assert_return (invoke "Ḁ") (i32.const 248))
+(assert_return (invoke "Ạ") (i32.const 249))
+(assert_return (invoke "Ả") (i32.const 250))
+(assert_return (invoke "Ấ") (i32.const 251))
+(assert_return (invoke "Ầ") (i32.const 252))
+(assert_return (invoke "Ẩ") (i32.const 253))
+(assert_return (invoke "Ẫ") (i32.const 254))
+(assert_return (invoke "Ậ") (i32.const 255))
+(assert_return (invoke "Ắ") (i32.const 256))
+(assert_return (invoke "Ằ") (i32.const 257))
+(assert_return (invoke "Ẳ") (i32.const 258))
+(assert_return (invoke "Ẵ") (i32.const 259))
+(assert_return (invoke "Ặ") (i32.const 260))
+(assert_return (invoke "あ") (i32.const 261))
+(assert_return (invoke "ア") (i32.const 262))
+(assert_return (invoke "ㄚ") (i32.const 263))
+(assert_return (invoke "ㅏ") (i32.const 264))
+(assert_return (invoke "㈎") (i32.const 265))
+(assert_return (invoke "㈏") (i32.const 266))
+(assert_return (invoke "㈐") (i32.const 267))
+(assert_return (invoke "㈑") (i32.const 268))
+(assert_return (invoke "㈒") (i32.const 269))
+(assert_return (invoke "㈓") (i32.const 270))
+(assert_return (invoke "㈔") (i32.const 271))
+(assert_return (invoke "㈕") (i32.const 272))
+(assert_return (invoke "㈖") (i32.const 273))
+(assert_return (invoke "㈗") (i32.const 274))
+(assert_return (invoke "㈘") (i32.const 275))
+(assert_return (invoke "㈙") (i32.const 276))
+(assert_return (invoke "㈚") (i32.const 277))
+(assert_return (invoke "㈛") (i32.const 278))
+(assert_return (invoke "㉮") (i32.const 279))
+(assert_return (invoke "㉯") (i32.const 280))
+(assert_return (invoke "㉰") (i32.const 281))
+(assert_return (invoke "㉱") (i32.const 282))
+(assert_return (invoke "㉲") (i32.const 283))
+(assert_return (invoke "㉳") (i32.const 284))
+(assert_return (invoke "㉴") (i32.const 285))
+(assert_return (invoke "㉵") (i32.const 286))
+(assert_return (invoke "㉶") (i32.const 287))
+(assert_return (invoke "㉷") (i32.const 288))
+(assert_return (invoke "㉸") (i32.const 289))
+(assert_return (invoke "㉹") (i32.const 290))
+(assert_return (invoke "㉺") (i32.const 291))
+(assert_return (invoke "㉻") (i32.const 292))
+(assert_return (invoke "㋐") (i32.const 293))
+(assert_return (invoke "ꀊ") (i32.const 294))
+(assert_return (invoke "ꓮ") (i32.const 295))
+(assert_return (invoke "ꕉ") (i32.const 296))
+(assert_return (invoke "ꚠ") (i32.const 297))
+(assert_return (invoke "ꠀ") (i32.const 298))
+(assert_return (invoke "ꠣ") (i32.const 299))
+(assert_return (invoke "ꡝ") (i32.const 300))
+(assert_return (invoke "ꢂ") (i32.const 301))
+(assert_return (invoke "꣪") (i32.const 302))
+(assert_return (invoke "ꤢ") (i32.const 303))
+(assert_return (invoke "ꥆ") (i32.const 304))
+(assert_return (invoke "ꦄ") (i32.const 305))
+(assert_return (invoke "ꨀ") (i32.const 306))
+(assert_return (invoke "ア") (i32.const 307))
+(assert_return (invoke "ᅡ") (i32.const 308))
+(assert_return (invoke "𐀀") (i32.const 309))
+(assert_return (invoke "𐊀") (i32.const 310))
+(assert_return (invoke "𐊠") (i32.const 311))
+(assert_return (invoke "𐌀") (i32.const 312))
+(assert_return (invoke "𐎠") (i32.const 313))
+(assert_return (invoke "𐒖") (i32.const 314))
+(assert_return (invoke "𐔀") (i32.const 315))
+(assert_return (invoke "𐝀") (i32.const 316))
+(assert_return (invoke "𐠀") (i32.const 317))
+(assert_return (invoke "𐤠") (i32.const 318))
+(assert_return (invoke "𐦀") (i32.const 319))
+(assert_return (invoke "𐦠") (i32.const 320))
+(assert_return (invoke "𐨀") (i32.const 321))
+(assert_return (invoke "𐬀") (i32.const 322))
+(assert_return (invoke "𐰀") (i32.const 323))
+(assert_return (invoke "𐰁") (i32.const 324))
+(assert_return (invoke "𐲀") (i32.const 325))
+(assert_return (invoke "𑀅") (i32.const 326))
+(assert_return (invoke "𑂃") (i32.const 327))
+(assert_return (invoke "𑄧") (i32.const 328))
+(assert_return (invoke "𑅐") (i32.const 329))
+(assert_return (invoke "𑆃") (i32.const 330))
+(assert_return (invoke "𑈀") (i32.const 331))
+(assert_return (invoke "𑊀") (i32.const 332))
+(assert_return (invoke "𑊰") (i32.const 333))
+(assert_return (invoke "𑌅") (i32.const 334))
+(assert_return (invoke "𑍰") (i32.const 335))
+(assert_return (invoke "𑐀") (i32.const 336))
+(assert_return (invoke "𑒁") (i32.const 337))
+(assert_return (invoke "𑖀") (i32.const 338))
+(assert_return (invoke "𑘀") (i32.const 339))
+(assert_return (invoke "𑚀") (i32.const 340))
+(assert_return (invoke "𑜒") (i32.const 341))
+(assert_return (invoke "𑜠") (i32.const 342))
+(assert_return (invoke "𑢡") (i32.const 343))
+(assert_return (invoke "𑫕") (i32.const 344))
+(assert_return (invoke "𑰀") (i32.const 345))
+(assert_return (invoke "𑲏") (i32.const 346))
+(assert_return (invoke "𑲯") (i32.const 347))
+(assert_return (invoke "𒀀") (i32.const 348))
+(assert_return (invoke "𖧕") (i32.const 349))
+(assert_return (invoke "𖩆") (i32.const 350))
+(assert_return (invoke "𖫧") (i32.const 351))
+(assert_return (invoke "𖽔") (i32.const 352))
+(assert_return (invoke "𛱁") (i32.const 353))
+(assert_return (invoke "𛱤") (i32.const 354))
+(assert_return (invoke "𞠣") (i32.const 355))
+(assert_return (invoke "🇦") (i32.const 356))
+(assert_return (invoke "Ɑ") (i32.const 357))
+(assert_return (invoke "Λ") (i32.const 358))
+(assert_return (invoke "Ɒ") (i32.const 359))
+(assert_return (invoke "ª") (i32.const 360))
+(assert_return (invoke "∀") (i32.const 361))
+(assert_return (invoke "₳") (i32.const 362))
+(assert_return (invoke "𐤀") (i32.const 363))
+(assert_return (invoke "Ⲁ") (i32.const 364))
+(assert_return (invoke "𐌰") (i32.const 365))
+(assert_return (invoke "Ά") (i32.const 366))
+(assert_return (invoke "Α") (i32.const 367))
+(assert_return (invoke "Ἀ") (i32.const 368))
+(assert_return (invoke "Ἁ") (i32.const 369))
+(assert_return (invoke "Ἂ") (i32.const 370))
+(assert_return (invoke "Ἃ") (i32.const 371))
+(assert_return (invoke "Ἄ") (i32.const 372))
+(assert_return (invoke "Ἅ") (i32.const 373))
+(assert_return (invoke "Ἆ") (i32.const 374))
+(assert_return (invoke "Ἇ") (i32.const 375))
+(assert_return (invoke "ᾈ") (i32.const 376))
+(assert_return (invoke "ᾉ") (i32.const 377))
+(assert_return (invoke "ᾊ") (i32.const 378))
+(assert_return (invoke "ᾋ") (i32.const 379))
+(assert_return (invoke "ᾌ") (i32.const 380))
+(assert_return (invoke "ᾍ") (i32.const 381))
+(assert_return (invoke "ᾎ") (i32.const 382))
+(assert_return (invoke "ᾏ") (i32.const 383))
+(assert_return (invoke "Ᾰ") (i32.const 384))
+(assert_return (invoke "Ᾱ") (i32.const 385))
+(assert_return (invoke "Ὰ") (i32.const 386))
+(assert_return (invoke "Ά") (i32.const 387))
+(assert_return (invoke "ᾼ") (i32.const 388))
+(assert_return (invoke "𝚨") (i32.const 389))
+(assert_return (invoke "𝛢") (i32.const 390))
+(assert_return (invoke "𝜜") (i32.const 391))
+(assert_return (invoke "𝝖") (i32.const 392))
+(assert_return (invoke "𝞐") (i32.const 393))
+(assert_return (invoke "⍶") (i32.const 394))
+(assert_return (invoke "⍺") (i32.const 395))
+(assert_return (invoke "⩜") (i32.const 396))
+(assert_return (invoke "ᗅ") (i32.const 397))
+(assert_return (invoke "Ꭺ") (i32.const 398))
+(assert_return (invoke ")˺˼𔗏𝅴𝅶𝅸𝅺⁾₎❩❫⟯﴿︶﹚)⦆󠀩❳❵⟧⟩⟫⟭⦈⦊⦖⸣⸥︘︸︺︼︾﹀﹂﹄﹈﹜﹞]}」󠁝󠁽»’”›❯") (i32.const 399))
+(assert_return (invoke "(˹˻𔗎𝅳𝅵𝅷𝅹⁽₍❨❪⟮﴾︵﹙(⦅󠀨❲❴⟦⟨⟪⟬⦇⦉⦕⸢⸤︗︷︹︻︽︿﹁﹃﹇﹛﹝[{「󠁛󠁻«‘“‹❮") (i32.const 400))
+(assert_return (invoke "𝪋𝪤") (i32.const 401))
+(assert_return (invoke "𝪋") (i32.const 402))
+(assert_return (invoke "½") (i32.const 403))
+(assert_return (invoke "1⁄2") (i32.const 404))
+(assert_return (invoke "1/2") (i32.const 405))
+(assert_return (invoke "୳") (i32.const 406))
+(assert_return (invoke "൴") (i32.const 407))
+(assert_return (invoke "⳽") (i32.const 408))
+(assert_return (invoke "꠱") (i32.const 409))
+(assert_return (invoke "𐅁") (i32.const 410))
+(assert_return (invoke "𐅵") (i32.const 411))
+(assert_return (invoke "𐅶") (i32.const 412))
+(assert_return (invoke "𐦽") (i32.const 413))
+(assert_return (invoke "𐹻") (i32.const 414))
+(assert_return (invoke """) (i32.const 415))
+(assert_return (invoke "\7f") (i32.const 416))
+(assert_return (invoke "\08") (i32.const 417))
+(assert_return (invoke "⌫") (i32.const 418))
+(assert_return (invoke "⌦") (i32.const 419))
+(assert_return (invoke "␈") (i32.const 420))
+(assert_return (invoke "␡") (i32.const 421))
+(assert_return (invoke "᷻") (i32.const 422))
+(assert_return (invoke "\0f") (i32.const 423))
+(assert_return (invoke "←") (i32.const 424))
+(assert_return (invoke "⌧") (i32.const 425))
+(assert_return (invoke "⍒") (i32.const 426))
+(assert_return (invoke "⍔") (i32.const 427))
+(assert_return (invoke "⍢") (i32.const 428))
+(assert_return (invoke "⍫") (i32.const 429))
+(assert_return (invoke "\1a") (i32.const 430))
+(assert_return (invoke "␦") (i32.const 431))
+(assert_return (invoke "␚") (i32.const 432))
+(assert_return (invoke "") (i32.const 433))
+(assert_return (invoke "?") (i32.const 434))
+(assert_return (invoke "¿") (i32.const 435))
+(assert_return (invoke "᥅") (i32.const 436))
+(assert_return (invoke ";") (i32.const 437))
+(assert_return (invoke "՞") (i32.const 438))
+(assert_return (invoke "؟") (i32.const 439))
+(assert_return (invoke "፧") (i32.const 440))
+(assert_return (invoke "⁇") (i32.const 441))
+(assert_return (invoke "⍰") (i32.const 442))
+(assert_return (invoke "❓") (i32.const 443))
+(assert_return (invoke "❔") (i32.const 444))
+(assert_return (invoke "⳺") (i32.const 445))
+(assert_return (invoke "⳻") (i32.const 446))
+(assert_return (invoke "⸮") (i32.const 447))
+(assert_return (invoke "㉄") (i32.const 448))
+(assert_return (invoke "꘏") (i32.const 449))
+(assert_return (invoke "꛷") (i32.const 450))
+(assert_return (invoke "︖") (i32.const 451))
+(assert_return (invoke "﹖") (i32.const 452))
+(assert_return (invoke "?") (i32.const 453))
+(assert_return (invoke "𑅃") (i32.const 454))
+(assert_return (invoke "𞥟") (i32.const 455))
+(assert_return (invoke "󠀿") (i32.const 456))
+(assert_return (invoke "𖡄") (i32.const 457))
+(assert_return (invoke "⯑") (i32.const 458))
+(assert_return (invoke "¶") (i32.const 459))
+(assert_return (invoke "⁋") (i32.const 460))
+(assert_return (invoke "܀") (i32.const 461))
+(assert_return (invoke "჻") (i32.const 462))
+(assert_return (invoke "፨") (i32.const 463))
+(assert_return (invoke "〷") (i32.const 464))
+(assert_return (invoke "❡") (i32.const 465))
+(assert_return (invoke "⸏") (i32.const 466))
+(assert_return (invoke "⸐") (i32.const 467))
+(assert_return (invoke "⸑") (i32.const 468))
+(assert_return (invoke "⸎") (i32.const 469))
+(assert_return (invoke "\14") (i32.const 470))
+(assert_return (invoke "☙") (i32.const 471))
 
 (module
   ;; Test that we can use indices instead of names to reference imports,
diff --git a/test/WasmSpec/testsuite/core/nop.wast b/test/WasmSpec/testsuite/core/nop.wast
index ab83eed..2862315 100644
--- a/test/WasmSpec/testsuite/core/nop.wast
+++ b/test/WasmSpec/testsuite/core/nop.wast
@@ -43,69 +43,73 @@
   )
 
   (func (export "as-block-first") (result i32)
-    (block i32 (nop) (i32.const 2))
+    (block (result i32) (nop) (i32.const 2))
   )
   (func (export "as-block-mid") (result i32)
-    (block i32 (call $dummy) (nop) (i32.const 2))
+    (block (result i32) (call $dummy) (nop) (i32.const 2))
   )
   (func (export "as-block-last") (result i32)
-    (block i32 (nop) (call $dummy) (i32.const 3) (nop))
+    (block (result i32) (nop) (call $dummy) (i32.const 3) (nop))
   )
   (func (export "as-block-everywhere") (result i32)
-    (block i32 (nop) (nop) (call $dummy) (nop) (i32.const 4) (nop) (nop))
+    (block (result i32)
+      (nop) (nop) (call $dummy) (nop) (i32.const 4) (nop) (nop)
+    )
   )
 
   (func (export "as-loop-first") (result i32)
-    (loop i32 (nop) (i32.const 2))
+    (loop (result i32) (nop) (i32.const 2))
   )
   (func (export "as-loop-mid") (result i32)
-    (loop i32 (call $dummy) (nop) (i32.const 2))
+    (loop (result i32) (call $dummy) (nop) (i32.const 2))
   )
   (func (export "as-loop-last") (result i32)
-    (loop i32 (call $dummy) (i32.const 3) (nop))
+    (loop (result i32) (call $dummy) (i32.const 3) (nop))
   )
   (func (export "as-loop-everywhere") (result i32)
-    (loop i32 (nop) (nop) (call $dummy) (nop) (i32.const 4) (nop) (nop))
+    (loop (result i32)
+      (nop) (nop) (call $dummy) (nop) (i32.const 4) (nop) (nop)
+    )
   )
 
   (func (export "as-if-condition") (param i32)
     (get_local 0) (nop) (if (then (call $dummy)))
   )
   (func (export "as-if-then") (param i32)
-    (if (get_local 0) (nop) (call $dummy))
+    (if (get_local 0) (then (nop)) (else (call $dummy)))
   )
   (func (export "as-if-else") (param i32)
-    (if (get_local 0) (call $dummy) (nop))
+    (if (get_local 0) (then (call $dummy)) (else (nop)))
   )
 
   (func (export "as-br-last") (param i32) (result i32)
-    (block i32 (get_local 0) (nop) (br 0))
+    (block (result i32) (get_local 0) (nop) (br 0))
   )
   (func (export "as-br-everywhere") (param i32) (result i32)
-    (block i32 (nop) (nop) (get_local 0) (nop) (nop) (br 0))
+    (block (result i32) (nop) (nop) (get_local 0) (nop) (nop) (br 0))
   )
 
   (func (export "as-br_if-mid") (param i32) (result i32)
-    (block i32 (get_local 0) (nop) (get_local 0) (br_if 0))
+    (block (result i32) (get_local 0) (nop) (get_local 0) (br_if 0))
   )
   (func (export "as-br_if-last") (param i32) (result i32)
-    (block i32 (get_local 0) (get_local 0) (nop) (br_if 0))
+    (block (result i32) (get_local 0) (get_local 0) (nop) (br_if 0))
   )
   (func (export "as-br_if-everywhere") (param i32) (result i32)
-    (block i32
+    (block (result i32)
       (nop) (nop) (get_local 0) (nop) (nop) (get_local 0) (nop) (nop)
       (br_if 0)
     )
   )
 
   (func (export "as-br_table-mid") (param i32) (result i32)
-    (block i32 (get_local 0) (nop) (get_local 0) (br_table 0 0))
+    (block (result i32) (get_local 0) (nop) (get_local 0) (br_table 0 0))
   )
   (func (export "as-br_table-last") (param i32) (result i32)
-    (block i32 (get_local 0) (get_local 0) (nop) (br_table 0 0))
+    (block (result i32) (get_local 0) (get_local 0) (nop) (br_table 0 0))
   )
   (func (export "as-br_table-everywhere") (param i32) (result i32)
-    (block i32
+    (block (result i32)
       (nop) (nop) (get_local 0) (nop) (nop) (get_local 0) (nop) (nop)
       (br_table 0 0)
     )
diff --git a/test/WasmSpec/testsuite/core/of_string-overflow-hex-u32.fail.wast b/test/WasmSpec/testsuite/core/of_string-overflow-hex-u32.fail.wast
deleted file mode 100644
index 1323a1f..0000000
--- a/test/WasmSpec/testsuite/core/of_string-overflow-hex-u32.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (func (i32.const 0x100000000)))
diff --git a/test/WasmSpec/testsuite/core/of_string-overflow-hex-u64.fail.wast b/test/WasmSpec/testsuite/core/of_string-overflow-hex-u64.fail.wast
deleted file mode 100644
index d13d6e4..0000000
--- a/test/WasmSpec/testsuite/core/of_string-overflow-hex-u64.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (func (i64.const 0x10000000000000000)))
diff --git a/test/WasmSpec/testsuite/core/of_string-overflow-s32.fail.wast b/test/WasmSpec/testsuite/core/of_string-overflow-s32.fail.wast
deleted file mode 100644
index 4dda960..0000000
--- a/test/WasmSpec/testsuite/core/of_string-overflow-s32.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (func (i32.const -2147483649)))
diff --git a/test/WasmSpec/testsuite/core/of_string-overflow-s64.fail.wast b/test/WasmSpec/testsuite/core/of_string-overflow-s64.fail.wast
deleted file mode 100644
index 1034b0b..0000000
--- a/test/WasmSpec/testsuite/core/of_string-overflow-s64.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (func (i64.const -9223372036854775809)))
diff --git a/test/WasmSpec/testsuite/core/of_string-overflow-u32.fail.wast b/test/WasmSpec/testsuite/core/of_string-overflow-u32.fail.wast
deleted file mode 100644
index 8f22617..0000000
--- a/test/WasmSpec/testsuite/core/of_string-overflow-u32.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (func (i32.const 4294967296)))
diff --git a/test/WasmSpec/testsuite/core/of_string-overflow-u64.fail.wast b/test/WasmSpec/testsuite/core/of_string-overflow-u64.fail.wast
deleted file mode 100644
index cfa2c46..0000000
--- a/test/WasmSpec/testsuite/core/of_string-overflow-u64.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (func (i64.const 18446744073709551616)))
diff --git a/test/WasmSpec/testsuite/core/resizing.wast b/test/WasmSpec/testsuite/core/resizing.wast
index 937e6ca..80d20b5 100644
--- a/test/WasmSpec/testsuite/core/resizing.wast
+++ b/test/WasmSpec/testsuite/core/resizing.wast
@@ -43,6 +43,7 @@
 (assert_return (invoke "grow" (i32.const 0)) (i32.const 1))
 (assert_return (invoke "grow" (i32.const 2)) (i32.const 1))
 (assert_return (invoke "grow" (i32.const 800)) (i32.const 3))
+(assert_return (invoke "grow" (i32.const 0x10000)) (i32.const -1))
 
 (module
   (memory 0 10)
@@ -56,3 +57,4 @@
 (assert_return (invoke "grow" (i32.const 6)) (i32.const 4))
 (assert_return (invoke "grow" (i32.const 0)) (i32.const 10))
 (assert_return (invoke "grow" (i32.const 1)) (i32.const -1))
+(assert_return (invoke "grow" (i32.const 0x10000)) (i32.const -1))
diff --git a/test/WasmSpec/testsuite/core/return.wast b/test/WasmSpec/testsuite/core/return.wast
index 60db41c..48964cf 100644
--- a/test/WasmSpec/testsuite/core/return.wast
+++ b/test/WasmSpec/testsuite/core/return.wast
@@ -35,33 +35,33 @@
     (block (nop) (call $dummy) (return))
   )
   (func (export "as-block-value") (result i32)
-    (block i32 (nop) (call $dummy) (return (i32.const 2)))
+    (block (result i32) (nop) (call $dummy) (return (i32.const 2)))
   )
 
   (func (export "as-loop-first") (result i32)
-    (loop i32 (return (i32.const 3)) (i32.const 2))
+    (loop (result i32) (return (i32.const 3)) (i32.const 2))
   )
   (func (export "as-loop-mid") (result i32)
-    (loop i32 (call $dummy) (return (i32.const 4)) (i32.const 2))
+    (loop (result i32) (call $dummy) (return (i32.const 4)) (i32.const 2))
   )
   (func (export "as-loop-last") (result i32)
-    (loop i32 (nop) (call $dummy) (return (i32.const 5)))
+    (loop (result i32) (nop) (call $dummy) (return (i32.const 5)))
   )
 
   (func (export "as-br-value") (result i32)
-    (block i32 (br 0 (return (i32.const 9))))
+    (block (result i32) (br 0 (return (i32.const 9))))
   )
 
   (func (export "as-br_if-cond")
     (block (br_if 0 (return)))
   )
   (func (export "as-br_if-value") (result i32)
-    (block i32
+    (block (result i32)
       (drop (br_if 0 (return (i32.const 8)) (i32.const 1))) (i32.const 7)
     )
   )
   (func (export "as-br_if-value-cond") (result i32)
-    (block i32
+    (block (result i32)
       (drop (br_if 0 (i32.const 6) (return (i32.const 9)))) (i32.const 7)
     )
   )
@@ -70,12 +70,12 @@
     (block (br_table 0 0 0 (return (i64.const 9)))) (i64.const -1)
   )
   (func (export "as-br_table-value") (result i32)
-    (block i32
+    (block (result i32)
       (br_table 0 0 0 (return (i32.const 10)) (i32.const 1)) (i32.const 7)
     )
   )
   (func (export "as-br_table-value-index") (result i32)
-    (block i32
+    (block (result i32)
       (br_table 0 0 (i32.const 6) (return (i32.const 11))) (i32.const 7)
     )
   )
@@ -85,13 +85,19 @@
   )
 
   (func (export "as-if-cond") (result i32)
-    (if i32 (return (i32.const 2)) (i32.const 0) (i32.const 1))
+    (if (result i32)
+      (return (i32.const 2)) (then (i32.const 0)) (else (i32.const 1))
+    )
   )
   (func (export "as-if-then") (param i32 i32) (result i32)
-    (if i32 (get_local 0) (return (i32.const 3)) (get_local 1))
+    (if (result i32)
+      (get_local 0) (then (return (i32.const 3))) (else (get_local 1))
+    )
   )
   (func (export "as-if-else") (param i32 i32) (result i32)
-    (if i32 (get_local 0) (get_local 1) (return (i32.const 4)))
+    (if (result i32)
+      (get_local 0) (then (get_local 1)) (else (return (i32.const 4)))
+    )
   )
 
   (func (export "as-select-first") (param i32 i32) (result i32)
diff --git a/test/WasmSpec/testsuite/core/select.wast b/test/WasmSpec/testsuite/core/select.wast
index 8ca5b1a..4dfa456 100644
--- a/test/WasmSpec/testsuite/core/select.wast
+++ b/test/WasmSpec/testsuite/core/select.wast
@@ -38,23 +38,23 @@
 (assert_return (invoke "select_i64" (i64.const 2) (i64.const 1) (i32.const -1)) (i64.const 2))
 (assert_return (invoke "select_i64" (i64.const 2) (i64.const 1) (i32.const 0xf0f0f0f0)) (i64.const 2))
 
-(assert_return_canonical_nan (invoke "select_f32" (f32.const nan) (f32.const 1) (i32.const 1)))
-(assert_return_arithmetic_nan (invoke "select_f32" (f32.const nan:0x20304) (f32.const 1) (i32.const 1)))
+(assert_return (invoke "select_f32" (f32.const nan) (f32.const 1) (i32.const 1)) (f32.const nan))
+(assert_return (invoke "select_f32" (f32.const nan:0x20304) (f32.const 1) (i32.const 1)) (f32.const nan:0x20304))
 (assert_return (invoke "select_f32" (f32.const nan) (f32.const 1) (i32.const 0)) (f32.const 1))
 (assert_return (invoke "select_f32" (f32.const nan:0x20304) (f32.const 1) (i32.const 0)) (f32.const 1))
 (assert_return (invoke "select_f32" (f32.const 2) (f32.const nan) (i32.const 1)) (f32.const 2))
 (assert_return (invoke "select_f32" (f32.const 2) (f32.const nan:0x20304) (i32.const 1)) (f32.const 2))
-(assert_return_canonical_nan (invoke "select_f32" (f32.const 2) (f32.const nan) (i32.const 0)))
-(assert_return_arithmetic_nan (invoke "select_f32" (f32.const 2) (f32.const nan:0x20304) (i32.const 0)))
+(assert_return (invoke "select_f32" (f32.const 2) (f32.const nan) (i32.const 0)) (f32.const nan))
+(assert_return (invoke "select_f32" (f32.const 2) (f32.const nan:0x20304) (i32.const 0)) (f32.const nan:0x20304))
 
-(assert_return_canonical_nan (invoke "select_f64" (f64.const nan) (f64.const 1) (i32.const 1)))
-(assert_return_arithmetic_nan (invoke "select_f64" (f64.const nan:0x20304) (f64.const 1) (i32.const 1)))
+(assert_return (invoke "select_f64" (f64.const nan) (f64.const 1) (i32.const 1)) (f64.const nan))
+(assert_return (invoke "select_f64" (f64.const nan:0x20304) (f64.const 1) (i32.const 1)) (f64.const nan:0x20304))
 (assert_return (invoke "select_f64" (f64.const nan) (f64.const 1) (i32.const 0)) (f64.const 1))
 (assert_return (invoke "select_f64" (f64.const nan:0x20304) (f64.const 1) (i32.const 0)) (f64.const 1))
 (assert_return (invoke "select_f64" (f64.const 2) (f64.const nan) (i32.const 1)) (f64.const 2))
 (assert_return (invoke "select_f64" (f64.const 2) (f64.const nan:0x20304) (i32.const 1)) (f64.const 2))
-(assert_return_canonical_nan (invoke "select_f64" (f64.const 2) (f64.const nan) (i32.const 0)))
-(assert_return_arithmetic_nan (invoke "select_f64" (f64.const 2) (f64.const nan:0x20304) (i32.const 0)))
+(assert_return (invoke "select_f64" (f64.const 2) (f64.const nan) (i32.const 0)) (f64.const nan))
+(assert_return (invoke "select_f64" (f64.const 2) (f64.const nan:0x20304) (i32.const 0)) (f64.const nan:0x20304))
 
 (assert_trap (invoke "select_trap_l" (i32.const 1)) "unreachable executed")
 (assert_trap (invoke "select_trap_l" (i32.const 0)) "unreachable executed")
diff --git a/test/WasmSpec/testsuite/core/stack.wast b/test/WasmSpec/testsuite/core/stack.wast
index f685b17..b3f321e 100644
--- a/test/WasmSpec/testsuite/core/stack.wast
+++ b/test/WasmSpec/testsuite/core/stack.wast
@@ -8,8 +8,8 @@
       (loop $loop
         (if
           (i64.eq (get_local $i) (i64.const 0))
-          (br $done)
-          (block
+          (then (br $done))
+          (else
             (set_local $res (i64.mul (get_local $i) (get_local $res)))
             (set_local $i (i64.sub (get_local $i) (i64.const 1)))
           )
diff --git a/test/WasmSpec/testsuite/core/store-align-0.fail.wast b/test/WasmSpec/testsuite/core/store-align-0.fail.wast
deleted file mode 100644
index 02d837a..0000000
--- a/test/WasmSpec/testsuite/core/store-align-0.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (memory 0) (func (i64.store align=0 (i32.const 0) (i64.const 0))))
diff --git a/test/WasmSpec/testsuite/core/store-align-odd.fail.wast b/test/WasmSpec/testsuite/core/store-align-odd.fail.wast
deleted file mode 100644
index 19201b4..0000000
--- a/test/WasmSpec/testsuite/core/store-align-odd.fail.wast
+++ /dev/null
@@ -1 +0,0 @@
-(module (memory 0) (func (i64.store align=6 (i32.const 0) (i64.const 0))))
diff --git a/test/WasmSpec/testsuite/core/switch.wast b/test/WasmSpec/testsuite/core/switch.wast
index 2d4565a..829acc0 100644
--- a/test/WasmSpec/testsuite/core/switch.wast
+++ b/test/WasmSpec/testsuite/core/switch.wast
@@ -47,7 +47,7 @@
     (local $j i64)
     (set_local $j (i64.const 100))
     (return
-      (block $switch i64
+      (block $switch (result i64)
         (block $7
           (block $default
             (block $4
@@ -87,13 +87,13 @@
   ;; Argument switch
   (func (export "arg") (param $i i32) (result i32)
     (return
-      (block $2 i32
+      (block $2 (result i32)
         (i32.add (i32.const 10)
-          (block $1 i32
+          (block $1 (result i32)
             (i32.add (i32.const 100)
-              (block $0 i32
+              (block $0 (result i32)
                 (i32.add (i32.const 1000)
-                  (block $default i32
+                  (block $default (result i32)
                     (br_table $0 $1 $2 $default
                       (i32.mul (i32.const 2) (get_local $i))
                       (i32.and (i32.const 3) (get_local $i))
diff --git a/test/WasmSpec/testsuite/core/token.wast b/test/WasmSpec/testsuite/core/token.wast
new file mode 100644
index 0000000..1dcd32e
--- /dev/null
+++ b/test/WasmSpec/testsuite/core/token.wast
@@ -0,0 +1,10 @@
+;; Test tokenization
+
+(assert_malformed
+  (module quote "(func (drop (i32.const0)))")
+  "unknown operator"
+)
+(assert_malformed
+  (module quote "(func br 0drop)")
+  "unknown operator"
+)
diff --git a/test/WasmSpec/testsuite/core/traps.wast b/test/WasmSpec/testsuite/core/traps.wast
index a9184b6..32072b9 100644
--- a/test/WasmSpec/testsuite/core/traps.wast
+++ b/test/WasmSpec/testsuite/core/traps.wast
@@ -3,14 +3,14 @@
 ;; discard its return value.
 
 (module
-  (func (export "no_dce.i32.div_s") (param $x i32) (param $y i32) (result i32)
-    (i32.div_s (get_local $x) (get_local $y)))
-  (func (export "no_dce.i32.div_u") (param $x i32) (param $y i32) (result i32)
-    (i32.div_u (get_local $x) (get_local $y)))
-  (func (export "no_dce.i64.div_s") (param $x i64) (param $y i64) (result i64)
-    (i64.div_s (get_local $x) (get_local $y)))
-  (func (export "no_dce.i64.div_u") (param $x i64) (param $y i64) (result i64)
-    (i64.div_u (get_local $x) (get_local $y)))
+  (func (export "no_dce.i32.div_s") (param $x i32) (param $y i32)
+    (drop (i32.div_s (get_local $x) (get_local $y))))
+  (func (export "no_dce.i32.div_u") (param $x i32) (param $y i32)
+    (drop (i32.div_u (get_local $x) (get_local $y))))
+  (func (export "no_dce.i64.div_s") (param $x i64) (param $y i64)
+    (drop (i64.div_s (get_local $x) (get_local $y))))
+  (func (export "no_dce.i64.div_u") (param $x i64) (param $y i64)
+    (drop (i64.div_u (get_local $x) (get_local $y))))
 )
 
 (assert_trap (invoke "no_dce.i32.div_s" (i32.const 1) (i32.const 0)) "integer divide by zero")
@@ -19,14 +19,14 @@
 (assert_trap (invoke "no_dce.i64.div_u" (i64.const 1) (i64.const 0)) "integer divide by zero")
 
 (module
-  (func (export "no_dce.i32.rem_s") (param $x i32) (param $y i32) (result i32)
-    (i32.rem_s (get_local $x) (get_local $y)))
-  (func (export "no_dce.i32.rem_u") (param $x i32) (param $y i32) (result i32)
-    (i32.rem_u (get_local $x) (get_local $y)))
-  (func (export "no_dce.i64.rem_s") (param $x i64) (param $y i64) (result i64)
-    (i64.rem_s (get_local $x) (get_local $y)))
-  (func (export "no_dce.i64.rem_u") (param $x i64) (param $y i64) (result i64)
-    (i64.rem_u (get_local $x) (get_local $y)))
+  (func (export "no_dce.i32.rem_s") (param $x i32) (param $y i32)
+    (drop (i32.rem_s (get_local $x) (get_local $y))))
+  (func (export "no_dce.i32.rem_u") (param $x i32) (param $y i32)
+    (drop (i32.rem_u (get_local $x) (get_local $y))))
+  (func (export "no_dce.i64.rem_s") (param $x i64) (param $y i64)
+    (drop (i64.rem_s (get_local $x) (get_local $y))))
+  (func (export "no_dce.i64.rem_u") (param $x i64) (param $y i64)
+    (drop (i64.rem_u (get_local $x) (get_local $y))))
 )
 
 (assert_trap (invoke "no_dce.i32.rem_s" (i32.const 1) (i32.const 0)) "integer divide by zero")
@@ -35,14 +35,14 @@
 (assert_trap (invoke "no_dce.i64.rem_u" (i64.const 1) (i64.const 0)) "integer divide by zero")
 
 (module
-  (func (export "no_dce.i32.trunc_s_f32") (param $x f32) (result i32) (i32.trunc_s/f32 (get_local $x)))
-  (func (export "no_dce.i32.trunc_u_f32") (param $x f32) (result i32) (i32.trunc_u/f32 (get_local $x)))
-  (func (export "no_dce.i32.trunc_s_f64") (param $x f64) (result i32) (i32.trunc_s/f64 (get_local $x)))
-  (func (export "no_dce.i32.trunc_u_f64") (param $x f64) (result i32) (i32.trunc_u/f64 (get_local $x)))
-  (func (export "no_dce.i64.trunc_s_f32") (param $x f32) (result i64) (i64.trunc_s/f32 (get_local $x)))
-  (func (export "no_dce.i64.trunc_u_f32") (param $x f32) (result i64) (i64.trunc_u/f32 (get_local $x)))
-  (func (export "no_dce.i64.trunc_s_f64") (param $x f64) (result i64) (i64.trunc_s/f64 (get_local $x)))
-  (func (export "no_dce.i64.trunc_u_f64") (param $x f64) (result i64) (i64.trunc_u/f64 (get_local $x)))
+  (func (export "no_dce.i32.trunc_s_f32") (param $x f32) (drop (i32.trunc_s/f32 (get_local $x))))
+  (func (export "no_dce.i32.trunc_u_f32") (param $x f32) (drop (i32.trunc_u/f32 (get_local $x))))
+  (func (export "no_dce.i32.trunc_s_f64") (param $x f64) (drop (i32.trunc_s/f64 (get_local $x))))
+  (func (export "no_dce.i32.trunc_u_f64") (param $x f64) (drop (i32.trunc_u/f64 (get_local $x))))
+  (func (export "no_dce.i64.trunc_s_f32") (param $x f32) (drop (i64.trunc_s/f32 (get_local $x))))
+  (func (export "no_dce.i64.trunc_u_f32") (param $x f32) (drop (i64.trunc_u/f32 (get_local $x))))
+  (func (export "no_dce.i64.trunc_s_f64") (param $x f64) (drop (i64.trunc_s/f64 (get_local $x))))
+  (func (export "no_dce.i64.trunc_u_f64") (param $x f64) (drop (i64.trunc_u/f64 (get_local $x))))
 )
 
 (assert_trap (invoke "no_dce.i32.trunc_s_f32" (f32.const nan)) "invalid conversion to integer")
@@ -57,13 +57,33 @@
 (module
     (memory 1)
 
-    (func (export "no_dce.i32.load") (param $i i32) (result i32) (i32.load (get_local $i)))
-    (func (export "no_dce.i64.load") (param $i i32) (result i64) (i64.load (get_local $i)))
-    (func (export "no_dce.f32.load") (param $i i32) (result f32) (f32.load (get_local $i)))
-    (func (export "no_dce.f64.load") (param $i i32) (result f64) (f64.load (get_local $i)))
+    (func (export "no_dce.i32.load") (param $i i32) (drop (i32.load (get_local $i))))
+    (func (export "no_dce.i32.load16_s") (param $i i32) (drop (i32.load16_s (get_local $i))))
+    (func (export "no_dce.i32.load16_u") (param $i i32) (drop (i32.load16_u (get_local $i))))
+    (func (export "no_dce.i32.load8_s") (param $i i32) (drop (i32.load8_s (get_local $i))))
+    (func (export "no_dce.i32.load8_u") (param $i i32) (drop (i32.load8_u (get_local $i))))
+    (func (export "no_dce.i64.load") (param $i i32) (drop (i64.load (get_local $i))))
+    (func (export "no_dce.i64.load32_s") (param $i i32) (drop (i64.load32_s (get_local $i))))
+    (func (export "no_dce.i64.load32_u") (param $i i32) (drop (i64.load32_u (get_local $i))))
+    (func (export "no_dce.i64.load16_s") (param $i i32) (drop (i64.load16_s (get_local $i))))
+    (func (export "no_dce.i64.load16_u") (param $i i32) (drop (i64.load16_u (get_local $i))))
+    (func (export "no_dce.i64.load8_s") (param $i i32) (drop (i64.load8_s (get_local $i))))
+    (func (export "no_dce.i64.load8_u") (param $i i32) (drop (i64.load8_u (get_local $i))))
+    (func (export "no_dce.f32.load") (param $i i32) (drop (f32.load (get_local $i))))
+    (func (export "no_dce.f64.load") (param $i i32) (drop (f64.load (get_local $i))))
 )
 
 (assert_trap (invoke "no_dce.i32.load" (i32.const 65536)) "out of bounds memory access")
+(assert_trap (invoke "no_dce.i32.load16_s" (i32.const 65536)) "out of bounds memory access")
+(assert_trap (invoke "no_dce.i32.load16_u" (i32.const 65536)) "out of bounds memory access")
+(assert_trap (invoke "no_dce.i32.load8_s" (i32.const 65536)) "out of bounds memory access")
+(assert_trap (invoke "no_dce.i32.load8_u" (i32.const 65536)) "out of bounds memory access")
 (assert_trap (invoke "no_dce.i64.load" (i32.const 65536)) "out of bounds memory access")
+(assert_trap (invoke "no_dce.i64.load32_s" (i32.const 65536)) "out of bounds memory access")
+(assert_trap (invoke "no_dce.i64.load32_u" (i32.const 65536)) "out of bounds memory access")
+(assert_trap (invoke "no_dce.i64.load16_s" (i32.const 65536)) "out of bounds memory access")
+(assert_trap (invoke "no_dce.i64.load16_u" (i32.const 65536)) "out of bounds memory access")
+(assert_trap (invoke "no_dce.i64.load8_s" (i32.const 65536)) "out of bounds memory access")
+(assert_trap (invoke "no_dce.i64.load8_u" (i32.const 65536)) "out of bounds memory access")
 (assert_trap (invoke "no_dce.f32.load" (i32.const 65536)) "out of bounds memory access")
 (assert_trap (invoke "no_dce.f64.load" (i32.const 65536)) "out of bounds memory access")
diff --git a/test/WasmSpec/testsuite/core/type.wast b/test/WasmSpec/testsuite/core/type.wast
new file mode 100644
index 0000000..5ceeeb2
--- /dev/null
+++ b/test/WasmSpec/testsuite/core/type.wast
@@ -0,0 +1,59 @@
+;; Test type definitions
+
+(module
+  (type (func))
+  (type $t (func))
+
+  (type (func (param i32)))
+  (type (func (param $x i32)))
+  (type (func (result i32)))
+  (type (func (param i32) (result i32)))
+  (type (func (param $x i32) (result i32)))
+
+  (type (func (param f32 f64)))
+  ;; (type (func (result i64 f32)))
+  ;; (type (func (param i32 i64) (result f32 f64)))
+
+  (type (func (param f32) (param f64)))
+  (type (func (param $x f32) (param f64)))
+  (type (func (param f32) (param $y f64)))
+  (type (func (param $x f32) (param $y f64)))
+  ;; (type (func (result i64) (result f32)))
+  ;; (type (func (param i32) (param i64) (result f32) (result f64)))
+  ;; (type (func (param $x i32) (param $y i64) (result f32) (result f64)))
+
+  (type (func (param f32 f64) (param $x i32) (param f64 i32 i32)))
+  ;; (type (func (result i64 i64 f32) (result f32 i32)))
+  ;; (type
+  ;;   (func (param i32 i32) (param i64 i32) (result f32 f64) (result f64 i32))
+  ;; )
+
+  (type (func (param) (param $x f32) (param) (param) (param f64 i32) (param)))
+  ;; (type
+  ;;   (func (result) (result) (result i64 i64) (result) (result f32) (result))
+  ;; )
+  ;; (type
+  ;;   (func
+  ;;     (param i32 i32) (param i64 i32) (param) (param $x i32) (param)
+  ;;     (result) (result f32 f64) (result f64 i32) (result)
+  ;;   )
+  ;; )
+)
+
+(assert_malformed
+  (module quote "(type (func (result i32) (param i32)))")
+  "result before parameter"
+)
+(assert_malformed
+  (module quote "(type (func (result $x i32)))")
+  "unexpected token"
+)
+
+(assert_invalid
+  (module (type (func (result i32 i32))))
+  "invalid result arity"
+)
+(assert_invalid
+  (module (type (func (result i32) (result i32))))
+  "invalid result arity"
+)
diff --git a/test/WasmSpec/testsuite/core/typecheck.wast b/test/WasmSpec/testsuite/core/typecheck.wast
index 1d15cc5..72f6f62 100644
--- a/test/WasmSpec/testsuite/core/typecheck.wast
+++ b/test/WasmSpec/testsuite/core/typecheck.wast
@@ -30,7 +30,7 @@
 (assert_invalid
   (module (func $type-unary-operand-missing-in-else
     (i32.const 0) (i32.const 0)
-    (if i32 (then (i32.const 0)) (else (i32.eqz))) (drop)
+    (if (result i32) (then (i32.const 0)) (else (i32.eqz))) (drop)
   ))
   "type mismatch"
 )
@@ -78,21 +78,21 @@
 (assert_invalid
   (module (func $type-binary-1st-operand-missing-in-if
     (i32.const 0) (i32.const 0) (i32.const 0)
-    (if (i32.add) (drop))
+    (if (i32.add) (then (drop)))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-binary-2nd-operand-missing-in-if
     (i32.const 0) (i32.const 0)
-    (if (i32.const 0) (i32.add) (drop))
+    (if (i32.const 0) (then (i32.add)) (else (drop)))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-binary-1st-operand-missing-in-else
     (i32.const 0) (i32.const 0) (i32.const 0)
-    (if i32 (then (i32.const 0)) (else (i32.add) (i32.const 0)))
+    (if (result i32) (then (i32.const 0)) (else (i32.add) (i32.const 0)))
     (drop) (drop)
   ))
   "type mismatch"
@@ -100,7 +100,7 @@
 (assert_invalid
   (module (func $type-binary-2nd-operand-missing-in-else
     (i32.const 0) (i32.const 0)
-    (if i32 (then (i32.const 0)) (else (i32.add)))
+    (if (result i32) (then (i32.const 0)) (else (i32.add)))
     (drop)
   ))
   "type mismatch"
@@ -136,7 +136,7 @@
 (assert_invalid
   (module (func $type-if-operand-missing-in-else
     (i32.const 0) (i32.const 0)
-    (if i32 (then (i32.const 0)) (else (if (then)) (i32.const 0)))
+    (if (result i32) (then (i32.const 0)) (else (if (then)) (i32.const 0)))
     (drop)
   ))
   "type mismatch"
@@ -144,7 +144,7 @@
 
 (assert_invalid
   (module (func $type-br-operand-missing
-    (block i32 (br 0))
+    (block (result i32) (br 0))
     (i32.eqz) (drop)
   ))
   "type mismatch"
@@ -152,7 +152,7 @@
 (assert_invalid
   (module (func $type-br-operand-missing-in-block
     (i32.const 0)
-    (block i32 (br 0))
+    (block (result i32) (br 0))
     (i32.eqz) (drop)
   ))
   "type mismatch"
@@ -161,7 +161,7 @@
   (module (func $type-br-operand-missing-in-if
     (block
       (i32.const 0) (i32.const 0)
-      (if i32 (then (br 0)))
+      (if (result i32) (then (br 0)))
     )
     (i32.eqz) (drop)
   ))
@@ -171,7 +171,7 @@
   (module (func $type-br-operand-missing-in-else
     (block
       (i32.const 0) (i32.const 0)
-      (if i32 (then (i32.const 0)) (else (br 0)))
+      (if (result i32) (then (i32.const 0)) (else (br 0)))
     )
     (i32.eqz) (drop)
   ))
@@ -208,7 +208,7 @@
 (assert_invalid
   (module (func $type-return-operand-missing-in-else (result i32)
     (i32.const 0) (i32.const 0)
-    (if i32 (then (i32.const 0)) (else (return))) (drop)
+    (if (result i32) (then (i32.const 0)) (else (return))) (drop)
   ))
   "type mismatch"
 )
@@ -216,7 +216,7 @@
 ;; TODO(stack): more of the above
 
 ;; if condition
-(assert_invalid (module (func (if (f32.const 0) (nop) (nop)))) "type mismatch")
+(assert_invalid (module (func (if (f32.const 0) (then)))) "type mismatch")
 
 ;; br_if condition
 (assert_invalid (module (func (block (br_if 0 (f32.const 0))))) "type mismatch")
diff --git a/test/WasmSpec/testsuite/core/unreachable.wast b/test/WasmSpec/testsuite/core/unreachable.wast
index f0d2c73..30df789 100644
--- a/test/WasmSpec/testsuite/core/unreachable.wast
+++ b/test/WasmSpec/testsuite/core/unreachable.wast
@@ -24,62 +24,74 @@
   )
 
   (func (export "as-block-first") (result i32)
-    (block i32 (unreachable) (i32.const 2))
+    (block (result i32) (unreachable) (i32.const 2))
   )
   (func (export "as-block-mid") (result i32)
-    (block i32 (call $dummy) (unreachable) (i32.const 2))
+    (block (result i32) (call $dummy) (unreachable) (i32.const 2))
   )
   (func (export "as-block-last")
     (block (nop) (call $dummy) (unreachable))
   )
   (func (export "as-block-value") (result i32)
-    (block i32 (nop) (call $dummy) (unreachable))
+    (block (result i32) (nop) (call $dummy) (unreachable))
   )
   (func (export "as-block-broke") (result i32)
-    (block i32 (call $dummy) (br 0 (i32.const 1)) (unreachable))
+    (block (result i32) (call $dummy) (br 0 (i32.const 1)) (unreachable))
   )
 
   (func (export "as-loop-first") (result i32)
-    (loop i32 (unreachable) (i32.const 2))
+    (loop (result i32) (unreachable) (i32.const 2))
   )
   (func (export "as-loop-mid") (result i32)
-    (loop i32 (call $dummy) (unreachable) (i32.const 2))
+    (loop (result i32) (call $dummy) (unreachable) (i32.const 2))
   )
   (func (export "as-loop-last")
     (loop (nop) (call $dummy) (unreachable))
   )
   (func (export "as-loop-broke") (result i32)
-    (block i32 (loop i32 (call $dummy) (br 1 (i32.const 1)) (unreachable)))
+    (block (result i32)
+      (loop (result i32) (call $dummy) (br 1 (i32.const 1)) (unreachable))
+    )
   )
 
   (func (export "as-br-value") (result i32)
-    (block i32 (br 0 (unreachable)))
+    (block (result i32) (br 0 (unreachable)))
   )
 
   (func (export "as-br_if-cond")
     (block (br_if 0 (unreachable)))
   )
   (func (export "as-br_if-value") (result i32)
-    (block i32 (drop (br_if 0 (unreachable) (i32.const 1))) (i32.const 7))
+    (block (result i32)
+      (drop (br_if 0 (unreachable) (i32.const 1))) (i32.const 7)
+    )
   )
   (func (export "as-br_if-value-cond") (result i32)
-    (block i32 (drop (br_if 0 (i32.const 6) (unreachable))) (i32.const 7))
+    (block (result i32)
+      (drop (br_if 0 (i32.const 6) (unreachable))) (i32.const 7)
+    )
   )
 
   (func (export "as-br_table-index")
     (block (br_table 0 0 0 (unreachable)))
   )
   (func (export "as-br_table-value") (result i32)
-    (block i32 (br_table 0 0 0 (unreachable) (i32.const 1)) (i32.const 7))
+    (block (result i32)
+      (br_table 0 0 0 (unreachable) (i32.const 1)) (i32.const 7)
+    )
   )
   (func (export "as-br_table-value-2") (result i32)
-    (block i32 (block i32 (br_table 0 1 (unreachable) (i32.const 1))))
+    (block (result i32)
+      (block (result i32) (br_table 0 1 (unreachable) (i32.const 1)))
+    )
   )
   (func (export "as-br_table-value-index") (result i32)
-    (block i32 (br_table 0 0 (i32.const 6) (unreachable)) (i32.const 7))
+    (block (result i32)
+      (br_table 0 0 (i32.const 6) (unreachable)) (i32.const 7)
+    )
   )
   (func (export "as-br_table-value-and-index") (result i32)
-    (block i32 (br_table 0 0 (unreachable)) (i32.const 8))
+    (block (result i32) (br_table 0 0 (unreachable)) (i32.const 8))
   )
 
   (func (export "as-return-value") (result i64)
@@ -87,13 +99,13 @@
   )
 
   (func (export "as-if-cond") (result i32)
-    (if i32 (unreachable) (i32.const 0) (i32.const 1))
+    (if (result i32) (unreachable) (then (i32.const 0)) (else (i32.const 1)))
   )
   (func (export "as-if-then") (param i32 i32) (result i32)
-    (if i32 (get_local 0) (unreachable) (get_local 1))
+    (if (result i32) (get_local 0) (then (unreachable)) (else (get_local 1)))
   )
   (func (export "as-if-else") (param i32 i32) (result i32)
-    (if i32 (get_local 0) (get_local 1) (unreachable))
+    (if (result i32) (get_local 0) (then (get_local 1)) (else (unreachable)))
   )
 
   (func (export "as-select-first") (param i32 i32) (result i32)
diff --git a/test/WasmSpec/testsuite/core/unreached-invalid.wast b/test/WasmSpec/testsuite/core/unreached-invalid.wast
index f0ad5ca..8c73deb 100644
--- a/test/WasmSpec/testsuite/core/unreached-invalid.wast
+++ b/test/WasmSpec/testsuite/core/unreached-invalid.wast
@@ -99,7 +99,7 @@
 )
 (assert_invalid
   (module (func $type-block-value-num-vs-num-after-break (result i32)
-    (block i32 (i32.const 1) (br 0) (f32.const 0))
+    (block (result i32) (i32.const 1) (br 0) (f32.const 0))
   ))
   "type mismatch"
 )
@@ -111,7 +111,7 @@
 )
 (assert_invalid
   (module (func $type-loop-value-num-vs-num-after-break (result i32)
-    (loop i32 (br 1 (i32.const 1)) (f32.const 0))
+    (loop (result i32) (br 1 (i32.const 1)) (f32.const 0))
   ))
   "type mismatch"
 )
@@ -160,7 +160,7 @@
 )
 (assert_invalid
   (module (func $type-block-value-num-vs-num-after-return (result i32)
-    (block i32 (i32.const 1) (return (i32.const 0)) (f32.const 0))
+    (block (result i32) (i32.const 1) (return (i32.const 0)) (f32.const 0))
   ))
   "type mismatch"
 )
@@ -172,7 +172,7 @@
 )
 (assert_invalid
   (module (func $type-loop-value-num-vs-num-after-return (result i32)
-    (loop i32 (return (i32.const 1)) (f32.const 0))
+    (loop (result i32) (return (i32.const 1)) (f32.const 0))
   ))
   "type mismatch"
 )
@@ -221,7 +221,7 @@
 )
 (assert_invalid
   (module (func $type-block-value-num-vs-num-after-unreachable (result i32)
-    (block i32 (i32.const 1) (unreachable) (f32.const 0))
+    (block (result i32) (i32.const 1) (unreachable) (f32.const 0))
   ))
   "type mismatch"
 )
@@ -233,7 +233,7 @@
 )
 (assert_invalid
   (module (func $type-loop-value-num-vs-num-after-unreachable (result i32)
-    (loop i32 (unreachable) (f32.const 0))
+    (loop (result i32) (unreachable) (f32.const 0))
   ))
   "type mismatch"
 )
@@ -283,7 +283,7 @@
 (assert_invalid
   (module (func $type-block-value-num-vs-num-after-nested-unreachable
     (result i32)
-    (block i32 (i32.const 1) (block (unreachable)) (f32.const 0))
+    (block (result i32) (i32.const 1) (block (unreachable)) (f32.const 0))
   ))
   "type mismatch"
 )
@@ -296,7 +296,7 @@
 (assert_invalid
   (module (func $type-loop-value-num-vs-num-after-nested-unreachable
     (result i32)
-    (loop i32 (block (unreachable)) (f32.const 0))
+    (loop (result i32) (block (unreachable)) (f32.const 0))
   ))
   "type mismatch"
 )
@@ -346,7 +346,7 @@
 )
 (assert_invalid
   (module (func $type-block-value-num-vs-num-after-infinite-loop (result i32)
-    (block i32 (i32.const 1) (loop (br 0)) (f32.const 0))
+    (block (result i32) (i32.const 1) (loop (br 0)) (f32.const 0))
   ))
   "type mismatch"
 )
@@ -358,7 +358,7 @@
 )
 (assert_invalid
   (module (func $type-loop-value-num-vs-num-after-infinite-loop (result i32)
-    (loop i32 (loop (br 0)) (f32.const 0))
+    (loop (result i32) (loop (br 0)) (f32.const 0))
   ))
   "type mismatch"
 )
@@ -407,7 +407,7 @@
 )
 (assert_invalid
   (module (func $type-if-value-num-vs-num-in-dead-body (result i32)
-    (if i32 (i32.const 0) (then (f32.const 0)))
+    (if (result i32) (i32.const 0) (then (f32.const 0)))
   ))
   "type mismatch"
 )
@@ -419,7 +419,7 @@
 )
 (assert_invalid
   (module (func $type-block-value-num-vs-num-in-dead-body (result i32)
-    (if i32 (i32.const 0) (then (block i32 (f32.const 0))))
+    (if (result i32) (i32.const 0) (then (block (result i32) (f32.const 0))))
   ))
   "type mismatch"
 )
@@ -431,7 +431,7 @@
 )
 (assert_invalid
   (module (func $type-block-value-num-vs-num-in-dead-body (result i32)
-    (if i32 (i32.const 0) (then (loop i32 (f32.const 0))))
+    (if (result i32) (i32.const 0) (then (loop (result i32) (f32.const 0))))
   ))
   "type mismatch"
 )
@@ -445,7 +445,7 @@
 
 (assert_invalid
   (module (func $type-br-second-num-vs-num (result i32)
-    (block i32 (br 0 (i32.const 1)) (br 0 (f64.const 1)))
+    (block (result i32) (br 0 (i32.const 1)) (br 0 (f64.const 1)))
   ))
   "type mismatch"
 )
@@ -464,14 +464,14 @@
 )
 (assert_invalid
   (module (func $type-br_table-label-num-vs-num-after-unreachable (result i32)
-    (block i32 (unreachable) (br_table 0 (f32.const 0) (i32.const 1)))
+    (block (result i32) (unreachable) (br_table 0 (f32.const 0) (i32.const 1)))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-br_table-label-num-vs-label-void-after-unreachable
     (block
-      (block f32
+      (block (result f32)
         (unreachable)
         (br_table 0 1 0 (i32.const 1))
       )
@@ -482,8 +482,8 @@
 )
 (assert_invalid
   (module (func $type-br_table-label-num-vs-label-num-after-unreachable
-    (block f64
-      (block f32
+    (block (result f64)
+      (block (result f32)
         (unreachable)
         (br_table 0 1 1 (i32.const 1))
       )
@@ -509,7 +509,7 @@
 )
 (assert_invalid
   (module (func $type-block-value-nested-unreachable-num-vs-num (result i32)
-    (block i64 (i64.const 0) (block (unreachable)))
+    (block (result i64) (i64.const 0) (block (unreachable)))
   ))
   "type mismatch"
 )
@@ -528,13 +528,13 @@
 )
 (assert_invalid
   (module (func $type-block-value-nested-br-void-vs-num (result i32)
-    (block i32 (block (br 1 (i32.const 0))))
+    (block (result i32) (block (br 1 (i32.const 0))))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-block-value-nested-br-num-vs-num (result i32)
-    (block i32 (i64.const 0) (block (br 1 (i32.const 0))))
+    (block (result i32) (i64.const 0) (block (br 1 (i32.const 0))))
   ))
   "type mismatch"
 )
@@ -547,13 +547,15 @@
 )
 (assert_invalid
   (module (func $type-block-value-nested2-br-void-vs-num (result i32)
-    (block i32 (block (block (br 2 (i32.const 0)))))
+    (block (result i32) (block (block (br 2 (i32.const 0)))))
   ))
   "type mismatch"
 )
 (assert_invalid
   (module (func $type-block-value-nested2-br-num-vs-num (result i32)
-    (block i32 (block i64 (i64.const 0) (block (br 2 (i32.const 0)))))
+    (block (result i32)
+      (block (result i64) (i64.const 0) (block (br 2 (i32.const 0))))
+    )
   ))
   "type mismatch"
 )
@@ -578,7 +580,7 @@
 )
 (assert_invalid
   (module (func $type-block-value-nested-return-num-vs-num (result i32)
-    (block i64 (i64.const 0) (block (return (i32.const 0))))
+    (block (result i64) (i64.const 0) (block (return (i32.const 0))))
   ))
   "type mismatch"
 )
@@ -604,7 +606,7 @@
 )
 (assert_invalid
   (module (func $type-loop-value-nested-unreachable-num-vs-num (result i32)
-    (loop i64 (i64.const 0) (block (unreachable)))
+    (loop (result i64) (i64.const 0) (block (unreachable)))
   ))
   "type mismatch"
 )
diff --git a/test/WasmSpec/testsuite/core/unwind.wast b/test/WasmSpec/testsuite/core/unwind.wast
index b993f2a..40b0dcf 100644
--- a/test/WasmSpec/testsuite/core/unwind.wast
+++ b/test/WasmSpec/testsuite/core/unwind.wast
@@ -27,28 +27,30 @@
     (block (i32.const 3) (i64.const 1) (br 0)) (i32.const 9)
   )
   (func (export "block-unwind-by-br-value") (result i32)
-    (block i32 (i32.const 3) (i64.const 1) (br 0 (i32.const 9)))
+    (block (result i32) (i32.const 3) (i64.const 1) (br 0 (i32.const 9)))
   )
   (func (export "block-unwind-by-br_table") (result i32)
     (block (i32.const 3) (i64.const 1) (br_table 0 (i32.const 0))) (i32.const 9)
   )
   (func (export "block-unwind-by-br_table-value") (result i32)
-    (block i32
+    (block (result i32)
       (i32.const 3) (i64.const 1) (br_table 0 (i32.const 9) (i32.const 0))
     )
   )
   (func (export "block-unwind-by-return") (result i32)
-    (block i32 (i32.const 3) (i64.const 1) (return (i32.const 9)))
+    (block (result i32) (i32.const 3) (i64.const 1) (return (i32.const 9)))
   )
 
   (func (export "block-nested-unwind-by-unreachable") (result i32)
-    (block i32 (i32.const 3) (block (i64.const 1) (unreachable)))
+    (block (result i32) (i32.const 3) (block (i64.const 1) (unreachable)))
   )
   (func (export "block-nested-unwind-by-br") (result i32)
     (block (i32.const 3) (block (i64.const 1) (br 1)) (drop)) (i32.const 9)
   )
   (func (export "block-nested-unwind-by-br-value") (result i32)
-    (block i32 (i32.const 3) (block (i64.const 1) (br 1 (i32.const 9))))
+    (block (result i32)
+      (i32.const 3) (block (i64.const 1) (br 1 (i32.const 9)))
+    )
   )
   (func (export "block-nested-unwind-by-br_table") (result i32)
     (block
@@ -58,23 +60,25 @@
     (i32.const 9)
   )
   (func (export "block-nested-unwind-by-br_table-value") (result i32)
-    (block i32
+    (block (result i32)
       (i32.const 3)
       (block (i64.const 1) (br_table 1 (i32.const 9) (i32.const 1)))
     )
   )
   (func (export "block-nested-unwind-by-return") (result i32)
-    (block i32 (i32.const 3) (block (i64.const 1) (return (i32.const 9))))
+    (block (result i32)
+      (i32.const 3) (block (i64.const 1) (return (i32.const 9)))
+    )
   )
 
   (func (export "unary-after-unreachable") (result i32)
     (f32.const 0) (unreachable) (i64.eqz)
   )
   (func (export "unary-after-br") (result i32)
-    (block i32 (f32.const 0) (br 0 (i32.const 9)) (i64.eqz))
+    (block (result i32) (f32.const 0) (br 0 (i32.const 9)) (i64.eqz))
   )
   (func (export "unary-after-br_table") (result i32)
-    (block i32
+    (block (result i32)
       (f32.const 0) (br_table 0 0 (i32.const 9) (i32.const 0)) (i64.eqz)
     )
   )
@@ -86,10 +90,12 @@
     (f32.const 0) (f64.const 1) (unreachable) (i64.eq)
   )
   (func (export "binary-after-br") (result i32)
-    (block i32 (f32.const 0) (f64.const 1) (br 0 (i32.const 9)) (i64.eq))
+    (block (result i32)
+      (f32.const 0) (f64.const 1) (br 0 (i32.const 9)) (i64.eq)
+    )
   )
   (func (export "binary-after-br_table") (result i32)
-    (block i32
+    (block (result i32)
       (f32.const 0) (f64.const 1) (br_table 0 (i32.const 9) (i32.const 0))
       (i64.eq)
     )
@@ -102,12 +108,12 @@
     (f32.const 0) (f64.const 1) (i64.const 0) (unreachable) (select)
   )
   (func (export "select-after-br") (result i32)
-    (block i32
+    (block (result i32)
       (f32.const 0) (f64.const 1) (i64.const 0) (br 0 (i32.const 9)) (select)
     )
   )
   (func (export "select-after-br_table") (result i32)
-    (block i32
+    (block (result i32)
       (f32.const 0) (f64.const 1) (i64.const 0)
       (br_table 0 (i32.const 9) (i32.const 0))
       (select)
@@ -118,31 +124,35 @@
   )
 
   (func (export "block-value-after-unreachable") (result i32)
-    (block i32 (f32.const 0) (unreachable))
+    (block (result i32) (f32.const 0) (unreachable))
   )
   (func (export "block-value-after-br") (result i32)
-    (block i32 (f32.const 0) (br 0 (i32.const 9)))
+    (block (result i32) (f32.const 0) (br 0 (i32.const 9)))
   )
   (func (export "block-value-after-br_table") (result i32)
-    (block i32 (f32.const 0) (br_table 0 0 (i32.const 9) (i32.const 0)))
+    (block (result i32)
+      (f32.const 0) (br_table 0 0 (i32.const 9) (i32.const 0))
+    )
   )
   (func (export "block-value-after-return") (result i32)
-    (block i32 (f32.const 0) (return (i32.const 9)))
+    (block (result i32) (f32.const 0) (return (i32.const 9)))
   )
 
   (func (export "loop-value-after-unreachable") (result i32)
-    (loop i32 (f32.const 0) (unreachable))
+    (loop (result i32) (f32.const 0) (unreachable))
   )
   (func (export "loop-value-after-br") (result i32)
-    (block i32 (loop i32 (f32.const 0) (br 1 (i32.const 9))))
+    (block (result i32) (loop (result i32) (f32.const 0) (br 1 (i32.const 9))))
   )
   (func (export "loop-value-after-br_table") (result i32)
-    (block i32
-      (loop i32 (f32.const 0) (br_table 1 1 (i32.const 9) (i32.const 0)))
+    (block (result i32)
+      (loop (result i32)
+        (f32.const 0) (br_table 1 1 (i32.const 9) (i32.const 0))
+      )
     )
   )
   (func (export "loop-value-after-return") (result i32)
-    (loop i32 (f32.const 0) (return (i32.const 9)))
+    (loop (result i32) (f32.const 0) (return (i32.const 9)))
   )
 )
 
diff --git a/test/WasmSpec/testsuite/core/utf8-custom-section-id.wast b/test/WasmSpec/testsuite/core/utf8-custom-section-id.wast
new file mode 100644
index 0000000..129d2b9
--- /dev/null
+++ b/test/WasmSpec/testsuite/core/utf8-custom-section-id.wast
@@ -0,0 +1,1792 @@
+;;;;;; Invalid UTF-8 custom section names
+
+;;;; Continuation bytes not preceded by prefixes
+
+;; encoding starts with (first) continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\02"                       ;; custom section
+    "\01\80"                       ;; "\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; encoding starts with (0x8f) continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\02"                       ;; custom section
+    "\01\8f"                       ;; "\8f"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; encoding starts with (0x90) continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\02"                       ;; custom section
+    "\01\90"                       ;; "\90"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; encoding starts with (0x9f) continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\02"                       ;; custom section
+    "\01\9f"                       ;; "\9f"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; encoding starts with (0xa0) continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\02"                       ;; custom section
+    "\01\a0"                       ;; "\a0"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; encoding starts with (last) continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\02"                       ;; custom section
+    "\01\bf"                       ;; "\bf"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 2-byte sequences
+
+;; 2-byte sequence contains 3 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\c2\80\80"                 ;; "\c2\80\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 2-byte sequence contains 1 byte at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\02"                       ;; custom section
+    "\01\c2"                       ;; "\c2"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 2-byte sequence contains 1 byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\03"                       ;; custom section
+    "\02\c2\2e"                    ;; "\c2."
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 2-byte sequence contents
+
+;; overlong encoding after 0xc0 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\03"                       ;; custom section
+    "\02\c0\80"                    ;; "\c0\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; overlong encoding after 0xc0 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\03"                       ;; custom section
+    "\02\c0\bf"                    ;; "\c0\bf"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; overlong encoding after 0xc1 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\03"                       ;; custom section
+    "\02\c1\80"                    ;; "\c1\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; overlong encoding after 0xc1 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\03"                       ;; custom section
+    "\02\c1\bf"                    ;; "\c1\bf"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte after (first) 2-byte prefix not a contination byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\03"                       ;; custom section
+    "\02\c2\00"                    ;; "\c2\00"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte after (first) 2-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\03"                       ;; custom section
+    "\02\c2\7f"                    ;; "\c2\7f"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte after (first) 2-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\03"                       ;; custom section
+    "\02\c2\c0"                    ;; "\c2\c0"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte after (first) 2-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\03"                       ;; custom section
+    "\02\c2\fd"                    ;; "\c2\fd"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte after (last) 2-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\03"                       ;; custom section
+    "\02\df\00"                    ;; "\df\00"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte after (last) 2-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\03"                       ;; custom section
+    "\02\df\7f"                    ;; "\df\7f"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte after (last) 2-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\03"                       ;; custom section
+    "\02\df\c0"                    ;; "\df\c0"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte after (last) 2-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\03"                       ;; custom section
+    "\02\df\fd"                    ;; "\df\fd"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 3-byte sequences
+
+;; 3-byte sequence contains 4 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\e1\80\80\80"              ;; "\e1\80\80\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 3-byte sequence contains 2 bytes at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\03"                       ;; custom section
+    "\02\e1\80"                    ;; "\e1\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 3-byte sequence contains 2 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\e1\80\2e"                 ;; "\e1\80."
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 3-byte sequence contains 1 byte at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\02"                       ;; custom section
+    "\01\e1"                       ;; "\e1"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 3-byte sequence contains 1 byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\03"                       ;; custom section
+    "\02\e1\2e"                    ;; "\e1."
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 3-byte sequence contents
+
+;; first byte after (0xe0) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\e0\00\a0"                 ;; "\e0\00\a0"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xe0) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\e0\7f\a0"                 ;; "\e0\7f\a0"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; overlong encoding after 0xe0 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\e0\80\80"                 ;; "\e0\80\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; overlong encoding after 0xe0 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\e0\80\a0"                 ;; "\e0\80\a0"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; overlong encoding after 0xe0 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\e0\9f\a0"                 ;; "\e0\9f\a0"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; overlong encoding after 0xe0 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\e0\9f\bf"                 ;; "\e0\9f\bf"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xe0) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\e0\c0\a0"                 ;; "\e0\c0\a0"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xe0) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\e0\fd\a0"                 ;; "\e0\fd\a0"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (first normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\e1\00\80"                 ;; "\e1\00\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (first normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\e1\7f\80"                 ;; "\e1\7f\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (first normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\e1\c0\80"                 ;; "\e1\c0\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (first normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\e1\fd\80"                 ;; "\e1\fd\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ec\00\80"                 ;; "\ec\00\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ec\7f\80"                 ;; "\ec\7f\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ec\c0\80"                 ;; "\ec\c0\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ec\fd\80"                 ;; "\ec\fd\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xed) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ed\00\80"                 ;; "\ed\00\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xed) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ed\7f\80"                 ;; "\ed\7f\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte sequence reserved for UTF-16 surrogate half
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ed\a0\80"                 ;; "\ed\a0\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte sequence reserved for UTF-16 surrogate half
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ed\a0\bf"                 ;; "\ed\a0\bf"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte sequence reserved for UTF-16 surrogate half
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ed\bf\80"                 ;; "\ed\bf\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte sequence reserved for UTF-16 surrogate half
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ed\bf\bf"                 ;; "\ed\bf\bf"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xed) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ed\c0\80"                 ;; "\ed\c0\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xed) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ed\fd\80"                 ;; "\ed\fd\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ee\00\80"                 ;; "\ee\00\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ee\7f\80"                 ;; "\ee\7f\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ee\c0\80"                 ;; "\ee\c0\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ee\fd\80"                 ;; "\ee\fd\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (last normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ef\00\80"                 ;; "\ef\00\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (last normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ef\7f\80"                 ;; "\ef\7f\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (last normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ef\c0\80"                 ;; "\ef\c0\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (last normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ef\fd\80"                 ;; "\ef\fd\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 3-byte sequence contents (third byte)
+
+;; second byte after (0xe0) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\e0\a0\00"                 ;; "\e0\a0\00"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xe0) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\e0\a0\7f"                 ;; "\e0\a0\7f"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xe0) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\e0\a0\c0"                 ;; "\e0\a0\c0"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xe0) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\e0\a0\fd"                 ;; "\e0\a0\fd"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (first normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\e1\80\00"                 ;; "\e1\80\00"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (first normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\e1\80\7f"                 ;; "\e1\80\7f"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (first normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\e1\80\c0"                 ;; "\e1\80\c0"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (first normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\e1\80\fd"                 ;; "\e1\80\fd"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ec\80\00"                 ;; "\ec\80\00"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ec\80\7f"                 ;; "\ec\80\7f"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ec\80\c0"                 ;; "\ec\80\c0"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ec\80\fd"                 ;; "\ec\80\fd"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xed) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ed\80\00"                 ;; "\ed\80\00"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xed) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ed\80\7f"                 ;; "\ed\80\7f"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xed) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ed\80\c0"                 ;; "\ed\80\c0"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xed) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ed\80\fd"                 ;; "\ed\80\fd"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ee\80\00"                 ;; "\ee\80\00"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ee\80\7f"                 ;; "\ee\80\7f"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ee\80\c0"                 ;; "\ee\80\c0"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ee\80\fd"                 ;; "\ee\80\fd"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (last normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ef\80\00"                 ;; "\ef\80\00"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (last normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ef\80\7f"                 ;; "\ef\80\7f"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (last normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ef\80\c0"                 ;; "\ef\80\c0"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (last normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\ef\80\fd"                 ;; "\ef\80\fd"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 4-byte sequences
+
+;; 4-byte sequence contains 5 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\06"                       ;; custom section
+    "\05\f1\80\80\80\80"           ;; "\f1\80\80\80\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 4-byte sequence contains 3 bytes at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\f1\80\80"                 ;; "\f1\80\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 4-byte sequence contains 3 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f1\80\80\23"              ;; "\f1\80\80#"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 4-byte sequence contains 2 bytes at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\03"                       ;; custom section
+    "\02\f1\80"                    ;; "\f1\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 4-byte sequence contains 2 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\f1\80\23"                 ;; "\f1\80#"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 4-byte sequence contains 1 byte at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\02"                       ;; custom section
+    "\01\f1"                       ;; "\f1"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 4-byte sequence contains 1 byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\03"                       ;; custom section
+    "\02\f1\23"                    ;; "\f1#"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 4-byte sequence contents
+
+;; first byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f0\00\90\90"              ;; "\f0\00\90\90"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f0\7f\90\90"              ;; "\f0\7f\90\90"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; overlong encoding after 0xf0 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f0\80\80\80"              ;; "\f0\80\80\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; overlong encoding after 0xf0 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f0\80\90\90"              ;; "\f0\80\90\90"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; overlong encoding after 0xf0 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f0\8f\90\90"              ;; "\f0\8f\90\90"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; overlong encoding after 0xf0 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f0\8f\bf\bf"              ;; "\f0\8f\bf\bf"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f0\c0\90\90"              ;; "\f0\c0\90\90"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f0\fd\90\90"              ;; "\f0\fd\90\90"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f1\00\80\80"              ;; "\f1\00\80\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f1\7f\80\80"              ;; "\f1\7f\80\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f1\c0\80\80"              ;; "\f1\c0\80\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f1\fd\80\80"              ;; "\f1\fd\80\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f3\00\80\80"              ;; "\f3\00\80\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f3\7f\80\80"              ;; "\f3\7f\80\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f3\c0\80\80"              ;; "\f3\c0\80\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f3\fd\80\80"              ;; "\f3\fd\80\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f4\00\80\80"              ;; "\f4\00\80\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f4\7f\80\80"              ;; "\f4\7f\80\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; (first) invalid code point
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f4\90\80\80"              ;; "\f4\90\80\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; invalid code point
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f4\bf\80\80"              ;; "\f4\bf\80\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f4\c0\80\80"              ;; "\f4\c0\80\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f4\fd\80\80"              ;; "\f4\fd\80\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; (first) invalid 4-byte prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f5\80\80\80"              ;; "\f5\80\80\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; (last) invalid 4-byte prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f7\80\80\80"              ;; "\f7\80\80\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; (last) invalid 4-byte prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f7\bf\bf\bf"              ;; "\f7\bf\bf\bf"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 4-byte sequence contents (third byte)
+
+;; second byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f0\90\00\90"              ;; "\f0\90\00\90"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f0\90\7f\90"              ;; "\f0\90\7f\90"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f0\90\c0\90"              ;; "\f0\90\c0\90"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f0\90\fd\90"              ;; "\f0\90\fd\90"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f1\80\00\80"              ;; "\f1\80\00\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f1\80\7f\80"              ;; "\f1\80\7f\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f1\80\c0\80"              ;; "\f1\80\c0\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f1\80\fd\80"              ;; "\f1\80\fd\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f3\80\00\80"              ;; "\f3\80\00\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f3\80\7f\80"              ;; "\f3\80\7f\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f3\80\c0\80"              ;; "\f3\80\c0\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f3\80\fd\80"              ;; "\f3\80\fd\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f4\80\00\80"              ;; "\f4\80\00\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f4\80\7f\80"              ;; "\f4\80\7f\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f4\80\c0\80"              ;; "\f4\80\c0\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f4\80\fd\80"              ;; "\f4\80\fd\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 4-byte sequence contents (fourth byte)
+
+;; third byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f0\90\90\00"              ;; "\f0\90\90\00"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f0\90\90\7f"              ;; "\f0\90\90\7f"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f0\90\90\c0"              ;; "\f0\90\90\c0"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f0\90\90\fd"              ;; "\f0\90\90\fd"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f1\80\80\00"              ;; "\f1\80\80\00"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f1\80\80\7f"              ;; "\f1\80\80\7f"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f1\80\80\c0"              ;; "\f1\80\80\c0"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f1\80\80\fd"              ;; "\f1\80\80\fd"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f3\80\80\00"              ;; "\f3\80\80\00"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f3\80\80\7f"              ;; "\f3\80\80\7f"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f3\80\80\c0"              ;; "\f3\80\80\c0"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f3\80\80\fd"              ;; "\f3\80\80\fd"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f4\80\80\00"              ;; "\f4\80\80\00"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f4\80\80\7f"              ;; "\f4\80\80\7f"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f4\80\80\c0"              ;; "\f4\80\80\c0"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f4\80\80\fd"              ;; "\f4\80\80\fd"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 5-byte sequences
+
+;; 5-byte sequence contains 6 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\07"                       ;; custom section
+    "\06\f8\80\80\80\80\80"        ;; "\f8\80\80\80\80\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 5-byte sequence contains 4 bytes at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f8\80\80\80"              ;; "\f8\80\80\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 5-byte sequence contains 4 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\06"                       ;; custom section
+    "\05\f8\80\80\80\23"           ;; "\f8\80\80\80#"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 5-byte sequence contains 3 bytes at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\f8\80\80"                 ;; "\f8\80\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 5-byte sequence contains 3 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\f8\80\80\23"              ;; "\f8\80\80#"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 5-byte sequence contains 2 bytes at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\03"                       ;; custom section
+    "\02\f8\80"                    ;; "\f8\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 5-byte sequence contains 2 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\f8\80\23"                 ;; "\f8\80#"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 5-byte sequence contains 1 byte at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\02"                       ;; custom section
+    "\01\f8"                       ;; "\f8"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 5-byte sequence contains 1 byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\03"                       ;; custom section
+    "\02\f8\23"                    ;; "\f8#"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 5-byte sequence contents
+
+;; (first) invalid 5-byte prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\06"                       ;; custom section
+    "\05\f8\80\80\80\80"           ;; "\f8\80\80\80\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; (last) invalid 5-byte prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\06"                       ;; custom section
+    "\05\fb\bf\bf\bf\bf"           ;; "\fb\bf\bf\bf\bf"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 6-byte sequences
+
+;; 6-byte sequence contains 7 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\08"                       ;; custom section
+    "\07\fc\80\80\80\80\80\80"     ;; "\fc\80\80\80\80\80\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 6-byte sequence contains 5 bytes at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\06"                       ;; custom section
+    "\05\fc\80\80\80\80"           ;; "\fc\80\80\80\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 6-byte sequence contains 5 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\07"                       ;; custom section
+    "\06\fc\80\80\80\80\23"        ;; "\fc\80\80\80\80#"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 6-byte sequence contains 4 bytes at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\fc\80\80\80"              ;; "\fc\80\80\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 6-byte sequence contains 4 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\06"                       ;; custom section
+    "\05\fc\80\80\80\23"           ;; "\fc\80\80\80#"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 6-byte sequence contains 3 bytes at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\fc\80\80"                 ;; "\fc\80\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 6-byte sequence contains 3 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\fc\80\80\23"              ;; "\fc\80\80#"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 6-byte sequence contains 2 bytes at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\03"                       ;; custom section
+    "\02\fc\80"                    ;; "\fc\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 6-byte sequence contains 2 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\04"                       ;; custom section
+    "\03\fc\80\23"                 ;; "\fc\80#"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 6-byte sequence contains 1 byte at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\02"                       ;; custom section
+    "\01\fc"                       ;; "\fc"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 6-byte sequence contains 1 byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\03"                       ;; custom section
+    "\02\fc\23"                    ;; "\fc#"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 6-byte sequence contents
+
+;; (first) invalid 6-byte prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\07"                       ;; custom section
+    "\06\fc\80\80\80\80\80"        ;; "\fc\80\80\80\80\80"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; (last) invalid 6-byte prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\07"                       ;; custom section
+    "\06\fd\bf\bf\bf\bf\bf"        ;; "\fd\bf\bf\bf\bf\bf"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; Miscellaneous invalid bytes
+
+;; invalid byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\02"                       ;; custom section
+    "\01\fe"                       ;; "\fe"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; invalid byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\02"                       ;; custom section
+    "\01\ff"                       ;; "\ff"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; UTF-16BE BOM
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\03"                       ;; custom section
+    "\02\fe\ff"                    ;; "\fe\ff"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; UTF-32BE BOM
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\00\00\fe\ff"              ;; "\00\00\fe\ff"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; UTF-16LE BOM
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\03"                       ;; custom section
+    "\02\ff\fe"                    ;; "\ff\fe"
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; UTF-32LE BOM
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\00\05"                       ;; custom section
+    "\04\ff\fe\00\00"              ;; "\ff\fe\00\00"
+  )
+  "invalid UTF-8 encoding"
+)
+
diff --git a/test/WasmSpec/testsuite/core/utf8-import-field.wast b/test/WasmSpec/testsuite/core/utf8-import-field.wast
new file mode 100644
index 0000000..1ff2aa0
--- /dev/null
+++ b/test/WasmSpec/testsuite/core/utf8-import-field.wast
@@ -0,0 +1,2672 @@
+;;;;;; Invalid UTF-8 import field names
+
+;;;; Continuation bytes not preceded by prefixes
+
+;; encoding starts with (first) continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0b"                       ;; import section
+    "\01"                          ;; length 1
+    "\01\80"                       ;; "\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; encoding starts with (0x8f) continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0b"                       ;; import section
+    "\01"                          ;; length 1
+    "\01\8f"                       ;; "\8f"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; encoding starts with (0x90) continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0b"                       ;; import section
+    "\01"                          ;; length 1
+    "\01\90"                       ;; "\90"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; encoding starts with (0x9f) continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0b"                       ;; import section
+    "\01"                          ;; length 1
+    "\01\9f"                       ;; "\9f"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; encoding starts with (0xa0) continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0b"                       ;; import section
+    "\01"                          ;; length 1
+    "\01\a0"                       ;; "\a0"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; encoding starts with (last) continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0b"                       ;; import section
+    "\01"                          ;; length 1
+    "\01\bf"                       ;; "\bf"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 2-byte sequences
+
+;; 2-byte sequence contains 3 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\c2\80\80"                 ;; "\c2\80\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 2-byte sequence contains 1 byte at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0b"                       ;; import section
+    "\01"                          ;; length 1
+    "\01\c2"                       ;; "\c2"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 2-byte sequence contains 1 byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\02\c2\2e"                    ;; "\c2."
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 2-byte sequence contents
+
+;; overlong encoding after 0xc0 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\02\c0\80"                    ;; "\c0\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; overlong encoding after 0xc0 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\02\c0\bf"                    ;; "\c0\bf"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; overlong encoding after 0xc1 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\02\c1\80"                    ;; "\c1\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; overlong encoding after 0xc1 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\02\c1\bf"                    ;; "\c1\bf"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte after (first) 2-byte prefix not a contination byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\02\c2\00"                    ;; "\c2\00"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte after (first) 2-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\02\c2\7f"                    ;; "\c2\7f"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte after (first) 2-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\02\c2\c0"                    ;; "\c2\c0"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte after (first) 2-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\02\c2\fd"                    ;; "\c2\fd"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte after (last) 2-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\02\df\00"                    ;; "\df\00"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte after (last) 2-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\02\df\7f"                    ;; "\df\7f"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte after (last) 2-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\02\df\c0"                    ;; "\df\c0"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte after (last) 2-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\02\df\fd"                    ;; "\df\fd"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 3-byte sequences
+
+;; 3-byte sequence contains 4 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\e1\80\80\80"              ;; "\e1\80\80\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 3-byte sequence contains 2 bytes at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\02\e1\80"                    ;; "\e1\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 3-byte sequence contains 2 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\e1\80\2e"                 ;; "\e1\80."
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 3-byte sequence contains 1 byte at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0b"                       ;; import section
+    "\01"                          ;; length 1
+    "\01\e1"                       ;; "\e1"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 3-byte sequence contains 1 byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\02\e1\2e"                    ;; "\e1."
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 3-byte sequence contents
+
+;; first byte after (0xe0) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\e0\00\a0"                 ;; "\e0\00\a0"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xe0) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\e0\7f\a0"                 ;; "\e0\7f\a0"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; overlong encoding after 0xe0 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\e0\80\80"                 ;; "\e0\80\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; overlong encoding after 0xe0 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\e0\80\a0"                 ;; "\e0\80\a0"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; overlong encoding after 0xe0 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\e0\9f\a0"                 ;; "\e0\9f\a0"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; overlong encoding after 0xe0 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\e0\9f\bf"                 ;; "\e0\9f\bf"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xe0) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\e0\c0\a0"                 ;; "\e0\c0\a0"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xe0) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\e0\fd\a0"                 ;; "\e0\fd\a0"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (first normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\e1\00\80"                 ;; "\e1\00\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (first normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\e1\7f\80"                 ;; "\e1\7f\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (first normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\e1\c0\80"                 ;; "\e1\c0\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (first normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\e1\fd\80"                 ;; "\e1\fd\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ec\00\80"                 ;; "\ec\00\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ec\7f\80"                 ;; "\ec\7f\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ec\c0\80"                 ;; "\ec\c0\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ec\fd\80"                 ;; "\ec\fd\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xed) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ed\00\80"                 ;; "\ed\00\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xed) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ed\7f\80"                 ;; "\ed\7f\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte sequence reserved for UTF-16 surrogate half
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ed\a0\80"                 ;; "\ed\a0\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte sequence reserved for UTF-16 surrogate half
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ed\a0\bf"                 ;; "\ed\a0\bf"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte sequence reserved for UTF-16 surrogate half
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ed\bf\80"                 ;; "\ed\bf\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte sequence reserved for UTF-16 surrogate half
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ed\bf\bf"                 ;; "\ed\bf\bf"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xed) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ed\c0\80"                 ;; "\ed\c0\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xed) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ed\fd\80"                 ;; "\ed\fd\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ee\00\80"                 ;; "\ee\00\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ee\7f\80"                 ;; "\ee\7f\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ee\c0\80"                 ;; "\ee\c0\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ee\fd\80"                 ;; "\ee\fd\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (last normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ef\00\80"                 ;; "\ef\00\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (last normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ef\7f\80"                 ;; "\ef\7f\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (last normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ef\c0\80"                 ;; "\ef\c0\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (last normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ef\fd\80"                 ;; "\ef\fd\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 3-byte sequence contents (third byte)
+
+;; second byte after (0xe0) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\e0\a0\00"                 ;; "\e0\a0\00"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xe0) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\e0\a0\7f"                 ;; "\e0\a0\7f"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xe0) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\e0\a0\c0"                 ;; "\e0\a0\c0"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xe0) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\e0\a0\fd"                 ;; "\e0\a0\fd"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (first normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\e1\80\00"                 ;; "\e1\80\00"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (first normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\e1\80\7f"                 ;; "\e1\80\7f"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (first normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\e1\80\c0"                 ;; "\e1\80\c0"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (first normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\e1\80\fd"                 ;; "\e1\80\fd"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ec\80\00"                 ;; "\ec\80\00"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ec\80\7f"                 ;; "\ec\80\7f"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ec\80\c0"                 ;; "\ec\80\c0"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ec\80\fd"                 ;; "\ec\80\fd"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xed) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ed\80\00"                 ;; "\ed\80\00"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xed) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ed\80\7f"                 ;; "\ed\80\7f"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xed) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ed\80\c0"                 ;; "\ed\80\c0"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xed) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ed\80\fd"                 ;; "\ed\80\fd"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ee\80\00"                 ;; "\ee\80\00"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ee\80\7f"                 ;; "\ee\80\7f"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ee\80\c0"                 ;; "\ee\80\c0"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ee\80\fd"                 ;; "\ee\80\fd"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (last normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ef\80\00"                 ;; "\ef\80\00"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (last normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ef\80\7f"                 ;; "\ef\80\7f"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (last normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ef\80\c0"                 ;; "\ef\80\c0"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (last normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\ef\80\fd"                 ;; "\ef\80\fd"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 4-byte sequences
+
+;; 4-byte sequence contains 5 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0f"                       ;; import section
+    "\01"                          ;; length 1
+    "\05\f1\80\80\80\80"           ;; "\f1\80\80\80\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 4-byte sequence contains 3 bytes at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\f1\80\80"                 ;; "\f1\80\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 4-byte sequence contains 3 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f1\80\80\23"              ;; "\f1\80\80#"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 4-byte sequence contains 2 bytes at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\02\f1\80"                    ;; "\f1\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 4-byte sequence contains 2 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\f1\80\23"                 ;; "\f1\80#"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 4-byte sequence contains 1 byte at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0b"                       ;; import section
+    "\01"                          ;; length 1
+    "\01\f1"                       ;; "\f1"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 4-byte sequence contains 1 byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\02\f1\23"                    ;; "\f1#"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 4-byte sequence contents
+
+;; first byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f0\00\90\90"              ;; "\f0\00\90\90"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f0\7f\90\90"              ;; "\f0\7f\90\90"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; overlong encoding after 0xf0 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f0\80\80\80"              ;; "\f0\80\80\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; overlong encoding after 0xf0 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f0\80\90\90"              ;; "\f0\80\90\90"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; overlong encoding after 0xf0 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f0\8f\90\90"              ;; "\f0\8f\90\90"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; overlong encoding after 0xf0 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f0\8f\bf\bf"              ;; "\f0\8f\bf\bf"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f0\c0\90\90"              ;; "\f0\c0\90\90"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f0\fd\90\90"              ;; "\f0\fd\90\90"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f1\00\80\80"              ;; "\f1\00\80\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f1\7f\80\80"              ;; "\f1\7f\80\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f1\c0\80\80"              ;; "\f1\c0\80\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f1\fd\80\80"              ;; "\f1\fd\80\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f3\00\80\80"              ;; "\f3\00\80\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f3\7f\80\80"              ;; "\f3\7f\80\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f3\c0\80\80"              ;; "\f3\c0\80\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f3\fd\80\80"              ;; "\f3\fd\80\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f4\00\80\80"              ;; "\f4\00\80\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f4\7f\80\80"              ;; "\f4\7f\80\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; (first) invalid code point
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f4\90\80\80"              ;; "\f4\90\80\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; invalid code point
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f4\bf\80\80"              ;; "\f4\bf\80\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f4\c0\80\80"              ;; "\f4\c0\80\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f4\fd\80\80"              ;; "\f4\fd\80\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; (first) invalid 4-byte prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f5\80\80\80"              ;; "\f5\80\80\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; (last) invalid 4-byte prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f7\80\80\80"              ;; "\f7\80\80\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; (last) invalid 4-byte prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f7\bf\bf\bf"              ;; "\f7\bf\bf\bf"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 4-byte sequence contents (third byte)
+
+;; second byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f0\90\00\90"              ;; "\f0\90\00\90"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f0\90\7f\90"              ;; "\f0\90\7f\90"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f0\90\c0\90"              ;; "\f0\90\c0\90"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f0\90\fd\90"              ;; "\f0\90\fd\90"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f1\80\00\80"              ;; "\f1\80\00\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f1\80\7f\80"              ;; "\f1\80\7f\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f1\80\c0\80"              ;; "\f1\80\c0\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f1\80\fd\80"              ;; "\f1\80\fd\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f3\80\00\80"              ;; "\f3\80\00\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f3\80\7f\80"              ;; "\f3\80\7f\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f3\80\c0\80"              ;; "\f3\80\c0\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f3\80\fd\80"              ;; "\f3\80\fd\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f4\80\00\80"              ;; "\f4\80\00\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f4\80\7f\80"              ;; "\f4\80\7f\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f4\80\c0\80"              ;; "\f4\80\c0\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f4\80\fd\80"              ;; "\f4\80\fd\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 4-byte sequence contents (fourth byte)
+
+;; third byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f0\90\90\00"              ;; "\f0\90\90\00"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f0\90\90\7f"              ;; "\f0\90\90\7f"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f0\90\90\c0"              ;; "\f0\90\90\c0"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f0\90\90\fd"              ;; "\f0\90\90\fd"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f1\80\80\00"              ;; "\f1\80\80\00"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f1\80\80\7f"              ;; "\f1\80\80\7f"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f1\80\80\c0"              ;; "\f1\80\80\c0"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f1\80\80\fd"              ;; "\f1\80\80\fd"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f3\80\80\00"              ;; "\f3\80\80\00"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f3\80\80\7f"              ;; "\f3\80\80\7f"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f3\80\80\c0"              ;; "\f3\80\80\c0"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f3\80\80\fd"              ;; "\f3\80\80\fd"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f4\80\80\00"              ;; "\f4\80\80\00"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f4\80\80\7f"              ;; "\f4\80\80\7f"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f4\80\80\c0"              ;; "\f4\80\80\c0"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f4\80\80\fd"              ;; "\f4\80\80\fd"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 5-byte sequences
+
+;; 5-byte sequence contains 6 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\10"                       ;; import section
+    "\01"                          ;; length 1
+    "\06\f8\80\80\80\80\80"        ;; "\f8\80\80\80\80\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 5-byte sequence contains 4 bytes at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f8\80\80\80"              ;; "\f8\80\80\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 5-byte sequence contains 4 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0f"                       ;; import section
+    "\01"                          ;; length 1
+    "\05\f8\80\80\80\23"           ;; "\f8\80\80\80#"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 5-byte sequence contains 3 bytes at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\f8\80\80"                 ;; "\f8\80\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 5-byte sequence contains 3 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\f8\80\80\23"              ;; "\f8\80\80#"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 5-byte sequence contains 2 bytes at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\02\f8\80"                    ;; "\f8\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 5-byte sequence contains 2 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\f8\80\23"                 ;; "\f8\80#"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 5-byte sequence contains 1 byte at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0b"                       ;; import section
+    "\01"                          ;; length 1
+    "\01\f8"                       ;; "\f8"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 5-byte sequence contains 1 byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\02\f8\23"                    ;; "\f8#"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 5-byte sequence contents
+
+;; (first) invalid 5-byte prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0f"                       ;; import section
+    "\01"                          ;; length 1
+    "\05\f8\80\80\80\80"           ;; "\f8\80\80\80\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; (last) invalid 5-byte prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0f"                       ;; import section
+    "\01"                          ;; length 1
+    "\05\fb\bf\bf\bf\bf"           ;; "\fb\bf\bf\bf\bf"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 6-byte sequences
+
+;; 6-byte sequence contains 7 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\11"                       ;; import section
+    "\01"                          ;; length 1
+    "\07\fc\80\80\80\80\80\80"     ;; "\fc\80\80\80\80\80\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 6-byte sequence contains 5 bytes at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0f"                       ;; import section
+    "\01"                          ;; length 1
+    "\05\fc\80\80\80\80"           ;; "\fc\80\80\80\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 6-byte sequence contains 5 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\10"                       ;; import section
+    "\01"                          ;; length 1
+    "\06\fc\80\80\80\80\23"        ;; "\fc\80\80\80\80#"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 6-byte sequence contains 4 bytes at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\fc\80\80\80"              ;; "\fc\80\80\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 6-byte sequence contains 4 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0f"                       ;; import section
+    "\01"                          ;; length 1
+    "\05\fc\80\80\80\23"           ;; "\fc\80\80\80#"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 6-byte sequence contains 3 bytes at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\fc\80\80"                 ;; "\fc\80\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 6-byte sequence contains 3 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\fc\80\80\23"              ;; "\fc\80\80#"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 6-byte sequence contains 2 bytes at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\02\fc\80"                    ;; "\fc\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 6-byte sequence contains 2 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\03\fc\80\23"                 ;; "\fc\80#"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 6-byte sequence contains 1 byte at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0b"                       ;; import section
+    "\01"                          ;; length 1
+    "\01\fc"                       ;; "\fc"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 6-byte sequence contains 1 byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\02\fc\23"                    ;; "\fc#"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 6-byte sequence contents
+
+;; (first) invalid 6-byte prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\10"                       ;; import section
+    "\01"                          ;; length 1
+    "\06\fc\80\80\80\80\80"        ;; "\fc\80\80\80\80\80"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; (last) invalid 6-byte prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\10"                       ;; import section
+    "\01"                          ;; length 1
+    "\06\fd\bf\bf\bf\bf\bf"        ;; "\fd\bf\bf\bf\bf\bf"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; Miscellaneous invalid bytes
+
+;; invalid byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0b"                       ;; import section
+    "\01"                          ;; length 1
+    "\01\fe"                       ;; "\fe"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; invalid byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0b"                       ;; import section
+    "\01"                          ;; length 1
+    "\01\ff"                       ;; "\ff"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; UTF-16BE BOM
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\02\fe\ff"                    ;; "\fe\ff"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; UTF-32BE BOM
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\00\00\fe\ff"              ;; "\00\00\fe\ff"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; UTF-16LE BOM
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\02\ff\fe"                    ;; "\ff\fe"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; UTF-32LE BOM
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\ff\fe\00\00"              ;; "\ff\fe\00\00"
+    "\04\74\65\73\74"              ;; "test"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
diff --git a/test/WasmSpec/testsuite/core/utf8-import-module.wast b/test/WasmSpec/testsuite/core/utf8-import-module.wast
new file mode 100644
index 0000000..ceabbeb
--- /dev/null
+++ b/test/WasmSpec/testsuite/core/utf8-import-module.wast
@@ -0,0 +1,2672 @@
+;;;;;; Invalid UTF-8 import module names
+
+;;;; Continuation bytes not preceded by prefixes
+
+;; encoding starts with (first) continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0b"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\01\80"                       ;; "\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; encoding starts with (0x8f) continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0b"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\01\8f"                       ;; "\8f"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; encoding starts with (0x90) continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0b"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\01\90"                       ;; "\90"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; encoding starts with (0x9f) continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0b"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\01\9f"                       ;; "\9f"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; encoding starts with (0xa0) continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0b"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\01\a0"                       ;; "\a0"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; encoding starts with (last) continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0b"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\01\bf"                       ;; "\bf"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 2-byte sequences
+
+;; 2-byte sequence contains 3 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\c2\80\80"                 ;; "\c2\80\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 2-byte sequence contains 1 byte at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0b"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\01\c2"                       ;; "\c2"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 2-byte sequence contains 1 byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\02\c2\2e"                    ;; "\c2."
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 2-byte sequence contents
+
+;; overlong encoding after 0xc0 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\02\c0\80"                    ;; "\c0\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; overlong encoding after 0xc0 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\02\c0\bf"                    ;; "\c0\bf"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; overlong encoding after 0xc1 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\02\c1\80"                    ;; "\c1\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; overlong encoding after 0xc1 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\02\c1\bf"                    ;; "\c1\bf"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte after (first) 2-byte prefix not a contination byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\02\c2\00"                    ;; "\c2\00"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte after (first) 2-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\02\c2\7f"                    ;; "\c2\7f"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte after (first) 2-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\02\c2\c0"                    ;; "\c2\c0"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte after (first) 2-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\02\c2\fd"                    ;; "\c2\fd"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte after (last) 2-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\02\df\00"                    ;; "\df\00"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte after (last) 2-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\02\df\7f"                    ;; "\df\7f"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte after (last) 2-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\02\df\c0"                    ;; "\df\c0"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte after (last) 2-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\02\df\fd"                    ;; "\df\fd"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 3-byte sequences
+
+;; 3-byte sequence contains 4 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\e1\80\80\80"              ;; "\e1\80\80\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 3-byte sequence contains 2 bytes at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\02\e1\80"                    ;; "\e1\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 3-byte sequence contains 2 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\e1\80\2e"                 ;; "\e1\80."
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 3-byte sequence contains 1 byte at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0b"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\01\e1"                       ;; "\e1"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 3-byte sequence contains 1 byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\02\e1\2e"                    ;; "\e1."
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 3-byte sequence contents
+
+;; first byte after (0xe0) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\e0\00\a0"                 ;; "\e0\00\a0"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xe0) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\e0\7f\a0"                 ;; "\e0\7f\a0"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; overlong encoding after 0xe0 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\e0\80\80"                 ;; "\e0\80\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; overlong encoding after 0xe0 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\e0\80\a0"                 ;; "\e0\80\a0"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; overlong encoding after 0xe0 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\e0\9f\a0"                 ;; "\e0\9f\a0"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; overlong encoding after 0xe0 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\e0\9f\bf"                 ;; "\e0\9f\bf"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xe0) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\e0\c0\a0"                 ;; "\e0\c0\a0"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xe0) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\e0\fd\a0"                 ;; "\e0\fd\a0"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (first normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\e1\00\80"                 ;; "\e1\00\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (first normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\e1\7f\80"                 ;; "\e1\7f\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (first normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\e1\c0\80"                 ;; "\e1\c0\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (first normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\e1\fd\80"                 ;; "\e1\fd\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ec\00\80"                 ;; "\ec\00\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ec\7f\80"                 ;; "\ec\7f\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ec\c0\80"                 ;; "\ec\c0\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ec\fd\80"                 ;; "\ec\fd\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xed) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ed\00\80"                 ;; "\ed\00\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xed) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ed\7f\80"                 ;; "\ed\7f\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte sequence reserved for UTF-16 surrogate half
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ed\a0\80"                 ;; "\ed\a0\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte sequence reserved for UTF-16 surrogate half
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ed\a0\bf"                 ;; "\ed\a0\bf"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte sequence reserved for UTF-16 surrogate half
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ed\bf\80"                 ;; "\ed\bf\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; byte sequence reserved for UTF-16 surrogate half
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ed\bf\bf"                 ;; "\ed\bf\bf"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xed) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ed\c0\80"                 ;; "\ed\c0\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xed) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ed\fd\80"                 ;; "\ed\fd\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ee\00\80"                 ;; "\ee\00\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ee\7f\80"                 ;; "\ee\7f\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ee\c0\80"                 ;; "\ee\c0\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ee\fd\80"                 ;; "\ee\fd\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (last normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ef\00\80"                 ;; "\ef\00\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (last normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ef\7f\80"                 ;; "\ef\7f\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (last normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ef\c0\80"                 ;; "\ef\c0\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (last normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ef\fd\80"                 ;; "\ef\fd\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 3-byte sequence contents (third byte)
+
+;; second byte after (0xe0) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\e0\a0\00"                 ;; "\e0\a0\00"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xe0) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\e0\a0\7f"                 ;; "\e0\a0\7f"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xe0) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\e0\a0\c0"                 ;; "\e0\a0\c0"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xe0) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\e0\a0\fd"                 ;; "\e0\a0\fd"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (first normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\e1\80\00"                 ;; "\e1\80\00"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (first normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\e1\80\7f"                 ;; "\e1\80\7f"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (first normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\e1\80\c0"                 ;; "\e1\80\c0"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (first normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\e1\80\fd"                 ;; "\e1\80\fd"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ec\80\00"                 ;; "\ec\80\00"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ec\80\7f"                 ;; "\ec\80\7f"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ec\80\c0"                 ;; "\ec\80\c0"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ec\80\fd"                 ;; "\ec\80\fd"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xed) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ed\80\00"                 ;; "\ed\80\00"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xed) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ed\80\7f"                 ;; "\ed\80\7f"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xed) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ed\80\c0"                 ;; "\ed\80\c0"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xed) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ed\80\fd"                 ;; "\ed\80\fd"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ee\80\00"                 ;; "\ee\80\00"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ee\80\7f"                 ;; "\ee\80\7f"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ee\80\c0"                 ;; "\ee\80\c0"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ee\80\fd"                 ;; "\ee\80\fd"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (last normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ef\80\00"                 ;; "\ef\80\00"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (last normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ef\80\7f"                 ;; "\ef\80\7f"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (last normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ef\80\c0"                 ;; "\ef\80\c0"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (last normal) 3-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\ef\80\fd"                 ;; "\ef\80\fd"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 4-byte sequences
+
+;; 4-byte sequence contains 5 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0f"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\05\f1\80\80\80\80"           ;; "\f1\80\80\80\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 4-byte sequence contains 3 bytes at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\f1\80\80"                 ;; "\f1\80\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 4-byte sequence contains 3 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f1\80\80\23"              ;; "\f1\80\80#"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 4-byte sequence contains 2 bytes at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\02\f1\80"                    ;; "\f1\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 4-byte sequence contains 2 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\f1\80\23"                 ;; "\f1\80#"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 4-byte sequence contains 1 byte at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0b"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\01\f1"                       ;; "\f1"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 4-byte sequence contains 1 byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\02\f1\23"                    ;; "\f1#"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 4-byte sequence contents
+
+;; first byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f0\00\90\90"              ;; "\f0\00\90\90"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f0\7f\90\90"              ;; "\f0\7f\90\90"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; overlong encoding after 0xf0 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f0\80\80\80"              ;; "\f0\80\80\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; overlong encoding after 0xf0 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f0\80\90\90"              ;; "\f0\80\90\90"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; overlong encoding after 0xf0 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f0\8f\90\90"              ;; "\f0\8f\90\90"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; overlong encoding after 0xf0 prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f0\8f\bf\bf"              ;; "\f0\8f\bf\bf"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f0\c0\90\90"              ;; "\f0\c0\90\90"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f0\fd\90\90"              ;; "\f0\fd\90\90"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f1\00\80\80"              ;; "\f1\00\80\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f1\7f\80\80"              ;; "\f1\7f\80\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f1\c0\80\80"              ;; "\f1\c0\80\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f1\fd\80\80"              ;; "\f1\fd\80\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f3\00\80\80"              ;; "\f3\00\80\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f3\7f\80\80"              ;; "\f3\7f\80\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f3\c0\80\80"              ;; "\f3\c0\80\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f3\fd\80\80"              ;; "\f3\fd\80\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f4\00\80\80"              ;; "\f4\00\80\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f4\7f\80\80"              ;; "\f4\7f\80\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; (first) invalid code point
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f4\90\80\80"              ;; "\f4\90\80\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; invalid code point
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f4\bf\80\80"              ;; "\f4\bf\80\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f4\c0\80\80"              ;; "\f4\c0\80\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; first byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f4\fd\80\80"              ;; "\f4\fd\80\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; (first) invalid 4-byte prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f5\80\80\80"              ;; "\f5\80\80\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; (last) invalid 4-byte prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f7\80\80\80"              ;; "\f7\80\80\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; (last) invalid 4-byte prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f7\bf\bf\bf"              ;; "\f7\bf\bf\bf"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 4-byte sequence contents (third byte)
+
+;; second byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f0\90\00\90"              ;; "\f0\90\00\90"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f0\90\7f\90"              ;; "\f0\90\7f\90"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f0\90\c0\90"              ;; "\f0\90\c0\90"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f0\90\fd\90"              ;; "\f0\90\fd\90"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f1\80\00\80"              ;; "\f1\80\00\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f1\80\7f\80"              ;; "\f1\80\7f\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f1\80\c0\80"              ;; "\f1\80\c0\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f1\80\fd\80"              ;; "\f1\80\fd\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f3\80\00\80"              ;; "\f3\80\00\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f3\80\7f\80"              ;; "\f3\80\7f\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f3\80\c0\80"              ;; "\f3\80\c0\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f3\80\fd\80"              ;; "\f3\80\fd\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f4\80\00\80"              ;; "\f4\80\00\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f4\80\7f\80"              ;; "\f4\80\7f\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f4\80\c0\80"              ;; "\f4\80\c0\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; second byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f4\80\fd\80"              ;; "\f4\80\fd\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 4-byte sequence contents (fourth byte)
+
+;; third byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f0\90\90\00"              ;; "\f0\90\90\00"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f0\90\90\7f"              ;; "\f0\90\90\7f"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f0\90\90\c0"              ;; "\f0\90\90\c0"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (0xf0) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f0\90\90\fd"              ;; "\f0\90\90\fd"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f1\80\80\00"              ;; "\f1\80\80\00"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f1\80\80\7f"              ;; "\f1\80\80\7f"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f1\80\80\c0"              ;; "\f1\80\80\c0"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (first normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f1\80\80\fd"              ;; "\f1\80\80\fd"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f3\80\80\00"              ;; "\f3\80\80\00"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f3\80\80\7f"              ;; "\f3\80\80\7f"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f3\80\80\c0"              ;; "\f3\80\80\c0"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (last normal) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f3\80\80\fd"              ;; "\f3\80\80\fd"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f4\80\80\00"              ;; "\f4\80\80\00"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f4\80\80\7f"              ;; "\f4\80\80\7f"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f4\80\80\c0"              ;; "\f4\80\80\c0"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; third byte after (0xf4) 4-byte prefix not a continuation byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f4\80\80\fd"              ;; "\f4\80\80\fd"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 5-byte sequences
+
+;; 5-byte sequence contains 6 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\10"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\06\f8\80\80\80\80\80"        ;; "\f8\80\80\80\80\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 5-byte sequence contains 4 bytes at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f8\80\80\80"              ;; "\f8\80\80\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 5-byte sequence contains 4 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0f"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\05\f8\80\80\80\23"           ;; "\f8\80\80\80#"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 5-byte sequence contains 3 bytes at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\f8\80\80"                 ;; "\f8\80\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 5-byte sequence contains 3 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\f8\80\80\23"              ;; "\f8\80\80#"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 5-byte sequence contains 2 bytes at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\02\f8\80"                    ;; "\f8\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 5-byte sequence contains 2 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\f8\80\23"                 ;; "\f8\80#"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 5-byte sequence contains 1 byte at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0b"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\01\f8"                       ;; "\f8"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 5-byte sequence contains 1 byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\02\f8\23"                    ;; "\f8#"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 5-byte sequence contents
+
+;; (first) invalid 5-byte prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0f"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\05\f8\80\80\80\80"           ;; "\f8\80\80\80\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; (last) invalid 5-byte prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0f"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\05\fb\bf\bf\bf\bf"           ;; "\fb\bf\bf\bf\bf"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 6-byte sequences
+
+;; 6-byte sequence contains 7 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\11"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\07\fc\80\80\80\80\80\80"     ;; "\fc\80\80\80\80\80\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 6-byte sequence contains 5 bytes at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0f"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\05\fc\80\80\80\80"           ;; "\fc\80\80\80\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 6-byte sequence contains 5 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\10"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\06\fc\80\80\80\80\23"        ;; "\fc\80\80\80\80#"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 6-byte sequence contains 4 bytes at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\fc\80\80\80"              ;; "\fc\80\80\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 6-byte sequence contains 4 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0f"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\05\fc\80\80\80\23"           ;; "\fc\80\80\80#"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 6-byte sequence contains 3 bytes at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\fc\80\80"                 ;; "\fc\80\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 6-byte sequence contains 3 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\fc\80\80\23"              ;; "\fc\80\80#"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 6-byte sequence contains 2 bytes at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\02\fc\80"                    ;; "\fc\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 6-byte sequence contains 2 bytes
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0d"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\03\fc\80\23"                 ;; "\fc\80#"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 6-byte sequence contains 1 byte at end of string
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0b"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\01\fc"                       ;; "\fc"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; 6-byte sequence contains 1 byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\02\fc\23"                    ;; "\fc#"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; 6-byte sequence contents
+
+;; (first) invalid 6-byte prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\10"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\06\fc\80\80\80\80\80"        ;; "\fc\80\80\80\80\80"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; (last) invalid 6-byte prefix
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\10"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\06\fd\bf\bf\bf\bf\bf"        ;; "\fd\bf\bf\bf\bf\bf"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;;;; Miscellaneous invalid bytes
+
+;; invalid byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0b"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\01\fe"                       ;; "\fe"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; invalid byte
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0b"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\01\ff"                       ;; "\ff"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; UTF-16BE BOM
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\02\fe\ff"                    ;; "\fe\ff"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; UTF-32BE BOM
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\00\00\fe\ff"              ;; "\00\00\fe\ff"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; UTF-16LE BOM
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0c"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\02\ff\fe"                    ;; "\ff\fe"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
+;; UTF-32LE BOM
+(assert_malformed
+  (module binary
+    "\00asm" "\01\00\00\00"
+    "\02\0e"                       ;; import section
+    "\01"                          ;; length 1
+    "\04\74\65\73\74"              ;; "test"
+    "\04\ff\fe\00\00"              ;; "\ff\fe\00\00"
+    "\03"                          ;; GlobalImport
+    "\7f"                          ;; i32
+    "\00"                          ;; immutable
+  )
+  "invalid UTF-8 encoding"
+)
+
diff --git a/test/WasmSpec/testsuite/harness/wasm-constants.js b/test/WasmSpec/testsuite/harness/wasm-constants.js
index 9faaefc..9dd4614 100644
--- a/test/WasmSpec/testsuite/harness/wasm-constants.js
+++ b/test/WasmSpec/testsuite/harness/wasm-constants.js
@@ -21,7 +21,7 @@
 var kWasmH2 = 0x73;

 var kWasmH3 = 0x6d;

 

-var kWasmV0 = 1;

+var kWasmV0 = 0x1;

 var kWasmV1 = 0;

 var kWasmV2 = 0;

 var kWasmV3 = 0;

@@ -65,6 +65,11 @@
 let kDataSectionCode = 11;     // Data segments

 let kNameSectionCode = 12;     // Name section (encoded as string)

 

+// Name section types

+let kModuleNameCode = 0;

+let kFunctionNamesCode = 1;

+let kLocalNamesCode = 2;

+

 let kWasmFunctionTypeForm = 0x60;

 let kWasmAnyFunctionTypeForm = 0x70;

 

@@ -339,36 +344,34 @@
 ];

 

 function assertTraps(trap, code) {

-    var threwException = true;

-    try {

-      if (typeof code === 'function') {

-        code();

-      } else {

-        eval(code);

-      }

-      threwException = false;

-    } catch (e) {

-      assertEquals("object", typeof e);

-      assertEquals(kTrapMsgs[trap], e.message);

-      // Success.

-      return;

+  try {

+    if (typeof code === 'function') {

+      code();

+    } else {

+      eval(code);

     }

-    throw new MjsUnitAssertionError("Did not trap, expected: " + kTrapMsgs[trap]);

+  } catch (e) {

+    assertEquals('object', typeof e);

+    assertEquals(kTrapMsgs[trap], e.message);

+    // Success.

+    return;

+  }

+  throw new MjsUnitAssertionError('Did not trap, expected: ' + kTrapMsgs[trap]);

 }

 

 function assertWasmThrows(value, code) {

-    assertEquals("number", typeof(value));

-    try {

-      if (typeof code === 'function') {

-        code();

-      } else {

-        eval(code);

-      }

-    } catch (e) {

-      assertEquals("number", typeof e);

-      assertEquals(value, e);

-      // Success.

-      return;

+  assertEquals('number', typeof value);

+  try {

+    if (typeof code === 'function') {

+      code();

+    } else {

+      eval(code);

     }

-    throw new MjsUnitAssertionError("Did not throw at all, expected: " + value);

+  } catch (e) {

+    assertEquals('number', typeof e);

+    assertEquals(value, e);

+    // Success.

+    return;

+  }

+  throw new MjsUnitAssertionError('Did not throw, expected: ' + value);

 }

diff --git a/test/WasmSpec/testsuite/harness/wasm-module-builder.js b/test/WasmSpec/testsuite/harness/wasm-module-builder.js
index 2e995b4..4acc825 100644
--- a/test/WasmSpec/testsuite/harness/wasm-module-builder.js
+++ b/test/WasmSpec/testsuite/harness/wasm-module-builder.js
@@ -74,7 +74,9 @@
     // Emit section length.

     this.emit_u32v(section.length);

     // Copy the temporary buffer.

-    this.push(...section);

+    for (const sectionByte of section) {

+      this.push(sectionByte);

+    }

   }

 }

 

@@ -97,7 +99,13 @@
   }

 

   addBody(body) {

-    this.body = body;

+    for (let b of body) {

+      if (typeof b != 'number')

+        throw new Error('invalid body (entries have to be numbers): ' + body);

+    }

+    this.body = body.slice();

+    // Automatically add the end for the function block to the body.

+    this.body.push(kExprEnd);

     return this;

   }

 

@@ -107,6 +115,7 @@
   }

 

   end() {

+    this.body.push(kExprEnd);

     return this.module;

   }

 }

@@ -158,6 +167,22 @@
     return this;

   }

 

+  stringToBytes(name) {

+    var result = new Binary();

+    result.emit_u32v(name.length);

+    for (var i = 0; i < name.length; i++) {

+      result.emit_u8(name.charCodeAt(i));

+    }

+    return result;

+  }

+

+  addCustomSection(name, bytes) {

+    name = this.stringToBytes(name);

+    var length = new Binary();

+    length.emit_u32v(name.length + bytes.length);

+    this.explicit.push([0, ...length, ...name, ...bytes]);

+  }

+

   addType(type) {

     // TODO: canonicalize types?

     this.types.push(type);

@@ -225,12 +250,12 @@
     this.exports.push({name: name, kind: kExternalMemory, index: 0});

   }

 

-  addFunctionTableInit(base, is_global, array) {

+  addFunctionTableInit(base, is_global, array, is_import = false) {

     this.function_table_inits.push({base: base, is_global: is_global,

                                     array: array});

     if (!is_global) {

       var length = base + array.length;

-      if (length > this.function_table_length) {

+      if (length > this.function_table_length && !is_import) {

         this.function_table_length = length;

       }

     }

@@ -238,6 +263,10 @@
   }

 

   appendToTable(array) {

+    for (let n of array) {

+      if (typeof n != 'number')

+        throw new Error('invalid table (entries have to be numbers): ' + array);

+    }

     return this.addFunctionTableInit(this.function_table.length, false, array);

   }

 

@@ -305,15 +334,16 @@
     }

 

     // Add functions declarations

-    let has_names = false;

+    let num_function_names = 0;

     let names = false;

     if (wasm.functions.length > 0) {

       if (debug) print("emitting function decls @ " + binary.length);

       binary.emit_section(kFunctionSectionCode, section => {

         section.emit_u32v(wasm.functions.length);

         for (let func of wasm.functions) {

-          has_names = has_names || (func.name != undefined &&

-                                   func.name.length > 0);

+          if (func.name !== undefined) {

+            ++num_function_names;

+          }

           section.emit_u32v(func.type_index);

         }

       });

@@ -332,13 +362,14 @@
     }

 

     // Add memory section

-    if (wasm.memory != undefined) {

+    if (wasm.memory !== undefined) {

       if (debug) print("emitting memory @ " + binary.length);

       binary.emit_section(kMemorySectionCode, section => {

         section.emit_u8(1);  // one memory entry

-        section.emit_u32v(kResizableMaximumFlag);

+        const has_max = wasm.memory.max !== undefined;

+        section.emit_u32v(has_max ? kResizableMaximumFlag : 0);

         section.emit_u32v(wasm.memory.min);

-        section.emit_u32v(wasm.memory.max);

+        if (has_max) section.emit_u32v(wasm.memory.max);

       });

     }

 

@@ -359,7 +390,7 @@
               break;

             case kWasmI64:

               section.emit_u8(kExprI64Const);

-              section.emit_u8(global.init);

+              section.emit_u32v(global.init);

               break;

             case kWasmF32:

               section.emit_u8(kExprF32Const);

@@ -393,7 +424,7 @@
     }

 

     // Add export table.

-    var mem_export = (wasm.memory != undefined && wasm.memory.exp);

+    var mem_export = (wasm.memory !== undefined && wasm.memory.exp);

     var exports_count = wasm.exports.length + (mem_export ? 1 : 0);

     if (exports_count > 0) {

       if (debug) print("emitting exports @ " + binary.length);

@@ -413,7 +444,7 @@
     }

 

     // Add start function section.

-    if (wasm.start_index != undefined) {

+    if (wasm.start_index !== undefined) {

       if (debug) print("emitting start function @ " + binary.length);

       binary.emit_section(kStartSectionCode, section => {

         section.emit_u32v(wasm.start_index);

@@ -426,9 +457,9 @@
       binary.emit_section(kElementSectionCode, section => {

         var inits = wasm.function_table_inits;

         section.emit_u32v(inits.length);

-        section.emit_u8(0); // table index

 

         for (let init of inits) {

+          section.emit_u8(0); // table index

           if (init.is_global) {

             section.emit_u8(kExprGetGlobal);

           } else {

@@ -454,7 +485,7 @@
           // Function body length will be patched later.

           let local_decls = [];

           let l = func.locals;

-          if (l != undefined) {

+          if (l !== undefined) {

             let local_decls_count = 0;

             if (l.i32_count > 0) {

               local_decls.push({count: l.i32_count, type: kWasmI32});

@@ -514,21 +545,18 @@
     }

 

     // Add function names.

-    if (has_names) {

-      if (debug) print("emitting names @ " + binary.length);

+    if (num_function_names > 0) {

+      if (debug) print('emitting names @ ' + binary.length);

       binary.emit_section(kUnknownSectionCode, section => {

-        section.emit_string("name");

-        var count = wasm.functions.length + wasm.num_imported_funcs;

-        section.emit_u32v(count);

-        for (var i = 0; i < wasm.num_imported_funcs; i++) {

-          section.emit_u8(0); // empty string

-          section.emit_u8(0); // local names count == 0

-        }

-        for (let func of wasm.functions) {

-          var name = func.name == undefined ? "" : func.name;

-          section.emit_string(name);

-          section.emit_u8(0);  // local names count == 0

-        }

+        section.emit_string('name');

+        section.emit_section(kFunctionNamesCode, name_section => {

+          name_section.emit_u32v(num_function_names);

+          for (let func of wasm.functions) {

+            if (func.name === undefined) continue;

+            name_section.emit_u32v(func.index);

+            name_section.emit_string(func.name);

+          }

+        });

       });

     }

 

@@ -544,12 +572,12 @@
       if ((typeof val) == "string") val = val.charCodeAt(0);

       view[i] = val | 0;

     }

-    return new Uint8Array(buffer);

+    return buffer;

   }

 

-  instantiate(...args) {

+  instantiate(ffi) {

     let module = new WebAssembly.Module(this.toBuffer());

-    let instance = new WebAssembly.Instance(module, ...args);

+    let instance = new WebAssembly.Instance(module, ffi);

     return instance;

   }

 }

diff --git a/test/WasmSpec/testsuite/harness/wast.js b/test/WasmSpec/testsuite/harness/wast.js
index 375cdac..b68c8c6 100644
--- a/test/WasmSpec/testsuite/harness/wast.js
+++ b/test/WasmSpec/testsuite/harness/wast.js
@@ -23,28 +23,30 @@
   _registry['arrange'] = function() {

     let exports = {};

 //////// start of arrange.js ////////

-// Generated by BUCKLESCRIPT VERSION 1.4.3 , PLEASE EDIT WITH CARE

+// Generated by BUCKLESCRIPT VERSION 1.7.4, PLEASE EDIT WITH CARE

 'use strict';

 

-var F32                     = require("./f32");

-var F64                     = require("./f64");

-var I32                     = require("./i32");

-var I64                     = require("./i64");

-var Lib                     = require("./lib");

-var List                    = require("bs-platform/lib/js/list");

-var Block                   = require("bs-platform/lib/js/block");

-var Curry                   = require("bs-platform/lib/js/curry");

-var Types                   = require("./types");

-var Buffer                  = require("bs-platform/lib/js/buffer");

-var Decode                  = require("./decode");

-var Encode                  = require("./encode");

-var Printf                  = require("bs-platform/lib/js/printf");

-var Source                  = require("./source");

-var $$String                = require("bs-platform/lib/js/string");

-var Values                  = require("./values");

-var Caml_int32              = require("bs-platform/lib/js/caml_int32");

-var Pervasives              = require("bs-platform/lib/js/pervasives");

-var Caml_builtin_exceptions = require("bs-platform/lib/js/caml_builtin_exceptions");

+var F32                     = require("./f32.js");

+var F64                     = require("./f64.js");

+var I32                     = require("./i32.js");

+var I64                     = require("./i64.js");

+var Lib                     = require("./lib.js");

+var Char                    = require("bs-platform/lib/js/char.js");

+var List                    = require("bs-platform/lib/js/list.js");

+var Block                   = require("bs-platform/lib/js/block.js");

+var Curry                   = require("bs-platform/lib/js/curry.js");

+var Parse                   = require("./parse.js");

+var Types                   = require("./types.js");

+var Buffer                  = require("bs-platform/lib/js/buffer.js");

+var Decode                  = require("./decode.js");

+var Encode                  = require("./encode.js");

+var Js_exn                  = require("bs-platform/lib/js/js_exn.js");

+var Printf                  = require("bs-platform/lib/js/printf.js");

+var Source                  = require("./source.js");

+var $$String                = require("bs-platform/lib/js/string.js");

+var Values                  = require("./values.js");

+var Pervasives              = require("bs-platform/lib/js/pervasives.js");

+var Caml_builtin_exceptions = require("bs-platform/lib/js/caml_builtin_exceptions.js");

 

 function add_hex_char(buf, c) {

   return Curry._1(Printf.bprintf(buf, /* Format */[

@@ -65,21 +67,67 @@
 }

 

 function add_char(buf, c) {

-  if (c < /* " " */32 || c >= /* "\127" */127) {

-    return add_hex_char(buf, c);

-  }

-  else {

-    if (c === /* "\"" */34 || c === /* "\\" */92) {

-      Buffer.add_char(buf, /* "\\" */92);

+  var exit = 0;

+  if (c >= 34) {

+    if (c !== 92) {

+      if (c >= 35) {

+        exit = 1;

+      } else {

+        return Buffer.add_string(buf, "\\\"");

+      }

+    } else {

+      return Buffer.add_string(buf, "\\\\");

     }

-    return Buffer.add_char(buf, c);

+  } else if (c !== 9) {

+    if (c !== 10) {

+      exit = 1;

+    } else {

+      return Buffer.add_string(buf, "\\n");

+    }

+  } else {

+    return Buffer.add_string(buf, "\\t");

+  }

+  if (exit === 1) {

+    if (/* " " */32 <= c && c < /* "\127" */127) {

+      return Buffer.add_char(buf, c);

+    } else {

+      return add_hex_char(buf, c);

+    }

+  }

+  

+}

+

+function add_unicode_char(buf, uc) {

+  if (uc === 10 || uc === 9) {

+    return add_char(buf, Char.chr(uc));

+  } else if (32 <= uc && uc < 127) {

+    return add_char(buf, Char.chr(uc));

+  } else {

+    return Curry._1(Printf.bprintf(buf, /* Format */[

+                    /* String_literal */Block.__(11, [

+                        "\\u{",

+                        /* Int */Block.__(4, [

+                            /* Int_x */6,

+                            /* Lit_padding */Block.__(0, [

+                                /* Zeros */2,

+                                2

+                              ]),

+                            /* No_precision */0,

+                            /* Char_literal */Block.__(12, [

+                                /* "}" */125,

+                                /* End_of_format */0

+                              ])

+                          ])

+                      ]),

+                    "\\u{%02x}"

+                  ]), uc);

   }

 }

 

-function string_with(add_char, s) {

-  var buf = Buffer.create(Caml_int32.imul(3, s.length) + 2 | 0);

+function string_with(iter, add_char, s) {

+  var buf = Buffer.create(256);

   Buffer.add_char(buf, /* "\"" */34);

-  $$String.iter(Curry._1(add_char, buf), s);

+  Curry._2(iter, Curry._1(add_char, buf), s);

   Buffer.add_char(buf, /* "\"" */34);

   return Buffer.contents(buf);

 }

@@ -90,20 +138,33 @@
             param[0],

             /* [] */0

           ];

-  }

-  else {

+  } else {

     return /* [] */0;

   }

 }

 

 function break_bytes(s) {

-  var ss = Curry._2(Lib.$$String[/* breakup */0], s, 16);

+  var ss = Curry._2(Lib.$$String[/* breakup */3], s, 16);

   var f = function (param) {

-    return /* Atom */Block.__(0, [string_with(add_hex_char, param)]);

+    return /* Atom */Block.__(0, [string_with($$String.iter, add_hex_char, param)]);

   };

   return List.map(f, ss);

 }

 

+function break_string(s) {

+  var match = Curry._1(Lib.List[/* split_last */5], Curry._2(Lib.$$String[/* split */2], s, /* "\n" */10));

+  var xs = Pervasives.$at(List.map(function (s) {

+            return s + "\n";

+          }, match[0]), /* :: */[

+        match[1],

+        /* [] */0

+      ]);

+  var f = function (param) {

+    return /* Atom */Block.__(0, [string_with($$String.iter, add_char, param)]);

+  };

+  return List.map(f, xs);

+}

+

 function decls(kind, ts) {

   var head = kind;

   var f = function (param) {

@@ -118,8 +179,7 @@
               ]),

             /* [] */0

           ];

-  }

-  else {

+  } else {

     return /* [] */0;

   }

 }

@@ -149,8 +209,7 @@
                 /* [] */0

               ]

             ]);

-  }

-  else {

+  } else {

     return /* Atom */Block.__(0, [Types.string_of_value_type(t)]);

   }

 }

@@ -259,8 +318,8 @@
   throw [

         Caml_builtin_exceptions.assert_failure,

         [

-          "/usr/local/google/home/rossberg/wasm/spec/interpreter/_build/jslib/src/arrange.ml",

-          128,

+          "arrange.ml",

+          137,

           27

         ]

       ];

@@ -426,8 +485,7 @@
 function extension(param) {

   if (param !== 0) {

     return "_u";

-  }

-  else {

+  } else {

     return "_s";

   }

 }

@@ -448,8 +506,7 @@
   if (match) {

     var match$1 = match[0];

     return memop("load" + (mem_size(match$1[0]) + extension(match$1[1])), op);

-  }

-  else {

+  } else {

     return memop("load", op);

   }

 }

@@ -458,8 +515,7 @@
   var match = op[/* sz */3];

   if (match) {

     return memop("store" + mem_size(match[0]), op);

-  }

-  else {

+  } else {

     return memop("store", op);

   }

 }

@@ -521,34 +577,24 @@
           break;

       

     }

-  }

-  else {

+  } else {

     switch (match.tag | 0) {

       case 0 : 

-          var f = function (param) {

-            return /* Atom */Block.__(0, [Types.string_of_value_type(param)]);

-          };

           match$1 = /* tuple */[

             "block",

-            Pervasives.$at(List.map(f, match[0]), List.map(instr, match[1]))

+            Pervasives.$at(decls("result", match[0]), List.map(instr, match[1]))

           ];

           break;

       case 1 : 

-          var f$1 = function (param) {

-            return /* Atom */Block.__(0, [Types.string_of_value_type(param)]);

-          };

           match$1 = /* tuple */[

             "loop",

-            Pervasives.$at(List.map(f$1, match[0]), List.map(instr, match[1]))

+            Pervasives.$at(decls("result", match[0]), List.map(instr, match[1]))

           ];

           break;

       case 2 : 

-          var f$2 = function (param) {

-            return /* Atom */Block.__(0, [Types.string_of_value_type(param)]);

-          };

           match$1 = /* tuple */[

             "if",

-            Pervasives.$at(List.map(f$2, match[0]), /* :: */[

+            Pervasives.$at(decls("result", match[0]), /* :: */[

                   /* Node */Block.__(1, [

                       "then",

                       List.map(instr, match[1])

@@ -769,8 +815,8 @@
           ]);

 }

 

-function import_kind(i, k) {

-  var match = k[/* it */1];

+function import_desc(i, d) {

+  var match = d[/* it */1];

   switch (match.tag | 0) {

     case 0 : 

         return /* Node */Block.__(1, [

@@ -787,9 +833,9 @@
                   ]

                 ]);

     case 1 : 

-        return table(0, i, Source.$at$at(/* record */[/* ttype */match[0]], k[/* at */0]));

+        return table(0, i, Source.$at$at(/* record */[/* ttype */match[0]], d[/* at */0]));

     case 2 : 

-        return memory(0, i, Source.$at$at(/* record */[/* mtype */match[0]], k[/* at */0]));

+        return memory(0, i, Source.$at$at(/* record */[/* mtype */match[0]], d[/* at */0]));

     case 3 : 

         return /* Node */Block.__(1, [

                   "global $" + Curry._1(I32.to_string_u, Curry._1(I32.of_int_u, i)),

@@ -807,11 +853,11 @@
   return /* Node */Block.__(1, [

             "import",

             /* :: */[

-              /* Atom */Block.__(0, [string_with(add_char, match[/* module_name */0])]),

+              /* Atom */Block.__(0, [string_with(List.iter, add_unicode_char, match[/* module_name */0])]),

               /* :: */[

-                /* Atom */Block.__(0, [string_with(add_char, match[/* item_name */1])]),

+                /* Atom */Block.__(0, [string_with(List.iter, add_unicode_char, match[/* item_name */1])]),

                 /* :: */[

-                  import_kind(i, match[/* ikind */2]),

+                  import_desc(i, match[/* idesc */2]),

                   /* [] */0

                 ]

               ]

@@ -819,17 +865,41 @@
           ]);

 }

 

-function export_kind(k) {

-  var match = k[/* it */1];

-  switch (match) {

+function export_desc(d) {

+  var match = d[/* it */1];

+  switch (match.tag | 0) {

     case 0 : 

-        return "func";

+        return /* Node */Block.__(1, [

+                  "func",

+                  /* :: */[

+                    /* Atom */Block.__(0, [Curry._1(I32.to_string_u, match[0][/* it */1])]),

+                    /* [] */0

+                  ]

+                ]);

     case 1 : 

-        return "table";

+        return /* Node */Block.__(1, [

+                  "table",

+                  /* :: */[

+                    /* Atom */Block.__(0, [Curry._1(I32.to_string_u, match[0][/* it */1])]),

+                    /* [] */0

+                  ]

+                ]);

     case 2 : 

-        return "memory";

+        return /* Node */Block.__(1, [

+                  "memory",

+                  /* :: */[

+                    /* Atom */Block.__(0, [Curry._1(I32.to_string_u, match[0][/* it */1])]),

+                    /* [] */0

+                  ]

+                ]);

     case 3 : 

-        return "global";

+        return /* Node */Block.__(1, [

+                  "global",

+                  /* :: */[

+                    /* Atom */Block.__(0, [Curry._1(I32.to_string_u, match[0][/* it */1])]),

+                    /* [] */0

+                  ]

+                ]);

     

   }

 }

@@ -839,15 +909,9 @@
   return /* Node */Block.__(1, [

             "export",

             /* :: */[

-              /* Atom */Block.__(0, [string_with(add_char, match[/* name */0])]),

+              /* Atom */Block.__(0, [string_with(List.iter, add_unicode_char, match[/* name */0])]),

               /* :: */[

-                /* Node */Block.__(1, [

-                    export_kind(match[/* ekind */1]),

-                    /* :: */[

-                      /* Atom */Block.__(0, [Curry._1(I32.to_string_u, match[/* item */2][/* it */1])]),

-                      /* [] */0

-                    ]

-                  ]),

+                export_desc(match[/* edesc */1]),

                 /* [] */0

               ]

             ]

@@ -857,48 +921,43 @@
 function var_opt(param) {

   if (param) {

     return " " + param[0][/* it */1];

-  }

-  else {

+  } else {

     return "";

   }

 }

 

 function is_func_import(im) {

-  var match = im[/* it */1][/* ikind */2][/* it */1];

+  var match = im[/* it */1][/* idesc */2][/* it */1];

   if (match.tag) {

     return /* false */0;

-  }

-  else {

+  } else {

     return /* true */1;

   }

 }

 

 function is_table_import(im) {

-  var match = im[/* it */1][/* ikind */2][/* it */1];

+  var match = im[/* it */1][/* idesc */2][/* it */1];

   if (match.tag === 1) {

     return /* true */1;

-  }

-  else {

+  } else {

     return /* false */0;

   }

 }

 

 function is_memory_import(im) {

-  var match = im[/* it */1][/* ikind */2][/* it */1];

+  var match = im[/* it */1][/* idesc */2][/* it */1];

   if (match.tag === 2) {

     return /* true */1;

-  }

-  else {

+  } else {

     return /* false */0;

   }

 }

 

 function is_global_import(im) {

-  var match = im[/* it */1][/* ikind */2][/* it */1];

+  var match = im[/* it */1][/* idesc */2][/* it */1];

   if (match.tag === 3) {

     return /* true */1;

-  }

-  else {

+  } else {

     return /* false */0;

   }

 }

@@ -944,6 +1003,13 @@
           ]);

 }

 

+function quoted_module_with_var_opt(x_opt, s) {

+  return /* Node */Block.__(1, [

+            "module" + (var_opt(x_opt) + " quote"),

+            break_string(s)

+          ]);

+}

+

 function module_(param) {

   return module_with_var_opt(/* None */0, param);

 }

@@ -976,34 +1042,87 @@
 }

 

 function definition(mode, x_opt, def) {

-  var match = def[/* it */1];

-  var exit = 0;

-  exit = mode !== 564146209 && !(mode >= 983167089 && match.tag) ? 1 : 2;

-  switch (exit) {

-    case 1 : 

-        var match$1 = def[/* it */1];

-        var m;

-        m = match$1.tag ? Decode.decode("", match$1[1]) : match$1[0];

-        return module_with_var_opt(x_opt, m);

-    case 2 : 

-        var match$2 = def[/* it */1];

-        var bs;

-        bs = match$2.tag ? match$2[1] : Encode.encode(match$2[0]);

-        var x_opt$1 = x_opt;

-        var bs$1 = bs;

-        return /* Node */Block.__(1, [

-                  "module" + var_opt(x_opt$1),

-                  break_bytes(bs$1)

-                ]);

-    

+  try {

+    var match = def[/* it */1];

+    var exit = 0;

+    if (mode !== 564146209) {

+      if (mode >= 983167089) {

+        switch (match.tag | 0) {

+          case 0 : 

+              exit = 1;

+              break;

+          case 1 : 

+              exit = 2;

+              break;

+          case 2 : 

+              return quoted_module_with_var_opt(x_opt, match[1]);

+          

+        }

+      } else {

+        exit = 1;

+      }

+    } else {

+      exit = 2;

+    }

+    switch (exit) {

+      case 1 : 

+          var unquote = function (_def) {

+            while(true) {

+              var def = _def;

+              var match = def[/* it */1];

+              switch (match.tag | 0) {

+                case 0 : 

+                    return match[0];

+                case 1 : 

+                    return Decode.decode("", match[1]);

+                case 2 : 

+                    _def = Parse.string_to_module(match[1]);

+                    continue ;

+                    

+              }

+            };

+          };

+          return module_with_var_opt(x_opt, unquote(def));

+      case 2 : 

+          var unquote$1 = function (_bs) {

+            while(true) {

+              var match = def[/* it */1];

+              switch (match.tag | 0) {

+                case 0 : 

+                    return Encode.encode(match[0]);

+                case 1 : 

+                    return match[1];

+                case 2 : 

+                    _bs = Parse.string_to_module(match[1]);

+                    continue ;

+                    

+              }

+            };

+          };

+          var x_opt$1 = x_opt;

+          var bs = unquote$1(def);

+          return /* Node */Block.__(1, [

+                    "module" + (var_opt(x_opt$1) + " binary"),

+                    break_bytes(bs)

+                  ]);

+      

+    }

+  }

+  catch (raw_exn){

+    var exn = Js_exn.internalToOCamlException(raw_exn);

+    if (exn[0] === Parse.Syntax) {

+      return quoted_module_with_var_opt(x_opt, "<invalid module>");

+    } else {

+      throw exn;

+    }

   }

 }

 

-function access(x_opt, name) {

+function access(x_opt, n) {

   return $$String.concat(" ", /* :: */[

               var_opt(x_opt),

               /* :: */[

-                string_with(add_char, name),

+                string_with(List.iter, add_unicode_char, n),

                 /* [] */0

               ]

             ]);

@@ -1016,8 +1135,7 @@
               "get" + access(match[0], match[1]),

               /* [] */0

             ]);

-  }

-  else {

+  } else {

     return /* Node */Block.__(1, [

               "invoke" + access(match[0], match[1]),

               List.map(literal, match[2])

@@ -1035,7 +1153,7 @@
                     return definition(mode$1, match[0], match[1]);

                 case 1 : 

                     return /* Node */Block.__(1, [

-                              "register " + (string_with(add_char, match[0]) + var_opt(match[1])),

+                              "register " + (string_with(List.iter, add_unicode_char, match[0]) + var_opt(match[1])),

                               /* [] */0

                             ]);

                 case 2 : 

@@ -1051,7 +1169,7 @@
                                     /* :: */[

                                       definition(/* Original */983167089, /* None */0, match$1[0]),

                                       /* :: */[

-                                        /* Atom */Block.__(0, [string_with(add_char, match$1[1])]),

+                                        /* Atom */Block.__(0, [string_with($$String.iter, add_char, match$1[1])]),

                                         /* [] */0

                                       ]

                                     ]

@@ -1062,55 +1180,52 @@
                                     /* :: */[

                                       definition(mode$2, /* None */0, match$1[0]),

                                       /* :: */[

-                                        /* Atom */Block.__(0, [string_with(add_char, match$1[1])]),

+                                        /* Atom */Block.__(0, [string_with($$String.iter, add_char, match$1[1])]),

                                         /* [] */0

                                       ]

                                     ]

                                   ]);

                       case 2 : 

                           return /* Node */Block.__(1, [

-                                    "assert_soft_invalid",

+                                    "assert_unlinkable",

                                     /* :: */[

                                       definition(mode$2, /* None */0, match$1[0]),

                                       /* :: */[

-                                        /* Atom */Block.__(0, [string_with(add_char, match$1[1])]),

+                                        /* Atom */Block.__(0, [string_with($$String.iter, add_char, match$1[1])]),

                                         /* [] */0

                                       ]

                                     ]

                                   ]);

                       case 3 : 

                           return /* Node */Block.__(1, [

-                                    "assert_unlinkable",

+                                    "assert_trap",

                                     /* :: */[

                                       definition(mode$2, /* None */0, match$1[0]),

                                       /* :: */[

-                                        /* Atom */Block.__(0, [string_with(add_char, match$1[1])]),

+                                        /* Atom */Block.__(0, [string_with($$String.iter, add_char, match$1[1])]),

                                         /* [] */0

                                       ]

                                     ]

                                   ]);

                       case 4 : 

                           return /* Node */Block.__(1, [

-                                    "assert_trap",

-                                    /* :: */[

-                                      definition(mode$2, /* None */0, match$1[0]),

-                                      /* :: */[

-                                        /* Atom */Block.__(0, [string_with(add_char, match$1[1])]),

-                                        /* [] */0

-                                      ]

-                                    ]

-                                  ]);

-                      case 5 : 

-                          return /* Node */Block.__(1, [

                                     "assert_return",

                                     /* :: */[

                                       action(match$1[0]),

                                       List.map(literal, match$1[1])

                                     ]

                                   ]);

+                      case 5 : 

+                          return /* Node */Block.__(1, [

+                                    "assert_return_canonical_nan",

+                                    /* :: */[

+                                      action(match$1[0]),

+                                      /* [] */0

+                                    ]

+                                  ]);

                       case 6 : 

                           return /* Node */Block.__(1, [

-                                    "assert_return_nan",

+                                    "assert_return_arithmetic_nan",

                                     /* :: */[

                                       action(match$1[0]),

                                       /* [] */0

@@ -1122,7 +1237,7 @@
                                     /* :: */[

                                       action(match$1[0]),

                                       /* :: */[

-                                        /* Atom */Block.__(0, [string_with(add_char, match$1[1])]),

+                                        /* Atom */Block.__(0, [string_with($$String.iter, add_char, match$1[1])]),

                                         /* [] */0

                                       ]

                                     ]

@@ -1133,7 +1248,7 @@
                                     /* :: */[

                                       action(match$1[0]),

                                       /* :: */[

-                                        /* Atom */Block.__(0, [string_with(add_char, match$1[1])]),

+                                        /* Atom */Block.__(0, [string_with($$String.iter, add_char, match$1[1])]),

                                         /* [] */0

                                       ]

                                     ]

@@ -1144,8 +1259,8 @@
                     throw [

                           Caml_builtin_exceptions.assert_failure,

                           [

-                            "/usr/local/google/home/rossberg/wasm/spec/interpreter/_build/jslib/src/arrange.ml",

-                            435,

+                            "arrange.ml",

+                            452,

                             14

                           ]

                         ];

@@ -1169,10 +1284,11 @@
 //////// start of array.js ////////

 'use strict';

 

-var Curry                   = require("./curry");

-var Caml_array              = require("./caml_array");

-var Caml_exceptions         = require("./caml_exceptions");

-var Caml_builtin_exceptions = require("./caml_builtin_exceptions");

+var Curry                   = require("./curry.js");

+var Js_exn                  = require("./js_exn.js");

+var Caml_array              = require("./caml_array.js");

+var Caml_exceptions         = require("./caml_exceptions.js");

+var Caml_builtin_exceptions = require("./caml_builtin_exceptions.js");

 

 function init(l, f) {

   if (l) {

@@ -1181,16 +1297,14 @@
             Caml_builtin_exceptions.invalid_argument,

             "Array.init"

           ];

-    }

-    else {

+    } else {

       var res = Caml_array.caml_make_vect(l, Curry._1(f, 0));

       for(var i = 1 ,i_finish = l - 1 | 0; i <= i_finish; ++i){

         res[i] = Curry._1(f, i);

       }

       return res;

     }

-  }

-  else {

+  } else {

     return /* array */[];

   }

 }

@@ -1207,8 +1321,7 @@
   var l = a.length;

   if (l) {

     return Caml_array.caml_array_sub(a, 0, l);

-  }

-  else {

+  } else {

     return /* array */[];

   }

 }

@@ -1218,12 +1331,10 @@
   if (l1) {

     if (a2.length) {

       return a1.concat(a2);

-    }

-    else {

+    } else {

       return Caml_array.caml_array_sub(a1, 0, l1);

     }

-  }

-  else {

+  } else {

     return copy(a2);

   }

 }

@@ -1234,8 +1345,7 @@
           Caml_builtin_exceptions.invalid_argument,

           "Array.sub"

         ];

-  }

-  else {

+  } else {

     return Caml_array.caml_array_sub(a, ofs, len);

   }

 }

@@ -1246,8 +1356,7 @@
           Caml_builtin_exceptions.invalid_argument,

           "Array.fill"

         ];

-  }

-  else {

+  } else {

     for(var i = ofs ,i_finish = (ofs + len | 0) - 1 | 0; i <= i_finish; ++i){

       a[i] = v;

     }

@@ -1261,8 +1370,7 @@
           Caml_builtin_exceptions.invalid_argument,

           "Array.blit"

         ];

-  }

-  else {

+  } else {

     return Caml_array.caml_array_blit(a1, ofs1, a2, ofs2, len);

   }

 }

@@ -1282,8 +1390,7 @@
       r[i] = Curry._1(f, a[i]);

     }

     return r;

-  }

-  else {

+  } else {

     return /* array */[];

   }

 }

@@ -1303,8 +1410,7 @@
       r[i] = Curry._2(f, i, a[i]);

     }

     return r;

-  }

-  else {

+  } else {

     return /* array */[];

   }

 }

@@ -1317,8 +1423,7 @@
     var i = _i;

     if (i < 0) {

       return res;

-    }

-    else {

+    } else {

       _res = /* :: */[

         a[i],

         res

@@ -1339,8 +1444,7 @@
       _accu = accu + 1 | 0;

       continue ;

       

-    }

-    else {

+    } else {

       return accu;

     }

   };

@@ -1360,13 +1464,11 @@
         _i = i + 1 | 0;

         continue ;

         

-      }

-      else {

+      } else {

         return a;

       }

     };

-  }

-  else {

+  } else {

     return /* array */[];

   }

 }

@@ -1394,21 +1496,18 @@
     var i31 = ((i + i | 0) + i | 0) + 1 | 0;

     var x = i31;

     if ((i31 + 2 | 0) < l) {

-      if (Curry._2(cmp, a[i31], a[i31 + 1 | 0]) < 0) {

+      if (Curry._2(cmp, Caml_array.caml_array_get(a, i31), Caml_array.caml_array_get(a, i31 + 1 | 0)) < 0) {

         x = i31 + 1 | 0;

       }

-      if (Curry._2(cmp, a[x], a[i31 + 2 | 0]) < 0) {

+      if (Curry._2(cmp, Caml_array.caml_array_get(a, x), Caml_array.caml_array_get(a, i31 + 2 | 0)) < 0) {

         x = i31 + 2 | 0;

       }

       return x;

-    }

-    else if ((i31 + 1 | 0) < l && Curry._2(cmp, a[i31], a[i31 + 1 | 0]) < 0) {

+    } else if ((i31 + 1 | 0) < l && Curry._2(cmp, Caml_array.caml_array_get(a, i31), Caml_array.caml_array_get(a, i31 + 1 | 0)) < 0) {

       return i31 + 1 | 0;

-    }

-    else if (i31 < l) {

+    } else if (i31 < l) {

       return i31;

-    }

-    else {

+    } else {

       throw [

             Bottom,

             i

@@ -1423,24 +1522,21 @@
       while(true) {

         var i$1 = _i;

         var j = maxson(l$1, i$1);

-        if (Curry._2(cmp, a[j], e$1) > 0) {

-          a[i$1] = a[j];

+        if (Curry._2(cmp, Caml_array.caml_array_get(a, j), e$1) > 0) {

+          Caml_array.caml_array_set(a, i$1, Caml_array.caml_array_get(a, j));

           _i = j;

           continue ;

           

-        }

-        else {

-          a[i$1] = e$1;

-          return /* () */0;

+        } else {

+          return Caml_array.caml_array_set(a, i$1, e$1);

         }

       };

     }

-    catch (exn){

+    catch (raw_exn){

+      var exn = Js_exn.internalToOCamlException(raw_exn);

       if (exn[0] === Bottom) {

-        a[exn[1]] = e;

-        return /* () */0;

-      }

-      else {

+        return Caml_array.caml_array_set(a, exn[1], e);

+      } else {

         throw exn;

       }

     }

@@ -1452,17 +1548,17 @@
       while(true) {

         var i$1 = _i;

         var j = maxson(l$1, i$1);

-        a[i$1] = a[j];

+        Caml_array.caml_array_set(a, i$1, Caml_array.caml_array_get(a, j));

         _i = j;

         continue ;

         

       };

     }

-    catch (exn){

+    catch (raw_exn){

+      var exn = Js_exn.internalToOCamlException(raw_exn);

       if (exn[0] === Bottom) {

         return exn[1];

-      }

-      else {

+      } else {

         throw exn;

       }

     }

@@ -1481,40 +1577,34 @@
               ]

             ];

       }

-      if (Curry._2(cmp, a[father], e) < 0) {

-        a[i] = a[father];

+      if (Curry._2(cmp, Caml_array.caml_array_get(a, father), e) < 0) {

+        Caml_array.caml_array_set(a, i, Caml_array.caml_array_get(a, father));

         if (father > 0) {

           _i = father;

           continue ;

           

+        } else {

+          return Caml_array.caml_array_set(a, 0, e);

         }

-        else {

-          a[0] = e;

-          return /* () */0;

-        }

-      }

-      else {

-        a[i] = e;

-        return /* () */0;

+      } else {

+        return Caml_array.caml_array_set(a, i, e);

       }

     };

   };

   var l = a.length;

   for(var i = ((l + 1 | 0) / 3 | 0) - 1 | 0; i >= 0; --i){

-    trickle(l, i, a[i]);

+    trickle(l, i, Caml_array.caml_array_get(a, i));

   }

   for(var i$1 = l - 1 | 0; i$1 >= 2; --i$1){

-    var e = a[i$1];

-    a[i$1] = a[0];

+    var e = Caml_array.caml_array_get(a, i$1);

+    Caml_array.caml_array_set(a, i$1, Caml_array.caml_array_get(a, 0));

     trickleup(bubble(i$1, 0), e);

   }

   if (l > 1) {

-    var e$1 = a[1];

-    a[1] = a[0];

-    a[0] = e$1;

-    return /* () */0;

-  }

-  else {

+    var e$1 = Caml_array.caml_array_get(a, 1);

+    Caml_array.caml_array_set(a, 1, Caml_array.caml_array_get(a, 0));

+    return Caml_array.caml_array_set(a, 0, e$1);

+  } else {

     return 0;

   }

 }

@@ -1524,9 +1614,9 @@
     var src1r = src1ofs + src1len | 0;

     var src2r = src2ofs + src2len | 0;

     var _i1 = src1ofs;

-    var _s1 = a[src1ofs];

+    var _s1 = Caml_array.caml_array_get(a, src1ofs);

     var _i2 = src2ofs;

-    var _s2 = src2[src2ofs];

+    var _s2 = Caml_array.caml_array_get(src2, src2ofs);

     var _d = dstofs;

     while(true) {

       var d = _d;

@@ -1535,30 +1625,27 @@
       var s1 = _s1;

       var i1 = _i1;

       if (Curry._2(cmp, s1, s2) <= 0) {

-        dst[d] = s1;

+        Caml_array.caml_array_set(dst, d, s1);

         var i1$1 = i1 + 1 | 0;

         if (i1$1 < src1r) {

           _d = d + 1 | 0;

-          _s1 = a[i1$1];

+          _s1 = Caml_array.caml_array_get(a, i1$1);

           _i1 = i1$1;

           continue ;

           

-        }

-        else {

+        } else {

           return blit(src2, i2, dst, d + 1 | 0, src2r - i2 | 0);

         }

-      }

-      else {

-        dst[d] = s2;

+      } else {

+        Caml_array.caml_array_set(dst, d, s2);

         var i2$1 = i2 + 1 | 0;

         if (i2$1 < src2r) {

           _d = d + 1 | 0;

-          _s2 = src2[i2$1];

+          _s2 = Caml_array.caml_array_get(src2, i2$1);

           _i2 = i2$1;

           continue ;

           

-        }

-        else {

+        } else {

           return blit(a, i1, dst, d + 1 | 0, src1r - i1 | 0);

         }

       }

@@ -1566,21 +1653,20 @@
   };

   var isortto = function (srcofs, dst, dstofs, len) {

     for(var i = 0 ,i_finish = len - 1 | 0; i <= i_finish; ++i){

-      var e = a[srcofs + i | 0];

+      var e = Caml_array.caml_array_get(a, srcofs + i | 0);

       var j = (dstofs + i | 0) - 1 | 0;

-      while(j >= dstofs && Curry._2(cmp, dst[j], e) > 0) {

-        dst[j + 1 | 0] = dst[j];

+      while(j >= dstofs && Curry._2(cmp, Caml_array.caml_array_get(dst, j), e) > 0) {

+        Caml_array.caml_array_set(dst, j + 1 | 0, Caml_array.caml_array_get(dst, j));

         j = j - 1 | 0;

       };

-      dst[j + 1 | 0] = e;

+      Caml_array.caml_array_set(dst, j + 1 | 0, e);

     }

     return /* () */0;

   };

   var sortto = function (srcofs, dst, dstofs, len) {

     if (len <= 5) {

       return isortto(srcofs, dst, dstofs, len);

-    }

-    else {

+    } else {

       var l1 = len / 2 | 0;

       var l2 = len - l1 | 0;

       sortto(srcofs + l1 | 0, dst, dstofs + l1 | 0, l2);

@@ -1591,11 +1677,10 @@
   var l = a.length;

   if (l <= 5) {

     return isortto(0, a, 0, l);

-  }

-  else {

+  } else {

     var l1 = l / 2 | 0;

     var l2 = l - l1 | 0;

-    var t = Caml_array.caml_make_vect(l2, a[0]);

+    var t = Caml_array.caml_make_vect(l2, Caml_array.caml_array_get(a, 0));

     sortto(l1, t, 0, l2);

     sortto(0, a, l2, l1);

     return merge(l2, l1, t, 0, l2, a, 0);

@@ -1637,35 +1722,26 @@
   _registry['ast'] = function() {

     let exports = {};

 //////// start of ast.js ////////

-// Generated by BUCKLESCRIPT VERSION 1.4.3 , PLEASE EDIT WITH CARE

+// Generated by BUCKLESCRIPT VERSION 1.7.4, PLEASE EDIT WITH CARE

 'use strict';

 

-var Lib      = require("./lib");

-var Block    = require("bs-platform/lib/js/block");

-var Curry    = require("bs-platform/lib/js/curry");

-var Caml_obj = require("bs-platform/lib/js/caml_obj");

+var Lib        = require("./lib.js");

+var Char       = require("bs-platform/lib/js/char.js");

+var List       = require("bs-platform/lib/js/list.js");

+var Block      = require("bs-platform/lib/js/block.js");

+var Curry      = require("bs-platform/lib/js/curry.js");

+var Types      = require("./types.js");

+var Buffer     = require("bs-platform/lib/js/buffer.js");

+var Printf     = require("bs-platform/lib/js/printf.js");

+var Pervasives = require("bs-platform/lib/js/pervasives.js");

 

 var IntOp = /* module */[];

 

 var FloatOp = /* module */[];

 

-function export_kind_of_import_kind(param) {

-  switch (param.tag | 0) {

-    case 0 : 

-        return /* FuncExport */0;

-    case 1 : 

-        return /* TableExport */1;

-    case 2 : 

-        return /* MemoryExport */2;

-    case 3 : 

-        return /* GlobalExport */3;

-    

-  }

-}

-

 function import_type(m, im) {

   var match = im[/* it */1];

-  var match$1 = match[/* ikind */2][/* it */1];

+  var match$1 = match[/* idesc */2][/* it */1];

   switch (match$1.tag | 0) {

     case 0 : 

         return /* ExternalFuncType */Block.__(0, [Curry._2(Lib.List32[/* nth */1], m[/* it */1][/* types */0], match$1[0][/* it */1])]);

@@ -1681,47 +1757,67 @@
 

 function export_type(m, ex) {

   var match = ex[/* it */1];

-  var ekind = match[/* ekind */1];

-  var _i = match[/* item */2][/* it */1];

-  var _param = m[/* it */1][/* imports */8];

-  while(true) {

-    var param = _param;

-    var i = _i;

-    if (param) {

-      var ims = param[1];

-      var im = param[0];

-      if (Caml_obj.caml_equal(export_kind_of_import_kind(im[/* it */1][/* ikind */2][/* it */1]), ekind[/* it */1])) {

-        if (i) {

-          _param = ims;

-          _i = i - 1 | 0;

-          continue ;

-          

-        }

-        else {

-          return import_type(m, im);

-        }

+  var its = List.map(function (param) {

+        return import_type(m, param);

+      }, m[/* it */1][/* imports */8]);

+  var match$1 = match[/* edesc */1][/* it */1];

+  switch (match$1.tag | 0) {

+    case 0 : 

+        var fts = Pervasives.$at(Types.funcs(its), List.map(function (f) {

+                  return Curry._2(Lib.List32[/* nth */1], m[/* it */1][/* types */0], f[/* it */1][/* ftype */0][/* it */1]);

+                }, m[/* it */1][/* funcs */4]));

+        return /* ExternalFuncType */Block.__(0, [Curry._2(Lib.List32[/* nth */1], fts, match$1[0][/* it */1])]);

+    case 1 : 

+        var tts = Pervasives.$at(Types.tables(its), List.map(function (t) {

+                  return t[/* it */1][/* ttype */0];

+                }, m[/* it */1][/* tables */2]));

+        return /* ExternalTableType */Block.__(1, [Curry._2(Lib.List32[/* nth */1], tts, match$1[0][/* it */1])]);

+    case 2 : 

+        var mts = Pervasives.$at(Types.memories(its), List.map(function (m) {

+                  return m[/* it */1][/* mtype */0];

+                }, m[/* it */1][/* memories */3]));

+        return /* ExternalMemoryType */Block.__(2, [Curry._2(Lib.List32[/* nth */1], mts, match$1[0][/* it */1])]);

+    case 3 : 

+        var gts = Pervasives.$at(Types.globals(its), List.map(function (g) {

+                  return g[/* it */1][/* gtype */0];

+                }, m[/* it */1][/* globals */1]));

+        return /* ExternalGlobalType */Block.__(3, [Curry._2(Lib.List32[/* nth */1], gts, match$1[0][/* it */1])]);

+    

+  }

+}

+

+function string_of_name(n) {

+  var b = Buffer.create(16);

+  var $$escape = function (uc) {

+    if (uc < 32 || uc >= 127) {

+      return Buffer.add_string(b, Curry._1(Printf.sprintf(/* Format */[

+                          /* String_literal */Block.__(11, [

+                              "\\u{",

+                              /* Int */Block.__(4, [

+                                  /* Int_x */6,

+                                  /* Lit_padding */Block.__(0, [

+                                      /* Zeros */2,

+                                      2

+                                    ]),

+                                  /* No_precision */0,

+                                  /* Char_literal */Block.__(12, [

+                                      /* "}" */125,

+                                      /* End_of_format */0

+                                    ])

+                                ])

+                            ]),

+                          "\\u{%02x}"

+                        ]), uc));

+    } else {

+      var c = Char.chr(uc);

+      if (c === /* "\"" */34 || c === /* "\\" */92) {

+        Buffer.add_char(b, /* "\\" */92);

       }

-      else {

-        _param = ims;

-        continue ;

-        

-      }

-    }

-    else {

-      var match$1 = ekind[/* it */1];

-      switch (match$1) {

-        case 0 : 

-            return /* ExternalFuncType */Block.__(0, [Curry._2(Lib.List32[/* nth */1], m[/* it */1][/* types */0], Curry._2(Lib.List32[/* nth */1], m[/* it */1][/* funcs */4], i)[/* it */1][/* ftype */0][/* it */1])]);

-        case 1 : 

-            return /* ExternalTableType */Block.__(1, [Curry._2(Lib.List32[/* nth */1], m[/* it */1][/* tables */2], i)[/* it */1][/* ttype */0]]);

-        case 2 : 

-            return /* ExternalMemoryType */Block.__(2, [Curry._2(Lib.List32[/* nth */1], m[/* it */1][/* memories */3], i)[/* it */1][/* mtype */0]]);

-        case 3 : 

-            return /* ExternalGlobalType */Block.__(3, [Curry._2(Lib.List32[/* nth */1], m[/* it */1][/* globals */1], i)[/* it */1][/* gtype */0]]);

-        

-      }

+      return Buffer.add_char(b, c);

     }

   };

+  List.iter($$escape, n);

+  return Buffer.contents(b);

 }

 

 var I32Op = 0;

@@ -1745,16 +1841,16 @@
   /* exports : [] */0

 ];

 

-exports.IntOp                      = IntOp;

-exports.FloatOp                    = FloatOp;

-exports.I32Op                      = I32Op;

-exports.I64Op                      = I64Op;

-exports.F32Op                      = F32Op;

-exports.F64Op                      = F64Op;

-exports.empty_module               = empty_module;

-exports.export_kind_of_import_kind = export_kind_of_import_kind;

-exports.import_type                = import_type;

-exports.export_type                = export_type;

+exports.IntOp          = IntOp;

+exports.FloatOp        = FloatOp;

+exports.I32Op          = I32Op;

+exports.I64Op          = I64Op;

+exports.F32Op          = F32Op;

+exports.F64Op          = F64Op;

+exports.empty_module   = empty_module;

+exports.import_type    = import_type;

+exports.export_type    = export_type;

+exports.string_of_name = string_of_name;

 /* Lib Not a pure module */

 //////// end of ast.js ////////

     return exports;

@@ -1766,18 +1862,15 @@
 //////// start of bigarray.js ////////

 'use strict';

 

-var Caml_array              = require("./caml_array");

-var Caml_builtin_exceptions = require("./caml_builtin_exceptions");

+var Caml_array              = require("./caml_array.js");

+var Caml_missing_polyfill   = require("./caml_missing_polyfill.js");

+var Caml_builtin_exceptions = require("./caml_builtin_exceptions.js");

 

 function dims() {

-  var n = function () {

-      throw "caml_ba_num_dims not implemented by bucklescript yet\n";

-    }();

+  var n = Caml_missing_polyfill.not_implemented("caml_ba_num_dims not implemented by bucklescript yet\n");

   var d = Caml_array.caml_make_vect(n, 0);

   for(var i = 0 ,i_finish = n - 1 | 0; i <= i_finish; ++i){

-    d[i] = function () {

-        throw "caml_ba_dim not implemented by bucklescript yet\n";

-      }();

+    Caml_array.caml_array_set(d, i, Caml_missing_polyfill.not_implemented("caml_ba_dim not implemented by bucklescript yet\n"));

   }

   return d;

 }

@@ -1787,9 +1880,7 @@
       /* hi */0,

       /* lo */0

     ];

-  return function () {

-            throw "caml_ba_map_file_bytecode not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ba_map_file_bytecode not implemented by bucklescript yet\n");

 }

 

 var Genarray = /* module */[

@@ -1798,18 +1889,14 @@
 ];

 

 function create(_, _$1, _$2) {

-  return function () {

-            throw "caml_ba_create not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ba_create not implemented by bucklescript yet\n");

 }

 

 function of_array(kind, layout, data) {

   var ba = create(kind, layout, data.length);

   layout !== 0 ? 1 : 0;

   for(var i = 0 ,i_finish = data.length - 1 | 0; i <= i_finish; ++i){

-    (function () {

-          throw "caml_ba_set_1 not implemented by bucklescript yet\n";

-        }());

+    Caml_missing_polyfill.not_implemented("caml_ba_set_1 not implemented by bucklescript yet\n");

   }

   return ba;

 }

@@ -1825,30 +1912,24 @@
 ];

 

 function create$1(_, _$1, _$2, _$3) {

-  return function () {

-            throw "caml_ba_create not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ba_create not implemented by bucklescript yet\n");

 }

 

 function slice_left(_, _$1) {

-  return function () {

-            throw "caml_ba_slice not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ba_slice not implemented by bucklescript yet\n");

 }

 

 function slice_right(_, _$1) {

-  return function () {

-            throw "caml_ba_slice not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ba_slice not implemented by bucklescript yet\n");

 }

 

 function of_array$1(kind, layout, data) {

   var dim1 = data.length;

-  var dim2 = dim1 ? data[0].length : 0;

+  var dim2 = dim1 ? Caml_array.caml_array_get(data, 0).length : 0;

   var ba = create$1(kind, layout, dim1, dim2);

   layout !== 0 ? 1 : 0;

   for(var i = 0 ,i_finish = dim1 - 1 | 0; i <= i_finish; ++i){

-    var row = data[i];

+    var row = Caml_array.caml_array_get(data, i);

     if (row.length !== dim2) {

       throw [

             Caml_builtin_exceptions.invalid_argument,

@@ -1856,9 +1937,7 @@
           ];

     }

     for(var j = 0 ,j_finish = dim2 - 1 | 0; j <= j_finish; ++j){

-      (function () {

-            throw "caml_ba_set_2 not implemented by bucklescript yet\n";

-          }());

+      Caml_missing_polyfill.not_implemented("caml_ba_set_2 not implemented by bucklescript yet\n");

     }

   }

   return ba;

@@ -1880,43 +1959,33 @@
 ];

 

 function create$2(_, _$1, _$2, _$3, _$4) {

-  return function () {

-            throw "caml_ba_create not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ba_create not implemented by bucklescript yet\n");

 }

 

 function slice_left_1(_, _$1, _$2) {

-  return function () {

-            throw "caml_ba_slice not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ba_slice not implemented by bucklescript yet\n");

 }

 

 function slice_right_1(_, _$1, _$2) {

-  return function () {

-            throw "caml_ba_slice not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ba_slice not implemented by bucklescript yet\n");

 }

 

 function slice_left_2(_, _$1) {

-  return function () {

-            throw "caml_ba_slice not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ba_slice not implemented by bucklescript yet\n");

 }

 

 function slice_right_2(_, _$1) {

-  return function () {

-            throw "caml_ba_slice not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ba_slice not implemented by bucklescript yet\n");

 }

 

 function of_array$2(kind, layout, data) {

   var dim1 = data.length;

-  var dim2 = dim1 ? data[0].length : 0;

-  var dim3 = dim2 ? data[0][0].length : 0;

+  var dim2 = dim1 ? Caml_array.caml_array_get(data, 0).length : 0;

+  var dim3 = dim2 ? Caml_array.caml_array_get(Caml_array.caml_array_get(data, 0), 0).length : 0;

   var ba = create$2(kind, layout, dim1, dim2, dim3);

   layout !== 0 ? 1 : 0;

   for(var i = 0 ,i_finish = dim1 - 1 | 0; i <= i_finish; ++i){

-    var row = data[i];

+    var row = Caml_array.caml_array_get(data, i);

     if (row.length !== dim2) {

       throw [

             Caml_builtin_exceptions.invalid_argument,

@@ -1924,7 +1993,7 @@
           ];

     }

     for(var j = 0 ,j_finish = dim2 - 1 | 0; j <= j_finish; ++j){

-      var col = row[j];

+      var col = Caml_array.caml_array_get(row, j);

       if (col.length !== dim3) {

         throw [

               Caml_builtin_exceptions.invalid_argument,

@@ -1932,9 +2001,7 @@
             ];

       }

       for(var k = 0 ,k_finish = dim3 - 1 | 0; k <= k_finish; ++k){

-        (function () {

-              throw "caml_ba_set_3 not implemented by bucklescript yet\n";

-            }());

+        Caml_missing_polyfill.not_implemented("caml_ba_set_3 not implemented by bucklescript yet\n");

       }

     }

   }

@@ -1960,12 +2027,9 @@
 ];

 

 function array1_of_genarray(a) {

-  if (function () {

-        throw "caml_ba_num_dims not implemented by bucklescript yet\n";

-      }() === 1) {

+  if (Caml_missing_polyfill.not_implemented("caml_ba_num_dims not implemented by bucklescript yet\n") === 1) {

     return a;

-  }

-  else {

+  } else {

     throw [

           Caml_builtin_exceptions.invalid_argument,

           "Bigarray.array1_of_genarray"

@@ -1974,12 +2038,9 @@
 }

 

 function array2_of_genarray(a) {

-  if (function () {

-        throw "caml_ba_num_dims not implemented by bucklescript yet\n";

-      }() === 2) {

+  if (Caml_missing_polyfill.not_implemented("caml_ba_num_dims not implemented by bucklescript yet\n") === 2) {

     return a;

-  }

-  else {

+  } else {

     throw [

           Caml_builtin_exceptions.invalid_argument,

           "Bigarray.array2_of_genarray"

@@ -1988,12 +2049,9 @@
 }

 

 function array3_of_genarray(a) {

-  if (function () {

-        throw "caml_ba_num_dims not implemented by bucklescript yet\n";

-      }() === 3) {

+  if (Caml_missing_polyfill.not_implemented("caml_ba_num_dims not implemented by bucklescript yet\n") === 3) {

     return a;

-  }

-  else {

+  } else {

     throw [

           Caml_builtin_exceptions.invalid_argument,

           "Bigarray.array3_of_genarray"

@@ -2002,21 +2060,15 @@
 }

 

 function reshape_1(_, _$1) {

-  return function () {

-            throw "caml_ba_reshape not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ba_reshape not implemented by bucklescript yet\n");

 }

 

 function reshape_2(_, _$1, _$2) {

-  return function () {

-            throw "caml_ba_reshape not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ba_reshape not implemented by bucklescript yet\n");

 }

 

 function reshape_3(_, _$1, _$2, _$3) {

-  return function () {

-            throw "caml_ba_reshape not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ba_reshape not implemented by bucklescript yet\n");

 }

 

 var float32 = /* Float32 */0;

@@ -2050,9 +2102,7 @@
 var fortran_layout = /* Fortran_layout */1;

 

 function reshape(_, _$1) {

-  return function () {

-            throw "caml_ba_reshape not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ba_reshape not implemented by bucklescript yet\n");

 }

 

 exports.float32            = float32;

@@ -2110,13 +2160,13 @@
 //////// start of buffer.js ////////

 'use strict';

 

-var Sys                     = require("./sys");

-var Bytes                   = require("./bytes");

-var Curry                   = require("./curry");

-var $$String                = require("./string");

-var Pervasives              = require("./pervasives");

-var Caml_string             = require("./caml_string");

-var Caml_builtin_exceptions = require("./caml_builtin_exceptions");

+var Sys                     = require("./sys.js");

+var Bytes                   = require("./bytes.js");

+var Curry                   = require("./curry.js");

+var $$String                = require("./string.js");

+var Pervasives              = require("./pervasives.js");

+var Caml_string             = require("./caml_string.js");

+var Caml_builtin_exceptions = require("./caml_builtin_exceptions.js");

 

 function create(n) {

   var n$1 = n < 1 ? 1 : n;

@@ -2144,8 +2194,7 @@
           Caml_builtin_exceptions.invalid_argument,

           "Buffer.sub"

         ];

-  }

-  else {

+  } else {

     return Bytes.sub_string(b[/* buffer */0], ofs, len);

   }

 }

@@ -2156,8 +2205,7 @@
           Caml_builtin_exceptions.invalid_argument,

           "Buffer.blit"

         ];

-  }

-  else {

+  } else {

     return Bytes.blit(src[/* buffer */0], srcoff, dst, dstoff, len);

   }

 }

@@ -2168,8 +2216,7 @@
           Caml_builtin_exceptions.invalid_argument,

           "Buffer.nth"

         ];

-  }

-  else {

+  } else {

     return b[/* buffer */0][ofs];

   }

 }

@@ -2199,8 +2246,7 @@
   if (new_len > Sys.max_string_length) {

     if ((b[/* position */1] + more | 0) <= Sys.max_string_length) {

       new_len = Sys.max_string_length;

-    }

-    else {

+    } else {

       throw [

             Caml_builtin_exceptions.failure,

             "Buffer.add: cannot grow buffer"

@@ -2293,12 +2339,10 @@
               9

             ]

           ];

-    }

-    else {

+    } else {

       return /* "}" */125;

     }

-  }

-  else {

+  } else {

     return /* ")" */41;

   }

 }

@@ -2312,25 +2356,21 @@
     var k$1 = _k;

     if (i >= lim) {

       throw Caml_builtin_exceptions.not_found;

-    }

-    else if (Caml_string.get(s, i) === opening) {

+    } else if (Caml_string.get(s, i) === opening) {

       _i = i + 1 | 0;

       _k = k$1 + 1 | 0;

       continue ;

       

-    }

-    else if (Caml_string.get(s, i) === closing) {

+    } else if (Caml_string.get(s, i) === closing) {

       if (k$1) {

         _i = i + 1 | 0;

         _k = k$1 - 1 | 0;

         continue ;

         

-      }

-      else {

+      } else {

         return i;

       }

-    }

-    else {

+    } else {

       _i = i + 1 | 0;

       continue ;

       

@@ -2345,38 +2385,30 @@
     var i = _i;

     if (i >= lim) {

       return lim;

-    }

-    else {

+    } else {

       var match = Caml_string.get(s, i);

       var exit = 0;

       if (match >= 91) {

         if (match >= 97) {

           if (match >= 123) {

             return i;

-          }

-          else {

+          } else {

             exit = 1;

           }

-        }

-        else if (match !== 95) {

+        } else if (match !== 95) {

           return i;

-        }

-        else {

+        } else {

           exit = 1;

         }

-      }

-      else if (match >= 58) {

+      } else if (match >= 58) {

         if (match >= 65) {

           exit = 1;

-        }

-        else {

+        } else {

           return i;

         }

-      }

-      else if (match >= 48) {

+      } else if (match >= 48) {

         exit = 1;

-      }

-      else {

+      } else {

         return i;

       }

       if (exit === 1) {

@@ -2392,8 +2424,7 @@
 function find_ident(s, start, lim) {

   if (start >= lim) {

     throw Caml_builtin_exceptions.not_found;

-  }

-  else {

+  } else {

     var c = Caml_string.get(s, start);

     var exit = 0;

     if (c !== 40) {

@@ -2403,12 +2434,10 @@
                 $$String.sub(s, start, stop - start | 0),

                 stop

               ];

-      }

-      else {

+      } else {

         exit = 1;

       }

-    }

-    else {

+    } else {

       exit = 1;

     }

     if (exit === 1) {

@@ -2440,29 +2469,25 @@
           _previous = /* " " */32;

           continue ;

           

-        }

-        else if (current !== 92) {

+        } else if (current !== 92) {

           add_char(b, current);

           _i = i + 1 | 0;

           _previous = current;

           continue ;

           

-        }

-        else {

+        } else {

           _i = i + 1 | 0;

           _previous = current;

           continue ;

           

         }

-      }

-      else if (previous === /* "\\" */92) {

+      } else if (previous === /* "\\" */92) {

         add_char(b, current);

         _i = i + 1 | 0;

         _previous = /* " " */32;

         continue ;

         

-      }

-      else {

+      } else {

         var j = i + 1 | 0;

         var match = find_ident(s, j, lim);

         add_string(b, Curry._1(f, match[0]));

@@ -2471,11 +2496,9 @@
         continue ;

         

       }

-    }

-    else if (previous === /* "\\" */92) {

+    } else if (previous === /* "\\" */92) {

       return add_char(b, previous);

-    }

-    else {

+    } else {

       return 0;

     }

   };

@@ -2510,14 +2533,14 @@
 //////// start of bytes.js ////////

 'use strict';

 

-var Char                    = require("./char");

-var List                    = require("./list");

-var Curry                   = require("./curry");

-var Caml_obj                = require("./caml_obj");

-var Caml_int32              = require("./caml_int32");

-var Pervasives              = require("./pervasives");

-var Caml_string             = require("./caml_string");

-var Caml_builtin_exceptions = require("./caml_builtin_exceptions");

+var Char                    = require("./char.js");

+var List                    = require("./list.js");

+var Curry                   = require("./curry.js");

+var Caml_obj                = require("./caml_obj.js");

+var Caml_int32              = require("./caml_int32.js");

+var Pervasives              = require("./pervasives.js");

+var Caml_string             = require("./caml_string.js");

+var Caml_builtin_exceptions = require("./caml_builtin_exceptions.js");

 

 function make(n, c) {

   var s = Caml_string.caml_create_string(n);

@@ -2556,8 +2579,7 @@
           Caml_builtin_exceptions.invalid_argument,

           "String.sub / Bytes.sub"

         ];

-  }

-  else {

+  } else {

     var r = Caml_string.caml_create_string(len);

     Caml_string.caml_blit_bytes(s, ofs, r, 0, len);

     return r;

@@ -2593,8 +2615,7 @@
           Caml_builtin_exceptions.invalid_argument,

           "String.fill / Bytes.fill"

         ];

-  }

-  else {

+  } else {

     return Caml_string.caml_fill_string(s, ofs, len, c);

   }

 }

@@ -2605,8 +2626,7 @@
           Caml_builtin_exceptions.invalid_argument,

           "Bytes.blit"

         ];

-  }

-  else {

+  } else {

     return Caml_string.caml_blit_bytes(s1, ofs1, s2, ofs2, len);

   }

 }

@@ -2617,8 +2637,7 @@
           Caml_builtin_exceptions.invalid_argument,

           "String.blit / Bytes.blit_string"

         ];

-  }

-  else {

+  } else {

     return Caml_string.caml_blit_string(s1, ofs1, s2, ofs2, len);

   }

 }

@@ -2658,8 +2677,7 @@
           return /* () */0;

         }, l[1]);

     return r;

-  }

-  else {

+  } else {

     return empty;

   }

 }

@@ -2673,15 +2691,12 @@
   if (switcher > 4 || switcher < 0) {

     if (switcher !== 23) {

       return /* false */0;

-    }

-    else {

+    } else {

       return /* true */1;

     }

-  }

-  else if (switcher !== 2) {

+  } else if (switcher !== 2) {

     return /* true */1;

-  }

-  else {

+  } else {

     return /* false */0;

   }

 }

@@ -2698,8 +2713,7 @@
   };

   if (j >= i) {

     return sub(s, i, (j - i | 0) + 1 | 0);

-  }

-  else {

+  } else {

     return empty;

   }

 }

@@ -2716,8 +2730,7 @@
         ) : (

           switcher > 57 || switcher < 1 ? 2 : 1

         );

-    }

-    else {

+    } else {

       $js = match >= 11 ? (

           match !== 13 ? 4 : 2

         ) : (

@@ -2728,8 +2741,7 @@
   }

   if (n === s.length) {

     return copy(s);

-  }

-  else {

+  } else {

     var s$prime = Caml_string.caml_create_string(n);

     n = 0;

     for(var i$1 = 0 ,i_finish$1 = s.length - 1 | 0; i$1 <= i_finish$1; ++i$1){

@@ -2739,27 +2751,21 @@
         if (c !== 92) {

           if (c >= 127) {

             exit = 1;

-          }

-          else {

+          } else {

             s$prime[n] = c;

           }

-        }

-        else {

+        } else {

           exit = 2;

         }

-      }

-      else if (c >= 32) {

+      } else if (c >= 32) {

         if (c >= 34) {

           exit = 2;

-        }

-        else {

+        } else {

           s$prime[n] = c;

         }

-      }

-      else if (c >= 14) {

+      } else if (c >= 14) {

         exit = 1;

-      }

-      else {

+      } else {

         switch (c) {

           case 8 : 

               s$prime[n] = /* "\\" */92;

@@ -2827,8 +2833,7 @@
       r[i] = Curry._1(f, s[i]);

     }

     return r;

-  }

-  else {

+  } else {

     return s;

   }

 }

@@ -2841,8 +2846,7 @@
       r[i] = Curry._2(f, i, s[i]);

     }

     return r;

-  }

-  else {

+  } else {

     return s;

   }

 }

@@ -2860,8 +2864,7 @@
     var r = copy(s);

     r[0] = Curry._1(f, s[0]);

     return r;

-  }

-  else {

+  } else {

     return s;

   }

 }

@@ -2879,11 +2882,9 @@
     var i = _i;

     if (i >= lim) {

       throw Caml_builtin_exceptions.not_found;

-    }

-    else if (s[i] === c) {

+    } else if (s[i] === c) {

       return i;

-    }

-    else {

+    } else {

       _i = i + 1 | 0;

       continue ;

       

@@ -2902,8 +2903,7 @@
           Caml_builtin_exceptions.invalid_argument,

           "String.index_from / Bytes.index_from"

         ];

-  }

-  else {

+  } else {

     return index_rec(s, l, i, c);

   }

 }

@@ -2913,11 +2913,9 @@
     var i = _i;

     if (i < 0) {

       throw Caml_builtin_exceptions.not_found;

-    }

-    else if (s[i] === c) {

+    } else if (s[i] === c) {

       return i;

-    }

-    else {

+    } else {

       _i = i - 1 | 0;

       continue ;

       

@@ -2935,8 +2933,7 @@
           Caml_builtin_exceptions.invalid_argument,

           "String.rindex_from / Bytes.rindex_from"

         ];

-  }

-  else {

+  } else {

     return rindex_rec(s, i, c);

   }

 }

@@ -2948,8 +2945,7 @@
           Caml_builtin_exceptions.invalid_argument,

           "String.contains_from / Bytes.contains_from"

         ];

-  }

-  else {

+  } else {

     try {

       index_rec(s, l, i, c);

       return /* true */1;

@@ -2957,8 +2953,7 @@
     catch (exn){

       if (exn === Caml_builtin_exceptions.not_found) {

         return /* false */0;

-      }

-      else {

+      } else {

         throw exn;

       }

     }

@@ -2975,8 +2970,7 @@
           Caml_builtin_exceptions.invalid_argument,

           "String.rcontains_from / Bytes.rcontains_from"

         ];

-  }

-  else {

+  } else {

     try {

       rindex_rec(s, i, c);

       return /* true */1;

@@ -2984,8 +2978,7 @@
     catch (exn){

       if (exn === Caml_builtin_exceptions.not_found) {

         return /* false */0;

-      }

-      else {

+      } else {

         throw exn;

       }

     }

@@ -3043,6 +3036,7 @@
 //////// start of caml_array.js ////////

 'use strict';

 

+var Caml_builtin_exceptions = require("./caml_builtin_exceptions.js");

 

 function caml_array_sub(x, offset, len) {

   var result = new Array(len);

@@ -3065,8 +3059,7 @@
       _acc = l[0].length + acc | 0;

       continue ;

       

-    }

-    else {

+    } else {

       return acc;

     }

   };

@@ -3090,8 +3083,7 @@
       _i = k;

       continue ;

       

-    }

-    else {

+    } else {

       return /* () */0;

     }

   };

@@ -3104,6 +3096,29 @@
   return result;

 }

 

+function caml_array_set(xs, index, newval) {

+  if (index < 0 || index >= xs.length) {

+    throw [

+          Caml_builtin_exceptions.invalid_argument,

+          "index out of bounds"

+        ];

+  } else {

+    xs[index] = newval;

+    return /* () */0;

+  }

+}

+

+function caml_array_get(xs, index) {

+  if (index < 0 || index >= xs.length) {

+    throw [

+          Caml_builtin_exceptions.invalid_argument,

+          "index out of bounds"

+        ];

+  } else {

+    return xs[index];

+  }

+}

+

 function caml_make_vect(len, init) {

   var b = new Array(len);

   for(var i = 0 ,i_finish = len - 1 | 0; i <= i_finish; ++i){

@@ -3118,8 +3133,7 @@
       a2[j + i2 | 0] = a1[j + i1 | 0];

     }

     return /* () */0;

-  }

-  else {

+  } else {

     for(var j$1 = len - 1 | 0; j$1 >= 0; --j$1){

       a2[j$1 + i2 | 0] = a1[j$1 + i1 | 0];

     }

@@ -3131,6 +3145,8 @@
 exports.caml_array_concat = caml_array_concat;

 exports.caml_make_vect    = caml_make_vect;

 exports.caml_array_blit   = caml_array_blit;

+exports.caml_array_get    = caml_array_get;

+exports.caml_array_set    = caml_array_set;

 /* No side effect */

 //////// end of caml_array.js ////////

     return exports;

@@ -3203,6 +3219,30 @@
   -11

 ];

 

+out_of_memory.tag = 248;

+

+sys_error.tag = 248;

+

+failure.tag = 248;

+

+invalid_argument.tag = 248;

+

+end_of_file.tag = 248;

+

+division_by_zero.tag = 248;

+

+not_found.tag = 248;

+

+match_failure.tag = 248;

+

+stack_overflow.tag = 248;

+

+sys_blocked_io.tag = 248;

+

+assert_failure.tag = 248;

+

+undefined_recursive_module.tag = 248;

+

 exports.out_of_memory              = out_of_memory;

 exports.sys_error                  = sys_error;

 exports.failure                    = failure;

@@ -3215,7 +3255,7 @@
 exports.sys_blocked_io             = sys_blocked_io;

 exports.assert_failure             = assert_failure;

 exports.undefined_recursive_module = undefined_recursive_module;

-/* No side effect */

+/*  Not a pure module */

 //////// end of caml_builtin_exceptions.js ////////

     return exports;

   };

@@ -3226,7 +3266,7 @@
 //////// start of caml_bytes.js ////////

 'use strict';

 

-var Caml_builtin_exceptions = require("./caml_builtin_exceptions");

+var Caml_builtin_exceptions = require("./caml_builtin_exceptions.js");

 

 function get(s, i) {

   if (i < 0 || i >= s.length) {

@@ -3234,8 +3274,7 @@
           Caml_builtin_exceptions.invalid_argument,

           "index out of bounds"

         ];

-  }

-  else {

+  } else {

     return s[i];

   }

 }

@@ -3276,9 +3315,25 @@
   return v;

 }

 

-exports.caml_set_oo_id = caml_set_oo_id;

-exports.get_id         = get_id;

-exports.create         = create;

+function isCamlExceptionOrOpenVariant(e) {

+  if (e === undefined) {

+    return /* false */0;

+  } else if (e.tag === 248) {

+    return /* true */1;

+  } else {

+    var slot = e[0];

+    if (slot !== undefined) {

+      return +(slot.tag === 248);

+    } else {

+      return /* false */0;

+    }

+  }

+}

+

+exports.caml_set_oo_id               = caml_set_oo_id;

+exports.get_id                       = get_id;

+exports.create                       = create;

+exports.isCamlExceptionOrOpenVariant = isCamlExceptionOrOpenVariant;

 /* No side effect */

 //////// end of caml_exceptions.js ////////

     return exports;

@@ -3306,18 +3361,14 @@
   if (isFinite(x)) {

     if (Math.abs(x) >= 2.2250738585072014e-308) {

       return /* FP_normal */0;

-    }

-    else if (x !== 0) {

+    } else if (x !== 0) {

       return /* FP_subnormal */1;

-    }

-    else {

+    } else {

       return /* FP_zero */2;

     }

-  }

-  else if (isNaN(x)) {

+  } else if (isNaN(x)) {

     return /* FP_nan */4;

-  }

-  else {

+  } else {

     return /* FP_infinite */3;

   }

 }

@@ -3333,21 +3384,18 @@
               -f,

               -i

             ];

-    }

-    else {

+    } else {

       return /* tuple */[

               f,

               i

             ];

     }

-  }

-  else if (isNaN(x)) {

+  } else if (isNaN(x)) {

     return /* tuple */[

             NaN,

             NaN

           ];

-  }

-  else {

+  } else {

     return /* tuple */[

             1 / x,

             x

@@ -3355,51 +3403,61 @@
   }

 }

 

-var caml_ldexp_float = ( function (x,exp) {

-    exp |= 0;

-    if (exp > 1023) {

-        exp -= 1023;

-        x *= Math.pow(2, 1023);

-        if (exp > 1023) {  // in case x is subnormal

-            exp -= 1023;

-            x *= Math.pow(2, 1023);

-        }

+function caml_ldexp_float(x, exp) {

+  var match_000 = [x];

+  var match_001 = [exp];

+  var exp$prime = match_001;

+  var x$prime = match_000;

+  if (exp$prime[0] > 1023) {

+    exp$prime[0] -= 1023;

+    x$prime[0] = x$prime[0] * Math.pow(2, 1023);

+    if (exp$prime[0] > 1023) {

+      exp$prime[0] -= 1023;

+      x$prime[0] = x$prime[0] * Math.pow(2, 1023);

     }

-    if (exp < -1023) {

-        exp += 1023;

-        x *= Math.pow(2, -1023);

-    }

-    x *= Math.pow(2, exp);

-    return x;

+    

+  } else if (exp$prime[0] < -1023) {

+    exp$prime[0] += 1023;

+    x$prime[0] = x$prime[0] * Math.pow(2, -1023);

+  }

+  return x$prime[0] * Math.pow(2, exp$prime[0]);

 }

-);

 

-var caml_frexp_float = (function (x) {

-    if ((x == 0) || !isFinite(x)) return [ x, 0];

-    var neg = x < 0;

-    if (neg) x = - x;

-    var exp = Math.floor(Math.LOG2E*Math.log(x)) + 1;

-    x *= Math.pow(2,-exp);

-    if (x < 0.5) { x *= 2; exp -= 1; }

-    if (neg) x = - x;

-    return [x, exp];

+function caml_frexp_float(x) {

+  if (x === 0 || !isFinite(x)) {

+    return /* tuple */[

+            x,

+            0

+          ];

+  } else {

+    var neg = +(x < 0);

+    var x$prime = Math.abs(x);

+    var exp = Math.floor(Math.LOG2E * Math.log(x$prime)) + 1;

+    x$prime = x$prime * Math.pow(2, -exp);

+    if (x$prime < 0.5) {

+      x$prime = x$prime * 2;

+      exp -= 1;

+    }

+    if (neg) {

+      x$prime = -x$prime;

+    }

+    return /* tuple */[

+            x$prime,

+            exp | 0

+          ];

+  }

 }

-);

 

 function caml_float_compare(x, y) {

   if (x === y) {

     return 0;

-  }

-  else if (x < y) {

+  } else if (x < y) {

     return -1;

-  }

-  else if (x > y || x === x) {

+  } else if (x > y || x === x) {

     return 1;

-  }

-  else if (y === y) {

+  } else if (y === y) {

     return -1;

-  }

-  else {

+  } else {

     return 0;

   }

 }

@@ -3409,8 +3467,7 @@
   var y$1 = y === 0 ? 1 / y : y;

   if (y$1 < 0) {

     return -x$1;

-  }

-  else {

+  } else {

     return x$1;

   }

 }

@@ -3420,25 +3477,28 @@
   var z = y - 1;

   if (Math.abs(x) > 1) {

     return z;

-  }

-  else if (z === 0) {

+  } else if (z === 0) {

     return x;

-  }

-  else {

+  } else {

     return x * z / Math.log(y);

   }

 }

 

-var caml_hypot_float = ( function (x, y) {

-    var x0 = Math.abs(x), y0 = Math.abs(y);

-    var a = Math.max(x0, y0), b = Math.min(x0,y0) / (a?a:1);

-    return a * Math.sqrt(1 + b*b);

+function caml_hypot_float(x, y) {

+  var match_000 = Math.abs(x);

+  var match_001 = Math.abs(y);

+  var y0 = match_001;

+  var x0 = match_000;

+  var a = Math.max(x0, y0);

+  var b = Math.min(x0, y0) / (

+    a !== 0 ? a : 1

+  );

+  return a * Math.sqrt(1 + b * b);

 }

-);

 

-var caml_log10_float = ( function  (x) { 

-   return Math.LOG10E * Math.log(x); }

-);

+function caml_log10_float(x) {

+  return Math.LOG10E * Math.log(x);

+}

 

 exports.caml_int32_float_of_bits = caml_int32_float_of_bits;

 exports.caml_int32_bits_of_float = caml_int32_bits_of_float;

@@ -3451,7 +3511,7 @@
 exports.caml_expm1_float         = caml_expm1_float;

 exports.caml_hypot_float         = caml_hypot_float;

 exports.caml_log10_float         = caml_log10_float;

-/* caml_ldexp_float Not a pure module */

+/* No side effect */

 //////// end of caml_float.js ////////

     return exports;

   };

@@ -3462,12 +3522,11 @@
 //////// start of caml_format.js ////////

 'use strict';

 

-var Curry                   = require("./curry");

-var Caml_int32              = require("./caml_int32");

-var Caml_int64              = require("./caml_int64");

-var Caml_utils              = require("./caml_utils");

-var Caml_string             = require("./caml_string");

-var Caml_builtin_exceptions = require("./caml_builtin_exceptions");

+var Curry                   = require("./curry.js");

+var Caml_int32              = require("./caml_int32.js");

+var Caml_int64              = require("./caml_int64.js");

+var Caml_utils              = require("./caml_utils.js");

+var Caml_builtin_exceptions = require("./caml_builtin_exceptions.js");

 

 function caml_failwith(s) {

   throw [

@@ -3481,22 +3540,17 @@
     if (c >= 97) {

       if (c >= 123) {

         return -1;

-      }

-      else {

+      } else {

         return c - 87 | 0;

       }

-    }

-    else if (c >= 91) {

+    } else if (c >= 91) {

       return -1;

-    }

-    else {

+    } else {

       return c - 55 | 0;

     }

-  }

-  else if (c > 57 || c < 48) {

+  } else if (c > 57 || c < 48) {

     return -1;

-  }

-  else {

+  } else {

     return c - /* "0" */48 | 0;

   }

 }

@@ -3534,31 +3588,26 @@
             i = i + 2 | 0;

           }

           

-        }

-        else {

+        } else {

           base = /* Oct */0;

           i = i + 2 | 0;

         }

-      }

-      else {

+      } else {

         base = /* Bin */3;

         i = i + 2 | 0;

       }

-    }

-    else if (match$1 !== 66) {

+    } else if (match$1 !== 66) {

       if (match$1 !== 79) {

         if (match$1 >= 88) {

           base = /* Hex */1;

           i = i + 2 | 0;

         }

         

-      }

-      else {

+      } else {

         base = /* Oct */0;

         i = i + 2 | 0;

       }

-    }

-    else {

+    } else {

       base = /* Bin */3;

       i = i + 2 | 0;

     }

@@ -3590,31 +3639,27 @@
       var acc = _acc;

       if (k === len) {

         return acc;

-      }

-      else {

+      } else {

         var a = s.charCodeAt(k);

         if (a === /* "_" */95) {

           _k = k + 1 | 0;

           continue ;

           

-        }

-        else {

+        } else {

           var v = parse_digit(a);

           if (v < 0 || v >= base) {

             throw [

                   Caml_builtin_exceptions.failure,

                   "int_of_string"

                 ];

-          }

-          else {

+          } else {

             var acc$1 = base * acc + v;

             if (acc$1 > threshold) {

               throw [

                     Caml_builtin_exceptions.failure,

                     "int_of_string"

                   ];

-            }

-            else {

+            } else {

               _k = k + 1 | 0;

               _acc = acc$1;

               continue ;

@@ -3688,51 +3733,38 @@
       var acc = _acc;

       if (k === len) {

         return acc;

-      }

-      else {

+      } else {

         var a = s.charCodeAt(k);

         if (a === /* "_" */95) {

           _k = k + 1 | 0;

           continue ;

           

-        }

-        else {

+        } else {

           var v = Caml_int64.of_int32(parse_digit(a));

           if (Caml_int64.lt(v, /* int64 */[

                   /* hi */0,

                   /* lo */0

-                ]) || Caml_int64.ge(v, base)) {

+                ]) || Caml_int64.ge(v, base) || Caml_int64.gt(acc, threshold)) {

             throw [

                   Caml_builtin_exceptions.failure,

                   "int64_of_string"

                 ];

-          }

-          else {

+          } else {

             var acc$1 = Caml_int64.add(Caml_int64.mul(base, acc), v);

-            if (Caml_int64.gt(acc$1, threshold)) {

-              throw [

-                    Caml_builtin_exceptions.failure,

-                    "int64_of_string"

-                  ];

-            }

-            else {

-              _k = k + 1 | 0;

-              _acc = acc$1;

-              continue ;

-              

-            }

+            _k = k + 1 | 0;

+            _acc = acc$1;

+            continue ;

+            

           }

         }

       }

     };

   };

   var res = Caml_int64.mul(sign, aux(d, i + 1 | 0));

-  var or_res_000 = /* hi */res[0] | /* hi */0;

-  var or_res_001 = /* lo */(res[1] >>> 0);

-  var or_res = /* int64 */[

-    or_res_000,

-    or_res_001

-  ];

+  var or_res = Caml_int64.or_(res, /* int64 */[

+        /* hi */0,

+        /* lo */0

+      ]);

   if (Caml_int64.eq(base, /* int64 */[

           /* hi */0,

           /* lo */10

@@ -3760,8 +3792,7 @@
 function lowercase(c) {

   if (c >= /* "A" */65 && c <= /* "Z" */90 || c >= /* "\192" */192 && c <= /* "\214" */214 || c >= /* "\216" */216 && c <= /* "\222" */222) {

     return c + 32 | 0;

-  }

-  else {

+  } else {

     return c;

   }

 }

@@ -3792,16 +3823,14 @@
     var i = _i;

     if (i >= len) {

       return f;

-    }

-    else {

+    } else {

       var c = fmt.charCodeAt(i);

       var exit = 0;

       if (c >= 69) {

         if (c >= 88) {

           if (c >= 121) {

             exit = 1;

-          }

-          else {

+          } else {

             switch (c - 88 | 0) {

               case 0 : 

                   f[/* base */4] = /* Hex */1;

@@ -3858,11 +3887,9 @@
                   

             }

           }

-        }

-        else if (c >= 72) {

+        } else if (c >= 72) {

           exit = 1;

-        }

-        else {

+        } else {

           f[/* signedconv */5] = /* true */1;

           f[/* uppercase */7] = /* true */1;

           f[/* conv */10] = String.fromCharCode(lowercase(c));

@@ -3870,13 +3897,11 @@
           continue ;

           

         }

-      }

-      else {

+      } else {

         var switcher = c - 32 | 0;

         if (switcher > 25 || switcher < 0) {

           exit = 1;

-        }

-        else {

+        } else {

           switch (switcher) {

             case 3 : 

                 f[/* alternate */3] = /* true */1;

@@ -3994,8 +4019,7 @@
         len = len + 2 | 0;

       }

       

-    }

-    else {

+    } else {

       len = len + 1 | 0;

     }

   }

@@ -4008,8 +4032,7 @@
   if (signedconv) {

     if (sign < 0) {

       buffer = buffer + "-";

-    }

-    else if (signstyle !== "-") {

+    } else if (signstyle !== "-") {

       buffer = buffer + signstyle;

     }

     

@@ -4036,9 +4059,8 @@
 

 function caml_format_int(fmt, i) {

   if (fmt === "%d") {

-    return "" + i;

-  }

-  else {

+    return String(i);

+  } else {

     var f = parse_format(fmt);

     var f$1 = f;

     var i$1 = i;

@@ -4084,7 +4106,7 @@
                 /* lo */0

               ], match$1[0]);

           var modulus = match$1[1];

-          s = Caml_string.js_string_of_char(cvtbl.charCodeAt(modulus[1] | 0)) + s;

+          s = String.fromCharCode(cvtbl.charCodeAt(modulus[1] | 0)) + s;

           while(Caml_int64.neq(quotient, /* int64 */[

                   /* hi */0,

                   /* lo */0

@@ -4092,14 +4114,13 @@
             var match$2 = Caml_int64.div_mod(quotient, wbase);

             quotient = match$2[0];

             modulus = match$2[1];

-            s = Caml_string.js_string_of_char(cvtbl.charCodeAt(modulus[1] | 0)) + s;

+            s = String.fromCharCode(cvtbl.charCodeAt(modulus[1] | 0)) + s;

           };

-        }

-        else {

+        } else {

           var match$3 = Caml_int64.div_mod(x$1, wbase);

           var quotient$1 = match$3[0];

           var modulus$1 = match$3[1];

-          s = Caml_string.js_string_of_char(cvtbl.charCodeAt(modulus$1[1] | 0)) + s;

+          s = String.fromCharCode(cvtbl.charCodeAt(modulus$1[1] | 0)) + s;

           while(Caml_int64.neq(quotient$1, /* int64 */[

                   /* hi */0,

                   /* lo */0

@@ -4107,7 +4128,7 @@
             var match$4 = Caml_int64.div_mod(quotient$1, wbase);

             quotient$1 = match$4[0];

             modulus$1 = match$4[1];

-            s = Caml_string.js_string_of_char(cvtbl.charCodeAt(modulus$1[1] | 0)) + s;

+            s = String.fromCharCode(cvtbl.charCodeAt(modulus$1[1] | 0)) + s;

           };

         }

         break;

@@ -4135,7 +4156,7 @@
                     /* lo */3435973836

                   ], match$5[0]), match$6[0]);

           var modulus$2 = match$6[1];

-          s = Caml_string.js_string_of_char(cvtbl$1.charCodeAt(modulus$2[1] | 0)) + s;

+          s = String.fromCharCode(cvtbl$1.charCodeAt(modulus$2[1] | 0)) + s;

           while(Caml_int64.neq(quotient$2, /* int64 */[

                   /* hi */0,

                   /* lo */0

@@ -4143,14 +4164,13 @@
             var match$7 = Caml_int64.div_mod(quotient$2, wbase$1);

             quotient$2 = match$7[0];

             modulus$2 = match$7[1];

-            s = Caml_string.js_string_of_char(cvtbl$1.charCodeAt(modulus$2[1] | 0)) + s;

+            s = String.fromCharCode(cvtbl$1.charCodeAt(modulus$2[1] | 0)) + s;

           };

-        }

-        else {

+        } else {

           var match$8 = Caml_int64.div_mod(x$1, wbase$1);

           var quotient$3 = match$8[0];

           var modulus$3 = match$8[1];

-          s = Caml_string.js_string_of_char(cvtbl$1.charCodeAt(modulus$3[1] | 0)) + s;

+          s = String.fromCharCode(cvtbl$1.charCodeAt(modulus$3[1] | 0)) + s;

           while(Caml_int64.neq(quotient$3, /* int64 */[

                   /* hi */0,

                   /* lo */0

@@ -4158,7 +4178,7 @@
             var match$9 = Caml_int64.div_mod(quotient$3, wbase$1);

             quotient$3 = match$9[0];

             modulus$3 = match$9[1];

-            s = Caml_string.js_string_of_char(cvtbl$1.charCodeAt(modulus$3[1] | 0)) + s;

+            s = String.fromCharCode(cvtbl$1.charCodeAt(modulus$3[1] | 0)) + s;

           };

         }

         break;

@@ -4183,8 +4203,7 @@
   if (isNaN(x$1)) {

     s = "nan";

     f[/* filter */2] = " ";

-  }

-  else if (isFinite(x$1)) {

+  } else if (isFinite(x$1)) {

     var match = f[/* conv */10];

     switch (match) {

       case "e" : 

@@ -4201,8 +4220,8 @@
           var prec$1 = prec !== 0 ? prec : 1;

           s = x$1.toExponential(prec$1 - 1 | 0);

           var j = s.indexOf("e");

-          var exp = +s.slice(j + 1 | 0);

-          if (exp < -4 || x$1 >= 1e21 || x$1.toFixed(0).length > prec$1) {

+          var exp = Number(s.slice(j + 1 | 0)) | 0;

+          if (exp < -4 || x$1 >= 1e21 || x$1.toFixed().length > prec$1) {

             var i$1 = j - 1 | 0;

             while(s[i$1] === "0") {

               i$1 = i$1 - 1 | 0;

@@ -4216,14 +4235,12 @@
               s = s.slice(0, i$2 - 1 | 0) + ("0" + s.slice(i$2 - 1 | 0));

             }

             

-          }

-          else {

+          } else {

             var p = prec$1;

             if (exp < 0) {

               p = p - (exp + 1 | 0) | 0;

               s = x$1.toFixed(p);

-            }

-            else {

+            } else {

               while(function () {

                     s = x$1.toFixed(p);

                     return +(s.length > (prec$1 + 1 | 0));

@@ -4247,8 +4264,7 @@
       default:

         

     }

-  }

-  else {

+  } else {

     s = "inf";

     f[/* filter */2] = " ";

   }

@@ -4315,13 +4331,12 @@
 //////// start of caml_int32.js ////////

 'use strict';

 

-var Caml_builtin_exceptions = require("./caml_builtin_exceptions");

+var Caml_builtin_exceptions = require("./caml_builtin_exceptions.js");

 

 function div(x, y) {

   if (y === 0) {

     throw Caml_builtin_exceptions.division_by_zero;

-  }

-  else {

+  } else {

     return x / y | 0;

   }

 }

@@ -4329,8 +4344,7 @@
 function mod_(x, y) {

   if (y === 0) {

     throw Caml_builtin_exceptions.division_by_zero;

-  }

-  else {

+  } else {

     return x % y;

   }

 }

@@ -4367,10 +4381,10 @@
 //////// start of caml_int64.js ////////

 'use strict';

 

-var Caml_obj                = require("./caml_obj");

-var Caml_int32              = require("./caml_int32");

-var Caml_utils              = require("./caml_utils");

-var Caml_builtin_exceptions = require("./caml_builtin_exceptions");

+var Caml_obj                = require("./caml_obj.js");

+var Caml_int32              = require("./caml_int32.js");

+var Caml_utils              = require("./caml_utils.js");

+var Caml_builtin_exceptions = require("./caml_builtin_exceptions.js");

 

 var min_int = /* record */[

   /* hi */-2147483648,

@@ -4425,8 +4439,7 @@
 function eq(x, y) {

   if (x[/* hi */0] === y[/* hi */0]) {

     return +(x[/* lo */1] === y[/* lo */1]);

-  }

-  else {

+  } else {

     return /* false */0;

   }

 }

@@ -4434,8 +4447,7 @@
 function neg(x) {

   if (eq(x, min_int)) {

     return min_int;

-  }

-  else {

+  } else {

     return add(not(x), one);

   }

 }

@@ -4445,30 +4457,28 @@
 }

 

 function lsl_(x, numBits) {

-  var lo = x[/* lo */1];

   if (numBits) {

+    var lo = x[/* lo */1];

     if (numBits >= 32) {

       return /* record */[

               /* hi */(lo << (numBits - 32 | 0)),

               /* lo */0

             ];

-    }

-    else {

+    } else {

       var hi = (lo >>> (32 - numBits | 0)) | (x[/* hi */0] << numBits);

       return /* record */[

               /* hi */hi,

               /* lo */((lo << numBits) >>> 0)

             ];

     }

-  }

-  else {

+  } else {

     return x;

   }

 }

 

 function lsr_(x, numBits) {

-  var hi = x[/* hi */0];

   if (numBits) {

+    var hi = x[/* hi */0];

     var offset = numBits - 32 | 0;

     if (offset) {

       if (offset > 0) {

@@ -4477,8 +4487,7 @@
                 /* hi */0,

                 /* lo */(lo >>> 0)

               ];

-      }

-      else {

+      } else {

         var hi$1 = (hi >>> numBits);

         var lo$1 = (hi << (-offset | 0)) | (x[/* lo */1] >>> numBits);

         return /* record */[

@@ -4486,22 +4495,20 @@
                 /* lo */(lo$1 >>> 0)

               ];

       }

-    }

-    else {

+    } else {

       return /* record */[

               /* hi */0,

               /* lo */(hi >>> 0)

             ];

     }

-  }

-  else {

+  } else {

     return x;

   }

 }

 

 function asr_(x, numBits) {

-  var hi = x[/* hi */0];

   if (numBits) {

+    var hi = x[/* hi */0];

     if (numBits < 32) {

       var hi$1 = (hi >> numBits);

       var lo = (hi << (32 - numBits | 0)) | (x[/* lo */1] >>> numBits);

@@ -4509,16 +4516,14 @@
               /* hi */hi$1,

               /* lo */(lo >>> 0)

             ];

-    }

-    else {

+    } else {

       var lo$1 = (hi >> (numBits - 32 | 0));

       return /* record */[

               /* hi */hi >= 0 ? 0 : -1,

               /* lo */(lo$1 >>> 0)

             ];

     }

-  }

-  else {

+  } else {

     return x;

   }

 }

@@ -4526,8 +4531,7 @@
 function is_zero(param) {

   if (param[/* hi */0] !== 0 || param[/* lo */1] !== 0) {

     return /* false */0;

-  }

-  else {

+  } else {

     return /* true */1;

   }

 }

@@ -4544,32 +4548,26 @@
     var exit$3 = 0;

     if (this_hi !== 0) {

       exit$3 = 4;

-    }

-    else if ($$this[/* lo */1] !== 0) {

+    } else if ($$this[/* lo */1] !== 0) {

       exit$3 = 4;

-    }

-    else {

+    } else {

       return zero;

     }

     if (exit$3 === 4) {

       if (other[/* hi */0] !== 0) {

         exit$2 = 3;

-      }

-      else if (other[/* lo */1] !== 0) {

+      } else if (other[/* lo */1] !== 0) {

         exit$2 = 3;

-      }

-      else {

+      } else {

         return zero;

       }

     }

     if (exit$2 === 3) {

       if (this_hi !== -2147483648) {

         exit$1 = 2;

-      }

-      else if ($$this[/* lo */1] !== 0) {

+      } else if ($$this[/* lo */1] !== 0) {

         exit$1 = 2;

-      }

-      else {

+      } else {

         lo = other[/* lo */1];

         exit = 1;

       }

@@ -4580,11 +4578,9 @@
       var exit$4 = 0;

       if (other_hi !== -2147483648) {

         exit$4 = 3;

-      }

-      else if (other[/* lo */1] !== 0) {

+      } else if (other[/* lo */1] !== 0) {

         exit$4 = 3;

-      }

-      else {

+      } else {

         lo = lo$1;

         exit = 1;

       }

@@ -4596,15 +4592,12 @@
             _this = neg($$this);

             continue ;

             

-          }

-          else {

+          } else {

             return neg(mul(neg($$this), other));

           }

-        }

-        else if (other_hi < 0) {

+        } else if (other_hi < 0) {

           return neg(mul($$this, neg(other)));

-        }

-        else {

+        } else {

           var a48 = (this_hi >>> 16);

           var a32 = this_hi & 65535;

           var a16 = (lo$1 >>> 16);

@@ -4641,8 +4634,7 @@
     if (exit === 1) {

       if ((lo & 1) === 0) {

         return zero;

-      }

-      else {

+      } else {

         return min_int;

       }

     }

@@ -4685,11 +4677,9 @@
   var hi = param[/* hi */0];

   if (hi > other_hi) {

     return /* true */1;

-  }

-  else if (hi < other_hi) {

+  } else if (hi < other_hi) {

     return /* false */0;

-  }

-  else {

+  } else {

     return +(param[/* lo */1] >= param$1[/* lo */1]);

   }

 }

@@ -4705,11 +4695,9 @@
 function gt(x, y) {

   if (x[/* hi */0] > y[/* hi */0]) {

     return /* true */1;

-  }

-  else if (x[/* hi */0] < y[/* hi */0]) {

+  } else if (x[/* hi */0] < y[/* hi */0]) {

     return /* false */0;

-  }

-  else {

+  } else {

     return +(x[/* lo */1] > y[/* lo */1]);

   }

 }

@@ -4719,7 +4707,7 @@
 }

 

 function to_float(param) {

-  return param[/* hi */0] * 4294967296 + param[/* lo */1];

+  return param[/* hi */0] * (0x100000000) + param[/* lo */1];

 }

 

 var two_ptr_32_dbl = Math.pow(2, 32);

@@ -4731,17 +4719,13 @@
 function of_float(x) {

   if (isNaN(x) || !isFinite(x)) {

     return zero;

-  }

-  else if (x <= neg_two_ptr_63) {

+  } else if (x <= neg_two_ptr_63) {

     return min_int;

-  }

-  else if (x + 1 >= two_ptr_63_dbl) {

+  } else if (x + 1 >= two_ptr_63_dbl) {

     return max_int;

-  }

-  else if (x < 0) {

+  } else if (x < 0) {

     return neg(of_float(-x));

-  }

-  else {

+  } else {

     var hi = x / two_ptr_32_dbl | 0;

     var lo = x % two_ptr_32_dbl | 0;

     return /* record */[

@@ -4760,49 +4744,38 @@
     var exit$1 = 0;

     if (other[/* hi */0] !== 0) {

       exit$1 = 2;

-    }

-    else if (other[/* lo */1] !== 0) {

+    } else if (other[/* lo */1] !== 0) {

       exit$1 = 2;

-    }

-    else {

+    } else {

       throw Caml_builtin_exceptions.division_by_zero;

     }

     if (exit$1 === 2) {

       if (self_hi !== -2147483648) {

         if (self_hi !== 0) {

           exit = 1;

-        }

-        else if (self[/* lo */1] !== 0) {

+        } else if (self[/* lo */1] !== 0) {

           exit = 1;

-        }

-        else {

+        } else {

           return zero;

         }

-      }

-      else if (self[/* lo */1] !== 0) {

+      } else if (self[/* lo */1] !== 0) {

         exit = 1;

-      }

-      else if (eq(other, one) || eq(other, neg_one)) {

+      } else if (eq(other, one) || eq(other, neg_one)) {

         return self;

-      }

-      else if (eq(other, min_int)) {

+      } else if (eq(other, min_int)) {

         return one;

-      }

-      else {

+      } else {

         var other_hi = other[/* hi */0];

         var half_this = asr_(self, 1);

         var approx = lsl_(div(half_this, other), 1);

         var exit$2 = 0;

         if (approx[/* hi */0] !== 0) {

           exit$2 = 3;

-        }

-        else if (approx[/* lo */1] !== 0) {

+        } else if (approx[/* lo */1] !== 0) {

           exit$2 = 3;

-        }

-        else if (other_hi < 0) {

+        } else if (other_hi < 0) {

           return one;

-        }

-        else {

+        } else {

           return neg(one);

         }

         if (exit$2 === 3) {

@@ -4818,11 +4791,9 @@
       var exit$3 = 0;

       if (other_hi$1 !== -2147483648) {

         exit$3 = 2;

-      }

-      else if (other[/* lo */1] !== 0) {

+      } else if (other[/* lo */1] !== 0) {

         exit$3 = 2;

-      }

-      else {

+      } else {

         return zero;

       }

       if (exit$3 === 2) {

@@ -4832,15 +4803,12 @@
             _self = neg(self);

             continue ;

             

-          }

-          else {

+          } else {

             return neg(div(neg(self), other));

           }

-        }

-        else if (other_hi$1 < 0) {

+        } else if (other_hi$1 < 0) {

           return neg(div(self, neg(other)));

-        }

-        else {

+        } else {

           var res = zero;

           var rem$1 = self;

           while(ge(rem$1, other)) {

@@ -4887,8 +4855,7 @@
   var v = Caml_obj.caml_nativeint_compare(self[/* hi */0], other[/* hi */0]);

   if (v) {

     return v;

-  }

-  else {

+  } else {

     return Caml_obj.caml_nativeint_compare(self[/* lo */1], other[/* lo */1]);

   }

 }

@@ -4913,11 +4880,9 @@
   var exit = 0;

   if (match !== 0) {

     exit = 1;

-  }

-  else if (match$1 !== 0) {

+  } else if (match$1 !== 0) {

     exit = 1;

-  }

-  else {

+  } else {

     return "0";

   }

   if (exit === 1) {

@@ -4927,16 +4892,13 @@
         var pad = 8 - lo.length | 0;

         if (pad <= 0) {

           return aux(x[/* hi */0]) + lo;

-        }

-        else {

+        } else {

           return aux(x[/* hi */0]) + (Caml_utils.repeat(pad, "0") + lo);

         }

-      }

-      else {

+      } else {

         return aux(x[/* lo */1]);

       }

-    }

-    else {

+    } else {

       return aux(x[/* hi */0]) + "00000000";

     }

   }

@@ -4959,13 +4921,12 @@
 }

 

 function bits_of_float(x) {

-  var to_nat = function (x) {

-    return x;

-  };

   var u = new Float64Array(/* float array */[x]);

   var int32 = new Int32Array(u.buffer);

-  var hi = to_nat(int32[1]);

-  var lo = to_nat(int32[0]);

+  var x$1 = int32[1];

+  var hi = x$1;

+  var x$2 = int32[0];

+  var lo = x$2;

   return /* record */[

           /* hi */hi,

           /* lo */(lo >>> 0)

@@ -5028,13 +4989,12 @@
 //////// start of camlinternalFormatBasics.js ////////

 'use strict';

 

-var Block = require("./block");

+var Block = require("./block.js");

 

 function erase_rel(param) {

   if (typeof param === "number") {

     return /* End_of_fmtty */0;

-  }

-  else {

+  } else {

     switch (param.tag | 0) {

       case 0 : 

           return /* Char_ty */Block.__(0, [erase_rel(param[0])]);

@@ -5082,8 +5042,7 @@
 function concat_fmtty(fmtty1, fmtty2) {

   if (typeof fmtty1 === "number") {

     return fmtty2;

-  }

-  else {

+  } else {

     switch (fmtty1.tag | 0) {

       case 0 : 

           return /* Char_ty */Block.__(0, [concat_fmtty(fmtty1[0], fmtty2)]);

@@ -5130,8 +5089,7 @@
 function concat_fmt(fmt1, fmt2) {

   if (typeof fmt1 === "number") {

     return fmt2;

-  }

-  else {

+  } else {

     switch (fmt1.tag | 0) {

       case 0 : 

           return /* Char */Block.__(0, [concat_fmt(fmt1[0], fmt2)]);

@@ -5267,24 +5225,25 @@
 //////// start of camlinternalFormat.js ////////

 'use strict';

 

-var Sys                      = require("./sys");

-var Char                     = require("./char");

-var Block                    = require("./block");

-var Bytes                    = require("./bytes");

-var Curry                    = require("./curry");

-var Buffer                   = require("./buffer");

-var $$String                 = require("./string");

-var Caml_io                  = require("./caml_io");

-var Caml_obj                 = require("./caml_obj");

-var Caml_bytes               = require("./caml_bytes");

-var Caml_float               = require("./caml_float");

-var Caml_int32               = require("./caml_int32");

-var Pervasives               = require("./pervasives");

-var Caml_format              = require("./caml_format");

-var Caml_string              = require("./caml_string");

-var Caml_exceptions          = require("./caml_exceptions");

-var Caml_builtin_exceptions  = require("./caml_builtin_exceptions");

-var CamlinternalFormatBasics = require("./camlinternalFormatBasics");

+var Sys                      = require("./sys.js");

+var Char                     = require("./char.js");

+var Block                    = require("./block.js");

+var Bytes                    = require("./bytes.js");

+var Curry                    = require("./curry.js");

+var Buffer                   = require("./buffer.js");

+var Js_exn                   = require("./js_exn.js");

+var $$String                 = require("./string.js");

+var Caml_io                  = require("./caml_io.js");

+var Caml_obj                 = require("./caml_obj.js");

+var Caml_bytes               = require("./caml_bytes.js");

+var Caml_float               = require("./caml_float.js");

+var Caml_int32               = require("./caml_int32.js");

+var Pervasives               = require("./pervasives.js");

+var Caml_format              = require("./caml_format.js");

+var Caml_string              = require("./caml_string.js");

+var Caml_exceptions          = require("./caml_exceptions.js");

+var Caml_builtin_exceptions  = require("./caml_builtin_exceptions.js");

+var CamlinternalFormatBasics = require("./camlinternalFormatBasics.js");

 

 function create_char_set() {

   return Bytes.make(32, /* "\000" */0);

@@ -5319,8 +5278,7 @@
               /* Right */1,

               pad_opt[0]

             ]);

-  }

-  else {

+  } else {

     return /* No_padding */0;

   }

 }

@@ -5328,8 +5286,7 @@
 function prec_of_prec_opt(prec_opt) {

   if (prec_opt) {

     return /* Lit_precision */[prec_opt[0]];

-  }

-  else {

+  } else {

     return /* No_precision */0;

   }

 }

@@ -5349,8 +5306,7 @@
           return /* Param_format_EBB */[/* Scan_next_char */Block.__(22, [fmt])];

       

     }

-  }

-  else {

+  } else {

     switch (ign.tag | 0) {

       case 0 : 

           return /* Param_format_EBB */[/* String */Block.__(2, [

@@ -5434,8 +5390,7 @@
     Bytes.blit(buf[/* bytes */1], 0, new_str, 0, len);

     buf[/* bytes */1] = new_str;

     return /* () */0;

-  }

-  else {

+  } else {

     return 0;

   }

 }

@@ -5530,13 +5485,11 @@
     if (c !== 37) {

       if (c !== 64) {

         return buffer_add_char(buf, c);

-      }

-      else {

+      } else {

         buffer_add_char(buf, /* "%" */37);

         return buffer_add_char(buf, /* "@" */64);

       }

-    }

-    else {

+    } else {

       buffer_add_char(buf, /* "%" */37);

       return buffer_add_char(buf, /* "%" */37);

     }

@@ -5553,25 +5506,20 @@
           if (switcher > 48 || switcher < 0) {

             if (switcher >= 210) {

               return print_char(buf, 255);

-            }

-            else {

+            } else {

               return print_second(set$1, i$1 + 1 | 0);

             }

-          }

-          else if (switcher > 47 || switcher < 1) {

+          } else if (switcher > 47 || switcher < 1) {

             return print_out(set$1, i$1 + 1 | 0);

-          }

-          else {

+          } else {

             return print_second(set$1, i$1 + 1 | 0);

           }

-        }

-        else {

+        } else {

           _i = i + 1 | 0;

           continue ;

           

         }

-      }

-      else {

+      } else {

         return 0;

       }

     };

@@ -5585,21 +5533,17 @@
         if (switcher >= 210) {

           print_char(buf, 254);

           return print_char(buf, 255);

-        }

-        else {

+        } else {

           exit = 1;

         }

-      }

-      else if (switcher > 47 || switcher < 1) {

+      } else if (switcher > 47 || switcher < 1) {

         if (is_in_char_set(set, Pervasives.char_of_int(i + 1 | 0))) {

           exit = 1;

-        }

-        else {

+        } else {

           print_char(buf, i - 1 | 0);

           return print_out(set, i + 1 | 0);

         }

-      }

-      else {

+      } else {

         exit = 1;

       }

       if (exit === 1) {

@@ -5615,27 +5559,23 @@
               print_char(buf, j - 1 | 0);

               if (j < 256) {

                 return print_out(set$1, j + 1 | 0);

-              }

-              else {

+              } else {

                 return 0;

               }

-            }

-            else {

+            } else {

               _j = j + 1 | 0;

               continue ;

               

             }

           };

-        }

-        else {

+        } else {

           print_char(buf, i - 1 | 0);

           print_char(buf, i);

           return print_out(set, i + 2 | 0);

         }

       }

       

-    }

-    else {

+    } else {

       print_char(buf, i - 1 | 0);

       return print_out(set, i + 1 | 0);

     }

@@ -5646,8 +5586,7 @@
       var match_001 = Char.chr(c + 1 | 0);

       if (is_in_char_set(set, c)) {

         return 1 - (is_in_char_set(set, match_000) && is_in_char_set(set, match_001));

-      }

-      else {

+      } else {

         return /* false */0;

       }

     };

@@ -5657,8 +5596,7 @@
     print_out(set, 1);

     if (is_alone(/* "-" */45)) {

       return buffer_add_char(buf, /* "-" */45);

-    }

-    else {

+    } else {

       return 0;

     }

   };

@@ -5682,8 +5620,7 @@
 function bprint_ignored_flag(buf, ign_flag) {

   if (ign_flag) {

     return buffer_add_char(buf, /* "_" */95);

-  }

-  else {

+  } else {

     return 0;

   }

 }

@@ -5691,8 +5628,7 @@
 function bprint_pad_opt(buf, pad_opt) {

   if (pad_opt) {

     return buffer_add_string(buf, "" + pad_opt[0]);

-  }

-  else {

+  } else {

     return /* () */0;

   }

 }

@@ -5700,13 +5636,11 @@
 function bprint_padding(buf, pad) {

   if (typeof pad === "number") {

     return /* () */0;

-  }

-  else {

+  } else {

     bprint_padty(buf, pad[0]);

     if (pad.tag) {

       return buffer_add_char(buf, /* "*" */42);

-    }

-    else {

+    } else {

       return buffer_add_string(buf, "" + pad[1]);

     }

   }

@@ -5716,12 +5650,10 @@
   if (typeof prec === "number") {

     if (prec !== 0) {

       return buffer_add_string(buf, ".*");

-    }

-    else {

+    } else {

       return /* () */0;

     }

-  }

-  else {

+  } else {

     buffer_add_char(buf, /* "." */46);

     return buffer_add_string(buf, "" + prec[0]);

   }

@@ -5822,8 +5754,7 @@
           return "@%";

       

     }

-  }

-  else {

+  } else {

     switch (formatting_lit.tag | 0) {

       case 0 : 

       case 1 : 

@@ -5842,8 +5773,7 @@
 function bprint_char_literal(buf, chr) {

   if (chr !== 37) {

     return buffer_add_char(buf, chr);

-  }

-  else {

+  } else {

     return buffer_add_string(buf, "%%");

   }

 }

@@ -5860,8 +5790,7 @@
     var fmtty = _fmtty;

     if (typeof fmtty === "number") {

       return /* () */0;

-    }

-    else {

+    } else {

       switch (fmtty.tag | 0) {

         case 0 : 

             buffer_add_string(buf, "%c");

@@ -5936,8 +5865,7 @@
 function int_of_custom_arity(param) {

   if (param) {

     return 1 + int_of_custom_arity(param[0]) | 0;

-  }

-  else {

+  } else {

     return 0;

   }

 }

@@ -5950,8 +5878,7 @@
     var fmt$1 = _fmt;

     if (typeof fmt$1 === "number") {

       return /* () */0;

-    }

-    else {

+    } else {

       switch (fmt$1.tag | 0) {

         case 0 : 

             buffer_add_char(buf, /* "%" */37);

@@ -6133,8 +6060,7 @@
 function symm(param) {

   if (typeof param === "number") {

     return /* End_of_fmtty */0;

-  }

-  else {

+  } else {

     switch (param.tag | 0) {

       case 0 : 

           return /* Char_ty */Block.__(0, [symm(param[0])]);

@@ -6194,8 +6120,7 @@
               return /* Refl */0;

             }

           ];

-  }

-  else {

+  } else {

     switch (param.tag | 0) {

       case 0 : 

           var match = fmtty_rel_det(param[0]);

@@ -6489,12 +6414,10 @@
                 23

               ]

             ];

-      }

-      else {

+      } else {

         return /* End_of_fmtty */0;

       }

-    }

-    else {

+    } else {

       switch (ty2.tag | 0) {

         case 8 : 

             exit = 6;

@@ -6528,14 +6451,12 @@
               ];

       }

     }

-  }

-  else {

+  } else {

     switch (ty1.tag | 0) {

       case 0 : 

           if (typeof ty2 === "number") {

             exit = 8;

-          }

-          else {

+          } else {

             switch (ty2.tag | 0) {

               case 0 : 

                   return /* Char_ty */Block.__(0, [trans(ty1[0], ty2[0])]);

@@ -6567,8 +6488,7 @@
       case 1 : 

           if (typeof ty2 === "number") {

             exit = 8;

-          }

-          else {

+          } else {

             switch (ty2.tag | 0) {

               case 1 : 

                   return /* String_ty */Block.__(1, [trans(ty1[0], ty2[0])]);

@@ -6600,8 +6520,7 @@
       case 2 : 

           if (typeof ty2 === "number") {

             exit = 8;

-          }

-          else {

+          } else {

             switch (ty2.tag | 0) {

               case 2 : 

                   return /* Int_ty */Block.__(2, [trans(ty1[0], ty2[0])]);

@@ -6633,8 +6552,7 @@
       case 3 : 

           if (typeof ty2 === "number") {

             exit = 8;

-          }

-          else {

+          } else {

             switch (ty2.tag | 0) {

               case 3 : 

                   return /* Int32_ty */Block.__(3, [trans(ty1[0], ty2[0])]);

@@ -6666,8 +6584,7 @@
       case 4 : 

           if (typeof ty2 === "number") {

             exit = 8;

-          }

-          else {

+          } else {

             switch (ty2.tag | 0) {

               case 4 : 

                   return /* Nativeint_ty */Block.__(4, [trans(ty1[0], ty2[0])]);

@@ -6699,8 +6616,7 @@
       case 5 : 

           if (typeof ty2 === "number") {

             exit = 8;

-          }

-          else {

+          } else {

             switch (ty2.tag | 0) {

               case 5 : 

                   return /* Int64_ty */Block.__(5, [trans(ty1[0], ty2[0])]);

@@ -6732,8 +6648,7 @@
       case 6 : 

           if (typeof ty2 === "number") {

             exit = 8;

-          }

-          else {

+          } else {

             switch (ty2.tag | 0) {

               case 6 : 

                   return /* Float_ty */Block.__(6, [trans(ty1[0], ty2[0])]);

@@ -6765,8 +6680,7 @@
       case 7 : 

           if (typeof ty2 === "number") {

             exit = 8;

-          }

-          else {

+          } else {

             switch (ty2.tag | 0) {

               case 7 : 

                   return /* Bool_ty */Block.__(7, [trans(ty1[0], ty2[0])]);

@@ -6805,8 +6719,7 @@
                     26

                   ]

                 ];

-          }

-          else {

+          } else {

             switch (ty2.tag | 0) {

               case 8 : 

                   return /* Format_arg_ty */Block.__(8, [

@@ -6850,8 +6763,7 @@
                     28

                   ]

                 ];

-          }

-          else {

+          } else {

             switch (ty2.tag | 0) {

               case 8 : 

                   exit = 6;

@@ -6903,11 +6815,9 @@
                     21

                   ]

                 ];

-          }

-          else if (ty2.tag === 10) {

+          } else if (ty2.tag === 10) {

             return /* Alpha_ty */Block.__(10, [trans(ty1[0], ty2[0])]);

-          }

-          else {

+          } else {

             throw [

                   Caml_builtin_exceptions.assert_failure,

                   [

@@ -6928,8 +6838,7 @@
                     21

                   ]

                 ];

-          }

-          else {

+          } else {

             switch (ty2.tag | 0) {

               case 10 : 

                   exit = 1;

@@ -6958,8 +6867,7 @@
                     19

                   ]

                 ];

-          }

-          else {

+          } else {

             switch (ty2.tag | 0) {

               case 10 : 

                   exit = 1;

@@ -6991,8 +6899,7 @@
                     22

                   ]

                 ];

-          }

-          else {

+          } else {

             switch (ty2.tag | 0) {

               case 10 : 

                   exit = 1;

@@ -7027,8 +6934,7 @@
                     30

                   ]

                 ];

-          }

-          else {

+          } else {

             switch (ty2.tag | 0) {

               case 10 : 

                   exit = 1;

@@ -7143,14 +7049,19 @@
 function fmtty_of_fmt(_fmtty) {

   while(true) {

     var fmtty = _fmtty;

+    var exit = 0;

     if (typeof fmtty === "number") {

-      return /* End_of_fmtty */0;

-    }

-    else {

+      if (fmtty) {

+        return /* Char_ty */Block.__(0, [fmtty_of_fmt(fmtty[0])]);

+      } else {

+        return /* End_of_fmtty */0;

+      }

+    } else {

       switch (fmtty.tag | 0) {

         case 2 : 

         case 3 : 

-            return fmtty_of_padding_fmtty(fmtty[0], /* String_ty */Block.__(1, [fmtty_of_fmt(fmtty[1])]));

+            exit = 1;

+            break;

         case 4 : 

             var ty_rest = fmtty_of_fmt(fmtty[3]);

             var prec_ty = fmtty_of_precision_fmtty(fmtty[2], /* Int_ty */Block.__(2, [ty_rest]));

@@ -7205,56 +7116,37 @@
             return /* String_ty */Block.__(1, [fmtty_of_fmt(fmtty[2])]);

         case 21 : 

             return /* Int_ty */Block.__(2, [fmtty_of_fmt(fmtty[1])]);

-        case 0 : 

-        case 1 : 

-        case 22 : 

-            return /* Char_ty */Block.__(0, [fmtty_of_fmt(fmtty[0])]);

         case 23 : 

             var ign = fmtty[0];

             var fmt = fmtty[1];

             if (typeof ign === "number") {

-              switch (ign) {

-                case 3 : 

-                    return /* Ignored_reader_ty */Block.__(14, [fmtty_of_fmt(fmt)]);

-                case 0 : 

-                case 1 : 

-                case 2 : 

-                case 4 : 

-                    return fmtty_of_fmt(fmt);

-                

+              if (ign === 3) {

+                return /* Ignored_reader_ty */Block.__(14, [fmtty_of_fmt(fmt)]);

+              } else {

+                return fmtty_of_fmt(fmt);

               }

-            }

-            else {

-              switch (ign.tag | 0) {

-                case 8 : 

-                    return CamlinternalFormatBasics.concat_fmtty(ign[1], fmtty_of_fmt(fmt));

-                case 0 : 

-                case 1 : 

-                case 2 : 

-                case 3 : 

-                case 4 : 

-                case 5 : 

-                case 6 : 

-                case 7 : 

-                case 9 : 

-                case 10 : 

-                    return fmtty_of_fmt(fmt);

-                

-              }

+            } else if (ign.tag === 8) {

+              return CamlinternalFormatBasics.concat_fmtty(ign[1], fmtty_of_fmt(fmt));

+            } else {

+              return fmtty_of_fmt(fmt);

             }

         case 24 : 

             return fmtty_of_custom(fmtty[0], fmtty_of_fmt(fmtty[2]));

-        

+        default:

+          return /* Char_ty */Block.__(0, [fmtty_of_fmt(fmtty[0])]);

       }

     }

+    if (exit === 1) {

+      return fmtty_of_padding_fmtty(fmtty[0], /* String_ty */Block.__(1, [fmtty_of_fmt(fmtty[1])]));

+    }

+    

   };

 }

 

 function fmtty_of_custom(arity, fmtty) {

   if (arity) {

     return /* Any_ty */Block.__(12, [fmtty_of_custom(arity[0], fmtty)]);

-  }

-  else {

+  } else {

     return fmtty;

   }

 }

@@ -7262,8 +7154,7 @@
 function fmtty_of_padding_fmtty(pad, fmtty) {

   if (typeof pad === "number" || !pad.tag) {

     return fmtty;

-  }

-  else {

+  } else {

     return /* Int_ty */Block.__(2, [fmtty]);

   }

 }

@@ -7271,8 +7162,7 @@
 function fmtty_of_precision_fmtty(prec, fmtty) {

   if (typeof prec === "number" && prec !== 0) {

     return /* Int_ty */Block.__(2, [fmtty]);

-  }

-  else {

+  } else {

     return fmtty;

   }

 }

@@ -7285,22 +7175,18 @@
             /* No_padding */0,

             fmtty

           ];

-  }

-  else if (pad.tag) {

+  } else if (pad.tag) {

     if (typeof fmtty === "number") {

       throw Type_mismatch;

-    }

-    else if (fmtty.tag === 2) {

+    } else if (fmtty.tag === 2) {

       return /* Padding_fmtty_EBB */[

               /* Arg_padding */Block.__(1, [pad[0]]),

               fmtty[0]

             ];

-    }

-    else {

+    } else {

       throw Type_mismatch;

     }

-  }

-  else {

+  } else {

     return /* Padding_fmtty_EBB */[

             /* Lit_padding */Block.__(0, [

                 pad[0],

@@ -7318,27 +7204,23 @@
       var match$1 = match[1];

       if (typeof match$1 === "number") {

         throw Type_mismatch;

-      }

-      else if (match$1.tag === 2) {

+      } else if (match$1.tag === 2) {

         return /* Padprec_fmtty_EBB */[

                 match[0],

                 /* Arg_precision */1,

                 match$1[0]

               ];

-      }

-      else {

+      } else {

         throw Type_mismatch;

       }

-    }

-    else {

+    } else {

       return /* Padprec_fmtty_EBB */[

               match[0],

               /* No_precision */0,

               match[1]

             ];

     }

-  }

-  else {

+  } else {

     return /* Padprec_fmtty_EBB */[

             match[0],

             /* Lit_precision */[prec[0]],

@@ -7364,17 +7246,14 @@
             /* End_of_format */0,

             fmtty

           ];

-  }

-  else {

+  } else {

     switch (fmt.tag | 0) {

       case 0 : 

           if (typeof fmtty === "number") {

             throw Type_mismatch;

-          }

-          else if (fmtty.tag) {

+          } else if (fmtty.tag) {

             throw Type_mismatch;

-          }

-          else {

+          } else {

             var match = type_format_gen(fmt[0], fmtty[0]);

             return /* Fmt_fmtty_EBB */[

                     /* Char */Block.__(0, [match[0]]),

@@ -7385,11 +7264,9 @@
       case 1 : 

           if (typeof fmtty === "number") {

             throw Type_mismatch;

-          }

-          else if (fmtty.tag) {

+          } else if (fmtty.tag) {

             throw Type_mismatch;

-          }

-          else {

+          } else {

             var match$1 = type_format_gen(fmt[0], fmtty[0]);

             return /* Fmt_fmtty_EBB */[

                     /* Caml_char */Block.__(1, [match$1[0]]),

@@ -7402,8 +7279,7 @@
           var match$3 = match$2[1];

           if (typeof match$3 === "number") {

             throw Type_mismatch;

-          }

-          else if (match$3.tag === 1) {

+          } else if (match$3.tag === 1) {

             var match$4 = type_format_gen(fmt[1], match$3[0]);

             return /* Fmt_fmtty_EBB */[

                     /* String */Block.__(2, [

@@ -7412,8 +7288,7 @@
                       ]),

                     match$4[1]

                   ];

-          }

-          else {

+          } else {

             throw Type_mismatch;

           }

           break;

@@ -7422,8 +7297,7 @@
           var match$6 = match$5[1];

           if (typeof match$6 === "number") {

             throw Type_mismatch;

-          }

-          else if (match$6.tag === 1) {

+          } else if (match$6.tag === 1) {

             var match$7 = type_format_gen(fmt[1], match$6[0]);

             return /* Fmt_fmtty_EBB */[

                     /* Caml_string */Block.__(3, [

@@ -7432,8 +7306,7 @@
                       ]),

                     match$7[1]

                   ];

-          }

-          else {

+          } else {

             throw Type_mismatch;

           }

           break;

@@ -7442,8 +7315,7 @@
           var match$9 = match$8[2];

           if (typeof match$9 === "number") {

             throw Type_mismatch;

-          }

-          else if (match$9.tag === 2) {

+          } else if (match$9.tag === 2) {

             var match$10 = type_format_gen(fmt[3], match$9[0]);

             return /* Fmt_fmtty_EBB */[

                     /* Int */Block.__(4, [

@@ -7454,8 +7326,7 @@
                       ]),

                     match$10[1]

                   ];

-          }

-          else {

+          } else {

             throw Type_mismatch;

           }

           break;

@@ -7464,8 +7335,7 @@
           var match$12 = match$11[2];

           if (typeof match$12 === "number") {

             throw Type_mismatch;

-          }

-          else if (match$12.tag === 3) {

+          } else if (match$12.tag === 3) {

             var match$13 = type_format_gen(fmt[3], match$12[0]);

             return /* Fmt_fmtty_EBB */[

                     /* Int32 */Block.__(5, [

@@ -7476,8 +7346,7 @@
                       ]),

                     match$13[1]

                   ];

-          }

-          else {

+          } else {

             throw Type_mismatch;

           }

           break;

@@ -7486,8 +7355,7 @@
           var match$15 = match$14[2];

           if (typeof match$15 === "number") {

             throw Type_mismatch;

-          }

-          else if (match$15.tag === 4) {

+          } else if (match$15.tag === 4) {

             var match$16 = type_format_gen(fmt[3], match$15[0]);

             return /* Fmt_fmtty_EBB */[

                     /* Nativeint */Block.__(6, [

@@ -7498,8 +7366,7 @@
                       ]),

                     match$16[1]

                   ];

-          }

-          else {

+          } else {

             throw Type_mismatch;

           }

           break;

@@ -7508,8 +7375,7 @@
           var match$18 = match$17[2];

           if (typeof match$18 === "number") {

             throw Type_mismatch;

-          }

-          else if (match$18.tag === 5) {

+          } else if (match$18.tag === 5) {

             var match$19 = type_format_gen(fmt[3], match$18[0]);

             return /* Fmt_fmtty_EBB */[

                     /* Int64 */Block.__(7, [

@@ -7520,8 +7386,7 @@
                       ]),

                     match$19[1]

                   ];

-          }

-          else {

+          } else {

             throw Type_mismatch;

           }

           break;

@@ -7530,8 +7395,7 @@
           var match$21 = match$20[2];

           if (typeof match$21 === "number") {

             throw Type_mismatch;

-          }

-          else if (match$21.tag === 6) {

+          } else if (match$21.tag === 6) {

             var match$22 = type_format_gen(fmt[3], match$21[0]);

             return /* Fmt_fmtty_EBB */[

                     /* Float */Block.__(8, [

@@ -7542,23 +7406,20 @@
                       ]),

                     match$22[1]

                   ];

-          }

-          else {

+          } else {

             throw Type_mismatch;

           }

           break;

       case 9 : 

           if (typeof fmtty === "number") {

             throw Type_mismatch;

-          }

-          else if (fmtty.tag === 7) {

+          } else if (fmtty.tag === 7) {

             var match$23 = type_format_gen(fmt[0], fmtty[0]);

             return /* Fmt_fmtty_EBB */[

                     /* Bool */Block.__(9, [match$23[0]]),

                     match$23[1]

                   ];

-          }

-          else {

+          } else {

             throw Type_mismatch;

           }

           break;

@@ -7589,8 +7450,7 @@
       case 13 : 

           if (typeof fmtty === "number") {

             throw Type_mismatch;

-          }

-          else if (fmtty.tag === 8) {

+          } else if (fmtty.tag === 8) {

             var sub_fmtty$prime = fmtty[0];

             if (Caml_obj.caml_notequal(/* Fmtty_EBB */[fmt[1]], /* Fmtty_EBB */[sub_fmtty$prime])) {

               throw Type_mismatch;

@@ -7604,16 +7464,14 @@
                       ]),

                     match$27[1]

                   ];

-          }

-          else {

+          } else {

             throw Type_mismatch;

           }

           break;

       case 14 : 

           if (typeof fmtty === "number") {

             throw Type_mismatch;

-          }

-          else if (fmtty.tag === 9) {

+          } else if (fmtty.tag === 9) {

             var sub_fmtty1 = fmtty[0];

             if (Caml_obj.caml_notequal(/* Fmtty_EBB */[CamlinternalFormatBasics.erase_rel(fmt[1])], /* Fmtty_EBB */[CamlinternalFormatBasics.erase_rel(sub_fmtty1)])) {

               throw Type_mismatch;

@@ -7627,38 +7485,33 @@
                       ]),

                     match$28[1]

                   ];

-          }

-          else {

+          } else {

             throw Type_mismatch;

           }

           break;

       case 15 : 

           if (typeof fmtty === "number") {

             throw Type_mismatch;

-          }

-          else if (fmtty.tag === 10) {

+          } else if (fmtty.tag === 10) {

             var match$29 = type_format_gen(fmt[0], fmtty[0]);

             return /* Fmt_fmtty_EBB */[

                     /* Alpha */Block.__(15, [match$29[0]]),

                     match$29[1]

                   ];

-          }

-          else {

+          } else {

             throw Type_mismatch;

           }

           break;

       case 16 : 

           if (typeof fmtty === "number") {

             throw Type_mismatch;

-          }

-          else if (fmtty.tag === 11) {

+          } else if (fmtty.tag === 11) {

             var match$30 = type_format_gen(fmt[0], fmtty[0]);

             return /* Fmt_fmtty_EBB */[

                     /* Theta */Block.__(16, [match$30[0]]),

                     match$30[1]

                   ];

-          }

-          else {

+          } else {

             throw Type_mismatch;

           }

           break;

@@ -7689,8 +7542,7 @@
                       ]),

                     match$34[1]

                   ];

-          }

-          else {

+          } else {

             var match$35 = formatting_gen[0];

             var match$36 = type_format_gen(match$35[0], fmtty0);

             var match$37 = type_format_gen(fmt0, match$36[1]);

@@ -7708,23 +7560,20 @@
       case 19 : 

           if (typeof fmtty === "number") {

             throw Type_mismatch;

-          }

-          else if (fmtty.tag === 13) {

+          } else if (fmtty.tag === 13) {

             var match$38 = type_format_gen(fmt[0], fmtty[0]);

             return /* Fmt_fmtty_EBB */[

                     /* Reader */Block.__(19, [match$38[0]]),

                     match$38[1]

                   ];

-          }

-          else {

+          } else {

             throw Type_mismatch;

           }

           break;

       case 20 : 

           if (typeof fmtty === "number") {

             throw Type_mismatch;

-          }

-          else if (fmtty.tag === 1) {

+          } else if (fmtty.tag === 1) {

             var match$39 = type_format_gen(fmt[2], fmtty[0]);

             return /* Fmt_fmtty_EBB */[

                     /* Scan_char_set */Block.__(20, [

@@ -7734,16 +7583,14 @@
                       ]),

                     match$39[1]

                   ];

-          }

-          else {

+          } else {

             throw Type_mismatch;

           }

           break;

       case 21 : 

           if (typeof fmtty === "number") {

             throw Type_mismatch;

-          }

-          else if (fmtty.tag === 2) {

+          } else if (fmtty.tag === 2) {

             var match$40 = type_format_gen(fmt[1], fmtty[0]);

             return /* Fmt_fmtty_EBB */[

                     /* Scan_get_counter */Block.__(21, [

@@ -7752,8 +7599,7 @@
                       ]),

                     match$40[1]

                   ];

-          }

-          else {

+          } else {

             throw Type_mismatch;

           }

           break;

@@ -7762,34 +7608,25 @@
           var fmt$1 = fmt[1];

           var fmtty$1 = fmtty;

           if (typeof ign === "number") {

-            switch (ign) {

-              case 3 : 

-                  if (typeof fmtty$1 === "number") {

-                    throw Type_mismatch;

-                  }

-                  else if (fmtty$1.tag === 14) {

-                    var match$41 = type_format_gen(fmt$1, fmtty$1[0]);

-                    return /* Fmt_fmtty_EBB */[

-                            /* Ignored_param */Block.__(23, [

-                                /* Ignored_reader */3,

-                                match$41[0]

-                              ]),

-                            match$41[1]

-                          ];

-                  }

-                  else {

-                    throw Type_mismatch;

-                  }

-                  break;

-              case 0 : 

-              case 1 : 

-              case 2 : 

-              case 4 : 

-                  return type_ignored_param_one(ign, fmt$1, fmtty$1);

-              

+            if (ign === 3) {

+              if (typeof fmtty$1 === "number") {

+                throw Type_mismatch;

+              } else if (fmtty$1.tag === 14) {

+                var match$41 = type_format_gen(fmt$1, fmtty$1[0]);

+                return /* Fmt_fmtty_EBB */[

+                        /* Ignored_param */Block.__(23, [

+                            /* Ignored_reader */3,

+                            match$41[0]

+                          ]),

+                        match$41[1]

+                      ];

+              } else {

+                throw Type_mismatch;

+              }

+            } else {

+              return type_ignored_param_one(ign, fmt$1, fmtty$1);

             }

-          }

-          else {

+          } else {

             switch (ign.tag | 0) {

               case 7 : 

                   return type_ignored_param_one(/* Ignored_format_arg */Block.__(7, [

@@ -7809,17 +7646,8 @@
                             ]),

                           match$43[1]

                         ];

-              case 0 : 

-              case 1 : 

-              case 2 : 

-              case 3 : 

-              case 4 : 

-              case 5 : 

-              case 6 : 

-              case 9 : 

-              case 10 : 

-                  return type_ignored_param_one(ign, fmt$1, fmtty$1);

-              

+              default:

+                return type_ignored_param_one(ign, fmt$1, fmtty$1);

             }

           }

       case 22 : 

@@ -7836,17 +7664,14 @@
             /* End_of_fmtty */0,

             type_format_gen(fmt, fmtty)

           ];

-  }

-  else {

+  } else {

     switch (sub_fmtty.tag | 0) {

       case 0 : 

           if (typeof fmtty === "number") {

             throw Type_mismatch;

-          }

-          else if (fmtty.tag) {

+          } else if (fmtty.tag) {

             throw Type_mismatch;

-          }

-          else {

+          } else {

             var match = type_ignored_format_substitution(sub_fmtty[0], fmt, fmtty[0]);

             return /* Fmtty_fmt_EBB */[

                     /* Char_ty */Block.__(0, [match[0]]),

@@ -7857,113 +7682,98 @@
       case 1 : 

           if (typeof fmtty === "number") {

             throw Type_mismatch;

-          }

-          else if (fmtty.tag === 1) {

+          } else if (fmtty.tag === 1) {

             var match$1 = type_ignored_format_substitution(sub_fmtty[0], fmt, fmtty[0]);

             return /* Fmtty_fmt_EBB */[

                     /* String_ty */Block.__(1, [match$1[0]]),

                     match$1[1]

                   ];

-          }

-          else {

+          } else {

             throw Type_mismatch;

           }

           break;

       case 2 : 

           if (typeof fmtty === "number") {

             throw Type_mismatch;

-          }

-          else if (fmtty.tag === 2) {

+          } else if (fmtty.tag === 2) {

             var match$2 = type_ignored_format_substitution(sub_fmtty[0], fmt, fmtty[0]);

             return /* Fmtty_fmt_EBB */[

                     /* Int_ty */Block.__(2, [match$2[0]]),

                     match$2[1]

                   ];

-          }

-          else {

+          } else {

             throw Type_mismatch;

           }

           break;

       case 3 : 

           if (typeof fmtty === "number") {

             throw Type_mismatch;

-          }

-          else if (fmtty.tag === 3) {

+          } else if (fmtty.tag === 3) {

             var match$3 = type_ignored_format_substitution(sub_fmtty[0], fmt, fmtty[0]);

             return /* Fmtty_fmt_EBB */[

                     /* Int32_ty */Block.__(3, [match$3[0]]),

                     match$3[1]

                   ];

-          }

-          else {

+          } else {

             throw Type_mismatch;

           }

           break;

       case 4 : 

           if (typeof fmtty === "number") {

             throw Type_mismatch;

-          }

-          else if (fmtty.tag === 4) {

+          } else if (fmtty.tag === 4) {

             var match$4 = type_ignored_format_substitution(sub_fmtty[0], fmt, fmtty[0]);

             return /* Fmtty_fmt_EBB */[

                     /* Nativeint_ty */Block.__(4, [match$4[0]]),

                     match$4[1]

                   ];

-          }

-          else {

+          } else {

             throw Type_mismatch;

           }

           break;

       case 5 : 

           if (typeof fmtty === "number") {

             throw Type_mismatch;

-          }

-          else if (fmtty.tag === 5) {

+          } else if (fmtty.tag === 5) {

             var match$5 = type_ignored_format_substitution(sub_fmtty[0], fmt, fmtty[0]);

             return /* Fmtty_fmt_EBB */[

                     /* Int64_ty */Block.__(5, [match$5[0]]),

                     match$5[1]

                   ];

-          }

-          else {

+          } else {

             throw Type_mismatch;

           }

           break;

       case 6 : 

           if (typeof fmtty === "number") {

             throw Type_mismatch;

-          }

-          else if (fmtty.tag === 6) {

+          } else if (fmtty.tag === 6) {

             var match$6 = type_ignored_format_substitution(sub_fmtty[0], fmt, fmtty[0]);

             return /* Fmtty_fmt_EBB */[

                     /* Float_ty */Block.__(6, [match$6[0]]),

                     match$6[1]

                   ];

-          }

-          else {

+          } else {

             throw Type_mismatch;

           }

           break;

       case 7 : 

           if (typeof fmtty === "number") {

             throw Type_mismatch;

-          }

-          else if (fmtty.tag === 7) {

+          } else if (fmtty.tag === 7) {

             var match$7 = type_ignored_format_substitution(sub_fmtty[0], fmt, fmtty[0]);

             return /* Fmtty_fmt_EBB */[

                     /* Bool_ty */Block.__(7, [match$7[0]]),

                     match$7[1]

                   ];

-          }

-          else {

+          } else {

             throw Type_mismatch;

           }

           break;

       case 8 : 

           if (typeof fmtty === "number") {

             throw Type_mismatch;

-          }

-          else if (fmtty.tag === 8) {

+          } else if (fmtty.tag === 8) {

             var sub2_fmtty$prime = fmtty[0];

             if (Caml_obj.caml_notequal(/* Fmtty_EBB */[sub_fmtty[0]], /* Fmtty_EBB */[sub2_fmtty$prime])) {

               throw Type_mismatch;

@@ -7976,16 +7786,14 @@
                       ]),

                     match$8[1]

                   ];

-          }

-          else {

+          } else {

             throw Type_mismatch;

           }

           break;

       case 9 : 

           if (typeof fmtty === "number") {

             throw Type_mismatch;

-          }

-          else if (fmtty.tag === 9) {

+          } else if (fmtty.tag === 9) {

             var sub2_fmtty$prime$1 = fmtty[1];

             var sub1_fmtty$prime = fmtty[0];

             if (Caml_obj.caml_notequal(/* Fmtty_EBB */[CamlinternalFormatBasics.erase_rel(sub_fmtty[0])], /* Fmtty_EBB */[CamlinternalFormatBasics.erase_rel(sub1_fmtty$prime)])) {

@@ -8007,38 +7815,33 @@
                       ]),

                     match$10[1]

                   ];

-          }

-          else {

+          } else {

             throw Type_mismatch;

           }

           break;

       case 10 : 

           if (typeof fmtty === "number") {

             throw Type_mismatch;

-          }

-          else if (fmtty.tag === 10) {

+          } else if (fmtty.tag === 10) {

             var match$11 = type_ignored_format_substitution(sub_fmtty[0], fmt, fmtty[0]);

             return /* Fmtty_fmt_EBB */[

                     /* Alpha_ty */Block.__(10, [match$11[0]]),

                     match$11[1]

                   ];

-          }

-          else {

+          } else {

             throw Type_mismatch;

           }

           break;

       case 11 : 

           if (typeof fmtty === "number") {

             throw Type_mismatch;

-          }

-          else if (fmtty.tag === 11) {

+          } else if (fmtty.tag === 11) {

             var match$12 = type_ignored_format_substitution(sub_fmtty[0], fmt, fmtty[0]);

             return /* Fmtty_fmt_EBB */[

                     /* Theta_ty */Block.__(11, [match$12[0]]),

                     match$12[1]

                   ];

-          }

-          else {

+          } else {

             throw Type_mismatch;

           }

           break;

@@ -8047,30 +7850,26 @@
       case 13 : 

           if (typeof fmtty === "number") {

             throw Type_mismatch;

-          }

-          else if (fmtty.tag === 13) {

+          } else if (fmtty.tag === 13) {

             var match$13 = type_ignored_format_substitution(sub_fmtty[0], fmt, fmtty[0]);

             return /* Fmtty_fmt_EBB */[

                     /* Reader_ty */Block.__(13, [match$13[0]]),

                     match$13[1]

                   ];

-          }

-          else {

+          } else {

             throw Type_mismatch;

           }

           break;

       case 14 : 

           if (typeof fmtty === "number") {

             throw Type_mismatch;

-          }

-          else if (fmtty.tag === 14) {

+          } else if (fmtty.tag === 14) {

             var match$14 = type_ignored_format_substitution(sub_fmtty[0], fmt, fmtty[0]);

             return /* Fmtty_fmt_EBB */[

                     /* Ignored_reader_ty */Block.__(14, [match$14[0]]),

                     match$14[1]

                   ];

-          }

-          else {

+          } else {

             throw Type_mismatch;

           }

           break;

@@ -8083,8 +7882,7 @@
   var match = type_format_gen(fmt, fmtty);

   if (typeof match[1] === "number") {

     return match[0];

-  }

-  else {

+  } else {

     throw Type_mismatch;

   }

 }

@@ -8097,12 +7895,11 @@
   var len = str.length;

   var match_000 = Pervasives.abs(width);

   var match_001 = width < 0 ? /* Left */0 : padty;

-  var padty$1 = match_001;

   var width$1 = match_000;

   if (width$1 <= len) {

     return str;

-  }

-  else {

+  } else {

+    var padty$1 = match_001;

     var res = Bytes.make(width$1, padty$1 === /* Zeros */2 ? /* "0" */48 : /* " " */32);

     switch (padty$1) {

       case 0 : 

@@ -8115,12 +7912,10 @@
           if (len > 0 && (Caml_string.get(str, 0) === /* "+" */43 || Caml_string.get(str, 0) === /* "-" */45 || Caml_string.get(str, 0) === /* " " */32)) {

             res[0] = Caml_string.get(str, 0);

             $$String.blit(str, 1, res, (width$1 - len | 0) + 1 | 0, len - 1 | 0);

-          }

-          else if (len > 1 && Caml_string.get(str, 0) === /* "0" */48 && (Caml_string.get(str, 1) === /* "x" */120 || Caml_string.get(str, 1) === /* "X" */88)) {

+          } else if (len > 1 && Caml_string.get(str, 0) === /* "0" */48 && (Caml_string.get(str, 1) === /* "x" */120 || Caml_string.get(str, 1) === /* "X" */88)) {

             res[1] = Caml_string.get(str, 1);

             $$String.blit(str, 2, res, (width$1 - len | 0) + 2 | 0, len - 2 | 0);

-          }

-          else {

+          } else {

             $$String.blit(str, 0, res, width$1 - len | 0, len);

           }

           break;

@@ -8139,19 +7934,15 @@
     if (c >= 71) {

       if (c > 102 || c < 97) {

         return str;

-      }

-      else {

+      } else {

         exit = 2;

       }

-    }

-    else if (c >= 65) {

+    } else if (c >= 65) {

       exit = 2;

-    }

-    else {

+    } else {

       return str;

     }

-  }

-  else if (c !== 32) {

+  } else if (c !== 32) {

     if (c >= 43) {

       switch (c - 43 | 0) {

         case 0 : 

@@ -8168,8 +7959,7 @@
               res[1] = Caml_string.get(str, 1);

               $$String.blit(str, 2, res, (prec$1 - len | 0) + 4 | 0, len - 2 | 0);

               return Caml_string.bytes_to_string(res);

-            }

-            else {

+            } else {

               exit = 2;

             }

             break;

@@ -8186,12 +7976,10 @@
             break;

         

       }

-    }

-    else {

+    } else {

       return str;

     }

-  }

-  else {

+  } else {

     exit = 1;

   }

   switch (exit) {

@@ -8201,8 +7989,7 @@
           res$1[0] = c;

           $$String.blit(str, 1, res$1, (prec$1 - len | 0) + 2 | 0, len - 1 | 0);

           return Caml_string.bytes_to_string(res$1);

-        }

-        else {

+        } else {

           return str;

         }

         break;

@@ -8211,8 +7998,7 @@
           var res$2 = Bytes.make(prec$1, /* "0" */48);

           $$String.blit(str, 0, res$2, prec$1 - len | 0, len);

           return Caml_string.bytes_to_string(res$2);

-        }

-        else {

+        } else {

           return str;

         }

         break;

@@ -8222,9 +8008,9 @@
 

 function string_to_caml_string(str) {

   return $$String.concat($$String.escaped(str), /* :: */[

-              '"',

+              "\"",

               /* :: */[

-                '"',

+                "\"",

                 /* [] */0

               ]

             ]);

@@ -8390,8 +8176,7 @@
 function format_of_fconv(fconv, prec) {

   if (fconv === /* Float_F */15) {

     return "%.12g";

-  }

-  else {

+  } else {

     var prec$1 = Pervasives.abs(prec);

     var symb = char_of_fconv(fconv);

     var buf = /* record */[

@@ -8428,16 +8213,14 @@
   var str = Caml_format.caml_format_float(format_of_fconv(fconv, prec$1), x);

   if (fconv !== /* Float_F */15) {

     return str;

-  }

-  else {

+  } else {

     var len = str.length;

     var is_valid = function (_i) {

       while(true) {

         var i = _i;

         if (i === len) {

           return /* false */0;

-        }

-        else {

+        } else {

           var match = Caml_string.get(str, i);

           var switcher = match - 46 | 0;

           if (switcher > 23 || switcher < 0) {

@@ -8445,15 +8228,12 @@
               _i = i + 1 | 0;

               continue ;

               

-            }

-            else {

+            } else {

               return /* true */1;

             }

-          }

-          else if (switcher > 22 || switcher < 1) {

+          } else if (switcher > 22 || switcher < 1) {

             return /* true */1;

-          }

-          else {

+          } else {

             _i = i + 1 | 0;

             continue ;

             

@@ -8465,18 +8245,14 @@
     if (match !== 3) {

       if (match >= 4) {

         return "nan";

-      }

-      else if (is_valid(0)) {

+      } else if (is_valid(0)) {

         return str;

-      }

-      else {

+      } else {

         return str + ".";

       }

-    }

-    else if (x < 0.0) {

+    } else if (x < 0.0) {

       return "neg_infinity";

-    }

-    else {

+    } else {

       return "infinity";

     }

   }

@@ -8508,8 +8284,7 @@
     var k = _k;

     if (typeof fmt === "number") {

       return Curry._2(k, o, acc);

-    }

-    else {

+    } else {

       switch (fmt.tag | 0) {

         case 0 : 

             var rest = fmt[0];

@@ -8568,8 +8343,7 @@
                                 ]), fmt$1);

                   }

                   }(k$1,o$1,acc$1,fmt$1,fconv));

-                }

-                else {

+                } else {

                   return (function(k$1,o$1,acc$1,fmt$1,fconv){

                   return function (x) {

                     var str = convert_float(fconv, 6, x);

@@ -8580,8 +8354,7 @@
                   }

                   }(k$1,o$1,acc$1,fmt$1,fconv));

                 }

-              }

-              else {

+              } else {

                 var p = prec[0];

                 return (function(k$1,o$1,acc$1,fmt$1,fconv,p){

                 return function (x) {

@@ -8593,8 +8366,7 @@
                 }

                 }(k$1,o$1,acc$1,fmt$1,fconv,p));

               }

-            }

-            else if (pad.tag) {

+            } else if (pad.tag) {

               var padty = pad[0];

               if (typeof prec === "number") {

                 if (prec !== 0) {

@@ -8607,8 +8379,7 @@
                                 ]), fmt$1);

                   }

                   }(k$1,o$1,acc$1,fmt$1,fconv,padty));

-                }

-                else {

+                } else {

                   return (function(k$1,o$1,acc$1,fmt$1,fconv,padty){

                   return function (w, x) {

                     var str = convert_float(fconv, 6, x);

@@ -8620,8 +8391,7 @@
                   }

                   }(k$1,o$1,acc$1,fmt$1,fconv,padty));

                 }

-              }

-              else {

+              } else {

                 var p$1 = prec[0];

                 return (function(k$1,o$1,acc$1,fmt$1,fconv,padty,p$1){

                 return function (w, x) {

@@ -8633,8 +8403,7 @@
                 }

                 }(k$1,o$1,acc$1,fmt$1,fconv,padty,p$1));

               }

-            }

-            else {

+            } else {

               var w = pad[1];

               var padty$1 = pad[0];

               if (typeof prec === "number") {

@@ -8648,8 +8417,7 @@
                                 ]), fmt$1);

                   }

                   }(k$1,o$1,acc$1,fmt$1,fconv,padty$1,w));

-                }

-                else {

+                } else {

                   return (function(k$1,o$1,acc$1,fmt$1,fconv,padty$1,w){

                   return function (x) {

                     var str = convert_float(fconv, 6, x);

@@ -8661,8 +8429,7 @@
                   }

                   }(k$1,o$1,acc$1,fmt$1,fconv,padty$1,w));

                 }

-              }

-              else {

+              } else {

                 var p$2 = prec[0];

                 return (function(k$1,o$1,acc$1,fmt$1,fconv,padty$1,w,p$2){

                 return function (x) {

@@ -8768,8 +8535,7 @@
               _k = k$prime;

               continue ;

               

-            }

-            else {

+            } else {

               var rest$8 = fmt[1];

               var k$prime$1 = (function(k,acc,rest$8){

               return function k$prime$1(koc, kacc) {

@@ -8836,41 +8602,22 @@
             var ign = fmt[0];

             var fmt$2 = fmt[1];

             if (typeof ign === "number") {

-              switch (ign) {

-                case 3 : 

-                    throw [

-                          Caml_builtin_exceptions.assert_failure,

-                          [

-                            "camlinternalFormat.ml",

-                            1517,

-                            39

-                          ]

-                        ];

-                case 0 : 

-                case 1 : 

-                case 2 : 

-                case 4 : 

-                    return make_invalid_arg(k$2, o$2, acc$2, fmt$2);

-                

+              if (ign === 3) {

+                throw [

+                      Caml_builtin_exceptions.assert_failure,

+                      [

+                        "camlinternalFormat.ml",

+                        1517,

+                        39

+                      ]

+                    ];

+              } else {

+                return make_invalid_arg(k$2, o$2, acc$2, fmt$2);

               }

-            }

-            else {

-              switch (ign.tag | 0) {

-                case 8 : 

-                    return make_from_fmtty(k$2, o$2, acc$2, ign[1], fmt$2);

-                case 0 : 

-                case 1 : 

-                case 2 : 

-                case 3 : 

-                case 4 : 

-                case 5 : 

-                case 6 : 

-                case 7 : 

-                case 9 : 

-                case 10 : 

-                    return make_invalid_arg(k$2, o$2, acc$2, fmt$2);

-                

-              }

+            } else if (ign.tag === 8) {

+              return make_from_fmtty(k$2, o$2, acc$2, ign[1], fmt$2);

+            } else {

+              return make_invalid_arg(k$2, o$2, acc$2, fmt$2);

             }

         case 24 : 

             return make_custom(k, o, acc, fmt[2], fmt[0], Curry._1(fmt[1], /* () */0));

@@ -8883,8 +8630,7 @@
 function make_from_fmtty(k, o, acc, fmtty, fmt) {

   if (typeof fmtty === "number") {

     return make_invalid_arg(k, o, acc, fmt);

-  }

-  else {

+  } else {

     switch (fmtty.tag | 0) {

       case 0 : 

           var rest = fmtty[0];

@@ -8992,8 +8738,7 @@
         ]);

       return make_printf(k, o, new_acc, fmt);

     };

-  }

-  else if (pad.tag) {

+  } else if (pad.tag) {

     var padty = pad[0];

     return function (w, x) {

       var new_acc_001 = fix_padding(padty, w, Curry._1(trans, x));

@@ -9003,8 +8748,7 @@
         ]);

       return make_printf(k, o, new_acc, fmt);

     };

-  }

-  else {

+  } else {

     var width = pad[1];

     var padty$1 = pad[0];

     return function (x) {

@@ -9029,8 +8773,7 @@
                         str

                       ]), fmt);

         };

-      }

-      else {

+      } else {

         return function (x) {

           var str = Curry._2(trans, iconv, x);

           return make_printf(k, o, /* Acc_data_string */Block.__(4, [

@@ -9039,8 +8782,7 @@
                       ]), fmt);

         };

       }

-    }

-    else {

+    } else {

       var p = prec[0];

       return function (x) {

         var str = fix_int_precision(p, Curry._2(trans, iconv, x));

@@ -9050,8 +8792,7 @@
                     ]), fmt);

       };

     }

-  }

-  else if (pad.tag) {

+  } else if (pad.tag) {

     var padty = pad[0];

     if (typeof prec === "number") {

       if (prec !== 0) {

@@ -9062,8 +8803,7 @@
                         str

                       ]), fmt);

         };

-      }

-      else {

+      } else {

         return function (w, x) {

           var str = fix_padding(padty, w, Curry._2(trans, iconv, x));

           return make_printf(k, o, /* Acc_data_string */Block.__(4, [

@@ -9072,8 +8812,7 @@
                       ]), fmt);

         };

       }

-    }

-    else {

+    } else {

       var p$1 = prec[0];

       return function (w, x) {

         var str = fix_padding(padty, w, fix_int_precision(p$1, Curry._2(trans, iconv, x)));

@@ -9083,8 +8822,7 @@
                     ]), fmt);

       };

     }

-  }

-  else {

+  } else {

     var w = pad[1];

     var padty$1 = pad[0];

     if (typeof prec === "number") {

@@ -9096,8 +8834,7 @@
                         str

                       ]), fmt);

         };

-      }

-      else {

+      } else {

         return function (x) {

           var str = fix_padding(padty$1, w, Curry._2(trans, iconv, x));

           return make_printf(k, o, /* Acc_data_string */Block.__(4, [

@@ -9106,8 +8843,7 @@
                       ]), fmt);

         };

       }

-    }

-    else {

+    } else {

       var p$2 = prec[0];

       return function (x) {

         var str = fix_padding(padty$1, w, fix_int_precision(p$2, Curry._2(trans, iconv, x)));

@@ -9126,8 +8862,7 @@
     return function (x) {

       return make_custom(k, o, acc, rest, arity$1, Curry._1(f, x));

     };

-  }

-  else {

+  } else {

     return make_printf(k, o, /* Acc_data_string */Block.__(4, [

                   acc,

                   f

@@ -9141,8 +8876,7 @@
     var exit = 0;

     if (typeof acc === "number") {

       return /* () */0;

-    }

-    else {

+    } else {

       switch (acc.tag | 0) {

         case 0 : 

             var s = string_of_formatting_lit(acc[1]);

@@ -9157,8 +8891,7 @@
               _acc = match[0];

               continue ;

               

-            }

-            else {

+            } else {

               Pervasives.output_string(o, "@{");

               _acc = match[0];

               continue ;

@@ -9206,8 +8939,7 @@
     var exit = 0;

     if (typeof acc === "number") {

       return /* () */0;

-    }

-    else {

+    } else {

       switch (acc.tag | 0) {

         case 0 : 

             var s = string_of_formatting_lit(acc[1]);

@@ -9222,8 +8954,7 @@
               _acc = match[0];

               continue ;

               

-            }

-            else {

+            } else {

               Buffer.add_string(b, "@{");

               _acc = match[0];

               continue ;

@@ -9271,8 +9002,7 @@
     var exit = 0;

     if (typeof acc === "number") {

       return /* () */0;

-    }

-    else {

+    } else {

       switch (acc.tag | 0) {

         case 0 : 

             var s = string_of_formatting_lit(acc[1]);

@@ -9287,8 +9017,7 @@
               _acc = match[0];

               continue ;

               

-            }

-            else {

+            } else {

               Buffer.add_string(b, "@{");

               _acc = match[0];

               continue ;

@@ -9349,8 +9078,7 @@
             0,

             /* Pp_box */4

           ];

-  }

-  else {

+  } else {

     var len = str.length;

     var invalid_box = function () {

       return Curry._1(failwith_message(/* Format */[

@@ -9369,20 +9097,17 @@
         var i = _i;

         if (i === len) {

           return i;

-        }

-        else {

+        } else {

           var match = Caml_string.get(str, i);

           if (match !== 9) {

             if (match !== 32) {

               return i;

-            }

-            else {

+            } else {

               _i = i + 1 | 0;

               continue ;

               

             }

-          }

-          else {

+          } else {

             _i = i + 1 | 0;

             continue ;

             

@@ -9395,13 +9120,11 @@
         var j = _j;

         if (j === len) {

           return j;

-        }

-        else {

+        } else {

           var match = Caml_string.get(str, j);

           if (match > 122 || match < 97) {

             return j;

-          }

-          else {

+          } else {

             _j = j + 1 | 0;

             continue ;

             

@@ -9414,23 +9137,19 @@
         var j = _j;

         if (j === len) {

           return j;

-        }

-        else {

+        } else {

           var match = Caml_string.get(str, j);

           if (match >= 48) {

             if (match >= 58) {

               return j;

-            }

-            else {

+            } else {

               _j = j + 1 | 0;

               continue ;

               

             }

-          }

-          else if (match !== 45) {

+          } else if (match !== 45) {

             return j;

-          }

-          else {

+          } else {

             _j = j + 1 | 0;

             continue ;

             

@@ -9446,16 +9165,15 @@
     var indent;

     if (nstart === nend) {

       indent = 0;

-    }

-    else {

+    } else {

       try {

         indent = Caml_format.caml_int_of_string($$String.sub(str, nstart, nend - nstart | 0));

       }

-      catch (exn){

+      catch (raw_exn){

+        var exn = Js_exn.internalToOCamlException(raw_exn);

         if (exn[0] === Caml_builtin_exceptions.failure) {

           indent = invalid_box(/* () */0);

-        }

-        else {

+        } else {

           throw exn;

         }

       }

@@ -9498,14 +9216,12 @@
             /* No_padding */0,

             fmt

           ];

-  }

-  else if (pad.tag) {

+  } else if (pad.tag) {

     return /* Padding_fmt_EBB */[

             /* Arg_padding */Block.__(1, [pad[0]]),

             fmt

           ];

-  }

-  else {

+  } else {

     return /* Padding_fmt_EBB */[

             /* Lit_padding */Block.__(0, [

                 pad[0],

@@ -9523,15 +9239,13 @@
               /* Arg_precision */1,

               fmt

             ];

-    }

-    else {

+    } else {

       return /* Precision_fmt_EBB */[

               /* No_precision */0,

               fmt

             ];

     }

-  }

-  else {

+  } else {

     return /* Precision_fmt_EBB */[

             /* Lit_precision */[prec[0]],

             fmt

@@ -9549,15 +9263,13 @@
             prec$1,

             fmt$prime

           ];

-  }

-  else if (pad.tag) {

+  } else if (pad.tag) {

     return /* Padprec_fmt_EBB */[

             /* Arg_padding */Block.__(1, [pad[0]]),

             prec$1,

             fmt$prime

           ];

-  }

-  else {

+  } else {

     return /* Padprec_fmt_EBB */[

             /* Lit_padding */Block.__(0, [

                 pad[0],

@@ -9665,62 +9377,48 @@
       if (plus !== 0) {

         if (sharp !== 0) {

           exit$1 = 2;

-        }

-        else if (space !== 0) {

+        } else if (space !== 0) {

           exit = 1;

-        }

-        else if (symb !== 100) {

+        } else if (symb !== 100) {

           if (symb !== 105) {

             exit = 1;

-          }

-          else {

+          } else {

             return /* Int_pi */4;

           }

-        }

-        else {

+        } else {

           return /* Int_pd */1;

         }

-      }

-      else if (sharp !== 0) {

+      } else if (sharp !== 0) {

         if (space !== 0) {

           exit$1 = 2;

-        }

-        else if (symb !== 88) {

+        } else if (symb !== 88) {

           if (symb !== 111) {

             if (symb !== 120) {

               exit$1 = 2;

-            }

-            else {

+            } else {

               return /* Int_Cx */7;

             }

-          }

-          else {

+          } else {

             return /* Int_Co */11;

           }

-        }

-        else {

+        } else {

           return /* Int_CX */9;

         }

-      }

-      else if (space !== 0) {

+      } else if (space !== 0) {

         if (symb !== 100) {

           if (symb !== 105) {

             exit = 1;

-          }

-          else {

+          } else {

             return /* Int_si */5;

           }

-        }

-        else {

+        } else {

           return /* Int_sd */2;

         }

-      }

-      else {

+      } else {

         var switcher = symb - 88 | 0;

         if (switcher > 32 || switcher < 0) {

           exit = 1;

-        }

-        else {

+        } else {

           switch (switcher) {

             case 0 : 

                 return /* Int_X */8;

@@ -9772,22 +9470,19 @@
         var switcher$1 = symb - 88 | 0;

         if (switcher$1 > 32 || switcher$1 < 0) {

           exit = 1;

-        }

-        else {

+        } else {

           switch (switcher$1) {

             case 0 : 

                 if (legacy_behavior$1) {

                   return /* Int_CX */9;

-                }

-                else {

+                } else {

                   exit = 1;

                 }

                 break;

             case 23 : 

                 if (legacy_behavior$1) {

                   return /* Int_Co */11;

-                }

-                else {

+                } else {

                   exit = 1;

                 }

                 break;

@@ -9828,8 +9523,7 @@
             case 32 : 

                 if (legacy_behavior$1) {

                   return /* Int_Cx */7;

-                }

-                else {

+                } else {

                   exit = 1;

                 }

                 break;

@@ -9841,8 +9535,7 @@
             _sharp = /* false */0;

             continue ;

             

-          }

-          else {

+          } else {

             return incompatible_flag(pct_ind, str_ind, symb, "'#'");

           }

         }

@@ -9855,31 +9548,25 @@
               _space = /* false */0;

               continue ;

               

-            }

-            else {

+            } else {

               return incompatible_flag(pct_ind, str_ind, /* " " */32, "'+'");

             }

-          }

-          else if (legacy_behavior$1) {

+          } else if (legacy_behavior$1) {

             _plus = /* false */0;

             continue ;

             

-          }

-          else {

+          } else {

             return incompatible_flag(pct_ind, str_ind, symb, "'+'");

           }

-        }

-        else if (space !== 0) {

+        } else if (space !== 0) {

           if (legacy_behavior$1) {

             _space = /* false */0;

             continue ;

             

-          }

-          else {

+          } else {

             return incompatible_flag(pct_ind, str_ind, symb, "' '");

           }

-        }

-        else {

+        } else {

           throw [

                 Caml_builtin_exceptions.assert_failure,

                 [

@@ -9942,8 +9629,7 @@
                 str_ind,

                 acc

               ];

-      }

-      else {

+      } else {

         var new_acc = Caml_int32.imul(acc, 10) + (c - /* "0" */48 | 0) | 0;

         if (new_acc > Sys.max_string_length) {

           return Curry._3(failwith_message(/* Format */[

@@ -9972,8 +9658,7 @@
                             ]),

                           "invalid format %S: integer %d is greater than the limit %d"

                         ]), str, new_acc, Sys.max_string_length);

-        }

-        else {

+        } else {

           _acc = new_acc;

           _str_ind = str_ind + 1 | 0;

           continue ;

@@ -9994,30 +9679,25 @@
       if (typeof prec === "number") {

         if (prec !== 0) {

           exit = 1;

-        }

-        else {

+        } else {

           return parse_conv(/* No_padding */0);

         }

-      }

-      else {

+      } else {

         exit = 1;

       }

       if (exit === 1) {

         if (minus !== 0) {

           if (typeof prec === "number") {

             return parse_conv(/* Arg_padding */Block.__(1, [/* Left */0]));

-          }

-          else {

+          } else {

             return parse_conv(/* Lit_padding */Block.__(0, [

                           /* Left */0,

                           prec[0]

                         ]));

           }

-        }

-        else if (typeof prec === "number") {

+        } else if (typeof prec === "number") {

           return parse_conv(/* Arg_padding */Block.__(1, [/* Right */1]));

-        }

-        else {

+        } else {

           return parse_conv(/* Lit_padding */Block.__(0, [

                         /* Right */1,

                         prec[0]

@@ -10025,8 +9705,7 @@
         }

       }

       

-    }

-    else {

+    } else {

       return parse_conv(pad);

     }

   };

@@ -10037,8 +9716,7 @@
     var symb = Caml_string.get(str, str_ind);

     if (symb !== 46) {

       return parse_conversion(pct_ind, str_ind + 1 | 0, end_ind, plus, sharp, space, ign, pad, /* No_precision */0, pad, symb);

-    }

-    else {

+    } else {

       var pct_ind$1 = pct_ind;

       var str_ind$1 = str_ind + 1 | 0;

       var end_ind$1 = end_ind;

@@ -10061,12 +9739,10 @@
       if (symb$1 >= 48) {

         if (symb$1 >= 58) {

           exit = 1;

-        }

-        else {

+        } else {

           return parse_literal(minus$1, str_ind$1);

         }

-      }

-      else if (symb$1 >= 42) {

+      } else if (symb$1 >= 42) {

         switch (symb$1 - 42 | 0) {

           case 0 : 

               return parse_after_precision(pct_ind$1, str_ind$1 + 1 | 0, end_ind$1, minus$1, plus$1, sharp$1, space$1, ign$1, pad$1, /* Arg_precision */1);

@@ -10081,23 +9757,20 @@
               break;

           

         }

-      }

-      else {

+      } else {

         exit = 1;

       }

       if (exit$1 === 2) {

         if (legacy_behavior$1) {

           return parse_literal(minus$1 || +(symb$1 === /* "-" */45), str_ind$1 + 1 | 0);

-        }

-        else {

+        } else {

           exit = 1;

         }

       }

       if (exit === 1) {

         if (legacy_behavior$1) {

           return parse_after_precision(pct_ind$1, str_ind$1, end_ind$1, minus$1, plus$1, sharp$1, space$1, ign$1, pad$1, /* Lit_precision */[0]);

-        }

-        else {

+        } else {

           return invalid_format_without(str_ind$1 - 1 | 0, /* "." */46, "precision");

         }

       }

@@ -10109,21 +9782,18 @@
       var str_ind = _str_ind;

       if (str_ind === end_ind) {

         return add_literal(lit_start, str_ind, /* End_of_format */0);

-      }

-      else {

+      } else {

         var match = Caml_string.get(str, str_ind);

         if (match !== 37) {

           if (match !== 64) {

             _str_ind = str_ind + 1 | 0;

             continue ;

             

-          }

-          else {

+          } else {

             var match$1 = parse_after_at(str_ind + 1 | 0, end_ind);

             return add_literal(lit_start, str_ind, match$1[0]);

           }

-        }

-        else {

+        } else {

           var match$2 = parse_format(str_ind, end_ind);

           return add_literal(lit_start, str_ind, match$2[0]);

         }

@@ -10140,8 +9810,7 @@
     var match = Caml_string.get(str, str_ind);

     if (match !== 95) {

       return parse_flags(pct_ind$1, str_ind, end_ind$1, /* false */0);

-    }

-    else {

+    } else {

       return parse_flags(pct_ind$1, str_ind + 1 | 0, end_ind$1, /* true */1);

     }

   };

@@ -10151,8 +9820,7 @@
                   /* "@" */64,

                   /* End_of_format */0

                 ])];

-    }

-    else {

+    } else {

       var c = Caml_string.get(str, str_ind);

       var exit = 0;

       if (c >= 65) {

@@ -10160,8 +9828,7 @@
           var switcher = c - 123 | 0;

           if (switcher > 2 || switcher < 0) {

             exit = 1;

-          }

-          else {

+          } else {

             switch (switcher) {

               case 0 : 

                   return parse_tag(/* true */1, str_ind + 1 | 0, end_ind);

@@ -10178,8 +9845,7 @@
               

             }

           }

-        }

-        else if (c >= 91) {

+        } else if (c >= 91) {

           switch (c - 91 | 0) {

             case 0 : 

                 return parse_tag(/* false */0, str_ind + 1 | 0, end_ind);

@@ -10195,12 +9861,10 @@
                           ])];

             

           }

-        }

-        else {

+        } else {

           exit = 1;

         }

-      }

-      else if (c !== 10) {

+      } else if (c !== 10) {

         if (c >= 32) {

           switch (c - 32 | 0) {

             case 0 : 

@@ -10222,8 +9886,7 @@
                               /* Escaped_percent */6,

                               match$3[0]

                             ])];

-                }

-                else {

+                } else {

                   var match$4 = parse_literal(str_ind, str_ind, end_ind);

                   return /* Fmt_EBB */[/* Char_literal */Block.__(12, [

                               /* "@" */64,

@@ -10263,15 +9926,12 @@
                   if (match$8 >= 48) {

                     if (match$8 >= 58) {

                       throw Caml_builtin_exceptions.not_found;

-                    }

-                    else {

+                    } else {

                       exit$1 = 1;

                     }

-                  }

-                  else if (match$8 !== 45) {

+                  } else if (match$8 !== 45) {

                     throw Caml_builtin_exceptions.not_found;

-                  }

-                  else {

+                  } else {

                     exit$1 = 1;

                   }

                   if (exit$1 === 1) {

@@ -10283,8 +9943,7 @@
                     if (switcher$1 > 12 || switcher$1 < 0) {

                       if (switcher$1 !== 17) {

                         throw Caml_builtin_exceptions.not_found;

-                      }

-                      else {

+                      } else {

                         var s = $$String.sub(str, str_ind$1 - 2 | 0, (str_ind_3 - str_ind$1 | 0) + 3 | 0);

                         match$7 = /* tuple */[

                           str_ind_3 + 1 | 0,

@@ -10295,11 +9954,9 @@
                             ])

                         ];

                       }

-                    }

-                    else if (switcher$1 === 2 || switcher$1 === 1) {

+                    } else if (switcher$1 === 2 || switcher$1 === 1) {

                       throw Caml_builtin_exceptions.not_found;

-                    }

-                    else {

+                    } else {

                       var match$11 = parse_integer(str_ind_3, end_ind$1);

                       var str_ind_5 = parse_spaces(match$11[0], end_ind$1);

                       if (Caml_string.get(str, str_ind_5) !== /* ">" */62) {

@@ -10318,7 +9975,8 @@
                   }

                   

                 }

-                catch (exn){

+                catch (raw_exn){

+                  var exn = Js_exn.internalToOCamlException(raw_exn);

                   if (exn === Caml_builtin_exceptions.not_found) {

                     match$7 = /* tuple */[

                       str_ind$1,

@@ -10328,8 +9986,7 @@
                           0

                         ])

                     ];

-                  }

-                  else if (exn[0] === Caml_builtin_exceptions.failure) {

+                  } else if (exn[0] === Caml_builtin_exceptions.failure) {

                     match$7 = /* tuple */[

                       str_ind$1,

                       /* Break */Block.__(0, [

@@ -10338,8 +9995,7 @@
                           0

                         ])

                     ];

-                  }

-                  else {

+                  } else {

                     throw exn;

                   }

                 }

@@ -10360,15 +10016,12 @@
                   if (match$14 >= 48) {

                     if (match$14 >= 58) {

                       match$13 = /* None */0;

-                    }

-                    else {

+                    } else {

                       exit$2 = 1;

                     }

-                  }

-                  else if (match$14 !== 45) {

+                  } else if (match$14 !== 45) {

                     match$13 = /* None */0;

-                  }

-                  else {

+                  } else {

                     exit$2 = 1;

                   }

                   if (exit$2 === 1) {

@@ -10388,14 +10041,13 @@
                   }

                   

                 }

-                catch (exn$1){

+                catch (raw_exn$1){

+                  var exn$1 = Js_exn.internalToOCamlException(raw_exn$1);

                   if (exn$1 === Caml_builtin_exceptions.not_found) {

                     match$13 = /* None */0;

-                  }

-                  else if (exn$1[0] === Caml_builtin_exceptions.failure) {

+                  } else if (exn$1[0] === Caml_builtin_exceptions.failure) {

                     match$13 = /* None */0;

-                  }

-                  else {

+                  } else {

                     throw exn$1;

                   }

                 }

@@ -10407,8 +10059,7 @@
                               match$16[1],

                               match$17[0]

                             ])];

-                }

-                else {

+                } else {

                   var match$18 = parse_literal(str_ind$2, str_ind$2, end_ind$2);

                   return /* Fmt_EBB */[/* Formatting_lit */Block.__(17, [

                               /* Scan_indic */Block.__(2, [/* "<" */60]),

@@ -10458,12 +10109,10 @@
                           ])];

             

           }

-        }

-        else {

+        } else {

           exit = 1;

         }

-      }

-      else {

+      } else {

         var beg_ind$8 = str_ind + 1 | 0;

         var match$21 = parse_literal(beg_ind$8, beg_ind$8, end_ind);

         return /* Fmt_EBB */[/* Formatting_lit */Block.__(17, [

@@ -10490,15 +10139,13 @@
                     $$String.sub(str, lit_start, size),

                     fmt

                   ])];

-      }

-      else {

+      } else {

         return /* Fmt_EBB */[/* Char_literal */Block.__(12, [

                     Caml_string.get(str, lit_start),

                     fmt

                   ])];

       }

-    }

-    else {

+    } else {

       return /* Fmt_EBB */[fmt];

     }

   };

@@ -10512,8 +10159,7 @@
         _str_ind = str_ind + 1 | 0;

         continue ;

         

-      }

-      else {

+      } else {

         return str_ind;

       }

     };

@@ -10533,12 +10179,10 @@
                 11

               ]

             ];

-      }

-      else {

+      } else {

         return parse_positive(str_ind, end_ind, 0);

       }

-    }

-    else if (match !== 45) {

+    } else if (match !== 45) {

       throw [

             Caml_builtin_exceptions.assert_failure,

             [

@@ -10547,16 +10191,14 @@
               11

             ]

           ];

-    }

-    else {

+    } else {

       if ((str_ind + 1 | 0) === end_ind) {

         invalid_format_message(end_ind, "unexpected end of format");

       }

       var c = Caml_string.get(str, str_ind + 1 | 0);

       if (c > 57 || c < 48) {

         return expected_character(str_ind + 1 | 0, "digit", c);

-      }

-      else {

+      } else {

         var match$1 = parse_positive(str_ind + 1 | 0, end_ind, 0);

         return /* tuple */[

                 match$1[0],

@@ -10575,19 +10217,16 @@
             _space = /* false */0;

             continue ;

             

-          }

-          else {

+          } else {

             return incompatible_flag(pct_ind, str_ind, /* " " */32, "'+'");

           }

-        }

-        else {

+        } else {

           var exit = 0;

           if (symb >= 72) {

             var switcher = symb - 101 | 0;

             if (switcher > 2 || switcher < 0) {

               exit = 1;

-            }

-            else {

+            } else {

               switch (switcher) {

                 case 0 : 

                     return /* Float_pe */4;

@@ -10598,8 +10237,7 @@
                 

               }

             }

-          }

-          else if (symb >= 69) {

+          } else if (symb >= 69) {

             switch (symb - 69 | 0) {

               case 0 : 

                   return /* Float_pE */7;

@@ -10610,8 +10248,7 @@
                   return /* Float_pG */13;

               

             }

-          }

-          else {

+          } else {

             exit = 1;

           }

           if (exit === 1) {

@@ -10619,22 +10256,19 @@
               _plus = /* false */0;

               continue ;

               

-            }

-            else {

+            } else {

               return incompatible_flag(pct_ind, str_ind, symb, "'+'");

             }

           }

           

         }

-      }

-      else if (space !== 0) {

+      } else if (space !== 0) {

         var exit$1 = 0;

         if (symb >= 72) {

           var switcher$1 = symb - 101 | 0;

           if (switcher$1 > 2 || switcher$1 < 0) {

             exit$1 = 1;

-          }

-          else {

+          } else {

             switch (switcher$1) {

               case 0 : 

                   return /* Float_se */5;

@@ -10645,8 +10279,7 @@
               

             }

           }

-        }

-        else if (symb >= 69) {

+        } else if (symb >= 69) {

           switch (symb - 69 | 0) {

             case 0 : 

                 return /* Float_sE */8;

@@ -10657,8 +10290,7 @@
                 return /* Float_sG */14;

             

           }

-        }

-        else {

+        } else {

           exit$1 = 1;

         }

         if (exit$1 === 1) {

@@ -10666,14 +10298,12 @@
             _space = /* false */0;

             continue ;

             

-          }

-          else {

+          } else {

             return incompatible_flag(pct_ind, str_ind, symb, "' '");

           }

         }

         

-      }

-      else if (symb >= 72) {

+      } else if (symb >= 72) {

         var switcher$2 = symb - 101 | 0;

         if (switcher$2 > 2 || switcher$2 < 0) {

           throw [

@@ -10684,8 +10314,7 @@
                   25

                 ]

               ];

-        }

-        else {

+        } else {

           switch (switcher$2) {

             case 0 : 

                 return /* Float_e */3;

@@ -10696,8 +10325,7 @@
             

           }

         }

-      }

-      else if (symb >= 69) {

+      } else if (symb >= 69) {

         switch (symb - 69 | 0) {

           case 0 : 

               return /* Float_E */6;

@@ -10707,8 +10335,7 @@
               return /* Float_G */12;

           

         }

-      }

-      else {

+      } else {

         throw [

               Caml_builtin_exceptions.assert_failure,

               [

@@ -10730,11 +10357,11 @@
                       /* Caml_string */Block.__(3, [

                           /* No_padding */0,

                           /* String_literal */Block.__(11, [

-                              ': unclosed sub-format, expected "',

+                              ": unclosed sub-format, expected \"",

                               /* Char_literal */Block.__(12, [

                                   /* "%" */37,

                                   /* Char */Block.__(0, [/* String_literal */Block.__(11, [

-                                          '" at character number ',

+                                          "\" at character number ",

                                           /* Int */Block.__(4, [

                                               /* Int_d */0,

                                               /* No_padding */0,

@@ -10746,7 +10373,7 @@
                             ])

                         ])

                     ]),

-                  'invalid format %S: unclosed sub-format, expected "%%%c" at character number %d'

+                  "invalid format %S: unclosed sub-format, expected \"%%%c\" at character number %d"

                 ]), str, c, end_ind);

       }

       var match = Caml_string.get(str, str_ind);

@@ -10754,23 +10381,20 @@
         _str_ind = str_ind + 1 | 0;

         continue ;

         

-      }

-      else {

+      } else {

         if ((str_ind + 1 | 0) === end_ind) {

           invalid_format_message(end_ind, "unexpected end of format");

         }

         if (Caml_string.get(str, str_ind + 1 | 0) === c) {

           return str_ind;

-        }

-        else {

+        } else {

           var match$1 = Caml_string.get(str, str_ind + 1 | 0);

           var exit = 0;

           if (match$1 >= 95) {

             if (match$1 >= 123) {

               if (match$1 >= 126) {

                 exit = 1;

-              }

-              else {

+              } else {

                 switch (match$1 - 123 | 0) {

                   case 0 : 

                       var sub_end = search_subformat_end(str_ind + 2 | 0, end_ind, /* "}" */125);

@@ -10784,11 +10408,9 @@
                   

                 }

               }

-            }

-            else if (match$1 >= 96) {

+            } else if (match$1 >= 96) {

               exit = 1;

-            }

-            else {

+            } else {

               if ((str_ind + 2 | 0) === end_ind) {

                 invalid_format_message(end_ind, "unexpected end of format");

               }

@@ -10798,31 +10420,26 @@
                   _str_ind = str_ind + 3 | 0;

                   continue ;

                   

-                }

-                else {

+                } else {

                   var sub_end$1 = search_subformat_end(str_ind + 3 | 0, end_ind, /* "}" */125);

                   _str_ind = sub_end$1 + 2 | 0;

                   continue ;

                   

                 }

-              }

-              else {

+              } else {

                 var sub_end$2 = search_subformat_end(str_ind + 3 | 0, end_ind, /* ")" */41);

                 _str_ind = sub_end$2 + 2 | 0;

                 continue ;

                 

               }

             }

-          }

-          else if (match$1 !== 40) {

+          } else if (match$1 !== 40) {

             if (match$1 !== 41) {

               exit = 1;

-            }

-            else {

+            } else {

               return expected_character(str_ind + 1 | 0, "character '}'", /* ")" */41);

             }

-          }

-          else {

+          } else {

             var sub_end$3 = search_subformat_end(str_ind + 2 | 0, end_ind, /* ")" */41);

             _str_ind = sub_end$3 + 2 | 0;

             continue ;

@@ -10848,49 +10465,40 @@
     var check_no_0 = function (symb, pad) {

       if (typeof pad === "number") {

         return pad;

-      }

-      else if (pad.tag) {

+      } else if (pad.tag) {

         if (pad[0] >= 2) {

           if (legacy_behavior$1) {

             return /* Arg_padding */Block.__(1, [/* Right */1]);

-          }

-          else {

+          } else {

             return incompatible_flag(pct_ind, str_ind, symb, "0");

           }

-        }

-        else {

+        } else {

           return pad;

         }

-      }

-      else if (pad[0] >= 2) {

+      } else if (pad[0] >= 2) {

         if (legacy_behavior$1) {

           return /* Lit_padding */Block.__(0, [

                     /* Right */1,

                     pad[1]

                   ]);

-        }

-        else {

+        } else {

           return incompatible_flag(pct_ind, str_ind, symb, "0");

         }

-      }

-      else {

+      } else {

         return pad;

       }

     };

     var opt_of_pad = function (c, pad) {

       if (typeof pad === "number") {

         return /* None */0;

-      }

-      else if (pad.tag) {

+      } else if (pad.tag) {

         return incompatible_flag(pct_ind, str_ind, c, "'*'");

-      }

-      else {

+      } else {

         switch (pad[0]) {

           case 0 : 

               if (legacy_behavior$1) {

                 return /* Some */[pad[1]];

-              }

-              else {

+              } else {

                 return incompatible_flag(pct_ind, str_ind, c, "'-'");

               }

           case 1 : 

@@ -10898,8 +10506,7 @@
           case 2 : 

               if (legacy_behavior$1) {

                 return /* Some */[pad[1]];

-              }

-              else {

+              } else {

                 return incompatible_flag(pct_ind, str_ind, c, "'0'");

               }

           

@@ -10911,12 +10518,10 @@
       if (typeof prec === "number") {

         if (prec !== 0) {

           return incompatible_flag(pct_ind, str_ind, /* "_" */95, "'*'");

-        }

-        else {

+        } else {

           return /* None */0;

         }

-      }

-      else {

+      } else {

         return /* Some */[prec[0]];

       }

     };

@@ -10926,8 +10531,7 @@
     var exit$2 = 0;

     if (symb >= 124) {

       exit$1 = 6;

-    }

-    else {

+    } else {

       switch (symb) {

         case 33 : 

             var match = parse_literal(str_ind, str_ind, end_ind);

@@ -10951,8 +10555,7 @@
                     ignored,

                     fmt_rest

                   ])];

-            }

-            else {

+            } else {

               pad_used = /* true */1;

               fmt_result = /* Fmt_EBB */[/* Format_subst */Block.__(14, [

                     opt_of_pad(/* "(" */40, pad),

@@ -10985,8 +10588,7 @@
                     ignored$1,

                     fmt_rest$2

                   ])];

-            }

-            else {

+            } else {

               fmt_result = /* Fmt_EBB */[/* Scan_get_counter */Block.__(21, [

                     /* Token_counter */2,

                     fmt_rest$2

@@ -11005,8 +10607,7 @@
                     ignored$2,

                     fmt_rest$3

                   ])];

-            }

-            else {

+            } else {

               var match$6 = make_padding_fmt_ebb(pad$1, fmt_rest$3);

               fmt_result = /* Fmt_EBB */[/* Caml_string */Block.__(3, [

                     match$6[0],

@@ -11031,8 +10632,7 @@
                     ignored$3,

                     fmt_rest$4

                   ])];

-            }

-            else {

+            } else {

               pad_used = /* true */1;

               fmt_result = /* Fmt_EBB */[/* Scan_char_set */Block.__(20, [

                     opt_of_pad(/* "[" */91, pad),

@@ -11063,8 +10663,7 @@
                             /* Ignored_char */0,

                             fmt_rest

                           ])];

-              }

-              else {

+              } else {

                 return /* Fmt_EBB */[/* Char */Block.__(0, [fmt_rest])];

               }

             };

@@ -11074,8 +10673,7 @@
                             /* Ignored_scan_next_char */4,

                             fmt_rest

                           ])];

-              }

-              else {

+              } else {

                 return /* Fmt_EBB */[/* Scan_next_char */Block.__(22, [fmt_rest])];

               }

             };

@@ -11122,8 +10720,7 @@
                     ignored$4,

                     fmt_rest$7

                   ])];

-            }

-            else {

+            } else {

               var match$14 = make_padding_fmt_ebb(pad$2, fmt_rest$7);

               fmt_result = /* Fmt_EBB */[/* String */Block.__(2, [

                     match$14[0],

@@ -11250,8 +10847,7 @@
                     ignored$5,

                     fmt_rest$8

                   ])];

-            }

-            else {

+            } else {

               pad_used = /* true */1;

               fmt_result = /* Fmt_EBB */[/* Format_arg */Block.__(13, [

                     opt_of_pad(/* "{" */123, pad),

@@ -11282,16 +10878,14 @@
                   ignored$6,

                   fmt_rest$9

                 ])];

-          }

-          else {

+          } else {

             pad_used = /* true */1;

             prec_used[0] = /* true */1;

             var pad$3;

             var exit$3 = 0;

             if (typeof prec === "number" && prec === 0) {

               pad$3 = pad;

-            }

-            else {

+            } else {

               exit$3 = 9;

             }

             if (exit$3 === 9) {

@@ -11330,15 +10924,13 @@
                     ignored$7,

                     fmt_rest$10

                   ])];

-            }

-            else {

+            } else {

               fmt_result = /* Fmt_EBB */[/* Scan_get_counter */Block.__(21, [

                     counter,

                     fmt_rest$10

                   ])];

             }

-          }

-          else {

+          } else {

             exit$1 = 6;

           }

           break;

@@ -11363,8 +10955,7 @@
                   ignored$8,

                   fmt_rest$11

                 ])];

-          }

-          else {

+          } else {

             pad_used = /* true */1;

             var match$22 = make_padprec_fmt_ebb(pad, (prec_used[0] = /* true */1, prec), fmt_rest$11);

             fmt_result = /* Fmt_EBB */[/* Float */Block.__(8, [

@@ -11426,8 +11017,7 @@
           if (symb >= 108) {

             if (symb >= 111) {

               exit = 1;

-            }

-            else {

+            } else {

               switch (symb - 108 | 0) {

                 case 0 : 

                     plus_used = /* true */1;

@@ -11448,8 +11038,7 @@
                             ignored$9,

                             fmt_rest$13

                           ])];

-                    }

-                    else {

+                    } else {

                       pad_used = /* true */1;

                       var match$26 = make_padprec_fmt_ebb(pad, (prec_used[0] = /* true */1, prec), fmt_rest$13);

                       fmt_result = /* Fmt_EBB */[/* Int32 */Block.__(5, [

@@ -11482,8 +11071,7 @@
                             ignored$10,

                             fmt_rest$14

                           ])];

-                    }

-                    else {

+                    } else {

                       pad_used = /* true */1;

                       var match$28 = make_padprec_fmt_ebb(pad, (prec_used[0] = /* true */1, prec), fmt_rest$14);

                       fmt_result = /* Fmt_EBB */[/* Nativeint */Block.__(6, [

@@ -11497,11 +11085,9 @@
                 

               }

             }

-          }

-          else if (symb !== 76) {

+          } else if (symb !== 76) {

             exit = 1;

-          }

-          else {

+          } else {

             plus_used = /* true */1;

             sharp_used = /* true */1;

             space_used = /* true */1;

@@ -11520,8 +11106,7 @@
                     ignored$11,

                     fmt_rest$15

                   ])];

-            }

-            else {

+            } else {

               pad_used = /* true */1;

               var match$30 = make_padprec_fmt_ebb(pad, (prec_used[0] = /* true */1, prec), fmt_rest$15);

               fmt_result = /* Fmt_EBB */[/* Int64 */Block.__(7, [

@@ -11548,7 +11133,7 @@
                                 /* No_padding */0,

                                 /* No_precision */0,

                                 /* String_literal */Block.__(11, [

-                                    ', invalid conversion "',

+                                    ", invalid conversion \"",

                                     /* Char_literal */Block.__(12, [

                                         /* "%" */37,

                                         /* Char */Block.__(0, [/* Char_literal */Block.__(12, [

@@ -11561,7 +11146,7 @@
                           ])

                       ])

                   ]),

-                'invalid format %S: at character number %d, invalid conversion "%%%c"'

+                "invalid format %S: at character number %d, invalid conversion \"%%%c\""

               ]), str, str_ind - 1 | 0, symb);

     }

     if (!legacy_behavior$1) {

@@ -11591,29 +11176,24 @@
         if (symb !== 44) {

           if (symb !== 64) {

             exit$4 = 1;

-          }

-          else if (!legacy_behavior$1) {

+          } else if (!legacy_behavior$1) {

             exit$4 = 1;

           }

           

-        }

-        else if (!legacy_behavior$1) {

+        } else if (!legacy_behavior$1) {

           exit$4 = 1;

         }

         

-      }

-      else if (symb !== 33) {

+      } else if (symb !== 33) {

         if (symb >= 37) {

           if (!legacy_behavior$1) {

             exit$4 = 1;

           }

           

-        }

-        else {

+        } else {

           exit$4 = 1;

         }

-      }

-      else if (!legacy_behavior$1) {

+      } else if (!legacy_behavior$1) {

         exit$4 = 1;

       }

       if (exit$4 === 1) {

@@ -11667,8 +11247,7 @@
       var switcher = match - 32 | 0;

       if (switcher > 16 || switcher < 0) {

         exit = 1;

-      }

-      else {

+      } else {

         switch (switcher) {

           case 0 : 

               set_flag(str_ind$1, space);

@@ -11732,19 +11311,16 @@
         if (match$1 >= 48) {

           if (match$1 >= 58) {

             exit$1 = 1;

-          }

-          else {

+          } else {

             var match$2 = parse_positive(str_ind$2, end_ind$1, 0);

             return parse_after_padding(pct_ind$1, match$2[0], end_ind$1, minus$1, plus$1, sharp$1, space$1, ign$1, /* Lit_padding */Block.__(0, [

                           padty,

                           match$2[1]

                         ]));

           }

-        }

-        else if (match$1 !== 42) {

+        } else if (match$1 !== 42) {

           exit$1 = 1;

-        }

-        else {

+        } else {

           return parse_after_padding(pct_ind$1, str_ind$2 + 1 | 0, end_ind$1, minus$1, plus$1, sharp$1, space$1, ign$1, /* Arg_padding */Block.__(1, [padty]));

         }

         if (exit$1 === 1) {

@@ -11773,8 +11349,7 @@
     var switcher = symb - 88 | 0;

     if (switcher > 32 || switcher < 0) {

       return /* false */0;

-    }

-    else {

+    } else {

       switch (switcher) {

         case 1 : 

         case 2 : 

@@ -11820,8 +11395,7 @@
     if (symb >= 108) {

       if (symb >= 111) {

         exit = 1;

-      }

-      else {

+      } else {

         switch (symb - 108 | 0) {

           case 0 : 

               return /* Line_counter */0;

@@ -11833,11 +11407,9 @@
           

         }

       }

-    }

-    else if (symb !== 76) {

+    } else if (symb !== 76) {

       exit = 1;

-    }

-    else {

+    } else {

       return /* Token_counter */2;

     }

     if (exit === 1) {

@@ -11915,17 +11487,14 @@
           if (c$prime !== 64) {

             if (c$prime !== 93) {

               exit = 1;

-            }

-            else {

+            } else {

               add_in_char_set(char_set, c);

               return str_ind + 1 | 0;

             }

-          }

-          else {

+          } else {

             exit$1 = 2;

           }

-        }

-        else if (c$prime !== 37) {

+        } else if (c$prime !== 37) {

           if (c$prime >= 45) {

             var str_ind$1 = str_ind + 1 | 0;

             var end_ind$1 = end_ind;

@@ -11938,14 +11507,12 @@
               if (c$prime$1 !== 93) {

                 add_range(c$1, c$prime$1);

                 return parse_char_set_content(str_ind$1 + 1 | 0, end_ind$1);

-              }

-              else {

+              } else {

                 add_in_char_set(char_set, c$1);

                 add_in_char_set(char_set, /* "-" */45);

                 return str_ind$1 + 1 | 0;

               }

-            }

-            else {

+            } else {

               if ((str_ind$1 + 1 | 0) === end_ind$1) {

                 invalid_format_message(end_ind$1, "unexpected end of format");

               }

@@ -11954,12 +11521,10 @@
               if (c$prime$2 !== 37) {

                 if (c$prime$2 !== 64) {

                   return fail_single_percent(str_ind$1);

-                }

-                else {

+                } else {

                   exit$2 = 1;

                 }

-              }

-              else {

+              } else {

                 exit$2 = 1;

               }

               if (exit$2 === 1) {

@@ -11968,20 +11533,17 @@
               }

               

             }

-          }

-          else {

+          } else {

             exit = 1;

           }

-        }

-        else {

+        } else {

           exit$1 = 2;

         }

         if (exit$1 === 2) {

           if (c === /* "%" */37) {

             add_in_char_set(char_set, c$prime);

             return parse_char_set_content(str_ind + 1 | 0, end_ind);

-          }

-          else {

+          } else {

             exit = 1;

           }

         }

@@ -12008,12 +11570,10 @@
         if (c !== 45) {

           if (c !== 93) {

             return parse_char_set_after_char(str_ind + 1 | 0, end_ind, c);

-          }

-          else {

+          } else {

             return str_ind + 1 | 0;

           }

-        }

-        else {

+        } else {

           add_in_char_set(char_set, /* "-" */45);

           _str_ind = str_ind + 1 | 0;

           continue ;

@@ -12049,27 +11609,24 @@
   var check_open_box = function (fmt) {

     if (typeof fmt === "number") {

       return /* () */0;

-    }

-    else if (fmt.tag === 11) {

+    } else if (fmt.tag === 11) {

       if (typeof fmt[1] === "number") {

         try {

           open_box_of_string(fmt[0]);

           return /* () */0;

         }

-        catch (exn){

+        catch (raw_exn){

+          var exn = Js_exn.internalToOCamlException(raw_exn);

           if (exn[0] === Caml_builtin_exceptions.failure) {

             return /* () */0;

-          }

-          else {

+          } else {

             throw exn;

           }

         }

-      }

-      else {

+      } else {

         return /* () */0;

       }

-    }

-    else {

+    } else {

       return /* () */0;

     }

   };

@@ -12081,8 +11638,7 @@
       var match = Caml_string.get(str, str_ind);

       if (match !== 60) {

         throw Caml_builtin_exceptions.not_found;

-      }

-      else {

+      } else {

         var ind = $$String.index_from(str, str_ind + 1 | 0, /* ">" */62);

         if (ind >= end_ind) {

           throw Caml_builtin_exceptions.not_found;

@@ -12115,8 +11671,7 @@
                     formatting$1,

                     match$3[0]

                   ])];

-      }

-      else {

+      } else {

         throw exn;

       }

     }

@@ -12150,8 +11705,7 @@
                         ]),

                       "bad input: format type mismatch between %S and %S"

                     ]), str, string_of_fmtty(fmtty));

-    }

-    else {

+    } else {

       throw exn;

     }

   }

@@ -12183,8 +11737,7 @@
                         ]),

                       "bad input: format type mismatch between %S and %S"

                     ]), str, param[1]);

-    }

-    else {

+    } else {

       throw exn;

     }

   }

@@ -12224,8 +11777,8 @@
 //////// start of caml_io.js ////////

 'use strict';

 

-var Curry                   = require("./curry");

-var Caml_builtin_exceptions = require("./caml_builtin_exceptions");

+var Curry                   = require("./curry.js");

+var Caml_builtin_exceptions = require("./caml_builtin_exceptions.js");

 

 function $caret(prim, prim$1) {

   return prim + prim$1;

@@ -12239,12 +11792,10 @@
     var v = s.length - 1 | 0;

     if (( (typeof process !== "undefined") && process.stdout && process.stdout.write)) {

       return ( process.stdout.write )(s);

-    }

-    else if (s[v] === "\n") {

+    } else if (s[v] === "\n") {

       console.log(s.slice(0, v));

       return /* () */0;

-    }

-    else {

+    } else {

       console.log(s);

       return /* () */0;

     }

@@ -12258,8 +11809,7 @@
     if (s[v] === "\n") {

       console.log(s.slice(0, v));

       return /* () */0;

-    }

-    else {

+    } else {

       console.log(s);

       return /* () */0;

     }

@@ -12285,8 +11835,7 @@
     Curry._2(oc[/* output */1], oc, oc[/* buffer */0]);

     oc[/* buffer */0] = "";

     return /* () */0;

-  }

-  else {

+  } else {

     return 0;

   }

 }

@@ -12300,14 +11849,12 @@
   var str$1 = offset === 0 && len === str.length ? str : str.slice(offset, len);

   if (( (typeof process !== "undefined") && process.stdout && process.stdout.write ) && oc === stdout) {

     return ( process.stdout.write )(str$1);

-  }

-  else {

+  } else {

     var id = str$1.lastIndexOf("\n");

     if (id < 0) {

       oc[/* buffer */0] = oc[/* buffer */0] + str$1;

       return /* () */0;

-    }

-    else {

+    } else {

       oc[/* buffer */0] = oc[/* buffer */0] + str$1.slice(0, id + 1 | 0);

       caml_ml_flush(oc);

       oc[/* buffer */0] = oc[/* buffer */0] + str$1.slice(id + 1 | 0);

@@ -12368,7 +11915,7 @@
 //////// start of caml_lexer.js ////////

 'use strict';

 

-var Caml_builtin_exceptions = require("./caml_builtin_exceptions");

+var Caml_builtin_exceptions = require("./caml_builtin_exceptions.js");

 

 function fail() {

   throw [

@@ -12708,13 +12255,28 @@
   };

 

 

+  _registry['caml_missing_polyfill'] = function() {

+    let exports = {};

+//////// start of caml_missing_polyfill.js ////////

+'use strict';

+

+

+var not_implemented = (function (s){ throw new Error(s)});

+

+exports.not_implemented = not_implemented;

+/* not_implemented Not a pure module */

+//////// end of caml_missing_polyfill.js ////////

+    return exports;

+  };

+

+

   _registry['caml_obj'] = function() {

     let exports = {};

 //////// start of caml_obj.js ////////

 'use strict';

 

-var Block                   = require("./block");

-var Caml_builtin_exceptions = require("./caml_builtin_exceptions");

+var Block                   = require("./block.js");

+var Caml_builtin_exceptions = require("./caml_builtin_exceptions.js");

 

 function caml_obj_dup(x) {

   var len = x.length;

@@ -12733,15 +12295,13 @@
           Caml_builtin_exceptions.invalid_argument,

           "Obj.truncate"

         ];

-  }

-  else if (len !== new_size) {

+  } else if (len !== new_size) {

     for(var i = new_size ,i_finish = len - 1 | 0; i <= i_finish; ++i){

       x[i] = 0;

     }

     x.length = new_size;

     return /* () */0;

-  }

-  else {

+  } else {

     return 0;

   }

 }

@@ -12759,8 +12319,7 @@
   if (y_tag !== 0) {

     x.tag = y_tag;

     return /* () */0;

-  }

-  else {

+  } else {

     return 0;

   }

 }

@@ -12768,11 +12327,9 @@
 function caml_int_compare(x, y) {

   if (x < y) {

     return -1;

-  }

-  else if (x === y) {

+  } else if (x === y) {

     return 0;

-  }

-  else {

+  } else {

     return 1;

   }

 }

@@ -12781,136 +12338,132 @@
   while(true) {

     var b = _b;

     var a = _a;

-    if (typeof a === "string") {

+    var a_type = typeof a;

+    var b_type = typeof b;

+    if (a_type === "string") {

       var x = a;

       var y = b;

       if (x < y) {

         return -1;

-      }

-      else if (x === y) {

+      } else if (x === y) {

         return 0;

-      }

-      else {

+      } else {

         return 1;

       }

-    }

-    else if (typeof a === "number") {

-      return caml_int_compare(a, b);

-    }

-    else if (typeof a === "boolean" || typeof a === "null" || typeof a === "undefined") {

-      var x$1 = a;

-      var y$1 = b;

-      if (x$1 === y$1) {

-        return 0;

-      }

-      else if (x$1 < y$1) {

-        return -1;

-      }

-      else {

-        return 1;

-      }

-    }

-    else {

-      var tag_a = a.tag | 0;

-      var tag_b = b.tag | 0;

-      if (tag_a === 250) {

-        _a = a[0];

-        continue ;

-        

-      }

-      else if (tag_b === 250) {

-        _b = b[0];

-        continue ;

-        

-      }

-      else if (tag_a === 248) {

-        return caml_int_compare(a[1], b[1]);

-      }

-      else if (tag_a === 251) {

-        throw [

-              Caml_builtin_exceptions.invalid_argument,

-              "equal: abstract value"

-            ];

-      }

-      else if (tag_a !== tag_b) {

-        if (tag_a < tag_b) {

+    } else {

+      var is_a_number = +(a_type === "number");

+      var is_b_number = +(b_type === "number");

+      if (is_a_number !== 0) {

+        if (is_b_number !== 0) {

+          return caml_int_compare(a, b);

+        } else {

           return -1;

         }

-        else {

+      } else if (is_b_number !== 0) {

+        return 1;

+      } else if (a_type === "boolean" || a_type === "null" || a_type === "undefined") {

+        var x$1 = a;

+        var y$1 = b;

+        if (x$1 === y$1) {

+          return 0;

+        } else if (x$1 < y$1) {

+          return -1;

+        } else {

           return 1;

         }

-      }

-      else {

-        var len_a = a.length;

-        var len_b = b.length;

-        if (len_a === len_b) {

-          var a$1 = a;

-          var b$1 = b;

-          var _i = 0;

-          var same_length = len_a;

-          while(true) {

-            var i = _i;

-            if (i === same_length) {

-              return 0;

-            }

-            else {

-              var res = caml_compare(a$1[i], b$1[i]);

-              if (res !== 0) {

-                return res;

+      } else if (a_type === "function" || b_type === "function") {

+        throw [

+              Caml_builtin_exceptions.invalid_argument,

+              "compare: functional value"

+            ];

+      } else {

+        var tag_a = a.tag | 0;

+        var tag_b = b.tag | 0;

+        if (tag_a === 250) {

+          _a = a[0];

+          continue ;

+          

+        } else if (tag_b === 250) {

+          _b = b[0];

+          continue ;

+          

+        } else if (tag_a === 248) {

+          return caml_int_compare(a[1], b[1]);

+        } else if (tag_a === 251) {

+          throw [

+                Caml_builtin_exceptions.invalid_argument,

+                "equal: abstract value"

+              ];

+        } else if (tag_a !== tag_b) {

+          if (tag_a < tag_b) {

+            return -1;

+          } else {

+            return 1;

+          }

+        } else {

+          var len_a = a.length;

+          var len_b = b.length;

+          if (len_a === len_b) {

+            var a$1 = a;

+            var b$1 = b;

+            var _i = 0;

+            var same_length = len_a;

+            while(true) {

+              var i = _i;

+              if (i === same_length) {

+                return 0;

+              } else {

+                var res = caml_compare(a$1[i], b$1[i]);

+                if (res !== 0) {

+                  return res;

+                } else {

+                  _i = i + 1 | 0;

+                  continue ;

+                  

+                }

               }

-              else {

-                _i = i + 1 | 0;

-                continue ;

-                

+            };

+          } else if (len_a < len_b) {

+            var a$2 = a;

+            var b$2 = b;

+            var _i$1 = 0;

+            var short_length = len_a;

+            while(true) {

+              var i$1 = _i$1;

+              if (i$1 === short_length) {

+                return -1;

+              } else {

+                var res$1 = caml_compare(a$2[i$1], b$2[i$1]);

+                if (res$1 !== 0) {

+                  return res$1;

+                } else {

+                  _i$1 = i$1 + 1 | 0;

+                  continue ;

+                  

+                }

               }

-            }

-          };

-        }

-        else if (len_a < len_b) {

-          var a$2 = a;

-          var b$2 = b;

-          var _i$1 = 0;

-          var short_length = len_a;

-          while(true) {

-            var i$1 = _i$1;

-            if (i$1 === short_length) {

-              return -1;

-            }

-            else {

-              var res$1 = caml_compare(a$2[i$1], b$2[i$1]);

-              if (res$1 !== 0) {

-                return res$1;

+            };

+          } else {

+            var a$3 = a;

+            var b$3 = b;

+            var _i$2 = 0;

+            var short_length$1 = len_b;

+            while(true) {

+              var i$2 = _i$2;

+              if (i$2 === short_length$1) {

+                return 1;

+              } else {

+                var res$2 = caml_compare(a$3[i$2], b$3[i$2]);

+                if (res$2 !== 0) {

+                  return res$2;

+                } else {

+                  _i$2 = i$2 + 1 | 0;

+                  continue ;

+                  

+                }

               }

-              else {

-                _i$1 = i$1 + 1 | 0;

-                continue ;

-                

-              }

-            }

-          };

-        }

-        else {

-          var a$3 = a;

-          var b$3 = b;

-          var _i$2 = 0;

-          var short_length$1 = len_b;

-          while(true) {

-            var i$2 = _i$2;

-            if (i$2 === short_length$1) {

-              return 1;

-            }

-            else {

-              var res$2 = caml_compare(a$3[i$2], b$3[i$2]);

-              if (res$2 !== 0) {

-                return res$2;

-              }

-              else {

-                _i$2 = i$2 + 1 | 0;

-                continue ;

-                

-              }

-            }

-          };

+            };

+          }

         }

       }

     }

@@ -12923,60 +12476,63 @@
     var a = _a;

     if (a === b) {

       return /* true */1;

-    }

-    else if (typeof a === "string" || typeof a === "number" || typeof a === "boolean" || typeof a === "undefined" || typeof a === "null") {

-      return /* false */0;

-    }

-    else {

-      var tag_a = a.tag | 0;

-      var tag_b = b.tag | 0;

-      if (tag_a === 250) {

-        _a = a[0];

-        continue ;

-        

-      }

-      else if (tag_b === 250) {

-        _b = b[0];

-        continue ;

-        

-      }

-      else if (tag_a === 248) {

-        return +(a[1] === b[1]);

-      }

-      else if (tag_a === 251) {

-        throw [

-              Caml_builtin_exceptions.invalid_argument,

-              "equal: abstract value"

-            ];

-      }

-      else if (tag_a !== tag_b) {

+    } else {

+      var a_type = typeof a;

+      if (a_type === "string" || a_type === "number" || a_type === "boolean" || a_type === "undefined" || a_type === "null") {

         return /* false */0;

-      }

-      else {

-        var len_a = a.length;

-        var len_b = b.length;

-        if (len_a === len_b) {

-          var a$1 = a;

-          var b$1 = b;

-          var _i = 0;

-          var same_length = len_a;

-          while(true) {

-            var i = _i;

-            if (i === same_length) {

-              return /* true */1;

-            }

-            else if (caml_equal(a$1[i], b$1[i])) {

-              _i = i + 1 | 0;

-              continue ;

-              

-            }

-            else {

+      } else {

+        var b_type = typeof b;

+        if (a_type === "function" || b_type === "function") {

+          throw [

+                Caml_builtin_exceptions.invalid_argument,

+                "equal: functional value"

+              ];

+        } else if (b_type === "number" || b_type === "null" || b_type === "undefined") {

+          return /* false */0;

+        } else {

+          var tag_a = a.tag | 0;

+          var tag_b = b.tag | 0;

+          if (tag_a === 250) {

+            _a = a[0];

+            continue ;

+            

+          } else if (tag_b === 250) {

+            _b = b[0];

+            continue ;

+            

+          } else if (tag_a === 248) {

+            return +(a[1] === b[1]);

+          } else if (tag_a === 251) {

+            throw [

+                  Caml_builtin_exceptions.invalid_argument,

+                  "equal: abstract value"

+                ];

+          } else if (tag_a !== tag_b) {

+            return /* false */0;

+          } else {

+            var len_a = a.length;

+            var len_b = b.length;

+            if (len_a === len_b) {

+              var a$1 = a;

+              var b$1 = b;

+              var _i = 0;

+              var same_length = len_a;

+              while(true) {

+                var i = _i;

+                if (i === same_length) {

+                  return /* true */1;

+                } else if (caml_equal(a$1[i], b$1[i])) {

+                  _i = i + 1 | 0;

+                  continue ;

+                  

+                } else {

+                  return /* false */0;

+                }

+              };

+            } else {

               return /* false */0;

             }

-          };

-        }

-        else {

-          return /* false */0;

+          }

         }

       }

     }

@@ -13027,58 +12583,6 @@
   };

 

 

-  _registry['caml_oo'] = function() {

-    let exports = {};

-//////// start of caml_oo.js ////////

-'use strict';

-

-var Caml_array              = require("./caml_array");

-var Caml_builtin_exceptions = require("./caml_builtin_exceptions");

-

-var caml_methods_cache = Caml_array.caml_make_vect(1000, 0);

-

-function caml_get_public_method(obj, tag, cacheid) {

-  var meths = obj[0];

-  var offs = caml_methods_cache[cacheid];

-  if (meths[offs] === tag) {

-    return meths[offs - 1 | 0];

-  }

-  else {

-    var aux = function (_i) {

-      while(true) {

-        var i = _i;

-        if (i < 3) {

-          throw [

-                Caml_builtin_exceptions.assert_failure,

-                [

-                  "caml_oo.ml",

-                  54,

-                  20

-                ]

-              ];

-        }

-        else if (meths[i] === tag) {

-          caml_methods_cache[cacheid] = i;

-          return i;

-        }

-        else {

-          _i = i - 2 | 0;

-          continue ;

-          

-        }

-      };

-    };

-    return meths[aux((meths[0] << 1) + 1 | 0) - 1 | 0];

-  }

-}

-

-exports.caml_get_public_method = caml_get_public_method;

-/* No side effect */

-//////// end of caml_oo.js ////////

-    return exports;

-  };

-

-

   _registry['caml_parser'] = function() {

     let exports = {};

 //////// start of caml_parser.js ////////

@@ -13448,7 +12952,7 @@
 }

 

 function caml_set_parser_trace(prim) {

-  return $$caml_set_parser_trace(prim);

+  return +$$caml_set_parser_trace(prim);

 }

 

 exports.caml_parse_engine     = caml_parse_engine;

@@ -13464,9 +12968,9 @@
 //////// start of caml_string.js ////////

 'use strict';

 

-var Caml_builtin_exceptions = require("./caml_builtin_exceptions");

+var Caml_builtin_exceptions = require("./caml_builtin_exceptions.js");

 

-function js_string_of_char(prim) {

+function string_of_char(prim) {

   return String.fromCharCode(prim);

 }

 

@@ -13476,8 +12980,7 @@
           Caml_builtin_exceptions.invalid_argument,

           "index out of bounds"

         ];

-  }

-  else {

+  } else {

     return s.charCodeAt(i);

   }

 }

@@ -13488,8 +12991,7 @@
           Caml_builtin_exceptions.invalid_argument,

           "String.create"

         ];

-  }

-  else {

+  } else {

     return new Array(len);

   }

 }

@@ -13497,11 +12999,9 @@
 function caml_string_compare(s1, s2) {

   if (s1 === s2) {

     return 0;

-  }

-  else if (s1 < s2) {

+  } else if (s1 < s2) {

     return -1;

-  }

-  else {

+  } else {

     return 1;

   }

 }

@@ -13512,8 +13012,7 @@
       s[k] = c;

     }

     return /* () */0;

-  }

-  else {

+  } else {

     return 0;

   }

 }

@@ -13526,8 +13025,7 @@
         s2[i2 + i | 0] = s1.charCodeAt(i1 + i | 0);

       }

       return /* () */0;

-    }

-    else {

+    } else {

       for(var i$1 = 0 ,i_finish$1 = off1 - 1 | 0; i$1 <= i_finish$1; ++i$1){

         s2[i2 + i$1 | 0] = s1.charCodeAt(i1 + i$1 | 0);

       }

@@ -13536,8 +13034,7 @@
       }

       return /* () */0;

     }

-  }

-  else {

+  } else {

     return 0;

   }

 }

@@ -13557,8 +13054,7 @@
           s1$1[i2$1 + j | 0] = s1$1[i1$1 + j | 0];

         }

         return /* () */0;

-      }

-      else if (i1$1 > i2$1) {

+      } else if (i1$1 > i2$1) {

         var range_a$1 = (s1$1.length - i1$1 | 0) - 1 | 0;

         var range_b$1 = len$1 - 1 | 0;

         var range$1 = range_a$1 > range_b$1 ? range_b$1 : range_a$1;

@@ -13566,20 +13062,17 @@
           s1$1[i2$1 + k | 0] = s1$1[i1$1 + k | 0];

         }

         return /* () */0;

-      }

-      else {

+      } else {

         return 0;

       }

-    }

-    else {

+    } else {

       var off1 = s1.length - i1 | 0;

       if (len <= off1) {

         for(var i = 0 ,i_finish = len - 1 | 0; i <= i_finish; ++i){

           s2[i2 + i | 0] = s1[i1 + i | 0];

         }

         return /* () */0;

-      }

-      else {

+      } else {

         for(var i$1 = 0 ,i_finish$1 = off1 - 1 | 0; i$1 <= i_finish$1; ++i$1){

           s2[i2 + i$1 | 0] = s1[i1 + i$1 | 0];

         }

@@ -13589,8 +13082,7 @@
         return /* () */0;

       }

     }

-  }

-  else {

+  } else {

     return 0;

   }

 }

@@ -13612,8 +13104,7 @@
   var s_len = len;

   if (i === 0 && len <= 4096 && len === bytes.length) {

     return String.fromCharCode.apply(null,bytes);

-  }

-  else {

+  } else {

     var offset = 0;

     while(s_len > 0) {

       var next = s_len < 1024 ? s_len : 1024;

@@ -13639,8 +13130,7 @@
 function caml_is_printable(c) {

   if (c > 31) {

     return +(c < 127);

-  }

-  else {

+  } else {

     return /* false */0;

   }

 }

@@ -13659,8 +13149,7 @@
           Caml_builtin_exceptions.invalid_argument,

           "index out of bounds"

         ];

-  }

-  else {

+  } else {

     return s.charCodeAt(i);

   }

 }

@@ -13677,7 +13166,7 @@
 exports.caml_blit_bytes           = caml_blit_bytes;

 exports.caml_string_get16         = caml_string_get16;

 exports.caml_string_get32         = caml_string_get32;

-exports.js_string_of_char         = js_string_of_char;

+exports.string_of_char            = string_of_char;

 exports.get                       = get;

 /* No side effect */

 //////// end of caml_string.js ////////

@@ -13685,6 +13174,106 @@
   };

 

 

+  _registry['caml_sys'] = function() {

+    let exports = {};

+//////// start of caml_sys.js ////////

+'use strict';

+

+var Caml_builtin_exceptions = require("./caml_builtin_exceptions.js");

+

+function caml_sys_getenv(s) {

+  var match = typeof (process) === "undefined" ? undefined : (process);

+  if (match !== undefined) {

+    var match$1 = match.env[s];

+    if (match$1 !== undefined) {

+      return match$1;

+    } else {

+      throw Caml_builtin_exceptions.not_found;

+    }

+  } else {

+    throw Caml_builtin_exceptions.not_found;

+  }

+}

+

+function caml_sys_time() {

+  var match = typeof (process) === "undefined" ? undefined : (process);

+  if (match !== undefined) {

+    return match.uptime();

+  } else {

+    return -1;

+  }

+}

+

+function caml_sys_random_seed() {

+  return /* array */[((Date.now() | 0) ^ 4294967295) * Math.random() | 0];

+}

+

+function caml_sys_system_command() {

+  return 127;

+}

+

+function caml_sys_getcwd() {

+  var match = typeof (process) === "undefined" ? undefined : (process);

+  if (match !== undefined) {

+    return match.cwd();

+  } else {

+    return "/";

+  }

+}

+

+function caml_sys_get_argv() {

+  var match = typeof (process) === "undefined" ? undefined : (process);

+  if (match !== undefined) {

+    return /* tuple */[

+            match.argv[0],

+            match.argv

+          ];

+  } else {

+    return /* tuple */[

+            "",

+            /* array */[""]

+          ];

+  }

+}

+

+function caml_sys_exit(exit_code) {

+  var match = typeof (process) === "undefined" ? undefined : (process);

+  if (match !== undefined) {

+    return match.exit(exit_code);

+  } else {

+    return /* () */0;

+  }

+}

+

+function caml_sys_is_directory() {

+  throw [

+        Caml_builtin_exceptions.failure,

+        "caml_sys_is_directory not implemented"

+      ];

+}

+

+function caml_sys_file_exists() {

+  throw [

+        Caml_builtin_exceptions.failure,

+        "caml_sys_file_exists not implemented"

+      ];

+}

+

+exports.caml_sys_getenv         = caml_sys_getenv;

+exports.caml_sys_time           = caml_sys_time;

+exports.caml_sys_random_seed    = caml_sys_random_seed;

+exports.caml_sys_system_command = caml_sys_system_command;

+exports.caml_sys_getcwd         = caml_sys_getcwd;

+exports.caml_sys_get_argv       = caml_sys_get_argv;

+exports.caml_sys_exit           = caml_sys_exit;

+exports.caml_sys_is_directory   = caml_sys_is_directory;

+exports.caml_sys_file_exists    = caml_sys_file_exists;

+/* No side effect */

+//////// end of caml_sys.js ////////

+    return exports;

+  };

+

+

   _registry['caml_utils'] = function() {

     let exports = {};

 //////// start of caml_utils.js ////////

@@ -13729,8 +13318,8 @@
 //////// start of char.js ////////

 'use strict';

 

-var Caml_string             = require("./caml_string");

-var Caml_builtin_exceptions = require("./caml_builtin_exceptions");

+var Caml_string             = require("./caml_string.js");

+var Caml_builtin_exceptions = require("./caml_builtin_exceptions.js");

 

 function chr(n) {

   if (n < 0 || n > 255) {

@@ -13738,8 +13327,7 @@
           Caml_builtin_exceptions.invalid_argument,

           "Char.chr"

         ];

-  }

-  else {

+  } else {

     return n;

   }

 }

@@ -13749,23 +13337,18 @@
   if (c >= 40) {

     if (c !== 92) {

       exit = c >= 127 ? 1 : 2;

-    }

-    else {

+    } else {

       return "\\\\";

     }

-  }

-  else if (c >= 32) {

+  } else if (c >= 32) {

     if (c >= 39) {

       return "\\'";

-    }

-    else {

+    } else {

       exit = 2;

     }

-  }

-  else if (c >= 14) {

+  } else if (c >= 14) {

     exit = 1;

-  }

-  else {

+  } else {

     switch (c) {

       case 8 : 

           return "\\b";

@@ -13809,8 +13392,7 @@
 function lowercase(c) {

   if (c >= /* "A" */65 && c <= /* "Z" */90 || c >= /* "\192" */192 && c <= /* "\214" */214 || c >= /* "\216" */216 && c <= /* "\222" */222) {

     return c + 32 | 0;

-  }

-  else {

+  } else {

     return c;

   }

 }

@@ -13818,8 +13400,7 @@
 function uppercase(c) {

   if (c >= /* "a" */97 && c <= /* "z" */122 || c >= /* "\224" */224 && c <= /* "\246" */246 || c >= /* "\248" */248 && c <= /* "\254" */254) {

     return c - 32 | 0;

-  }

-  else {

+  } else {

     return c;

   }

 }

@@ -13844,8 +13425,7 @@
 //////// start of curry.js ////////

 'use strict';

 

-var Caml_oo    = require("./caml_oo");

-var Caml_array = require("./caml_array");

+var Caml_array = require("./caml_array.js");

 

 function app(_f, _args) {

   while(true) {

@@ -13861,31 +13441,23 @@
         _f = f.apply(null, Caml_array.caml_array_sub(args, 0, arity$1));

         continue ;

         

-      }

-      else {

+      } else {

         return (function(f,args){

         return function (x) {

           return app(f, args.concat(/* array */[x]));

         }

         }(f,args));

       }

-    }

-    else {

+    } else {

       return f.apply(null, args);

     }

   };

 }

 

-function js(label, cacheid, obj, args) {

-  var meth = Caml_oo.caml_get_public_method(obj, label, cacheid);

-  return app(meth, args);

-}

-

 function curry_1(o, a0, arity) {

   if (arity > 7 || arity < 0) {

     return app(o, /* array */[a0]);

-  }

-  else {

+  } else {

     switch (arity) {

       case 0 : 

       case 1 : 

@@ -13923,22 +13495,16 @@
   var arity = o.length;

   if (arity === 1) {

     return o(a0);

-  }

-  else {

+  } else {

     return curry_1(o, a0, arity);

   }

 }

 

-function js1(label, cacheid, a0) {

-  return _1(Caml_oo.caml_get_public_method(a0, label, cacheid), a0);

-}

-

 function __1(o) {

   var arity = o.length;

   if (arity === 1) {

     return o;

-  }

-  else {

+  } else {

     return function (a0) {

       return _1(o, a0);

     };

@@ -13951,8 +13517,7 @@
                 a0,

                 a1

               ]);

-  }

-  else {

+  } else {

     switch (arity) {

       case 0 : 

       case 1 : 

@@ -13988,22 +13553,16 @@
   var arity = o.length;

   if (arity === 2) {

     return o(a0, a1);

-  }

-  else {

+  } else {

     return curry_2(o, a0, a1, arity);

   }

 }

 

-function js2(label, cacheid, a0, a1) {

-  return _2(Caml_oo.caml_get_public_method(a0, label, cacheid), a0, a1);

-}

-

 function __2(o) {

   var arity = o.length;

   if (arity === 2) {

     return o;

-  }

-  else {

+  } else {

     return function (a0, a1) {

       return _2(o, a0, a1);

     };

@@ -14011,21 +13570,19 @@
 }

 

 function curry_3(o, a0, a1, a2, arity) {

+  var exit = 0;

   if (arity > 7 || arity < 0) {

     return app(o, /* array */[

                 a0,

                 a1,

                 a2

               ]);

-  }

-  else {

+  } else {

     switch (arity) {

       case 0 : 

       case 1 : 

-          return app(o(a0), /* array */[

-                      a1,

-                      a2

-                    ]);

+          exit = 1;

+          break;

       case 2 : 

           return app(o(a0, a1), /* array */[a2]);

       case 3 : 

@@ -14049,28 +13606,29 @@
       

     }

   }

+  if (exit === 1) {

+    return app(o(a0), /* array */[

+                a1,

+                a2

+              ]);

+  }

+  

 }

 

 function _3(o, a0, a1, a2) {

   var arity = o.length;

   if (arity === 3) {

     return o(a0, a1, a2);

-  }

-  else {

+  } else {

     return curry_3(o, a0, a1, a2, arity);

   }

 }

 

-function js3(label, cacheid, a0, a1, a2) {

-  return _3(Caml_oo.caml_get_public_method(a0, label, cacheid), a0, a1, a2);

-}

-

 function __3(o) {

   var arity = o.length;

   if (arity === 3) {

     return o;

-  }

-  else {

+  } else {

     return function (a0, a1, a2) {

       return _3(o, a0, a1, a2);

     };

@@ -14078,6 +13636,7 @@
 }

 

 function curry_4(o, a0, a1, a2, a3, arity) {

+  var exit = 0;

   if (arity > 7 || arity < 0) {

     return app(o, /* array */[

                 a0,

@@ -14085,16 +13644,12 @@
                 a2,

                 a3

               ]);

-  }

-  else {

+  } else {

     switch (arity) {

       case 0 : 

       case 1 : 

-          return app(o(a0), /* array */[

-                      a1,

-                      a2,

-                      a3

-                    ]);

+          exit = 1;

+          break;

       case 2 : 

           return app(o(a0, a1), /* array */[

                       a2,

@@ -14119,28 +13674,30 @@
       

     }

   }

+  if (exit === 1) {

+    return app(o(a0), /* array */[

+                a1,

+                a2,

+                a3

+              ]);

+  }

+  

 }

 

 function _4(o, a0, a1, a2, a3) {

   var arity = o.length;

   if (arity === 4) {

     return o(a0, a1, a2, a3);

-  }

-  else {

+  } else {

     return curry_4(o, a0, a1, a2, a3, arity);

   }

 }

 

-function js4(label, cacheid, a0, a1, a2, a3) {

-  return _4(Caml_oo.caml_get_public_method(a0, label, cacheid), a0, a1, a2, a3);

-}

-

 function __4(o) {

   var arity = o.length;

   if (arity === 4) {

     return o;

-  }

-  else {

+  } else {

     return function (a0, a1, a2, a3) {

       return _4(o, a0, a1, a2, a3);

     };

@@ -14148,6 +13705,7 @@
 }

 

 function curry_5(o, a0, a1, a2, a3, a4, arity) {

+  var exit = 0;

   if (arity > 7 || arity < 0) {

     return app(o, /* array */[

                 a0,

@@ -14156,17 +13714,12 @@
                 a3,

                 a4

               ]);

-  }

-  else {

+  } else {

     switch (arity) {

       case 0 : 

       case 1 : 

-          return app(o(a0), /* array */[

-                      a1,

-                      a2,

-                      a3,

-                      a4

-                    ]);

+          exit = 1;

+          break;

       case 2 : 

           return app(o(a0, a1), /* array */[

                       a2,

@@ -14193,28 +13746,31 @@
       

     }

   }

+  if (exit === 1) {

+    return app(o(a0), /* array */[

+                a1,

+                a2,

+                a3,

+                a4

+              ]);

+  }

+  

 }

 

 function _5(o, a0, a1, a2, a3, a4) {

   var arity = o.length;

   if (arity === 5) {

     return o(a0, a1, a2, a3, a4);

-  }

-  else {

+  } else {

     return curry_5(o, a0, a1, a2, a3, a4, arity);

   }

 }

 

-function js5(label, cacheid, a0, a1, a2, a3, a4) {

-  return _5(Caml_oo.caml_get_public_method(a0, label, cacheid), a0, a1, a2, a3, a4);

-}

-

 function __5(o) {

   var arity = o.length;

   if (arity === 5) {

     return o;

-  }

-  else {

+  } else {

     return function (a0, a1, a2, a3, a4) {

       return _5(o, a0, a1, a2, a3, a4);

     };

@@ -14222,6 +13778,7 @@
 }

 

 function curry_6(o, a0, a1, a2, a3, a4, a5, arity) {

+  var exit = 0;

   if (arity > 7 || arity < 0) {

     return app(o, /* array */[

                 a0,

@@ -14231,18 +13788,12 @@
                 a4,

                 a5

               ]);

-  }

-  else {

+  } else {

     switch (arity) {

       case 0 : 

       case 1 : 

-          return app(o(a0), /* array */[

-                      a1,

-                      a2,

-                      a3,

-                      a4,

-                      a5

-                    ]);

+          exit = 1;

+          break;

       case 2 : 

           return app(o(a0, a1), /* array */[

                       a2,

@@ -14272,28 +13823,32 @@
       

     }

   }

+  if (exit === 1) {

+    return app(o(a0), /* array */[

+                a1,

+                a2,

+                a3,

+                a4,

+                a5

+              ]);

+  }

+  

 }

 

 function _6(o, a0, a1, a2, a3, a4, a5) {

   var arity = o.length;

   if (arity === 6) {

     return o(a0, a1, a2, a3, a4, a5);

-  }

-  else {

+  } else {

     return curry_6(o, a0, a1, a2, a3, a4, a5, arity);

   }

 }

 

-function js6(label, cacheid, a0, a1, a2, a3, a4, a5) {

-  return _6(Caml_oo.caml_get_public_method(a0, label, cacheid), a0, a1, a2, a3, a4, a5);

-}

-

 function __6(o) {

   var arity = o.length;

   if (arity === 6) {

     return o;

-  }

-  else {

+  } else {

     return function (a0, a1, a2, a3, a4, a5) {

       return _6(o, a0, a1, a2, a3, a4, a5);

     };

@@ -14301,6 +13856,7 @@
 }

 

 function curry_7(o, a0, a1, a2, a3, a4, a5, a6, arity) {

+  var exit = 0;

   if (arity > 7 || arity < 0) {

     return app(o, /* array */[

                 a0,

@@ -14311,19 +13867,12 @@
                 a5,

                 a6

               ]);

-  }

-  else {

+  } else {

     switch (arity) {

       case 0 : 

       case 1 : 

-          return app(o(a0), /* array */[

-                      a1,

-                      a2,

-                      a3,

-                      a4,

-                      a5,

-                      a6

-                    ]);

+          exit = 1;

+          break;

       case 2 : 

           return app(o(a0, a1), /* array */[

                       a2,

@@ -14357,28 +13906,33 @@
       

     }

   }

+  if (exit === 1) {

+    return app(o(a0), /* array */[

+                a1,

+                a2,

+                a3,

+                a4,

+                a5,

+                a6

+              ]);

+  }

+  

 }

 

 function _7(o, a0, a1, a2, a3, a4, a5, a6) {

   var arity = o.length;

   if (arity === 7) {

     return o(a0, a1, a2, a3, a4, a5, a6);

-  }

-  else {

+  } else {

     return curry_7(o, a0, a1, a2, a3, a4, a5, a6, arity);

   }

 }

 

-function js7(label, cacheid, a0, a1, a2, a3, a4, a5, a6) {

-  return _7(Caml_oo.caml_get_public_method(a0, label, cacheid), a0, a1, a2, a3, a4, a5, a6);

-}

-

 function __7(o) {

   var arity = o.length;

   if (arity === 7) {

     return o;

-  }

-  else {

+  } else {

     return function (a0, a1, a2, a3, a4, a5, a6) {

       return _7(o, a0, a1, a2, a3, a4, a5, a6);

     };

@@ -14386,6 +13940,7 @@
 }

 

 function curry_8(o, a0, a1, a2, a3, a4, a5, a6, a7, arity) {

+  var exit = 0;

   if (arity > 7 || arity < 0) {

     return app(o, /* array */[

                 a0,

@@ -14397,20 +13952,12 @@
                 a6,

                 a7

               ]);

-  }

-  else {

+  } else {

     switch (arity) {

       case 0 : 

       case 1 : 

-          return app(o(a0), /* array */[

-                      a1,

-                      a2,

-                      a3,

-                      a4,

-                      a5,

-                      a6,

-                      a7

-                    ]);

+          exit = 1;

+          break;

       case 2 : 

           return app(o(a0, a1), /* array */[

                       a2,

@@ -14451,28 +13998,34 @@
       

     }

   }

+  if (exit === 1) {

+    return app(o(a0), /* array */[

+                a1,

+                a2,

+                a3,

+                a4,

+                a5,

+                a6,

+                a7

+              ]);

+  }

+  

 }

 

 function _8(o, a0, a1, a2, a3, a4, a5, a6, a7) {

   var arity = o.length;

   if (arity === 8) {

     return o(a0, a1, a2, a3, a4, a5, a6, a7);

-  }

-  else {

+  } else {

     return curry_8(o, a0, a1, a2, a3, a4, a5, a6, a7, arity);

   }

 }

 

-function js8(label, cacheid, a0, a1, a2, a3, a4, a5, a6, a7) {

-  return _8(Caml_oo.caml_get_public_method(a0, label, cacheid), a0, a1, a2, a3, a4, a5, a6, a7);

-}

-

 function __8(o) {

   var arity = o.length;

   if (arity === 8) {

     return o;

-  }

-  else {

+  } else {

     return function (a0, a1, a2, a3, a4, a5, a6, a7) {

       return _8(o, a0, a1, a2, a3, a4, a5, a6, a7);

     };

@@ -14480,38 +14033,29 @@
 }

 

 exports.app     = app;

-exports.js      = js;

 exports.curry_1 = curry_1;

 exports._1      = _1;

-exports.js1     = js1;

 exports.__1     = __1;

 exports.curry_2 = curry_2;

 exports._2      = _2;

-exports.js2     = js2;

 exports.__2     = __2;

 exports.curry_3 = curry_3;

 exports._3      = _3;

-exports.js3     = js3;

 exports.__3     = __3;

 exports.curry_4 = curry_4;

 exports._4      = _4;

-exports.js4     = js4;

 exports.__4     = __4;

 exports.curry_5 = curry_5;

 exports._5      = _5;

-exports.js5     = js5;

 exports.__5     = __5;

 exports.curry_6 = curry_6;

 exports._6      = _6;

-exports.js6     = js6;

 exports.__6     = __6;

 exports.curry_7 = curry_7;

 exports._7      = _7;

-exports.js7     = js7;

 exports.__7     = __7;

 exports.curry_8 = curry_8;

 exports._8      = _8;

-exports.js8     = js8;

 exports.__8     = __8;

 /* No side effect */

 //////// end of curry.js ////////

@@ -14522,26 +14066,27 @@
   _registry['decode'] = function() {

     let exports = {};

 //////// start of decode.js ////////

-// Generated by BUCKLESCRIPT VERSION 1.4.3 , PLEASE EDIT WITH CARE

+// Generated by BUCKLESCRIPT VERSION 1.7.4, PLEASE EDIT WITH CARE

 'use strict';

 

-var F32             = require("./f32");

-var F64             = require("./f64");

-var I32             = require("./i32");

-var Lib             = require("./lib");

-var List            = require("bs-platform/lib/js/list");

-var Block           = require("bs-platform/lib/js/block");

-var Curry           = require("bs-platform/lib/js/curry");

-var $$Error         = require("./error");

-var Encode          = require("./encode");

-var Printf          = require("bs-platform/lib/js/printf");

-var Source          = require("./source");

-var $$String        = require("bs-platform/lib/js/string");

-var Caml_obj        = require("bs-platform/lib/js/caml_obj");

-var Operators       = require("./operators");

-var Caml_int64      = require("bs-platform/lib/js/caml_int64");

-var Caml_string     = require("bs-platform/lib/js/caml_string");

-var Caml_exceptions = require("bs-platform/lib/js/caml_exceptions");

+var F32             = require("./f32.js");

+var F64             = require("./f64.js");

+var I32             = require("./i32.js");

+var Lib             = require("./lib.js");

+var List            = require("bs-platform/lib/js/list.js");

+var Utf8            = require("./utf8.js");

+var Block           = require("bs-platform/lib/js/block.js");

+var Curry           = require("bs-platform/lib/js/curry.js");

+var $$Error         = require("./error.js");

+var Encode          = require("./encode.js");

+var Printf          = require("bs-platform/lib/js/printf.js");

+var Source          = require("./source.js");

+var $$String        = require("bs-platform/lib/js/string.js");

+var Caml_obj        = require("bs-platform/lib/js/caml_obj.js");

+var Operators       = require("./operators.js");

+var Caml_int64      = require("bs-platform/lib/js/caml_int64.js");

+var Caml_string     = require("bs-platform/lib/js/caml_string.js");

+var Caml_exceptions = require("bs-platform/lib/js/caml_exceptions.js");

 

 var EOS = Caml_exceptions.create("Decode.EOS");

 

@@ -14560,8 +14105,7 @@
 function check(n, s) {

   if ((s[/* pos */2][0] + n | 0) > s[/* bytes */1].length) {

     throw EOS;

-  }

-  else {

+  } else {

     return 0;

   }

 }

@@ -14579,8 +14123,7 @@
 function peek(s) {

   if (eos(s)) {

     return /* None */0;

-  }

-  else {

+  } else {

     return /* Some */[read(s)];

   }

 }

@@ -14637,8 +14180,7 @@
 function $$require(b, s, pos, msg) {

   if (b) {

     return 0;

-  }

-  else {

+  } else {

     return error(s, pos, msg);

   }

 }

@@ -14650,8 +14192,7 @@
   catch (exn){

     if (exn === EOS) {

       return error(s, s[/* bytes */1].length, "unexpected end of binary or function");

-    }

-    else {

+    } else {

       throw exn;

     }

   }

@@ -14701,8 +14242,7 @@
   var x = Caml_int64.of_int32(b & 127);

   if (b & 128) {

     return Caml_int64.or_(x, Caml_int64.lsl_(vuN(n - 7 | 0, s), 7));

-  }

-  else {

+  } else {

     return x;

   }

 }

@@ -14715,14 +14255,12 @@
   var x = Caml_int64.of_int32(b & 127);

   if (b & 128) {

     return Caml_int64.or_(x, Caml_int64.lsl_(vsN(n - 7 | 0, s), 7));

-  }

-  else if (b & 64) {

-    return /* int64 */[

-            /* hi */x[0] | /* hi */-1,

-            /* lo */((x[1] | /* lo */4294967168) >>> 0)

-          ];

-  }

-  else {

+  } else if (b & 64) {

+    return Caml_int64.or_(x, /* int64 */[

+                /* hi */-1,

+                /* lo */4294967168

+              ]);

+  } else {

     return x;

   }

 }

@@ -14752,8 +14290,7 @@
   var n = vuN(32, s)[1] | 0;

   if (n <= s[/* bytes */1].length) {

     return n;

-  }

-  else {

+  } else {

     return error(s, pos, "length out of bounds");

   }

 }

@@ -14776,8 +14313,7 @@
             x,

             list(f, n - 1 | 0, s)

           ];

-  }

-  else {

+  } else {

     return /* [] */0;

   }

 }

@@ -14785,8 +14321,7 @@
 function opt(f, b, s) {

   if (b) {

     return /* Some */[Curry._1(f, s)];

-  }

-  else {

+  } else {

     return /* None */0;

   }

 }

@@ -14796,6 +14331,20 @@
   return list(f, n, s);

 }

 

+function name(s) {

+  var pos = s[/* pos */2][0];

+  try {

+    return Utf8.decode(string(s));

+  }

+  catch (exn){

+    if (exn === Utf8.Utf8) {

+      return error(s, pos, "invalid UTF-8 encoding");

+    } else {

+      throw exn;

+    }

+  }

+}

+

 function sized(f, s) {

   var size = len32(s);

   var start = s[/* pos */2][0];

@@ -14809,8 +14358,7 @@
   var switcher = match + 4 | 0;

   if (switcher > 3 || switcher < 0) {

     return error(s, s[/* pos */2][0] - 1 | 0, "invalid value type");

-  }

-  else {

+  } else {

     switch (switcher) {

       case 0 : 

           return /* F64Type */3;

@@ -14829,8 +14377,7 @@
   var match = vsN(7, s)[1] | 0;

   if (match !== -16) {

     return error(s, s[/* pos */2][0] - 1 | 0, "invalid element type");

-  }

-  else {

+  } else {

     return /* AnyFuncType */0;

   }

 }

@@ -14843,15 +14390,13 @@
               value_type(s),

               /* [] */0

             ];

-    }

-    else {

+    } else {

       guard(function (param) {

             return skip(1, param);

           }, s);

       return /* [] */0;

     }

-  }

-  else {

+  } else {

     return /* :: */[

             value_type(s),

             /* [] */0

@@ -14863,8 +14408,7 @@
   var match = vsN(7, s)[1] | 0;

   if (match !== -32) {

     return error(s, s[/* pos */2][0] - 1 | 0, "invalid function type");

-  }

-  else {

+  } else {

     var ins = vec(value_type, s);

     var out = vec(value_type, s);

     return /* FuncType */[

@@ -14903,12 +14447,10 @@
   if (match !== 0) {

     if (match !== 1) {

       return error(s, s[/* pos */2][0] - 1 | 0, "invalid mutability");

-    }

-    else {

+    } else {

       return /* Mutable */1;

     }

-  }

-  else {

+  } else {

     return /* Immutable */0;

   }

 }

@@ -14941,8 +14483,7 @@
   var b = guard(get, s);

   if (b > 191 || b < 0) {

     return illegal(s, pos, b);

-  }

-  else {

+  } else {

     switch (b) {

       case 0 : 

           return Operators.unreachable;

@@ -14966,8 +14507,7 @@
             var es2 = List.rev(instr_block$prime(s, /* [] */0));

             expect(11, s, "END opcode expected");

             return Operators.if_(ts$2, es1, es2);

-          }

-          else {

+          } else {

             expect(11, s, "END opcode expected");

             return Operators.if_(ts$2, es1, /* [] */0);

           }

@@ -15379,16 +14919,13 @@
           ];

           continue ;

           

-        }

-        else {

+        } else {

           return es;

         }

-      }

-      else {

+      } else {

         return es;

       }

-    }

-    else {

+    } else {

       return es;

     }

   };

@@ -15409,8 +14946,7 @@
   return Curry._2(Lib.Option[/* map */1], function (param) {

               if (param > 11 || param < 0) {

                 return error(s, s[/* pos */2][0], "invalid section id");

-              }

-              else {

+              } else {

                 switch (param) {

                   case 0 : 

                       return /* CustomSection */-808010220;

@@ -15447,8 +14983,7 @@
   if (match && Caml_obj.caml_equal(match[0], tag)) {

     guard(get, s);

     return sized(f, s);

-  }

-  else {

+  } else {

     return $$default;

   }

 }

@@ -15465,12 +15000,11 @@
             }, /* [] */0, s);

 }

 

-function import_kind(s) {

+function import_desc(s) {

   var match = guard(get, s);

   if (match > 3 || match < 0) {

     return error(s, s[/* pos */2][0] - 1 | 0, "invalid import kind");

-  }

-  else {

+  } else {

     switch (match) {

       case 0 : 

           return /* FuncImport */Block.__(0, [at($$var, s)]);

@@ -15486,13 +15020,13 @@
 }

 

 function $$import(s) {

-  var module_name = string(s);

-  var item_name = string(s);

-  var ikind = at(import_kind, s);

+  var module_name = name(s);

+  var item_name = name(s);

+  var idesc = at(import_desc, s);

   return /* record */[

           /* module_name */module_name,

           /* item_name */item_name,

-          /* ikind */ikind

+          /* idesc */idesc

         ];

 }

 

@@ -15538,7 +15072,7 @@
             }, /* [] */0, s);

 }

 

-function global(s) {

+function $$global(s) {

   var gtype = global_type(s);

   var value = $$const(s);

   return /* record */[

@@ -15550,39 +15084,36 @@
 function global_section(s) {

   return section(/* GlobalSection */-872313182, function (param) {

               return vec(function (param) {

-                          return at(global, param);

+                          return at($$global, param);

                         }, param);

             }, /* [] */0, s);

 }

 

-function export_kind(s) {

+function export_desc(s) {

   var match = guard(get, s);

   if (match > 3 || match < 0) {

     return error(s, s[/* pos */2][0] - 1 | 0, "invalid export kind");

-  }

-  else {

+  } else {

     switch (match) {

       case 0 : 

-          return /* FuncExport */0;

+          return /* FuncExport */Block.__(0, [at($$var, s)]);

       case 1 : 

-          return /* TableExport */1;

+          return /* TableExport */Block.__(1, [at($$var, s)]);

       case 2 : 

-          return /* MemoryExport */2;

+          return /* MemoryExport */Block.__(2, [at($$var, s)]);

       case 3 : 

-          return /* GlobalExport */3;

+          return /* GlobalExport */Block.__(3, [at($$var, s)]);

       

     }

   }

 }

 

 function $$export(s) {

-  var name = string(s);

-  var ekind = at(export_kind, s);

-  var item = at($$var, s);

+  var name$1 = name(s);

+  var edesc = at(export_desc, s);

   return /* record */[

-          /* name */name,

-          /* ekind */ekind,

-          /* item */item

+          /* name */name$1,

+          /* edesc */edesc

         ];

 }

 

@@ -15668,7 +15199,7 @@
 

 function custom(size, s) {

   var start = s[/* pos */2][0];

-  string(s);

+  name(s);

   var partial_arg = size - (s[/* pos */2][0] - start | 0) | 0;

   var partial_arg$1 = function (param) {

     return skip(partial_arg, param);

@@ -15688,8 +15219,7 @@
     if (Curry._1(f, s)) {

       continue ;

       

-    }

-    else {

+    } else {

       return 0;

     }

   };

@@ -15762,22 +15292,23 @@
   _registry['encode'] = function() {

     let exports = {};

 //////// start of encode.js ////////

-// Generated by BUCKLESCRIPT VERSION 1.4.3 , PLEASE EDIT WITH CARE

+// Generated by BUCKLESCRIPT VERSION 1.7.4, PLEASE EDIT WITH CARE

 'use strict';

 

-var F32                     = require("./f32");

-var F64                     = require("./f64");

-var Lib                     = require("./lib");

-var Char                    = require("bs-platform/lib/js/char");

-var List                    = require("bs-platform/lib/js/list");

-var Bytes                   = require("bs-platform/lib/js/bytes");

-var Curry                   = require("bs-platform/lib/js/curry");

-var $$Error                 = require("./error");

-var Buffer                  = require("bs-platform/lib/js/buffer");

-var Source                  = require("./source");

-var Caml_obj                = require("bs-platform/lib/js/caml_obj");

-var Caml_int64              = require("bs-platform/lib/js/caml_int64");

-var Caml_builtin_exceptions = require("bs-platform/lib/js/caml_builtin_exceptions");

+var F32                     = require("./f32.js");

+var F64                     = require("./f64.js");

+var Lib                     = require("./lib.js");

+var Char                    = require("bs-platform/lib/js/char.js");

+var List                    = require("bs-platform/lib/js/list.js");

+var Utf8                    = require("./utf8.js");

+var Bytes                   = require("bs-platform/lib/js/bytes.js");

+var Curry                   = require("bs-platform/lib/js/curry.js");

+var $$Error                 = require("./error.js");

+var Buffer                  = require("bs-platform/lib/js/buffer.js");

+var Source                  = require("./source.js");

+var Caml_obj                = require("bs-platform/lib/js/caml_obj.js");

+var Caml_int64              = require("bs-platform/lib/js/caml_int64.js");

+var Caml_builtin_exceptions = require("bs-platform/lib/js/caml_builtin_exceptions.js");

 

 var Code = $$Error.Make(/* module */[]);

 

@@ -15818,7 +15349,10 @@
   var vu64 = function (_i) {

     while(true) {

       var i = _i;

-      var b = i[1] & /* lo */127 | 0;

+      var b = Caml_int64.and_(i, /* int64 */[

+              /* hi */0,

+              /* lo */127

+            ])[1] | 0;

       if (Caml_int64.le(/* int64 */[

               /* hi */0,

               /* lo */0

@@ -15827,8 +15361,7 @@
               /* lo */128

             ])) {

         return u8(b);

-      }

-      else {

+      } else {

         u8(b | 128);

         _i = Caml_int64.lsr_(i, 7);

         continue ;

@@ -15839,7 +15372,10 @@
   var vs64 = function (_i) {

     while(true) {

       var i = _i;

-      var b = i[1] & /* lo */127 | 0;

+      var b = Caml_int64.and_(i, /* int64 */[

+              /* hi */0,

+              /* lo */127

+            ])[1] | 0;

       if (Caml_int64.le(/* int64 */[

               /* hi */-1,

               /* lo */4294967232

@@ -15848,8 +15384,7 @@
               /* lo */64

             ])) {

         return u8(b);

-      }

-      else {

+      } else {

         u8(b | 128);

         _i = Caml_int64.asr_(i, 7);

         continue ;

@@ -15895,8 +15430,8 @@
       throw [

             Caml_builtin_exceptions.assert_failure,

             [

-              "/usr/local/google/home/rossberg/wasm/spec/interpreter/_build/jslib/src/encode.ml",

-              80,

+              "encode.ml",

+              81,

               6

             ]

           ];

@@ -15936,12 +15471,10 @@
     if (param) {

       if (param[1]) {

         return Curry._2(Code[/* error */2], Source.no_region, "cannot encode stack type with arity > 1 (yet)");

-      }

-      else {

+      } else {

         return value_type(param[0]);

       }

-    }

-    else {

+    } else {

       return vs64(/* int64 */[

                   /* hi */-1,

                   /* lo */4294967232

@@ -15977,8 +15510,7 @@
     var param$1 = param[1];

     if (param$1 !== 0) {

       return u8(1);

-    }

-    else {

+    } else {

       return u8(0);

     }

   };

@@ -16011,8 +15543,7 @@
             return u8(0);

         

       }

-    }

-    else {

+    } else {

       switch (match.tag | 0) {

         case 0 : 

             u8(2);

@@ -16078,8 +15609,7 @@
                           if (match$2[1] !== 0) {

                             u8(45);

                             return memop(mo);

-                          }

-                          else {

+                          } else {

                             u8(44);

                             return memop(mo);

                           }

@@ -16087,8 +15617,7 @@
                           if (match$2[1] !== 0) {

                             u8(47);

                             return memop(mo);

-                          }

-                          else {

+                          } else {

                             u8(46);

                             return memop(mo);

                           }

@@ -16096,15 +15625,14 @@
                           throw [

                                 Caml_builtin_exceptions.assert_failure,

                                 [

-                                  "/usr/local/google/home/rossberg/wasm/spec/interpreter/_build/jslib/src/encode.ml",

-                                  182,

+                                  "encode.ml",

+                                  183,

                                   8

                                 ]

                               ];

                       

                     }

-                  }

-                  else {

+                  } else {

                     u8(40);

                     return memop(mo);

                   }

@@ -16118,8 +15646,7 @@
                           if (match$4[1] !== 0) {

                             u8(49);

                             return memop(mo);

-                          }

-                          else {

+                          } else {

                             u8(48);

                             return memop(mo);

                           }

@@ -16127,8 +15654,7 @@
                           if (match$4[1] !== 0) {

                             u8(51);

                             return memop(mo);

-                          }

-                          else {

+                          } else {

                             u8(50);

                             return memop(mo);

                           }

@@ -16136,15 +15662,13 @@
                           if (match$4[1] !== 0) {

                             u8(53);

                             return memop(mo);

-                          }

-                          else {

+                          } else {

                             u8(52);

                             return memop(mo);

                           }

                       

                     }

-                  }

-                  else {

+                  } else {

                     u8(41);

                     return memop(mo);

                   }

@@ -16154,13 +15678,12 @@
                     throw [

                           Caml_builtin_exceptions.assert_failure,

                           [

-                            "/usr/local/google/home/rossberg/wasm/spec/interpreter/_build/jslib/src/encode.ml",

-                            196,

+                            "encode.ml",

+                            197,

                             8

                           ]

                         ];

-                  }

-                  else {

+                  } else {

                     u8(42);

                     return memop(mo);

                   }

@@ -16170,13 +15693,12 @@
                     throw [

                           Caml_builtin_exceptions.assert_failure,

                           [

-                            "/usr/local/google/home/rossberg/wasm/spec/interpreter/_build/jslib/src/encode.ml",

-                            196,

+                            "encode.ml",

+                            197,

                             8

                           ]

                         ];

-                  }

-                  else {

+                  } else {

                     u8(43);

                     return memop(mo);

                   }

@@ -16201,15 +15723,14 @@
                           throw [

                                 Caml_builtin_exceptions.assert_failure,

                                 [

-                                  "/usr/local/google/home/rossberg/wasm/spec/interpreter/_build/jslib/src/encode.ml",

-                                  204,

+                                  "encode.ml",

+                                  205,

                                   52

                                 ]

                               ];

                       

                     }

-                  }

-                  else {

+                  } else {

                     u8(54);

                     return memop(mo$1);

                   }

@@ -16229,8 +15750,7 @@
                           return memop(mo$1);

                       

                     }

-                  }

-                  else {

+                  } else {

                     u8(55);

                     return memop(mo$1);

                   }

@@ -16240,13 +15760,12 @@
                     throw [

                           Caml_builtin_exceptions.assert_failure,

                           [

-                            "/usr/local/google/home/rossberg/wasm/spec/interpreter/_build/jslib/src/encode.ml",

-                            208,

+                            "encode.ml",

+                            209,

                             58

                           ]

                         ];

-                  }

-                  else {

+                  } else {

                     u8(56);

                     return memop(mo$1);

                   }

@@ -16256,13 +15775,12 @@
                     throw [

                           Caml_builtin_exceptions.assert_failure,

                           [

-                            "/usr/local/google/home/rossberg/wasm/spec/interpreter/_build/jslib/src/encode.ml",

-                            208,

+                            "encode.ml",

+                            209,

                             58

                           ]

                         ];

-                  }

-                  else {

+                  } else {

                     u8(57);

                     return memop(mo$1);

                   }

@@ -16285,7 +15803,10 @@
               case 3 : 

                   u8(68);

                   var i = Curry._1(F64.to_bits, match$7[0]);

-                  u32(i[1] & /* lo */4294967295 | 0);

+                  u32(Caml_int64.and_(i, /* int64 */[

+                              /* hi */0,

+                              /* lo */4294967295

+                            ])[1] | 0);

                   return u32(Caml_int64.asr_(i, 32)[1] | 0);

               

             }

@@ -16300,8 +15821,8 @@
                   throw [

                         Caml_builtin_exceptions.assert_failure,

                         [

-                          "/usr/local/google/home/rossberg/wasm/spec/interpreter/_build/jslib/src/encode.ml",

-                          220,

+                          "encode.ml",

+                          221,

                           24

                         ]

                       ];

@@ -16309,8 +15830,8 @@
                   throw [

                         Caml_builtin_exceptions.assert_failure,

                         [

-                          "/usr/local/google/home/rossberg/wasm/spec/interpreter/_build/jslib/src/encode.ml",

-                          221,

+                          "encode.ml",

+                          222,

                           24

                         ]

                       ];

@@ -16596,8 +16117,8 @@
                         throw [

                               Caml_builtin_exceptions.assert_failure,

                               [

-                                "/usr/local/google/home/rossberg/wasm/spec/interpreter/_build/jslib/src/encode.ml",

-                                331,

+                                "encode.ml",

+                                332,

                                 42

                               ]

                             ];

@@ -16605,8 +16126,8 @@
                         throw [

                               Caml_builtin_exceptions.assert_failure,

                               [

-                                "/usr/local/google/home/rossberg/wasm/spec/interpreter/_build/jslib/src/encode.ml",

-                                332,

+                                "encode.ml",

+                                333,

                                 42

                               ]

                             ];

@@ -16635,8 +16156,8 @@
                         throw [

                               Caml_builtin_exceptions.assert_failure,

                               [

-                                "/usr/local/google/home/rossberg/wasm/spec/interpreter/_build/jslib/src/encode.ml",

-                                342,

+                                "encode.ml",

+                                343,

                                 39

                               ]

                             ];

@@ -16667,8 +16188,8 @@
                         throw [

                               Caml_builtin_exceptions.assert_failure,

                               [

-                                "/usr/local/google/home/rossberg/wasm/spec/interpreter/_build/jslib/src/encode.ml",

-                                353,

+                                "encode.ml",

+                                354,

                                 42

                               ]

                             ];

@@ -16695,8 +16216,8 @@
                         throw [

                               Caml_builtin_exceptions.assert_failure,

                               [

-                                "/usr/local/google/home/rossberg/wasm/spec/interpreter/_build/jslib/src/encode.ml",

-                                362,

+                                "encode.ml",

+                                363,

                                 41

                               ]

                             ];

@@ -16723,8 +16244,7 @@
       var p = Buffer.length(s[/* buf */0]);

       Curry._1(f, x);

       return patch_gap32(g, Buffer.length(s[/* buf */0]) - p | 0);

-    }

-    else {

+    } else {

       return 0;

     }

   };

@@ -16735,10 +16255,10 @@
   };

   var $$import = function (im) {

     var match = im[/* it */1];

-    string(match[/* module_name */0]);

-    string(match[/* item_name */1]);

-    var k = match[/* ikind */2];

-    var match$1 = k[/* it */1];

+    string(Utf8.encode(match[/* module_name */0]));

+    string(Utf8.encode(match[/* item_name */1]));

+    var d = match[/* idesc */2];

+    var match$1 = d[/* it */1];

     switch (match$1.tag | 0) {

       case 0 : 

           u8(0);

@@ -16786,35 +16306,36 @@
                 return vec(memory, param);

               }, mems, +(mems !== /* [] */0));

   };

-  var global = function (g) {

+  var $$global = function (g) {

     var match = g[/* it */1];

     global_type(match[/* gtype */0]);

     return $$const(match[/* value */1]);

   };

   var global_section = function (gs) {

     return section(6, function (param) {

-                return vec(global, param);

+                return vec($$global, param);

               }, gs, +(gs !== /* [] */0));

   };

-  var export_kind = function (k) {

-    var match = k[/* it */1];

-    switch (match) {

-      case 0 : 

-          return u8(0);

-      case 1 : 

-          return u8(1);

-      case 2 : 

-          return u8(2);

-      case 3 : 

-          return u8(3);

-      

-    }

-  };

   var $$export = function (ex) {

     var match = ex[/* it */1];

-    string(match[/* name */0]);

-    export_kind(match[/* ekind */1]);

-    return vu32(match[/* item */2][/* it */1]);

+    string(Utf8.encode(match[/* name */0]));

+    var d = match[/* edesc */1];

+    var match$1 = d[/* it */1];

+    switch (match$1.tag | 0) {

+      case 0 : 

+          u8(0);

+          return vu32(match$1[0][/* it */1]);

+      case 1 : 

+          u8(1);

+          return vu32(match$1[0][/* it */1]);

+      case 2 : 

+          u8(2);

+          return vu32(match$1[0][/* it */1]);

+      case 3 : 

+          u8(3);

+          return vu32(match$1[0][/* it */1]);

+      

+    }

   };

   var export_section = function (exs) {

     return section(7, function (param) {

@@ -16838,8 +16359,7 @@
                   ],

                   ts[1]

                 ];

-        }

-        else {

+        } else {

           return /* :: */[

                   /* tuple */[

                     t,

@@ -16848,8 +16368,7 @@
                   ts

                 ];

         }

-      }

-      else {

+      } else {

         return /* :: */[

                 /* tuple */[

                   t,

@@ -16900,7 +16419,7 @@
   };

   var module_ = function (m) {

     u32(1836278016);

-    u32(13);

+    u32(1);

     type_section(m[/* it */1][/* types */0]);

     import_section(m[/* it */1][/* imports */8]);

     func_section(m[/* it */1][/* funcs */4]);

@@ -16926,7 +16445,7 @@
   return Bytes.to_string(bs);

 }

 

-var version = 13;

+var version = 1;

 

 exports.Code    = Code$1;

 exports.version = version;

@@ -16940,11 +16459,11 @@
   _registry['error'] = function() {

     let exports = {};

 //////// start of error.js ////////

-// Generated by BUCKLESCRIPT VERSION 1.4.3 , PLEASE EDIT WITH CARE

+// Generated by BUCKLESCRIPT VERSION 1.7.4, PLEASE EDIT WITH CARE

 'use strict';

 

-var Source          = require("./source");

-var Caml_exceptions = require("bs-platform/lib/js/caml_exceptions");

+var Source          = require("./source.js");

+var Caml_exceptions = require("bs-platform/lib/js/caml_exceptions.js");

 

 function Make() {

   var $$Error = Caml_exceptions.create("Error.Make(*).Error");

@@ -16976,16 +16495,16 @@
   _registry['f32'] = function() {

     let exports = {};

 //////// start of f32.js ////////

-// Generated by BUCKLESCRIPT VERSION 1.4.3 , PLEASE EDIT WITH CARE

+// Generated by BUCKLESCRIPT VERSION 1.7.4, PLEASE EDIT WITH CARE

 'use strict';

 

-var Block       = require("bs-platform/lib/js/block");

-var Curry       = require("bs-platform/lib/js/curry");

-var Float       = require("./float");

-var Int32       = require("bs-platform/lib/js/int32");

-var Printf      = require("bs-platform/lib/js/printf");

-var Caml_float  = require("bs-platform/lib/js/caml_float");

-var Caml_format = require("bs-platform/lib/js/caml_format");

+var Block       = require("bs-platform/lib/js/block.js");

+var Curry       = require("bs-platform/lib/js/curry.js");

+var Float       = require("./float.js");

+var Int32       = require("bs-platform/lib/js/int32.js");

+var Printf      = require("bs-platform/lib/js/printf.js");

+var Caml_float  = require("bs-platform/lib/js/caml_float.js");

+var Caml_format = require("bs-platform/lib/js/caml_format.js");

 

 function print_nan_significand_digits(a) {

   return Curry._1(Printf.sprintf(/* Format */[

@@ -17118,16 +16637,16 @@
   _registry['f64'] = function() {

     let exports = {};

 //////// start of f64.js ////////

-// Generated by BUCKLESCRIPT VERSION 1.4.3 , PLEASE EDIT WITH CARE

+// Generated by BUCKLESCRIPT VERSION 1.7.4, PLEASE EDIT WITH CARE

 'use strict';

 

-var Block       = require("bs-platform/lib/js/block");

-var Curry       = require("bs-platform/lib/js/curry");

-var Float       = require("./float");

-var Int64       = require("bs-platform/lib/js/int64");

-var Printf      = require("bs-platform/lib/js/printf");

-var Caml_int64  = require("bs-platform/lib/js/caml_int64");

-var Caml_format = require("bs-platform/lib/js/caml_format");

+var Block       = require("bs-platform/lib/js/block.js");

+var Curry       = require("bs-platform/lib/js/curry.js");

+var Float       = require("./float.js");

+var Int64       = require("bs-platform/lib/js/int64.js");

+var Printf      = require("bs-platform/lib/js/printf.js");

+var Caml_int64  = require("bs-platform/lib/js/caml_int64.js");

+var Caml_format = require("bs-platform/lib/js/caml_format.js");

 

 var bare_nan = /* int64 */[

   /* hi */2146435072,

@@ -17283,16 +16802,16 @@
   _registry['float'] = function() {

     let exports = {};

 //////// start of float.js ////////

-// Generated by BUCKLESCRIPT VERSION 1.4.3 , PLEASE EDIT WITH CARE

+// Generated by BUCKLESCRIPT VERSION 1.7.4, PLEASE EDIT WITH CARE

 'use strict';

 

-var Curry                   = require("bs-platform/lib/js/curry");

-var $$String                = require("bs-platform/lib/js/string");

-var Caml_obj                = require("bs-platform/lib/js/caml_obj");

-var Pervasives              = require("bs-platform/lib/js/pervasives");

-var Caml_format             = require("bs-platform/lib/js/caml_format");

-var Caml_string             = require("bs-platform/lib/js/caml_string");

-var Caml_builtin_exceptions = require("bs-platform/lib/js/caml_builtin_exceptions");

+var Curry                   = require("bs-platform/lib/js/curry.js");

+var $$String                = require("bs-platform/lib/js/string.js");

+var Caml_obj                = require("bs-platform/lib/js/caml_obj.js");

+var Pervasives              = require("bs-platform/lib/js/pervasives.js");

+var Caml_format             = require("bs-platform/lib/js/caml_format.js");

+var Caml_string             = require("bs-platform/lib/js/caml_string.js");

+var Caml_builtin_exceptions = require("bs-platform/lib/js/caml_builtin_exceptions.js");

 

 function Make(Rep) {

   var pos_nan = Rep[/* pos_nan */0];

@@ -17327,8 +16846,7 @@
     var t = Curry._2(op, xf, yf);

     if (t === t) {

       return Curry._1(of_float, t);

-    }

-    else {

+    } else {

       return determine_binary_nan(x, y);

     }

   };

@@ -17336,8 +16854,7 @@
     var t = Curry._1(op, Curry._1(to_float, x));

     if (t === t) {

       return Curry._1(of_float, t);

-    }

-    else {

+    } else {

       return determine_unary_nan(x);

     }

   };

@@ -17381,14 +16898,12 @@
     var xf = Curry._1(to_float, x);

     if (xf === 0.0) {

       return x;

-    }

-    else {

+    } else {

       var f = xf < 0.0 ? Math.ceil(xf) : Math.floor(xf);

       var result = Curry._1(of_float, f);

       if (is_nan(result)) {

         return determine_unary_nan(result);

-      }

-      else {

+      } else {

         return result;

       }

     }

@@ -17397,8 +16912,7 @@
     var xf = Curry._1(to_float, x);

     if (xf === 0.0) {

       return x;

-    }

-    else {

+    } else {

       var u = Math.ceil(xf);

       var d = Math.floor(xf);

       var um = Math.abs(xf - u);

@@ -17409,8 +16923,7 @@
       var result = Curry._1(of_float, f);

       if (is_nan(result)) {

         return determine_unary_nan(result);

-      }

-      else {

+      } else {

         return result;

       }

     }

@@ -17420,14 +16933,11 @@
     var yf = Curry._1(to_float, y);

     if (xf === yf) {

       return Curry._2(Rep[/* logor */7], x, y);

-    }

-    else if (xf < yf) {

+    } else if (xf < yf) {

       return x;

-    }

-    else if (xf > yf) {

+    } else if (xf > yf) {

       return y;

-    }

-    else {

+    } else {

       return determine_binary_nan(x, y);

     }

   };

@@ -17436,14 +16946,11 @@
     var yf = Curry._1(to_float, y);

     if (xf === yf) {

       return Curry._2(Rep[/* logand */6], x, y);

-    }

-    else if (xf > yf) {

+    } else if (xf > yf) {

       return x;

-    }

-    else if (xf < yf) {

+    } else if (xf < yf) {

       return y;

-    }

-    else {

+    } else {

       return determine_binary_nan(x, y);

     }

   };

@@ -17482,24 +16989,20 @@
               Caml_builtin_exceptions.failure,

               "nan payload must not be zero"

             ];

-      }

-      else if (Caml_obj.caml_notequal(Curry._2(Rep[/* logand */6], s, bare_nan), Rep[/* zero */11])) {

+      } else if (Caml_obj.caml_notequal(Curry._2(Rep[/* logand */6], s, bare_nan), Rep[/* zero */11])) {

         throw [

               Caml_builtin_exceptions.failure,

               "nan payload must not overlap with exponent bits"

             ];

-      }

-      else if (Caml_obj.caml_lessthan(s, Rep[/* zero */11])) {

+      } else if (Caml_obj.caml_lessthan(s, Rep[/* zero */11])) {

         throw [

               Caml_builtin_exceptions.failure,

               "nan payload must not overlap with sign bit"

             ];

-      }

-      else {

+      } else {

         return Curry._2(Rep[/* logor */7], s, bare_nan);

       }

-    }

-    else {

+    } else {

       return Curry._1(of_float, Caml_format.caml_float_of_string(x));

     }

   };

@@ -17507,11 +17010,9 @@
     var len = x.length;

     if (len > 0 && Caml_string.get(x, 0) === /* "-" */45) {

       return neg(of_signless_string($$String.sub(x, 1, len - 1 | 0), len - 1 | 0));

-    }

-    else if (len > 0 && Caml_string.get(x, 0) === /* "+" */43) {

+    } else if (len > 0 && Caml_string.get(x, 0) === /* "+" */43) {

       return of_signless_string($$String.sub(x, 1, len - 1 | 0), len - 1 | 0);

-    }

-    else {

+    } else {

       return of_signless_string(x, len);

     }

   };

@@ -17568,18 +17069,18 @@
 //////// start of format.js ////////

 'use strict';

 

-var Block                   = require("./block");

-var Bytes                   = require("./bytes");

-var Curry                   = require("./curry");

-var Buffer                  = require("./buffer");

-var $$String                = require("./string");

-var Caml_io                 = require("./caml_io");

-var Caml_obj                = require("./caml_obj");

-var Pervasives              = require("./pervasives");

-var Caml_string             = require("./caml_string");

-var Caml_exceptions         = require("./caml_exceptions");

-var CamlinternalFormat      = require("./camlinternalFormat");

-var Caml_builtin_exceptions = require("./caml_builtin_exceptions");

+var Block                   = require("./block.js");

+var Bytes                   = require("./bytes.js");

+var Curry                   = require("./curry.js");

+var Buffer                  = require("./buffer.js");

+var $$String                = require("./string.js");

+var Caml_io                 = require("./caml_io.js");

+var Caml_obj                = require("./caml_obj.js");

+var Pervasives              = require("./pervasives.js");

+var Caml_string             = require("./caml_string.js");

+var Caml_exceptions         = require("./caml_exceptions.js");

+var CamlinternalFormat      = require("./camlinternalFormat.js");

+var Caml_builtin_exceptions = require("./caml_builtin_exceptions.js");

 

 function add_queue(x, q) {

   var c = /* Cons */[/* record */[

@@ -17591,8 +17092,7 @@
     q[/* insert */0] = c;

     match[0][/* tail */1] = c;

     return /* () */0;

-  }

-  else {

+  } else {

     q[/* insert */0] = c;

     q[/* body */1] = c;

     return /* () */0;

@@ -17605,8 +17105,7 @@
   var match = param[/* body */1];

   if (match) {

     return match[0][/* head */0];

-  }

-  else {

+  } else {

     throw Empty_queue;

   }

 }

@@ -17622,8 +17121,7 @@
       q[/* insert */0] = /* Nil */0;

     }

     return x;

-  }

-  else {

+  } else {

     throw Empty_queue;

   }

 }

@@ -17666,15 +17164,12 @@
   if (match) {

     var match$1 = match[0];

     var width = match$1[1];

-    var bl_ty = match$1[0];

-    if (width > state[/* pp_space_left */8] && bl_ty !== 0 && bl_ty < 5) {

+    if (width > state[/* pp_space_left */8] && (match$1[0] - 1 >>> 0) <= 3) {

       return break_new_line(state, 0, width);

-    }

-    else {

+    } else {

       return 0;

     }

-  }

-  else {

+  } else {

     return Curry._1(state[/* pp_out_newline */18], /* () */0);

   }

 }

@@ -17694,15 +17189,13 @@
                           n,

                           ls

                         ];

-                }

-                else {

+                } else {

                   return /* :: */[

                           x,

                           add_tab(n, ls[1])

                         ];

                 }

-              }

-              else {

+              } else {

                 return /* :: */[

                         n,

                         /* [] */0

@@ -17711,8 +17204,7 @@
             };

             tabs[0] = add_tab(state[/* pp_margin */5] - state[/* pp_space_left */8] | 0, tabs[0]);

             return /* () */0;

-          }

-          else {

+          } else {

             return /* () */0;

           }

           break;

@@ -17721,8 +17213,7 @@
           if (match$1) {

             state[/* pp_format_stack */1] = match$1[1];

             return /* () */0;

-          }

-          else {

+          } else {

             return /* () */0;

           }

       case 2 : 

@@ -17730,16 +17221,14 @@
           if (match$2) {

             state[/* pp_tbox_stack */2] = match$2[1];

             return /* () */0;

-          }

-          else {

+          } else {

             return /* () */0;

           }

       case 3 : 

           var match$3 = state[/* pp_format_stack */1];

           if (match$3) {

             return break_new_line(state, 0, match$3[0][1]);

-          }

-          else {

+          } else {

             return Curry._1(state[/* pp_out_newline */18], /* () */0);

           }

       case 4 : 

@@ -17750,8 +17239,7 @@
             state$1[/* pp_left_total */11] = state$1[/* pp_left_total */11] - match$4[/* length */2] | 0;

             state$1[/* pp_space_left */8] = state$1[/* pp_space_left */8] + size$1 | 0;

             return /* () */0;

-          }

-          else {

+          } else {

             return 0;

           }

       case 5 : 

@@ -17761,15 +17249,13 @@
             pp_output_string(state, marker);

             state[/* pp_mark_stack */4] = match$5[1];

             return /* () */0;

-          }

-          else {

+          } else {

             return /* () */0;

           }

           break;

       

     }

-  }

-  else {

+  } else {

     switch (param.tag | 0) {

       case 0 : 

           state[/* pp_space_left */8] = state[/* pp_space_left */8] - size | 0;

@@ -17790,15 +17276,13 @@
               case 3 : 

                   if (size > state[/* pp_space_left */8]) {

                     return break_new_line(state, off, width);

-                  }

-                  else {

+                  } else {

                     return break_same_line(state, n);

                   }

               case 4 : 

                   if (state[/* pp_is_new_line */10] || !(size > state[/* pp_space_left */8] || state[/* pp_current_indent */9] > ((state[/* pp_margin */5] - width | 0) + off | 0))) {

                     return break_same_line(state, n);

-                  }

-                  else {

+                  } else {

                     return break_new_line(state, off, width);

                   }

               case 0 : 

@@ -17806,8 +17290,7 @@
                   return break_same_line(state, n);

               

             }

-          }

-          else {

+          } else {

             return /* () */0;

           }

           break;

@@ -17823,14 +17306,12 @@
                   var x = param[0];

                   if (Caml_obj.caml_greaterequal(x, n)) {

                     return x;

-                  }

-                  else {

+                  } else {

                     _param = param[1];

                     continue ;

                     

                   }

-                }

-                else {

+                } else {

                   throw Caml_builtin_exceptions.not_found;

                 }

               };

@@ -17844,24 +17325,20 @@
               catch (exn){

                 if (exn === Caml_builtin_exceptions.not_found) {

                   tab = match$9[0];

-                }

-                else {

+                } else {

                   throw exn;

                 }

               }

-            }

-            else {

+            } else {

               tab = insertion_point;

             }

             var offset = tab - insertion_point | 0;

             if (offset >= 0) {

               return break_same_line(state, offset + param[0] | 0);

-            }

-            else {

+            } else {

               return break_new_line(state, tab + param[1] | 0, state[/* pp_margin */5]);

             }

-          }

-          else {

+          } else {

             return /* () */0;

           }

           break;

@@ -17911,8 +17388,7 @@
       var size = match[/* elem_size */0];

       if (size < 0 && (state$1[/* pp_right_total */12] - state$1[/* pp_left_total */11] | 0) < state$1[/* pp_space_left */8]) {

         return 0;

-      }

-      else {

+      } else {

         take_queue(state$1[/* pp_queue */26]);

         format_pp_token(state$1, size < 0 ? 1000000010 : size, match[/* token */1]);

         state$1[/* pp_left_total */11] = match[/* length */2] + state$1[/* pp_left_total */11] | 0;

@@ -17924,8 +17400,7 @@
   catch (exn){

     if (exn === Empty_queue) {

       return /* () */0;

-    }

-    else {

+    } else {

       throw exn;

     }

   }

@@ -17970,14 +17445,12 @@
     if (match$1[0] < state[/* pp_left_total */11]) {

       state[/* pp_scan_stack */0] = scan_stack_bottom;

       return /* () */0;

-    }

-    else {

+    } else {

       var exit = 0;

       var $js = queue_elem[/* token */1];

       if (typeof $js === "number") {

         return /* () */0;

-      }

-      else {

+      } else {

         switch ($js.tag | 0) {

           case 1 : 

           case 2 : 

@@ -17986,8 +17459,7 @@
           case 3 : 

               if (ty) {

                 return 0;

-              }

-              else {

+              } else {

                 queue_elem[/* elem_size */0] = state[/* pp_right_total */12] + size | 0;

                 state[/* pp_scan_stack */0] = t;

                 return /* () */0;

@@ -18001,15 +17473,13 @@
           queue_elem[/* elem_size */0] = state[/* pp_right_total */12] + size | 0;

           state[/* pp_scan_stack */0] = t;

           return /* () */0;

-        }

-        else {

+        } else {

           return 0;

         }

       }

       

     }

-  }

-  else {

+  } else {

     return /* () */0;

   }

 }

@@ -18041,14 +17511,12 @@
       /* length */0

     ];

     return scan_push(state, /* false */0, elem);

-  }

-  else if (state[/* pp_curr_depth */13] === state[/* pp_max_boxes */14]) {

+  } else if (state[/* pp_curr_depth */13] === state[/* pp_max_boxes */14]) {

     var state$1 = state;

     var s = state[/* pp_ellipsis */15];

     var len = s.length;

     return enqueue_string_as(state$1, len, s);

-  }

-  else {

+  } else {

     return 0;

   }

 }

@@ -18066,8 +17534,7 @@
     }

     state[/* pp_curr_depth */13] = state[/* pp_curr_depth */13] - 1 | 0;

     return /* () */0;

-  }

-  else {

+  } else {

     return 0;

   }

 }

@@ -18086,8 +17553,7 @@
                 /* token : Pp_open_tag */Block.__(5, [tag_name]),

                 /* length */0

               ]);

-  }

-  else {

+  } else {

     return 0;

   }

 }

@@ -18106,12 +17572,10 @@
       Curry._1(state[/* pp_print_close_tag */25], match[0]);

       state[/* pp_tag_stack */3] = match[1];

       return /* () */0;

-    }

-    else {

+    } else {

       return /* () */0;

     }

-  }

-  else {

+  } else {

     return 0;

   }

 }

@@ -18185,8 +17649,7 @@
 function pp_print_as_size(state, size, s) {

   if (state[/* pp_curr_depth */13] < state[/* pp_max_boxes */14]) {

     return enqueue_string_as(state, size, s);

-  }

-  else {

+  } else {

     return 0;

   }

 }

@@ -18250,8 +17713,7 @@
                 /* token : Pp_newline */3,

                 /* length */0

               ]);

-  }

-  else {

+  } else {

     return 0;

   }

 }

@@ -18263,8 +17725,7 @@
                 /* token : Pp_if_newline */4,

                 /* length */0

               ]);

-  }

-  else {

+  } else {

     return 0;

   }

 }

@@ -18280,8 +17741,7 @@
       /* length */width

     ];

     return scan_push(state, /* true */1, elem);

-  }

-  else {

+  } else {

     return 0;

   }

 }

@@ -18303,8 +17763,7 @@
       /* length */0

     ];

     return enqueue_advance(state, elem);

-  }

-  else {

+  } else {

     return 0;

   }

 }

@@ -18320,12 +17779,10 @@
       enqueue_advance(state, elem);

       state[/* pp_curr_depth */13] = state[/* pp_curr_depth */13] - 1 | 0;

       return /* () */0;

-    }

-    else {

+    } else {

       return 0;

     }

-  }

-  else {

+  } else {

     return 0;

   }

 }

@@ -18341,8 +17798,7 @@
       /* length */width

     ];

     return scan_push(state, /* true */1, elem);

-  }

-  else {

+  } else {

     return 0;

   }

 }

@@ -18359,8 +17815,7 @@
       /* length */0

     ];

     return enqueue_advance(state, elem);

-  }

-  else {

+  } else {

     return 0;

   }

 }

@@ -18380,12 +17835,10 @@
         _$staropt$star = /* Some */[pp_sep];

         continue ;

         

-      }

-      else {

+      } else {

         return Curry._2(pp_v, ppf, v);

       }

-    }

-    else {

+    } else {

       return /* () */0;

     }

   };

@@ -18406,21 +17859,18 @@
     if (match !== 10) {

       if (match !== 32) {

         right[0] = right[0] + 1 | 0;

-      }

-      else {

+      } else {

         flush(/* () */0);

         pp_print_break(ppf, 1, 0);

       }

-    }

-    else {

+    } else {

       flush(/* () */0);

       pp_force_newline(ppf, /* () */0);

     }

   };

   if (left[0] !== len) {

     return flush(/* () */0);

-  }

-  else {

+  } else {

     return 0;

   }

 }

@@ -18429,8 +17879,7 @@
   if (n > 1) {

     state[/* pp_max_boxes */14] = n;

     return /* () */0;

-  }

-  else {

+  } else {

     return 0;

   }

 }

@@ -18455,8 +17904,7 @@
 function pp_limit(n) {

   if (n < 1000000010) {

     return n;

-  }

-  else {

+  } else {

     return 1000000009;

   }

 }

@@ -18469,8 +17917,7 @@
     state$1[/* pp_min_space_left */6] = n$2;

     state$1[/* pp_max_indent */7] = state$1[/* pp_margin */5] - state$1[/* pp_min_space_left */6] | 0;

     return pp_rinit(state$1);

-  }

-  else {

+  } else {

     return 0;

   }

 }

@@ -18485,8 +17932,7 @@
     state[/* pp_margin */5] = n$1;

     var new_max_indent = state[/* pp_max_indent */7] <= state[/* pp_margin */5] ? state[/* pp_max_indent */7] : Pervasives.max(Pervasives.max(state[/* pp_margin */5] - state[/* pp_min_space_left */6] | 0, state[/* pp_margin */5] / 2 | 0), 1);

     return pp_set_max_indent(state, new_max_indent);

-  }

-  else {

+  } else {

     return 0;

   }

 }

@@ -18553,15 +17999,13 @@
     if (n > 0) {

       if (n <= 80) {

         return Curry._3(state[/* pp_out_string */16], blank_line, 0, n);

-      }

-      else {

+      } else {

         Curry._3(state[/* pp_out_string */16], blank_line, 0, 80);

         _n = n - 80 | 0;

         continue ;

         

       }

-    }

-    else {

+    } else {

       return 0;

     }

   };

@@ -18912,8 +18356,7 @@
   var len = buf[/* position */1];

   if (len < 2) {

     return Buffer.contents(buf);

-  }

-  else {

+  } else {

     return Buffer.sub(buf, 1, len - 2 | 0);

   }

 }

@@ -18937,8 +18380,7 @@
           return pp_print_char(ppf, /* "%" */37);

       

     }

-  }

-  else {

+  } else {

     switch (fmting_lit.tag | 0) {

       case 0 : 

           return pp_print_break(ppf, fmting_lit[1], fmting_lit[2]);

@@ -18962,8 +18404,7 @@
   var c;

   if (typeof acc === "number") {

     return /* () */0;

-  }

-  else {

+  } else {

     switch (acc.tag | 0) {

       case 0 : 

           output_acc(ppf, acc[0]);

@@ -18975,8 +18416,7 @@
           if (match.tag) {

             var match$1 = CamlinternalFormat.open_box_of_string(compute_tag(output_acc, match[0]));

             return pp_open_box_gen(ppf, match$1[0], match$1[1]);

-          }

-          else {

+          } else {

             return pp_open_tag(ppf, compute_tag(output_acc, match[0]));

           }

           break;

@@ -18985,22 +18425,18 @@
           var exit$1 = 0;

           if (typeof p$3 === "number") {

             exit$1 = 3;

-          }

-          else if (p$3.tag) {

+          } else if (p$3.tag) {

             exit$1 = 3;

-          }

-          else {

+          } else {

             var match$2 = p$3[1];

             if (typeof match$2 === "number") {

               exit$1 = 3;

-            }

-            else if (match$2.tag === 1) {

+            } else if (match$2.tag === 1) {

               p = p$3[0];

               size = match$2[1];

               s = acc[1];

               exit = 1;

-            }

-            else {

+            } else {

               exit$1 = 3;

             }

           }

@@ -19014,22 +18450,18 @@
           var exit$2 = 0;

           if (typeof p$4 === "number") {

             exit$2 = 3;

-          }

-          else if (p$4.tag) {

+          } else if (p$4.tag) {

             exit$2 = 3;

-          }

-          else {

+          } else {

             var match$3 = p$4[1];

             if (typeof match$3 === "number") {

               exit$2 = 3;

-            }

-            else if (match$3.tag === 1) {

+            } else if (match$3.tag === 1) {

               p$1 = p$4[0];

               size$1 = match$3[1];

               c = acc[1];

               exit = 2;

-            }

-            else {

+            } else {

               exit$2 = 3;

             }

           }

@@ -19043,22 +18475,18 @@
           var exit$3 = 0;

           if (typeof p$5 === "number") {

             exit$3 = 3;

-          }

-          else if (p$5.tag) {

+          } else if (p$5.tag) {

             exit$3 = 3;

-          }

-          else {

+          } else {

             var match$4 = p$5[1];

             if (typeof match$4 === "number") {

               exit$3 = 3;

-            }

-            else if (match$4.tag === 1) {

+            } else if (match$4.tag === 1) {

               p = p$5[0];

               size = match$4[1];

               s = acc[1];

               exit = 1;

-            }

-            else {

+            } else {

               exit$3 = 3;

             }

           }

@@ -19072,22 +18500,18 @@
           var exit$4 = 0;

           if (typeof p$6 === "number") {

             exit$4 = 3;

-          }

-          else if (p$6.tag) {

+          } else if (p$6.tag) {

             exit$4 = 3;

-          }

-          else {

+          } else {

             var match$5 = p$6[1];

             if (typeof match$5 === "number") {

               exit$4 = 3;

-            }

-            else if (match$5.tag === 1) {

+            } else if (match$5.tag === 1) {

               p$1 = p$6[0];

               size$1 = match$5[1];

               c = acc[1];

               exit = 2;

-            }

-            else {

+            } else {

               exit$4 = 3;

             }

           }

@@ -19132,8 +18556,7 @@
   var c;

   if (typeof acc === "number") {

     return /* () */0;

-  }

-  else {

+  } else {

     switch (acc.tag | 0) {

       case 0 : 

           strput_acc(ppf, acc[0]);

@@ -19145,8 +18568,7 @@
           if (match.tag) {

             var match$1 = CamlinternalFormat.open_box_of_string(compute_tag(strput_acc, match[0]));

             return pp_open_box_gen(ppf, match$1[0], match$1[1]);

-          }

-          else {

+          } else {

             return pp_open_tag(ppf, compute_tag(strput_acc, match[0]));

           }

           break;

@@ -19155,22 +18577,18 @@
           var exit$1 = 0;

           if (typeof p$3 === "number") {

             exit$1 = 3;

-          }

-          else if (p$3.tag) {

+          } else if (p$3.tag) {

             exit$1 = 3;

-          }

-          else {

+          } else {

             var match$2 = p$3[1];

             if (typeof match$2 === "number") {

               exit$1 = 3;

-            }

-            else if (match$2.tag === 1) {

+            } else if (match$2.tag === 1) {

               p = p$3[0];

               size = match$2[1];

               s = acc[1];

               exit = 1;

-            }

-            else {

+            } else {

               exit$1 = 3;

             }

           }

@@ -19184,22 +18602,18 @@
           var exit$2 = 0;

           if (typeof p$4 === "number") {

             exit$2 = 3;

-          }

-          else if (p$4.tag) {

+          } else if (p$4.tag) {

             exit$2 = 3;

-          }

-          else {

+          } else {

             var match$3 = p$4[1];

             if (typeof match$3 === "number") {

               exit$2 = 3;

-            }

-            else if (match$3.tag === 1) {

+            } else if (match$3.tag === 1) {

               p$1 = p$4[0];

               size$1 = match$3[1];

               c = acc[1];

               exit = 2;

-            }

-            else {

+            } else {

               exit$2 = 3;

             }

           }

@@ -19213,22 +18627,18 @@
           var exit$3 = 0;

           if (typeof p$5 === "number") {

             exit$3 = 3;

-          }

-          else if (p$5.tag) {

+          } else if (p$5.tag) {

             exit$3 = 3;

-          }

-          else {

+          } else {

             var match$4 = p$5[1];

             if (typeof match$4 === "number") {

               exit$3 = 3;

-            }

-            else if (match$4.tag === 1) {

+            } else if (match$4.tag === 1) {

               p = p$5[0];

               size = match$4[1];

               s = acc[1];

               exit = 1;

-            }

-            else {

+            } else {

               exit$3 = 3;

             }

           }

@@ -19242,22 +18652,18 @@
           var exit$4 = 0;

           if (typeof p$6 === "number") {

             exit$4 = 3;

-          }

-          else if (p$6.tag) {

+          } else if (p$6.tag) {

             exit$4 = 3;

-          }

-          else {

+          } else {

             var match$5 = p$6[1];

             if (typeof match$5 === "number") {

               exit$4 = 3;

-            }

-            else if (match$5.tag === 1) {

+            } else if (match$5.tag === 1) {

               p$1 = p$6[0];

               size$1 = match$5[1];

               c = acc[1];

               exit = 2;

-            }

-            else {

+            } else {

               exit$4 = 3;

             }

           }

@@ -19271,20 +18677,16 @@
           var exit$5 = 0;

           if (typeof p$7 === "number") {

             exit$5 = 3;

-          }

-          else if (p$7.tag) {

+          } else if (p$7.tag) {

             exit$5 = 3;

-          }

-          else {

+          } else {

             var match$6 = p$7[1];

             if (typeof match$6 === "number") {

               exit$5 = 3;

-            }

-            else if (match$6.tag === 1) {

+            } else if (match$6.tag === 1) {

               strput_acc(ppf, p$7[0]);

               return pp_print_as_size(ppf, match$6[1], Curry._1(acc[1], /* () */0));

-            }

-            else {

+            } else {

               exit$5 = 3;

             }

           }

@@ -19516,12 +18918,12 @@
   _registry['i32'] = function() {

     let exports = {};

 //////// start of i32.js ////////

-// Generated by BUCKLESCRIPT VERSION 1.4.3 , PLEASE EDIT WITH CARE

+// Generated by BUCKLESCRIPT VERSION 1.7.4, PLEASE EDIT WITH CARE

 'use strict';

 

-var Int        = require("./int");

-var Int32      = require("bs-platform/lib/js/int32");

-var Caml_int32 = require("bs-platform/lib/js/caml_int32");

+var Int        = require("./int.js");

+var Int32      = require("bs-platform/lib/js/int32.js");

+var Caml_int32 = require("bs-platform/lib/js/caml_int32.js");

 

 var include = Int.Make(/* module */[

       /* zero */Int32.zero,

@@ -19696,12 +19098,12 @@
   _registry['i64'] = function() {

     let exports = {};

 //////// start of i64.js ////////

-// Generated by BUCKLESCRIPT VERSION 1.4.3 , PLEASE EDIT WITH CARE

+// Generated by BUCKLESCRIPT VERSION 1.7.4, PLEASE EDIT WITH CARE

 'use strict';

 

-var Int        = require("./int");

-var Int64      = require("bs-platform/lib/js/int64");

-var Caml_int64 = require("bs-platform/lib/js/caml_int64");

+var Int        = require("./int.js");

+var Int64      = require("bs-platform/lib/js/int64.js");

+var Caml_int64 = require("bs-platform/lib/js/caml_int64.js");

 

 var include = Int.Make(/* module */[

       /* zero */Int64.zero,

@@ -19873,8 +19275,8 @@
 //////// start of int32.js ////////

 'use strict';

 

-var Caml_obj    = require("./caml_obj");

-var Caml_format = require("./caml_format");

+var Caml_obj    = require("./caml_obj.js");

+var Caml_format = require("./caml_format.js");

 

 function succ(n) {

   return n + 1 | 0;

@@ -19887,8 +19289,7 @@
 function abs(n) {

   if (n >= 0) {

     return n;

-  }

-  else {

+  } else {

     return -n | 0;

   }

 }

@@ -19935,8 +19336,8 @@
 //////// start of int64.js ////////

 'use strict';

 

-var Caml_int64  = require("./caml_int64");

-var Caml_format = require("./caml_format");

+var Caml_int64  = require("./caml_int64.js");

+var Caml_format = require("./caml_format.js");

 

 function succ(n) {

   return Caml_int64.add(n, /* int64 */[

@@ -19958,17 +19359,16 @@
           /* lo */0

         ])) {

     return n;

-  }

-  else {

+  } else {

     return Caml_int64.neg(n);

   }

 }

 

 function lognot(n) {

-  return /* int64 */[

-          /* hi */n[0] ^ /* hi */-1,

-          /* lo */((n[1] ^ /* lo */4294967295) >>> 0)

-        ];

+  return Caml_int64.xor(n, /* int64 */[

+              /* hi */-1,

+              /* lo */4294967295

+            ]);

 }

 

 function to_string(n) {

@@ -20022,14 +19422,14 @@
   _registry['int'] = function() {

     let exports = {};

 //////// start of int.js ////////

-// Generated by BUCKLESCRIPT VERSION 1.4.3 , PLEASE EDIT WITH CARE

+// Generated by BUCKLESCRIPT VERSION 1.7.4, PLEASE EDIT WITH CARE

 'use strict';

 

-var Curry         = require("bs-platform/lib/js/curry");

-var Caml_obj      = require("bs-platform/lib/js/caml_obj");

-var Pervasives    = require("bs-platform/lib/js/pervasives");

-var Caml_string   = require("bs-platform/lib/js/caml_string");

-var Numeric_error = require("./numeric_error");

+var Curry         = require("bs-platform/lib/js/curry.js");

+var Caml_obj      = require("bs-platform/lib/js/caml_obj.js");

+var Pervasives    = require("bs-platform/lib/js/pervasives.js");

+var Caml_string   = require("bs-platform/lib/js/caml_string.js");

+var Numeric_error = require("./numeric_error.js");

 

 function Make(Rep) {

   var cmp_u = function (x, op, y) {

@@ -20038,8 +19438,7 @@
   var divrem_u = function (n, d) {

     if (Caml_obj.caml_equal(d, Rep[/* zero */0])) {

       throw Numeric_error.IntegerDivideByZero;

-    }

-    else {

+    } else {

       var t = Curry._2(Rep[/* shift_right */16], d, Rep[/* bitwidth */21] - 1 | 0);

       var n$prime = Curry._2(Rep[/* logand */11], n, Curry._1(Rep[/* lognot */12], t));

       var q = Curry._2(Rep[/* shift_left */15], Curry._2(Rep[/* div */9], Curry._2(Rep[/* shift_right_logical */17], n$prime, 1), d), 1);

@@ -20049,8 +19448,7 @@
                 q,

                 r

               ];

-      }

-      else {

+      } else {

         return /* tuple */[

                 Curry._2(Rep[/* add */6], q, Rep[/* one */1]),

                 Curry._2(Rep[/* sub */7], r, d)

@@ -20073,11 +19471,9 @@
   var div_s = function (x, y) {

     if (Caml_obj.caml_equal(y, Rep[/* zero */0])) {

       throw Numeric_error.IntegerDivideByZero;

-    }

-    else if (Caml_obj.caml_equal(x, Rep[/* min_int */4]) && Caml_obj.caml_equal(y, Rep[/* minus_one */2])) {

+    } else if (Caml_obj.caml_equal(x, Rep[/* min_int */4]) && Caml_obj.caml_equal(y, Rep[/* minus_one */2])) {

       throw Numeric_error.IntegerOverflow;

-    }

-    else {

+    } else {

       return Curry._2(Rep[/* div */9], x, y);

     }

   };

@@ -20087,8 +19483,7 @@
   var rem_s = function (x, y) {

     if (Caml_obj.caml_equal(y, Rep[/* zero */0])) {

       throw Numeric_error.IntegerDivideByZero;

-    }

-    else {

+    } else {

       return Curry._2(Rep[/* rem */10], x, y);

     }

   };

@@ -20128,14 +19523,12 @@
         var acc = _acc;

         if (Caml_obj.caml_equal(n, Rep[/* zero */0])) {

           return Rep[/* bitwidth */21];

-        }

-        else if (Caml_obj.caml_equal(Curry._2(and_, n, Curry._2(Rep[/* shift_left */15], Rep[/* one */1], Rep[/* bitwidth */21] - 1 | 0)), Rep[/* zero */0])) {

+        } else if (Caml_obj.caml_equal(Curry._2(and_, n, Curry._2(Rep[/* shift_left */15], Rep[/* one */1], Rep[/* bitwidth */21] - 1 | 0)), Rep[/* zero */0])) {

           _n = Curry._2(Rep[/* shift_left */15], n, 1);

           _acc = 1 + acc | 0;

           continue ;

           

-        }

-        else {

+        } else {

           return acc;

         }

       };

@@ -20149,11 +19542,9 @@
         var acc = _acc;

         if (Caml_obj.caml_equal(n, Rep[/* zero */0])) {

           return Rep[/* bitwidth */21];

-        }

-        else if (Caml_obj.caml_equal(Curry._2(and_, n, Rep[/* one */1]), Rep[/* one */1])) {

+        } else if (Caml_obj.caml_equal(Curry._2(and_, n, Rep[/* one */1]), Rep[/* one */1])) {

           return acc;

-        }

-        else {

+        } else {

           _n = Curry._2(Rep[/* shift_right_logical */17], n, 1);

           _acc = 1 + acc | 0;

           continue ;

@@ -20171,8 +19562,7 @@
         var acc = _acc;

         if (Caml_obj.caml_equal(n, Rep[/* zero */0])) {

           return acc;

-        }

-        else {

+        } else {

           var acc$prime = Caml_obj.caml_equal(Curry._2(and_, n, Rep[/* one */1]), Rep[/* one */1]) ? acc + 1 | 0 : acc;

           _n = Curry._2(Rep[/* shift_right_logical */17], n, 1);

           _i = i - 1 | 0;

@@ -20213,24 +19603,21 @@
   var to_string_u = function (i) {

     if (Caml_obj.caml_greaterequal(i, Rep[/* zero */0])) {

       return Curry._1(to_string_s, i);

-    }

-    else {

+    } else {

       return Curry._1(to_string_s, div_u(i, ten)) + Curry._1(to_string_s, rem_u(i, ten));

     }

   };

   var $$require = function (b) {

     if (b) {

       return 0;

-    }

-    else {

+    } else {

       return Pervasives.failwith("of_string");

     }

   };

   var dec_digit = function (c) {

     if (c > 57 || c < 48) {

       return Pervasives.failwith("of_string");

-    }

-    else {

+    } else {

       return c - /* "0" */48 | 0;

     }

   };

@@ -20239,22 +19626,17 @@
       if (c >= 97) {

         if (c >= 103) {

           return Pervasives.failwith("of_string");

-        }

-        else {

+        } else {

           return (10 + c | 0) - /* "a" */97 | 0;

         }

-      }

-      else if (c >= 71) {

+      } else if (c >= 71) {

         return Pervasives.failwith("of_string");

-      }

-      else {

+      } else {

         return (10 + c | 0) - /* "A" */65 | 0;

       }

-    }

-    else if (c > 57 || c < 48) {

+    } else if (c > 57 || c < 48) {

       return Pervasives.failwith("of_string");

-    }

-    else {

+    } else {

       return c - /* "0" */48 | 0;

     }

   };

@@ -20273,8 +19655,7 @@
           var i$1 = _i;

           if (i$1 === len) {

             return num;

-          }

-          else {

+          } else {

             var digit = Curry._1(Rep[/* of_int */18], hex_digit(Caml_string.get(s, i$1)));

             $$require(le_u(num, shr_u(Rep[/* minus_one */2], Curry._1(Rep[/* of_int */18], 4))));

             _num = Curry._2(Rep[/* logor */13], Curry._2(Rep[/* shift_left */15], num, 4), digit);

@@ -20283,8 +19664,7 @@
             

           }

         };

-      }

-      else {

+      } else {

         var _i$1 = i;

         var _num$1 = Rep[/* zero */0];

         while(true) {

@@ -20292,8 +19672,7 @@
           var i$2 = _i$1;

           if (i$2 === len) {

             return num$1;

-          }

-          else {

+          } else {

             var digit$1 = Curry._1(Rep[/* of_int */18], dec_digit(Caml_string.get(s, i$2)));

             $$require(lt_u(num$1, max_upper) || Caml_obj.caml_equal(num$1, max_upper) && le_u(digit$1, max_lower));

             _num$1 = Curry._2(Rep[/* add */6], Curry._2(Rep[/* mul */8], num$1, ten), digit$1);

@@ -20309,8 +19688,7 @@
     var switcher = match - 43 | 0;

     if (switcher > 2 || switcher < 0) {

       return parse_int(0);

-    }

-    else {

+    } else {

       switch (switcher) {

         case 0 : 

             return parse_int(1);

@@ -20384,29 +19762,174 @@
   };

 

 

+  _registry['js_exn'] = function() {

+    let exports = {};

+//////// start of js_exn.js ////////

+'use strict';

+

+var Caml_exceptions = require("./caml_exceptions.js");

+

+var $$Error = Caml_exceptions.create("Js_exn.Error");

+

+function internalToOCamlException(e) {

+  if (Caml_exceptions.isCamlExceptionOrOpenVariant(e)) {

+    return e;

+  } else {

+    return [

+            $$Error,

+            e

+          ];

+  }

+}

+

+function raiseError(str) {

+  throw new Error(str);

+}

+

+function raiseEvalError(str) {

+  throw new EvalError(str);

+}

+

+function raiseRangeError(str) {

+  throw new RangeError(str);

+}

+

+function raiseReferenceError(str) {

+  throw new RerferenceError(str);

+}

+

+function raiseSyntaxError(str) {

+  throw new SyntaxError(str);

+}

+

+function raiseTypeError(str) {

+  throw new TypeError(str);

+}

+

+function raiseUriError(str) {

+  throw new URIError(str);

+}

+

+exports.$$Error                  = $$Error;

+exports.internalToOCamlException = internalToOCamlException;

+exports.raiseError               = raiseError;

+exports.raiseEvalError           = raiseEvalError;

+exports.raiseRangeError          = raiseRangeError;

+exports.raiseReferenceError      = raiseReferenceError;

+exports.raiseSyntaxError         = raiseSyntaxError;

+exports.raiseTypeError           = raiseTypeError;

+exports.raiseUriError            = raiseUriError;

+/* No side effect */

+//////// end of js_exn.js ////////

+    return exports;

+  };

+

+

+  _registry['js'] = function() {

+    let exports = {};

+//////// start of js.js ////////

+'use strict';

+

+

+var Null = 0;

+

+var Undefined = 0;

+

+var Null_undefined = 0;

+

+var Exn = 0;

+

+var $$Array = 0;

+

+var $$String = 0;

+

+var $$Boolean = 0;

+

+var Re = 0;

+

+var Promise = 0;

+

+var $$Date = 0;

+

+var Dict = 0;

+

+var Global = 0;

+

+var Json = 0;

+

+var $$Math = 0;

+

+var Obj = 0;

+

+var Typed_array = 0;

+

+var Types = 0;

+

+var Float = 0;

+

+var Int = 0;

+

+var Option = 0;

+

+var Result = 0;

+

+var List = 0;

+

+var Vector = 0;

+

+exports.Null           = Null;

+exports.Undefined      = Undefined;

+exports.Null_undefined = Null_undefined;

+exports.Exn            = Exn;

+exports.$$Array        = $$Array;

+exports.$$String       = $$String;

+exports.$$Boolean      = $$Boolean;

+exports.Re             = Re;

+exports.Promise        = Promise;

+exports.$$Date         = $$Date;

+exports.Dict           = Dict;

+exports.Global         = Global;

+exports.Json           = Json;

+exports.$$Math         = $$Math;

+exports.Obj            = Obj;

+exports.Typed_array    = Typed_array;

+exports.Types          = Types;

+exports.Float          = Float;

+exports.Int            = Int;

+exports.Option         = Option;

+exports.Result         = Result;

+exports.List           = List;

+exports.Vector         = Vector;

+/* No side effect */

+//////// end of js.js ////////

+    return exports;

+  };

+

+

   _registry['lexer'] = function() {

     let exports = {};

 //////// start of lexer.js ////////

-// Generated by BUCKLESCRIPT VERSION 1.4.3 , PLEASE EDIT WITH CARE

+// Generated by BUCKLESCRIPT VERSION 1.7.4, PLEASE EDIT WITH CARE

 'use strict';

 

-var F32                     = require("./f32");

-var F64                     = require("./f64");

-var I32                     = require("./i32");

-var I64                     = require("./i64");

-var Lib                     = require("./lib");

-var Char                    = require("bs-platform/lib/js/char");

-var Block                   = require("bs-platform/lib/js/block");

-var Curry                   = require("bs-platform/lib/js/curry");

-var Buffer                  = require("bs-platform/lib/js/buffer");

-var Lexing                  = require("bs-platform/lib/js/lexing");

-var Script                  = require("./script");

-var Source                  = require("./source");

-var $$String                = require("bs-platform/lib/js/string");

-var Operators               = require("./operators");

-var Caml_format             = require("bs-platform/lib/js/caml_format");

-var Caml_string             = require("bs-platform/lib/js/caml_string");

-var Caml_builtin_exceptions = require("bs-platform/lib/js/caml_builtin_exceptions");

+var F32                     = require("./f32.js");

+var F64                     = require("./f64.js");

+var I32                     = require("./i32.js");

+var I64                     = require("./i64.js");

+var Lib                     = require("./lib.js");

+var Char                    = require("bs-platform/lib/js/char.js");

+var Utf8                    = require("./utf8.js");

+var Block                   = require("bs-platform/lib/js/block.js");

+var Curry                   = require("bs-platform/lib/js/curry.js");

+var Buffer                  = require("bs-platform/lib/js/buffer.js");

+var Lexing                  = require("bs-platform/lib/js/lexing.js");

+var Script                  = require("./script.js");

+var Source                  = require("./source.js");

+var $$String                = require("bs-platform/lib/js/string.js");

+var Operators               = require("./operators.js");

+var Caml_format             = require("bs-platform/lib/js/caml_format.js");

+var Caml_string             = require("bs-platform/lib/js/caml_string.js");

+var Caml_builtin_exceptions = require("bs-platform/lib/js/caml_builtin_exceptions.js");

 

 function convert_pos(pos) {

   return /* record */[

@@ -20438,50 +19961,69 @@
   return error(lexbuf, msg);

 }

 

-function text(s) {

+function string(s) {

   var b = Buffer.create(s.length);

   var i = 1;

   while(i < (s.length - 1 | 0)) {

     var c;

     if (Caml_string.get(s, i) !== /* "\\" */92) {

       c = Caml_string.get(s, i);

-    }

-    else {

+    } else {

       i = i + 1 | 0;

-      var d = Caml_string.get(s, i);

+      var h = Caml_string.get(s, i);

       var exit = 0;

-      if (d >= 92) {

-        if (d !== 110) {

-          if (d !== 116) {

-            if (d >= 93) {

-              exit = 1;

-            }

-            else {

-              c = /* "\\" */92;

+      if (h >= 40) {

+        if (h >= 110) {

+          if (h >= 118) {

+            exit = 1;

+          } else {

+            switch (h - 110 | 0) {

+              case 0 : 

+                  c = /* "\n" */10;

+                  break;

+              case 4 : 

+                  c = /* "\r" */13;

+                  break;

+              case 1 : 

+              case 2 : 

+              case 3 : 

+              case 5 : 

+                  exit = 1;

+                  break;

+              case 6 : 

+                  c = /* "\t" */9;

+                  break;

+              case 7 : 

+                  var j = i + 2 | 0;

+                  i = $$String.index_from(s, j, /* "}" */125);

+                  var n = Caml_format.caml_int_of_string("0x" + $$String.sub(s, j, i - j | 0));

+                  var bs = Utf8.encode(/* :: */[

+                        n,

+                        /* [] */0

+                      ]);

+                  Buffer.add_substring(b, bs, 0, bs.length - 1 | 0);

+                  c = Caml_string.get(bs, bs.length - 1 | 0);

+                  break;

+              

             }

           }

-          else {

-            c = /* "\t" */9;

-          }

+        } else if (h !== 92) {

+          exit = 1;

+        } else {

+          c = /* "\\" */92;

         }

-        else {

-          c = /* "\n" */10;

-        }

-      }

-      else if (d !== 34) {

-        if (d !== 39) {

+      } else if (h !== 34) {

+        if (h >= 39) {

+          c = /* "'" */39;

+        } else {

           exit = 1;

         }

-        else {

-          c = /* "'" */39;

-        }

-      }

-      else {

+      } else {

         c = /* "\"" */34;

       }

       if (exit === 1) {

         i = i + 1 | 0;

-        c = Char.chr(Caml_format.caml_int_of_string("0x" + ($$String.make(1, d) + $$String.make(1, Caml_string.get(s, i)))));

+        c = Char.chr(Caml_format.caml_int_of_string("0x" + ($$String.make(1, h) + $$String.make(1, Caml_string.get(s, i)))));

       }

       

     }

@@ -20505,8 +20047,8 @@
       throw [

             Caml_builtin_exceptions.assert_failure,

             [

-              "text/lexer.mll",

-              45,

+              "lexer.mll",

+              53,

               9

             ]

           ];

@@ -20523,8 +20065,8 @@
       throw [

             Caml_builtin_exceptions.assert_failure,

             [

-              "text/lexer.mll",

-              51,

+              "lexer.mll",

+              59,

               9

             ]

           ];

@@ -20541,8 +20083,8 @@
       throw [

             Caml_builtin_exceptions.assert_failure,

             [

-              "text/lexer.mll",

-              57,

+              "lexer.mll",

+              65,

               9

             ]

           ];

@@ -20563,8 +20105,8 @@
       throw [

             Caml_builtin_exceptions.assert_failure,

             [

-              "text/lexer.mll",

-              65,

+              "lexer.mll",

+              73,

               9

             ]

           ];

@@ -20583,8 +20125,8 @@
       throw [

             Caml_builtin_exceptions.assert_failure,

             [

-              "text/lexer.mll",

-              72,

+              "lexer.mll",

+              80,

               9

             ]

           ];

@@ -20597,13 +20139,12 @@
     throw [

           Caml_builtin_exceptions.assert_failure,

           [

-            "text/lexer.mll",

-            78,

+            "lexer.mll",

+            86,

             9

           ]

         ];

-  }

-  else {

+  } else {

     switch (switcher) {

       case 0 : 

           return s;

@@ -20611,8 +20152,8 @@
           throw [

                 Caml_builtin_exceptions.assert_failure,

                 [

-                  "text/lexer.mll",

-                  78,

+                  "lexer.mll",

+                  86,

                   9

                 ]

               ];

@@ -20626,11 +20167,11 @@
 var opt = Lib.Option[/* get */0];

 

 var __ocaml_lex_tables = /* record */[

-  /* lex_base */"\0\0o\xffp\xffq\xffr\xff\x01\0U\0\x07\0\x1b\0\x05\0o\0o\0t\0\x06\0j\0\x0e\0k\0y\0\x10\0y\0s\0\xb4\0\x01\x01z\0\xbe\0\xc5\0\x04\x01\x1a\x01\xfe\xff\x02\0s\xff\x13\0<\x01R\x01x\x01\"\0\x8f\x01\xd5\x01\x0e\x01\xee\x01/\x02>\x02U\x02\x96\x02\xa0\x02O\0D\0\xac\x02\xc2\x02\xe7\x02\0\x03&\x03L\x03z\0|\0~\0\x86\0|\0y\0\xfb\xff\x85\0\0\0\x0f\0\x87\0r\x03\x98\x03\xb1\0\xe8\xff\r\0\x10\0\xee\0\xad\0\xb6\0\xbb\0\xc2\0\x82\xff\xb4\0x\xff\0\0\x9c\x02\xb8\0\xbb\0\xf1\0\xca\0\xbf\0\xc2\0\xe3\0\xf2\0\xef\0\xe4\0\xf8\0\xeb\0\xf3\0*\x01\n\x01\xe6\0\xe8\0\xf5\0\xf7\0\xf7\0\xf5\xff\xd7\xff\xd6\xff\0\0\x01\0\x16\x01\x14\x01j\x01\x1c\0\x1a\0\x1b\x01\b\x01\xdb\xff\x19\x01\xb3\xff\xb4\xff'\x01\xb1\xff\xb2\xff3\x01\x1a\x01\x1e\x01\x1e\x01,\x01\xae\x01\x1f\0&\0\xda\xff\xcc\xffA\x01\xc3\xffV\x01\xc1\xff\xc2\xff3\x01A\x019\x01>\x01\xd5\xfff\x01h\x01\xcd\xff\xc6\xffa\x01\xcb\xffX\x01p\x01c\x01\xc9\xff\xca\xffc\x01w\x01t\x01\x84\x01r\x01\xc7\xff\xc8\xffu\x01\x85\x01y\x01|\x01{\x01\x89\x01{\x01\0\0\x90\x01*\0,\0\x97\xff\x8b\x01\xbf\xff\xc0\xff\xc5\xff\x86\x01\xc4\xff\x7f\x01\xb7\xff\xb5\xff\x9b\x01\x9c\x01\x89\x01\xaf\xff\xb0\xff\x9c\x01\xad\xff\xae\xff\xa3\x01\xa0\x01\xe3\x01\xaa\x01\xde\x01\xe1\x01\xa6\xff\xa8\x01\xba\x01\xc6\x01\xcb\x01\xb8\x01\xfd\x01\xff\x01\xcf\x01\t\x02\t\x02\f\x02\xa1\xff\x9f\xff\xda\x01\x0e\x02\x0e\x02\x11\x02\xa0\xff\x9e\xff\x18\x02~\x03\xd6\x01\xe6\x01\xdf\x01\xdb\x01\xd6\x01\xe8\x01\xe4\x01\xe7\x01\xe6\x01\xf4\x01\xe6\x01,\x02\xf6\x01'\x026\x02\x96\xff\xf8\x01\b\x02\n\x02\x15\x02\x1b\x02\b\x02M\x02O\x02&\x02]\x02_\x02\xa5\xff)\x02`\x02b\x02\xa4\xff&\x02*\x02)\x02\x86\xff.\x02\xf2\xff\xf8\xff\xf9\xff\xfa\xff\xd1\x03F\x04\xf7\xff9\x04\xa4\x047\x02r\x02u\x02z\x02\xb7\x03D\x02H\x029\x02F\x02K\x02>\x02E\x02Q\x02M\x02M\x02\xbd\x03\x97\x02T\x02x\x02F\x02t\x02^\x02R\x02g\x02\x8a\x02x\x02\xbd\x02\xbf\x02\x86\x02\xcf\x02\xca\x02\xd2\x02\x9d\xff\x9b\xff\xa4\x02\xdf\x02\xe2\x02\xef\x02\x9c\xff\x9a\xff\xaf\x02\xba\x02\xbd\x02\xb7\x02\xb8\xff\xba\x02\xd1\xff\xa9\xff\xaa\xff\xce\x02\xd7\x02\xdd\xff\xda\x02\xcb\x02\xcf\x02\xcd\x02\xdb\x02\xdc\xff\xd3\x02\xd2\xff\xbd\xff\xee\x02\xdc\x02\xd4\xff\xeb\x02\xdf\x02\xec\x02\xce\xff\t\x03\xfb\x02\xd3\xff\xbe\xff\0\x03\x02\x03\0\x03\xd0\xff\xfe\x02\x06\x03\x12\x03\xcf\xff\xfe\x02\t\x03\f\x03\xbc\xff\xba\xff\xb9\xff\f\x03\x05\x03\xbb\xff\x17\x03\x1f\x03/\x03f\x031\x03b\x03e\x03\xa3\xff\xac\xff\xa7\xff\xa8\xff1\x03-\x03(\x038\x03,\x03/\x03.\x03<\x038\x03\x8a\x03Q\x03\x88\x03\x8b\x03\x99\xff\x90\x03\x1f\x04Z\x03N\x03X\x03S\x03V\x03U\x03Q\x03a\x03\x98\x03l\x03\xad\x03\xb2\x03\xa2\xff}\x03y\x03t\x03\x84\x03}\x03\x84\x03\x83\x03\x92\x03\x8b\x03\xd1\x03\xa2\x03\xd6\x03\xd9\x03\x98\xff\xab\x03\x92\xff\x9c\x03\xa7\x03\x98\x03\xb3\x03\xaa\x03\xb2\x03\xbe\x03\xf4\xff\xbf\x03\xb9\x03\xeb\x03\x97\x04\xa2\x04\xac\x04\xb6\x04\xdc\x04\xc9\x03\xbd\x03\xbc\x03\xd9\x03\xc0\x04\xc1\x03\xc8\x03\xd6\x03\xce\x03\xce\x03\xd0\x03\xdf\x03\xd5\x03\xdc\x03\xd4\x03\xd2\x03\xf9\x03\x02\x04\x0f\x04\x80\xff\xfe\x03\x14\x04\n\x04\x0e\x04\x14\x04\x7f\xff\x13\x04\r\x04(\x04\x1f\x04\x1b\x04\x14\x04-\x04$\x04+\x041\x04~\xff*\x04.\x04*\x04.\x04?\x04?\x047\x04_\x04}\xff|\x04|\x04\x80\x04\x85\x04\x95\x04\x87\x04\x95\x04\x8f\x04{\xff\x9d\x04\x8f\x04z\xff\x99\x04\xa1\x04\x8e\x04\x91\x04\x91\x04\x9d\x04\x98\x04\x9a\x04y\xff\x9c\x04\xa6\x04\x97\x04\xf3\xff\xa1\x04\xba\x04\xc2\x04\x8c\xff\xb9\x04\xb8\x04\xb2\x04\x8a\xff\xba\x04\xc9\x04\xce\x04\xcd\x04\xc9\x04\xd5\x04\xd5\x04\xcc\x04\xd4\x04\xf1\xff\xc6\x04\xcc\x04\xcc\x04\xf0\xff\xe2\x04\x88\xff\xe5\x04\xd6\x04\xe4\x04\xdd\x04\xef\xff\xe0\x04\xe9\x04\xe5\x04\xeb\xff\xea\x04\xe1\x04\xe9\x04\xea\xff\xec\x04\xef\x04\xe1\x04\xee\xff\xe6\x04\x8e\xff\xe3\x04\xf0\x04\xf2\x04\xed\xff\xea\x04\xf3\x04\xe6\xff\x89\xff\xea\x04\xe8\x04\xe8\x04\x85\xff\xf6\x04\xf5\x04\xea\x04\xeb\x04\xef\x04\xf4\x04\xe9\xff\xf8\x04\xf1\x04\x8f\xff\xf3\x04\xf3\x04\x03\x05\xf9\x04\x83\xff\n\x05\xfd\x04\t\x05\n\x05\x02\x05\xe7\xff\x12\x05\x06\x05\x04\x05\x11\x05\x14\x05\n\x05\xe0\xff\x12\x05\x93\xff\f\x05\x14\x05\x8b\xff\b\x05\x1a\x05\x10\x05\x1e\x05\x19\x05\x1c\x05\f\x05\xe5\xff\x1a\x05\x16\x05\x14\x05\"\x05&\x05\x1c\x05\xe1\xff\x1a\x05(\x05*\x05 \x05\xde\xff\x1b\x05\x1a\x05\x91\xff&\x05 \x05\x1d\x05\x84\xff \x05'\x05(\x056\x05-\x05)\x054\x050\x05(\x056\x059\x05)\x05\xe3\xff,\x05:\x052\x05-\x05C\x056\x05@\x059\x058\x056\x050\x05\x95\xff;\x05<\x058\x05N\x05G\x05C\x05A\x05N\x05Q\x05H\x05\xe2\xffF\x05T\x05V\x05L\x05\xdf\xffB\x05[\x05N\x05W\x05P\x05O\x05M\x05G\x05\x94\xff_\x05a\x05W\x05\x8d\xffP\x05_\x05S\x05b\x05T\x05\x8c\x05\x9a\x05\xa4\x05\xae\x05\xb8\x05\xcf\x05\x82\x05~\x05\x80\x05w\xff\x83\x05\x95\x05\x8a\x05\x90\xff\x15\x06\xee\x05t\xffu\xff\x02\x06\xfb\xff\xfc\xff\xfd\xff\xce\x05\x01\0\xff\xff\xfe\xff",

-  /* lex_backtrk */"\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x90\0\x90\0\x90\0\x90\0\x90\0\x90\0\x90\0\x90\0\x90\0\x90\0\x90\0\x90\0\x90\0\x90\0\x90\0\x90\0\x90\0\x90\0\x90\0\x90\0\x90\0\x02\0\x02\0\xff\xff\0\0\xff\xff\xff\xff\x04\0\xff\xff\x02\0\xff\xff\xff\xff\x02\0\xff\xff\x02\0\x04\0\xff\xff\x04\0\x04\0\xff\xff\xff\xff\xff\xff\x03\0\x03\0\xff\xff\x03\0\x03\0\x03\0\xff\xff\x04\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x04\0\xff\xff\xff\xff\xff\xff\x04\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\t\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\"\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff#\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffI\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\t\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\b\0\b\0\xff\xff\xff\xff\xff\xff\t\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffT\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\t\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff'\0'\0\xff\xff'\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x83\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x13\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1b\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff~\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffx\0\xff\xff&\0&\0\xff\xff&\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x89\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x04\0\x04\0\xff\xff\xff\xff",

-  /* lex_default */"\x01\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\x01\x01\0\x01\0\0\xff\xff\0\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xa9\x02\0\0\0\0\xad\x02\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0",

-  /* lex_trans */'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x04\0\x03\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\0\0\0\0\0\0\0\x04\0\0\0\x16\0\0\0\x06\0\0\0\0\0\0\0\x1d\0\x1c\0\xb2\x02\x19\0\0\0\x19\0O\0\xa5\0\x1b\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0>\0\x05\0\xa9\x02\x1e\0,\0?\0,\0\xd4\0N\0+\0+\0+\0+\0+\0+\0+\0+\0+\0+\0&\0n\0&\0n\0\x7f\0(\0(\0(\0(\0(\0(\0(\0(\0(\0(\0\x7f\0\xa7\0\xa8\0t\0q\0\x14\0\x10\0\n\0\x11\0\x0e\0\x15\0\t\0\xa4\x02\x18\0z\x02#\x02\x0f\0\x13\0\x17\0\b\0\x07\0x\x02\r\0\x0b\0\f\0\x12\0\xa8\x02y\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\x11\x02\xf4\x01\xa8\x02\xa8\x02\x96\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\x95\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02<\0\xa8\x025\0\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02`\x02\xa8\x02D\x02\xa8\x02F\x022\x02\x18\x02\x05\x02\x19\x024\x02\xfe\x01<\x005\x02\x04\x02\xe8\x01\x96\x016\0\x97\x01\x17\x02E\x02_\x027\0\x95\x01\x06\x01\xe9\x01\xfa\0\x05\x01\xff\x018\x003\x02\xea\x019\0:\0E\0;\0=\0D\x000\0/\0/\0/\0/\0/\0/\0/\0/\0/\0@\0\x02\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfd\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xf6\0L\0\xfe\0C\0I\0J\0K\0M\0\x04\x01\xc1\0B\0F\0\xba\0.\0\xb1\0\xaf\0\xad\0 \0-\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0(\0(\0(\0(\0(\0(\0(\0(\0(\0(\0 \0\x1f\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\x006\0\xac\0\xb2\0\x97\0\x91\0\x8f\0\x86\0w\0\x8c\0\xff\0G\0\x1f\0f\0\x96\0e\0b\0H\0\xb3\0\x8b\0y\0x\0\x1f\0c\0d\0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0`\0j\0k\0a\0o\0p\0\x80\0p\0_\0\x1f\0\xfc\0\x1f\0"\0"\0"\0"\0"\0"\0"\0"\0"\0"\0s\0z\0r\0g\0{\0|\0!\0"\0"\0"\0"\0"\0"\0i\0v\0m\0u\0l\0h\0\x82\0\x83\0\x1f\0n\0\x87\0\x88\0\x81\0$\0\x89\0"\0"\0"\0"\0"\0"\0"\0"\0"\0"\0\x8a\0"\0"\0"\0"\0"\0"\0"\0"\0"\0"\0%\0"\0$\0$\0$\0$\0$\0$\0$\0$\0$\0$\0\x85\0\x8e\0\x84\0\x8d\0\x90\0\x92\0\x93\0$\0$\0$\0$\0)\0$\0\x95\0\xa9\0\x94\0"\0"\0"\0"\0%\0"\0~\0\x98\0}\0\x9d\0\x9a\0\x99\0\x9c\0\x7f\0\x9b\0#\0\x9e\0\x9f\0\xa0\0\xa1\0\xa2\0\xa3\0\xa4\0$\0$\0$\0$\0)\0$\0\xa6\0\xab\0\xae\0\xb0\0\xb7\0\xb4\0\xb6\0\xaa\0\xb5\0#\0&\0\xfd\0&\0$\0\xbb\0\'\0\'\0\'\0\'\0\'\0\'\0\'\0\'\0\'\0\'\0\xb9\0\xbc\0\xb8\0\xbd\0\xbe\0\xbf\0\xc0\0"\0"\0"\0"\0%\0"\0$\0\xc2\0\'\0\'\0\'\0\'\0\'\0\'\0\'\0\'\0\'\0\'\0\xc3\0\xc4\0\xc5\0\xc7\0\xce\0\xc6\0\xc8\0"\0"\0"\0"\0%\0"\0\xc9\0"\0"\0"\0"\0%\0"\0\xcb\0\xcd\0\xcc\0\xca\0\xcf\0\xd1\0\xd3\0\xd2\0\xd0\0#\0\xd5\0\xaf\0\xd9\0\xda\0\xdb\0\xd8\0\x99\0\xdc\0\xe6\0"\0"\0"\0"\0%\0"\0\x96\0\xdd\0\xde\0\xdf\0\xe0\0\xe1\0\xe2\0\xe3\0\xe4\0#\0(\0(\0(\0(\0(\0(\0(\0(\0(\0(\0&\0\xe5\0&\0\xe7\0\xe8\0*\0*\0*\0*\0*\0*\0*\0*\0*\0*\0\xe9\0\xea\0\xeb\0\xed\0\xf2\0\xec\0\xee\0$\0$\0$\0$\0)\0$\0*\0*\0*\0*\0*\0*\0*\0*\0*\0*\0\xef\0\xf0\0\xf1\0\xf3\0\xf4\0\xf5\0\xf7\0$\0$\0$\0$\0)\0$\0\xf8\0\xf9\0\xfb\0$\0$\0$\0$\0)\0$\0\x93\x01v\x01\x07\x01\b\x01h\x01e\x01Z\x01T\x01f\x01#\0[\x01P\x01L\x01A\x01I\x01U\x01H\x01$\0$\0$\0$\0)\0$\0g\x011\x019\x01,\x01V\x01:\x018\x01\x1a\x01\x1b\x01#\0+\0+\0+\0+\0+\0+\0+\0+\0+\0+\0+\0+\0+\0+\0+\0+\0+\0+\0+\0+\0 \0\x1c\x01/\0/\0/\0/\0/\0/\0/\0/\0/\0/\0\x18\x01c\0\x17\x01\x1d\x01\x19\x01\x1f\x01&\x01\x1e\x01 \x01!\x01 \0\x1f\0/\0/\0/\0/\0/\0/\0/\0/\0/\0/\0\x15\x01Z\0%\x01^\0X\0T\0#\x01R\0$\x01"\x01\x16\x01\x1f\0]\0Y\0S\0V\0[\0\'\x01W\0\\\0P\0\x1f\0)\x01Q\0U\0(\x01+\x012\x002\x002\x002\x002\x002\x002\x002\x002\x002\0*\x01-\x01.\x01/\x010\x012\x01\x1f\x002\x002\x002\x002\x002\x002\0$\x006\x012\x002\x002\x002\x002\x002\x002\x002\x002\x002\x001\x007\x01@\x01>\x01;\x01<\x01=\x012\x002\x002\x002\x003\x002\0?\x012\x002\x002\x002\x002\x002\0D\x01B\x01E\x01&\0F\x01&\0$\0C\x014\x004\x004\x004\x004\x004\x004\x004\x004\x004\0G\x012\x002\x002\x002\x003\x002\x002\x002\x002\x002\x003\x002\0K\x01J\x01M\x01#\0N\x01O\x01Q\x01R\x01S\x01Y\x01X\x01W\x01]\x01$\0\\\x014\x004\x004\x004\x004\x004\x004\x004\x004\x004\0^\x012\x002\x002\x002\x003\x002\x002\x002\x002\x002\x003\x002\0_\x01`\x01a\x01#\0b\x01c\x01d\x01i\x01j\x01k\x01l\x01m\x01n\x01o\x01p\x01A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0q\x012\x002\x002\x002\x003\x002\0A\0A\0A\0A\0A\0A\0r\x01s\x01t\x01#\0u\x01w\x01\x85\x01{\x01[\x01|\x01}\x01~\x01\x7f\x01\x80\x01\x81\x01A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0\x82\x01A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0Z\0\x83\x01^\0X\0\xd6\0\x84\x01R\0\x86\x01\x87\x01\x88\x01\x89\x01]\0Y\0S\0V\0[\0\x8a\x01\xd7\0\\\0P\0\x03\x01\x8b\x01\x8c\x01U\0\x8d\x01\x03\x01A\0A\0A\0A\0A\0A\0\x8e\x01\x8f\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x90\x01\x91\x01\x92\x01\x94\x01\xa5\x01\x9d\x01\x98\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x10\x01\x99\x01\x14\x01\f\x01\x0b\x01\x0f\x01\n\x01\x9a\x01\x9b\x01\x9c\x013\x01\x13\x01\r\x01\x11\x01\x9e\x01\x9f\x01\xa0\x01\t\x01\x12\x01\x0e\x015\x01\x03\x01\xa6\x01\xa7\x01\xa8\x014\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\xa9\x01\xdf\x01\xdc\x01\xd3\x01\xca\x01\xbf\x01\xb9\x01\x03\x01\xb1\x01\xb2\x01\xb3\x01\xb4\x01\xb5\x01\x03\x01\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfd\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xb6\x01\xb7\x01\xfe\0\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\xb8\x01\xba\x01\xbb\x01\xbc\x01\xbd\x01\xbe\x01\xc0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\x10\x01\xc1\x01\x14\x01z\x01\x0b\x01\x0f\x01\n\x01\xc2\x01\xc3\x01\xc4\x01\xc5\x01\x13\x01\r\x01\x11\x01\xc6\x01y\x01\xc7\x01x\x01\x12\x01\x0e\x01\xc8\x01\xc9\x01\xcb\x01\xcc\x01\xcd\x01\xce\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\xcf\x01\xd0\x01\xff\0\xd1\x01\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfd\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xd2\x01\xfc\0\xfe\0\xa2\x01\xa1\x01\xa1\x01\xa1\x01\xa1\x01\xa1\x01\xa1\x01\xa1\x01\xa1\x01\xa1\x01\xff\xff\xa1\x01\xa1\x01\xa1\x01\xa1\x01\xa1\x01\xa1\x01\xa1\x01\xa1\x01\xa1\x01\xa1\x01\xa1\x01\xa1\x01\xa1\x01\xa1\x01\xa1\x01\xa1\x01\xa1\x01\xa1\x01\xa1\x01\xa1\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xd4\x01\xd5\x01\xd6\x01\xd7\x01\xd8\x01\xd9\x01\xda\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xdb\x01\xdd\x01\xde\x01\xff\0\xe0\x01\xe1\x01\xe2\x01\xe3\x01\xe4\x01\xe5\x01\xe6\x01\xe7\x01\xf0\x01\xec\x01\xeb\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xed\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xfc\0\xa3\x01\xaa\x01\xee\x01\xef\x01\xf1\x01\xaf\x01\xf2\x01\xf3\x01\xf5\x01\xb0\x01\xf6\x01\xf7\x01\xf8\x01\xf9\x01\xac\x01\xae\x01\xab\x01\xad\x01\xfa\x01\xfb\x01\xfc\x01\xfd\x01\x02\x02\0\x02\x01\x02\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\x03\x02\t\x02\x06\x02\xfd\0\x07\x02\b\x02\x0b\x02\r\x02\f\x02\x0e\x02\x0f\x02\x10\x02\x12\x02\x15\x02\x14\x02\x16\x02\x1f\x02\n\x02\x1b\x02\x1a\x02\x1e\x02\x1d\x02 \x02!\x02\x13\x02"\x02$\x02-\x02*\x02\'\x02(\x02)\x02\x1c\x02+\x02,\x02.\x02/\x020\x02%\x02&\x021\x02A\x02?\x028\x026\x027\x029\x02:\x02;\x02<\x02=\x02>\x02@\x02B\x02C\x02[\x02X\x02H\x02L\x02I\x02J\x02K\x02M\x02S\x02O\x02G\x02P\x02N\x02Q\x02R\x02T\x02U\x02V\x02W\x02Y\x02Z\x02\\\x02]\x02^\x02l\x02a\x02b\x02c\x02d\x02e\x02f\x02g\x02h\x02i\x02j\x02k\x02m\x02n\x02o\x02p\x02q\x02r\x02\xfd\0s\x02t\x02u\x02v\x02w\x02\x91\x02\x88\x02{\x02|\x02}\x02\x83\x02\x7f\x02\x80\x02\x81\x02~\x02\x82\x02\x84\x02\x85\x02\x86\x02\x87\x02\x89\x02\x8a\x02\x8b\x02\x8c\x02\x8d\x02\x8e\x02\x8f\x02\x90\x02\x92\x02\x93\x02\x94\x02\xa0\x02\x97\x02\x98\x02\x99\x02\x9a\x02\x9b\x02\x9d\x02\x9c\x02\x9c\x02\x9c\x02\x9c\x02\x9c\x02\x9c\x02\x9c\x02\x9c\x02\x9c\x02\x9c\x02\x9c\x02\x9c\x02\x9c\x02\x9c\x02\x9c\x02\x9c\x02\x9c\x02\x9c\x02\x9c\x02\x9c\x02\x9c\x02\x9c\x02\x9c\x02\x9c\x02\x9c\x02\x9c\x02\x9c\x02\x9c\x02\x9c\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\xa1\x02\xa2\x02\xa3\x02\xa5\x02\xa6\x02\xa7\x02\xaa\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\xb3\x02\0\0\0\0\xaf\x02\0\0\0\0\0\0\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\0\0\0\0\0\0\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x9e\x02\0\0\0\0\0\0\xb0\x02\0\0\0\0\0\0\0\0\0\0\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\xa8\x02\0\0\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xb1\x02\0\0\xa8\x02\xa8\x02\0\0\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\0\0\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\0\0\xa8\x02\0\0\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\0\0\xa8\x02\0\0\xa8\x02\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\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\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\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\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\xab\x02\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\0\0\xae\x02\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\0\0',

-  /* lex_check */"\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xb1\x02\0\0\xff\xff\0\0N\0\xa4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0=\0\0\0\x05\0\x1d\0\x1f\0>\0\x1f\0D\0E\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0#\0l\0#\0m\0}\0#\0#\0#\0#\0#\0#\0#\0#\0#\0#\0~\0\xa6\0\xa7\0g\0h\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x07\0\0\0\t\0\r\0\0\0\0\0\0\0\0\0\0\0\t\0\0\0\0\0\0\0\0\0\x06\0\t\0\x06\0\x06\0\x06\0\x06\0\x06\0\x0f\0\x12\0\x06\0\x06\0\b\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\b\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0-\0\x06\0.\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\n\0\x06\0\x0b\0\x06\0\x0b\0\f\0\x0e\0\x10\0\x0e\0\f\0\x11\0\x17\0\f\0\x10\0\x13\0\x14\x005\0\x14\0\x0e\0\x0b\0\n\x006\0\x14\0\x15\0\x13\0\x17\0\x15\0\x11\x007\0\f\0\x13\x008\x009\0\x18\0:\0<\0\x18\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0?\0\0\0\x16\0\x16\0\x16\0\x16\0\x16\0\x16\0\x16\0\x16\0\x16\0\x16\0\x16\0\x16\0\x16\0\x16\0\x16\0\x16\0\x16\0\x16\0\x16\0\x16\0\x16\0\x16\0\x16\0\x16\0\x16\0\x16\0\x16\0\x16\0\x16\0\x16\0\x16\0\x16\0B\0G\0\x16\0\x18\0H\0I\0J\0L\0\x15\0P\0\x18\0\x18\0Q\0\x19\0S\0T\0U\0\x1a\0\x19\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0&\0&\0&\0&\0&\0&\0&\0&\0&\0&\0\x1b\0\x1a\0\x1b\0\x1b\0\x1b\0\x1b\0\x1b\0\x1b\0\x1b\0\x1b\0\x1b\0\x1b\0F\0V\0R\0W\0X\0Y\0[\0\\\0Z\0\x16\0F\0\x1b\0_\0W\0`\0a\0F\0R\0Z\0\\\0\\\0\x1a\0b\0c\0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0^\0i\0j\0^\0n\0o\0x\0o\0^\0\x1b\0\x16\0 \0!\0!\0!\0!\0!\0!\0!\0!\0!\0!\0q\0y\0q\0]\0z\0{\0\x1b\0!\0!\0!\0!\0!\0!\0]\0t\0k\0t\0k\0]\0w\0\x81\0 \0k\0\x86\0\x87\0w\0\"\0\x88\0\"\0\"\0\"\0\"\0\"\0\"\0\"\0\"\0\"\0\"\0\x89\0!\0!\0!\0!\0!\0!\0\"\0\"\0\"\0\"\0\"\0\"\0$\0$\0$\0$\0$\0$\0$\0$\0$\0$\0\x83\0\x8b\0\x83\0\x8c\0\x8f\0\x91\0\x92\0$\0$\0$\0$\0$\0$\0\x93\0\x96\0\x93\0\"\0\"\0\"\0\"\0\"\0\"\0|\0\x97\0|\0\x98\0\x99\0\x97\0\x9a\0|\0\x9a\0\"\0\x9d\0\x9e\0\x9f\0\xa0\0\xa1\0\xa2\0\xa3\0$\0$\0$\0$\0$\0$\0\xa5\0\xa9\0\xad\0\xaf\0\xb2\0\xb3\0\xb4\0\xa9\0\xb4\0$\0%\0\x16\0%\0%\0\xba\0%\0%\0%\0%\0%\0%\0%\0%\0%\0%\0\xb7\0\xbb\0\xb7\0\xbc\0\xbd\0\xbe\0\xbf\0%\0%\0%\0%\0%\0%\0'\0\xc1\0'\0'\0'\0'\0'\0'\0'\0'\0'\0'\0\xc2\0\xc3\0\xc4\0\xc5\0\xc6\0\xc5\0\xc7\0'\0'\0'\0'\0'\0'\0\xc8\0%\0%\0%\0%\0%\0%\0\xc9\0\xca\0\xcb\0\xc9\0\xce\0\xcf\0\xd0\0\xd1\0\xcf\0%\0\xd4\0\xd6\0\xd8\0\xd9\0\xda\0\xd7\0\xd8\0\xdb\0\xd6\0'\0'\0'\0'\0'\0'\0\xd7\0\xdc\0\xdd\0\xde\0\xdf\0\xe0\0\xe1\0\xe2\0\xe3\0'\0(\0(\0(\0(\0(\0(\0(\0(\0(\0(\0)\0\xe4\0)\0\xe6\0\xe7\0)\0)\0)\0)\0)\0)\0)\0)\0)\0)\0\xe8\0\xe9\0\xea\0\xeb\0\xec\0\xeb\0\xed\0)\0)\0)\0)\0)\0)\0*\0*\0*\0*\0*\0*\0*\0*\0*\0*\0\xee\0\xef\0\xf0\0\xf2\0\xf3\0\xf4\0\xf6\0*\0*\0*\0*\0*\0*\0\xf7\0\xf8\0\xfa\0)\0)\0)\0)\0)\0)\0\x04\x01\x05\x01\x06\x01\x07\x01\t\x01\x0b\x01\f\x01\r\x01\n\x01)\0\f\x01\x0e\x01\x0f\x01\x11\x01\x10\x01\r\x01\x10\x01*\0*\0*\0*\0*\0*\0\n\x01\x15\x01\x12\x01\x17\x01\r\x01\x12\x01\x12\x01\x19\x01\x1a\x01*\0+\0+\0+\0+\0+\0+\0+\0+\0+\0+\0,\0,\0,\0,\0,\0,\0,\0,\0,\0,\0/\0\x1b\x01/\0/\0/\0/\0/\0/\0/\0/\0/\0/\0\x16\x01\x18\x01\x16\x01\x1c\x01\x18\x01\x1d\x01\x1e\x01\x1d\x01\x1f\x01 \x010\0/\x000\x000\x000\x000\x000\x000\x000\x000\x000\x000\0\x14\x01O\0\"\x01O\0O\0O\0!\x01O\0#\x01!\x01\x14\x010\0O\0O\0O\0O\0O\0&\x01O\0O\0O\0/\0'\x01O\0O\0'\x01(\x011\x001\x001\x001\x001\x001\x001\x001\x001\x001\0)\x01,\x01-\x01.\x01/\x011\x010\x001\x001\x001\x001\x001\x001\x002\x005\x012\x002\x002\x002\x002\x002\x002\x002\x002\x002\x000\x006\x018\x019\x01:\x01;\x01<\x012\x002\x002\x002\x002\x002\0>\x011\x001\x001\x001\x001\x001\0B\x01A\x01D\x013\0E\x013\x003\0A\x013\x003\x003\x003\x003\x003\x003\x003\x003\x003\0F\x012\x002\x002\x002\x002\x002\x003\x003\x003\x003\x003\x003\0H\x01I\x01L\x012\0M\x01N\x01P\x01Q\x01R\x01T\x01U\x01V\x01Z\x014\0[\x014\x004\x004\x004\x004\x004\x004\x004\x004\x004\0]\x013\x003\x003\x003\x003\x003\x004\x004\x004\x004\x004\x004\0^\x01_\x01`\x013\0a\x01b\x01c\x01h\x01i\x01j\x01k\x01l\x01m\x01n\x01o\x01@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0p\x014\x004\x004\x004\x004\x004\0@\0@\0@\0@\0@\0@\0q\x01r\x01s\x014\0t\x01v\x01x\x01y\x01z\x01{\x01|\x01}\x01~\x01\x7f\x01\x80\x01A\0A\0A\0A\0A\0A\0A\0A\0A\0A\0\x81\x01@\0@\0@\0@\0@\0@\0A\0A\0A\0A\0A\0A\0\xd5\0\x82\x01\xd5\0\xd5\0\xd5\0\x83\x01\xd5\0\x85\x01\x86\x01\x87\x01\x88\x01\xd5\0\xd5\0\xd5\0\xd5\0\xd5\0\x89\x01\xd5\0\xd5\0\xd5\0\xff\0\x8a\x01\x8b\x01\xd5\0\x8c\x01\xff\0A\0A\0A\0A\0A\0A\0\x8d\x01\x8e\x01\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\x8f\x01\x90\x01\x91\x01\x93\x01\x95\x01\x96\x01\x97\x01\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\b\x01\x98\x01\b\x01\b\x01\b\x01\b\x01\b\x01\x99\x01\x9a\x01\x9b\x01\x13\x01\b\x01\b\x01\b\x01\x9d\x01\x9e\x01\x9f\x01\b\x01\b\x01\b\x01\x13\x01\xff\0\xa5\x01\xa6\x01\xa7\x01\x13\x01\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xa8\x01\xaa\x01\xab\x01\xac\x01\xad\x01\xae\x01\xaf\x01\xff\0\xb0\x01\xb1\x01\xb2\x01\xb3\x01\xb4\x01\xff\0\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\xb5\x01\xb6\x01\0\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\xb7\x01\xb9\x01\xba\x01\xbb\x01\xbc\x01\xbd\x01\xbf\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01w\x01\xc0\x01w\x01w\x01w\x01w\x01w\x01\xc1\x01\xc2\x01\xc3\x01\xc4\x01w\x01w\x01w\x01\xc5\x01w\x01\xc6\x01w\x01w\x01w\x01\xc7\x01\xc8\x01\xca\x01\xcb\x01\xcc\x01\xcd\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\xce\x01\xcf\x01\0\x01\xd0\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\xd1\x01\0\x01\x03\x01\xa0\x01\xa0\x01\xa0\x01\xa0\x01\xa0\x01\xa0\x01\xa0\x01\xa0\x01\xa0\x01\xa0\x01\xff\0\xa1\x01\xa1\x01\xa1\x01\xa1\x01\xa1\x01\xa1\x01\xa1\x01\xa1\x01\xa1\x01\xa1\x01\xa2\x01\xa2\x01\xa2\x01\xa2\x01\xa2\x01\xa2\x01\xa2\x01\xa2\x01\xa2\x01\xa2\x01\xa3\x01\xa3\x01\xa3\x01\xa3\x01\xa3\x01\xa3\x01\xa3\x01\xa3\x01\xa3\x01\xa3\x01\xd3\x01\xd4\x01\xd5\x01\xd6\x01\xd7\x01\xd8\x01\xd9\x01\xa3\x01\xa3\x01\xa3\x01\xa3\x01\xa3\x01\xa3\x01\xda\x01\xdc\x01\xdd\x01\x03\x01\xdf\x01\xe0\x01\xe1\x01\xe2\x01\xe3\x01\xe4\x01\xe5\x01\xe6\x01\xe8\x01\xe9\x01\xea\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xec\x01\xa3\x01\xa3\x01\xa3\x01\xa3\x01\xa3\x01\xa3\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\x03\x01\xa2\x01\xa9\x01\xed\x01\xee\x01\xf0\x01\xa9\x01\xf1\x01\xf2\x01\xf4\x01\xa9\x01\xf5\x01\xf6\x01\xf7\x01\xf8\x01\xa9\x01\xa9\x01\xa9\x01\xa9\x01\xf9\x01\xfa\x01\xfb\x01\xfc\x01\xfe\x01\xff\x01\0\x02\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\xa4\x01\x02\x02\x04\x02\x05\x02\0\x01\x06\x02\x07\x02\t\x02\n\x02\x0b\x02\r\x02\x0e\x02\x0f\x02\x11\x02\x12\x02\x13\x02\x15\x02\x17\x02\t\x02\x18\x02\x19\x02\x1b\x02\x1c\x02\x1f\x02 \x02\x11\x02!\x02#\x02$\x02%\x02&\x02'\x02(\x02\x18\x02*\x02+\x02-\x02.\x02/\x02#\x02#\x020\x022\x023\x024\x025\x026\x028\x029\x02:\x02;\x02<\x02=\x02?\x02A\x02B\x02D\x02E\x02F\x02G\x02H\x02I\x02J\x02L\x02M\x02N\x02F\x02O\x02L\x02P\x02Q\x02S\x02T\x02U\x02V\x02X\x02Y\x02[\x02\\\x02]\x02_\x02`\x02a\x02b\x02c\x02d\x02e\x02f\x02g\x02h\x02i\x02j\x02l\x02m\x02n\x02o\x02p\x02q\x02\x03\x01r\x02s\x02t\x02u\x02v\x02x\x02y\x02z\x02{\x02|\x02}\x02~\x02\x7f\x02\x80\x02|\x02\x81\x02\x83\x02\x84\x02\x85\x02\x86\x02\x88\x02\x89\x02\x8a\x02\x8b\x02\x8c\x02\x8d\x02\x8e\x02\x8f\x02\x91\x02\x92\x02\x93\x02\x95\x02\x96\x02\x97\x02\x98\x02\x99\x02\x9a\x02\x9b\x02\x9b\x02\x9b\x02\x9b\x02\x9b\x02\x9b\x02\x9b\x02\x9b\x02\x9b\x02\x9b\x02\x9c\x02\x9c\x02\x9c\x02\x9c\x02\x9c\x02\x9c\x02\x9c\x02\x9c\x02\x9c\x02\x9c\x02\x9d\x02\x9d\x02\x9d\x02\x9d\x02\x9d\x02\x9d\x02\x9d\x02\x9d\x02\x9d\x02\x9d\x02\x9e\x02\x9e\x02\x9e\x02\x9e\x02\x9e\x02\x9e\x02\x9e\x02\x9e\x02\x9e\x02\x9e\x02\xa0\x02\xa1\x02\xa2\x02\xa4\x02\xa5\x02\xa6\x02\xa9\x02\x9e\x02\x9e\x02\x9e\x02\x9e\x02\x9e\x02\x9e\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\xb0\x02\xff\xff\xff\xff\xac\x02\xff\xff\xff\xff\xff\xff\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\xff\xff\xff\xff\xff\xff\x9e\x02\x9e\x02\x9e\x02\x9e\x02\x9e\x02\x9e\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x9d\x02\xff\xff\xff\xff\xff\xff\xac\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\x9f\x02\xa8\x02\xff\xff\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xac\x02\xff\xff\xa8\x02\xa8\x02\xff\xff\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xff\xff\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xff\xff\xa8\x02\xff\xff\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xa8\x02\xff\xff\xa8\x02\xff\xff\xa8\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xa9\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xac\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff",

+  /* lex_base */"\0\0\x1d\0\xec\0,\x01\xb3\x01\xf3\x01\xab\x02\xb0\x02\xf1\0m\xffn\xffo\xff\x01\0\x91\x03\xbe\x01\xec\x02\x07\x04\f\x04\x11\x04\x16\x043\x04_\x04m\x04\x93\x04\x98\x04\x9d\x04\xa7\x04\xc8\x04\xcd\x04\xf0\x04r\x05j\x06t\x06\x84\x06\xc3\x06\xdd\x06\xfe\xff\x03\0p\xff\x12\x01\x13\x07U\x07\x9d\x07\x07\x02\xe6\x07o\x03\xa1\x05/\bP\b4\x07j\b\x84\b\x9e\b\xd7\b*\ts\tt\x03}\t\x95\x05\x1e\t\x97\t\xbe\t\x07\n\f\nN\nX\nh\ny\n\x85\n\x93\n\x9f\n\xad\n\xb9\n\xca\n\xee\n\xf3\n\x10\x0b\x1a\x0b*\x0b;\x0b\x81\x0b\x8c\x0b\x9b\x0b\xa9\x0b\xc3\x0b\xb5\x0b\xd2\x0b\xec\x0b\x0f\f\x1c\f9\fD\fS\f\x99\f\xb3\f\xbd\f\xc2\f\xcd\f\xf2\f\xf7\f\x03\r\x1d\r.\r>\rR\rt\r\x7f\r\x8e\r\xaf\r\xba\r\xd4\r\xde\r\xf8\r\x07\x0e\x12\x0e,\x0e6\x0e;\x0eF\x0e`\x0e\x83\x0e\x9d\x0e\xb7\x0e\xd9\x0e\xe3\x0e\xf3\x0e\x10\x0f\x1a\x0f;\x0f*\x0fU\x0f_\x0fd\x0fo\x0f\x89\x0f\x98\x0f\xb2\x0f\xbc\x0f\xde\x0f\xeb\x0f\xfb\x0f\x05\x10\x15\x10\x1f\x10/\x109\x10I\x10S\x10m\x10\x87\x10}\x10\x91\x10\xb7\x10\xc1\x10\xc6\x10\xe7\x10\x01\x11\x1b\x11(\x11N\x11X\x11u\x11\x83\x11\x92\x11\xa0\x11\xaf\x11\xba\x11\xd4\x11\xe2\x11\xee\x11\xfc\x11\x0b\x12\x16\x127\x12B\x12Q\x12\\\x12}\x12\x8b\x12\x9f\x12\xc3\x12\xcf\x12\xdd\x12\xec\x12\xf7\x12\x06\x13\x11\x132\x13=\x13L\x13W\x13f\x13\x80\x13\x8a\x13\x8f\x13\xb0\x13\xbe\x13\xd8\x13\xe5\x13\xff\x13\r\x14\x19\x14'\x14A\x14L\x14Q\x14[\x14\x8a\x14\x8f\x14\x94\x14\xbe\x14\xc8\x14\xe9\x14\xf4\x14+\x15:\x15[\x15`\x15e\x15\x88\x15\x94\x15\x99\x15\xbc\x15\xcd\x15\xdd\x15\xfa\x15\x07\x16\x17\x16:\x16?\x16D\x16a\x16n\x16\x99\x16\xa7\x16\xc8\x16\xe2\x16\xf2\x16\x03\x17%\x17*\x17G\x17R\x17t\x17\x82\x17\x8e\x17\x9c\x17\xab\x17\xb6\x17\xf8\xff\xf9\xff\xfa\xff\xd4\x17\0\0\xd6\0E\x18\x85\x18\xd3\x17\xa5\x18\xe5\x18\xa5\x19&\x1af\x1a\xa6\x1a\xe6\x1a&\x1bf\x1b\xa6\x1b\xe6\x1b&\x1c\xf7\xff\0\0_\x18\xe6\x1c\x98\x19\xd9\x1c\xde\x1d\f\x1d&\x1d\xe8\x1d\xf2\x1d\x13\x1e\x1f\x1eG\x1ea\x1el\x1e\x8d\x1e\x97\x1e\x9c\x1e\xa7\x1e\xcf\x1e\xf0\x1e\xfb\x1e\x1d\x1f(\x1fE\x1fP\x1fq\x1f{\x1f\x98\x1f\xa5\x1f\xbf\x1f\xcf\x1f\xe9\x1f\xf3\x1f\r \x19 = B L i u \x92 \xac \xa0 \xba \xd7 \xe2 \xe7 \n!\x16!'!7!K!Z!t!\x81!\x8e!\x9b!\xa8!\xd0!\xe0!\x03\"\b\"\x13\"7\"<\"]\"b\"q\"\x97\"\xa1\"\xa6\"\xcc\"\xd1\"\xdd\"\xee\"\b#\x12#8#E#R#b#\x88#\x92#\xb8#\xc9#\xd9#\xe3#\xf3#\0$\r$\x1a$A$N$[$k$u$\x92$\xac$\xc6$\xe3$\xe8$\x0b%\x17%\x1c%(%O%T%_%y%\x93%\xa1%\xb5%\xd7%\xe5%\f&\x1a&.&;&O&^&c&r&\x9e&\xad&\xd2&\xdd&\xe2&\x07'\x15')'='K'l'q'{'\x80'\xa1'\xa6'\xab'\xce'\xe2'\xf1'\x16(!(F(K(P(U(z(\x85(\x8a(\xad(\xb2(\xbe(\xe1(\xf1(\xfb(\x05)8)I)l)\x9f)\xd6)\xf0)B*\x8e)u*\x89*\xaa*\xaf*\xb9*\xd3*\xdf*\xe4*\x06+++6+P+Z+_+\x84+\x89+\x93+\xb4+\xb9+\xbe+\xdf+\xe9+\xf3+\x18,9,D,S,^,m,x,\x9a,\xa8,\xc2,\xce,\xe8,\xf2,\xf7,\x02-\x1f---N-]-h-\x82-\x8c-\xb1-\xb6-\xbb-\xd8-\xdd-\xfa-\b.\x14.1.<.K.e.o.t.\x95.\x9a.\xb7.\xbc.\xc1.\xe2.\xfc.\x06/\x16/:/I/N/o/~/\x83/\x92/\xbd/\xc7/\xcc/\xe9/\xf7/\x060\x0b0/0:0I0T0n0x0}0\xa10\xad0\xb20\xd40\xe10\xf10\xfb0\x0b1.181H1Y1m1|1\x961\xa21\xa71\xcd1\xdd1\xf71\xea1\x042\x11282H2R2u2\x862\xa82\xb22\xcc2\xd82\xe62\x003\f3\x1a343@3c3\x843\x8f3\xb13\xbb3\xd53\xe13\xef3\xfb3\t4\x154#424L4=4q4\x7f4\x8b4\x9c4\xbe4\xc94\xe34\xf44\x055\x1f5+595E5f5q5\x805\x9a5\xa65\xab5\xb75\xd15\xdb5\xe05\x046\x0f6\x14696G6V6[6\x7f6\x8a6\xa46\xb56\xc16\xe86\xf66\x137\"7?7Y7d7s7~7\xa07\xb17\xd97\xe57\xff7\r8!8.8H8T8n8{8\x958\xa18\xaf8\xbb8\xc98\xe38\xee8\xfd8\x0b90959A9h9\x859\xaa9\xb49\xb99\xc49\xde9\xe89\xf89\x05:\x12:\":/:Q:k:w:\x9a:\x9f:\xae:\xc2:\xd2:\xf7:\x1a;\x0b;\x1f;.;S;c;t;\x80;\xa3;\xad;\xb7;\xc7;\xe1;\xec;\t<\x14<\x19<#<=<H<b<p<\x8a<\x98<\xb2<\xc2<\xcf<\xdc<\xf6<\x13=#=[=u=\xc7=\x0e>\x97=\x13>V>[>x>}>\x82>\xa4>\xb1>\xc5>\xd9>\xe7>\xc8?I@r\xffs\xff\xd4?\x96\x02\x04@\xca@\x82\x19\xe3>\nAJA\x8aA\xcaA\nBJB\x8aB\xcaB\nCJC#?E?\x01D\x06D\x0bD\xbdD\x10DtE\x15D*F\xfa\xff\xabF\xc1\x04\xc1C\xebF\x96D\x1eE+G\xfb\xff\xfc\xff\xfd\xff\x05\0\x03\0\xff\xff\xfe\xffkG\xabG\xebG+HkH\xabH\xebH+IkI",

+  /* lex_backtrk */"\xff\xff\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\xff\xff\xff\xff\xff\xff\x94\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x94\0\x93\0\x93\0\x93\0\x02\0\x02\0\xff\xff\0\0\xff\xff\x93\0\x04\0\x93\0\x02\0\x93\0\x04\0\x04\0\x93\0\x04\0\x93\0\x93\0\x93\0\x03\0\x03\0\x93\0\x03\0\x93\0\x04\0\x93\0\x04\0\x93\0\x93\0\x93\0\x04\0\x93\0\x17\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x7f\0\x93\0\x89\0\t\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\n\0(\0)\0\x93\0\x93\0\x93\0\x93\0\"\0\x93\0\x93\0\x93\0\x93\0$\0\x93\0L\0K\0\x93\0N\0M\0\x93\0\x93\0\x93\0\x93\0\x93\0#\0\x93\0\x93\0%\x003\0\x93\0<\0\x93\0>\0=\0\x93\0\x93\0\x93\0\x93\0*\0\x93\0\x93\x002\x009\0\x93\x004\0\x93\0\x93\0\x93\x006\x005\0\x93\0\x93\0\x93\0\x93\0\x93\x008\x007\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0h\0\x93\0@\0?\0:\0\x93\0;\0I\0H\0J\0\x93\0\x93\0\x93\0P\0O\0\x93\0R\0Q\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0Y\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0^\0`\0\x93\0\x93\0\x93\0\x93\0_\0a\0\t\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0i\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0Z\0\x93\0\x93\0\x93\0[\0\x93\0\x93\0\x93\0x\0\x93\0\r\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\b\0\b\0\b\0\xff\xff\xff\xff\x93\0\x93\0\x93\0\t\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0b\0d\0\x93\0\x93\0\x93\0\x93\0c\0e\0\x93\0\x93\0\x93\0\x93\0G\0\x93\0.\0V\0U\0\x93\0\x93\0\"\0\x93\0\x93\0\x93\0\x93\0\x93\0#\0\x93\0-\0B\0T\0\x93\0+\0\x93\0\x93\0\x93\x001\0\x93\0\x93\0,\0A\0\x93\0\x93\0\x93\0/\0\x93\0\x93\0\x93\x000\0\x93\0\x93\0\x93\0C\0E\0F\0\x93\0\x93\0D\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\\\0S\0X\0W\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0f\0\t\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0]\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0g\0\x93\0m\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x0b\0\x93\0\x93\0\x93\0\x93\0'\0'\0\x93\0'\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x81\0\x93\0\x93\0\x93\0\x93\0\x93\0\x82\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x83\0\x93\0\x93\0\x93\0\x93\0\x84\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x85\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x86\0\x93\0\x93\0\x87\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x88\0\x93\0\x93\0\x93\0\f\0\x93\0\x93\0\x93\0t\0\x93\0\x93\0\x93\0z\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x0e\0\x93\0\x93\0\x93\0\x0f\0\x93\0v\0\x93\0\x13\0\x93\0\x93\0\x93\0\x10\0\x93\0\x93\0\x93\0\x14\0\x93\0\x93\0\x93\0\x15\0\x93\0\x93\0\x93\0{\0\x93\0\x93\0\x93\0\x11\0\x93\0q\0\x93\0\x93\0\x93\0\x12\0\x93\0\x93\0\x19\0u\0\x93\0\x93\0\x93\0y\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x16\0\x93\0\x93\0p\0\x93\0\x93\0\x93\0\x93\0~\0\x93\0\x93\0\x93\0\x93\0\x93\0\x18\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x1f\0\x93\0l\0\x93\0\x93\0s\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x1a\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x1e\0\x93\0\x93\0\x93\0\x93\0!\0\x93\0\x93\0n\0\x93\0\x93\0\x93\0}\0\x93\0\x93\0\x93\0\x1b\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x1c\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0j\0\x93\0\x93\0\x93\0\x80\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x1d\0\x93\0\x93\0\x93\0\x93\0 \0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0k\0\x93\0\x93\0\x93\0r\0\x93\0\x93\0\x93\0\x93\0\x93\0w\0\x93\0&\0&\0\x93\0&\0\x93\0\x93\0\x93\0\x8a\0\x93\0\x93\0\x93\0o\0\x93\0\x93\0\x93\0|\0\x8b\0\x8e\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\x93\0\xff\xff\xff\xff\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\xff\xff\xff\xff\xff\xff\x04\0\x04\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff",

+  /* lex_default */"\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\0\0\0\0\0\0\xff\xff\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x04\x01\x01\0\x01\0\x01\0\x01\0\x01\0\0\0\xff\xff\0\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\0\0\0\0\0\0\x0e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x04\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\x04\x01\xff\xff\xff\xff\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\xce\x02\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\xf3\x02\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff",

+  /* lex_trans */"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x0b\0\n\0\0\0\0\0\x0b\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\0\x0b\0\0\0\x1e\0\0\0\r\0\0\0\xff\xff\xff\xff%\0$\0\xff\xff!\0\xf8\x02!\0\0\0\0\0#\0\"\0\"\0\"\0\"\0\"\0\"\0\"\0\"\0\"\0\0\0\f\0\xce\x02\xff\xff&\0\xff\xff\xf9\x02\0\0\0\0\0\0\0\0\xff\xff\xff\xff\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\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x1c\0\x18\0\x12\0\x19\0\x16\0\x1d\0\x11\0\0\0 \0\0\0\0\0\x17\0\x1b\0\x1f\0\x10\0\x0f\0\x0e\0\x15\0\x13\0\x14\0\x1a\0\0\0\0\0\0\0\0\0\0\0\x12\x01\0\0\0\0\0\0\0\0\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\0\0\0\0\b\0\b\0\b\0\b\0\b\0\b\0\b\0\b\0\b\0\b\0\b\0\b\0\b\0\b\0\b\0\b\0\b\0\b\0\b\0\b\0\b\0\b\0\b\0\b\0\b\0\b\0\b\0\b\0\b\0\b\0\x07\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x06\0\x05\0\x05\0\x04\0\x02\0\x02\0\x02\0\x03\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\t\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\x000\0\0\x000\0\0\0\0\0/\0/\0/\0/\0/\0/\0/\0/\0/\0/\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\0\0\xff\xff\0\0\0\0\0\0\0\0\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0.\0\xc9\x02.\0\0\0\0\0-\0-\0-\0-\0-\0-\0-\0-\0-\0-\0\0\0\xff\xff\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xe3\x02\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\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\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\0\0\xff\xff\0\0\0\0\0\0\xe2\x02\xe2\x02\xe2\x02\xe2\x02\xe2\x02\xe2\x02\xe2\x02\xe2\x02\xe2\x02\xe2\x02\xe2\x02\xe2\x02\xe2\x02\xe2\x02\xe2\x02\xe2\x02\xe2\x02\xe2\x02\xe2\x02\xe2\x02\xe2\x02\xe2\x02\xe2\x02\xe2\x02\xe2\x02\xe2\x02\xe2\x02\xe2\x02\xe2\x02\xe2\x02\xe2\x02\xe2\x02\0\0\0\0\xc5\x02\0\0\0\0\xe1\x02\xe1\x02\xe1\x02\xe1\x02\xe1\x02\xe1\x02\xe1\x02\xe1\x02\xe1\x02\xe1\x02\xe1\x02\xe1\x02\xe1\x02\xe1\x02\xe1\x02\xe1\x02\xe1\x02\xe1\x02\xe1\x02\xe1\x02\xe1\x02\xe1\x02\xe1\x02\xe1\x02\xe1\x02\xe1\x02\xe1\x02\xe1\x02\xe1\x02\xe1\x02\xe1\x02\xe1\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\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\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff-\0-\0-\0-\0-\0-\0-\0-\0-\0-\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xcd\x02\xff\xff\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xff\xff\xff\xff\xcd\x02\xcd\x02\0\0\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xff\xff\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xff\xff\xcd\x02\0\0\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\0\0\xcd\x02\0\0\xcd\x02\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xb7\x02\xff\xff\xff\xff\0\0\x9b\x02\x81\x02\0\0\xff\xff\0\0\xff\xff\xff\xff\x99\x02e\x02\xff\xffg\x02\xb6\x02\0\0\x9a\x02\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\x80\x02\xff\xff\xff\xff\0\0f\x02\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0S\x02\xff\xff\xff\xff\0\0U\x02\0\0\xff\xffV\x02\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0T\x02\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0D\x02\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff9\x02\xff\xff:\x02\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\0\x008\x02\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\x1a\x02\0\0\0\0 \x022\x02\xff\xff\"\x02\0\0\0\0\xff\xff\xff\xff\0\0!\x02\0\0\xff\xff\0\0\0\0\x1b\x02\xff\xff\xff\xff\xff\xff\0\0\0\0\x10\x02\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x16\x01\0\0\0\0\x15\x01\0\0\0\0\0\0\0\0\xff\xff\0\0\x05\x02\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\x04\x02\0\0\xa6\x01\0\0\xa7\x01\0\0\x06\x02\0\0\0\0\xa5\x01\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\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\xff\xff\0\0\0\0\0\0\0\0\0\0\x14\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xfa\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\0\0\xff\xff\xfb\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xfc\0;\0\xff\xff-\0-\0-\0-\0-\0-\0-\0-\0-\0-\0\0\0\xff\xff\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\0\0\xff\xff\xf9\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x02\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\x01\x01\0\x01\0\x01\xff\0\xfd\0\xfd\0\xfd\0\xfe\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfa\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xffB\0\0\0\0\0A\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\x004\x003\x003\x003\x003\x003\x003\x003\x003\x003\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x009\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xf7\0@\0\0\0\0\0\0\0\0\0\0\0\0\0?\0C\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff2\0\0\0\0\0\0\0(\x001\0\"\0\"\0\"\0\"\0\"\0\"\0\"\0\"\0\"\0\"\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0'\0\0\0\0\0(\0\0\0\"\0\"\0\"\0\"\0\"\0\"\0\"\0\"\0\"\0\"\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\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\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff'\0(\0(\0(\0(\0(\0(\0(\0(\0(\0(\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff)\0\xff\xff\0\0'\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff'\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff*\0*\0*\0*\0*\0*\0*\0*\0*\0*\0\0\0\xff\xff\0\0\0\0\0\0\0\x009\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\xff\xff\xff\xff\0\0\0\0\xff\xff\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\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0,\0\0\0*\0*\0*\0*\0*\0*\0*\0*\0*\0*\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff*\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\xff\xff\xff\xff\0\0\0\0\xff\xff\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\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0+\0\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\0\0,\0,\0,\0,\0,\0,\0,\0,\0,\0,\0\0\0\xff\xff\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\xff\xff\0\0+\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\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\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff+\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0/\0/\0/\0/\0/\0/\0/\0/\0/\0/\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0/\0/\0/\0/\0/\0/\0/\0/\0/\0/\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0(\0\0\x003\x003\x003\x003\x003\x003\x003\x003\x003\x003\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0'\0\0\0\0\0(\0\0\x003\x003\x003\x003\x003\x003\x003\x003\x003\x003\x007\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0'\0\xff\xff\0\0\xff\xff\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\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0'\0\0\0\0\0\0\x006\x006\x006\x006\x006\x006\x006\x006\x006\x006\0\0\0\xff\xff\0\0\0\0\0\x005\0\0\x006\x006\x006\x006\x006\x006\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff6\x006\x006\x006\x006\x006\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0<\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0,\0\xff\xff6\x006\x006\x006\x006\x006\x006\x006\x006\x006\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff6\x006\x006\x006\x006\x006\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0+\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff6\x006\x006\x006\x006\x006\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0+\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\x008\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0:\0\0\0\0\0>\0>\0>\0>\0>\0>\0>\0>\0>\0>\0\0\0\xff\xff\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=\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff>\0>\0>\0>\0>\0>\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0>\0>\0>\0>\0>\0>\0>\0>\0>\0>\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff>\0>\0>\0>\0>\0>\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0>\0>\0>\0>\0>\0>\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xf3\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xd1\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xffK\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\x008\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xffD\0\xff\xff\0\0\xff\xff\0\0\0\0E\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0I\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0F\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0G\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0H\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0L\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0J\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0W\0\0\0[\0U\0Q\0\xff\xffO\0\0\0\xff\xff\0\0\0\0Z\0V\0P\0S\0X\0\0\0T\0Y\0M\0\xff\xff\0\0N\0R\0\0\0\xff\xff\xff\xff\xbe\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xb7\0\0\0\0\0\xff\xff\xaf\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xb0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xae\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xac\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xaa\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xa9\0\xff\xff\0\0\x8e\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\x94\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\x93\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x8c\0\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\x89\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\x88\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\x83\0\xff\xff\0\0\xff\xff\0\0\0\0t\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0v\0u\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0d\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0f\0\xff\xff\0\0\0\0\0\0e\0\0\0\0\0]\0\0\0\0\0^\0\0\0\xff\xff\0\0\0\0\\\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xffc\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xffb\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff_\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0`\0\0\0\xff\xff\0\0\0\0\0\0a\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0q\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xffn\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0j\0\0\0i\0\0\0\0\0\xff\xff\xff\xffk\0\0\0\xff\xff\xff\xff\0\0g\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xffh\0\0\0\0\0\0\0k\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0k\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0l\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xffm\0\0\0m\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0p\0\xff\xffo\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0s\0\0\0r\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0}\0\0\0\0\0\0\0\0\0\x7f\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff~\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0w\0\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0{\0\0\0z\0\0\0x\0\0\0\xff\xff|\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0y\0|\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0|\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\x80\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\x82\0\0\0\x81\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\x85\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\x84\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\x86\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\x87\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\x8b\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\x8a\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\x8d\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\x90\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\x8f\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\x92\0\0\0\x91\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xa6\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\x95\0\xff\xff\0\0\xff\xff\x96\0\0\0\x97\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\x9a\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\x99\0\xff\xff\x98\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\x9b\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\x9c\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\x9d\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\x9e\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\x9f\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xa2\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xa0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xa4\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xa1\0\xff\xff\0\0\xff\xff\0\0\xff\xff\xa5\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xa3\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xa8\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xa7\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xab\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xad\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xb4\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xb1\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xb3\0\xff\xff\xb2\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xba\0\xb6\0\xff\xff\xb5\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xb8\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xb9\0\xbc\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbd\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xbb\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xbf\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\xc0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xcb\0\xff\xff\xff\xff\xff\xff\xc1\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xc2\0\0\0\xff\xff\xff\xff\xc5\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xc4\0\0\0\xc3\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xc8\0\0\0\xff\xff\xc7\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xca\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xc6\0\xc9\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xce\0\xff\xff\0\0\xcd\0\xff\xff\xff\xff\xd0\0\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xcf\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xcc\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xd2\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0W\0\0\0[\0U\0\xd3\0\xff\xffO\0\0\0\xff\xff\0\0\0\0Z\0V\0P\0S\0X\0\xff\xff\xd4\0Y\0M\0\0\0\xff\xff\xff\xffR\0\0\0\xff\xff\xac\0\0\0\0\0\0\0\0\0\0\0\0\0\xe3\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xd5\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\x93\0\0\0\xff\xff\xff\xff\xff\xff\xd6\0\0\0\0\0\0\0\x96\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xd7\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xd8\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xd9\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\xda\0\0\0\xff\xff\xdb\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xdf\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xdd\0\xdc\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xde\0\0\0\0\0\xff\xff\xff\xff\0\0\xe1\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xe2\0\xff\xff\xff\xff\0\0\0\0\xe0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xe4\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xe5\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xe7\0\xff\xff\0\0\0\0\0\0\xe6\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\xe8\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xef\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xeb\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\xea\0\xff\xff\xe9\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\xed\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xee\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xec\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xf1\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xf2\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xf0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xf4\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xf5\0\0\0\x11\x01\0\0\0\0\0\0\0\0\x11\x01\0\0\0\0\0\0\0\0\0\0\0\0\xf6\0\xff\xff\x10\x01\x10\x01\x10\x01\x10\x01\x10\x01\x10\x01\x10\x01\x10\x01\x10\x01\x10\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x10\x01\x10\x01\x10\x01\x10\x01\x10\x01\x10\x01\xf8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\x11\x01\0\0\0\0\0\0\0\0\x10\x01\x10\x01\x10\x01\x10\x01\x10\x01\x10\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x11\x01\0\0\0\0\0\0\x11\x01\xff\xff\x11\x01\x0f\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\0\0\xff\xff\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\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\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\xff\xff\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xfa\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\0\0\0\0\xfb\0\x13\x01\x13\x01\x13\x01\x13\x01\x13\x01\x13\x01\x13\x01\x13\x01\x13\x01\x13\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x13\x01\x13\x01\x13\x01\x13\x01\x13\x01\x13\x01\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\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x13\x01\x13\x01\x13\x01\x13\x01\x13\x01\x13\x01\0\0\0\0\xfc\0\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\0\0\0\0\xf9\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x02\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\x01\x01\0\x01\0\x01\xff\0\xfd\0\xfd\0\xfd\0\xfe\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfa\0\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xfa\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\xf9\0\0\0\0\0\xfb\0\x13\x01\x13\x01\x13\x01\x13\x01\x13\x01\x13\x01\x13\x01\x13\x01\x13\x01\x13\x01\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\x13\x01\x13\x01\x13\x01\x13\x01\x13\x01\x13\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\x13\x01\x13\x01\x13\x01\x13\x01\x13\x01\x13\x01\x86\x01\0\0\xfc\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\x04\x01\0\0\x17\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\xf9\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x02\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\x01\x01\0\x01\0\x01\xff\0\xfd\0\xfd\0\xfd\0\xfe\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfa\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\x18\x01\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\xa3\x01\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0 \x01\xff\xff$\x01\x1c\x01\x1b\x01\x1f\x01\x1a\x01\xff\xff\0\0\0\0\0\0#\x01\x1d\x01!\x01\0\0\0\0\0\0\x19\x01\"\x01\x1e\x01\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0x\x01\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xffv\x01\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0w\x01\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xffu\x01\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xffj\x01\xff\xff\xff\xff\xff\xffk\x01\0\0\0\0d\x01\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0e\x01\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0f\x01\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xffY\x01`\x01X\x01\0\0\0\0\\\x01\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0Q\x01\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xffI\x01\0\0\0\0J\x01H\x01\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0C\x01\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0E\x01%\x01\xff\xff\0\0\xff\xffD\x01\xff\xff\0\0\xff\xff\0\0\0\0&\x01\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xffA\x01\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0(\x01\xff\xff'\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0<\x01\0\0\xff\xff\xff\xff\0\0`\0\0\0\xff\xff)\x01\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\0\0*\x01\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0+\x01\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff6\x01\0\0\xff\xff\0\0\0\0\0\0-\x01\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff,\x01\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff0\x01\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0/\x01\0\0.\x01\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\x003\x01\xff\xff\xff\xff2\x01\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff5\x01\0\0\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\x001\x01\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff4\x01\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\x009\x01\xff\xff\xff\xff8\x01\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0;\x01\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\x007\x01\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0:\x01\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff=\x01>\x01\xff\xff\0\0?\x01\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0@\x01\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xffB\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0F\x01\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0G\x01\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0P\x01\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0N\x01\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xffK\x01\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0L\x01\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xffM\x01\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xffO\x01\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0R\x01\xff\xff\xff\xff\xff\xff\0\0\xff\xffS\x01\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0T\x01\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffU\x01\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xffV\x01\xff\xff\xff\xff\xff\xff\xff\xff\0\0W\x01\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff[\x01\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xffZ\x01\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff]\x01\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff^\x01\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0_\x01\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xffa\x01\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0c\x01b\x01\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0i\x01\xff\xff\xff\xff\0\0\xff\xff\0\0h\x01\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xffg\x01\0\0\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0m\x01\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xffl\x01\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0q\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xffn\x01\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xffp\x01\0\0\0\0\0\0\0\0o\x01\0\0\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0s\x01\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xffr\x01\0\0\xff\xff\xff\xff\0\0t\x01\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0y\x01\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xffz\x01\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff|\x01\0\0\xff\xff\0\0{\x01\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\0\0}\x01\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0~\x01\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\x7f\x01\x82\x01\xff\xff\xff\xff\xff\xff\0\0\xff\xff\x80\x01\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\x81\x01\0\0\x84\x01\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\x85\x01\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\x83\x01\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\x87\x01\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff \x01\xff\xff$\x01\x8a\x01\x1b\x01\x1f\x01\x1a\x01\xff\xff\xff\xff\x95\x01\0\0#\x01\x1d\x01!\x01\xff\xff\x89\x01\xff\xff\x88\x01\"\x01\x1e\x01\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\x8b\x01\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xffk\x01\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\x8c\x01\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\x8d\x01\0\0\0\0\xff\xff\0\0\x91\x01\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\x8e\x01\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\x8f\x01\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\x90\x01\xff\xff\0\0\0\0\x93\x01\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\x94\x01\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\x92\x01\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\x96\x01\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\0\0\x97\x01\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\x98\x01\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\x99\x01\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\x9a\x01\xff\xff\xff\xff\x9b\x01\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\x9c\x01\xff\xff\0\0\xff\xff\0\0\x9f\x01\0\0\x9d\x01\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\x9e\x01\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xa1\x01\xff\xff\xff\xff\xa2\x01\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xa0\x01\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xa4\x01\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xad\x01\0\0\0\0\0\0\0\0\xb5\x01\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xa9\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xa8\x01\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xaa\x01\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\xab\x01\xff\xff\0\0\xff\xff\xff\xff\xac\x01\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xae\x01\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xb0\x01\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xb2\x01\xb1\x01\xb1\x01\xb1\x01\xb1\x01\xb1\x01\xb1\x01\xb1\x01\xb1\x01\xb1\x01\xaf\x01\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xb1\x01\xb1\x01\xb1\x01\xb1\x01\xb1\x01\xb1\x01\xb1\x01\xb1\x01\xb1\x01\xb1\x01\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\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\xff\xff\0\0\xb6\x01\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xb1\x01\xb1\x01\xb1\x01\xb1\x01\xb1\x01\xb1\x01\xb1\x01\xb1\x01\xb1\x01\xb1\x01\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xb4\x01\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xb4\x01\0\0\xff\xff\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\xff\xff\0\0\xff\xff\xff\xff\0\0\xb3\x01\xff\xff\0\0\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xb4\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xb4\x01\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xb4\x01\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xb7\x01\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xb8\x01\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xb9\x01\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xba\x01\0\0\0\0\0\0\xbe\x01\0\0\xff\xff\0\0\xbf\x01\0\0\0\0\xff\xff\0\0\xbc\x01\0\0\xbb\x01\xbd\x01\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xfb\x01\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xd7\x01\xf8\x01\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xce\x01\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xc8\x01\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xc0\x01\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xc1\x01\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xc2\x01\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xc3\x01\0\0\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xc4\x01\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xc6\x01\xff\xff\0\0\xc5\x01\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xc7\x01\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xca\x01\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xc9\x01\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xcb\x01\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xcc\x01\xff\xff\0\0\0\0\0\0\xcd\x01\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xcf\x01\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xd0\x01\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xd1\x01\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xd2\x01\xff\xff\xff\xff\xff\xff\0\0\xd3\x01\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xd4\x01\xff\xff\0\0\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xd5\x01\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xd6\x01\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\xd8\x01\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xd9\x01\xff\xff\0\0\0\0\xdc\x01\0\0\0\0\xda\x01\xdb\x01\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xdd\x01\0\0\xde\x01\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xeb\x01\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xdf\x01\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xe0\x01\0\0\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\xe1\x01\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xe2\x01\xff\xff\xff\xff\0\0\0\0\xe3\x01\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xe4\x01\xff\xff\0\0\xe5\x01\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xe6\x01\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xe7\x01\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xe8\x01\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xe9\x01\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xea\x01\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xec\x01\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xed\x01\xff\xff\0\0\xee\x01\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xef\x01\0\0\xf0\x01\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xf1\x01\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xf3\x01\xf2\x01\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\xf4\x01\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xf6\x01\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xf5\x01\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xf7\x01\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\xf9\x01\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xfa\x01\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xfd\x01\0\0\xfc\x01\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xfe\x01\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\x02\xff\xff\0\0\0\0\x01\x02\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\x02\x02\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\x03\x02\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\f\x02\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\b\x02\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\x07\x02\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\t\x02\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\n\x02\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\x0b\x02\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\x0f\x02\r\x02\x0e\x02\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\x12\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\x11\x02\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\x13\x02\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\x14\x02\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x02\xff\xff\0\0\x16\x02\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\x17\x02\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\x18\x02\0\0\xff\xff\x19\x02\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\x1e\x02\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\x1c\x02\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\x1d\x02\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\x1f\x02\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff.\x02&\x02\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff$\x02\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0#\x02\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0%\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0(\x02\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff*\x02\0\0\0\0'\x02\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0)\x02\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0+\x02\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff,\x02\xff\xff\xff\xff-\x02\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff/\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\x000\x02\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\x001\x02\0\0\xff\xff\0\x003\x02\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\x004\x02\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\x006\x02\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff5\x02\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\x007\x02\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff<\x02@\x02\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff=\x02\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0;\x02\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff?\x02\xff\xff\xff\xff\xff\xff>\x02\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xffA\x02\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0B\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0C\x02\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xffE\x02\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0F\x02G\x02\xff\xff\xff\xffN\x02\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0K\x02\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0H\x02\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xffI\x02\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0J\x02\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0L\x02\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0M\x02\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0O\x02\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xffQ\x02\0\0\xff\xffP\x02\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xffR\x02\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xffb\x02\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff`\x02Y\x02\xff\xff\xff\xff\xff\xff\0\0W\x02\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xffX\x02\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xffZ\x02\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0[\x02\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff]\x02\\\x02\xff\xff^\x02\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0_\x02\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\0\0\xff\xffa\x02\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xffc\x02\0\0\0\0\0\0d\x02\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0y\x02\xff\xff\0\0\0\0\0\0|\x02\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0i\x02m\x02\xff\xff\0\0\0\0\0\0\0\0\xff\xffh\x02\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0j\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xffk\x02\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0l\x02\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0n\x02\0\0\0\0\0\0\0\0o\x02\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0t\x02\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xffp\x02\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xffq\x02\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0r\x02\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0s\x02\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0u\x02v\x02\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0w\x02\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0x\x02\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xffz\x02\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0{\x02\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0}\x02\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff~\x02\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\x7f\x02\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\x8d\x02\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\x82\x02\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\x83\x02\0\0\x84\x02\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\x85\x02\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\x87\x02\0\0\0\0\0\0\0\0\x86\x02\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\x88\x02\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\x89\x02\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\x8a\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\x8b\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\x8c\x02\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\x8e\x02\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\x8f\x02\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\x90\x02\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\x92\x02\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\x91\x02\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\x93\x02\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\x94\x02\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\x95\x02\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\x96\x02\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\x97\x02\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\x98\x02\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xb2\x02\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xa9\x02\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\x9d\x02\xff\xff\xff\xff\xff\xff\0\0\x9c\x02\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\x9e\x02\0\0\xff\xff\0\0\0\0\x9f\x02\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xa0\x02\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xa1\x02\xff\xff\0\0\xff\xff\xa4\x02\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xa2\x02\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\xa3\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xa6\x02\xa5\x02\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xa7\x02\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xa8\x02\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xaa\x02\0\0\xab\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xac\x02\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xad\x02\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xae\x02\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xaf\x02\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xb0\x02\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xb1\x02\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xb3\x02\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xb4\x02\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xb5\x02\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xc1\x02\0\0\xb8\x02\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xba\x02\xb9\x02\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\xbc\x02\0\0\0\0\xbe\x02\xbd\x02\xbd\x02\xbd\x02\xbd\x02\xbd\x02\xbd\x02\xbd\x02\xbd\x02\xbd\x02\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xbb\x02\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xbd\x02\xbd\x02\xbd\x02\xbd\x02\xbd\x02\xbd\x02\xbd\x02\xbd\x02\xbd\x02\xbd\x02\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xbd\x02\xbd\x02\xbd\x02\xbd\x02\xbd\x02\xbd\x02\xbd\x02\xbd\x02\xbd\x02\xbd\x02\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\xbf\x02\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xc0\x02\0\0\xff\xff\0\0\0\0\0\0\0\0\xc2\x02\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xc0\x02\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xc0\x02\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xc0\x02\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc3\x02\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xc4\x02\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\xc7\x02\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xc6\x02\0\0\xff\xff\xff\xff\xff\xff\xc8\x02\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xca\x02\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xcb\x02\0\0\0\0\0\0\0\0\xcc\x02\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\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\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\xff\xff\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\xff\xff\xff\xff\xcd\x02\xff\xff\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xff\xff\xff\xff\xcd\x02\xcd\x02\0\0\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xff\xff\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xff\xff\xcd\x02\0\0\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\0\0\xcd\x02\xff\xff\xcd\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xcf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd6\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd5\x02\xd4\x02\xd4\x02\xd3\x02\xd1\x02\xd1\x02\xd1\x02\xd2\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xd0\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\0\0\0\0\0\0\0\0\0\0\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xe5\x02\xff\xff\xff\xff\0\0\0\0\xff\xff\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\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\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\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\0\0\0\0\0\0\0\0\xff\xff\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xe7\x02\xff\xff\xff\xff\0\0\0\0\xff\xff\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\xff\xff\0\0\xff\xff\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\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\xff\xff\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\xff\xff\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\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\0\0\0\0\0\0\0\0\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xe9\x02\xf5\x02\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\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xf6\x02\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\xf7\x02\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\xff\xff\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\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\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\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf1\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xf0\x02\xef\x02\xef\x02\xee\x02\xec\x02\xec\x02\xec\x02\xed\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xeb\x02\xf4\x02\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\xf3\x02\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\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\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\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",

+  /* lex_check */"\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\xff\xff\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\xff\xff\0\0\xff\xff\0\0\xff\xff\x01\0\x01\0\0\0\0\0\x01\0\0\0\xf7\x02\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\f\0\x01\0%\0\x01\0\xf6\x02\xff\xff\xff\xff\xff\xff\xff\xff\x01\0\x01\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xfd\0\xff\xff\xff\xff\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\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\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\x02\0\x02\0\xff\xff\xff\xff\x02\0\b\0\b\0\xff\xff\xff\xff\b\0\xff\xff\0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\0\xff\xff\x02\0\xff\xff\xff\xff\b\0\xff\xff\b\0\x02\0\x02\0\xff\xff\xff\xff\xff\xff\b\0\b\0'\0'\0\x01\0\xff\xff'\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\0\xff\xff\xff\xff\xff\xff\xff\xff\b\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff'\0\xff\xff'\0\x03\0\x03\0\xff\xff\xff\xff\x03\0'\0'\0\xff\xff'\0\xff\xff'\0\xff\xff\xff\xff'\0'\0'\0'\0'\0'\0'\0'\0'\0'\0\x03\0'\0\x03\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x03\0\x03\0\xfe\0\xfe\0\xfe\0\xfe\0\xfe\0\xfe\0\xfe\0\xfe\0\xfe\0\xfe\0\xfe\0\xfe\0\xfe\0\xfe\0\xfe\0\xfe\0\xff\xff\x03\0\xff\xff\xff\xff\xff\xff\xff\xff\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x04\0\x04\0\xff\xff\xff\xff\x04\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0e\0\x0e\0\xff\xff\xff\xff\x0e\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x04\0\xff\xff\x04\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x04\0\x04\0\xff\xff\x0e\0\xff\xff\x0e\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0e\0\x0e\0\xff\xff\xff\xff\xff\xff\xff\xff\x02\0\xff\xff\x04\0\xff\xff\xff\xff\b\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0e\0\xff\xff\xff\xff\x05\0\x05\0\xff\xff\xff\xff\x05\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff+\0+\0'\0\x05\0+\0\x05\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x05\0\x05\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff+\0\xff\xff+\0\xff\xff\xff\xff\x03\0\xff\xff\x05\0+\0+\0\xff\xff+\0\x0e\0+\0\xff\xff\xff\xff+\0+\0+\0+\0+\0+\0+\0+\0+\0+\0\xff\xff+\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x04\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x04\0\x06\0\x06\0\xff\xff\xff\xff\x06\0\x07\0\x07\0\xff\xff\xff\xff\x07\0\x0e\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x06\0\xff\xff\x06\0\xff\xff\xff\xff\x07\0\xff\xff\x07\0\x06\0\x06\0\xff\xff\xff\xff\xff\xff\x07\0\x07\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x06\0\xff\xff\xff\xff\xff\xff\xff\xff\x07\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x05\0\xff\xff\x0f\0\x0f\0\xff\xff\xff\xff\x0f\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff+\0\xff\xff\xff\xff\xff\xff\xff\xff\x0f\0\xff\xff\x0f\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0f\0\x0f\0\xd2\x02\xd2\x02\xd2\x02\xd2\x02\xd2\x02\xd2\x02\xd2\x02\xd2\x02\xd2\x02\xd2\x02\xd2\x02\xd2\x02\xd2\x02\xd2\x02\xd2\x02\xd2\x02\xff\xff\x0f\0\xff\xff\xff\xff\xff\xff\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\xff\xff\xff\xff\x0f\0\xff\xff\xff\xff\x07\0\x07\0\x07\0\x07\0\x07\0\x07\0\x07\0\x07\0\x07\0\x07\0\x07\0\x07\0\x07\0\x07\0\x07\0\x07\0\x07\0\x07\0\x07\0\x07\0\x07\0\x07\0\x07\0\x07\0\x07\0\x07\0\x07\0\x07\0\x07\0\x07\0\x07\0\x07\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff-\0-\0\xff\xff\xff\xff-\x008\x008\0\xff\xff\xff\xff8\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff-\0\xff\xff-\0\xff\xff\xff\xff8\0\xff\xff8\0-\0-\0\xff\xff\r\0\r\x008\x008\0\r\0-\0-\0-\0-\0-\0-\0-\0-\0-\0-\0\xff\xff-\0\x06\0\xff\xff\xff\xff\xff\xff8\0\x07\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\xff\xff\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\x0f\0\r\0\xff\xff\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\r\0\xff\xff\r\0\xff\xff\r\0\x10\0\x10\0\xff\xff\xff\xff\x10\0\x11\0\x11\0\xff\xff\xff\xff\x11\0\x12\0\x12\0\xff\xff\xff\xff\x12\0\x13\0\x13\0\xff\xff\xff\xff\x13\0\xff\xff\xff\xff\xff\xff\x10\0\xff\xff\x10\0\xff\xff\xff\xff\x11\0\xff\xff\x11\0\x10\0\x10\0\x12\0\xff\xff\x12\0\x11\0\x11\0\x13\0\xff\xff\x13\0\x12\0\x12\0\xff\xff\x14\0\x14\0\x13\0\x13\0\x14\0\xff\xff\x10\0\xff\xff\xff\xff\xff\xff\xff\xff\x11\0\xff\xff\xff\xff\xff\xff\xff\xff\x12\0\xff\xff\xff\xff\xff\xff\xff\xff\x13\0\xff\xff\x14\0\xff\xff\x14\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\0\x14\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\0\x15\0\xff\xff\xff\xff\x15\0\x10\0\x14\0-\0\xff\xff\x11\0\x12\0\xff\xff8\0\xff\xff\x16\0\x16\0\x11\0\x13\0\x16\0\x13\0\x10\0\xff\xff\x11\0\x15\0\xff\xff\x15\0\xff\xff\xff\xff\xff\xff\xff\xff\x12\0\x15\0\x15\0\xff\xff\x13\0\xff\xff\xff\xff\x16\0\xff\xff\x16\0\xff\xff\r\0\xff\xff\xff\xff\x14\0\x16\0\x16\0\xff\xff\x14\0\xff\xff\x15\0\x14\0\x17\0\x17\0\xff\xff\xff\xff\x17\0\x18\0\x18\0\xff\xff\xff\xff\x18\0\x19\0\x19\0\x16\0\xff\xff\x19\0\xff\xff\x14\0\xff\xff\xff\xff\xff\xff\x1a\0\x1a\0\xff\xff\x17\0\x1a\0\x17\0\xff\xff\xff\xff\x18\0\xff\xff\x18\0\x17\0\x17\0\x19\0\xff\xff\x19\0\x18\0\x18\0\xff\xff\xff\xff\x15\0\x19\0\x19\0\x1a\0\xff\xff\x1a\0\xff\xff\xff\xff\xff\xff\xff\xff\x17\0\x1a\0\x1a\0\x1b\0\x1b\0\x18\0\xff\xff\x1b\0\x1c\0\x1c\0\x19\0\x16\0\x1c\0\x16\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\0\xff\xff\xff\xff\x16\0\xff\xff\xff\xff\x1b\0\xff\xff\x1b\0\xff\xff\xff\xff\x1c\0\xff\xff\x1c\0\x1b\0\x1b\0\xff\xff\xff\xff\xff\xff\x1c\0\x1c\0\xff\xff\xff\xff\x1d\0\x1d\0\xff\xff\xff\xff\x1d\0\x19\0\xff\xff\xff\xff\x18\0\x17\0\x1b\0\x18\0\xff\xff\xff\xff\x10\0\x1c\0\xff\xff\x18\0\xff\xff\x11\0\xff\xff\xff\xff\x19\0\x1d\0\x12\0\x1d\0\xff\xff\xff\xff\x1a\0\x13\0\xff\xff\x1d\0\x1d\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1d\0\xff\xff\xff\xff\x1d\0\xff\xff\xff\xff\xff\xff\xff\xff\x1d\0\xff\xff\x1b\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\0\xff\xff\xff\xff\xff\xff\x1b\0\xff\xff\x1c\0\xff\xff\x1c\0\xff\xff\x1b\0\xff\xff\xff\xff\x1c\0\xed\x02\xed\x02\xed\x02\xed\x02\xed\x02\xed\x02\xed\x02\xed\x02\xed\x02\xed\x02\xed\x02\xed\x02\xed\x02\xed\x02\xed\x02\xed\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1d\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\0\xff\xff\xff\xff\xff\xff\xff\xff\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\xff\xff\x17\0\x1e\0\xff\xff\xff\xff\xff\xff\x18\0\xff\xff\xff\xff\xff\xff\xff\xff\x19\0:\0:\0\xff\xff\xff\xff:\0\xff\xff\xff\xff\xff\xff\xff\xff\x1a\0\xff\xff\xff\xff.\0.\0\xff\xff\xff\xff.\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff:\0\xff\xff:\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff:\0:\0\xff\xff\xff\xff.\0\xff\xff.\0\xff\xff\xff\xff\xff\xff\xff\xff\x1b\0.\0.\0\xff\xff\xff\xff\x1c\0\x1e\0:\0:\0.\0.\0.\0.\0.\0.\0.\0.\0.\0.\0\xff\xff.\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1d\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1f\0\x1f\0\xff\xff\xff\xff\x1f\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff \0 \0\xff\xff\xff\xff \0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\0\xff\xff\x1f\0!\0!\0\xff\xff\xff\xff!\0\x1f\0\x1f\0 \0:\0 \0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff \0 \0\xff\xff\xff\xff\xff\xff.\0\xff\xff\xff\xff!\0\x1f\0!\0 \0\xff\xff\xff\xff \0\xff\xff!\0!\0\xff\xff \0\xff\xff\xff\xff\xff\xff\xff\xff!\0!\0!\0!\0!\0!\0!\0!\0!\0!\0\xff\xff!\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\0\"\0\"\0\xff\xff\xff\xff\"\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\0 \0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff \0 \0\"\0\xff\xff\"\0#\0#\0\xff\xff\xff\xff#\0\"\0\"\0!\0\xff\xff\xff\xff\xff\xff\"\0!\0\"\0\"\0\"\0\"\0\"\0\"\0\"\0\"\0\"\0\"\0#\0\"\0#\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff#\0#\0\xff\xff\"\0\xff\xff\xff\xff#\0\xff\xff#\0#\0#\0#\0#\0#\0#\0#\0#\0#\0\xff\xff#\0\xff\xff\xff\xff\xff\xff(\0(\0\xff\xff\xff\xff(\0\xff\xff#\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\"\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff(\0\xff\xff(\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff(\0(\x001\x001\0\xff\xff\xff\xff1\0#\0(\0(\0(\0(\0(\0(\0(\0(\0(\0(\0\xff\xff(\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff1\0#\x001\0\xff\xff(\0\xff\xff\xff\xff\xff\xff1\x001\0)\0)\0\xff\xff\xff\xff)\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1f\0\xff\xff\xff\xff\xff\xff\xff\xff1\0\xff\xff\xff\xff\xff\xff\xff\xff \0)\0\xff\xff)\0(\0\xff\xff\xff\xff\xff\xff\xff\xff)\0)\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff!\0)\0)\0)\0)\0)\0)\0)\0)\0)\0)\0\xff\xff)\0\xff\xff\xff\xff\xff\xff\xff\xff1\0)\0)\0)\0)\0)\0)\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff*\0*\0\xff\xff\xff\xff*\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff)\0)\0)\0)\0)\0)\0\xff\xff*\0\xff\xff*\0\xff\xff\xff\xff\xff\xff\"\0\xff\xff*\0*\0\xff\xff\xff\xff\xff\xff\xff\xff*\0\xff\xff*\0*\0*\0*\0*\0*\0*\0*\0*\0*\0\xff\xff*\0\xff\xff\xff\xff\xff\xff\xff\xff#\0*\0*\0*\0*\0*\0*\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff*\0\xff\xff,\0,\0\xff\xff\xff\xff,\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff*\0*\0*\0*\0*\0*\0\xff\xff\xff\xff,\0\xff\xff,\0\xff\xff\xff\xff\xff\xff\xff\xff*\0,\0,\0\xff\xff\xff\xff\xff\xff(\0\xff\xff\xff\xff,\0,\0,\0,\0,\0,\0,\0,\0,\0,\0\xff\xff,\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff,\0,\0,\0,\0,\0,\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff1\0\xff\xff,\0\xff\xff/\0/\0\xff\xff\xff\xff/\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff,\0,\0,\0,\0,\0,\0\xff\xff\xff\xff/\0\xff\xff/\0\xff\xff\xff\xff\xff\xff)\0,\0/\0/\x000\x000\0\xff\xff\xff\xff0\0\xff\xff/\0/\0/\0/\0/\0/\0/\0/\0/\0/\0\xff\xff/\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff0\0\xff\xff0\x002\x002\0\xff\xff\xff\xff2\x000\x000\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff0\x000\x000\x000\x000\x000\x000\x000\x000\x000\x002\x000\x002\x003\x003\0\xff\xff\xff\xff3\x002\x002\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff*\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff3\x002\x003\x004\x004\0\xff\xff\xff\xff4\x003\x003\0\xff\xff\xff\xff\xff\xff\xff\xff3\0\xff\xff3\x003\x003\x003\x003\x003\x003\x003\x003\x003\x004\x003\x004\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff4\x004\0\xff\xff3\0\xff\xff\xff\xff4\0\xff\xff4\x004\x004\x004\x004\x004\x004\x004\x004\x004\x002\x004\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff5\x005\0\xff\xff4\x005\0\xff\xff,\0\xff\xff\xff\xff3\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff5\0\xff\xff5\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff5\x005\0\xff\xff\xff\xff4\0\xff\xff\xff\xff\xff\xff5\x005\x005\x005\x005\x005\x005\x005\x005\x005\0\xff\xff5\0\xff\xff\xff\xff\xff\xff4\0\xff\xff5\x005\x005\x005\x005\x005\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff;\0;\0\xff\xff\xff\xff;\0\xff\xff\xff\xff\xff\xff/\0\xff\xff\xff\xff\xff\xff6\x006\0\xff\xff\xff\xff6\x005\x005\x005\x005\x005\x005\0;\0\xff\xff;\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff;\0;\0\xff\xff\xff\xff6\0\xff\xff6\0\xff\xff;\0\xff\xff0\0\xff\xff6\x006\0\xff\xff\xff\xff\xff\xff\xff\xff6\0;\x006\x006\x006\x006\x006\x006\x006\x006\x006\x006\0\xff\xff6\0\xff\xff\xff\xff\xff\xff\xff\xff2\x006\x006\x006\x006\x006\x006\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff6\0\xff\xff7\x007\0\xff\xff\xff\xff7\0\xff\xff\xff\xff\xff\xff3\0\xff\xff9\x009\0\xff\xff\xff\xff9\x006\x006\x006\x006\x006\x006\0\xff\xff\xff\xff7\0\xff\xff7\0\xff\xff\xff\xff\xff\xff\xff\xff6\x007\x007\x009\x004\x009\0<\0<\0\xff\xff\xff\xff<\x009\x009\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff7\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff<\x009\0<\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff<\0<\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff=\0=\0\xff\xff\xff\xff=\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff<\0\xff\xff\xff\xff\xff\xff\xff\xff5\0\xff\xff7\0\xff\xff\xff\xff\xff\xff\xff\xff=\0\xff\xff=\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff=\0=\0\xff\xff\xff\xff\xff\xff9\0\xff\xff\xff\xff=\0=\0=\0=\0=\0=\0=\0=\0=\0=\0\xff\xff=\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff=\0=\0=\0=\0=\0=\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff<\0>\0>\0\xff\xff\xff\xff>\0?\0?\0\xff\xff\xff\xff?\0\xff\xff\xff\xff\xff\xff\xff\xff;\0=\0=\0=\0=\0=\0=\0\xff\xff\xff\xff>\0\xff\xff>\x006\0\xff\xff?\0\xff\xff?\0>\0>\0\xff\xff\xff\xff\xff\xff?\0?\0\xff\xff>\0>\0>\0>\0>\0>\0>\0>\0>\0>\0\xff\xff>\0\xff\xff\xff\xff\xff\xff\xff\xff?\0>\0>\0>\0>\0>\0>\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff@\0@\0\xff\xff\xff\xff@\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffA\0A\0\xff\xff\xff\xffA\0\xff\xff\xff\xff>\0>\0>\0>\0>\0>\0@\0\xff\xff@\0B\0B\x007\0\xff\xffB\0@\0@\0A\0\xff\xffA\0\xff\xff?\x009\0\xff\xff\xff\xffA\0A\0C\0C\0\xff\xff\xff\xffC\0\xff\xffB\0@\0B\0\xff\xffA\0\xff\xffD\0D\0B\0B\0D\0A\0\xff\xff\xff\xff\xff\xff<\0\xff\xffC\0B\0C\0E\0E\0\xff\xff\xff\xffE\0C\0C\0B\0\xff\xffD\0\xff\xffD\0F\0F\0\xff\xff\xff\xffF\0D\0D\0\xff\xff\xff\xff\xff\xff\xff\xffE\0C\0E\0G\0G\0\xff\xff\xff\xffG\0E\0E\0\xff\xff=\0F\0D\0F\0H\0H\0\xff\xff\xff\xffH\0F\0F\0\xff\xff\xff\xff\xff\xff\xff\xffG\0E\0G\0\xff\xff\xff\xff\xff\xffI\0I\0G\0G\0I\0\xff\xffH\0F\0H\0\xff\xff\xff\xff\xff\xffC\0\xff\xffH\0H\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffG\0C\0I\0\xff\xffI\0\xff\xff\xff\xffC\0\xff\xff\xff\xffI\0I\0H\0\xff\xff\xff\xffJ\0J\0\xff\xffD\0J\0K\0K\0\xff\xff\xff\xffK\0\xff\xffE\0\xff\xff\xff\xffI\0\xff\xff>\0\xff\xff\xff\xffF\0\xff\xff?\0\xff\xffJ\0\xff\xffJ\0\xff\xffG\0K\0\xff\xffK\0J\0J\0\xff\xffL\0L\0K\0K\0L\0\xff\xff\xff\xff\xff\xffK\0\xff\xffM\0M\0\xff\xff\xff\xffM\0\xff\xffJ\0\xff\xff\xff\xff\xff\xff\xff\xffK\0\xff\xffL\0\xff\xffL\0N\0N\0\xff\xff\xff\xffN\0L\0L\0M\0\xff\xffM\0\xff\xffI\0\xff\xff\xff\xff\xff\xffM\0M\0O\0O\0\xff\xff\xff\xffO\0\xff\xffN\0L\0N\0\xff\xff@\0\xff\xff\xff\xff\xff\xffN\0N\0\xff\xffM\0\xff\xff\xff\xffA\0\xff\xff\xff\xffO\0\xff\xffO\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffO\0O\0N\0\xff\xff\xff\xffB\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffL\0\xff\xffL\0L\0L\0O\0L\0\xff\xffC\0\xff\xff\xff\xffL\0L\0L\0L\0L\0\xff\xffL\0L\0L\0D\0\xff\xffL\0L\0\xff\xffP\0P\0M\0\xff\xffP\0\xff\xff\xff\xff\xff\xff\xff\xffE\0\xff\xffQ\0Q\0\xff\xff\xff\xffQ\0\xff\xff\xff\xffN\0\xff\xff\xff\xffF\0O\0P\0\xff\xffP\0R\0R\0\xff\xff\xff\xffR\0P\0P\0\xff\xffQ\0G\0Q\0O\0\xff\xff\xff\xffS\0S\0Q\0Q\0S\0\xff\xff\xff\xffH\0\xff\xffR\0P\0R\0U\0U\0\xff\xff\xff\xffU\0R\0R\0\xff\xff\xff\xffQ\0\xff\xffS\0I\0S\0T\0T\0\xff\xff\xff\xffT\0S\0S\0\xff\xff\xff\xffU\0R\0U\0\xff\xff\xff\xff\xff\xffV\0V\0U\0U\0V\0\xff\xff\xff\xff\xff\xffT\0S\0T\0P\0\xff\xff\xff\xff\xff\xff\xff\xffT\0T\0\xff\xffJ\0\xff\xffU\0\xff\xffV\0K\0V\0W\0W\0\xff\xff\xff\xffW\0V\0V\0\xff\xffQ\0T\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffR\0\xff\xffW\0V\0W\0\xff\xffL\0\xff\xff\xff\xff\xff\xffW\0W\0\xff\xff\xff\xffX\0X\0M\0S\0X\0\xff\xffU\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffY\0Y\0W\0T\0Y\0N\0\xff\xff\xff\xff\xff\xff\xff\xffX\0\xff\xffX\0T\0\xff\xff\xff\xff\xff\xff\xff\xffX\0X\0\xff\xff\xff\xffO\0Y\0\xff\xffY\0\xff\xff\xff\xff\xff\xffZ\0Z\0Y\0Y\0Z\0V\0\xff\xff\xff\xffX\0\xff\xff\xff\xff[\0[\0\xff\xffW\0[\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffY\0\xff\xffZ\0W\0Z\0\\\0\\\0\xff\xff\xff\xff\\\0Z\0Z\0\xff\xff[\0\xff\xff[\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff[\0[\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\\\0Z\0\\\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\\\0\\\0\xff\xffX\0[\0\xff\xffP\0\xff\xff\xff\xffY\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffQ\0\xff\xff\\\0\xff\xffY\0Y\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffR\0\xff\xff\xff\xffZ\0\xff\xff\xff\xff\xff\xff]\0]\0\xff\xff\xff\xff]\0\xff\xffZ\0S\0\xff\xff\xff\xff\xff\xffZ\0\xff\xff\xff\xff[\0\xff\xff\xff\xff[\0\xff\xffU\0\xff\xff\xff\xff[\0]\0\xff\xff]\0^\0^\0\xff\xff\xff\xff^\0]\0]\0T\0\xff\xff\xff\xff_\0_\0\xff\xff\xff\xff_\0`\0`\0\\\0\xff\xff`\0\xff\xff\xff\xffV\0^\0]\0^\0a\0a\0\xff\xff\xff\xffa\0^\0^\0_\0\xff\xff_\0\xff\xff\xff\xff`\0\xff\xff`\0_\0_\0\xff\xff\xff\xff\xff\xff`\0`\0W\0a\0^\0a\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffa\0a\0\xff\xff_\0\xff\xff\xff\xffb\0b\0`\0\xff\xffb\0c\0c\0\xff\xff\xff\xffc\0\xff\xff\xff\xff\xff\xffa\0\xff\xff\xff\xff\xff\xffd\0d\0\xff\xffX\0d\0\xff\xffb\0]\0b\0\xff\xff\xff\xffc\0\xff\xffc\0b\0b\0Y\0\xff\xff\xff\xffc\0c\0^\0\xff\xffd\0\xff\xffd\0e\0e\0\xff\xff\xff\xffe\0d\0d\0b\0\xff\xff\xff\xff_\0\xff\xffc\0\xff\xff\xff\xff\xff\xff`\0f\0f\0Z\0\xff\xfff\0\xff\xffe\0d\0e\0\xff\xff\xff\xff\xff\xff\xff\xff[\0e\0e\0g\0g\0\xff\xff\xff\xffg\0\xff\xff\xff\xfff\0\xff\xfff\0\xff\xff\xff\xff\\\0\xff\xff\xff\xfff\0f\0e\0\xff\xff\xff\xffh\0h\0\xff\xffg\0h\0g\0\xff\xffd\0\xff\xff\xff\xff\xff\xffg\0g\0\xff\xfff\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffh\0\xff\xffh\0\xff\xff\xff\xff\xff\xff\xff\xffg\0h\0h\0e\0i\0i\0\xff\xff\xff\xffi\0\xff\xffh\0\xff\xffh\0\xff\xff\xff\xffj\0j\0h\0\xff\xffj\0h\0\xff\xfff\0\xff\xff\xff\xff\xff\xff\xff\xffi\0\xff\xffi\0k\0k\0]\0\xff\xffk\0i\0i\0\xff\xffj\0\xff\xffj\0g\0\xff\xff\xff\xff\xff\xffi\0j\0j\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffk\0i\0k\0\xff\xff\xff\xff^\0\xff\xffj\0k\0k\0l\0l\0j\0\xff\xffl\0_\0\xff\xff\xff\xff\xff\xff\xff\xff`\0m\0m\0\xff\xff\xff\xffm\0\xff\xffk\0\xff\xff\xff\xff\xff\xffa\0\xff\xffl\0\xff\xffl\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffl\0l\0\xff\xffm\0\xff\xffm\0n\0n\0\xff\xff\xff\xffn\0m\0m\0\xff\xff\xff\xff\xff\xffo\0o\0\xff\xffl\0o\0\xff\xffk\0\xff\xff\xff\xff\xff\xff\xff\xffb\0\xff\xffn\0m\0n\0c\0\xff\xff\xff\xff\xff\xff\xff\xffn\0n\0o\0\xff\xffo\0p\0p\0d\0\xff\xffp\0o\0o\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffn\0q\0q\0\xff\xff\xff\xffq\0\xff\xff\xff\xff\xff\xffp\0o\0p\0r\0r\0e\0\xff\xffr\0p\0p\0l\0\xff\xffl\0\xff\xff\xff\xffq\0\xff\xffq\0\xff\xff\xff\xff\xff\xff\xff\xfff\0q\0q\0\xff\xffr\0p\0r\0s\0s\0\xff\xff\xff\xffs\0r\0r\0\xff\xff\xff\xffg\0t\0t\0\xff\xffq\0t\0u\0u\0\xff\xffn\0u\0n\0\xff\xff\xff\xffs\0r\0s\0v\0v\0\xff\xffh\0v\0s\0s\0t\0\xff\xfft\0\xff\xff\xff\xffu\0\xff\xffu\0t\0t\0\xff\xff\xff\xff\xff\xffu\0u\0\xff\xffv\0s\0v\0w\0w\0\xff\xff\xff\xffw\0v\0v\0\xff\xfft\0\xff\xff\xff\xffi\0\xff\xffu\0\xff\xff\xff\xff\xff\xffq\0\xff\xffq\0\xff\xff\xff\xffj\0w\0v\0w\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffw\0w\0\xff\xff\xff\xffx\0x\0k\0\xff\xffx\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffw\0\xff\xffu\0\xff\xff\xff\xff\xff\xff\xff\xfft\0x\0\xff\xffx\0y\0y\0t\0\xff\xffy\0x\0x\0\xff\xff\xff\xffl\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffv\0\xff\xff\xff\xff\xff\xff\xff\xffm\0\xff\xff\xff\xffy\0x\0y\0z\0z\0\xff\xff\xff\xffz\0y\0y\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffy\0\xff\xffy\0\xff\xffw\0\xff\xffn\0y\0\xff\xffz\0y\0z\0\xff\xff\xff\xff\xff\xff\xff\xffo\0z\0z\0\xff\xff{\0{\0\xff\xff\xff\xff{\0\xff\xffx\0z\0\xff\xff\xff\xff|\0|\0\xff\xff\xff\xff|\0\xff\xffz\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffp\0{\0\xff\xff{\0}\0}\0\xff\xff\xff\xff}\0{\0{\0|\0\xff\xff|\0\xff\xffq\0\xff\xff\xff\xff\xff\xff|\0|\0\xff\xff\xff\xff{\0\xff\xff\xff\xffr\0}\0{\0}\0\xff\xff\xff\xff\xff\xff~\0~\0}\0}\0~\0|\0\xff\xff\xff\xff\xff\xff\xff\xff\x7f\0\x7f\0\xff\xff\xff\xff\x7f\0\xff\xff\xff\xff\xff\xff\xff\xffs\0\xff\xff}\0\xff\xff~\0\xff\xff~\0\x81\0\x81\0\xff\xfft\0\x81\0~\0~\0\x7f\0u\0\x7f\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7f\0\x7f\0\x80\0\x80\0v\0\xff\xff\x80\0\xff\xff\x81\0~\0\x81\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x81\0\x81\0\xff\xff\x7f\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\0\xff\xff\x80\0\x82\0\x82\0w\0\xff\xff\x82\0\x80\0\x80\0\x81\0\xff\xff\xff\xff\x83\0\x83\0\xff\xff\xff\xff\x83\0\x84\0\x84\0~\0\xff\xff\x84\0\xff\xff\xff\xff\xff\xff\x82\0\x80\0\x82\0\x85\0\x85\0\xff\xff\xff\xff\x85\0\x82\0\x82\0\x83\0\xff\xff\x83\0\xff\xffx\0\x84\0\xff\xff\x84\0\x83\0\x83\0\xff\xff\xff\xff\xff\xff\x84\0\x84\0\xff\xff\x85\0\x82\0\x85\0\x86\0\x86\0\xff\xff\xff\xff\x86\0\x85\0\x85\0\xff\xff\x83\0\xff\xff\xff\xffy\0\xff\xff\x84\0\xff\xff\x87\0\x87\0\xff\xff\xff\xff\x87\0\xff\xff\xff\xff\xff\xff\x86\0\x85\0\x86\0\xff\xff\xff\xff\x80\0\xff\xff\x80\0\x86\0\x86\0\xff\xff\xff\xff\xff\xff\xff\xffz\0\x87\0\xff\xff\x87\0\x88\0\x88\0\xff\xff\xff\xff\x88\0\x87\0\x87\0\xff\xff\xff\xff\x86\0\x89\0\x89\0\x84\0\xff\xff\x89\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x83\0\xff\xff\xff\xff\x88\0\x87\0\x88\0\xff\xff\xff\xff\xff\xff\xff\xff{\0\x88\0\x88\0\x89\0\x85\0\x89\0\xff\xff\xff\xff\xff\xff\xff\xff|\0\x89\0\x89\0\xff\xff\x8a\0\x8a\0\xff\xff\xff\xff\x8a\0\xff\xff\x88\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff}\0\x8b\0\x8b\0\xff\xff\x89\0\x8b\0\xff\xff\xff\xff\xff\xff\xff\xff\x86\0\x8a\0\xff\xff\x8a\0\xff\xff\xff\xff\xff\xff\x8c\0\x8c\0\x8a\0\x8a\0\x8c\0\xff\xff\xff\xff\x8b\0\xff\xff\x8b\0\x8d\0\x8d\0~\0\xff\xff\x8d\0\x8b\0\x8b\0\xff\xff\x88\0\xff\xff\xff\xff\x8a\0\x7f\0\x8c\0\xff\xff\x8c\0\x8e\0\x8e\0\x89\0\xff\xff\x8e\0\x8c\0\x8c\0\x8d\0\x8b\0\x8d\0\x8f\0\x8f\0\x81\0\xff\xff\x8f\0\x8d\0\x8d\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x8e\0\x8c\0\x8e\0\x90\0\x90\0\xff\xff\x80\0\x90\0\x8e\0\x8e\0\x8f\0\x8d\0\x8f\0\x91\0\x91\0\xff\xff\xff\xff\x91\0\x8f\0\x8f\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x90\0\x8e\0\x90\0\x92\0\x92\0\xff\xff\x82\0\x92\0\x90\0\x90\0\x91\0\x8f\0\x91\0\x93\0\x93\0\xff\xff\x83\0\x93\0\x91\0\x91\0\xff\xff\x84\0\xff\xff\xff\xff\x8c\0\xff\xff\x92\0\x90\0\x92\0\xff\xff\xff\xff\xff\xff\x85\0\xff\xff\x92\0\x92\0\x93\0\x91\0\x93\0\x94\0\x94\0\xff\xff\xff\xff\x94\0\x93\0\x93\0\xff\xff\x8f\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x92\0\xff\xff\x96\0\x96\0\xff\xff\x86\0\x96\0\x8e\0\xff\xff\x94\0\x93\0\x94\0\x95\0\x95\0\xff\xff\xff\xff\x95\0\x94\0\x94\0\xff\xff\x87\0\xff\xff\x97\0\x97\0\xff\xff\x96\0\x97\0\x96\0\xff\xff\xff\xff\x90\0\xff\xff\x90\0\x96\0\x96\0\x95\0\x94\0\x95\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x95\0\x95\0\x97\0\x88\0\x97\0\xff\xff\xff\xff\xff\xff\xff\xff\x96\0\x97\0\x97\0\xff\xff\x89\0\xff\xff\xff\xff\xff\xff\x98\0\x98\0\x95\0\xff\xff\x98\0\xff\xff\xff\xff\x93\0\xff\xff\xff\xff\x99\0\x99\0\x97\0\xff\xff\x99\0\x9a\0\x9a\0\xff\xff\xff\xff\x9a\0\xff\xff\xff\xff\x94\0\x98\0\xff\xff\x98\0\x94\0\xff\xff\x96\0\xff\xff\x8a\0\x98\0\x98\0\x99\0\xff\xff\x99\0\xff\xff\xff\xff\x9a\0\xff\xff\x9a\0\x99\0\x99\0\x8b\0\xff\xff\xff\xff\x9a\0\x9a\0\x9b\0\x9b\0\x98\0\xff\xff\x9b\0\x95\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x8c\0\x99\0\xff\xff\xff\xff\xff\xff\xff\xff\x9a\0\xff\xff\xff\xff\x97\0\x8d\0\x97\0\x9b\0\xff\xff\x9b\0\x9c\0\x9c\0\xff\xff\xff\xff\x9c\0\x9b\0\x9b\0\xff\xff\xff\xff\xff\xff\xff\xff\x8e\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x8f\0\xff\xff\x9c\0\x9b\0\x9c\0\x9d\0\x9d\0\xff\xff\xff\xff\x9d\0\x9c\0\x9c\0\xff\xff\xff\xff\xff\xff\xff\xff\x90\0\xff\xff\x9e\0\x9e\0\xff\xff\xff\xff\x9e\0\xff\xff\xff\xff\xff\xff\x91\0\x9a\0\x9d\0\x9c\0\x9d\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x9d\0\x9d\0\xff\xff\xff\xff\xff\xff\x9e\0\x92\0\x9e\0\xff\xff\x9b\0\xff\xff\xff\xff\xff\xff\x9e\0\x9e\0\xff\xff\x93\0\xff\xff\xff\xff\x9d\0\x9f\0\x9f\0\xff\xff\xff\xff\x9f\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xa0\0\xa0\0\x9e\0\xff\xff\xa0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x94\0\x9f\0\xff\xff\x9f\0\xff\xff\xff\xff\x9c\0\xff\xff\xff\xff\x9f\0\x9f\0\xa0\0\xff\xff\xa0\0\xff\xff\xff\xff\x96\0\xa1\0\xa1\0\xa0\0\xa0\0\xa1\0\xff\xff\xff\xff\xff\xff\xff\xff\x95\0\xff\xff\x9f\0\xff\xff\x9d\0\xa2\0\xa2\0\xff\xff\xff\xff\xa2\0\x97\0\xff\xff\xa0\0\xff\xff\xa1\0\xff\xff\xa1\0\xff\xff\xff\xff\x9e\0\xa3\0\xa3\0\xa1\0\xa1\0\xa3\0\xff\xff\xff\xff\xff\xff\xa2\0\xa1\0\xa2\0\xff\xff\xff\xff\xff\xff\xa4\0\xa4\0\xa2\0\xa2\0\xa4\0\xff\xff\xff\xff\xa1\0\xff\xff\xa3\0\x9f\0\xa3\0\xff\xff\xff\xff\x98\0\xa5\0\xa5\0\xa3\0\xa3\0\xa5\0\xff\xff\xa2\0\xff\xff\xa4\0\x99\0\xa4\0\xa6\0\xa6\0\xa3\0\x9a\0\xa6\0\xa4\0\xa4\0\xff\xff\xff\xff\xa0\0\xa3\0\xff\xff\xa5\0\xff\xff\xa5\0\xa4\0\xff\xff\xff\xff\xff\xff\xff\xff\xa5\0\xa5\0\xff\xff\xa6\0\xa4\0\xa6\0\xa7\0\xa7\0\xff\xff\xff\xff\xa7\0\xa6\0\xa6\0\xff\xff\xff\xff\xff\xff\x9b\0\xff\xff\xa2\0\xa5\0\xa8\0\xa8\0\xff\xff\xff\xff\xa8\0\xff\xff\xff\xff\xff\xff\xff\xff\xa7\0\xa6\0\xa7\0\xa9\0\xa9\0\xff\xff\xff\xff\xa9\0\xa7\0\xa7\0\xff\xff\xff\xff\xff\xff\x9c\0\xa8\0\xff\xff\xa8\0\xaa\0\xaa\0\xff\xff\xff\xff\xaa\0\xa8\0\xa8\0\xff\xff\xff\xff\xa9\0\xa7\0\xa9\0\xff\xff\xff\xff\xff\xff\xab\0\xab\0\xa9\0\xa9\0\xab\0\xff\xff\xff\xff\x9d\0\xaa\0\xa8\0\xaa\0\xac\0\xac\0\xff\xff\xff\xff\xac\0\xaa\0\xaa\0\xa6\0\xff\xff\x9e\0\xa9\0\xff\xff\xab\0\xa6\0\xab\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xab\0\xab\0\xff\xff\xac\0\xaa\0\xac\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xac\0\xac\0\xad\0\xad\0\xff\xff\xff\xff\xad\0\xff\xff\xab\0\xff\xff\xff\xff\xff\xff\xff\xff\xae\0\xae\0\xff\xff\x9f\0\xae\0\xff\xff\xac\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xad\0\xa0\0\xad\0\xaf\0\xaf\0\xff\xff\xff\xff\xaf\0\xad\0\xad\0\xff\xff\xae\0\xff\xff\xae\0\xb0\0\xb0\0\xff\xff\xff\xff\xb0\0\xae\0\xae\0\xff\xff\xff\xff\xaa\0\xff\xff\xff\xff\xaf\0\xad\0\xaf\0\xff\xff\xa1\0\xff\xff\xff\xff\xff\xff\xaf\0\xaf\0\xff\xff\xb0\0\xae\0\xb0\0\xff\xff\xff\xff\xff\xff\xff\xff\xa2\0\xb0\0\xb0\0\xb1\0\xb1\0\xff\xff\xff\xff\xb1\0\xff\xff\xaf\0\xff\xff\xff\xff\xff\xff\xac\0\xff\xff\xa3\0\xff\xff\xb2\0\xb2\0\xff\xff\xb0\0\xb2\0\xff\xff\xff\xff\xff\xff\xff\xff\xb1\0\xff\xff\xb1\0\xa4\0\xff\xff\xff\xff\xff\xff\xff\xff\xb1\0\xb1\0\xff\xff\xb3\0\xb3\0\xff\xff\xb2\0\xb3\0\xb2\0\xff\xff\xa5\0\xaf\0\xff\xff\xff\xff\xb2\0\xb2\0\xff\xff\xff\xff\xff\xff\xb1\0\xff\xff\xa6\0\xb0\0\xff\xff\xff\xff\xff\xff\xb3\0\xff\xff\xb3\0\xff\xff\xff\xff\xff\xff\xff\xff\xb2\0\xb3\0\xb3\0\xff\xff\xff\xff\xff\xff\xb4\0\xb4\0\xff\xff\xff\xff\xb4\0\xff\xff\xff\xff\xff\xff\xa7\0\xff\xff\xff\xff\xff\xff\xb5\0\xb5\0\xb3\0\xff\xff\xb5\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xa8\0\xb4\0\xff\xff\xb4\0\xb6\0\xb6\0\xff\xff\xff\xff\xb6\0\xb4\0\xb4\0\xff\xff\xa9\0\xb5\0\xb1\0\xb5\0\xb1\0\xff\xff\xff\xff\xb7\0\xb7\0\xb5\0\xb5\0\xb7\0\xff\xff\xff\xff\xaa\0\xb6\0\xb4\0\xb6\0\xb8\0\xb8\0\xff\xff\xff\xff\xb8\0\xb6\0\xb6\0\xff\xff\xff\xff\xff\xff\xb5\0\xab\0\xb7\0\xff\xff\xb7\0\xb9\0\xb9\0\xff\xff\xff\xff\xb9\0\xb7\0\xb7\0\xac\0\xb8\0\xb6\0\xb8\0\xba\0\xba\0\xff\xff\xff\xff\xba\0\xb8\0\xb8\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xb9\0\xb7\0\xb9\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xb9\0\xb9\0\xff\xff\xba\0\xb8\0\xba\0\xff\xff\xb9\0\xb4\0\xad\0\xb4\0\xba\0\xba\0\xbb\0\xbb\0\xff\xff\xff\xff\xbb\0\xff\xff\xb9\0\xae\0\xff\xff\xff\xff\xff\xff\xbc\0\xbc\0\xff\xff\xff\xff\xbc\0\xff\xff\xba\0\xb7\0\xff\xff\xff\xff\xff\xff\xaf\0\xbb\0\xff\xff\xbb\0\xbd\0\xbd\0\xff\xff\xff\xff\xbd\0\xbb\0\xbb\0\xb0\0\xbc\0\xff\xff\xbc\0\xbe\0\xbe\0\xff\xff\xff\xff\xbe\0\xbc\0\xbc\0\xb8\0\xbb\0\xff\xff\xff\xff\xff\xff\xbd\0\xbb\0\xbd\0\xbf\0\xbf\0\xbc\0\xff\xff\xbf\0\xbd\0\xbd\0\xff\xff\xbe\0\xbc\0\xbe\0\xba\0\xff\xff\xff\xff\xb1\0\xff\xff\xbe\0\xbe\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbf\0\xbd\0\xbf\0\xc0\0\xc0\0\xb2\0\xff\xff\xc0\0\xbf\0\xbf\0\xff\xff\xff\xff\xbe\0\xc1\0\xc1\0\xff\xff\xff\xff\xc1\0\xc2\0\xc2\0\xff\xff\xff\xff\xc2\0\xff\xff\xff\xff\xb3\0\xc0\0\xbf\0\xc0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\0\xc0\0\xc1\0\xff\xff\xc1\0\xff\xff\xff\xff\xc2\0\xff\xff\xc2\0\xc1\0\xc1\0\xff\xff\xff\xff\xff\xff\xc2\0\xc2\0\xc3\0\xc3\0\xc0\0\xff\xff\xc3\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xb4\0\xff\xff\xc1\0\xff\xff\xc4\0\xc4\0\xff\xff\xc2\0\xc4\0\xbe\0\xff\xff\xff\xff\xb5\0\xc3\0\xff\xff\xc3\0\xff\xff\xbf\0\xff\xff\xff\xff\xff\xff\xc3\0\xc3\0\xff\xff\xff\xff\xff\xff\xb6\0\xc4\0\xc3\0\xc4\0\xc5\0\xc5\0\xc0\0\xff\xff\xc5\0\xc4\0\xc4\0\xff\xff\xc1\0\xff\xff\xc3\0\xb7\0\xc4\0\xc6\0\xc6\0\xff\xff\xff\xff\xc6\0\xff\xff\xff\xff\xff\xff\xff\xff\xb8\0\xc5\0\xc4\0\xc5\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc5\0\xc5\0\xc2\0\xff\xff\xc2\0\xc6\0\xb9\0\xc6\0\xc7\0\xc7\0\xff\xff\xff\xff\xc7\0\xc6\0\xc6\0\xff\xff\xff\xff\xba\0\xff\xff\xc5\0\xff\xff\xff\xff\xc8\0\xc8\0\xc6\0\xff\xff\xc8\0\xc6\0\xff\xff\xff\xff\xff\xff\xc7\0\xc6\0\xc7\0\xc9\0\xc9\0\xff\xff\xff\xff\xc9\0\xc7\0\xc7\0\xff\xff\xff\xff\xff\xff\xff\xff\xc8\0\xff\xff\xc8\0\xca\0\xca\0\xbb\0\xc7\0\xca\0\xc8\0\xc8\0\xff\xff\xff\xff\xc9\0\xc7\0\xc9\0\xff\xff\xbc\0\xc5\0\xc8\0\xff\xff\xc9\0\xc9\0\xff\xff\xff\xff\xff\xff\xff\xff\xca\0\xc8\0\xca\0\xcb\0\xcb\0\xbd\0\xff\xff\xcb\0\xca\0\xca\0\xff\xff\xff\xff\xff\xff\xc9\0\xcc\0\xcc\0\xbe\0\xff\xff\xcc\0\xcd\0\xcd\0\xff\xff\xff\xff\xcd\0\xff\xff\xff\xff\xcb\0\xca\0\xcb\0\xce\0\xce\0\xbf\0\xff\xff\xce\0\xcb\0\xcb\0\xff\xff\xcc\0\xff\xff\xcc\0\xff\xff\xff\xff\xcd\0\xff\xff\xcd\0\xcc\0\xcc\0\xff\xff\xff\xff\xff\xff\xcd\0\xcd\0\xce\0\xcb\0\xce\0\xff\xff\xcc\0\xc0\0\xff\xff\xcc\0\xce\0\xce\0\xcd\0\xff\xff\xcc\0\xff\xff\xff\xff\xc1\0\xff\xff\xcd\0\xce\0\xff\xff\xc2\0\xff\xff\xff\xff\xff\xff\xcf\0\xcf\0\xff\xff\xce\0\xcf\0\xd0\0\xd0\0\xff\xff\xff\xff\xd0\0\xd1\0\xd1\0\xff\xff\xff\xff\xd1\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xcb\0\xff\xff\xff\xff\xcf\0\xff\xff\xcf\0\xff\xff\xff\xff\xd0\0\xc3\0\xd0\0\xcf\0\xcf\0\xd1\0\xff\xff\xd1\0\xd0\0\xd0\0\xff\xff\xff\xff\xff\xff\xd1\0\xd1\0\xc4\0\xff\xff\xff\xff\xff\xff\xd1\0\xff\xff\xff\xff\xcf\0\xff\xff\xd2\0\xd2\0\xff\xff\xd0\0\xd2\0\xff\xff\xff\xff\xff\xff\xd1\0\xff\xff\xd3\0\xd3\0\xff\xff\xff\xff\xd3\0\xff\xff\xff\xff\xc5\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xd2\0\xff\xff\xd2\0\xff\xff\xff\xff\xff\xff\xff\xff\xc6\0\xd2\0\xd2\0\xd3\0\xff\xff\xd3\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xd3\0\xd3\0\xd4\0\xd4\0\xff\xff\xff\xff\xd4\0\xff\xff\xff\xff\xd2\0\xff\xff\xff\xff\xff\xff\xd5\0\xd5\0\xc7\0\xff\xff\xd5\0\xff\xff\xd3\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xd4\0\xff\xff\xd4\0\xff\xff\xc8\0\xff\xff\xff\xff\xff\xff\xd4\0\xd4\0\xff\xff\xd5\0\xff\xff\xd5\0\xff\xff\xff\xff\xc9\0\xff\xff\xff\xff\xd5\0\xd5\0\xff\xff\xd2\0\xff\xff\xd2\0\xd2\0\xd2\0\xd4\0\xd2\0\xff\xff\xca\0\xff\xff\xff\xff\xd2\0\xd2\0\xd2\0\xd2\0\xd2\0\xd5\0\xd2\0\xd2\0\xd2\0\xff\xff\xd6\0\xd6\0\xd2\0\xff\xff\xd6\0\xd3\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xd3\0\xcb\0\xff\xff\xd7\0\xd7\0\xff\xff\xff\xff\xd7\0\xff\xff\xff\xff\xff\xff\xd6\0\xcc\0\xd6\0\xd4\0\xff\xff\xff\xff\xcd\0\xff\xff\xd6\0\xd6\0\xff\xff\xff\xff\xff\xff\xd4\0\xff\xff\xd7\0\xce\0\xd7\0\xd5\0\xff\xff\xff\xff\xff\xff\xd5\0\xd7\0\xd7\0\xd8\0\xd8\0\xd6\0\xff\xff\xd8\0\xd9\0\xd9\0\xff\xff\xff\xff\xd9\0\xda\0\xda\0\xff\xff\xff\xff\xda\0\xff\xff\xff\xff\xd7\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xd8\0\xff\xff\xd8\0\xff\xff\xff\xff\xd9\0\xff\xff\xd9\0\xd8\0\xd8\0\xda\0\xff\xff\xda\0\xd9\0\xd9\0\xcf\0\xff\xff\xff\xff\xda\0\xda\0\xd0\0\xff\xff\xdb\0\xdb\0\xff\xff\xd1\0\xdb\0\xd8\0\xff\xff\xff\xff\xd6\0\xff\xff\xd9\0\xff\xff\xdc\0\xdc\0\xff\xff\xda\0\xdc\0\xdd\0\xdd\0\xff\xff\xff\xff\xdd\0\xff\xff\xdb\0\xff\xff\xdb\0\xff\xff\xff\xff\xff\xff\xd7\0\xff\xff\xdb\0\xdb\0\xff\xff\xff\xff\xdc\0\xff\xff\xdc\0\xff\xff\xff\xff\xdd\0\xff\xff\xdd\0\xdc\0\xdc\0\xd2\0\xff\xff\xd8\0\xdd\0\xdd\0\xdb\0\xff\xff\xde\0\xde\0\xff\xff\xd3\0\xde\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xdc\0\xff\xff\xff\xff\xd9\0\xff\xff\xdd\0\xda\0\xdf\0\xdf\0\xff\xff\xff\xff\xdf\0\xff\xff\xde\0\xff\xff\xde\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xde\0\xde\0\xe0\0\xe0\0\xff\xff\xd4\0\xe0\0\xde\0\xff\xff\xdf\0\xff\xff\xdf\0\xff\xff\xff\xff\xff\xff\xff\xff\xd5\0\xdf\0\xdf\0\xde\0\xff\xff\xdc\0\xdb\0\xff\xff\xff\xff\xe0\0\xff\xff\xe0\0\xff\xff\xff\xff\xff\xff\xe1\0\xe1\0\xe0\0\xe0\0\xe1\0\xdf\0\xff\xff\xff\xff\xff\xff\xff\xff\xdd\0\xff\xff\xff\xff\xe2\0\xe2\0\xff\xff\xe0\0\xe2\0\xff\xff\xff\xff\xff\xff\xe0\0\xff\xff\xe1\0\xff\xff\xe1\0\xff\xff\xff\xff\xff\xff\xe3\0\xe3\0\xe1\0\xe1\0\xe3\0\xff\xff\xff\xff\xe2\0\xff\xff\xe2\0\xff\xff\xd6\0\xff\xff\xff\xff\xe1\0\xe2\0\xe2\0\xff\xff\xff\xff\xdf\0\xff\xff\xe1\0\xff\xff\xe3\0\xff\xff\xe3\0\xd7\0\xff\xff\xff\xff\xff\xff\xff\xff\xe3\0\xe3\0\xff\xff\xe2\0\xe4\0\xe4\0\xff\xff\xff\xff\xe4\0\xe5\0\xe5\0\xff\xff\xff\xff\xe5\0\xe6\0\xe6\0\xff\xff\xff\xff\xe6\0\xe3\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe4\0\xd8\0\xe4\0\xff\xff\xff\xff\xe5\0\xd9\0\xe5\0\xe4\0\xe4\0\xe6\0\xda\0\xe6\0\xe5\0\xe5\0\xff\xff\xe7\0\xe7\0\xe6\0\xe6\0\xe7\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe4\0\xff\xff\xe8\0\xe8\0\xff\xff\xe5\0\xe8\0\xff\xff\xff\xff\xff\xff\xe6\0\xff\xff\xe7\0\xff\xff\xe7\0\xff\xff\xff\xff\xff\xff\xff\xff\xdb\0\xe7\0\xe7\0\xe3\0\xff\xff\xff\xff\xe8\0\xff\xff\xe8\0\xff\xff\xff\xff\xff\xff\xdc\0\xff\xff\xe8\0\xe8\0\xff\xff\xdd\0\xff\xff\xff\xff\xe7\0\xff\xff\xff\xff\xe4\0\xff\xff\xff\xff\xe9\0\xe9\0\xff\xff\xff\xff\xe9\0\xff\xff\xe6\0\xe8\0\xff\xff\xff\xff\xff\xff\xe5\0\xff\xff\xff\xff\xea\0\xea\0\xff\xff\xff\xff\xea\0\xff\xff\xff\xff\xff\xff\xff\xff\xe9\0\xff\xff\xe9\0\xde\0\xff\xff\xff\xff\xff\xff\xe7\0\xe9\0\xe9\0\xff\xff\xff\xff\xff\xff\xff\xff\xea\0\xe9\0\xea\0\xff\xff\xff\xff\xff\xff\xdf\0\xff\xff\xea\0\xea\0\xeb\0\xeb\0\xff\xff\xe9\0\xeb\0\xea\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe0\0\xff\xff\xff\xff\xff\xff\xe8\0\xea\0\xe8\0\xff\xff\xff\xff\xff\xff\xff\xff\xeb\0\xff\xff\xeb\0\xec\0\xec\0\xff\xff\xff\xff\xec\0\xeb\0\xeb\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe1\0\xed\0\xed\0\xff\xff\xff\xff\xed\0\xff\xff\xff\xff\xec\0\xeb\0\xec\0\xff\xff\xff\xff\xe2\0\xff\xff\xff\xff\xec\0\xec\0\xee\0\xee\0\xff\xff\xff\xff\xee\0\xff\xff\xed\0\xff\xff\xed\0\xec\0\xff\xff\xe3\0\xff\xff\xff\xff\xed\0\xed\0\xff\xff\xec\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xee\0\xed\0\xee\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xee\0\xee\0\xed\0\xef\0\xef\0\xff\xff\xeb\0\xef\0\xf0\0\xf0\0\xff\xff\xff\xff\xf0\0\xff\xff\xff\xff\xe4\0\xff\xff\xff\xff\xff\xff\xee\0\xe5\0\xff\xff\xff\xff\xff\xff\xff\xff\xe6\0\xef\0\xff\xff\xef\0\xff\xff\xff\xff\xf0\0\xff\xff\xf0\0\xef\0\xef\0\xff\xff\xf1\0\xf1\0\xf0\0\xf0\0\xf1\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\0\xf2\0\xf0\0\xff\xff\xf2\0\xef\0\xe7\0\xff\xff\xff\xff\xff\xff\xf0\0\xff\xff\xf1\0\xff\xff\xf1\0\xff\xff\xff\xff\xff\xff\xff\xff\xe8\0\xf1\0\xf1\0\xff\xff\xf2\0\xff\xff\xf2\0\xff\xff\xff\xff\xff\xff\xff\xff\xf1\0\xf2\0\xf2\0\xff\xff\xf3\0\xf3\0\xff\xff\xff\xff\xf3\0\xf1\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf4\0\xf4\0\xf2\0\xef\0\xf4\0\xff\xff\xff\xff\xff\xff\xff\xff\xf3\0\xff\xff\xf3\0\xf5\0\xf5\0\xe9\0\xff\xff\xf5\0\xf3\0\xf3\0\xff\xff\xff\xff\xff\xff\xff\xff\xf4\0\xff\xff\xf4\0\xf6\0\xf6\0\xea\0\xff\xff\xf6\0\xf4\0\xf4\0\xff\xff\xff\xff\xf5\0\xf3\0\xf5\0\xff\xff\xff\xff\xff\xff\xf7\0\xf7\0\xf5\0\xf5\0\xf7\0\xff\xff\xff\xff\xff\xff\xf6\0\xf4\0\xf6\0\xf8\0\xf8\0\xff\xff\xff\xff\xf8\0\xf6\0\xf6\0\xff\xff\xff\xff\xeb\0\xf5\0\xff\xff\xf7\0\xff\xff\xf7\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\0\xf7\0\xff\xff\xf8\0\xf6\0\xf8\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\0\xf8\0\xff\xff\xff\xff\xec\0\xf3\0\xff\xff\xff\xff\xf7\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\0\xed\0\xff\xff\xf4\0\xff\xff\xfc\0\xff\xff\xff\xff\xff\xff\xff\xff\xfc\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf5\0\xee\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xf7\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xef\0\xff\xff\xff\xff\xff\xff\xff\xff\xf0\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\0\xff\xff\xff\xff\xff\xff\xff\xff\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xfc\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\0\xff\xff\xff\xff\xff\xff\xfc\0\xf1\0\xfc\0\xfc\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf2\0\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\xff\xff\xf3\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf4\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf5\0\x10\x01\x10\x01\x10\x01\x10\x01\x10\x01\x10\x01\x10\x01\x10\x01\x10\x01\x10\x01\xff\xff\xff\xff\xff\xff\xf6\0\xff\xff\xff\xff\xff\xff\x10\x01\x10\x01\x10\x01\x10\x01\x10\x01\x10\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf8\0\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x10\x01\x10\x01\x10\x01\x10\x01\x10\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfc\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\xff\0\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x02\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\xff\xff\xff\xff\x04\x01\x12\x01\x12\x01\x12\x01\x12\x01\x12\x01\x12\x01\x12\x01\x12\x01\x12\x01\x12\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x01\x12\x01\x12\x01\x12\x01\x12\x01\x12\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x01\x12\x01\x12\x01\x12\x01\x12\x01\x12\x01\xff\xff\xff\xff\x04\x01\xd5\x02\xd5\x02\xd5\x02\xd5\x02\xd5\x02\xd5\x02\xd5\x02\xd5\x02\xd5\x02\xd5\x02\xd5\x02\xd5\x02\xd5\x02\xd5\x02\xd5\x02\xd5\x02\xd5\x02\xd5\x02\xd5\x02\xd5\x02\xd5\x02\xd5\x02\xd5\x02\xd5\x02\xd5\x02\xd5\x02\xd5\x02\xd5\x02\xd5\x02\xd5\x02\xd5\x02\xd5\x02\xff\xff\xff\xff\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x04\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x05\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x06\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\x07\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\b\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\t\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\n\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\x0b\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\f\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\r\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\xff\xff\xff\xff\x11\x01\x13\x01\x13\x01\x13\x01\x13\x01\x13\x01\x13\x01\x13\x01\x13\x01\x13\x01\x13\x01\xff\xff\xff\xff\x15\x01\x15\x01\xff\xff\xff\xff\x15\x01\x13\x01\x13\x01\x13\x01\x13\x01\x13\x01\x13\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x15\x01\xff\xff\x15\x01\x16\x01\x16\x01\xff\xff\xff\xff\x16\x01\x15\x01\x15\x01\xff\xff\xff\xff\xff\xff\xff\xff\x13\x01\x13\x01\x13\x01\x13\x01\x13\x01\x13\x01\x15\x01\xff\xff\x11\x01\xff\xff\xff\xff\xff\xff\x16\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x13\x01\xff\xff\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x01\xff\xff\xff\xff\xff\xff\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x11\x01\x14\x01\x14\x01\xff\xff\xff\xff\x14\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x01\x17\x01\xff\xff\xff\xff\x17\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x18\x01\x18\x01\xff\xff\x14\x01\x18\x01\x14\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x14\x01\x17\x01\xff\xff\x17\x01\xff\xff\x15\x01\xff\xff\xff\xff\xff\xff\x17\x01\x17\x01\x18\x01\xff\xff\x18\x01\xff\xff\x17\x01\xff\xff\xff\xff\x14\x01\x18\x01\x18\x01\x19\x01\x19\x01\xff\xff\xff\xff\x19\x01\xff\xff\xff\xff\x17\x01\xff\xff\xff\xff\x16\x01\xff\xff\x1a\x01\x1a\x01\xff\xff\xff\xff\x1a\x01\x18\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\xff\xff\x19\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x19\x01\x19\x01\xff\xff\xff\xff\x1a\x01\xff\xff\x1a\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x01\x1a\x01\xff\xff\xff\xff\xff\xff\x14\x01\xff\xff\x19\x01\xff\xff\x1b\x01\x1b\x01\xff\xff\x18\x01\x1b\x01\x18\x01\x18\x01\x18\x01\x18\x01\x18\x01\x1a\x01\xff\xff\xff\xff\xff\xff\x18\x01\x18\x01\x18\x01\xff\xff\xff\xff\xff\xff\x18\x01\x18\x01\x18\x01\x1b\x01\xff\xff\x1b\x01\x1c\x01\x1c\x01\xff\xff\xff\xff\x1c\x01\x1b\x01\x1b\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1d\x01\x1d\x01\xff\xff\x19\x01\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\x1b\x01\x1c\x01\x1a\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\x1c\x01\xff\xff\x1d\x01\xff\xff\x1d\x01\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x01\x1d\x01\x1d\x01\x1e\x01\x1e\x01\xff\xff\xff\xff\x1e\x01\xff\xff\x1c\x01\xff\xff\xff\xff\xff\xff\x1f\x01\x1f\x01\xff\xff\xff\xff\x1f\x01 \x01 \x01\x1d\x01\xff\xff \x01\xff\xff\xff\xff\xff\xff\x1e\x01\xff\xff\x1e\x01!\x01!\x01\xff\xff\xff\xff!\x01\x1e\x01\x1e\x01\x1f\x01\x1b\x01\x1f\x01\xff\xff\xff\xff \x01\xff\xff \x01\x1f\x01\x1f\x01\xff\xff\xff\xff\xff\xff \x01 \x01\x1c\x01!\x01\x1e\x01!\x01\x1c\x01\xff\xff\xff\xff\x1d\x01\xff\xff!\x01!\x01\xff\xff\x1f\x01\xff\xff\xff\xff\x1d\x01\xff\xff \x01\"\x01\"\x01\xff\xff\xff\xff\"\x01\xff\xff\x14\x01\xff\xff\xff\xff\x1d\x01!\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x17\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\"\x01\xff\xff\"\x01\x18\x01\xff\xff\xff\xff\xff\xff\xff\xff\"\x01\"\x01#\x01#\x01\xff\xff\xff\xff#\x01 \x01\x1e\x01 \x01\xff\xff\xff\xff\x1f\x01$\x01$\x01\xff\xff\xff\xff$\x01\xff\xff\"\x01\xff\xff!\x01\xff\xff\xff\xff\xff\xff#\x01\xff\xff#\x01\x19\x01\xff\xff\xff\xff\xff\xff\xff\xff#\x01#\x01\xff\xff$\x01\xff\xff$\x01\xff\xff\x1a\x01\xff\xff\xff\xff\xff\xff$\x01$\x01\xff\xff%\x01%\x01\xff\xff\xff\xff%\x01#\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff&\x01&\x01\xff\xff\xff\xff&\x01$\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff%\x01\xff\xff%\x01\"\x01\xff\xff\xff\xff\"\x01\"\x01%\x01%\x01\x1b\x01&\x01\xff\xff&\x01\xff\xff\xff\xff\xff\xff'\x01'\x01&\x01&\x01'\x01\xff\xff\xff\xff#\x01\xff\xff\xff\xff%\x01(\x01(\x01\xff\xff\xff\xff(\x01\xff\xff#\x01$\x01\x1c\x01\xff\xff&\x01#\x01'\x01\xff\xff'\x01\xff\xff\xff\xff$\x01\xff\xff\x1d\x01'\x01'\x01\xff\xff(\x01\xff\xff(\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff(\x01(\x01)\x01)\x01\xff\xff\xff\xff)\x01\xff\xff'\x01\xff\xff\xff\xff\xff\xff*\x01*\x01%\x01\xff\xff*\x01\xff\xff\xff\xff(\x01\xff\xff\x1e\x01\xff\xff\xff\xff\xff\xff)\x01\xff\xff)\x01\xff\xff\xff\xff&\x01\x1f\x01&\x01)\x01)\x01*\x01 \x01*\x01\xff\xff\xff\xff\xff\xff+\x01+\x01*\x01*\x01+\x01\xff\xff!\x01\xff\xff\xff\xff\xff\xff\xff\xff)\x01\xff\xff,\x01,\x01\xff\xff\xff\xff,\x01\xff\xff\xff\xff\xff\xff*\x01\xff\xff+\x01\xff\xff+\x01\xff\xff\xff\xff\xff\xff'\x01\xff\xff+\x01+\x01\xff\xff(\x01\xff\xff,\x01(\x01,\x01-\x01-\x01\xff\xff\xff\xff-\x01,\x01,\x01\"\x01\xff\xff\xff\xff\xff\xff+\x01\xff\xff\xff\xff)\x01\xff\xff.\x01.\x01\xff\xff\xff\xff.\x01\xff\xff\xff\xff-\x01,\x01-\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff-\x01-\x01\xff\xff\xff\xff\xff\xff\xff\xff*\x01\xff\xff.\x01#\x01.\x01/\x01/\x01\xff\xff\xff\xff/\x01.\x01.\x01\xff\xff-\x01$\x010\x010\x01.\x01\xff\xff0\x01\xff\xff\xff\xff\xff\xff,\x01\xff\xff\xff\xff\xff\xff\xff\xff/\x01.\x01/\x01+\x01\xff\xff\xff\xff\xff\xff\xff\xff/\x01/\x010\x01\xff\xff0\x011\x011\x01/\x01\xff\xff1\x010\x010\x01%\x01\xff\xff\xff\xff\xff\xff\xff\xff2\x012\x01/\x01\xff\xff2\x01\xff\xff&\x01\xff\xff\xff\xff\xff\xff\xff\xff1\x010\x011\x01\xff\xff\xff\xff-\x01\xff\xff-\x011\x011\x01\xff\xff\xff\xff2\x01\xff\xff2\x01\xff\xff\xff\xff\xff\xff\xff\xff1\x012\x012\x011\x01\xff\xff'\x013\x013\x011\x01\xff\xff3\x014\x014\x012\x01\xff\xff4\x01(\x01\xff\xff\xff\xff\xff\xff2\x015\x015\x01\xff\xff\xff\xff5\x01\xff\xff\xff\xff0\x013\x01\xff\xff3\x01\xff\xff\xff\xff4\x01\xff\xff4\x013\x013\x01\xff\xff\xff\xff\xff\xff4\x014\x015\x01\xff\xff5\x013\x01\xff\xff)\x016\x016\x015\x015\x016\x01\xff\xff3\x01\xff\xff\xff\xff*\x01\xff\xff4\x017\x017\x01\xff\xff\xff\xff7\x01\xff\xff\xff\xff\xff\xff\xff\xff5\x01\xff\xff6\x01\xff\xff6\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff6\x016\x01\xff\xff\xff\xff7\x01\xff\xff7\x01+\x01\xff\xff\xff\xff8\x018\x017\x017\x018\x01\xff\xff\xff\xff\xff\xff\xff\xff6\x01,\x01\xff\xff\xff\xff7\x01:\x01:\x017\x01\xff\xff:\x01\xff\xff\xff\xff7\x01\xff\xff8\x01\xff\xff8\x019\x019\x01\xff\xff\xff\xff9\x018\x018\x01\xff\xff\xff\xff\xff\xff-\x01:\x01\xff\xff:\x01;\x01;\x01\xff\xff8\x01;\x01:\x01:\x01\xff\xff\xff\xff9\x018\x019\x01.\x01\xff\xff\xff\xff6\x01\xff\xff9\x019\x01\xff\xff\xff\xff\xff\xff\xff\xff;\x01:\x01;\x01\xff\xff9\x01\xff\xff<\x01<\x01;\x01;\x01<\x01\xff\xff\xff\xff9\x01\xff\xff/\x01\xff\xff=\x01=\x01\xff\xff\xff\xff=\x01>\x01>\x01\xff\xff0\x01>\x01;\x01\xff\xff<\x01\xff\xff<\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff<\x01<\x01\xff\xff=\x01\xff\xff=\x01\xff\xff\xff\xff>\x01\xff\xff>\x01=\x01=\x01\xff\xff1\x01\xff\xff>\x01>\x01\xff\xff<\x01?\x01?\x01\xff\xff\xff\xff?\x01\xff\xff2\x01\xff\xff\xff\xff\xff\xff=\x01\xff\xff@\x01@\x01\xff\xff>\x01@\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff?\x01\xff\xff?\x01\xff\xff\xff\xff\xff\xffA\x01A\x01?\x01?\x01A\x01\xff\xff@\x01\xff\xff@\x01\xff\xff\xff\xff\xff\xff\xff\xff3\x01@\x01@\x01B\x01B\x014\x01\xff\xffB\x01?\x01\xff\xffA\x01\xff\xffA\x01<\x01=\x015\x01\xff\xff>\x01A\x01A\x01@\x01\xff\xff\xff\xffC\x01C\x01\xff\xffB\x01C\x01B\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffB\x01B\x01\xff\xffA\x01D\x01D\x01\xff\xff\xff\xffD\x01\xff\xff6\x01\xff\xffC\x01\xff\xffC\x01\xff\xff\xff\xff\xff\xff\xff\xffB\x01C\x01C\x017\x01\xff\xff\xff\xff?\x01\xff\xffD\x01\xff\xffD\x01E\x01E\x01\xff\xff\xff\xffE\x01D\x01D\x01\xff\xff\xff\xffC\x01\xff\xff\xff\xff\xff\xffF\x01F\x01\xff\xff\xff\xffF\x01\xff\xff\xff\xff\xff\xff8\x01A\x01E\x01D\x01E\x01G\x01G\x01\xff\xff\xff\xffG\x01E\x01E\x01\xff\xff\xff\xff:\x01F\x01\xff\xffF\x01H\x01H\x01\xff\xff\xff\xffH\x01F\x01F\x01\xff\xff9\x01\xff\xffG\x01E\x01G\x01I\x01I\x01\xff\xff\xff\xffI\x01G\x01G\x01\xff\xff\xff\xff;\x01H\x01F\x01H\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffH\x01H\x01\xff\xff\xff\xff\xff\xffI\x01G\x01I\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffI\x01I\x01\xff\xff\xff\xff\xff\xffE\x01H\x01<\x01\xff\xffJ\x01J\x01\xff\xff\xff\xffJ\x01\xff\xff\xff\xff\xff\xff\xff\xff=\x01I\x01\xff\xffF\x01\xff\xff>\x01\xff\xffK\x01K\x01\xff\xff\xff\xffK\x01\xff\xff\xff\xffJ\x01\xff\xffJ\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffJ\x01J\x01\xff\xff\xff\xff\xff\xffH\x01\xff\xff\xff\xffK\x01\xff\xffK\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffK\x01K\x01?\x01J\x01L\x01L\x01\xff\xff\xff\xffL\x01M\x01M\x01\xff\xff\xff\xffM\x01@\x01\xff\xff\xff\xff\xff\xffI\x01K\x01N\x01N\x01\xff\xff\xff\xffN\x01\xff\xff\xff\xffL\x01\xff\xffL\x01\xff\xffA\x01M\x01\xff\xffM\x01L\x01L\x01\xff\xff\xff\xff\xff\xffM\x01M\x01\xff\xffN\x01\xff\xffN\x01\xff\xffB\x01\xff\xff\xff\xff\xff\xffN\x01N\x01\xff\xffL\x01J\x01O\x01O\x01\xff\xffM\x01O\x01P\x01P\x01\xff\xff\xff\xffP\x01\xff\xffC\x01\xff\xff\xff\xffN\x01\xff\xff\xff\xff\xff\xffK\x01\xff\xff\xff\xff\xff\xff\xff\xffO\x01\xff\xffO\x01D\x01\xff\xffP\x01\xff\xffP\x01O\x01O\x01\xff\xff\xff\xff\xff\xffP\x01P\x01Q\x01Q\x01L\x01\xff\xffQ\x01R\x01R\x01\xff\xff\xff\xffR\x01\xff\xff\xff\xffO\x01\xff\xffE\x01\xff\xff\xff\xffP\x01\xff\xff\xff\xffS\x01S\x01\xff\xffQ\x01S\x01Q\x01\xff\xffF\x01R\x01\xff\xffR\x01Q\x01Q\x01N\x01\xff\xff\xff\xffR\x01R\x01\xff\xff\xff\xffG\x01\xff\xff\xff\xffS\x01\xff\xffS\x01\xff\xff\xff\xff\xff\xff\xff\xffQ\x01S\x01S\x01H\x01\xff\xffR\x01\xff\xff\xff\xffT\x01T\x01\xff\xff\xff\xffT\x01\xff\xff\xff\xff\xff\xffI\x01\xff\xffU\x01U\x01S\x01\xff\xffU\x01V\x01V\x01\xff\xff\xff\xffV\x01\xff\xff\xff\xff\xff\xffT\x01\xff\xffT\x01\xff\xff\xff\xff\xff\xff\xff\xffQ\x01T\x01T\x01U\x01\xff\xffU\x01Q\x01\xff\xffV\x01\xff\xffV\x01U\x01U\x01\xff\xff\xff\xff\xff\xffV\x01V\x01J\x01\xff\xffT\x01\xff\xffR\x01W\x01W\x01\xff\xff\xff\xffW\x01X\x01X\x01U\x01\xff\xffX\x01\xff\xffK\x01V\x01\xff\xff\xff\xff\xff\xff\xff\xffY\x01Y\x01\xff\xff\xff\xffY\x01\xff\xffW\x01\xff\xffW\x01\xff\xff\xff\xffX\x01\xff\xffX\x01W\x01W\x01\xff\xffZ\x01Z\x01X\x01X\x01Z\x01T\x01Y\x01\xff\xffY\x01\xff\xff\xff\xff\xff\xffL\x01\xff\xffY\x01Y\x01W\x01M\x01\xff\xff\xff\xff\xff\xffX\x01\xff\xffZ\x01\xff\xffZ\x01[\x01[\x01N\x01U\x01[\x01Z\x01Z\x01Y\x01\xff\xffV\x01\\\x01\\\x01\xff\xff\xff\xff\\\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff[\x01Z\x01[\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff[\x01[\x01\\\x01\xff\xff\\\x01X\x01\xff\xffO\x01\xff\xff\xff\xff\\\x01\\\x01P\x01\xff\xff\xff\xff\xff\xff\xff\xff]\x01]\x01[\x01\xff\xff]\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\\\x01^\x01^\x01Y\x01\xff\xff^\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff]\x01\xff\xff]\x01_\x01_\x01Q\x01\xff\xff_\x01]\x01]\x01R\x01\xff\xff\xff\xff^\x01\xff\xff^\x01\xff\xff\xff\xff\xff\xff`\x01`\x01^\x01^\x01`\x01\xff\xffS\x01_\x01]\x01_\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff_\x01_\x01\xff\xff\xff\xff\xff\xff\xff\xff^\x01\\\x01`\x01\xff\xff`\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff`\x01`\x01\xff\xff_\x01\xff\xff\xff\xff\xff\xffa\x01a\x01\xff\xff\xff\xffa\x01\xff\xffT\x01\xff\xff\xff\xff\xff\xffb\x01b\x01`\x01\xff\xffb\x01\xff\xffU\x01\xff\xff\xff\xff\xff\xff\xff\xffV\x01]\x01a\x01\xff\xffa\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffa\x01a\x01b\x01\xff\xffb\x01\xff\xff\xff\xff^\x01\xff\xff\xff\xffb\x01b\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffc\x01c\x01a\x01\xff\xffc\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffW\x01b\x01\xff\xff\xff\xff\xff\xffX\x01d\x01d\x01\xff\xff\xff\xffd\x01`\x01c\x01\xff\xffc\x01\xff\xff\xff\xffY\x01\xff\xff\xff\xffc\x01c\x01e\x01e\x01\xff\xff\xff\xffe\x01\xff\xff\xff\xffd\x01\xff\xffd\x01f\x01f\x01Z\x01\xff\xfff\x01d\x01d\x01c\x01\xff\xffb\x01a\x01\xff\xff\xff\xffe\x01\xff\xffe\x01g\x01g\x01\xff\xff\xff\xffg\x01e\x01e\x01f\x01d\x01f\x01\xff\xff\xff\xff[\x01h\x01h\x01f\x01f\x01h\x01\xff\xff\xff\xff\xff\xff\xff\xff\\\x01g\x01e\x01g\x01i\x01i\x01\xff\xff\xff\xffi\x01g\x01g\x01\xff\xfff\x01\xff\xffh\x01\xff\xffh\x01j\x01j\x01\xff\xff\xff\xffj\x01h\x01h\x01\xff\xff\xff\xff\xff\xffi\x01g\x01i\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffi\x01i\x01\xff\xff]\x01\xff\xffj\x01h\x01j\x01\xff\xff\xff\xff\xff\xff\xff\xffd\x01j\x01j\x01\xff\xff^\x01\xff\xffe\x01i\x01\xff\xffk\x01k\x01\xff\xff\xff\xffk\x01f\x01\xff\xff\xff\xff_\x01\xff\xff\xff\xffj\x01\xff\xffl\x01l\x01\xff\xff\xff\xffl\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffk\x01`\x01k\x01m\x01m\x01\xff\xff\xff\xffm\x01k\x01k\x01\xff\xff\xff\xff\xff\xffl\x01\xff\xffl\x01\xff\xff\xff\xff\xff\xffn\x01n\x01l\x01l\x01n\x01\xff\xff\xff\xffm\x01k\x01m\x01o\x01o\x01\xff\xff\xff\xffo\x01m\x01m\x01\xff\xff\xff\xffj\x01a\x01l\x01\xff\xffn\x01\xff\xffn\x01\xff\xff\xff\xff\xff\xff\xff\xffb\x01n\x01n\x01o\x01m\x01o\x01\xff\xff\xff\xff\xff\xffp\x01p\x01o\x01o\x01p\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffn\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffo\x01\xff\xffp\x01\xff\xffp\x01q\x01q\x01k\x01c\x01q\x01p\x01p\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffp\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffd\x01m\x01\xff\xffq\x01p\x01q\x01r\x01r\x01\xff\xff\xff\xffr\x01q\x01q\x01\xff\xff\xff\xff\xff\xffe\x01o\x01\xff\xff\xff\xff\xff\xff\xff\xffn\x01\xff\xff\xff\xff\xff\xfff\x01\xff\xff\xff\xffr\x01q\x01r\x01\xff\xff\xff\xff\xff\xffs\x01s\x01r\x01r\x01s\x01t\x01t\x01g\x01\xff\xfft\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffr\x01\xff\xff\xff\xff\xff\xffh\x01r\x01\xff\xffs\x01\xff\xffs\x01\xff\xff\xff\xfft\x01\xff\xfft\x01s\x01s\x01i\x01\xff\xff\xff\xfft\x01t\x01q\x01\xff\xffu\x01u\x01\xff\xffs\x01u\x01\xff\xffj\x01\xff\xff\xff\xff\xff\xffs\x01\xff\xffv\x01v\x01\xff\xfft\x01v\x01w\x01w\x01\xff\xff\xff\xffw\x01\xff\xffu\x01\xff\xffu\x01\xff\xff\xff\xff\xff\xffx\x01x\x01u\x01u\x01x\x01\xff\xffv\x01\xff\xffv\x01\xff\xff\xff\xffw\x01\xff\xffw\x01v\x01v\x01k\x01\xff\xff\xff\xffw\x01w\x01u\x01\xff\xffx\x01\xff\xffx\x01\xff\xff\xff\xff\xff\xffl\x01\xff\xffx\x01x\x01v\x01\xff\xff\xff\xff\xff\xff\xff\xffw\x01y\x01y\x01\xff\xffm\x01y\x01z\x01z\x01\xff\xff\xff\xffz\x01\xff\xffx\x01\xff\xff\xff\xff\xff\xff\xff\xff{\x01{\x01\xff\xffn\x01{\x01\xff\xff\xff\xffy\x01\xff\xffy\x01\xff\xff\xff\xffz\x01o\x01z\x01y\x01y\x01\xff\xff\xff\xff\xff\xffz\x01z\x01\xff\xff{\x01\xff\xff{\x01|\x01|\x01\xff\xff\xff\xff|\x01{\x01{\x01\xff\xffy\x01\xff\xff\xff\xff\xff\xff\xff\xffz\x01\xff\xffx\x01p\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff|\x01{\x01|\x01}\x01}\x01\xff\xff\xff\xff}\x01|\x01|\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff~\x01~\x01q\x01\xff\xff~\x01\xff\xff\xff\xff\xff\xff\xff\xff}\x01|\x01}\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff}\x01}\x01y\x01\x7f\x01\x7f\x01\xff\xff~\x01\x7f\x01~\x01{\x01\xff\xffr\x01\xff\xffz\x01~\x01~\x01\xff\xff\xff\xff\xff\xff}\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7f\x01\xff\xff\x7f\x01\xff\xff\xff\xff\xff\xff\xff\xff~\x01\x7f\x01\x7f\x01\xff\xff\x80\x01\x80\x01\xff\xffs\x01\x80\x01\xff\xff\xff\xff\xff\xfft\x01\xff\xff\xff\xff|\x01\xff\xff\xff\xff\x81\x01\x81\x01\x7f\x01\xff\xff\x81\x01\xff\xff\xff\xff\xff\xff\xff\xff\x80\x01\xff\xff\x80\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x01\x80\x01\xff\xff\xff\xff}\x01\xff\xff\x81\x01\xff\xff\x81\x01\xff\xff\xff\xff\xff\xffu\x01\xff\xff\x81\x01\x81\x01\xff\xff\xff\xff\xff\xff\x80\x01~\x01\x81\x01\x82\x01\x82\x01v\x01\xff\xff\x82\x01\x7f\x01\xff\xffw\x01\xff\xff\xff\xff\xff\xff\x81\x01\xff\xff\xff\xff\x83\x01\x83\x01\xff\xff\xff\xff\x83\x01x\x01\xff\xff\xff\xff\xff\xff\x82\x01\xff\xff\x82\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x82\x01\x82\x01\xff\xff\x84\x01\x84\x01\xff\xff\x83\x01\x84\x01\x83\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x83\x01\x83\x01\x85\x01\x85\x01\xff\xff\x82\x01\x85\x01\xff\xff\xff\xff\x80\x01\xff\xff\x83\x01\x84\x01y\x01\x84\x01\xff\xff\xff\xff\xff\xffz\x01\x83\x01\x84\x01\x84\x01\x86\x01\x86\x01\xff\xff\x85\x01\x86\x01\x85\x01\xff\xff{\x01\x84\x01\xff\xff\xff\xff\x85\x01\x85\x01\xff\xff\xff\xff\x87\x01\x87\x01\x84\x01\xff\xff\x87\x01\x88\x01\x88\x01\xff\xff\x86\x01\x88\x01\x86\x01\xff\xff\xff\xff\xff\xff\x82\x01\x85\x01\x86\x01\x86\x01|\x01\xff\xff\x89\x01\x89\x01\x86\x01\x87\x01\x89\x01\x87\x01\xff\xff\xff\xff\x88\x01\xff\xff\x88\x01\x87\x01\x87\x01\xff\xff\xff\xff\x86\x01\x88\x01\x88\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x89\x01}\x01\x89\x01\xff\xff\xff\xff\xff\xff\xff\xff\x87\x01\x89\x01\x89\x01\xff\xff\xff\xff\x88\x01\xff\xff\xff\xff~\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x8a\x01\x8a\x01\xff\xff\xff\xff\x8a\x01\xff\xff\x89\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7f\x01\x8b\x01\x8b\x01\xff\xff\xff\xff\x8b\x01\xff\xff\xff\xff\xff\xff\x8a\x01\x87\x01\x8a\x01\x87\x01\x87\x01\x87\x01\x87\x01\x87\x01\x8a\x01\x8a\x01\x88\x01\xff\xff\x87\x01\x87\x01\x87\x01\x8b\x01\x87\x01\x8b\x01\x87\x01\x87\x01\x87\x01\xff\xff\xff\xff\x8b\x01\x8b\x01\x80\x01\xff\xff\x8a\x01\xff\xff\x8c\x01\x8c\x01\xff\xff\xff\xff\x8c\x01\xff\xff\xff\xff\xff\xff\xff\xff\x89\x01\x81\x01\x8d\x01\x8d\x01\x8b\x01\xff\xff\x8d\x01\x8e\x01\x8e\x01\xff\xff\xff\xff\x8e\x01\xff\xff\xff\xff\x8c\x01\xff\xff\x8c\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x8c\x01\x8c\x01\xff\xff\x8d\x01\xff\xff\x8d\x01\xff\xff\xff\xff\x8e\x01\xff\xff\x8e\x01\x8d\x01\x8d\x01\x8a\x01\xff\xff\xff\xff\x8e\x01\x8e\x01\x82\x01\x8c\x01\xff\xff\xff\xff\x8f\x01\x8f\x01\xff\xff\xff\xff\x8f\x01\xff\xff\xff\xff\xff\xff\x8d\x01\xff\xff\x83\x01\xff\xff\x8b\x01\x8e\x01\x90\x01\x90\x01\xff\xff\xff\xff\x90\x01\xff\xff\xff\xff\xff\xff\xff\xff\x8f\x01\xff\xff\x8f\x01\xff\xff\xff\xff\xff\xff\xff\xff\x84\x01\x8f\x01\x8f\x01\xff\xff\x91\x01\x91\x01\xff\xff\x90\x01\x91\x01\x90\x01\xff\xff\xff\xff\xff\xff\x85\x01\xff\xff\x90\x01\x90\x01\x8c\x01\xff\xff\xff\xff\x8f\x01\xff\xff\x90\x01\xff\xff\x92\x01\x92\x01\xff\xff\x91\x01\x92\x01\x91\x01\x8d\x01\xff\xff\xff\xff\x86\x01\x90\x01\x91\x01\x91\x01\xff\xff\x93\x01\x93\x01\x8e\x01\xff\xff\x93\x01\xff\xff\xff\xff\xff\xff\xff\xff\x92\x01\x87\x01\x92\x01\xff\xff\xff\xff\xff\xff\x88\x01\x91\x01\x92\x01\x92\x01\xff\xff\xff\xff\xff\xff\xff\xff\x93\x01\x8f\x01\x93\x01\xff\xff\xff\xff\x92\x01\xff\xff\x89\x01\x93\x01\x93\x01\x94\x01\x94\x01\xff\xff\x92\x01\x94\x01\x95\x01\x95\x01\xff\xff\x93\x01\x95\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x96\x01\x96\x01\x93\x01\xff\xff\x96\x01\x97\x01\x97\x01\xff\xff\x94\x01\x97\x01\x94\x01\x91\x01\xff\xff\x95\x01\xff\xff\x95\x01\x94\x01\x94\x01\xff\xff\xff\xff\xff\xff\x95\x01\x95\x01\x96\x01\xff\xff\x96\x01\x8a\x01\xff\xff\x97\x01\xff\xff\x97\x01\x96\x01\x96\x01\xff\xff\xff\xff\x94\x01\x97\x01\x97\x01\x98\x01\x98\x01\x95\x01\x8b\x01\x98\x01\x99\x01\x99\x01\xff\xff\xff\xff\x99\x01\x9a\x01\x9a\x01\x96\x01\xff\xff\x9a\x01\xff\xff\xff\xff\x97\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x98\x01\xff\xff\x98\x01\xff\xff\xff\xff\x99\x01\xff\xff\x99\x01\x98\x01\x98\x01\x9a\x01\xff\xff\x9a\x01\x99\x01\x99\x01\xff\xff\xff\xff\x8c\x01\x9a\x01\x9a\x01\xff\xff\xff\xff\x9b\x01\x9b\x01\xff\xff\x95\x01\x9b\x01\x98\x01\x8d\x01\xff\xff\xff\xff\xff\xff\x99\x01\x8e\x01\xff\xff\xff\xff\xff\xff\x9a\x01\xff\xff\xff\xff\x96\x01\xff\xff\x9c\x01\x9c\x01\xff\xff\x9b\x01\x9c\x01\x9b\x01\xff\xff\xff\xff\xff\xff\x97\x01\xff\xff\x9b\x01\x9b\x01\xff\xff\xff\xff\x9d\x01\x9d\x01\xff\xff\xff\xff\x9d\x01\xff\xff\xff\xff\xff\xff\x9c\x01\xff\xff\x9c\x01\xff\xff\x98\x01\x8f\x01\xff\xff\x9b\x01\x9c\x01\x9c\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x9d\x01\xff\xff\x9d\x01\xff\xff\x90\x01\xff\xff\xff\xff\x99\x01\x9d\x01\x9d\x01\x9a\x01\xff\xff\x9c\x01\xff\xff\x9e\x01\x9e\x01\xff\xff\xff\xff\x9e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x91\x01\x9f\x01\x9f\x01\x9d\x01\xff\xff\x9f\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x9e\x01\xff\xff\x9e\x01\xff\xff\xff\xff\xff\xff\xff\xff\x92\x01\x9e\x01\x9e\x01\x9b\x01\x9f\x01\xff\xff\x9f\x01\xff\xff\x9e\x01\xff\xff\x9c\x01\xff\xff\x9f\x01\x9f\x01\x93\x01\xff\xff\xff\xff\xff\xff\xa0\x01\xa0\x01\x9e\x01\xff\xff\xa0\x01\xa1\x01\xa1\x01\xff\xff\xff\xff\xa1\x01\xa2\x01\xa2\x01\xff\xff\x9f\x01\xa2\x01\xa3\x01\xa3\x01\xff\xff\xff\xff\xa3\x01\xff\xff\xff\xff\x9d\x01\xa0\x01\xff\xff\xa0\x01\xff\xff\xff\xff\xa1\x01\x94\x01\xa1\x01\xa0\x01\xa0\x01\xa2\x01\x95\x01\xa2\x01\xa1\x01\xa1\x01\xa3\x01\xff\xff\xa3\x01\xa2\x01\xa2\x01\xff\xff\x96\x01\xa0\x01\xa3\x01\xa3\x01\xa1\x01\x97\x01\xa0\x01\xff\xff\xa4\x01\xa4\x01\xff\xff\xa1\x01\xa4\x01\xff\xff\xff\xff\x9f\x01\xa2\x01\xff\xff\xff\xff\xa5\x01\xa5\x01\xa3\x01\xff\xff\xa5\x01\xa6\x01\xa6\x01\xff\xff\xff\xff\xa6\x01\xff\xff\xff\xff\xa4\x01\xff\xff\xa4\x01\xff\xff\xff\xff\xff\xff\xff\xff\x98\x01\xa4\x01\xa4\x01\xff\xff\xa5\x01\x99\x01\xa5\x01\xff\xff\xff\xff\xa6\x01\x9a\x01\xa6\x01\xa5\x01\xa5\x01\xff\xff\xff\xff\xff\xff\xa6\x01\xa6\x01\xff\xff\xa4\x01\xa7\x01\xa7\x01\xa3\x01\xff\xff\xa7\x01\xa8\x01\xa8\x01\xff\xff\xff\xff\xa8\x01\xa5\x01\xff\xff\xff\xff\xff\xff\xff\xff\xa6\x01\xff\xff\xa9\x01\xa9\x01\xff\xff\xff\xff\xa9\x01\xff\xff\xa7\x01\x9b\x01\xa7\x01\xff\xff\xff\xff\xa8\x01\xff\xff\xa8\x01\xa7\x01\xa7\x01\xff\xff\xff\xff\xff\xff\xa8\x01\xa8\x01\xff\xff\xff\xff\xa9\x01\xff\xff\xa9\x01\xff\xff\x9c\x01\xff\xff\xff\xff\xff\xff\xa9\x01\xa9\x01\xa7\x01\xff\xff\xaa\x01\xaa\x01\xff\xff\xa8\x01\xaa\x01\xff\xff\xff\xff\x9d\x01\xff\xff\xa6\x01\xff\xff\xff\xff\xff\xff\xff\xff\xa5\x01\xa9\x01\xab\x01\xab\x01\xff\xff\xff\xff\xab\x01\xff\xff\xff\xff\xaa\x01\xff\xff\xaa\x01\xac\x01\xac\x01\xff\xff\xff\xff\xac\x01\xaa\x01\xaa\x01\xff\xff\xff\xff\xff\xff\xad\x01\xad\x01\xff\xff\xab\x01\xad\x01\xab\x01\xff\xff\xff\xff\x9e\x01\xff\xff\xa8\x01\xab\x01\xab\x01\xac\x01\xaa\x01\xac\x01\xff\xff\xff\xff\xff\xff\x9f\x01\xff\xff\xac\x01\xac\x01\xad\x01\xa7\x01\xad\x01\xff\xff\xff\xff\xff\xff\xff\xff\xab\x01\xad\x01\xad\x01\xff\xff\xff\xff\xff\xff\xff\xff\xa9\x01\xff\xff\xff\xff\xac\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xad\x01\xae\x01\xae\x01\xff\xff\xff\xff\xae\x01\xa0\x01\xff\xff\xff\xff\xff\xff\xff\xff\xa1\x01\xff\xff\xff\xff\xff\xff\xaa\x01\xa2\x01\xff\xff\xaf\x01\xaf\x01\xab\x01\xa3\x01\xaf\x01\xff\xff\xae\x01\xff\xff\xae\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xae\x01\xae\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xaf\x01\xff\xff\xaf\x01\xad\x01\xff\xff\xff\xff\xff\xff\xff\xff\xaf\x01\xaf\x01\xae\x01\xff\xff\xb0\x01\xb0\x01\xff\xff\xff\xff\xb0\x01\xa4\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xaf\x01\xa5\x01\xaf\x01\xff\xff\xff\xff\xff\xff\xa6\x01\xff\xff\xb0\x01\xff\xff\xb0\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xb0\x01\xb0\x01\xff\xff\xb5\x01\xb5\x01\xff\xff\xff\xff\xb5\x01\xb0\x01\xb0\x01\xb0\x01\xb0\x01\xb0\x01\xb0\x01\xb0\x01\xb0\x01\xb0\x01\xb0\x01\xae\x01\xb0\x01\xb1\x01\xb1\x01\xff\xff\xff\xff\xb1\x01\xa7\x01\xb5\x01\xff\xff\xb5\x01\xff\xff\xa8\x01\xff\xff\xff\xff\xff\xff\xb5\x01\xb5\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xa9\x01\xb1\x01\xff\xff\xb1\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xb1\x01\xb1\x01\xb5\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xb1\x01\xb1\x01\xb1\x01\xb1\x01\xb1\x01\xb1\x01\xb1\x01\xb1\x01\xb1\x01\xb1\x01\xff\xff\xb1\x01\xff\xff\xff\xff\xff\xff\xff\xff\xb2\x01\xb2\x01\xaa\x01\xff\xff\xb2\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xab\x01\xff\xff\xb5\x01\xff\xff\xff\xff\xb2\x01\xff\xff\xb2\x01\xb3\x01\xb3\x01\xac\x01\xff\xff\xb3\x01\xb2\x01\xb2\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xad\x01\xb2\x01\xb2\x01\xb2\x01\xb2\x01\xb2\x01\xb2\x01\xb2\x01\xb2\x01\xb2\x01\xb2\x01\xb3\x01\xb2\x01\xb3\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xb3\x01\xb3\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xb3\x01\xb3\x01\xb3\x01\xb3\x01\xb3\x01\xb3\x01\xb3\x01\xb3\x01\xb3\x01\xb3\x01\xff\xff\xb3\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xb3\x01\xb3\x01\xb3\x01\xb3\x01\xb3\x01\xb3\x01\xff\xff\xae\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xaf\x01\xff\xff\xb4\x01\xb4\x01\xff\xff\xb2\x01\xb4\x01\xff\xff\xb3\x01\xb3\x01\xb3\x01\xb3\x01\xb3\x01\xb3\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xb4\x01\xff\xff\xb4\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xb4\x01\xb4\x01\xb0\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xff\xff\xb4\x01\xb6\x01\xb6\x01\xff\xff\xff\xff\xb6\x01\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xb5\x01\xff\xff\xff\xff\xff\xff\xb7\x01\xb7\x01\xff\xff\xb6\x01\xb7\x01\xb6\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xb6\x01\xb6\x01\xb1\x01\xff\xff\xff\xff\xff\xff\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xb4\x01\xb7\x01\xff\xff\xb7\x01\xff\xff\xff\xff\xff\xff\xff\xff\xb6\x01\xb7\x01\xb7\x01\xb8\x01\xb8\x01\xff\xff\xff\xff\xb8\x01\xb9\x01\xb9\x01\xff\xff\xff\xff\xb9\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xba\x01\xba\x01\xb7\x01\xff\xff\xba\x01\xff\xff\xff\xff\xff\xff\xb8\x01\xff\xff\xb8\x01\xff\xff\xff\xff\xb9\x01\xff\xff\xb9\x01\xb8\x01\xb8\x01\xff\xff\xff\xff\xb2\x01\xb9\x01\xb9\x01\xba\x01\xff\xff\xba\x01\xbb\x01\xbb\x01\xff\xff\xff\xff\xbb\x01\xba\x01\xba\x01\xff\xff\xff\xff\xb8\x01\xff\xff\xb6\x01\xbc\x01\xbc\x01\xb9\x01\xff\xff\xbc\x01\xbd\x01\xbd\x01\xff\xff\xb3\x01\xbd\x01\xff\xff\xbb\x01\xba\x01\xbb\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbb\x01\xbb\x01\xb7\x01\xff\xff\xbc\x01\xff\xff\xbc\x01\xff\xff\xff\xff\xbd\x01\xff\xff\xbd\x01\xbc\x01\xbc\x01\xb8\x01\xff\xff\xff\xff\xbd\x01\xbd\x01\xbb\x01\xbe\x01\xbe\x01\xff\xff\xff\xff\xbe\x01\xb9\x01\xff\xff\xff\xff\xff\xff\xb9\x01\xff\xff\xbc\x01\xff\xff\xb9\x01\xff\xff\xff\xff\xbd\x01\xff\xff\xb9\x01\xff\xff\xb9\x01\xb9\x01\xff\xff\xbe\x01\xff\xff\xbe\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbe\x01\xbe\x01\xff\xff\xba\x01\xff\xff\xff\xff\xbf\x01\xbf\x01\xff\xff\xff\xff\xbf\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x01\xc0\x01\xbe\x01\xb4\x01\xc0\x01\xbc\x01\xbb\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbf\x01\xff\xff\xbf\x01\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x01\xbf\x01\xbf\x01\xff\xff\xc0\x01\xff\xff\xc0\x01\xc1\x01\xc1\x01\xff\xff\xff\xff\xc1\x01\xc0\x01\xc0\x01\xff\xff\xff\xff\xff\xff\xc2\x01\xc2\x01\xff\xff\xbf\x01\xc2\x01\xc3\x01\xc3\x01\xff\xff\xff\xff\xc3\x01\xff\xff\xff\xff\xff\xff\xc1\x01\xc0\x01\xc1\x01\xff\xff\xbe\x01\xb6\x01\xff\xff\xff\xff\xc1\x01\xc1\x01\xc2\x01\xff\xff\xc2\x01\xff\xff\xff\xff\xc3\x01\xff\xff\xc3\x01\xc2\x01\xc2\x01\xff\xff\xff\xff\xff\xff\xc3\x01\xc3\x01\xb7\x01\xff\xff\xc1\x01\xbf\x01\xc4\x01\xc4\x01\xff\xff\xff\xff\xc4\x01\xc5\x01\xc5\x01\xff\xff\xc2\x01\xc5\x01\xff\xff\xff\xff\xff\xff\xc3\x01\xff\xff\xc6\x01\xc6\x01\xff\xff\xff\xff\xc6\x01\xff\xff\xc0\x01\xff\xff\xc4\x01\xff\xff\xc4\x01\xff\xff\xff\xff\xc5\x01\xb8\x01\xc5\x01\xc4\x01\xc4\x01\xff\xff\xb9\x01\xff\xff\xc5\x01\xc5\x01\xc6\x01\xff\xff\xc6\x01\xc1\x01\xff\xff\xff\xff\xba\x01\xff\xff\xc6\x01\xc6\x01\xc7\x01\xc7\x01\xc4\x01\xff\xff\xc7\x01\xc8\x01\xc8\x01\xc5\x01\xff\xff\xc8\x01\xc9\x01\xc9\x01\xc2\x01\xff\xff\xc9\x01\xff\xff\xff\xff\xc6\x01\xff\xff\xff\xff\xc3\x01\xff\xff\xbb\x01\xc7\x01\xff\xff\xc7\x01\xff\xff\xff\xff\xc8\x01\xff\xff\xc8\x01\xc7\x01\xc7\x01\xc9\x01\xbc\x01\xc9\x01\xc8\x01\xc8\x01\xff\xff\xbd\x01\xff\xff\xc9\x01\xc9\x01\xca\x01\xca\x01\xff\xff\xff\xff\xca\x01\xff\xff\xc5\x01\xc7\x01\xff\xff\xc4\x01\xcb\x01\xcb\x01\xc8\x01\xff\xff\xcb\x01\xc6\x01\xff\xff\xc9\x01\xff\xff\xff\xff\xcc\x01\xcc\x01\xff\xff\xca\x01\xcc\x01\xca\x01\xff\xff\xff\xff\xff\xff\xff\xff\xbe\x01\xca\x01\xca\x01\xcb\x01\xff\xff\xcb\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xcb\x01\xcb\x01\xcc\x01\xff\xff\xcc\x01\xff\xff\xff\xff\xff\xff\xff\xff\xca\x01\xcc\x01\xcc\x01\xff\xff\xff\xff\xc9\x01\xff\xff\xcd\x01\xcd\x01\xff\xff\xcb\x01\xcd\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbf\x01\xff\xff\xff\xff\xcc\x01\xc8\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x01\xff\xff\xcd\x01\xff\xff\xcd\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xcd\x01\xcd\x01\xce\x01\xce\x01\xff\xff\xff\xff\xce\x01\xff\xff\xff\xff\xff\xff\xff\xff\xca\x01\xff\xff\xcf\x01\xcf\x01\xff\xff\xc1\x01\xcf\x01\xcb\x01\xcd\x01\xff\xff\xff\xff\xff\xff\xcc\x01\xff\xff\xce\x01\xc2\x01\xce\x01\xd0\x01\xd0\x01\xff\xff\xc3\x01\xd0\x01\xce\x01\xce\x01\xff\xff\xcf\x01\xff\xff\xcf\x01\xd1\x01\xd1\x01\xff\xff\xff\xff\xd1\x01\xcf\x01\xcf\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xd0\x01\xce\x01\xd0\x01\xd2\x01\xd2\x01\xff\xff\xff\xff\xd2\x01\xd0\x01\xd0\x01\xff\xff\xd1\x01\xcf\x01\xd1\x01\xd3\x01\xd3\x01\xff\xff\xc4\x01\xd3\x01\xd1\x01\xd1\x01\xff\xff\xc5\x01\xff\xff\xff\xff\xff\xff\xd2\x01\xd0\x01\xd2\x01\xff\xff\xff\xff\xff\xff\xc6\x01\xff\xff\xd2\x01\xd2\x01\xff\xff\xd3\x01\xd1\x01\xd3\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xd3\x01\xd3\x01\xff\xff\xd4\x01\xd4\x01\xce\x01\xff\xff\xd4\x01\xd2\x01\xff\xff\xff\xff\xff\xff\xff\xff\xcf\x01\xff\xff\xff\xff\xff\xff\xd5\x01\xd5\x01\xd3\x01\xc7\x01\xd5\x01\xff\xff\xff\xff\xff\xff\xc8\x01\xd4\x01\xff\xff\xd4\x01\xff\xff\xc9\x01\xff\xff\xff\xff\xd0\x01\xd4\x01\xd4\x01\xff\xff\xff\xff\xff\xff\xff\xff\xd5\x01\xd1\x01\xd5\x01\xd6\x01\xd6\x01\xff\xff\xd2\x01\xd6\x01\xd5\x01\xd5\x01\xff\xff\xff\xff\xff\xff\xd4\x01\xff\xff\xd7\x01\xd7\x01\xff\xff\xd3\x01\xd7\x01\xff\xff\xff\xff\xff\xff\xca\x01\xff\xff\xff\xff\xd6\x01\xd5\x01\xd6\x01\xff\xff\xff\xff\xff\xff\xff\xff\xcb\x01\xd6\x01\xd6\x01\xff\xff\xff\xff\xd7\x01\xff\xff\xd7\x01\xd8\x01\xd8\x01\xcc\x01\xff\xff\xd8\x01\xd7\x01\xd7\x01\xff\xff\xff\xff\xff\xff\xd9\x01\xd9\x01\xd6\x01\xff\xff\xd9\x01\xda\x01\xda\x01\xff\xff\xff\xff\xda\x01\xff\xff\xd4\x01\xff\xff\xd8\x01\xd7\x01\xd8\x01\xdb\x01\xdb\x01\xd5\x01\xff\xff\xdb\x01\xd8\x01\xd8\x01\xd9\x01\xff\xff\xd9\x01\xff\xff\xff\xff\xda\x01\xcd\x01\xda\x01\xd9\x01\xd9\x01\xff\xff\xff\xff\xff\xff\xda\x01\xda\x01\xff\xff\xdb\x01\xd8\x01\xdb\x01\xff\xff\xff\xff\xff\xff\xdc\x01\xdc\x01\xdb\x01\xdb\x01\xdc\x01\xd9\x01\xff\xff\xff\xff\xff\xff\xff\xff\xda\x01\xff\xff\xff\xff\xff\xff\xdd\x01\xdd\x01\xff\xff\xce\x01\xdd\x01\xff\xff\xff\xff\xdb\x01\xff\xff\xdc\x01\xff\xff\xdc\x01\xd7\x01\xff\xff\xcf\x01\xff\xff\xff\xff\xdc\x01\xdc\x01\xff\xff\xff\xff\xff\xff\xff\xff\xdd\x01\xff\xff\xdd\x01\xff\xff\xff\xff\xff\xff\xd0\x01\xff\xff\xdd\x01\xdd\x01\xde\x01\xde\x01\xff\xff\xdc\x01\xde\x01\xff\xff\xd8\x01\xd1\x01\xff\xff\xff\xff\xdb\x01\xff\xff\xff\xff\xd9\x01\xda\x01\xdf\x01\xdf\x01\xdd\x01\xff\xff\xdf\x01\xff\xff\xff\xff\xd2\x01\xde\x01\xff\xff\xde\x01\xe0\x01\xe0\x01\xff\xff\xff\xff\xe0\x01\xde\x01\xde\x01\xd3\x01\xff\xff\xff\xff\xff\xff\xff\xff\xdf\x01\xff\xff\xdf\x01\xdc\x01\xff\xff\xdc\x01\xff\xff\xff\xff\xdf\x01\xdf\x01\xff\xff\xe0\x01\xde\x01\xe0\x01\xe1\x01\xe1\x01\xff\xff\xff\xff\xe1\x01\xe0\x01\xe0\x01\xff\xff\xff\xff\xff\xff\xe2\x01\xe2\x01\xff\xff\xdf\x01\xe2\x01\xd4\x01\xff\xff\xff\xff\xff\xff\xff\xff\xdd\x01\xff\xff\xff\xff\xe1\x01\xe0\x01\xe1\x01\xff\xff\xff\xff\xff\xff\xd5\x01\xff\xff\xe1\x01\xe1\x01\xe2\x01\xff\xff\xe2\x01\xde\x01\xff\xff\xff\xff\xff\xff\xff\xff\xe2\x01\xe2\x01\xff\xff\xff\xff\xff\xff\xff\xff\xe3\x01\xe3\x01\xff\xff\xe1\x01\xe3\x01\xe4\x01\xe4\x01\xff\xff\xd6\x01\xe4\x01\xe5\x01\xe5\x01\xff\xff\xe2\x01\xe5\x01\xff\xff\xff\xff\xdf\x01\xff\xff\xff\xff\xd7\x01\xff\xff\xff\xff\xe3\x01\xff\xff\xe3\x01\xff\xff\xff\xff\xe4\x01\xe0\x01\xe4\x01\xe3\x01\xe3\x01\xe5\x01\xff\xff\xe5\x01\xe4\x01\xe4\x01\xff\xff\xe6\x01\xe6\x01\xe5\x01\xe5\x01\xe6\x01\xe7\x01\xe7\x01\xd8\x01\xff\xff\xe7\x01\xff\xff\xe3\x01\xff\xff\xff\xff\xff\xff\xe1\x01\xe4\x01\xd9\x01\xff\xff\xff\xff\xe2\x01\xe5\x01\xda\x01\xe6\x01\xff\xff\xe6\x01\xff\xff\xff\xff\xe7\x01\xff\xff\xe7\x01\xe6\x01\xe6\x01\xdb\x01\xe8\x01\xe8\x01\xe7\x01\xe7\x01\xe8\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe9\x01\xe9\x01\xe6\x01\xe3\x01\xe9\x01\xff\xff\xe4\x01\xe7\x01\xff\xff\xe8\x01\xff\xff\xe8\x01\xea\x01\xea\x01\xdc\x01\xff\xff\xea\x01\xe8\x01\xe8\x01\xff\xff\xff\xff\xff\xff\xe5\x01\xe9\x01\xff\xff\xe9\x01\xff\xff\xff\xff\xdd\x01\xff\xff\xff\xff\xe9\x01\xe9\x01\xff\xff\xff\xff\xea\x01\xe8\x01\xea\x01\xe6\x01\xff\xff\xff\xff\xeb\x01\xeb\x01\xea\x01\xea\x01\xeb\x01\xff\xff\xff\xff\xff\xff\xff\xff\xe9\x01\xff\xff\xec\x01\xec\x01\xff\xff\xff\xff\xec\x01\xff\xff\xe7\x01\xff\xff\xff\xff\xde\x01\xea\x01\xff\xff\xeb\x01\xff\xff\xeb\x01\xed\x01\xed\x01\xff\xff\xff\xff\xed\x01\xeb\x01\xeb\x01\xe8\x01\xec\x01\xdf\x01\xec\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xec\x01\xec\x01\xff\xff\xff\xff\xe0\x01\xff\xff\xff\xff\xed\x01\xeb\x01\xed\x01\xee\x01\xee\x01\xff\xff\xff\xff\xee\x01\xed\x01\xed\x01\xff\xff\xe9\x01\xec\x01\xef\x01\xef\x01\xff\xff\xff\xff\xef\x01\xf0\x01\xf0\x01\xff\xff\xff\xff\xf0\x01\xe1\x01\xff\xff\xff\xff\xee\x01\xed\x01\xee\x01\xff\xff\xff\xff\xff\xff\xff\xff\xe2\x01\xee\x01\xee\x01\xef\x01\xff\xff\xef\x01\xff\xff\xff\xff\xf0\x01\xff\xff\xf0\x01\xef\x01\xef\x01\xff\xff\xeb\x01\xff\xff\xf0\x01\xf0\x01\xf1\x01\xf1\x01\xee\x01\xff\xff\xf1\x01\xf2\x01\xf2\x01\xff\xff\xff\xff\xf2\x01\xff\xff\xff\xff\xef\x01\xff\xff\xff\xff\xff\xff\xff\xff\xf0\x01\xec\x01\xe3\x01\xff\xff\xed\x01\xff\xff\xf1\x01\xe4\x01\xf1\x01\xff\xff\xff\xff\xf2\x01\xe5\x01\xf2\x01\xf1\x01\xf1\x01\xff\xff\xf3\x01\xf3\x01\xf2\x01\xf2\x01\xf3\x01\xf4\x01\xf4\x01\xff\xff\xff\xff\xf4\x01\xf5\x01\xf5\x01\xff\xff\xff\xff\xf5\x01\xff\xff\xf1\x01\xff\xff\xee\x01\xff\xff\xef\x01\xf2\x01\xff\xff\xf3\x01\xe6\x01\xf3\x01\xff\xff\xff\xff\xf4\x01\xe7\x01\xf4\x01\xf3\x01\xf3\x01\xf5\x01\xff\xff\xf5\x01\xf4\x01\xf4\x01\xff\xff\xff\xff\xf0\x01\xf5\x01\xf5\x01\xf6\x01\xf6\x01\xff\xff\xff\xff\xf6\x01\xff\xff\xff\xff\xf3\x01\xff\xff\xff\xff\xff\xff\xff\xff\xf4\x01\xff\xff\xff\xff\xe8\x01\xff\xff\xf5\x01\xf2\x01\xf1\x01\xff\xff\xff\xff\xff\xff\xf6\x01\xff\xff\xf6\x01\xf7\x01\xf7\x01\xff\xff\xe9\x01\xf7\x01\xf6\x01\xf6\x01\xff\xff\xff\xff\xff\xff\xf8\x01\xf8\x01\xff\xff\xff\xff\xf8\x01\xea\x01\xff\xff\xf3\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x01\xf6\x01\xf7\x01\xf9\x01\xf9\x01\xff\xff\xf5\x01\xf9\x01\xf7\x01\xf7\x01\xf8\x01\xff\xff\xf8\x01\xff\xff\xf4\x01\xff\xff\xff\xff\xff\xff\xf8\x01\xf8\x01\xff\xff\xeb\x01\xff\xff\xff\xff\xff\xff\xff\xff\xf9\x01\xf7\x01\xf9\x01\xff\xff\xff\xff\xff\xff\xec\x01\xff\xff\xf9\x01\xf9\x01\xff\xff\xf8\x01\xff\xff\xfa\x01\xfa\x01\xff\xff\xff\xff\xfa\x01\xff\xff\xff\xff\xff\xff\xed\x01\xff\xff\xff\xff\xff\xff\xff\xff\xf6\x01\xf9\x01\xfb\x01\xfb\x01\xff\xff\xff\xff\xfb\x01\xfc\x01\xfc\x01\xff\xff\xfa\x01\xfc\x01\xfa\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfa\x01\xfa\x01\xff\xff\xee\x01\xff\xff\xf8\x01\xff\xff\xfb\x01\xff\xff\xfb\x01\xff\xff\xff\xff\xfc\x01\xef\x01\xfc\x01\xfb\x01\xfb\x01\xff\xff\xf0\x01\xfa\x01\xfc\x01\xfc\x01\xfd\x01\xfd\x01\xff\xff\xff\xff\xfd\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfb\x01\xff\xff\xf9\x01\xfe\x01\xfe\x01\xfc\x01\xff\xff\xfe\x01\xff\x01\xff\x01\xff\xff\xfd\x01\xff\x01\xfd\x01\xff\xff\xff\xff\xff\xff\xf1\x01\xff\xff\xfd\x01\xfd\x01\xff\xff\xf2\x01\0\x02\0\x02\xff\xff\xfe\x01\0\x02\xfe\x01\xff\xff\xff\xff\xff\x01\xff\xff\xff\x01\xfe\x01\xfe\x01\xff\xff\xff\xff\xfd\x01\xff\x01\xff\x01\xff\xff\xff\xff\xfc\x01\xff\xff\xfb\x01\0\x02\xff\xff\0\x02\xff\xff\xff\xff\xf3\x01\xff\xff\xfe\x01\0\x02\0\x02\xf4\x01\xff\xff\xff\x01\xff\xff\xff\xff\xf5\x01\xff\xff\xff\xff\xff\xff\xff\xff\x01\x02\x01\x02\xff\xff\xff\xff\x01\x02\xff\xff\xff\xff\0\x02\xff\xff\xff\xff\x02\x02\x02\x02\xff\xff\xff\xff\x02\x02\x03\x02\x03\x02\xff\xff\xff\xff\x03\x02\xff\xff\xff\xff\xff\xff\x01\x02\xff\xff\x01\x02\xff\xff\xff\xff\xf6\x01\xff\xff\xfd\x01\x01\x02\x01\x02\x02\x02\xff\xff\x02\x02\xff\xff\xff\xff\x03\x02\xff\xff\x03\x02\x02\x02\x02\x02\xfe\x01\x04\x02\x04\x02\x03\x02\x03\x02\x04\x02\xff\x01\x01\x02\xff\xff\xff\xff\0\x02\xf7\x01\xff\xff\xff\xff\xff\xff\x05\x02\x05\x02\x02\x02\xff\xff\x05\x02\xff\xff\xf8\x01\x03\x02\xff\xff\x04\x02\xff\xff\x04\x02\xff\xff\xff\xff\xff\xff\x06\x02\x06\x02\x04\x02\x04\x02\x06\x02\x07\x02\x07\x02\xf9\x01\x05\x02\x07\x02\x05\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x05\x02\x05\x02\xff\xff\xff\xff\xff\xff\x04\x02\xff\xff\x06\x02\xff\xff\x06\x02\xff\xff\xff\xff\x07\x02\x01\x02\x07\x02\x06\x02\x06\x02\xff\xff\xff\xff\x05\x02\x07\x02\x07\x02\x02\x02\xff\xff\xff\xff\b\x02\b\x02\xfa\x01\xff\xff\b\x02\xff\xff\xff\xff\xff\xff\xff\xff\x06\x02\xff\xff\t\x02\t\x02\xff\xff\x07\x02\t\x02\xff\xff\xfb\x01\xff\xff\xff\xff\xff\xff\x04\x02\xfc\x01\b\x02\xff\xff\b\x02\n\x02\n\x02\xff\xff\xff\xff\n\x02\b\x02\b\x02\xff\xff\t\x02\xff\xff\t\x02\x0b\x02\x0b\x02\xff\xff\xff\xff\x0b\x02\t\x02\t\x02\x05\x02\xff\xff\xff\xff\xff\xff\xff\xff\n\x02\b\x02\n\x02\xff\xff\xff\xff\xff\xff\xfd\x01\xff\xff\n\x02\n\x02\xff\xff\x0b\x02\t\x02\x0b\x02\f\x02\f\x02\xff\xff\x06\x02\f\x02\x0b\x02\x0b\x02\xfe\x01\xff\xff\xff\xff\r\x02\r\x02\xff\x01\n\x02\r\x02\x0e\x02\x0e\x02\xff\xff\xff\xff\x0e\x02\xff\xff\xff\xff\xff\xff\f\x02\x0b\x02\f\x02\xff\xff\0\x02\xff\xff\xff\xff\xff\xff\f\x02\f\x02\r\x02\xff\xff\r\x02\xff\xff\xff\xff\x0e\x02\b\x02\x0e\x02\r\x02\r\x02\xff\xff\xff\xff\xff\xff\x0e\x02\x0e\x02\xff\xff\xff\xff\f\x02\x0f\x02\x0f\x02\t\x02\xff\xff\x0f\x02\xff\xff\xff\xff\xff\xff\xff\xff\r\x02\xff\xff\xff\xff\x10\x02\x10\x02\x0e\x02\xff\xff\x10\x02\x11\x02\x11\x02\x01\x02\xff\xff\x11\x02\xff\xff\x0f\x02\n\x02\x0f\x02\xff\xff\xff\xff\xff\xff\x02\x02\xff\xff\x0f\x02\x0f\x02\xff\xff\x03\x02\x10\x02\xff\xff\x10\x02\xff\xff\xff\xff\x11\x02\xff\xff\x11\x02\x10\x02\x10\x02\xff\xff\xff\xff\xff\xff\x11\x02\x11\x02\x0f\x02\x12\x02\x12\x02\xff\xff\xff\xff\x12\x02\x0e\x02\f\x02\r\x02\xff\xff\xff\xff\xff\xff\x10\x02\x04\x02\x13\x02\x13\x02\xff\xff\x11\x02\x13\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x12\x02\xff\xff\x12\x02\x05\x02\xff\xff\xff\xff\x14\x02\x14\x02\x12\x02\x12\x02\x14\x02\xff\xff\xff\xff\x13\x02\xff\xff\x13\x02\x15\x02\x15\x02\x06\x02\xff\xff\x15\x02\x13\x02\x13\x02\x07\x02\xff\xff\xff\xff\xff\xff\x12\x02\xff\xff\x14\x02\xff\xff\x14\x02\x16\x02\x16\x02\xff\xff\x11\x02\x16\x02\x14\x02\x14\x02\x15\x02\x13\x02\x15\x02\xff\xff\x10\x02\xff\xff\xff\xff\xff\xff\x15\x02\x15\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x02\x14\x02\x16\x02\xff\xff\b\x02\xff\xff\xff\xff\xff\xff\x16\x02\x16\x02\x12\x02\x15\x02\x17\x02\x17\x02\xff\xff\t\x02\x17\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x18\x02\x18\x02\xff\xff\x13\x02\x18\x02\x16\x02\xff\xff\xff\xff\n\x02\xff\xff\xff\xff\xff\xff\xff\xff\x17\x02\xff\xff\x17\x02\x19\x02\x19\x02\xff\xff\x0b\x02\x19\x02\x17\x02\x17\x02\x18\x02\x14\x02\x18\x02\xff\xff\x15\x02\xff\xff\xff\xff\xff\xff\x18\x02\x18\x02\x1a\x02\x1a\x02\xff\xff\xff\xff\x1a\x02\xff\xff\x19\x02\x17\x02\x19\x02\xff\xff\xff\xff\x16\x02\f\x02\xff\xff\x19\x02\x19\x02\xff\xff\x18\x02\xff\xff\xff\xff\x1b\x02\x1b\x02\r\x02\x1a\x02\x1b\x02\x1a\x02\xff\xff\x0e\x02\xff\xff\xff\xff\xff\xff\x1a\x02\x1a\x02\x19\x02\xff\xff\x1c\x02\x1c\x02\xff\xff\xff\xff\x1c\x02\xff\xff\xff\xff\xff\xff\x1b\x02\xff\xff\x1b\x02\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x02\x1b\x02\x1b\x02\xff\xff\xff\xff\xff\xff\x17\x02\xff\xff\x1c\x02\x18\x02\x1c\x02\x1d\x02\x1d\x02\x0f\x02\xff\xff\x1d\x02\x1c\x02\x1c\x02\xff\xff\xff\xff\x1b\x02\xff\xff\xff\xff\x1e\x02\x1e\x02\x10\x02\xff\xff\x1e\x02\x1f\x02\x1f\x02\x11\x02\xff\xff\x1f\x02\xff\xff\x1d\x02\x1c\x02\x1d\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1d\x02\x1d\x02\xff\xff\xff\xff\x1e\x02\xff\xff\x1e\x02\xff\xff\xff\xff\x1f\x02\xff\xff\x1f\x02\x1e\x02\x1e\x02\xff\xff\x1a\x02\xff\xff\x1f\x02\x1f\x02\x1d\x02\xff\xff\xff\xff\x12\x02\xff\xff \x02 \x02\xff\xff\xff\xff \x02\xff\xff\x1b\x02\x1e\x02\xff\xff\xff\xff\xff\xff\x13\x02\x1f\x02\xff\xff\xff\xff\xff\xff!\x02!\x02\xff\xff\xff\xff!\x02\xff\xff\x1c\x02 \x02\xff\xff \x02\xff\xff\x14\x02\xff\xff#\x02#\x02 \x02 \x02#\x02\xff\xff\xff\xff\xff\xff\x15\x02\xff\xff!\x02\xff\xff!\x02\"\x02\"\x02\xff\xff\x1e\x02\"\x02!\x02!\x02\xff\xff \x02\xff\xff#\x02\x16\x02#\x02$\x02$\x02\xff\xff\xff\xff$\x02#\x02#\x02\xff\xff\xff\xff\xff\xff\"\x02!\x02\"\x02%\x02%\x02\xff\xff\xff\xff%\x02\"\x02\"\x02\xff\xff\xff\xff\xff\xff$\x02#\x02$\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff$\x02$\x02\x17\x02\xff\xff\xff\xff%\x02\"\x02%\x02\xff\xff\xff\xff\xff\xff\xff\xff\x18\x02%\x02%\x02 \x02!\x02\xff\xff\xff\xff$\x02\xff\xff&\x02&\x02\xff\xff\xff\xff&\x02\xff\xff\xff\xff\x19\x02\xff\xff\xff\xff\xff\xff%\x02#\x02\xff\xff\xff\xff\xff\xff'\x02'\x02\xff\xff\xff\xff'\x02\xff\xff\xff\xff&\x02\x1a\x02&\x02(\x02(\x02\xff\xff\xff\xff(\x02&\x02&\x02\xff\xff\xff\xff\xff\xff\xff\xff\"\x02\xff\xff'\x02\xff\xff'\x02\xff\xff\xff\xff\x1b\x02\xff\xff$\x02'\x02'\x02(\x02&\x02(\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff(\x02(\x02\x1c\x02\xff\xff)\x02)\x02\xff\xff\xff\xff)\x02'\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff(\x02\xff\xff*\x02*\x02\xff\xff\xff\xff*\x02\xff\xff)\x02\x1d\x02)\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff)\x02)\x02\xff\xff\xff\xff&\x02\x1e\x02\xff\xff\xff\xff\xff\xff*\x02\x1f\x02*\x02'\x02\xff\xff\xff\xff&\x02\xff\xff*\x02*\x02)\x02+\x02+\x02\xff\xff\xff\xff+\x02\xff\xff\xff\xff(\x02\xff\xff\xff\xff,\x02,\x02\xff\xff\xff\xff,\x02\xff\xff*\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff+\x02\xff\xff+\x02\xff\xff\xff\xff \x02\xff\xff\xff\xff+\x02+\x02,\x02\xff\xff,\x02-\x02-\x02\xff\xff\xff\xff-\x02,\x02,\x02\xff\xff!\x02\xff\xff\xff\xff\xff\xff.\x02.\x02+\x02\xff\xff.\x02\xff\xff\xff\xff*\x02\xff\xff#\x02\xff\xff-\x02,\x02-\x02/\x02/\x02\xff\xff\xff\xff/\x02-\x02-\x02\xff\xff\"\x02.\x02\xff\xff.\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff.\x02.\x02\xff\xff\xff\xff$\x02\xff\xff/\x02-\x02/\x020\x020\x02\xff\xff\xff\xff0\x02/\x02/\x02\xff\xff%\x02\xff\xff.\x02+\x021\x021\x02,\x02\xff\xff1\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff0\x02/\x020\x022\x022\x02\xff\xff\xff\xff2\x020\x020\x02\xff\xff\xff\xff1\x02\xff\xff1\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff1\x021\x02\xff\xff\xff\xff&\x02.\x022\x020\x022\x023\x023\x02\xff\xff\xff\xff3\x022\x022\x02\xff\xff\xff\xff\xff\xff1\x02'\x024\x024\x02\xff\xff\xff\xff4\x02\xff\xff\xff\xff\xff\xff\xff\xff(\x02\xff\xff3\x022\x023\x02\xff\xff/\x02\xff\xff\xff\xff\xff\xff3\x023\x02\xff\xff\xff\xff4\x02\xff\xff4\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff4\x024\x02\xff\xff\xff\xff5\x025\x02\xff\xff3\x025\x02\xff\xff\xff\xff\xff\xff\xff\xff)\x02\xff\xff\xff\xff\xff\xff0\x02\xff\xff4\x02\xff\xff2\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff5\x02\xff\xff5\x02*\x02\xff\xff\xff\xff2\x02\xff\xff5\x025\x026\x026\x02\xff\xff\xff\xff6\x02\xff\xff\xff\xff\xff\xff3\x02\xff\xff\xff\xff7\x027\x02\xff\xff\xff\xff7\x02\xff\xff5\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff6\x02\xff\xff6\x02\xff\xff+\x02\xff\xff\xff\xff\xff\xff6\x026\x02\xff\xff7\x024\x027\x02,\x02\xff\xff\xff\xff\xff\xff\xff\xff7\x027\x02\xff\xff8\x028\x02\xff\xff\xff\xff8\x026\x02\xff\xff\xff\xff\xff\xff\xff\xff9\x029\x02\xff\xff\xff\xff9\x02\xff\xff7\x02\xff\xff-\x02\xff\xff\xff\xff\xff\xff\xff\xff8\x02\xff\xff8\x02\xff\xff\xff\xff\xff\xff\xff\xff.\x028\x028\x029\x02\xff\xff9\x02:\x02:\x02\xff\xff\xff\xff:\x029\x029\x02\xff\xff/\x02\xff\xff\xff\xff\xff\xff;\x02;\x028\x02\xff\xff;\x02\xff\xff6\x02\xff\xff\xff\xff\xff\xff\xff\xff:\x029\x02:\x02<\x02<\x02\xff\xff\xff\xff<\x02:\x02:\x02\xff\xff0\x02;\x02\xff\xff;\x02=\x02=\x02\xff\xff\xff\xff=\x02;\x02;\x02\xff\xff1\x02\xff\xff\xff\xff<\x02:\x02<\x02>\x02>\x02\xff\xff\xff\xff>\x02<\x02<\x02\xff\xff2\x02=\x02;\x02=\x02?\x02?\x029\x028\x02?\x02=\x02=\x02\xff\xff\xff\xff\xff\xff\xff\xff>\x02<\x02>\x02@\x02@\x029\x02\xff\xff@\x02>\x02>\x02\xff\xff3\x02?\x02=\x02?\x02\xff\xff:\x02\xff\xffA\x02A\x02?\x02?\x02A\x024\x02\xff\xff\xff\xff@\x02>\x02@\x02C\x02C\x02\xff\xff\xff\xffC\x02@\x02@\x02\xff\xff\xff\xff\xff\xff?\x02\xff\xffA\x02\xff\xffA\x02B\x02B\x02\xff\xff\xff\xffB\x02A\x02A\x02<\x02C\x02@\x02C\x02=\x02\xff\xff\xff\xff5\x02\xff\xffC\x02C\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffB\x02A\x02B\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffB\x02B\x02\xff\xff\xff\xffC\x02\xff\xffD\x02D\x02\xff\xff\xff\xffD\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff6\x02\xff\xff\xff\xffB\x02E\x02E\x02\xff\xff\xff\xffE\x02\xff\xff\xff\xff7\x02\xff\xffD\x02@\x02D\x02F\x02F\x02\xff\xff\xff\xffF\x02D\x02D\x02\xff\xff\xff\xff\xff\xff\xff\xffE\x02\xff\xffE\x02\xff\xff\xff\xffA\x02G\x02G\x02E\x02E\x02G\x02\xff\xffF\x02D\x02F\x02\xff\xff\xff\xff\xff\xff8\x02\xff\xffF\x02F\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffE\x029\x02G\x02\xff\xffG\x02\xff\xffB\x02\xff\xff\xff\xff\xff\xffG\x02G\x02F\x02H\x02H\x02\xff\xff\xff\xffH\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffI\x02I\x02\xff\xff:\x02I\x02G\x02D\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffH\x02\xff\xffH\x02;\x02\xff\xff\xff\xffD\x02D\x02H\x02H\x02E\x02I\x02\xff\xffI\x02J\x02J\x02\xff\xff<\x02J\x02I\x02I\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffH\x02\xff\xff=\x02\xff\xffK\x02K\x02\xff\xffF\x02K\x02\xff\xffJ\x02I\x02J\x02\xff\xff\xff\xff\xff\xff>\x02\xff\xffJ\x02J\x02\xff\xffL\x02L\x02\xff\xffG\x02L\x02\xff\xffK\x02?\x02K\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffK\x02K\x02J\x02\xff\xff\xff\xff\xff\xff\xff\xff@\x02\xff\xffL\x02\xff\xffL\x02M\x02M\x02\xff\xff\xff\xffM\x02L\x02L\x02K\x02H\x02\xff\xffA\x02\xff\xffN\x02N\x02\xff\xffI\x02N\x02\xff\xff\xff\xff\xff\xff\xff\xffC\x02\xff\xffM\x02L\x02M\x02O\x02O\x02\xff\xff\xff\xffO\x02M\x02M\x02\xff\xff\xff\xffN\x02B\x02N\x02P\x02P\x02\xff\xff\xff\xffP\x02N\x02N\x02\xff\xff\xff\xff\xff\xff\xff\xffO\x02M\x02O\x02\xff\xff\xff\xff\xff\xff\xff\xffK\x02O\x02O\x02\xff\xff\xff\xffP\x02N\x02P\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffP\x02P\x02Q\x02Q\x02D\x02\xff\xffQ\x02O\x02\xff\xff\xff\xff\xff\xff\xff\xffL\x02R\x02R\x02\xff\xff\xff\xffR\x02E\x02P\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffQ\x02\xff\xffQ\x02S\x02S\x02F\x02\xff\xffS\x02Q\x02Q\x02\xff\xffR\x02\xff\xffR\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffR\x02R\x02\xff\xffG\x02\xff\xffN\x02\xff\xffS\x02Q\x02S\x02T\x02T\x02\xff\xff\xff\xffT\x02S\x02S\x02P\x02\xff\xffR\x02O\x02\xff\xffU\x02U\x02\xff\xff\xff\xffU\x02V\x02V\x02\xff\xff\xff\xffV\x02\xff\xffT\x02S\x02T\x02\xff\xffH\x02\xff\xffW\x02W\x02T\x02T\x02W\x02\xff\xffU\x02\xff\xffU\x02I\x02\xff\xffV\x02\xff\xffV\x02U\x02U\x02\xff\xff\xff\xff\xff\xffV\x02V\x02T\x02\xff\xffW\x02Q\x02W\x02X\x02X\x02\xff\xff\xff\xffX\x02W\x02W\x02U\x02S\x02J\x02Y\x02Y\x02V\x02\xff\xffY\x02Z\x02Z\x02\xff\xff\xff\xffZ\x02\xff\xff\xff\xff\xff\xffX\x02W\x02X\x02K\x02\xff\xff\xff\xff\xff\xff\xff\xffX\x02X\x02Y\x02\xff\xffY\x02\xff\xff\xff\xffZ\x02\xff\xffZ\x02Y\x02Y\x02L\x02\xff\xff\xff\xffZ\x02Z\x02T\x02U\x02X\x02[\x02[\x02\xff\xffV\x02[\x02\xff\xff\xff\xff\xff\xff\xff\xffY\x02\xff\xff\\\x02\\\x02\xff\xffZ\x02\\\x02]\x02]\x02M\x02\xff\xff]\x02\xff\xff\xff\xff[\x02W\x02[\x02\xff\xff\xff\xff\xff\xff\xff\xffN\x02[\x02[\x02\xff\xff\\\x02\xff\xff\\\x02\xff\xff\xff\xff]\x02\xff\xff]\x02\\\x02\\\x02O\x02Y\x02\xff\xff]\x02]\x02\xff\xff[\x02\xff\xff\xff\xff^\x02^\x02\xff\xffP\x02^\x02\xff\xff\xff\xff\xff\xff\\\x02\xff\xffZ\x02\xff\xff\xff\xff]\x02_\x02_\x02\xff\xff\xff\xff_\x02\xff\xff\xff\xff\xff\xff\xff\xff^\x02\xff\xff^\x02\xff\xff\xff\xff\xff\xff`\x02`\x02^\x02^\x02`\x02a\x02a\x02Q\x02_\x02a\x02_\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff_\x02_\x02R\x02\\\x02[\x02^\x02]\x02`\x02\xff\xff`\x02\xff\xff\xff\xffa\x02\xff\xffa\x02`\x02`\x02S\x02\xff\xff_\x02a\x02a\x02\xff\xff\xff\xff\xff\xffb\x02b\x02\xff\xff\xff\xffb\x02\xff\xff\xff\xff\xff\xff\xff\xff`\x02\xff\xffc\x02c\x02\xff\xffa\x02c\x02\xff\xff\xff\xffT\x02\xff\xff\xff\xff\xff\xff\xff\xffb\x02\xff\xffb\x02\xff\xff\xff\xff\xff\xff^\x02U\x02b\x02b\x02\xff\xffc\x02V\x02c\x02d\x02d\x02\xff\xff\xff\xffd\x02c\x02c\x02\xff\xff\xff\xff\xff\xffW\x02\xff\xff\xff\xffb\x02`\x02\xff\xff\xff\xffe\x02e\x02\xff\xff\xff\xffe\x02\xff\xffd\x02c\x02d\x02\xff\xff\xff\xff\xff\xfff\x02f\x02d\x02d\x02f\x02\xff\xff\xff\xffX\x02\xff\xff\xff\xff\xff\xffe\x02\xff\xffe\x02\xff\xff\xff\xff\xff\xffY\x02\xff\xffe\x02e\x02d\x02Z\x02f\x02\xff\xfff\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfff\x02f\x02b\x02\xff\xff\xff\xff\xff\xffc\x02e\x02g\x02g\x02\xff\xff\xff\xffg\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfff\x02\xff\xff\xff\xffh\x02h\x02\xff\xff\xff\xffh\x02[\x02\xff\xff\xff\xff\xff\xffg\x02\xff\xffg\x02\xff\xff\xff\xff\xff\xff\xff\xff\\\x02g\x02g\x02\xff\xff\xff\xff]\x02\xff\xffh\x02\xff\xffh\x02\xff\xff\xff\xff\xff\xffi\x02i\x02h\x02h\x02i\x02\xff\xfff\x02g\x02\xff\xff\xff\xff\xff\xffe\x02\xff\xff\xff\xff\xff\xffj\x02j\x02\xff\xff\xff\xffj\x02\xff\xffh\x02\xff\xffi\x02\xff\xffi\x02\xff\xff\xff\xff\xff\xff^\x02\xff\xffi\x02i\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffj\x02\xff\xffj\x02\xff\xff\xff\xff_\x02k\x02k\x02j\x02j\x02k\x02\xff\xffi\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffg\x02h\x02`\x02\xff\xff\xff\xff\xff\xff\xff\xffa\x02g\x02j\x02\xff\xffk\x02\xff\xffk\x02l\x02l\x02\xff\xff\xff\xffl\x02k\x02k\x02\xff\xff\xff\xff\xff\xff\xff\xffm\x02m\x02\xff\xff\xff\xffm\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffi\x02l\x02k\x02l\x02n\x02n\x02\xff\xffb\x02n\x02l\x02l\x02\xff\xffm\x02j\x02m\x02o\x02o\x02\xff\xffc\x02o\x02m\x02m\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffn\x02l\x02n\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffn\x02n\x02\xff\xffo\x02m\x02o\x02\xff\xff\xff\xff\xff\xffd\x02\xff\xffo\x02o\x02\xff\xffp\x02p\x02\xff\xff\xff\xffp\x02n\x02\xff\xff\xff\xff\xff\xff\xff\xffk\x02\xff\xffe\x02\xff\xff\xff\xff\xff\xffo\x02q\x02q\x02\xff\xff\xff\xffq\x02\xff\xffp\x02f\x02p\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffp\x02p\x02\xff\xffm\x02\xff\xff\xff\xff\xff\xff\xff\xffm\x02q\x02\xff\xffq\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffq\x02q\x02p\x02\xff\xff\xff\xff\xff\xffn\x02\xff\xff\xff\xffr\x02r\x02\xff\xff\xff\xffr\x02\xff\xffg\x02\xff\xff\xff\xff\xff\xffq\x02o\x02s\x02s\x02\xff\xff\xff\xffs\x02\xff\xff\xff\xff\xff\xffh\x02\xff\xff\xff\xffr\x02\xff\xffr\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffr\x02r\x02p\x02\xff\xffs\x02\xff\xffs\x02t\x02t\x02\xff\xff\xff\xfft\x02s\x02s\x02\xff\xff\xff\xff\xff\xffq\x02i\x02r\x02\xff\xffu\x02u\x02\xff\xff\xff\xffu\x02\xff\xff\xff\xff\xff\xff\xff\xfft\x02s\x02t\x02j\x02\xff\xff\xff\xff\xff\xff\xff\xfft\x02t\x02\xff\xffv\x02v\x02\xff\xffu\x02v\x02u\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffu\x02u\x02w\x02w\x02\xff\xfft\x02w\x02\xff\xff\xff\xff\xff\xffk\x02\xff\xffv\x02\xff\xffv\x02\xff\xffr\x02\xff\xff\xff\xffu\x02v\x02v\x02\xff\xff\xff\xff\xff\xffw\x02\xff\xffw\x02x\x02x\x02\xff\xff\xff\xffx\x02w\x02w\x02\xff\xffl\x02\xff\xff\xff\xffv\x02y\x02y\x02\xff\xff\xff\xffy\x02\xff\xff\xff\xffm\x02\xff\xff\xff\xff\xff\xffx\x02w\x02x\x02\xff\xff\xff\xff\xff\xfft\x02u\x02x\x02x\x02\xff\xffn\x02y\x02\xff\xffy\x02z\x02z\x02\xff\xff\xff\xffz\x02y\x02y\x02o\x02\xff\xff\xff\xff\xff\xffv\x02x\x02{\x02{\x02\xff\xff\xff\xff{\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffz\x02y\x02z\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffz\x02z\x02\xff\xff\xff\xffw\x02{\x02\xff\xff{\x02|\x02|\x02p\x02\xff\xff|\x02{\x02{\x02\xff\xff\xff\xff\xff\xff\xff\xffz\x02}\x02}\x02\xff\xff\xff\xff}\x02\xff\xff\xff\xffq\x02\xff\xff\xff\xff\xff\xff|\x02{\x02|\x02~\x02~\x02\xff\xff\xff\xff~\x02|\x02|\x02\xff\xff\xff\xff}\x02\xff\xff}\x02\x7f\x02\x7f\x02y\x02\xff\xff\x7f\x02}\x02}\x02\xff\xff\xff\xff\xff\xff\xff\xff~\x02|\x02~\x02\x80\x02\x80\x02\xff\xff\xff\xff\x80\x02~\x02~\x02r\x02\xff\xff\x7f\x02}\x02\x7f\x02\xff\xff\xff\xff\xff\xff\xff\xffz\x02\x7f\x02\x7f\x02s\x02\xff\xff\xff\xff\xff\xff\x80\x02~\x02\x80\x02\x81\x02\x81\x02\xff\xff\xff\xff\x81\x02\x80\x02\x80\x02\xff\xff\xff\xff\xff\xff\x7f\x02\x82\x02\x82\x02\xff\xff\xff\xff\x82\x02\xff\xff\xff\xff|\x02t\x02\xff\xff\xff\xff\xff\xff\x81\x02\x80\x02\x81\x02\x83\x02\x83\x02\xff\xff\xff\xff\x83\x02\x81\x02\x81\x02u\x02\x82\x02\xff\xff\x82\x02}\x02\xff\xff\xff\xff\x84\x02\x84\x02\x82\x02\x82\x02\x84\x02\xff\xff\xff\xff\xff\xff\xff\xff\x83\x02\x81\x02\x83\x02\xff\xffv\x02\xff\xff~\x02\xff\xff\x83\x02\x83\x02\xff\xff\xff\xff\x82\x02\xff\xff\x84\x02\xff\xff\x84\x02w\x02\xff\xff\xff\xff\xff\xff\xff\xff\x84\x02\x84\x02\xff\xff\xff\xff\xff\xff\x83\x02\x85\x02\x85\x02\x80\x02\xff\xff\x85\x02\x86\x02\x86\x02\xff\xff\xff\xff\x86\x02\xff\xff\xff\xff\xff\xff\x84\x02\xff\xffx\x02\xff\xff\x87\x02\x87\x02\xff\xff\xff\xff\x87\x02\x81\x02\x85\x02\xff\xff\x85\x02\xff\xffy\x02\x86\x02\xff\xff\x86\x02\x85\x02\x85\x02\x82\x02\xff\xff\x83\x02\x86\x02\x86\x02\xff\xff\xff\xff\x87\x02\xff\xff\x87\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x87\x02\x87\x02\x85\x02\xff\xff\xff\xffz\x02\xff\xff\x86\x02\x88\x02\x88\x02\xff\xff\x84\x02\x88\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff{\x02\x87\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x88\x02\xff\xff\x88\x02\xff\xff\xff\xff\xff\xff\x89\x02\x89\x02\x88\x02\x88\x02\x89\x02\xff\xff\xff\xff|\x02\xff\xff\xff\xff\xff\xff\x86\x02\xff\xff\xff\xff\xff\xff\xff\xff\x85\x02\xff\xff\xff\xff}\x02\xff\xff\x88\x02\xff\xff\x89\x02\xff\xff\x89\x02\xff\xff\xff\xff\x87\x02\xff\xff\xff\xff\x89\x02\x89\x02~\x02\xff\xff\xff\xff\xff\xff\x8a\x02\x8a\x02\xff\xff\xff\xff\x8a\x02\xff\xff\xff\xff\xff\xff\x7f\x02\xff\xff\x8b\x02\x8b\x02\xff\xff\x89\x02\x8b\x02\x8c\x02\x8c\x02\xff\xff\xff\xff\x8c\x02\xff\xff\xff\xff\x80\x02\x8a\x02\xff\xff\x8a\x02\x8d\x02\x8d\x02\xff\xff\xff\xff\x8d\x02\x8a\x02\x8a\x02\x8b\x02\xff\xff\x8b\x02\xff\xff\xff\xff\x8c\x02\x88\x02\x8c\x02\x8b\x02\x8b\x02\xff\xff\xff\xff\xff\xff\x8c\x02\x8c\x02\x81\x02\x8d\x02\x8a\x02\x8d\x02\x8e\x02\x8e\x02\xff\xff\x89\x02\x8e\x02\x8d\x02\x8d\x02\x82\x02\x8b\x02\xff\xff\x8f\x02\x8f\x02\xff\xff\x8c\x02\x8f\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x83\x02\x8e\x02\x8d\x02\x8e\x02\x90\x02\x90\x02\xff\xff\xff\xff\x90\x02\x8e\x02\x8e\x02\x8f\x02\xff\xff\x8f\x02\x84\x02\xff\xff\x8a\x02\x91\x02\x91\x02\x8f\x02\x8f\x02\x91\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x90\x02\x8e\x02\x90\x02\x92\x02\x92\x02\xff\xff\xff\xff\x92\x02\x90\x02\x90\x02\xff\xff\x8f\x02\xff\xff\x91\x02\xff\xff\x91\x02\x8b\x02\xff\xff\xff\xff\x93\x02\x93\x02\x91\x02\x91\x02\x93\x02\x85\x02\xff\xff\x92\x02\x90\x02\x92\x02\x86\x02\x8d\x02\xff\xff\x94\x02\x94\x02\x92\x02\x92\x02\x94\x02\xff\xff\xff\xff\xff\xff\x91\x02\x87\x02\x93\x02\x8e\x02\x93\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x93\x02\x93\x02\xff\xff\x92\x02\xff\xff\x94\x02\xff\xff\x94\x02\xff\xff\xff\xff\xff\xff\xff\xff\x8f\x02\x94\x02\x94\x02\xff\xff\x95\x02\x95\x02\xff\xff\x93\x02\x95\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x91\x02\xff\xff\xff\xff\xff\xff\x88\x02\xff\xff\x94\x02\xff\xff\x90\x02\xff\xff\xff\xff\xff\xff\xff\xff\x95\x02\xff\xff\x95\x02\x96\x02\x96\x02\xff\xff\xff\xff\x96\x02\x95\x02\x95\x02\xff\xff\xff\xff\xff\xff\xff\xff\x92\x02\x97\x02\x97\x02\xff\xff\xff\xff\x97\x02\x89\x02\xff\xff\x93\x02\xff\xff\xff\xff\xff\xff\x96\x02\x95\x02\x96\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x96\x02\x96\x02\xff\xff\xff\xff\x97\x02\xff\xff\x97\x02\xff\xff\xff\xff\x94\x02\xff\xff\xff\xff\x97\x02\x97\x02\xff\xff\xff\xff\x98\x02\x98\x02\xff\xff\x96\x02\x98\x02\x99\x02\x99\x02\x8a\x02\xff\xff\x99\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x97\x02\xff\xff\x8b\x02\xff\xff\xff\xff\x9a\x02\x9a\x02\x8c\x02\x98\x02\x9a\x02\x98\x02\xff\xff\xff\xff\x99\x02\x95\x02\x99\x02\x98\x02\x98\x02\x8d\x02\xff\xff\xff\xff\x99\x02\x99\x02\xff\xff\xff\xff\x9b\x02\x9b\x02\xff\xff\x9a\x02\x9b\x02\x9a\x02\xff\xff\xff\xff\xff\xff\xff\xff\x98\x02\x9a\x02\x9a\x02\xff\xff\xff\xff\x99\x02\x9c\x02\x9c\x02\x96\x02\x8e\x02\x9c\x02\xff\xff\xff\xff\x9b\x02\xff\xff\x9b\x02\xff\xff\xff\xff\xff\xff\x8f\x02\x9a\x02\x9b\x02\x9b\x02\xff\xff\xff\xff\xff\xff\xff\xff\x97\x02\xff\xff\x9c\x02\xff\xff\x9c\x02\xff\xff\xff\xff\xff\xff\x90\x02\xff\xff\x9c\x02\x9c\x02\xff\xff\x9b\x02\xff\xff\xff\xff\x9d\x02\x9d\x02\xff\xff\xff\xff\x9d\x02\x91\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x9c\x02\x99\x02\xff\xff\xff\xff\xff\xff\x92\x02\xff\xff\x9f\x02\x9f\x02\xff\xff\x9d\x02\x9f\x02\x9d\x02\xff\xff\xff\xff\xff\xff\x9a\x02\xff\xff\x9d\x02\x9d\x02\xff\xff\x93\x02\x9e\x02\x9e\x02\xff\xff\xff\xff\x9e\x02\xa0\x02\xa0\x02\xff\xff\x9f\x02\xa0\x02\x9f\x02\xff\xff\x94\x02\xff\xff\x9c\x02\x9d\x02\x9f\x02\x9f\x02\xff\xff\x9b\x02\xa1\x02\xa1\x02\xff\xff\x9e\x02\xa1\x02\x9e\x02\xff\xff\xff\xff\xa0\x02\xff\xff\xa0\x02\x9e\x02\x9e\x02\xff\xff\xff\xff\x9f\x02\xa0\x02\xa0\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xa1\x02\xff\xff\xa1\x02\x95\x02\xff\xff\xff\xff\xff\xff\x9e\x02\xa1\x02\xa1\x02\xff\xff\xff\xff\xa0\x02\xff\xff\xa2\x02\xa2\x02\x9d\x02\xff\xff\xa2\x02\xff\xff\xff\xff\x9d\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xa1\x02\xff\xff\x96\x02\xa3\x02\xa3\x02\xff\xff\xff\xff\xa3\x02\xff\xff\xff\xff\xa2\x02\xff\xff\xa2\x02\xff\xff\x97\x02\xff\xff\xff\xff\x9f\x02\xa2\x02\xa2\x02\xa4\x02\xa4\x02\xff\xff\xff\xff\xa4\x02\xa0\x02\xa3\x02\xff\xff\xa3\x02\x9e\x02\xff\xff\xff\xff\xa5\x02\xa5\x02\xa3\x02\xa3\x02\xa5\x02\xa2\x02\xa1\x02\xff\xff\xff\xff\xff\xff\xff\xff\xa4\x02\xff\xff\xa4\x02\xff\xff\xff\xff\xff\xff\x98\x02\xff\xff\xa4\x02\xa4\x02\xa3\x02\x99\x02\xa5\x02\xff\xff\xa5\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xa5\x02\xa5\x02\xff\xff\xff\xff\xa6\x02\xa6\x02\x9a\x02\xa4\x02\xa6\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xa7\x02\xa7\x02\xff\xff\xff\xff\xa7\x02\xa5\x02\xff\xff\xff\xff\xff\xff\xa2\x02\xa8\x02\xa8\x02\x9b\x02\xa6\x02\xa8\x02\xa6\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xa6\x02\xa6\x02\xa7\x02\xff\xff\xa7\x02\xa9\x02\xa9\x02\x9c\x02\xff\xff\xa9\x02\xa7\x02\xa7\x02\xa8\x02\xff\xff\xa8\x02\xff\xff\xff\xff\xff\xff\xff\xff\xa6\x02\xa8\x02\xa8\x02\xff\xff\xa5\x02\xa4\x02\xff\xff\xff\xff\xff\xff\xa9\x02\xa7\x02\xa9\x02\xaa\x02\xaa\x02\xff\xff\xff\xff\xaa\x02\xa9\x02\xa9\x02\xff\xff\xa8\x02\xff\xff\xff\xff\xab\x02\xab\x02\x9d\x02\xff\xff\xab\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xaa\x02\xa9\x02\xaa\x02\xa6\x02\xff\xff\xff\xff\xff\xff\xff\xff\xaa\x02\xaa\x02\x9f\x02\xab\x02\xff\xff\xab\x02\xff\xff\xff\xff\xff\xff\xac\x02\xac\x02\xab\x02\xab\x02\xac\x02\xff\xff\xff\xff\xa7\x02\x9e\x02\xff\xff\xaa\x02\xad\x02\xad\x02\xa0\x02\xff\xff\xad\x02\xae\x02\xae\x02\xff\xff\xff\xff\xae\x02\xab\x02\xff\xff\xac\x02\xff\xff\xac\x02\xaf\x02\xaf\x02\xa1\x02\xff\xff\xaf\x02\xac\x02\xac\x02\xff\xff\xad\x02\xff\xff\xad\x02\xff\xff\xff\xff\xae\x02\xff\xff\xae\x02\xad\x02\xad\x02\xa9\x02\xff\xff\xaa\x02\xae\x02\xae\x02\xaf\x02\xac\x02\xaf\x02\xb0\x02\xb0\x02\xff\xff\xff\xff\xb0\x02\xaf\x02\xaf\x02\xff\xff\xff\xff\xad\x02\xff\xff\xb1\x02\xb1\x02\xa2\x02\xae\x02\xb1\x02\xff\xff\xff\xff\xff\xff\xab\x02\xff\xff\xff\xff\xff\xff\xb0\x02\xaf\x02\xb0\x02\xff\xff\xff\xff\xff\xff\xa3\x02\xff\xff\xb0\x02\xb0\x02\xff\xff\xb1\x02\xff\xff\xb1\x02\xb2\x02\xb2\x02\xff\xff\xac\x02\xb2\x02\xb1\x02\xb1\x02\xff\xff\xff\xff\xa4\x02\xff\xff\xff\xff\xff\xff\xb0\x02\xb3\x02\xb3\x02\xff\xff\xff\xff\xb3\x02\xff\xff\xff\xff\xa5\x02\xad\x02\xb2\x02\xb1\x02\xb2\x02\xff\xff\xff\xff\xff\xff\xae\x02\xff\xff\xb2\x02\xb2\x02\xff\xff\xff\xff\xff\xff\xff\xff\xb3\x02\xff\xff\xb3\x02\xb4\x02\xb4\x02\xaf\x02\xff\xff\xb4\x02\xb3\x02\xb3\x02\xff\xff\xff\xff\xff\xff\xb2\x02\xff\xff\xff\xff\xff\xff\xb5\x02\xb5\x02\xa6\x02\xff\xff\xb5\x02\xff\xff\xff\xff\xff\xff\xff\xff\xb4\x02\xb3\x02\xb4\x02\xa7\x02\xff\xff\xff\xff\xff\xff\xff\xff\xb4\x02\xb4\x02\xff\xff\xff\xff\xb0\x02\xa8\x02\xb5\x02\xff\xff\xb5\x02\xb6\x02\xb6\x02\xff\xff\xff\xff\xb6\x02\xb5\x02\xb5\x02\xff\xff\xff\xff\xb2\x02\xb4\x02\xff\xff\xa9\x02\xff\xff\xff\xff\xff\xff\xb7\x02\xb7\x02\xff\xff\xff\xff\xb7\x02\xff\xff\xb3\x02\xb6\x02\xb5\x02\xb6\x02\xff\xff\xff\xff\xff\xff\xb8\x02\xb8\x02\xb6\x02\xb6\x02\xb8\x02\xff\xff\xff\xff\xff\xff\xff\xff\xaa\x02\xb7\x02\xff\xff\xb7\x02\xb9\x02\xb9\x02\xff\xff\xff\xff\xb9\x02\xb7\x02\xb7\x02\xab\x02\xb6\x02\xff\xff\xb8\x02\xff\xff\xb8\x02\xff\xff\xff\xff\xff\xff\xff\xff\xb4\x02\xb8\x02\xb8\x02\xff\xff\xff\xff\xff\xff\xb9\x02\xb7\x02\xb9\x02\xba\x02\xba\x02\xff\xff\xff\xff\xba\x02\xb9\x02\xb9\x02\xff\xff\xff\xff\xff\xff\xac\x02\xb8\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xad\x02\xff\xff\xba\x02\xb9\x02\xba\x02\xae\x02\xff\xff\xff\xff\xbb\x02\xbb\x02\xba\x02\xba\x02\xbb\x02\xff\xff\xff\xff\xaf\x02\xff\xff\xff\xff\xb6\x02\xff\xff\xb7\x02\xff\xff\xff\xff\xff\xff\xbc\x02\xbc\x02\xff\xff\xff\xff\xbc\x02\xba\x02\xff\xff\xbb\x02\xff\xff\xbb\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbb\x02\xbb\x02\xb0\x02\xff\xff\xff\xff\xff\xff\xb9\x02\xb8\x02\xbc\x02\xff\xff\xbc\x02\xff\xff\xff\xff\xb1\x02\xff\xff\xff\xff\xbc\x02\xbc\x02\xff\xff\xbb\x02\xff\xff\xbb\x02\xff\xff\xff\xff\xbc\x02\xbc\x02\xbc\x02\xbc\x02\xbc\x02\xbc\x02\xbc\x02\xbc\x02\xbc\x02\xbc\x02\xff\xff\xbc\x02\xff\xff\xff\xff\xff\xff\xb2\x02\xff\xff\xbd\x02\xbd\x02\xff\xff\xff\xff\xbd\x02\xff\xff\xba\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xb3\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x02\xff\xff\xbd\x02\xbe\x02\xbe\x02\xff\xff\xff\xff\xbe\x02\xbd\x02\xbd\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xb4\x02\xbd\x02\xbd\x02\xbd\x02\xbd\x02\xbd\x02\xbd\x02\xbd\x02\xbd\x02\xbd\x02\xbd\x02\xbe\x02\xbd\x02\xbe\x02\xb5\x02\xff\xff\xff\xff\xff\xff\xff\xff\xbe\x02\xbe\x02\xff\xff\xc1\x02\xc1\x02\xff\xff\xff\xff\xc1\x02\xbe\x02\xbe\x02\xbe\x02\xbe\x02\xbe\x02\xbe\x02\xbe\x02\xbe\x02\xbe\x02\xbe\x02\xff\xff\xbe\x02\xff\xff\xb6\x02\xff\xff\xff\xff\xff\xff\xff\xff\xc1\x02\xff\xff\xc1\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc1\x02\xc1\x02\xff\xff\xb7\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xb8\x02\xbf\x02\xbf\x02\xc1\x02\xff\xff\xbf\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xb9\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbf\x02\xff\xff\xbf\x02\xff\xff\xff\xff\xff\xff\xbe\x02\xff\xff\xbf\x02\xbf\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xba\x02\xbf\x02\xbf\x02\xbf\x02\xbf\x02\xbf\x02\xbf\x02\xbf\x02\xbf\x02\xbf\x02\xbf\x02\xff\xff\xbf\x02\xff\xff\xff\xff\xff\xff\xff\xff\xc1\x02\xbf\x02\xbf\x02\xbf\x02\xbf\x02\xbf\x02\xbf\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbb\x02\xff\xff\xff\xff\xff\xff\xc0\x02\xc0\x02\xff\xff\xff\xff\xc0\x02\xc2\x02\xc2\x02\xff\xff\xff\xff\xc2\x02\xff\xff\xff\xff\xbc\x02\xff\xff\xff\xff\xff\xff\xff\xff\xbf\x02\xbf\x02\xbf\x02\xbf\x02\xbf\x02\xbf\x02\xc0\x02\xff\xff\xc0\x02\xff\xff\xff\xff\xc2\x02\xff\xff\xc2\x02\xc0\x02\xc0\x02\xff\xff\xff\xff\xff\xff\xc2\x02\xc2\x02\xff\xff\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xff\xff\xc0\x02\xff\xff\xff\xff\xff\xff\xff\xff\xc2\x02\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xbd\x02\xff\xff\xff\xff\xff\xff\xc3\x02\xc3\x02\xff\xff\xff\xff\xc3\x02\xc4\x02\xc4\x02\xff\xff\xff\xff\xc4\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xc0\x02\xbe\x02\xc3\x02\xff\xff\xc3\x02\xff\xff\xff\xff\xc4\x02\xff\xff\xc4\x02\xc3\x02\xc3\x02\xff\xff\xc5\x02\xc5\x02\xc4\x02\xc4\x02\xc5\x02\xc6\x02\xc6\x02\xc2\x02\xff\xff\xc6\x02\xc7\x02\xc7\x02\xff\xff\xff\xff\xc7\x02\xff\xff\xc3\x02\xff\xff\xff\xff\xff\xff\xff\xff\xc4\x02\xc1\x02\xc5\x02\xff\xff\xc5\x02\xff\xff\xff\xff\xc6\x02\xff\xff\xc6\x02\xc5\x02\xc5\x02\xc7\x02\xff\xff\xc7\x02\xc6\x02\xc6\x02\xff\xff\xff\xff\xff\xff\xc7\x02\xc7\x02\xff\xff\xc8\x02\xc8\x02\xff\xff\xff\xff\xc8\x02\xff\xff\xc5\x02\xff\xff\xff\xff\xff\xff\xff\xff\xc6\x02\xff\xff\xc9\x02\xc9\x02\xff\xff\xc7\x02\xc9\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc8\x02\xff\xff\xc8\x02\xbf\x02\xff\xff\xff\xff\xc3\x02\xff\xff\xc8\x02\xc8\x02\xca\x02\xca\x02\xff\xff\xc9\x02\xca\x02\xc9\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc9\x02\xc9\x02\xff\xff\xff\xff\xff\xff\xc6\x02\xc8\x02\xff\xff\xff\xff\xcb\x02\xcb\x02\xff\xff\xca\x02\xcb\x02\xca\x02\xff\xff\xff\xff\xc5\x02\xff\xff\xc9\x02\xca\x02\xca\x02\xc7\x02\xcc\x02\xcc\x02\xff\xff\xff\xff\xcc\x02\xff\xff\xff\xff\xff\xff\xff\xff\xcb\x02\xff\xff\xcb\x02\xff\xff\xff\xff\xff\xff\xff\xff\xca\x02\xcb\x02\xcb\x02\xff\xff\xff\xff\xff\xff\xff\xff\xcc\x02\xff\xff\xcc\x02\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x02\xcc\x02\xcc\x02\xff\xff\xff\xff\xc2\x02\xcb\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc9\x02\xff\xff\xcc\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe1\x02\xe1\x02\xff\xff\xff\xff\xe1\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xca\x02\xff\xff\xff\xff\xff\xff\xff\xff\xcb\x02\xff\xff\xff\xff\xff\xff\xff\xff\xe1\x02\xff\xff\xe1\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe1\x02\xe1\x02\xff\xff\xe2\x02\xe2\x02\xff\xff\xff\xff\xe2\x02\xff\xff\xff\xff\xff\xff\xc3\x02\xff\xff\xff\xff\xff\xff\xff\xff\xc4\x02\xff\xff\xff\xff\xe1\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe2\x02\xff\xff\xe2\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe2\x02\xe2\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc5\x02\xff\xff\xff\xff\xff\xff\xff\xff\xc6\x02\xff\xff\xff\xff\xe2\x02\xff\xff\xc7\x02\xd6\x02\xd6\x02\xd6\x02\xd6\x02\xd6\x02\xd6\x02\xd6\x02\xd6\x02\xd6\x02\xd6\x02\xd6\x02\xd6\x02\xd6\x02\xd6\x02\xd6\x02\xd6\x02\xd6\x02\xd6\x02\xd6\x02\xd6\x02\xd6\x02\xd6\x02\xd6\x02\xd6\x02\xd6\x02\xd6\x02\xd6\x02\xd6\x02\xd6\x02\xd6\x02\xd6\x02\xd6\x02\xff\xff\xc8\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc9\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xca\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xcd\x02\xcd\x02\xff\xff\xff\xff\xcd\x02\xff\xff\xff\xff\xff\xff\xcb\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xcc\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xff\xff\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xe1\x02\xcd\x02\xff\xff\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xcd\x02\xff\xff\xcd\x02\xe2\x02\xcd\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xce\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd1\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xd3\x02\xff\xff\xff\xff\xff\xff\xff\xff\xcd\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xce\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd4\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd7\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd8\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xd9\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xda\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdb\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdc\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xdd\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xde\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xdf\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe0\x02\xe3\x02\xe3\x02\xff\xff\xff\xff\xe3\x02\xe4\x02\xe4\x02\xff\xff\xff\xff\xe4\x02\xe5\x02\xe5\x02\xff\xff\xff\xff\xe5\x02\xe7\x02\xe7\x02\xff\xff\xff\xff\xe7\x02\xe9\x02\xe9\x02\xff\xff\xe3\x02\xe9\x02\xe3\x02\xff\xff\xff\xff\xe4\x02\xff\xff\xe4\x02\xe3\x02\xe3\x02\xe5\x02\xff\xff\xe5\x02\xe4\x02\xe4\x02\xe7\x02\xff\xff\xe7\x02\xe5\x02\xe5\x02\xe9\x02\xff\xff\xe9\x02\xe7\x02\xe7\x02\xff\xff\xff\xff\xe3\x02\xe9\x02\xe9\x02\xff\xff\xff\xff\xe4\x02\xff\xff\xff\xff\xff\xff\xff\xff\xe5\x02\xff\xff\xff\xff\xff\xff\xff\xff\xe7\x02\xff\xff\xff\xff\xff\xff\xff\xff\xe9\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xee\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe4\x02\xe6\x02\xe6\x02\xff\xff\xff\xff\xe6\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe6\x02\xff\xff\xe6\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe6\x02\xe6\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe6\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe3\x02\xff\xff\xff\xff\xff\xff\xff\xff\xe4\x02\xff\xff\xff\xff\xff\xff\xff\xff\xe5\x02\xff\xff\xff\xff\xff\xff\xff\xff\xe7\x02\xff\xff\xff\xff\xff\xff\xff\xff\xe9\x02\xf0\x02\xf0\x02\xf0\x02\xf0\x02\xf0\x02\xf0\x02\xf0\x02\xf0\x02\xf0\x02\xf0\x02\xf0\x02\xf0\x02\xf0\x02\xf0\x02\xf0\x02\xf0\x02\xf0\x02\xf0\x02\xf0\x02\xf0\x02\xf0\x02\xf0\x02\xf0\x02\xf0\x02\xf0\x02\xf0\x02\xf0\x02\xf0\x02\xf0\x02\xf0\x02\xf0\x02\xf0\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe6\x02\xe8\x02\xe8\x02\xff\xff\xff\xff\xe8\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe8\x02\xff\xff\xe8\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe8\x02\xe8\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe8\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe6\x02\xf1\x02\xf1\x02\xf1\x02\xf1\x02\xf1\x02\xf1\x02\xf1\x02\xf1\x02\xf1\x02\xf1\x02\xf1\x02\xf1\x02\xf1\x02\xf1\x02\xf1\x02\xf1\x02\xf1\x02\xf1\x02\xf1\x02\xf1\x02\xf1\x02\xf1\x02\xf1\x02\xf1\x02\xf1\x02\xf1\x02\xf1\x02\xf1\x02\xf1\x02\xf1\x02\xf1\x02\xf1\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xe8\x02\xea\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xea\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xea\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe8\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xea\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xec\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xef\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xf2\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfa\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfb\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfc\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfd\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xfe\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\xff\x02\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x01\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff",

   /* lex_base_code */"",

   /* lex_backtrk_code */"",

   /* lex_default_code */"",

@@ -20645,13 +20186,12 @@
   while(true) {

     var __ocaml_lex_state = ___ocaml_lex_state;

     var __ocaml_lex_state$1 = Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf$1);

-    if (__ocaml_lex_state$1 > 144 || __ocaml_lex_state$1 < 0) {

+    if (__ocaml_lex_state$1 > 149 || __ocaml_lex_state$1 < 0) {

       Curry._1(lexbuf$1[/* refill_buff */0], lexbuf$1);

       ___ocaml_lex_state = __ocaml_lex_state$1;

       continue ;

       

-    }

-    else {

+    } else {

       switch (__ocaml_lex_state$1) {

         case 0 : 

             return /* LPAR */2;

@@ -20668,11 +20208,11 @@
             return /* FLOAT */Block.__(2, [s$2]);

         case 5 : 

             var s$3 = Lexing.sub_lexeme(lexbuf$1, lexbuf$1[/* lex_start_pos */4], lexbuf$1[/* lex_curr_pos */5]);

-            return /* TEXT */Block.__(3, [text(s$3)]);

+            return /* STRING */Block.__(3, [string(s$3)]);

         case 6 : 

-            return error(lexbuf$1, "unclosed text literal");

+            return error(lexbuf$1, "unclosed string literal");

         case 7 : 

-            return error(lexbuf$1, "illegal control character in text literal");

+            return error(lexbuf$1, "illegal control character in string literal");

         case 8 : 

             return error_nest(Lexing.lexeme_end_p(lexbuf$1), lexbuf$1, "illegal escape");

         case 9 : 

@@ -20935,97 +20475,97 @@
             return /* BINARY */Block.__(12, [floatop(t$37, Operators.f32_copysign, Operators.f64_copysign)]);

         case 72 : 

             var t$38 = Lexing.sub_lexeme(lexbuf$1, lexbuf$1[/* lex_start_pos */4], lexbuf$1[/* lex_start_pos */4] + 3 | 0);

-            return /* TEST */Block.__(15, [intop(t$38, Operators.i32_eqz, Operators.i64_eqz)]);

+            return /* TEST */Block.__(13, [intop(t$38, Operators.i32_eqz, Operators.i64_eqz)]);

         case 73 : 

             var t$39 = Lexing.sub_lexeme(lexbuf$1, lexbuf$1[/* lex_start_pos */4], lexbuf$1[/* lex_start_pos */4] + 3 | 0);

-            return /* COMPARE */Block.__(13, [intop(t$39, Operators.i32_eq, Operators.i64_eq)]);

+            return /* COMPARE */Block.__(14, [intop(t$39, Operators.i32_eq, Operators.i64_eq)]);

         case 74 : 

             var t$40 = Lexing.sub_lexeme(lexbuf$1, lexbuf$1[/* lex_start_pos */4], lexbuf$1[/* lex_start_pos */4] + 3 | 0);

-            return /* COMPARE */Block.__(13, [intop(t$40, Operators.i32_ne, Operators.i64_ne)]);

+            return /* COMPARE */Block.__(14, [intop(t$40, Operators.i32_ne, Operators.i64_ne)]);

         case 75 : 

             var t$41 = Lexing.sub_lexeme(lexbuf$1, lexbuf$1[/* lex_start_pos */4], lexbuf$1[/* lex_start_pos */4] + 3 | 0);

-            return /* COMPARE */Block.__(13, [intop(t$41, Operators.i32_lt_s, Operators.i64_lt_s)]);

+            return /* COMPARE */Block.__(14, [intop(t$41, Operators.i32_lt_s, Operators.i64_lt_s)]);

         case 76 : 

             var t$42 = Lexing.sub_lexeme(lexbuf$1, lexbuf$1[/* lex_start_pos */4], lexbuf$1[/* lex_start_pos */4] + 3 | 0);

-            return /* COMPARE */Block.__(13, [intop(t$42, Operators.i32_lt_u, Operators.i64_lt_u)]);

+            return /* COMPARE */Block.__(14, [intop(t$42, Operators.i32_lt_u, Operators.i64_lt_u)]);

         case 77 : 

             var t$43 = Lexing.sub_lexeme(lexbuf$1, lexbuf$1[/* lex_start_pos */4], lexbuf$1[/* lex_start_pos */4] + 3 | 0);

-            return /* COMPARE */Block.__(13, [intop(t$43, Operators.i32_le_s, Operators.i64_le_s)]);

+            return /* COMPARE */Block.__(14, [intop(t$43, Operators.i32_le_s, Operators.i64_le_s)]);

         case 78 : 

             var t$44 = Lexing.sub_lexeme(lexbuf$1, lexbuf$1[/* lex_start_pos */4], lexbuf$1[/* lex_start_pos */4] + 3 | 0);

-            return /* COMPARE */Block.__(13, [intop(t$44, Operators.i32_le_u, Operators.i64_le_u)]);

+            return /* COMPARE */Block.__(14, [intop(t$44, Operators.i32_le_u, Operators.i64_le_u)]);

         case 79 : 

             var t$45 = Lexing.sub_lexeme(lexbuf$1, lexbuf$1[/* lex_start_pos */4], lexbuf$1[/* lex_start_pos */4] + 3 | 0);

-            return /* COMPARE */Block.__(13, [intop(t$45, Operators.i32_gt_s, Operators.i64_gt_s)]);

+            return /* COMPARE */Block.__(14, [intop(t$45, Operators.i32_gt_s, Operators.i64_gt_s)]);

         case 80 : 

             var t$46 = Lexing.sub_lexeme(lexbuf$1, lexbuf$1[/* lex_start_pos */4], lexbuf$1[/* lex_start_pos */4] + 3 | 0);

-            return /* COMPARE */Block.__(13, [intop(t$46, Operators.i32_gt_u, Operators.i64_gt_u)]);

+            return /* COMPARE */Block.__(14, [intop(t$46, Operators.i32_gt_u, Operators.i64_gt_u)]);

         case 81 : 

             var t$47 = Lexing.sub_lexeme(lexbuf$1, lexbuf$1[/* lex_start_pos */4], lexbuf$1[/* lex_start_pos */4] + 3 | 0);

-            return /* COMPARE */Block.__(13, [intop(t$47, Operators.i32_ge_s, Operators.i64_ge_s)]);

+            return /* COMPARE */Block.__(14, [intop(t$47, Operators.i32_ge_s, Operators.i64_ge_s)]);

         case 82 : 

             var t$48 = Lexing.sub_lexeme(lexbuf$1, lexbuf$1[/* lex_start_pos */4], lexbuf$1[/* lex_start_pos */4] + 3 | 0);

-            return /* COMPARE */Block.__(13, [intop(t$48, Operators.i32_ge_u, Operators.i64_ge_u)]);

+            return /* COMPARE */Block.__(14, [intop(t$48, Operators.i32_ge_u, Operators.i64_ge_u)]);

         case 83 : 

             var t$49 = Lexing.sub_lexeme(lexbuf$1, lexbuf$1[/* lex_start_pos */4], lexbuf$1[/* lex_start_pos */4] + 3 | 0);

-            return /* COMPARE */Block.__(13, [floatop(t$49, Operators.f32_eq, Operators.f64_eq)]);

+            return /* COMPARE */Block.__(14, [floatop(t$49, Operators.f32_eq, Operators.f64_eq)]);

         case 84 : 

             var t$50 = Lexing.sub_lexeme(lexbuf$1, lexbuf$1[/* lex_start_pos */4], lexbuf$1[/* lex_start_pos */4] + 3 | 0);

-            return /* COMPARE */Block.__(13, [floatop(t$50, Operators.f32_ne, Operators.f64_ne)]);

+            return /* COMPARE */Block.__(14, [floatop(t$50, Operators.f32_ne, Operators.f64_ne)]);

         case 85 : 

             var t$51 = Lexing.sub_lexeme(lexbuf$1, lexbuf$1[/* lex_start_pos */4], lexbuf$1[/* lex_start_pos */4] + 3 | 0);

-            return /* COMPARE */Block.__(13, [floatop(t$51, Operators.f32_lt, Operators.f64_lt)]);

+            return /* COMPARE */Block.__(14, [floatop(t$51, Operators.f32_lt, Operators.f64_lt)]);

         case 86 : 

             var t$52 = Lexing.sub_lexeme(lexbuf$1, lexbuf$1[/* lex_start_pos */4], lexbuf$1[/* lex_start_pos */4] + 3 | 0);

-            return /* COMPARE */Block.__(13, [floatop(t$52, Operators.f32_le, Operators.f64_le)]);

+            return /* COMPARE */Block.__(14, [floatop(t$52, Operators.f32_le, Operators.f64_le)]);

         case 87 : 

             var t$53 = Lexing.sub_lexeme(lexbuf$1, lexbuf$1[/* lex_start_pos */4], lexbuf$1[/* lex_start_pos */4] + 3 | 0);

-            return /* COMPARE */Block.__(13, [floatop(t$53, Operators.f32_gt, Operators.f64_gt)]);

+            return /* COMPARE */Block.__(14, [floatop(t$53, Operators.f32_gt, Operators.f64_gt)]);

         case 88 : 

             var t$54 = Lexing.sub_lexeme(lexbuf$1, lexbuf$1[/* lex_start_pos */4], lexbuf$1[/* lex_start_pos */4] + 3 | 0);

-            return /* COMPARE */Block.__(13, [floatop(t$54, Operators.f32_ge, Operators.f64_ge)]);

+            return /* COMPARE */Block.__(14, [floatop(t$54, Operators.f32_ge, Operators.f64_ge)]);

         case 89 : 

-            return /* CONVERT */Block.__(14, [Operators.i32_wrap_i64]);

+            return /* CONVERT */Block.__(15, [Operators.i32_wrap_i64]);

         case 90 : 

-            return /* CONVERT */Block.__(14, [Operators.i64_extend_s_i32]);

+            return /* CONVERT */Block.__(15, [Operators.i64_extend_s_i32]);

         case 91 : 

-            return /* CONVERT */Block.__(14, [Operators.i64_extend_u_i32]);

+            return /* CONVERT */Block.__(15, [Operators.i64_extend_u_i32]);

         case 92 : 

-            return /* CONVERT */Block.__(14, [Operators.f32_demote_f64]);

+            return /* CONVERT */Block.__(15, [Operators.f32_demote_f64]);

         case 93 : 

-            return /* CONVERT */Block.__(14, [Operators.f64_promote_f32]);

+            return /* CONVERT */Block.__(15, [Operators.f64_promote_f32]);

         case 94 : 

             var t$55 = Lexing.sub_lexeme(lexbuf$1, lexbuf$1[/* lex_start_pos */4], lexbuf$1[/* lex_start_pos */4] + 3 | 0);

-            return /* CONVERT */Block.__(14, [intop(t$55, Operators.i32_trunc_s_f32, Operators.i64_trunc_s_f32)]);

+            return /* CONVERT */Block.__(15, [intop(t$55, Operators.i32_trunc_s_f32, Operators.i64_trunc_s_f32)]);

         case 95 : 

             var t$56 = Lexing.sub_lexeme(lexbuf$1, lexbuf$1[/* lex_start_pos */4], lexbuf$1[/* lex_start_pos */4] + 3 | 0);

-            return /* CONVERT */Block.__(14, [intop(t$56, Operators.i32_trunc_u_f32, Operators.i64_trunc_u_f32)]);

+            return /* CONVERT */Block.__(15, [intop(t$56, Operators.i32_trunc_u_f32, Operators.i64_trunc_u_f32)]);

         case 96 : 

             var t$57 = Lexing.sub_lexeme(lexbuf$1, lexbuf$1[/* lex_start_pos */4], lexbuf$1[/* lex_start_pos */4] + 3 | 0);

-            return /* CONVERT */Block.__(14, [intop(t$57, Operators.i32_trunc_s_f64, Operators.i64_trunc_s_f64)]);

+            return /* CONVERT */Block.__(15, [intop(t$57, Operators.i32_trunc_s_f64, Operators.i64_trunc_s_f64)]);

         case 97 : 

             var t$58 = Lexing.sub_lexeme(lexbuf$1, lexbuf$1[/* lex_start_pos */4], lexbuf$1[/* lex_start_pos */4] + 3 | 0);

-            return /* CONVERT */Block.__(14, [intop(t$58, Operators.i32_trunc_u_f64, Operators.i64_trunc_u_f64)]);

+            return /* CONVERT */Block.__(15, [intop(t$58, Operators.i32_trunc_u_f64, Operators.i64_trunc_u_f64)]);

         case 98 : 

             var t$59 = Lexing.sub_lexeme(lexbuf$1, lexbuf$1[/* lex_start_pos */4], lexbuf$1[/* lex_start_pos */4] + 3 | 0);

-            return /* CONVERT */Block.__(14, [floatop(t$59, Operators.f32_convert_s_i32, Operators.f64_convert_s_i32)]);

+            return /* CONVERT */Block.__(15, [floatop(t$59, Operators.f32_convert_s_i32, Operators.f64_convert_s_i32)]);

         case 99 : 

             var t$60 = Lexing.sub_lexeme(lexbuf$1, lexbuf$1[/* lex_start_pos */4], lexbuf$1[/* lex_start_pos */4] + 3 | 0);

-            return /* CONVERT */Block.__(14, [floatop(t$60, Operators.f32_convert_u_i32, Operators.f64_convert_u_i32)]);

+            return /* CONVERT */Block.__(15, [floatop(t$60, Operators.f32_convert_u_i32, Operators.f64_convert_u_i32)]);

         case 100 : 

             var t$61 = Lexing.sub_lexeme(lexbuf$1, lexbuf$1[/* lex_start_pos */4], lexbuf$1[/* lex_start_pos */4] + 3 | 0);

-            return /* CONVERT */Block.__(14, [floatop(t$61, Operators.f32_convert_s_i64, Operators.f64_convert_s_i64)]);

+            return /* CONVERT */Block.__(15, [floatop(t$61, Operators.f32_convert_s_i64, Operators.f64_convert_s_i64)]);

         case 101 : 

             var t$62 = Lexing.sub_lexeme(lexbuf$1, lexbuf$1[/* lex_start_pos */4], lexbuf$1[/* lex_start_pos */4] + 3 | 0);

-            return /* CONVERT */Block.__(14, [floatop(t$62, Operators.f32_convert_u_i64, Operators.f64_convert_u_i64)]);

+            return /* CONVERT */Block.__(15, [floatop(t$62, Operators.f32_convert_u_i64, Operators.f64_convert_u_i64)]);

         case 102 : 

-            return /* CONVERT */Block.__(14, [Operators.f32_reinterpret_i32]);

+            return /* CONVERT */Block.__(15, [Operators.f32_reinterpret_i32]);

         case 103 : 

-            return /* CONVERT */Block.__(14, [Operators.f64_reinterpret_i64]);

+            return /* CONVERT */Block.__(15, [Operators.f64_reinterpret_i64]);

         case 104 : 

-            return /* CONVERT */Block.__(14, [Operators.i32_reinterpret_f32]);

+            return /* CONVERT */Block.__(15, [Operators.i32_reinterpret_f32]);

         case 105 : 

-            return /* CONVERT */Block.__(14, [Operators.i64_reinterpret_f64]);

+            return /* CONVERT */Block.__(15, [Operators.i64_reinterpret_f64]);

         case 106 : 

             return /* CURRENT_MEMORY */25;

         case 107 : 

@@ -21045,66 +20585,75 @@
         case 114 : 

             return /* GLOBAL */33;

         case 115 : 

-            return /* MODULE */34;

+            return /* TABLE */34;

         case 116 : 

-            return /* TABLE */35;

+            return /* MEMORY */36;

         case 117 : 

-            return /* MEMORY */37;

+            return /* ELEM */35;

         case 118 : 

-            return /* ELEM */36;

+            return /* DATA */37;

         case 119 : 

-            return /* DATA */38;

+            return /* OFFSET */38;

         case 120 : 

-            return /* OFFSET */39;

+            return /* IMPORT */39;

         case 121 : 

-            return /* IMPORT */40;

+            return /* EXPORT */40;

         case 122 : 

-            return /* EXPORT */41;

+            return /* MODULE */41;

         case 123 : 

-            return /* SCRIPT */42;

+            return /* BIN */42;

         case 124 : 

-            return /* REGISTER */43;

+            return /* QUOTE */43;

         case 125 : 

-            return /* INVOKE */44;

+            return /* SCRIPT */44;

         case 126 : 

-            return /* GET */45;

+            return /* REGISTER */45;

         case 127 : 

-            return /* ASSERT_MALFORMED */46;

+            return /* INVOKE */46;

         case 128 : 

-            return /* ASSERT_INVALID */47;

+            return /* GET */47;

         case 129 : 

-            return /* ASSERT_SOFT_INVALID */48;

+            return /* ASSERT_MALFORMED */48;

         case 130 : 

-            return /* ASSERT_UNLINKABLE */49;

+            return /* ASSERT_INVALID */49;

         case 131 : 

-            return /* ASSERT_RETURN */50;

+            return /* ASSERT_UNLINKABLE */51;

         case 132 : 

-            return /* ASSERT_RETURN_NAN */51;

+            return /* ASSERT_RETURN */52;

         case 133 : 

-            return /* ASSERT_TRAP */52;

+            return /* ASSERT_RETURN_CANONICAL_NAN */53;

         case 134 : 

-            return /* ASSERT_EXHAUSTION */53;

+            return /* ASSERT_RETURN_ARITHMETIC_NAN */54;

         case 135 : 

-            return /* INPUT */54;

+            return /* ASSERT_TRAP */55;

         case 136 : 

-            return /* OUTPUT */55;

+            return /* ASSERT_EXHAUSTION */56;

         case 137 : 

+            return /* INPUT */57;

+        case 138 : 

+            return /* OUTPUT */58;

+        case 139 : 

             var s$7 = Lexing.sub_lexeme(lexbuf$1, lexbuf$1[/* lex_start_pos */4], lexbuf$1[/* lex_curr_pos */5]);

             return /* VAR */Block.__(4, [s$7]);

-        case 140 : 

-            __ocaml_lex_comment_rec(Lexing.lexeme_start_p(lexbuf$1), lexbuf$1, 684);

+        case 143 : 

+            __ocaml_lex_comment_rec(Lexing.lexeme_start_p(lexbuf$1), lexbuf$1, 746);

+            return token(lexbuf$1);

+        case 142 : 

+        case 144 : 

             return token(lexbuf$1);

         case 141 : 

-            return token(lexbuf$1);

-        case 139 : 

-        case 142 : 

+        case 145 : 

             Lexing.new_line(lexbuf$1);

             return token(lexbuf$1);

-        case 138 : 

-        case 143 : 

-            return /* EOF */56;

-        case 144 : 

+        case 140 : 

+        case 146 : 

+            return /* EOF */59;

+        case 147 : 

             return error(lexbuf$1, "unknown operator");

+        case 148 : 

+            return error(lexbuf$1, "malformed operator");

+        case 149 : 

+            return error(lexbuf$1, "malformed UTF-8 encoding");

         

       }

     }

@@ -21115,30 +20664,31 @@
   while(true) {

     var __ocaml_lex_state = ___ocaml_lex_state;

     var __ocaml_lex_state$1 = Lexing.engine(__ocaml_lex_tables, __ocaml_lex_state, lexbuf);

-    if (__ocaml_lex_state$1 > 4 || __ocaml_lex_state$1 < 0) {

+    if (__ocaml_lex_state$1 > 5 || __ocaml_lex_state$1 < 0) {

       Curry._1(lexbuf[/* refill_buff */0], lexbuf);

       ___ocaml_lex_state = __ocaml_lex_state$1;

       continue ;

       

-    }

-    else {

+    } else {

       switch (__ocaml_lex_state$1) {

         case 0 : 

             return /* () */0;

         case 1 : 

-            __ocaml_lex_comment_rec(Lexing.lexeme_start_p(lexbuf), lexbuf, 684);

-            ___ocaml_lex_state = 684;

+            __ocaml_lex_comment_rec(Lexing.lexeme_start_p(lexbuf), lexbuf, 746);

+            ___ocaml_lex_state = 746;

             continue ;

             case 2 : 

             Lexing.new_line(lexbuf);

-            ___ocaml_lex_state = 684;

+            ___ocaml_lex_state = 746;

             continue ;

             case 3 : 

             return error_nest(start, lexbuf, "unclosed comment");

         case 4 : 

-            ___ocaml_lex_state = 684;

+            ___ocaml_lex_state = 746;

             continue ;

-            

+            case 5 : 

+            return error(lexbuf, "malformed UTF-8 encoding");

+        

       }

     }

   };

@@ -21157,14 +20707,15 @@
 //////// start of lexing.js ////////

 'use strict';

 

-var Sys                     = require("./sys");

-var Bytes                   = require("./bytes");

-var Curry                   = require("./curry");

-var Caml_bytes              = require("./caml_bytes");

-var Caml_lexer              = require("./caml_lexer");

-var Pervasives              = require("./pervasives");

-var Caml_string             = require("./caml_string");

-var Caml_builtin_exceptions = require("./caml_builtin_exceptions");

+var Sys                     = require("./sys.js");

+var Bytes                   = require("./bytes.js");

+var Curry                   = require("./curry.js");

+var Caml_array              = require("./caml_array.js");

+var Caml_bytes              = require("./caml_bytes.js");

+var Caml_lexer              = require("./caml_lexer.js");

+var Pervasives              = require("./pervasives.js");

+var Caml_string             = require("./caml_string.js");

+var Caml_builtin_exceptions = require("./caml_builtin_exceptions.js");

 

 function engine(tbl, state, buf) {

   var result = Caml_lexer.caml_lex_engine(tbl, state, buf);

@@ -21215,8 +20766,7 @@
             if ((lexbuf[/* lex_buffer_len */2] + n | 0) > lexbuf[/* lex_buffer */1].length) {

               if (((lexbuf[/* lex_buffer_len */2] - lexbuf[/* lex_start_pos */4] | 0) + n | 0) <= lexbuf[/* lex_buffer */1].length) {

                 Bytes.blit(lexbuf[/* lex_buffer */1], lexbuf[/* lex_start_pos */4], lexbuf[/* lex_buffer */1], 0, lexbuf[/* lex_buffer_len */2] - lexbuf[/* lex_start_pos */4] | 0);

-              }

-              else {

+              } else {

                 var newlen = Pervasives.min((lexbuf[/* lex_buffer */1].length << 1), Sys.max_string_length);

                 if (((lexbuf[/* lex_buffer_len */2] - lexbuf[/* lex_start_pos */4] | 0) + n | 0) > newlen) {

                   throw [

@@ -21236,9 +20786,9 @@
               lexbuf[/* lex_buffer_len */2] = lexbuf[/* lex_buffer_len */2] - s | 0;

               var t = lexbuf[/* lex_mem */9];

               for(var i = 0 ,i_finish = t.length - 1 | 0; i <= i_finish; ++i){

-                var v = t[i];

+                var v = Caml_array.caml_array_get(t, i);

                 if (v >= 0) {

-                  t[i] = v - s | 0;

+                  Caml_array.caml_array_set(t, i, v - s | 0);

                 }

                 

               }

@@ -21301,8 +20851,7 @@
   if (i1 >= 0) {

     var len = i2 - i1 | 0;

     return /* Some */[Bytes.sub_string(lexbuf[/* lex_buffer */1], i1, len)];

-  }

-  else {

+  } else {

     return /* None */0;

   }

 }

@@ -21314,8 +20863,7 @@
 function sub_lexeme_char_opt(lexbuf, i) {

   if (i >= 0) {

     return /* Some */[Caml_bytes.get(lexbuf[/* lex_buffer */1], i)];

-  }

-  else {

+  } else {

     return /* None */0;

   }

 }

@@ -21399,19 +20947,23 @@
   _registry['lib'] = function() {

     let exports = {};

 //////// start of lib.js ////////

-// Generated by BUCKLESCRIPT VERSION 1.4.3 , PLEASE EDIT WITH CARE

+// Generated by BUCKLESCRIPT VERSION 1.7.4, PLEASE EDIT WITH CARE

 'use strict';

 

-var $$Array                 = require("bs-platform/lib/js/array");

-var Curry                   = require("bs-platform/lib/js/curry");

-var Int32                   = require("bs-platform/lib/js/int32");

-var $$String                = require("bs-platform/lib/js/string");

-var Bigarray                = require("bs-platform/lib/js/bigarray");

-var Caml_obj                = require("bs-platform/lib/js/caml_obj");

-var Caml_array              = require("bs-platform/lib/js/caml_array");

-var Caml_int64              = require("bs-platform/lib/js/caml_int64");

-var Pervasives              = require("bs-platform/lib/js/pervasives");

-var Caml_builtin_exceptions = require("bs-platform/lib/js/caml_builtin_exceptions");

+var List                    = require("bs-platform/lib/js/list.js");

+var $$Array                 = require("bs-platform/lib/js/array.js");

+var Curry                   = require("bs-platform/lib/js/curry.js");

+var Int32                   = require("bs-platform/lib/js/int32.js");

+var Buffer                  = require("bs-platform/lib/js/buffer.js");

+var $$String                = require("bs-platform/lib/js/string.js");

+var Bigarray                = require("bs-platform/lib/js/bigarray.js");

+var Caml_obj                = require("bs-platform/lib/js/caml_obj.js");

+var Caml_array              = require("bs-platform/lib/js/caml_array.js");

+var Caml_int64              = require("bs-platform/lib/js/caml_int64.js");

+var Pervasives              = require("bs-platform/lib/js/pervasives.js");

+var Caml_string             = require("bs-platform/lib/js/caml_string.js");

+var Caml_missing_polyfill   = require("bs-platform/lib/js/caml_missing_polyfill.js");

+var Caml_builtin_exceptions = require("bs-platform/lib/js/caml_builtin_exceptions.js");

 

 function repeat(_n, f, x) {

   while(true) {

@@ -21421,8 +20973,7 @@
       _n = n - 1 | 0;

       continue ;

       

-    }

-    else {

+    } else {

       return /* () */0;

     }

   };

@@ -21430,14 +20981,116 @@
 

 var Fun = /* module */[/* repeat */repeat];

 

+function log2(n) {

+  if (n <= 0) {

+    Pervasives.failwith("log2");

+  }

+  var _acc = 0;

+  var _n = n;

+  while(true) {

+    var n$1 = _n;

+    var acc = _acc;

+    if (n$1 === 1) {

+      return acc;

+    } else {

+      _n = (n$1 >>> 1);

+      _acc = acc + 1 | 0;

+      continue ;

+      

+    }

+  };

+}

+

+function is_power_of_two(n) {

+  if (n < 0) {

+    Pervasives.failwith("is_power_of_two");

+  }

+  if (n !== 0) {

+    return +((n & (n - 1 | 0)) === 0);

+  } else {

+    return /* false */0;

+  }

+}

+

+var Int = /* module */[

+  /* log2 */log2,

+  /* is_power_of_two */is_power_of_two

+];

+

+function implode(cs) {

+  var buf = Buffer.create(80);

+  List.iter(function (param) {

+        return Buffer.add_char(buf, param);

+      }, cs);

+  return Buffer.contents(buf);

+}

+

+function explode(s) {

+  var cs = /* [] */0;

+  for(var i = s.length - 1 | 0; i >= 0; --i){

+    cs = /* :: */[

+      Caml_string.get(s, i),

+      cs

+    ];

+  }

+  return cs;

+}

+

+function split(s, c) {

+  var len = s.length;

+  var loop = function (i) {

+    if (i > len) {

+      return /* [] */0;

+    } else {

+      var j;

+      try {

+        j = $$String.index_from(s, i, c);

+      }

+      catch (exn){

+        if (exn === Caml_builtin_exceptions.not_found) {

+          j = len;

+        } else {

+          throw exn;

+        }

+      }

+      return /* :: */[

+              $$String.sub(s, i, j - i | 0),

+              loop(j + 1 | 0)

+            ];

+    }

+  };

+  return loop(0);

+}

+

+function breakup(s, n) {

+  var loop = function (i) {

+    var len = Pervasives.min(n, s.length - i | 0);

+    if (len) {

+      return /* :: */[

+              $$String.sub(s, i, len),

+              loop(i + len | 0)

+            ];

+    } else {

+      return /* [] */0;

+    }

+  };

+  return loop(0);

+}

+

+var $$String$1 = /* module */[

+  /* implode */implode,

+  /* explode */explode,

+  /* split */split,

+  /* breakup */breakup

+];

+

 function make(n, x) {

   if (n) {

     return /* :: */[

             x,

             make(n - 1 | 0, x)

           ];

-  }

-  else {

+  } else {

     return /* [] */0;

   }

 }

@@ -21445,8 +21098,7 @@
 function table$prime(i, n, f) {

   if (i === n) {

     return /* [] */0;

-  }

-  else {

+  } else {

     return /* :: */[

             Curry._1(f, i),

             table$prime(i + 1 | 0, n, f)

@@ -21466,16 +21118,13 @@
                 xs[0],

                 take(n - 1 | 0, xs[1])

               ];

-      }

-      else {

+      } else {

         return Pervasives.failwith("take");

       }

-    }

-    else {

+    } else {

       return Pervasives.failwith("take");

     }

-  }

-  else {

+  } else {

     return /* [] */0;

   }

 }

@@ -21491,16 +21140,13 @@
           _n = n - 1 | 0;

           continue ;

           

-        }

-        else {

+        } else {

           return Pervasives.failwith("drop");

         }

-      }

-      else {

+      } else {

         return Pervasives.failwith("drop");

       }

-    }

-    else {

+    } else {

       return xs;

     }

   };

@@ -21515,12 +21161,10 @@
         _param = xs;

         continue ;

         

-      }

-      else {

+      } else {

         return param[0];

       }

-    }

-    else {

+    } else {

       return Pervasives.failwith("last");

     }

   };

@@ -21539,15 +21183,13 @@
               ],

               match[1]

             ];

-    }

-    else {

+    } else {

       return /* tuple */[

               /* [] */0,

               x

             ];

     }

-  }

-  else {

+  } else {

     return Pervasives.failwith("split_last");

   }

 }

@@ -21562,15 +21204,13 @@
     if (xs$1) {

       if (Caml_obj.caml_equal(x$1, xs$1[0])) {

         return /* Some */[i];

-      }

-      else {

+      } else {

         _i = i + 1 | 0;

         _xs = xs$1[1];

         continue ;

         

       }

-    }

-    else {

+    } else {

       return /* None */0;

     }

   };

@@ -21588,12 +21228,10 @@
         _xs = xs$1[1];

         continue ;

         

-      }

-      else {

+      } else {

         return Pervasives.failwith("length");

       }

-    }

-    else {

+    } else {

       return n;

     }

   };

@@ -21610,19 +21248,15 @@
           _xs = xs[1];

           continue ;

           

-        }

-        else {

+        } else {

           return Pervasives.failwith("nth");

         }

-      }

-      else {

+      } else {

         return Pervasives.failwith("nth");

       }

-    }

-    else if (xs) {

+    } else if (xs) {

       return xs[0];

-    }

-    else {

+    } else {

       return Pervasives.failwith("nth");

     }

   };

@@ -21636,16 +21270,13 @@
                 xs[0],

                 take$1(n - 1 | 0, xs[1])

               ];

-      }

-      else {

+      } else {

         return Pervasives.failwith("take");

       }

-    }

-    else {

+    } else {

       return Pervasives.failwith("take");

     }

-  }

-  else {

+  } else {

     return /* [] */0;

   }

 }

@@ -21661,16 +21292,13 @@
           _n = n - 1 | 0;

           continue ;

           

-        }

-        else {

+        } else {

           return Pervasives.failwith("drop");

         }

-      }

-      else {

+      } else {

         return Pervasives.failwith("drop");

       }

-    }

-    else {

+    } else {

       return xs;

     }

   };

@@ -21693,19 +21321,17 @@
 function index_of_int32(i) {

   if (i < 0 || Caml_int64.gt(Caml_int64.of_int32(i), Caml_int64.of_int32(Pervasives.max_int))) {

     return -1;

-  }

-  else {

+  } else {

     return i;

   }

 }

 

 function get(a, i) {

-  return a[index_of_int32(i)];

+  return Caml_array.caml_array_get(a, index_of_int32(i));

 }

 

 function set(a, i, x) {

-  a[index_of_int32(i)] = x;

-  return /* () */0;

+  return Caml_array.caml_array_set(a, index_of_int32(i), x);

 }

 

 function blit(a1, i1, a2, i2, n) {

@@ -21726,34 +21352,25 @@
 }

 

 function dim() {

-  return Caml_int64.of_int32(function () {

-                throw "caml_ba_dim_1 not implemented by bucklescript yet\n";

-              }());

+  return Caml_int64.of_int32(Caml_missing_polyfill.not_implemented("caml_ba_dim_1 not implemented by bucklescript yet\n"));

 }

 

 function get$1(_, _$1) {

-  return function () {

-            throw "caml_ba_get_1 not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ba_get_1 not implemented by bucklescript yet\n");

 }

 

 function set$1(_, _$1, _$2) {

-  return function () {

-            throw "caml_ba_set_1 not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ba_set_1 not implemented by bucklescript yet\n");

 }

 

 function sub(_, _$1, _$2) {

-  return function () {

-            throw "caml_ba_sub not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ba_sub not implemented by bucklescript yet\n");

 }

 

 function get$2(o, x) {

   if (o) {

     return o[0];

-  }

-  else {

+  } else {

     return x;

   }

 }

@@ -21761,8 +21378,7 @@
 function map(f, param) {

   if (param) {

     return /* Some */[Curry._1(f, param[0])];

-  }

-  else {

+  } else {

     return /* None */0;

   }

 }

@@ -21770,8 +21386,7 @@
 function app(f, param) {

   if (param) {

     return Curry._1(f, param[0]);

-  }

-  else {

+  } else {

     return /* () */0;

   }

 }

@@ -21782,63 +21397,7 @@
   /* app */app

 ];

 

-function log2(n) {

-  if (n <= 0) {

-    Pervasives.failwith("log2");

-  }

-  var _acc = 0;

-  var _n = n;

-  while(true) {

-    var n$1 = _n;

-    var acc = _acc;

-    if (n$1 === 1) {

-      return acc;

-    }

-    else {

-      _n = (n$1 >>> 1);

-      _acc = acc + 1 | 0;

-      continue ;

-      

-    }

-  };

-}

-

-function is_power_of_two(n) {

-  if (n < 0) {

-    Pervasives.failwith("is_power_of_two");

-  }

-  if (n !== 0) {

-    return +((n & (n - 1 | 0)) === 0);

-  }

-  else {

-    return /* false */0;

-  }

-}

-

-var Int = /* module */[

-  /* log2 */log2,

-  /* is_power_of_two */is_power_of_two

-];

-

-function breakup(s, n) {

-  var loop = function (i) {

-    var len = Pervasives.min(n, s.length - i | 0);

-    if (len) {

-      return /* :: */[

-              $$String.sub(s, i, len),

-              loop(i + len | 0)

-            ];

-    }

-    else {

-      return /* [] */0;

-    }

-  };

-  return loop(0);

-}

-

-var $$String$1 = /* module */[/* breakup */breakup];

-

-var List = [

+var List$1 = [

   make,

   table,

   take,

@@ -21872,7 +21431,7 @@
   ]];

 

 exports.Fun      = Fun;

-exports.List     = List;

+exports.List     = List$1;

 exports.List32   = List32;

 exports.Array32  = Array32;

 exports.Bigarray = Bigarray$1;

@@ -21890,10 +21449,10 @@
 //////// start of list.js ////////

 'use strict';

 

-var Curry                   = require("./curry");

-var Caml_obj                = require("./caml_obj");

-var Pervasives              = require("./pervasives");

-var Caml_builtin_exceptions = require("./caml_builtin_exceptions");

+var Curry                   = require("./curry.js");

+var Caml_obj                = require("./caml_obj.js");

+var Pervasives              = require("./pervasives.js");

+var Caml_builtin_exceptions = require("./caml_builtin_exceptions.js");

 

 function length(l) {

   var _len = 0;

@@ -21906,8 +21465,7 @@
       _len = len + 1 | 0;

       continue ;

       

-    }

-    else {

+    } else {

       return len;

     }

   };

@@ -21916,8 +21474,7 @@
 function hd(param) {

   if (param) {

     return param[0];

-  }

-  else {

+  } else {

     throw [

           Caml_builtin_exceptions.failure,

           "hd"

@@ -21928,8 +21485,7 @@
 function tl(param) {

   if (param) {

     return param[1];

-  }

-  else {

+  } else {

     throw [

           Caml_builtin_exceptions.failure,

           "tl"

@@ -21943,8 +21499,7 @@
           Caml_builtin_exceptions.invalid_argument,

           "List.nth"

         ];

-  }

-  else {

+  } else {

     var _l = l;

     var _n = n;

     while(true) {

@@ -21956,12 +21511,10 @@
           _l = l$1[1];

           continue ;

           

-        }

-        else {

+        } else {

           return l$1[0];

         }

-      }

-      else {

+      } else {

         throw [

               Caml_builtin_exceptions.failure,

               "nth"

@@ -21983,8 +21536,7 @@
       _l1 = l1[1];

       continue ;

       

-    }

-    else {

+    } else {

       return l2;

     }

   };

@@ -21997,8 +21549,7 @@
 function flatten(param) {

   if (param) {

     return Pervasives.$at(param[0], flatten(param[1]));

-  }

-  else {

+  } else {

     return /* [] */0;

   }

 }

@@ -22010,8 +21561,7 @@
             r,

             map(f, param[1])

           ];

-  }

-  else {

+  } else {

     return /* [] */0;

   }

 }

@@ -22023,8 +21573,7 @@
             r,

             mapi(i + 1 | 0, f, param[1])

           ];

-  }

-  else {

+  } else {

     return /* [] */0;

   }

 }

@@ -22047,8 +21596,7 @@
       ];

       continue ;

       

-    }

-    else {

+    } else {

       return accu;

     }

   };

@@ -22062,8 +21610,7 @@
       _param = param[1];

       continue ;

       

-    }

-    else {

+    } else {

       return /* () */0;

     }

   };

@@ -22082,8 +21629,7 @@
       _i = i + 1 | 0;

       continue ;

       

-    }

-    else {

+    } else {

       return /* () */0;

     }

   };

@@ -22098,8 +21644,7 @@
       _accu = Curry._2(f, accu, l[0]);

       continue ;

       

-    }

-    else {

+    } else {

       return accu;

     }

   };

@@ -22108,8 +21653,7 @@
 function fold_right(f, l, accu) {

   if (l) {

     return Curry._2(f, l[0], fold_right(f, l[1], accu));

-  }

-  else {

+  } else {

     return accu;

   }

 }

@@ -22122,21 +21666,18 @@
               r,

               map2(f, l1[1], l2[1])

             ];

-    }

-    else {

+    } else {

       throw [

             Caml_builtin_exceptions.invalid_argument,

             "List.map2"

           ];

     }

-  }

-  else if (l2) {

+  } else if (l2) {

     throw [

           Caml_builtin_exceptions.invalid_argument,

           "List.map2"

         ];

-  }

-  else {

+  } else {

     return /* [] */0;

   }

 }

@@ -22159,21 +21700,18 @@
         ];

         continue ;

         

-      }

-      else {

+      } else {

         throw [

               Caml_builtin_exceptions.invalid_argument,

               "List.rev_map2"

             ];

       }

-    }

-    else if (l2$1) {

+    } else if (l2$1) {

       throw [

             Caml_builtin_exceptions.invalid_argument,

             "List.rev_map2"

           ];

-    }

-    else {

+    } else {

       return accu;

     }

   };

@@ -22190,21 +21728,18 @@
         _l1 = l1[1];

         continue ;

         

-      }

-      else {

+      } else {

         throw [

               Caml_builtin_exceptions.invalid_argument,

               "List.iter2"

             ];

       }

-    }

-    else if (l2) {

+    } else if (l2) {

       throw [

             Caml_builtin_exceptions.invalid_argument,

             "List.iter2"

           ];

-    }

-    else {

+    } else {

       return /* () */0;

     }

   };

@@ -22222,21 +21757,18 @@
         _accu = Curry._3(f, accu, l1[0], l2[0]);

         continue ;

         

-      }

-      else {

+      } else {

         throw [

               Caml_builtin_exceptions.invalid_argument,

               "List.fold_left2"

             ];

       }

-    }

-    else if (l2) {

+    } else if (l2) {

       throw [

             Caml_builtin_exceptions.invalid_argument,

             "List.fold_left2"

           ];

-    }

-    else {

+    } else {

       return accu;

     }

   };

@@ -22246,21 +21778,18 @@
   if (l1) {

     if (l2) {

       return Curry._3(f, l1[0], l2[0], fold_right2(f, l1[1], l2[1], accu));

-    }

-    else {

+    } else {

       throw [

             Caml_builtin_exceptions.invalid_argument,

             "List.fold_right2"

           ];

     }

-  }

-  else if (l2) {

+  } else if (l2) {

     throw [

           Caml_builtin_exceptions.invalid_argument,

           "List.fold_right2"

         ];

-  }

-  else {

+  } else {

     return accu;

   }

 }

@@ -22273,12 +21802,10 @@
         _param = param[1];

         continue ;

         

-      }

-      else {

+      } else {

         return /* false */0;

       }

-    }

-    else {

+    } else {

       return /* true */1;

     }

   };

@@ -22290,14 +21817,12 @@
     if (param) {

       if (Curry._1(p, param[0])) {

         return /* true */1;

-      }

-      else {

+      } else {

         _param = param[1];

         continue ;

         

       }

-    }

-    else {

+    } else {

       return /* false */0;

     }

   };

@@ -22314,25 +21839,21 @@
           _l1 = l1[1];

           continue ;

           

-        }

-        else {

+        } else {

           return /* false */0;

         }

-      }

-      else {

+      } else {

         throw [

               Caml_builtin_exceptions.invalid_argument,

               "List.for_all2"

             ];

       }

-    }

-    else if (l2) {

+    } else if (l2) {

       throw [

             Caml_builtin_exceptions.invalid_argument,

             "List.for_all2"

           ];

-    }

-    else {

+    } else {

       return /* true */1;

     }

   };

@@ -22346,28 +21867,24 @@
       if (l2) {

         if (Curry._2(p, l1[0], l2[0])) {

           return /* true */1;

-        }

-        else {

+        } else {

           _l2 = l2[1];

           _l1 = l1[1];

           continue ;

           

         }

-      }

-      else {

+      } else {

         throw [

               Caml_builtin_exceptions.invalid_argument,

               "List.exists2"

             ];

       }

-    }

-    else if (l2) {

+    } else if (l2) {

       throw [

             Caml_builtin_exceptions.invalid_argument,

             "List.exists2"

           ];

-    }

-    else {

+    } else {

       return /* false */0;

     }

   };

@@ -22381,12 +21898,10 @@
         _param = param[1];

         continue ;

         

-      }

-      else {

+      } else {

         return /* true */1;

       }

-    }

-    else {

+    } else {

       return /* false */0;

     }

   };

@@ -22398,14 +21913,12 @@
     if (param) {

       if (param[0] === x) {

         return /* true */1;

-      }

-      else {

+      } else {

         _param = param[1];

         continue ;

         

       }

-    }

-    else {

+    } else {

       return /* false */0;

     }

   };

@@ -22420,12 +21933,10 @@
         _param = param[1];

         continue ;

         

-      }

-      else {

+      } else {

         return match[1];

       }

-    }

-    else {

+    } else {

       throw Caml_builtin_exceptions.not_found;

     }

   };

@@ -22438,14 +21949,12 @@
       var match = param[0];

       if (match[0] === x) {

         return match[1];

-      }

-      else {

+      } else {

         _param = param[1];

         continue ;

         

       }

-    }

-    else {

+    } else {

       throw Caml_builtin_exceptions.not_found;

     }

   };

@@ -22459,12 +21968,10 @@
         _param = param[1];

         continue ;

         

-      }

-      else {

+      } else {

         return /* true */1;

       }

-    }

-    else {

+    } else {

       return /* false */0;

     }

   };

@@ -22476,14 +21983,12 @@
     if (param) {

       if (param[0][0] === x) {

         return /* true */1;

-      }

-      else {

+      } else {

         _param = param[1];

         continue ;

         

       }

-    }

-    else {

+    } else {

       return /* false */0;

     }

   };

@@ -22498,12 +22003,10 @@
               pair,

               remove_assoc(x, l)

             ];

-    }

-    else {

+    } else {

       return l;

     }

-  }

-  else {

+  } else {

     return /* [] */0;

   }

 }

@@ -22514,15 +22017,13 @@
     var pair = param[0];

     if (pair[0] === x) {

       return l;

-    }

-    else {

+    } else {

       return /* :: */[

               pair,

               remove_assq(x, l)

             ];

     }

-  }

-  else {

+  } else {

     return /* [] */0;

   }

 }

@@ -22534,14 +22035,12 @@
       var x = param[0];

       if (Curry._1(p, x)) {

         return x;

-      }

-      else {

+      } else {

         _param = param[1];

         continue ;

         

       }

-    }

-    else {

+    } else {

       throw Caml_builtin_exceptions.not_found;

     }

   };

@@ -22565,14 +22064,12 @@
           ];

           continue ;

           

-        }

-        else {

+        } else {

           _param = l;

           continue ;

           

         }

-      }

-      else {

+      } else {

         return rev_append(accu, /* [] */0);

       }

     };

@@ -22598,8 +22095,7 @@
         ];

         continue ;

         

-      }

-      else {

+      } else {

         _param = l$1;

         _no = /* :: */[

           x,

@@ -22608,8 +22104,7 @@
         continue ;

         

       }

-    }

-    else {

+    } else {

       return /* tuple */[

               rev_append(yes, /* [] */0),

               rev_append(no, /* [] */0)

@@ -22632,8 +22127,7 @@
               match$1[1]

             ]

           ];

-  }

-  else {

+  } else {

     return /* tuple */[

             /* [] */0,

             /* [] */0

@@ -22651,21 +22145,18 @@
               ],

               combine(l1[1], l2[1])

             ];

-    }

-    else {

+    } else {

       throw [

             Caml_builtin_exceptions.invalid_argument,

             "List.combine"

           ];

     }

-  }

-  else if (l2) {

+  } else if (l2) {

     throw [

           Caml_builtin_exceptions.invalid_argument,

           "List.combine"

         ];

-  }

-  else {

+  } else {

     return /* [] */0;

   }

 }

@@ -22680,19 +22171,16 @@
                 h1,

                 merge(cmp, l1[1], l2)

               ];

-      }

-      else {

+      } else {

         return /* :: */[

                 h2,

                 merge(cmp, l1, l2[1])

               ];

       }

-    }

-    else {

+    } else {

       return l1;

     }

-  }

-  else {

+  } else {

     return l2;

   }

 }

@@ -22707,8 +22195,7 @@
         _k = k - 1 | 0;

         continue ;

         

-      }

-      else {

+      } else {

         throw [

               Caml_builtin_exceptions.assert_failure,

               [

@@ -22718,8 +22205,7 @@
               ]

             ];

       }

-    }

-    else {

+    } else {

       return l;

     }

   };

@@ -22731,8 +22217,7 @@
     if (n !== 2) {

       if (n !== 3) {

         exit = 1;

-      }

-      else if (l) {

+      } else if (l) {

         var match = l[1];

         if (match) {

           var match$1 = match[1];

@@ -22752,8 +22237,7 @@
                           ]

                         ]

                       ];

-              }

-              else if (Curry._2(cmp, x1, x3) <= 0) {

+              } else if (Curry._2(cmp, x1, x3) <= 0) {

                 return /* :: */[

                         x1,

                         /* :: */[

@@ -22764,8 +22248,7 @@
                           ]

                         ]

                       ];

-              }

-              else {

+              } else {

                 return /* :: */[

                         x3,

                         /* :: */[

@@ -22777,8 +22260,7 @@
                         ]

                       ];

               }

-            }

-            else if (Curry._2(cmp, x1, x3) <= 0) {

+            } else if (Curry._2(cmp, x1, x3) <= 0) {

               return /* :: */[

                       x2,

                       /* :: */[

@@ -22789,8 +22271,7 @@
                         ]

                       ]

                     ];

-            }

-            else if (Curry._2(cmp, x2, x3) <= 0) {

+            } else if (Curry._2(cmp, x2, x3) <= 0) {

               return /* :: */[

                       x2,

                       /* :: */[

@@ -22801,8 +22282,7 @@
                         ]

                       ]

                     ];

-            }

-            else {

+            } else {

               return /* :: */[

                       x3,

                       /* :: */[

@@ -22814,20 +22294,16 @@
                       ]

                     ];

             }

-          }

-          else {

+          } else {

             exit = 1;

           }

-        }

-        else {

+        } else {

           exit = 1;

         }

-      }

-      else {

+      } else {

         exit = 1;

       }

-    }

-    else if (l) {

+    } else if (l) {

       var match$2 = l[1];

       if (match$2) {

         var x2$1 = match$2[0];

@@ -22840,8 +22316,7 @@
                     /* [] */0

                   ]

                 ];

-        }

-        else {

+        } else {

           return /* :: */[

                   x2$1,

                   /* :: */[

@@ -22850,12 +22325,10 @@
                   ]

                 ];

         }

-      }

-      else {

+      } else {

         exit = 1;

       }

-    }

-    else {

+    } else {

       exit = 1;

     }

     if (exit === 1) {

@@ -22883,8 +22356,7 @@
               _l1 = l1[1];

               continue ;

               

-            }

-            else {

+            } else {

               _accu = /* :: */[

                 h2,

                 accu

@@ -22893,12 +22365,10 @@
               continue ;

               

             }

-          }

-          else {

+          } else {

             return rev_append(l1, accu);

           }

-        }

-        else {

+        } else {

           return rev_append(l2$1, accu);

         }

       };

@@ -22910,8 +22380,7 @@
     if (n !== 2) {

       if (n !== 3) {

         exit = 1;

-      }

-      else if (l) {

+      } else if (l) {

         var match = l[1];

         if (match) {

           var match$1 = match[1];

@@ -22931,8 +22400,7 @@
                           ]

                         ]

                       ];

-              }

-              else if (Curry._2(cmp, x1, x3) > 0) {

+              } else if (Curry._2(cmp, x1, x3) > 0) {

                 return /* :: */[

                         x1,

                         /* :: */[

@@ -22943,8 +22411,7 @@
                           ]

                         ]

                       ];

-              }

-              else {

+              } else {

                 return /* :: */[

                         x3,

                         /* :: */[

@@ -22956,8 +22423,7 @@
                         ]

                       ];

               }

-            }

-            else if (Curry._2(cmp, x1, x3) > 0) {

+            } else if (Curry._2(cmp, x1, x3) > 0) {

               return /* :: */[

                       x2,

                       /* :: */[

@@ -22968,8 +22434,7 @@
                         ]

                       ]

                     ];

-            }

-            else if (Curry._2(cmp, x2, x3) > 0) {

+            } else if (Curry._2(cmp, x2, x3) > 0) {

               return /* :: */[

                       x2,

                       /* :: */[

@@ -22980,8 +22445,7 @@
                         ]

                       ]

                     ];

-            }

-            else {

+            } else {

               return /* :: */[

                       x3,

                       /* :: */[

@@ -22993,20 +22457,16 @@
                       ]

                     ];

             }

-          }

-          else {

+          } else {

             exit = 1;

           }

-        }

-        else {

+        } else {

           exit = 1;

         }

-      }

-      else {

+      } else {

         exit = 1;

       }

-    }

-    else if (l) {

+    } else if (l) {

       var match$2 = l[1];

       if (match$2) {

         var x2$1 = match$2[0];

@@ -23019,8 +22479,7 @@
                     /* [] */0

                   ]

                 ];

-        }

-        else {

+        } else {

           return /* :: */[

                   x2$1,

                   /* :: */[

@@ -23029,12 +22488,10 @@
                   ]

                 ];

         }

-      }

-      else {

+      } else {

         exit = 1;

       }

-    }

-    else {

+    } else {

       exit = 1;

     }

     if (exit === 1) {

@@ -23062,8 +22519,7 @@
               _l1 = l1[1];

               continue ;

               

-            }

-            else {

+            } else {

               _accu = /* :: */[

                 h2,

                 accu

@@ -23072,12 +22528,10 @@
               continue ;

               

             }

-          }

-          else {

+          } else {

             return rev_append(l1, accu);

           }

-        }

-        else {

+        } else {

           return rev_append(l2$1, accu);

         }

       };

@@ -23087,8 +22541,7 @@
   var len = length(l);

   if (len < 2) {

     return l;

-  }

-  else {

+  } else {

     return sort(len, l);

   }

 }

@@ -23099,8 +22552,7 @@
     if (n !== 2) {

       if (n !== 3) {

         exit = 1;

-      }

-      else if (l) {

+      } else if (l) {

         var match = l[1];

         if (match) {

           var match$1 = match[1];

@@ -23124,8 +22576,7 @@
                               ]

                             ]

                           ];

-                  }

-                  else {

+                  } else {

                     var c$2 = Curry._2(cmp, x1, x3);

                     if (c$2) {

                       if (c$2 < 0) {

@@ -23139,8 +22590,7 @@
                                   ]

                                 ]

                               ];

-                      }

-                      else {

+                      } else {

                         return /* :: */[

                                 x3,

                                 /* :: */[

@@ -23152,8 +22602,7 @@
                                 ]

                               ];

                       }

-                    }

-                    else {

+                    } else {

                       return /* :: */[

                               x1,

                               /* :: */[

@@ -23163,8 +22612,7 @@
                             ];

                     }

                   }

-                }

-                else {

+                } else {

                   return /* :: */[

                           x1,

                           /* :: */[

@@ -23173,8 +22621,7 @@
                           ]

                         ];

                 }

-              }

-              else {

+              } else {

                 var c$3 = Curry._2(cmp, x1, x3);

                 if (c$3) {

                   if (c$3 < 0) {

@@ -23188,8 +22635,7 @@
                               ]

                             ]

                           ];

-                  }

-                  else {

+                  } else {

                     var c$4 = Curry._2(cmp, x2, x3);

                     if (c$4) {

                       if (c$4 < 0) {

@@ -23203,8 +22649,7 @@
                                   ]

                                 ]

                               ];

-                      }

-                      else {

+                      } else {

                         return /* :: */[

                                 x3,

                                 /* :: */[

@@ -23216,8 +22661,7 @@
                                 ]

                               ];

                       }

-                    }

-                    else {

+                    } else {

                       return /* :: */[

                               x2,

                               /* :: */[

@@ -23227,8 +22671,7 @@
                             ];

                     }

                   }

-                }

-                else {

+                } else {

                   return /* :: */[

                           x2,

                           /* :: */[

@@ -23238,8 +22681,7 @@
                         ];

                 }

               }

-            }

-            else {

+            } else {

               var c$5 = Curry._2(cmp, x2, x3);

               if (c$5) {

                 if (c$5 < 0) {

@@ -23250,8 +22692,7 @@
                             /* [] */0

                           ]

                         ];

-                }

-                else {

+                } else {

                   return /* :: */[

                           x3,

                           /* :: */[

@@ -23260,28 +22701,23 @@
                           ]

                         ];

                 }

-              }

-              else {

+              } else {

                 return /* :: */[

                         x2,

                         /* [] */0

                       ];

               }

             }

-          }

-          else {

+          } else {

             exit = 1;

           }

-        }

-        else {

+        } else {

           exit = 1;

         }

-      }

-      else {

+      } else {

         exit = 1;

       }

-    }

-    else if (l) {

+    } else if (l) {

       var match$2 = l[1];

       if (match$2) {

         var x2$1 = match$2[0];

@@ -23296,8 +22732,7 @@
                       /* [] */0

                     ]

                   ];

-          }

-          else {

+          } else {

             return /* :: */[

                     x2$1,

                     /* :: */[

@@ -23306,19 +22741,16 @@
                     ]

                   ];

           }

-        }

-        else {

+        } else {

           return /* :: */[

                   x1$1,

                   /* [] */0

                 ];

         }

-      }

-      else {

+      } else {

         exit = 1;

       }

-    }

-    else {

+    } else {

       exit = 1;

     }

     if (exit === 1) {

@@ -23350,8 +22782,7 @@
                 _l1 = t1;

                 continue ;

                 

-              }

-              else {

+              } else {

                 _accu = /* :: */[

                   h2,

                   accu

@@ -23360,8 +22791,7 @@
                 continue ;

                 

               }

-            }

-            else {

+            } else {

               _accu = /* :: */[

                 h1,

                 accu

@@ -23371,12 +22801,10 @@
               continue ;

               

             }

-          }

-          else {

+          } else {

             return rev_append(l1, accu);

           }

-        }

-        else {

+        } else {

           return rev_append(l2$1, accu);

         }

       };

@@ -23388,8 +22816,7 @@
     if (n !== 2) {

       if (n !== 3) {

         exit = 1;

-      }

-      else if (l) {

+      } else if (l) {

         var match = l[1];

         if (match) {

           var match$1 = match[1];

@@ -23413,8 +22840,7 @@
                               ]

                             ]

                           ];

-                  }

-                  else {

+                  } else {

                     var c$2 = Curry._2(cmp, x1, x3);

                     if (c$2) {

                       if (c$2 > 0) {

@@ -23428,8 +22854,7 @@
                                   ]

                                 ]

                               ];

-                      }

-                      else {

+                      } else {

                         return /* :: */[

                                 x3,

                                 /* :: */[

@@ -23441,8 +22866,7 @@
                                 ]

                               ];

                       }

-                    }

-                    else {

+                    } else {

                       return /* :: */[

                               x1,

                               /* :: */[

@@ -23452,8 +22876,7 @@
                             ];

                     }

                   }

-                }

-                else {

+                } else {

                   return /* :: */[

                           x1,

                           /* :: */[

@@ -23462,8 +22885,7 @@
                           ]

                         ];

                 }

-              }

-              else {

+              } else {

                 var c$3 = Curry._2(cmp, x1, x3);

                 if (c$3) {

                   if (c$3 > 0) {

@@ -23477,8 +22899,7 @@
                               ]

                             ]

                           ];

-                  }

-                  else {

+                  } else {

                     var c$4 = Curry._2(cmp, x2, x3);

                     if (c$4) {

                       if (c$4 > 0) {

@@ -23492,8 +22913,7 @@
                                   ]

                                 ]

                               ];

-                      }

-                      else {

+                      } else {

                         return /* :: */[

                                 x3,

                                 /* :: */[

@@ -23505,8 +22925,7 @@
                                 ]

                               ];

                       }

-                    }

-                    else {

+                    } else {

                       return /* :: */[

                               x2,

                               /* :: */[

@@ -23516,8 +22935,7 @@
                             ];

                     }

                   }

-                }

-                else {

+                } else {

                   return /* :: */[

                           x2,

                           /* :: */[

@@ -23527,8 +22945,7 @@
                         ];

                 }

               }

-            }

-            else {

+            } else {

               var c$5 = Curry._2(cmp, x2, x3);

               if (c$5) {

                 if (c$5 > 0) {

@@ -23539,8 +22956,7 @@
                             /* [] */0

                           ]

                         ];

-                }

-                else {

+                } else {

                   return /* :: */[

                           x3,

                           /* :: */[

@@ -23549,28 +22965,23 @@
                           ]

                         ];

                 }

-              }

-              else {

+              } else {

                 return /* :: */[

                         x2,

                         /* [] */0

                       ];

               }

             }

-          }

-          else {

+          } else {

             exit = 1;

           }

-        }

-        else {

+        } else {

           exit = 1;

         }

-      }

-      else {

+      } else {

         exit = 1;

       }

-    }

-    else if (l) {

+    } else if (l) {

       var match$2 = l[1];

       if (match$2) {

         var x2$1 = match$2[0];

@@ -23585,8 +22996,7 @@
                       /* [] */0

                     ]

                   ];

-          }

-          else {

+          } else {

             return /* :: */[

                     x2$1,

                     /* :: */[

@@ -23595,19 +23005,16 @@
                     ]

                   ];

           }

-        }

-        else {

+        } else {

           return /* :: */[

                   x1$1,

                   /* [] */0

                 ];

         }

-      }

-      else {

+      } else {

         exit = 1;

       }

-    }

-    else {

+    } else {

       exit = 1;

     }

     if (exit === 1) {

@@ -23639,8 +23046,7 @@
                 _l1 = t1;

                 continue ;

                 

-              }

-              else {

+              } else {

                 _accu = /* :: */[

                   h2,

                   accu

@@ -23649,8 +23055,7 @@
                 continue ;

                 

               }

-            }

-            else {

+            } else {

               _accu = /* :: */[

                 h1,

                 accu

@@ -23660,12 +23065,10 @@
               continue ;

               

             }

-          }

-          else {

+          } else {

             return rev_append(l1, accu);

           }

-        }

-        else {

+        } else {

           return rev_append(l2$1, accu);

         }

       };

@@ -23675,8 +23078,7 @@
   var len = length(l);

   if (len < 2) {

     return l;

-  }

-  else {

+  } else {

     return sort(len, l);

   }

 }

@@ -23746,15 +23148,14 @@
 //////// start of map.js ////////

 'use strict';

 

-var Curry                   = require("./curry");

-var Caml_builtin_exceptions = require("./caml_builtin_exceptions");

+var Curry                   = require("./curry.js");

+var Caml_builtin_exceptions = require("./caml_builtin_exceptions.js");

 

 function Make(funarg) {

   var height = function (param) {

     if (param) {

       return param[4];

-    }

-    else {

+    } else {

       return 0;

     }

   };

@@ -23789,25 +23190,21 @@
         var ll = l[0];

         if (height(ll) >= height(lr)) {

           return create(ll, lv, ld, create(lr, x, d, r));

-        }

-        else if (lr) {

+        } else if (lr) {

           return create(create(ll, lv, ld, lr[0]), lr[1], lr[2], create(lr[3], x, d, r));

-        }

-        else {

+        } else {

           throw [

                 Caml_builtin_exceptions.invalid_argument,

                 "Map.bal"

               ];

         }

-      }

-      else {

+      } else {

         throw [

               Caml_builtin_exceptions.invalid_argument,

               "Map.bal"

             ];

       }

-    }

-    else if (hr > (hl + 2 | 0)) {

+    } else if (hr > (hl + 2 | 0)) {

       if (r) {

         var rr = r[3];

         var rd = r[2];

@@ -23815,25 +23212,21 @@
         var rl = r[0];

         if (height(rr) >= height(rl)) {

           return create(create(l, x, d, rl), rv, rd, rr);

-        }

-        else if (rl) {

+        } else if (rl) {

           return create(create(l, x, d, rl[0]), rl[1], rl[2], create(rl[3], rv, rd, rr));

-        }

-        else {

+        } else {

           throw [

                 Caml_builtin_exceptions.invalid_argument,

                 "Map.bal"

               ];

         }

-      }

-      else {

+      } else {

         throw [

               Caml_builtin_exceptions.invalid_argument,

               "Map.bal"

             ];

       }

-    }

-    else {

+    } else {

       return /* Node */[

               l,

               x,

@@ -23846,8 +23239,7 @@
   var is_empty = function (param) {

     if (param) {

       return /* false */0;

-    }

-    else {

+    } else {

       return /* true */1;

     }

   };

@@ -23861,12 +23253,10 @@
       if (c) {

         if (c < 0) {

           return bal(add(x, data, l), v, d, r);

-        }

-        else {

+        } else {

           return bal(l, v, d, add(x, data, r));

         }

-      }

-      else {

+      } else {

         return /* Node */[

                 l,

                 x,

@@ -23875,8 +23265,7 @@
                 param[4]

               ];

       }

-    }

-    else {

+    } else {

       return /* Node */[

               /* Empty */0,

               x,

@@ -23895,12 +23284,10 @@
           _param = c < 0 ? param[0] : param[3];

           continue ;

           

-        }

-        else {

+        } else {

           return param[2];

         }

-      }

-      else {

+      } else {

         throw Caml_builtin_exceptions.not_found;

       }

     };

@@ -23914,12 +23301,10 @@
           _param = c < 0 ? param[0] : param[3];

           continue ;

           

-        }

-        else {

+        } else {

           return /* true */1;

         }

-      }

-      else {

+      } else {

         return /* false */0;

       }

     };

@@ -23933,15 +23318,13 @@
           _param = l;

           continue ;

           

-        }

-        else {

+        } else {

           return /* tuple */[

                   param[1],

                   param[2]

                 ];

         }

-      }

-      else {

+      } else {

         throw Caml_builtin_exceptions.not_found;

       }

     };

@@ -23955,15 +23338,13 @@
           _param = r;

           continue ;

           

-        }

-        else {

+        } else {

           return /* tuple */[

                   param[1],

                   param[2]

                 ];

         }

-      }

-      else {

+      } else {

         throw Caml_builtin_exceptions.not_found;

       }

     };

@@ -23973,12 +23354,10 @@
       var l = param[0];

       if (l) {

         return bal(remove_min_binding(l), param[1], param[2], param[3]);

-      }

-      else {

+      } else {

         return param[3];

       }

-    }

-    else {

+    } else {

       throw [

             Caml_builtin_exceptions.invalid_argument,

             "Map.remove_min_elt"

@@ -23995,29 +23374,24 @@
       if (c) {

         if (c < 0) {

           return bal(remove(x, l), v, d, r);

-        }

-        else {

+        } else {

           return bal(l, v, d, remove(x, r));

         }

-      }

-      else {

+      } else {

         var t1 = l;

         var t2 = r;

         if (t1) {

           if (t2) {

             var match = min_binding(t2);

             return bal(t1, match[0], match[1], remove_min_binding(t2));

-          }

-          else {

+          } else {

             return t1;

           }

-        }

-        else {

+        } else {

           return t2;

         }

       }

-    }

-    else {

+    } else {

       return /* Empty */0;

     }

   };

@@ -24030,8 +23404,7 @@
         _param = param[3];

         continue ;

         

-      }

-      else {

+      } else {

         return /* () */0;

       }

     };

@@ -24048,8 +23421,7 @@
               r$prime,

               param[4]

             ];

-    }

-    else {

+    } else {

       return /* Empty */0;

     }

   };

@@ -24066,8 +23438,7 @@
               r$prime,

               param[4]

             ];

-    }

-    else {

+    } else {

       return /* Empty */0;

     }

   };

@@ -24080,8 +23451,7 @@
         _m = m[3];

         continue ;

         

-      }

-      else {

+      } else {

         return accu;

       }

     };

@@ -24095,16 +23465,13 @@
             _param = param[3];

             continue ;

             

-          }

-          else {

+          } else {

             return /* false */0;

           }

-        }

-        else {

+        } else {

           return /* false */0;

         }

-      }

-      else {

+      } else {

         return /* true */1;

       }

     };

@@ -24115,17 +23482,14 @@
       if (param) {

         if (Curry._2(p, param[1], param[2])) {

           return /* true */1;

-        }

-        else if (exists(p, param[0])) {

+        } else if (exists(p, param[0])) {

           return /* true */1;

-        }

-        else {

+        } else {

           _param = param[3];

           continue ;

           

         }

-      }

-      else {

+      } else {

         return /* false */0;

       }

     };

@@ -24133,16 +23497,14 @@
   var add_min_binding = function (k, v, param) {

     if (param) {

       return bal(add_min_binding(k, v, param[0]), param[1], param[2], param[3]);

-    }

-    else {

+    } else {

       return singleton(k, v);

     }

   };

   var add_max_binding = function (k, v, param) {

     if (param) {

       return bal(param[0], param[1], param[2], add_max_binding(k, v, param[3]));

-    }

-    else {

+    } else {

       return singleton(k, v);

     }

   };

@@ -24153,19 +23515,15 @@
         var lh = l[4];

         if (lh > (rh + 2 | 0)) {

           return bal(l[0], l[1], l[2], join(l[3], v, d, r));

-        }

-        else if (rh > (lh + 2 | 0)) {

+        } else if (rh > (lh + 2 | 0)) {

           return bal(join(l, v, d, r[0]), r[1], r[2], r[3]);

-        }

-        else {

+        } else {

           return create(l, v, d, r);

         }

-      }

-      else {

+      } else {

         return add_max_binding(v, d, l);

       }

-    }

-    else {

+    } else {

       return add_min_binding(v, d, r);

     }

   };

@@ -24174,20 +23532,17 @@
       if (t2) {

         var match = min_binding(t2);

         return join(t1, match[0], match[1], remove_min_binding(t2));

-      }

-      else {

+      } else {

         return t1;

       }

-    }

-    else {

+    } else {

       return t2;

     }

   };

   var concat_or_join = function (t1, v, d, t2) {

     if (d) {

       return join(t1, v, d[0], t2);

-    }

-    else {

+    } else {

       return concat(t1, t2);

     }

   };

@@ -24206,8 +23561,7 @@
                   match[1],

                   join(match[2], v, d, r)

                 ];

-        }

-        else {

+        } else {

           var match$1 = split(x, r);

           return /* tuple */[

                   join(l, v, d, match$1[0]),

@@ -24215,16 +23569,14 @@
                   match$1[2]

                 ];

         }

-      }

-      else {

+      } else {

         return /* tuple */[

                 l,

                 /* Some */[d],

                 r

               ];

       }

-    }

-    else {

+    } else {

       return /* tuple */[

               /* Empty */0,

               /* None */0,

@@ -24239,15 +23591,12 @@
       if (s1[4] >= height(s2)) {

         var match = split(v1, s2);

         return concat_or_join(merge(f, s1[0], match[0]), v1, Curry._3(f, v1, /* Some */[s1[2]], match[1]), merge(f, s1[3], match[2]));

-      }

-      else {

+      } else {

         exit = 1;

       }

-    }

-    else if (s2) {

+    } else if (s2) {

       exit = 1;

-    }

-    else {

+    } else {

       return /* Empty */0;

     }

     if (exit === 1) {

@@ -24255,8 +23604,7 @@
         var v2 = s2[1];

         var match$1 = split(v2, s1);

         return concat_or_join(merge(f, match$1[0], s2[0]), v2, Curry._3(f, v2, match$1[1], /* Some */[s2[2]]), merge(f, match$1[2], s2[3]));

-      }

-      else {

+      } else {

         throw [

               Caml_builtin_exceptions.assert_failure,

               [

@@ -24278,12 +23626,10 @@
       var r$prime = filter(p, param[3]);

       if (pvd) {

         return join(l$prime, v, d, r$prime);

-      }

-      else {

+      } else {

         return concat(l$prime, r$prime);

       }

-    }

-    else {

+    } else {

       return /* Empty */0;

     }

   };

@@ -24303,15 +23649,13 @@
                 join(lt, v, d, rt),

                 concat(lf, rf)

               ];

-      }

-      else {

+      } else {

         return /* tuple */[

                 concat(lt, rt),

                 join(lf, v, d, rf)

               ];

       }

-    }

-    else {

+    } else {

       return /* tuple */[

               /* Empty */0,

               /* Empty */0

@@ -24332,8 +23676,7 @@
         _m = m[0];

         continue ;

         

-      }

-      else {

+      } else {

         return e;

       }

     };

@@ -24349,28 +23692,23 @@
           var c = Curry._2(funarg[/* compare */0], e1[0], e2[0]);

           if (c !== 0) {

             return c;

-          }

-          else {

+          } else {

             var c$1 = Curry._2(cmp, e1[1], e2[1]);

             if (c$1 !== 0) {

               return c$1;

-            }

-            else {

+            } else {

               _e2 = cons_enum(e2[2], e2[3]);

               _e1 = cons_enum(e1[2], e1[3]);

               continue ;

               

             }

           }

-        }

-        else {

+        } else {

           return 1;

         }

-      }

-      else if (e2) {

+      } else if (e2) {

         return -1;

-      }

-      else {

+      } else {

         return 0;

       }

     };

@@ -24385,25 +23723,20 @@
         if (e2) {

           if (Curry._2(funarg[/* compare */0], e1[0], e2[0])) {

             return /* false */0;

-          }

-          else if (Curry._2(cmp, e1[1], e2[1])) {

+          } else if (Curry._2(cmp, e1[1], e2[1])) {

             _e2 = cons_enum(e2[2], e2[3]);

             _e1 = cons_enum(e1[2], e1[3]);

             continue ;

             

-          }

-          else {

+          } else {

             return /* false */0;

           }

-        }

-        else {

+        } else {

           return /* false */0;

         }

-      }

-      else if (e2) {

+      } else if (e2) {

         return /* false */0;

-      }

-      else {

+      } else {

         return /* true */1;

       }

     };

@@ -24411,8 +23744,7 @@
   var cardinal = function (param) {

     if (param) {

       return (cardinal(param[0]) + 1 | 0) + cardinal(param[3]) | 0;

-    }

-    else {

+    } else {

       return 0;

     }

   };

@@ -24431,8 +23763,7 @@
         ];

         continue ;

         

-      }

-      else {

+      } else {

         return accu;

       }

     };

@@ -24478,10 +23809,10 @@
   _registry['numeric_error'] = function() {

     let exports = {};

 //////// start of numeric_error.js ////////

-// Generated by BUCKLESCRIPT VERSION 1.4.3 , PLEASE EDIT WITH CARE

+// Generated by BUCKLESCRIPT VERSION 1.7.4, PLEASE EDIT WITH CARE

 'use strict';

 

-var Caml_exceptions = require("bs-platform/lib/js/caml_exceptions");

+var Caml_exceptions = require("bs-platform/lib/js/caml_exceptions.js");

 

 var IntegerOverflow = Caml_exceptions.create("Numeric_error.IntegerOverflow");

 

@@ -24503,22 +23834,17 @@
 //////// start of obj.js ////////

 'use strict';

 

-var Marshal                 = require("./marshal");

-var Caml_builtin_exceptions = require("./caml_builtin_exceptions");

+var Marshal                 = require("./marshal.js");

+var Caml_array              = require("./caml_array.js");

+var Caml_missing_polyfill   = require("./caml_missing_polyfill.js");

+var Caml_builtin_exceptions = require("./caml_builtin_exceptions.js");

 

-function double_field(x, i) {

-  return x[i];

-}

+var double_field = Caml_array.caml_array_get;

 

-function set_double_field(x, i, v) {

-  x[i] = v;

-  return /* () */0;

-}

+var set_double_field = Caml_array.caml_array_set;

 

 function marshal() {

-  return function () {

-            throw "caml_output_value_to_string not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_output_value_to_string not implemented by bucklescript yet\n");

 }

 

 function unmarshal(str, pos) {

@@ -24533,14 +23859,12 @@
   var name;

   if (slot.length !== undefined && slot.tag === 248) {

     name = slot[0];

-  }

-  else {

+  } else {

     throw Caml_builtin_exceptions.not_found;

   }

   if (name.tag === 252) {

     return slot;

-  }

-  else {

+  } else {

     throw Caml_builtin_exceptions.not_found;

   }

 }

@@ -24556,8 +23880,7 @@
             Caml_builtin_exceptions.invalid_argument,

             "Obj.extension_name"

           ];

-    }

-    else {

+    } else {

       throw exn;

     }

   }

@@ -24574,8 +23897,7 @@
             Caml_builtin_exceptions.invalid_argument,

             "Obj.extension_id"

           ];

-    }

-    else {

+    } else {

       throw exn;

     }

   }

@@ -24591,8 +23913,7 @@
             Caml_builtin_exceptions.invalid_argument,

             "Obj.extension_slot"

           ];

-    }

-    else {

+    } else {

       throw exn;

     }

   }

@@ -24662,36 +23983,14 @@
   };

 

 

-  _registry['oo'] = function() {

-    let exports = {};

-//////// start of oo.js ////////

-'use strict';

-

-var CamlinternalOO = require("./camlinternalOO");

-

-var copy = CamlinternalOO.copy;

-

-var new_method = CamlinternalOO.public_method_label;

-

-var public_method_label = CamlinternalOO.public_method_label;

-

-exports.copy                = copy;

-exports.new_method          = new_method;

-exports.public_method_label = public_method_label;

-/* No side effect */

-//////// end of oo.js ////////

-    return exports;

-  };

-

-

   _registry['operators'] = function() {

     let exports = {};

 //////// start of operators.js ////////

-// Generated by BUCKLESCRIPT VERSION 1.4.3 , PLEASE EDIT WITH CARE

+// Generated by BUCKLESCRIPT VERSION 1.7.4, PLEASE EDIT WITH CARE

 'use strict';

 

-var Block  = require("bs-platform/lib/js/block");

-var Source = require("./source");

+var Block  = require("bs-platform/lib/js/block.js");

+var Source = require("./source.js");

 

 function i32_const(n) {

   return /* Const */Block.__(15, [Source.$at$at(/* I32 */Block.__(0, [n[/* it */1]]), n[/* at */0])]);

@@ -25450,16 +24749,17 @@
   _registry['parse'] = function() {

     let exports = {};

 //////// start of parse.js ////////

-// Generated by BUCKLESCRIPT VERSION 1.4.3 , PLEASE EDIT WITH CARE

+// Generated by BUCKLESCRIPT VERSION 1.7.4, PLEASE EDIT WITH CARE

 'use strict';

 

-var Curry    = require("bs-platform/lib/js/curry");

-var Lexer    = require("./lexer");

-var Lexing   = require("bs-platform/lib/js/lexing");

-var Parser   = require("./parser");

-var Script   = require("./script");

-var Source   = require("./source");

-var Caml_obj = require("bs-platform/lib/js/caml_obj");

+var Curry    = require("bs-platform/lib/js/curry.js");

+var Lexer    = require("./lexer.js");

+var Js_exn   = require("bs-platform/lib/js/js_exn.js");

+var Lexing   = require("bs-platform/lib/js/lexing.js");

+var Parser   = require("./parser.js");

+var Script   = require("./script.js");

+var Source   = require("./source.js");

+var Caml_obj = require("bs-platform/lib/js/caml_obj.js");

 

 function parse$prime(name, lexbuf, start) {

   var init = lexbuf[/* lex_curr_p */11];

@@ -25472,7 +24772,8 @@
   try {

     return Curry._2(start, Lexer.token, lexbuf);

   }

-  catch (exn){

+  catch (raw_exn){

+    var exn = Js_exn.internalToOCamlException(raw_exn);

     if (exn[0] === Script.Syntax) {

       var region = exn[1];

       var region$prime = Caml_obj.caml_notequal(region, Source.no_region) ? region : /* record */[

@@ -25484,8 +24785,7 @@
             region$prime,

             exn[2]

           ];

-    }

-    else {

+    } else {

       throw exn;

     }

   }

@@ -25513,7 +24813,7 @@
 }

 

 function string_to_module(s) {

-  return string_to(/* Module */0, s);

+  return string_to(/* Module */0, s)[1];

 }

 

 var Syntax = Script.Syntax;

@@ -25531,25 +24831,27 @@
   _registry['parser'] = function() {

     let exports = {};

 //////// start of parser.js ////////

-// Generated by BUCKLESCRIPT VERSION 1.4.3 , PLEASE EDIT WITH CARE

+// Generated by BUCKLESCRIPT VERSION 1.7.4, PLEASE EDIT WITH CARE

 'use strict';

 

-var Ast                     = require("./ast");

-var I32                     = require("./i32");

-var Lib                     = require("./lib");

-var $$Map                   = require("bs-platform/lib/js/map");

-var List                    = require("bs-platform/lib/js/list");

-var Block                   = require("bs-platform/lib/js/block");

-var Curry                   = require("bs-platform/lib/js/curry");

-var Script                  = require("./script");

-var Source                  = require("./source");

-var $$String                = require("bs-platform/lib/js/string");

-var Parsing                 = require("bs-platform/lib/js/parsing");

-var Caml_obj                = require("bs-platform/lib/js/caml_obj");

-var Operators               = require("./operators");

-var Pervasives              = require("bs-platform/lib/js/pervasives");

-var Caml_format             = require("bs-platform/lib/js/caml_format");

-var Caml_builtin_exceptions = require("bs-platform/lib/js/caml_builtin_exceptions");

+var Ast                     = require("./ast.js");

+var I32                     = require("./i32.js");

+var Lib                     = require("./lib.js");

+var $$Map                   = require("bs-platform/lib/js/map.js");

+var List                    = require("bs-platform/lib/js/list.js");

+var Utf8                    = require("./utf8.js");

+var Block                   = require("bs-platform/lib/js/block.js");

+var Curry                   = require("bs-platform/lib/js/curry.js");

+var Js_exn                  = require("bs-platform/lib/js/js_exn.js");

+var Script                  = require("./script.js");

+var Source                  = require("./source.js");

+var $$String                = require("bs-platform/lib/js/string.js");

+var Parsing                 = require("bs-platform/lib/js/parsing.js");

+var Caml_obj                = require("bs-platform/lib/js/caml_obj.js");

+var Operators               = require("./operators.js");

+var Pervasives              = require("bs-platform/lib/js/pervasives.js");

+var Caml_format             = require("bs-platform/lib/js/caml_format.js");

+var Caml_builtin_exceptions = require("bs-platform/lib/js/caml_builtin_exceptions.js");

 

 function parse_error(msg) {

   var msg$1 = msg === "syntax error" ? "unexpected token" : msg;

@@ -25587,15 +24889,15 @@
   try {

     return Curry._1(f, s);

   }

-  catch (exn){

+  catch (raw_exn){

+    var exn = Js_exn.internalToOCamlException(raw_exn);

     if (exn[0] === Caml_builtin_exceptions.failure) {

       throw [

             Script.Syntax,

             s[/* at */0],

             "constant out of range"

           ];

-    }

-    else {

+    } else {

       throw exn;

     }

   }

@@ -25606,23 +24908,22 @@
     var n = Caml_format.caml_int_of_string(s);

     if (n >= 0) {

       return n;

-    }

-    else {

+    } else {

       throw [

             Caml_builtin_exceptions.failure,

             ""

           ];

     }

   }

-  catch (exn){

+  catch (raw_exn){

+    var exn = Js_exn.internalToOCamlException(raw_exn);

     if (exn[0] === Caml_builtin_exceptions.failure) {

       throw [

             Script.Syntax,

             at,

             "integer constant out of range"

           ];

-    }

-    else {

+    } else {

       throw exn;

     }

   }

@@ -25632,15 +24933,15 @@
   try {

     return Curry._1(I32.of_string_u, s);

   }

-  catch (exn){

+  catch (raw_exn){

+    var exn = Js_exn.internalToOCamlException(raw_exn);

     if (exn[0] === Caml_builtin_exceptions.failure) {

       throw [

             Script.Syntax,

             at,

             "i32 constant out of range"

           ];

-    }

-    else {

+    } else {

       throw exn;

     }

   }

@@ -25704,8 +25005,7 @@
             x[/* at */0],

             "unknown type " + x[/* it */1]

           ];

-    }

-    else {

+    } else {

       throw exn;

     }

   }

@@ -25722,8 +25022,7 @@
             x[/* at */0],

             "unknown " + (category + (" " + x[/* it */1]))

           ];

-    }

-    else {

+    } else {

       throw exn;

     }

   }

@@ -25737,7 +25036,7 @@
   return lookup("local", c[/* locals */4], x);

 }

 

-function global(c, x) {

+function $$global(c, x) {

   return lookup("global", c[/* globals */5], x);

 }

 

@@ -25760,8 +25059,7 @@
             x[/* at */0],

             "unknown label " + x[/* it */1]

           ];

-    }

-    else {

+    } else {

       throw exn;

     }

   }

@@ -25783,18 +25081,17 @@
           "duplicate " + (category + (" " + x[/* it */1]))

         ];

   }

+  var i = space[/* count */1];

   space[/* map */0] = Curry._3(VarMap[/* add */3], x[/* it */1], space[/* count */1], space[/* map */0]);

   space[/* count */1] = space[/* count */1] + 1 | 0;

-  if (space[/* count */1]) {

-    return 0;

-  }

-  else {

+  if (!space[/* count */1]) {

     throw [

           Script.Syntax,

           x[/* at */0],

           "too many " + (category + " bindings")

         ];

   }

+  return i;

 }

 

 function bind_func(c, x) {

@@ -25818,6 +25115,7 @@
 }

 

 function anon(category, space, n) {

+  var i = space[/* count */1];

   space[/* count */1] = space[/* count */1] + n | 0;

   if (Curry._2(I32.lt_u, space[/* count */1], n)) {

     throw [

@@ -25826,9 +25124,7 @@
           "too many " + (category + " bindings")

         ];

   }

-  else {

-    return 0;

-  }

+  return i;

 }

 

 function anon_func(c) {

@@ -25836,7 +25132,8 @@
 }

 

 function anon_locals(c, ts) {

-  return anon("local", c[/* locals */4], Curry._1(Lib.List32[/* length */0], ts));

+  anon("local", c[/* locals */4], Curry._1(Lib.List32[/* length */0], ts));

+  return /* () */0;

 }

 

 function anon_global(c) {

@@ -25864,30 +25161,29 @@
   /* [] */0

 ];

 

-function explicit_sig(c, var_sem, ty, at) {

-  var x = Curry._2(var_sem, c, type_);

-  if (x[/* it */1] < Curry._1(Lib.List32[/* length */0], c[/* types */0][/* tlist */1]) && Caml_obj.caml_notequal(ty, empty_type) && Caml_obj.caml_notequal(ty, Curry._2(Lib.List32[/* nth */1], c[/* types */0][/* tlist */1], x[/* it */1]))) {

-    throw [

-          Script.Syntax,

-          at,

-          "signature mismatch"

-        ];

-  }

-  return x;

-}

-

 function inline_type(c, ty, at) {

   var match = Curry._2(Lib.List[/* index_of */6], ty, c[/* types */0][/* tlist */1]);

   if (match) {

     return Source.$at$at(match[0], at);

-  }

-  else {

+  } else {

     var i = Curry._1(Lib.List32[/* length */0], c[/* types */0][/* tlist */1]);

     anon_type(c, ty);

     return Source.$at$at(i, at);

   }

 }

 

+function inline_type_explicit(c, x, ty, at) {

+  if (Caml_obj.caml_notequal(ty, empty_type) && (x[/* it */1] >= Curry._1(Lib.List32[/* length */0], c[/* types */0][/* tlist */1]) || Caml_obj.caml_notequal(ty, Curry._2(Lib.List32[/* nth */1], c[/* types */0][/* tlist */1], x[/* it */1])))) {

+    throw [

+          Script.Syntax,

+          at,

+          "inline function type does not match explicit type"

+        ];

+  } else {

+    return x;

+  }

+}

+

 var yytransl_const = /* array */[

   263,

   264,

@@ -25913,7 +25209,6 @@
   284,

   285,

   286,

-  296,

   297,

   298,

   299,

@@ -25945,6 +25240,10 @@
   325,

   326,

   327,

+  328,

+  329,

+  330,

+  331,

   0,

   0

 ];

@@ -25965,7 +25264,7 @@
   293,

   294,

   295,

-  328,

+  296,

   0

 ];

 

@@ -25973,6 +25272,25 @@
   function () {

     return Pervasives.failwith("parser");

   },

+  function (__caml_parser_env) {

+    var _1 = Parsing.peek_val(__caml_parser_env, 0);

+    var s = _1;

+    var at$1 = at(/* () */0);

+    try {

+      return Utf8.decode(s);

+    }

+    catch (exn){

+      if (exn === Utf8.Utf8) {

+        throw [

+              Script.Syntax,

+              at$1,

+              "invalid UTF-8 encoding"

+            ];

+      } else {

+        throw exn;

+      }

+    }

+  },

   function () {

     return "";

   },

@@ -26163,8 +25481,7 @@
                     x[/* at */0],

                     "mismatching label"

                   ];

-            }

-            else {

+            } else {

               return 0;

             }

           }, xs);

@@ -26314,13 +25631,13 @@
   function (__caml_parser_env) {

     var _2 = Parsing.peek_val(__caml_parser_env, 0);

     return function (c) {

-      return Operators.get_global(Curry._2(_2, c, global));

+      return Operators.get_global(Curry._2(_2, c, $$global));

     };

   },

   function (__caml_parser_env) {

     var _2 = Parsing.peek_val(__caml_parser_env, 0);

     return function (c) {

-      return Operators.set_global(Curry._2(_2, c, global));

+      return Operators.set_global(Curry._2(_2, c, $$global));

     };

   },

   function (__caml_parser_env) {

@@ -26429,6 +25746,13 @@
     };

   },

   function (__caml_parser_env) {

+    var _3 = Parsing.peek_val(__caml_parser_env, 1);

+    return /* :: */[

+            _3,

+            /* [] */0

+          ];

+  },

+  function (__caml_parser_env) {

     var _1 = Parsing.peek_val(__caml_parser_env, 1);

     var _2 = Parsing.peek_val(__caml_parser_env, 0);

     return function (c) {

@@ -26439,6 +25763,15 @@
     };

   },

   function (__caml_parser_env) {

+    var _1 = Parsing.peek_val(__caml_parser_env, 0);

+    return function (c) {

+      return /* tuple */[

+              /* [] */0,

+              Curry._1(_1, c)

+            ];

+    };

+  },

+  function (__caml_parser_env) {

     var _2 = Parsing.peek_val(__caml_parser_env, 1);

     var at$1 = at(/* () */0);

     return function (c) {

@@ -26454,7 +25787,7 @@
     var _2 = Parsing.peek_val(__caml_parser_env, 0);

     return function (c) {

       return /* tuple */[

-              Curry._1(_2, c)[1],

+              Curry._1(_2, c),

               Curry._1(_1, c)

             ];

     };

@@ -26484,15 +25817,48 @@
     };

   },

   function (__caml_parser_env) {

-    var _2 = Parsing.peek_val(__caml_parser_env, 2);

-    var _3 = Parsing.peek_val(__caml_parser_env, 1);

-    var _4 = Parsing.peek_val(__caml_parser_env, 0);

+    var _2 = Parsing.peek_val(__caml_parser_env, 1);

+    var _3 = Parsing.peek_val(__caml_parser_env, 0);

     return function (c) {

       var c$prime = Curry._2(_2, c, /* [] */0);

-      var match = Curry._2(_4, c, c$prime);

+      var match = Curry._2(_3, c, c$prime);

+      var match$1 = match[1];

       return /* tuple */[

-              match[0],

-              Operators.if_(_3, match[1], match[2])

+              match$1[0],

+              Operators.if_(match[0], match$1[1], match$1[2])

+            ];

+    };

+  },

+  function (__caml_parser_env) {

+    var _1 = Parsing.peek_val(__caml_parser_env, 1);

+    var _2 = Parsing.peek_val(__caml_parser_env, 0);

+    return function (c, c$prime) {

+      var match = Curry._2(_2, c, c$prime);

+      return /* tuple */[

+              Pervasives.$at(_1, match[0]),

+              match[1]

+            ];

+    };

+  },

+  function (__caml_parser_env) {

+    var _1 = Parsing.peek_val(__caml_parser_env, 0);

+    return function (c, c$prime) {

+      return /* tuple */[

+              /* [] */0,

+              Curry._2(_1, c, c$prime)

+            ];

+    };

+  },

+  function (__caml_parser_env) {

+    var _1 = Parsing.peek_val(__caml_parser_env, 1);

+    var _2 = Parsing.peek_val(__caml_parser_env, 0);

+    return function (c, c$prime) {

+      var es = Curry._1(_1, c);

+      var match = Curry._2(_2, c, c$prime);

+      return /* tuple */[

+              Pervasives.$at(es, match[0]),

+              match[1],

+              match[2]

             ];

     };

   },

@@ -26517,52 +25883,6 @@
             ];

     };

   },

-  function (__caml_parser_env) {

-    var _1 = Parsing.peek_val(__caml_parser_env, 8);

-    var _4 = Parsing.peek_val(__caml_parser_env, 5);

-    var _8 = Parsing.peek_val(__caml_parser_env, 1);

-    return function (c, c$prime) {

-      return /* tuple */[

-              Curry._1(_1, c),

-              Curry._1(_4, c$prime),

-              Curry._1(_8, c$prime)

-            ];

-    };

-  },

-  function (__caml_parser_env) {

-    var _1 = Parsing.peek_val(__caml_parser_env, 4);

-    var _4 = Parsing.peek_val(__caml_parser_env, 1);

-    return function (c, c$prime) {

-      return /* tuple */[

-              Curry._1(_1, c),

-              Curry._1(_4, c$prime),

-              /* [] */0

-            ];

-    };

-  },

-  function (__caml_parser_env) {

-    var _1 = Parsing.peek_val(__caml_parser_env, 2);

-    var _2 = Parsing.peek_val(__caml_parser_env, 1);

-    var _3 = Parsing.peek_val(__caml_parser_env, 0);

-    return function (c, c$prime) {

-      return /* tuple */[

-              Curry._1(_1, c),

-              Curry._1(_2, c$prime),

-              Curry._1(_3, c$prime)

-            ];

-    };

-  },

-  function (__caml_parser_env) {

-    var _1 = Parsing.peek_val(__caml_parser_env, 1);

-    var _2 = Parsing.peek_val(__caml_parser_env, 0);

-    return function (c, c$prime) {

-      return /* tuple */[

-              Curry._1(_1, c),

-              Curry._1(_2, c$prime),

-              /* [] */0

-            ];

-    };

-  },

   function () {

     return function () {

       return /* [] */0;

@@ -26577,22 +25897,14 @@
   },

   function () {

     return function () {

-      return /* tuple */[

-              0,

-              /* [] */0

-            ];

+      return /* [] */0;

     };

   },

   function (__caml_parser_env) {

     var _1 = Parsing.peek_val(__caml_parser_env, 1);

     var _2 = Parsing.peek_val(__caml_parser_env, 0);

     return function (c) {

-      var es1 = Curry._1(_1, c);

-      var match = Curry._1(_2, c);

-      return /* tuple */[

-              match[0] + 1 | 0,

-              Pervasives.$at(es1, match[1])

-            ];

+      return Pervasives.$at(Curry._1(_1, c), Curry._1(_2, c));

     };

   },

   function (__caml_parser_env) {

@@ -26603,23 +25915,153 @@
     };

   },

   function (__caml_parser_env) {

+    var _3 = Parsing.peek_val(__caml_parser_env, 2);

+    var _4 = Parsing.peek_val(__caml_parser_env, 1);

+    var at$1 = at(/* () */0);

+    return function (c) {

+      var x = Source.$at$at(Curry._3(_3, c, anon_func, bind_func), at$1);

+      return Curry._3(_4, c, x, at$1);

+    };

+  },

+  function (__caml_parser_env) {

+    var _1 = Parsing.peek_val(__caml_parser_env, 1);

+    var _2 = Parsing.peek_val(__caml_parser_env, 0);

+    return function (c, _, at) {

+      var t = inline_type_explicit(c, Curry._2(_1, c, type_), _2[0], at);

+      return /* tuple */[

+              function () {

+                var init = Curry._1(_2[1], enter_func(c));

+                return /* :: */[

+                        Source.$at$at(/* record */[

+                              /* ftype */t,

+                              /* locals */init[/* locals */1],

+                              /* body */init[/* body */2]

+                            ], at),

+                        /* [] */0

+                      ];

+              },

+              /* [] */0,

+              /* [] */0

+            ];

+    };

+  },

+  function (__caml_parser_env) {

+    var _1 = Parsing.peek_val(__caml_parser_env, 0);

+    return function (c, _, at) {

+      var t = inline_type(c, _1[0], at);

+      return /* tuple */[

+              function () {

+                var init = Curry._1(_1[1], enter_func(c));

+                return /* :: */[

+                        Source.$at$at(/* record */[

+                              /* ftype */t,

+                              /* locals */init[/* locals */1],

+                              /* body */init[/* body */2]

+                            ], at),

+                        /* [] */0

+                      ];

+              },

+              /* [] */0,

+              /* [] */0

+            ];

+    };

+  },

+  function (__caml_parser_env) {

+    var _1 = Parsing.peek_val(__caml_parser_env, 2);

+    var _2 = Parsing.peek_val(__caml_parser_env, 1);

+    var _3 = Parsing.peek_val(__caml_parser_env, 0);

+    return function (c, _, at) {

+      var t = inline_type_explicit(c, Curry._2(_2, c, type_), _3, at);

+      return /* tuple */[

+              function () {

+                return /* [] */0;

+              },

+              /* :: */[

+                Source.$at$at(/* record */[

+                      /* module_name */_1[0],

+                      /* item_name */_1[1],

+                      /* idesc */Source.$at$at(/* FuncImport */Block.__(0, [t]), at)

+                    ], at),

+                /* [] */0

+              ],

+              /* [] */0

+            ];

+    };

+  },

+  function (__caml_parser_env) {

+    var _1 = Parsing.peek_val(__caml_parser_env, 1);

+    var _2 = Parsing.peek_val(__caml_parser_env, 0);

+    return function (c, _, at) {

+      var t = inline_type(c, _2, at);

+      return /* tuple */[

+              function () {

+                return /* [] */0;

+              },

+              /* :: */[

+                Source.$at$at(/* record */[

+                      /* module_name */_1[0],

+                      /* item_name */_1[1],

+                      /* idesc */Source.$at$at(/* FuncImport */Block.__(0, [t]), at)

+                    ], at),

+                /* [] */0

+              ],

+              /* [] */0

+            ];

+    };

+  },

+  function (__caml_parser_env) {

+    var _1 = Parsing.peek_val(__caml_parser_env, 1);

+    var _2 = Parsing.peek_val(__caml_parser_env, 0);

+    return function (c, x, at) {

+      var match = Curry._3(_2, c, x, at);

+      return /* tuple */[

+              match[0],

+              match[1],

+              /* :: */[

+                Curry._2(_1, /* FuncExport */Block.__(0, [x]), c),

+                match[2]

+              ]

+            ];

+    };

+  },

+  function (__caml_parser_env) {

     return Parsing.peek_val(__caml_parser_env, 0);

   },

   function (__caml_parser_env) {

     var _3 = Parsing.peek_val(__caml_parser_env, 2);

     var _5 = Parsing.peek_val(__caml_parser_env, 0);

-    var match = _5[0];

-    return /* tuple */[

-            /* FuncType */[

-              match[0],

-              Pervasives.$at(_3, match[1])

-            ],

-            function (c) {

-              return Curry._1(_5[1], c);

-            }

+    return /* FuncType */[

+            Pervasives.$at(_3, _5[0]),

+            _5[1]

           ];

   },

   function (__caml_parser_env) {

+    Parsing.peek_val(__caml_parser_env, 3);

+    var _4 = Parsing.peek_val(__caml_parser_env, 2);

+    var _6 = Parsing.peek_val(__caml_parser_env, 0);

+    return /* FuncType */[

+            /* :: */[

+              _4,

+              _6[0]

+            ],

+            _6[1]

+          ];

+  },

+  function () {

+    return empty_type;

+  },

+  function (__caml_parser_env) {

+    var _3 = Parsing.peek_val(__caml_parser_env, 2);

+    var _5 = Parsing.peek_val(__caml_parser_env, 0);

+    return /* FuncType */[

+            _5[0],

+            Pervasives.$at(_3, _5[1])

+          ];

+  },

+  function (__caml_parser_env) {

+    return Parsing.peek_val(__caml_parser_env, 0);

+  },

+  function (__caml_parser_env) {

     var _3 = Parsing.peek_val(__caml_parser_env, 2);

     var _5 = Parsing.peek_val(__caml_parser_env, 0);

     var match = _5[0];

@@ -26657,133 +26099,59 @@
     var _1 = Parsing.peek_val(__caml_parser_env, 0);

     return /* tuple */[

             empty_type,

-            function (c) {

-              var c$prime = anon_label(c);

-              return /* record */[

-                      /* ftype */Source.$at$at(-1, at(/* () */0)),

-                      /* locals : [] */0,

-                      /* body */Curry._1(_1, c$prime)

-                    ];

-            }

+            _1

           ];

   },

   function (__caml_parser_env) {

     var _3 = Parsing.peek_val(__caml_parser_env, 2);

     var _5 = Parsing.peek_val(__caml_parser_env, 0);

+    var match = _5[0];

     return /* tuple */[

-            _5[0],

-            function (c) {

-              anon_locals(c, _3);

-              var f = Curry._1(_5[1], c);

-              return /* record */[

-                      /* ftype */f[/* ftype */0],

-                      /* locals */Pervasives.$at(_3, f[/* locals */1]),

-                      /* body */f[/* body */2]

-                    ];

-            }

+            /* FuncType */[

+              match[0],

+              Pervasives.$at(_3, match[1])

+            ],

+            _5[1]

           ];

   },

   function (__caml_parser_env) {

-    var _3 = Parsing.peek_val(__caml_parser_env, 3);

-    var _4 = Parsing.peek_val(__caml_parser_env, 2);

-    var _6 = Parsing.peek_val(__caml_parser_env, 0);

-    return /* tuple */[

-            _6[0],

-            function (c) {

-              bind_local(c, _3);

-              var f = Curry._1(_6[1], c);

-              return /* record */[

-                      /* ftype */f[/* ftype */0],

-                      /* locals : :: */[

-                        _4,

-                        f[/* locals */1]

-                      ],

-                      /* body */f[/* body */2]

-                    ];

-            }

-          ];

-  },

-  function (__caml_parser_env) {

-    var _3 = Parsing.peek_val(__caml_parser_env, 4);

-    var _4 = Parsing.peek_val(__caml_parser_env, 3);

-    var _5 = Parsing.peek_val(__caml_parser_env, 2);

-    var _6 = Parsing.peek_val(__caml_parser_env, 1);

-    var at$1 = at(/* () */0);

+    var _1 = Parsing.peek_val(__caml_parser_env, 0);

     return function (c) {

-      Curry._3(_3, c, anon_func, bind_func);

-      var t = explicit_sig(c, _5, _6[0], at$1);

-      return /* tuple */[

-              function () {

-                var init = Curry._1(_6[1], enter_func(c));

-                return Source.$at$at(/* record */[

-                            /* ftype */t,

-                            /* locals */init[/* locals */1],

-                            /* body */init[/* body */2]

-                          ], at$1);

-              },

-              Curry._3(_4, /* FuncExport */0, c[/* funcs */3][/* count */1], c)

-            ];

-    };

-  },

-  function (__caml_parser_env) {

-    var _3 = Parsing.peek_val(__caml_parser_env, 3);

-    var _4 = Parsing.peek_val(__caml_parser_env, 2);

-    var _5 = Parsing.peek_val(__caml_parser_env, 1);

-    var at$1 = at(/* () */0);

-    return function (c) {

-      Curry._3(_3, c, anon_func, bind_func);

-      var t = explicit_sig(c, _4, _5[0], at$1);

-      return /* tuple */[

-              function () {

-                var init = Curry._1(_5[1], enter_func(c));

-                return Source.$at$at(/* record */[

-                            /* ftype */t,

-                            /* locals */init[/* locals */1],

-                            /* body */init[/* body */2]

-                          ], at$1);

-              },

-              /* [] */0

-            ];

-    };

-  },

-  function (__caml_parser_env) {

-    var _3 = Parsing.peek_val(__caml_parser_env, 3);

-    var _4 = Parsing.peek_val(__caml_parser_env, 2);

-    var _5 = Parsing.peek_val(__caml_parser_env, 1);

-    var at$1 = at(/* () */0);

-    return function (c) {

-      Curry._3(_3, c, anon_func, bind_func);

-      var t = inline_type(c, _5[0], at$1);

-      return /* tuple */[

-              function () {

-                var init = Curry._1(_5[1], enter_func(c));

-                return Source.$at$at(/* record */[

-                            /* ftype */t,

-                            /* locals */init[/* locals */1],

-                            /* body */init[/* body */2]

-                          ], at$1);

-              },

-              Curry._3(_4, /* FuncExport */0, c[/* funcs */3][/* count */1], c)

+      var c$prime = anon_label(c);

+      return /* record */[

+              /* ftype */Source.$at$at(-1, at(/* () */0)),

+              /* locals : [] */0,

+              /* body */Curry._1(_1, c$prime)

             ];

     };

   },

   function (__caml_parser_env) {

     var _3 = Parsing.peek_val(__caml_parser_env, 2);

-    var _4 = Parsing.peek_val(__caml_parser_env, 1);

-    var at$1 = at(/* () */0);

+    var _5 = Parsing.peek_val(__caml_parser_env, 0);

     return function (c) {

-      Curry._3(_3, c, anon_func, bind_func);

-      var t = inline_type(c, _4[0], at$1);

-      return /* tuple */[

-              function () {

-                var init = Curry._1(_4[1], enter_func(c));

-                return Source.$at$at(/* record */[

-                            /* ftype */t,

-                            /* locals */init[/* locals */1],

-                            /* body */init[/* body */2]

-                          ], at$1);

-              },

-              /* [] */0

+      anon_locals(c, _3);

+      var f = Curry._1(_5, c);

+      return /* record */[

+              /* ftype */f[/* ftype */0],

+              /* locals */Pervasives.$at(_3, f[/* locals */1]),

+              /* body */f[/* body */2]

+            ];

+    };

+  },

+  function (__caml_parser_env) {

+    var _3 = Parsing.peek_val(__caml_parser_env, 3);

+    var _4 = Parsing.peek_val(__caml_parser_env, 2);

+    var _6 = Parsing.peek_val(__caml_parser_env, 0);

+    return function (c) {

+      bind_local(c, _3);

+      var f = Curry._1(_6, c);

+      return /* record */[

+              /* ftype */f[/* ftype */0],

+              /* locals : :: */[

+                _4,

+                f[/* locals */1]

+              ],

+              /* body */f[/* body */2]

             ];

     };

   },

@@ -26823,55 +26191,96 @@
     };

   },

   function (__caml_parser_env) {

-    var _3 = Parsing.peek_val(__caml_parser_env, 3);

-    var _4 = Parsing.peek_val(__caml_parser_env, 2);

-    var _5 = Parsing.peek_val(__caml_parser_env, 1);

+    var _3 = Parsing.peek_val(__caml_parser_env, 2);

+    var _4 = Parsing.peek_val(__caml_parser_env, 1);

     var at$1 = at(/* () */0);

     return function (c) {

-      Curry._3(_3, c, anon_table, bind_table);

+      var x = Source.$at$at(Curry._3(_3, c, anon_table, bind_table), at$1);

       return function () {

-        return /* tuple */[

-                Source.$at$at(/* record */[/* ttype */_5], at$1),

-                /* [] */0,

-                Curry._3(_4, /* TableExport */1, c[/* tables */1][/* count */1], c)

-              ];

+        return Curry._3(_4, c, x, at$1);

       };

     };

   },

   function (__caml_parser_env) {

-    var _3 = Parsing.peek_val(__caml_parser_env, 7);

-    var _4 = Parsing.peek_val(__caml_parser_env, 6);

-    var _5 = Parsing.peek_val(__caml_parser_env, 5);

-    var _8 = Parsing.peek_val(__caml_parser_env, 2);

-    var at$1 = at(/* () */0);

-    return function (c) {

-      var i = c[/* tables */1][/* count */1];

-      Curry._3(_3, c, anon_table, bind_table);

-      return function () {

-        var init = Curry._2(_8, c, func);

-        var size = List.length(init);

-        return /* tuple */[

+    var _1 = Parsing.peek_val(__caml_parser_env, 0);

+    return function (_, _$1, at) {

+      return /* tuple */[

+              /* :: */[

+                Source.$at$at(/* record */[/* ttype */_1], at),

+                /* [] */0

+              ],

+              /* [] */0,

+              /* [] */0,

+              /* [] */0

+            ];

+    };

+  },

+  function (__caml_parser_env) {

+    var _1 = Parsing.peek_val(__caml_parser_env, 1);

+    var _2 = Parsing.peek_val(__caml_parser_env, 0);

+    return function (_, _$1, at) {

+      return /* tuple */[

+              /* [] */0,

+              /* [] */0,

+              /* :: */[

+                Source.$at$at(/* record */[

+                      /* module_name */_1[0],

+                      /* item_name */_1[1],

+                      /* idesc */Source.$at$at(/* TableImport */Block.__(1, [_2]), at)

+                    ], at),

+                /* [] */0

+              ],

+              /* [] */0

+            ];

+    };

+  },

+  function (__caml_parser_env) {

+    var _1 = Parsing.peek_val(__caml_parser_env, 1);

+    var _2 = Parsing.peek_val(__caml_parser_env, 0);

+    return function (c, x, at) {

+      var match = Curry._3(_2, c, x, at);

+      return /* tuple */[

+              match[0],

+              match[1],

+              match[2],

+              /* :: */[

+                Curry._2(_1, /* TableExport */Block.__(1, [x]), c),

+                match[3]

+              ]

+            ];

+    };

+  },

+  function (__caml_parser_env) {

+    var _1 = Parsing.peek_val(__caml_parser_env, 4);

+    var _4 = Parsing.peek_val(__caml_parser_env, 1);

+    return function (c, x, at) {

+      var init = Curry._2(_4, c, func);

+      var size = List.length(init);

+      return /* tuple */[

+              /* :: */[

                 Source.$at$at(/* record */[/* ttype : TableType */[

                         /* record */[

                           /* min */size,

                           /* max : Some */[size]

                         ],

-                        _5

-                      ]], at$1),

-                /* :: */[

-                  Source.$at$at(/* record */[

-                        /* index */Source.$at$at(i, at$1),

-                        /* offset */Source.$at$at(/* :: */[

-                              Source.$at$at(Operators.i32_const(Source.$at$at(0, at$1)), at$1),

-                              /* [] */0

-                            ], at$1),

-                        /* init */init

-                      ], at$1),

-                  /* [] */0

-                ],

-                Curry._3(_4, /* TableExport */1, c[/* tables */1][/* count */1], c)

-              ];

-      };

+                        _1

+                      ]], at),

+                /* [] */0

+              ],

+              /* :: */[

+                Source.$at$at(/* record */[

+                      /* index */x,

+                      /* offset */Source.$at$at(/* :: */[

+                            Source.$at$at(Operators.i32_const(Source.$at$at(0, at)), at),

+                            /* [] */0

+                          ], at),

+                      /* init */init

+                    ], at),

+                /* [] */0

+              ],

+              /* [] */0,

+              /* [] */0

+            ];

     };

   },

   function (__caml_parser_env) {

@@ -26900,70 +26309,43 @@
     };

   },

   function (__caml_parser_env) {

-    var _3 = Parsing.peek_val(__caml_parser_env, 3);

-    var _4 = Parsing.peek_val(__caml_parser_env, 2);

-    var _5 = Parsing.peek_val(__caml_parser_env, 1);

+    var _3 = Parsing.peek_val(__caml_parser_env, 2);

+    var _4 = Parsing.peek_val(__caml_parser_env, 1);

     var at$1 = at(/* () */0);

     return function (c) {

-      Curry._3(_3, c, anon_memory, bind_memory);

+      var x = Source.$at$at(Curry._3(_3, c, anon_memory, bind_memory), at$1);

+      return function () {

+        return Curry._3(_4, c, x, at$1);

+      };

+    };

+  },

+  function (__caml_parser_env) {

+    var _1 = Parsing.peek_val(__caml_parser_env, 0);

+    return function (_, _$1, at) {

       return /* tuple */[

-              Source.$at$at(/* record */[/* mtype */_5], at$1),

+              /* :: */[

+                Source.$at$at(/* record */[/* mtype */_1], at),

+                /* [] */0

+              ],

               /* [] */0,

-              Curry._3(_4, /* MemoryExport */2, c[/* memories */2][/* count */1], c)

+              /* [] */0,

+              /* [] */0

             ];

     };

   },

   function (__caml_parser_env) {

-    var _3 = Parsing.peek_val(__caml_parser_env, 6);

-    var _4 = Parsing.peek_val(__caml_parser_env, 5);

-    var _7 = Parsing.peek_val(__caml_parser_env, 2);

-    var at$1 = at(/* () */0);

-    return function (c) {

-      var i = c[/* memories */2][/* count */1];

-      Curry._3(_3, c, anon_memory, bind_memory);

-      var size = (_7.length + 65535 | 0) / 65536 | 0;

+    var _1 = Parsing.peek_val(__caml_parser_env, 1);

+    var _2 = Parsing.peek_val(__caml_parser_env, 0);

+    return function (_, _$1, at) {

       return /* tuple */[

-              Source.$at$at(/* record */[/* mtype : MemoryType */[/* record */[

-                        /* min */size,

-                        /* max : Some */[size]

-                      ]]], at$1),

+              /* [] */0,

+              /* [] */0,

               /* :: */[

                 Source.$at$at(/* record */[

-                      /* index */Source.$at$at(i, at$1),

-                      /* offset */Source.$at$at(/* :: */[

-                            Source.$at$at(Operators.i32_const(Source.$at$at(0, at$1)), at$1),

-                            /* [] */0

-                          ], at$1),

-                      /* init */_7

-                    ], at$1),

-                /* [] */0

-              ],

-              Curry._3(_4, /* MemoryExport */2, c[/* memories */2][/* count */1], c)

-            ];

-    };

-  },

-  function (__caml_parser_env) {

-    var _3 = Parsing.peek_val(__caml_parser_env, 5);

-    var _6 = Parsing.peek_val(__caml_parser_env, 2);

-    var at$1 = at(/* () */0);

-    return function (c) {

-      var i = c[/* memories */2][/* count */1];

-      Curry._3(_3, c, anon_memory, bind_memory);

-      var size = (_6.length + 65535 | 0) / 65536 | 0;

-      return /* tuple */[

-              Source.$at$at(/* record */[/* mtype : MemoryType */[/* record */[

-                        /* min */size,

-                        /* max : Some */[size]

-                      ]]], at$1),

-              /* :: */[

-                Source.$at$at(/* record */[

-                      /* index */Source.$at$at(i, at$1),

-                      /* offset */Source.$at$at(/* :: */[

-                            Source.$at$at(Operators.i32_const(Source.$at$at(0, at$1)), at$1),

-                            /* [] */0

-                          ], at$1),

-                      /* init */_6

-                    ], at$1),

+                      /* module_name */_1[0],

+                      /* item_name */_1[1],

+                      /* idesc */Source.$at$at(/* MemoryImport */Block.__(2, [_2]), at)

+                    ], at),

                 /* [] */0

               ],

               /* [] */0

@@ -26971,43 +26353,111 @@
     };

   },

   function (__caml_parser_env) {

-    var _3 = Parsing.peek_val(__caml_parser_env, 4);

-    var _4 = Parsing.peek_val(__caml_parser_env, 3);

-    var _5 = Parsing.peek_val(__caml_parser_env, 2);

-    var _6 = Parsing.peek_val(__caml_parser_env, 1);

-    var at$1 = at(/* () */0);

-    return function (c) {

-      Curry._3(_3, c, anon_global, bind_global);

+    var _1 = Parsing.peek_val(__caml_parser_env, 1);

+    var _2 = Parsing.peek_val(__caml_parser_env, 0);

+    return function (c, x, at) {

+      var match = Curry._3(_2, c, x, at);

       return /* tuple */[

-              function () {

-                return Source.$at$at(/* record */[

-                            /* gtype */_5,

-                            /* value */Curry._1(_6, c)

-                          ], at$1);

-              },

-              Curry._3(_4, /* GlobalExport */3, c[/* globals */5][/* count */1], c)

+              match[0],

+              match[1],

+              match[2],

+              /* :: */[

+                Curry._2(_1, /* MemoryExport */Block.__(2, [x]), c),

+                match[3]

+              ]

             ];

     };

   },

   function (__caml_parser_env) {

-    var _3 = Parsing.peek_val(__caml_parser_env, 3);

-    var _4 = Parsing.peek_val(__caml_parser_env, 2);

-    var _5 = Parsing.peek_val(__caml_parser_env, 1);

+    var _3 = Parsing.peek_val(__caml_parser_env, 1);

+    return function (_, x, at) {

+      var size = (_3.length + 65535 | 0) / 65536 | 0;

+      return /* tuple */[

+              /* :: */[

+                Source.$at$at(/* record */[/* mtype : MemoryType */[/* record */[

+                          /* min */size,

+                          /* max : Some */[size]

+                        ]]], at),

+                /* [] */0

+              ],

+              /* :: */[

+                Source.$at$at(/* record */[

+                      /* index */x,

+                      /* offset */Source.$at$at(/* :: */[

+                            Source.$at$at(Operators.i32_const(Source.$at$at(0, at)), at),

+                            /* [] */0

+                          ], at),

+                      /* init */_3

+                    ], at),

+                /* [] */0

+              ],

+              /* [] */0,

+              /* [] */0

+            ];

+    };

+  },

+  function (__caml_parser_env) {

+    var _3 = Parsing.peek_val(__caml_parser_env, 2);

+    var _4 = Parsing.peek_val(__caml_parser_env, 1);

     var at$1 = at(/* () */0);

     return function (c) {

-      Curry._3(_3, c, anon_global, bind_global);

+      var x = Source.$at$at(Curry._3(_3, c, anon_global, bind_global), at$1);

+      return function () {

+        return Curry._3(_4, c, x, at$1);

+      };

+    };

+  },

+  function (__caml_parser_env) {

+    var _1 = Parsing.peek_val(__caml_parser_env, 1);

+    var _2 = Parsing.peek_val(__caml_parser_env, 0);

+    return function (c, _, at) {

       return /* tuple */[

-              function () {

-                return Source.$at$at(/* record */[

-                            /* gtype */_4,

-                            /* value */Curry._1(_5, c)

-                          ], at$1);

-              },

+              /* :: */[

+                Source.$at$at(/* record */[

+                      /* gtype */_1,

+                      /* value */Curry._1(_2, c)

+                    ], at),

+                /* [] */0

+              ],

+              /* [] */0,

               /* [] */0

             ];

     };

   },

   function (__caml_parser_env) {

+    var _1 = Parsing.peek_val(__caml_parser_env, 1);

+    var _2 = Parsing.peek_val(__caml_parser_env, 0);

+    return function (_, _$1, at) {

+      return /* tuple */[

+              /* [] */0,

+              /* :: */[

+                Source.$at$at(/* record */[

+                      /* module_name */_1[0],

+                      /* item_name */_1[1],

+                      /* idesc */Source.$at$at(/* GlobalImport */Block.__(3, [_2]), at)

+                    ], at),

+                /* [] */0

+              ],

+              /* [] */0

+            ];

+    };

+  },

+  function (__caml_parser_env) {

+    var _1 = Parsing.peek_val(__caml_parser_env, 1);

+    var _2 = Parsing.peek_val(__caml_parser_env, 0);

+    return function (c, x, at) {

+      var match = Curry._3(_2, c, x, at);

+      return /* tuple */[

+              match[0],

+              match[1],

+              /* :: */[

+                Curry._2(_1, /* GlobalExport */Block.__(3, [x]), c),

+                match[2]

+              ]

+            ];

+    };

+  },

+  function (__caml_parser_env) {

     var _3 = Parsing.peek_val(__caml_parser_env, 2);

     var _4 = Parsing.peek_val(__caml_parser_env, 1);

     return function (c) {

@@ -27058,78 +26508,7 @@
       return Source.$at$at(/* record */[

                   /* module_name */_3,

                   /* item_name */_4,

-                  /* ikind */Source.$at$at(Curry._1(_5, c), at5)

-                ], at$1);

-    };

-  },

-  function (__caml_parser_env) {

-    var _3 = Parsing.peek_val(__caml_parser_env, 3);

-    var _4 = Parsing.peek_val(__caml_parser_env, 2);

-    var _5 = Parsing.peek_val(__caml_parser_env, 1);

-    var at$1 = at(/* () */0);

-    return function (c) {

-      Curry._3(_3, c, anon_func, bind_func);

-      return Source.$at$at(/* record */[

-                  /* module_name */_4[0],

-                  /* item_name */_4[1],

-                  /* ikind */Source.$at$at(/* FuncImport */Block.__(0, [Curry._2(_5, c, type_)]), at$1)

-                ], at$1);

-    };

-  },

-  function (__caml_parser_env) {

-    var _3 = Parsing.peek_val(__caml_parser_env, 3);

-    var _4 = Parsing.peek_val(__caml_parser_env, 2);

-    var _5 = Parsing.peek_val(__caml_parser_env, 1);

-    var at$1 = at(/* () */0);

-    var at5 = ati(5);

-    return function (c) {

-      Curry._3(_3, c, anon_func, bind_func);

-      return Source.$at$at(/* record */[

-                  /* module_name */_4[0],

-                  /* item_name */_4[1],

-                  /* ikind */Source.$at$at(/* FuncImport */Block.__(0, [inline_type(c, _5, at5)]), at$1)

-                ], at$1);

-    };

-  },

-  function (__caml_parser_env) {

-    var _3 = Parsing.peek_val(__caml_parser_env, 3);

-    var _4 = Parsing.peek_val(__caml_parser_env, 2);

-    var _5 = Parsing.peek_val(__caml_parser_env, 1);

-    var at$1 = at(/* () */0);

-    return function (c) {

-      Curry._3(_3, c, anon_table, bind_table);

-      return Source.$at$at(/* record */[

-                  /* module_name */_4[0],

-                  /* item_name */_4[1],

-                  /* ikind */Source.$at$at(/* TableImport */Block.__(1, [_5]), at$1)

-                ], at$1);

-    };

-  },

-  function (__caml_parser_env) {

-    var _3 = Parsing.peek_val(__caml_parser_env, 3);

-    var _4 = Parsing.peek_val(__caml_parser_env, 2);

-    var _5 = Parsing.peek_val(__caml_parser_env, 1);

-    var at$1 = at(/* () */0);

-    return function (c) {

-      Curry._3(_3, c, anon_memory, bind_memory);

-      return Source.$at$at(/* record */[

-                  /* module_name */_4[0],

-                  /* item_name */_4[1],

-                  /* ikind */Source.$at$at(/* MemoryImport */Block.__(2, [_5]), at$1)

-                ], at$1);

-    };

-  },

-  function (__caml_parser_env) {

-    var _3 = Parsing.peek_val(__caml_parser_env, 3);

-    var _4 = Parsing.peek_val(__caml_parser_env, 2);

-    var _5 = Parsing.peek_val(__caml_parser_env, 1);

-    var at$1 = at(/* () */0);

-    return function (c) {

-      Curry._3(_3, c, anon_global, bind_global);

-      return Source.$at$at(/* record */[

-                  /* module_name */_4[0],

-                  /* item_name */_4[1],

-                  /* ikind */Source.$at$at(/* GlobalImport */Block.__(3, [_5]), at$1)

+                  /* idesc */Source.$at$at(Curry._1(_5, c), at5)

                 ], at$1);

     };

   },

@@ -27144,37 +26523,25 @@
   function (__caml_parser_env) {

     var _3 = Parsing.peek_val(__caml_parser_env, 1);

     return function (c) {

-      return /* tuple */[

-              /* FuncExport */0,

-              Curry._2(_3, c, func)

-            ];

+      return /* FuncExport */Block.__(0, [Curry._2(_3, c, func)]);

     };

   },

   function (__caml_parser_env) {

     var _3 = Parsing.peek_val(__caml_parser_env, 1);

     return function (c) {

-      return /* tuple */[

-              /* TableExport */1,

-              Curry._2(_3, c, table)

-            ];

+      return /* TableExport */Block.__(1, [Curry._2(_3, c, table)]);

     };

   },

   function (__caml_parser_env) {

     var _3 = Parsing.peek_val(__caml_parser_env, 1);

     return function (c) {

-      return /* tuple */[

-              /* MemoryExport */2,

-              Curry._2(_3, c, memory)

-            ];

+      return /* MemoryExport */Block.__(2, [Curry._2(_3, c, memory)]);

     };

   },

   function (__caml_parser_env) {

     var _3 = Parsing.peek_val(__caml_parser_env, 1);

     return function (c) {

-      return /* tuple */[

-              /* GlobalExport */3,

-              Curry._2(_3, c, global)

-            ];

+      return /* GlobalExport */Block.__(3, [Curry._2(_3, c, $$global)]);

     };

   },

   function (__caml_parser_env) {

@@ -27183,34 +26550,20 @@
     var at$1 = at(/* () */0);

     var at4 = ati(4);

     return function (c) {

-      var match = Curry._1(_4, c);

       return Source.$at$at(/* record */[

                   /* name */_3,

-                  /* ekind */Source.$at$at(match[0], at4),

-                  /* item */match[1]

+                  /* edesc */Source.$at$at(Curry._1(_4, c), at4)

                 ], at$1);

     };

   },

-  function () {

-    return function (_, _$1, _$2) {

-      return /* [] */0;

-    };

-  },

-  function (__caml_parser_env) {

-    return Parsing.peek_val(__caml_parser_env, 0);

-  },

   function (__caml_parser_env) {

     var _3 = Parsing.peek_val(__caml_parser_env, 1);

     var at$1 = at(/* () */0);

-    return function (k, count, _) {

-      return /* :: */[

-              Source.$at$at(/* record */[

-                    /* name */_3,

-                    /* ekind */Source.$at$at(k, at$1),

-                    /* item */Source.$at$at(count - 1 | 0, at$1)

-                  ], at$1),

-              /* [] */0

-            ];

+    return function (d, _) {

+      return Source.$at$at(/* record */[

+                  /* name */_3,

+                  /* edesc */Source.$at$at(d, at$1)

+                ], at$1);

     };

   },

   function (__caml_parser_env) {

@@ -27255,6 +26608,9 @@
     };

   },

   function (__caml_parser_env) {

+    return Parsing.peek_val(__caml_parser_env, 0);

+  },

+  function (__caml_parser_env) {

     var _1 = Parsing.peek_val(__caml_parser_env, 1);

     var _2 = Parsing.peek_val(__caml_parser_env, 0);

     return function (c) {

@@ -27266,9 +26622,11 @@
     var _1 = Parsing.peek_val(__caml_parser_env, 1);

     var _2 = Parsing.peek_val(__caml_parser_env, 0);

     return function (c) {

-      var match = Curry._1(_1, c);

+      var gf = Curry._1(_1, c);

       var m = Curry._1(_2, c);

-      if (m[/* imports */8] !== /* [] */0) {

+      var match = Curry._1(gf, /* () */0);

+      var globs = match[0];

+      if (globs !== /* [] */0 && m[/* imports */8] !== /* [] */0) {

         var at = List.hd(m[/* imports */8])[/* at */0];

         throw [

               Script.Syntax,

@@ -27277,11 +26635,9 @@
             ];

       }

       var newrecord = m.slice();

-      newrecord[/* globals */1] = /* :: */[

-        Curry._1(match[0], /* () */0),

-        m[/* globals */1]

-      ];

-      newrecord[/* exports */9] = Pervasives.$at(match[1], m[/* exports */9]);

+      newrecord[/* globals */1] = Pervasives.$at(globs, m[/* globals */1]);

+      newrecord[/* imports */8] = Pervasives.$at(match[1], m[/* imports */8]);

+      newrecord[/* exports */9] = Pervasives.$at(match[2], m[/* exports */9]);

       return newrecord;

     };

   },

@@ -27289,10 +26645,11 @@
     var _1 = Parsing.peek_val(__caml_parser_env, 1);

     var _2 = Parsing.peek_val(__caml_parser_env, 0);

     return function (c) {

-      var t = Curry._1(_1, c);

+      var tf = Curry._1(_1, c);

       var m = Curry._1(_2, c);

-      var match = Curry._1(t, /* () */0);

-      if (m[/* imports */8] !== /* [] */0) {

+      var match = Curry._1(tf, /* () */0);

+      var tabs = match[0];

+      if (tabs !== /* [] */0 && m[/* imports */8] !== /* [] */0) {

         var at = List.hd(m[/* imports */8])[/* at */0];

         throw [

               Script.Syntax,

@@ -27300,23 +26657,29 @@
               "import after table definition"

             ];

       }

-      var newrecord = m.slice();

-      newrecord[/* tables */2] = /* :: */[

-        match[0],

-        m[/* tables */2]

-      ];

-      newrecord[/* elems */6] = Pervasives.$at(match[1], m[/* elems */6]);

-      newrecord[/* exports */9] = Pervasives.$at(match[2], m[/* exports */9]);

-      return newrecord;

+      return /* record */[

+              /* types */m[/* types */0],

+              /* globals */m[/* globals */1],

+              /* tables */Pervasives.$at(tabs, m[/* tables */2]),

+              /* memories */m[/* memories */3],

+              /* funcs */m[/* funcs */4],

+              /* start */m[/* start */5],

+              /* elems */Pervasives.$at(match[1], m[/* elems */6]),

+              /* data */m[/* data */7],

+              /* imports */Pervasives.$at(match[2], m[/* imports */8]),

+              /* exports */Pervasives.$at(match[3], m[/* exports */9])

+            ];

     };

   },

   function (__caml_parser_env) {

     var _1 = Parsing.peek_val(__caml_parser_env, 1);

     var _2 = Parsing.peek_val(__caml_parser_env, 0);

     return function (c) {

-      var match = Curry._1(_1, c);

+      var mf = Curry._1(_1, c);

       var m = Curry._1(_2, c);

-      if (m[/* imports */8] !== /* [] */0) {

+      var match = Curry._1(mf, /* () */0);

+      var mems = match[0];

+      if (mems !== /* [] */0 && m[/* imports */8] !== /* [] */0) {

         var at = List.hd(m[/* imports */8])[/* at */0];

         throw [

               Script.Syntax,

@@ -27324,14 +26687,18 @@
               "import after memory definition"

             ];

       }

-      var newrecord = m.slice();

-      newrecord[/* memories */3] = /* :: */[

-        match[0],

-        m[/* memories */3]

-      ];

-      newrecord[/* data */7] = Pervasives.$at(match[1], m[/* data */7]);

-      newrecord[/* exports */9] = Pervasives.$at(match[2], m[/* exports */9]);

-      return newrecord;

+      return /* record */[

+              /* types */m[/* types */0],

+              /* globals */m[/* globals */1],

+              /* tables */m[/* tables */2],

+              /* memories */Pervasives.$at(mems, m[/* memories */3]),

+              /* funcs */m[/* funcs */4],

+              /* start */m[/* start */5],

+              /* elems */m[/* elems */6],

+              /* data */Pervasives.$at(match[1], m[/* data */7]),

+              /* imports */Pervasives.$at(match[2], m[/* imports */8]),

+              /* exports */Pervasives.$at(match[3], m[/* exports */9])

+            ];

     };

   },

   function (__caml_parser_env) {

@@ -27340,8 +26707,8 @@
     return function (c) {

       var match = Curry._1(_1, c);

       var m = Curry._1(_2, c);

-      var func = Curry._1(match[0], /* () */0);

-      if (m[/* imports */8] !== /* [] */0) {

+      var funcs = Curry._1(match[0], /* () */0);

+      if (funcs !== /* [] */0 && m[/* imports */8] !== /* [] */0) {

         var at = List.hd(m[/* imports */8])[/* at */0];

         throw [

               Script.Syntax,

@@ -27350,11 +26717,9 @@
             ];

       }

       var newrecord = m.slice();

-      newrecord[/* funcs */4] = /* :: */[

-        func,

-        m[/* funcs */4]

-      ];

-      newrecord[/* exports */9] = Pervasives.$at(match[1], m[/* exports */9]);

+      newrecord[/* funcs */4] = Pervasives.$at(funcs, m[/* funcs */4]);

+      newrecord[/* imports */8] = Pervasives.$at(match[1], m[/* imports */8]);

+      newrecord[/* exports */9] = Pervasives.$at(match[2], m[/* exports */9]);

       return newrecord;

     };

   },

@@ -27397,8 +26762,7 @@
               x[/* at */0],

               "multiple start sections"

             ];

-      }

-      else {

+      } else {

         var newrecord = m.slice();

         newrecord[/* start */5] = /* Some */[x];

         return newrecord;

@@ -27432,6 +26796,13 @@
       return newrecord;

     };

   },

+  function () {

+    return /* None */0;

+  },

+  function (__caml_parser_env) {

+    var _1 = Parsing.peek_val(__caml_parser_env, 0);

+    return /* Some */[Source.$at$at(_1, at(/* () */0))];

+  },

   function (__caml_parser_env) {

     var _3 = Parsing.peek_val(__caml_parser_env, 2);

     var _4 = Parsing.peek_val(__caml_parser_env, 1);

@@ -27441,16 +26812,12 @@
           ];

   },

   function (__caml_parser_env) {

-    var _3 = Parsing.peek_val(__caml_parser_env, 3);

-    var _4 = Parsing.peek_val(__caml_parser_env, 2);

-    var _5 = Parsing.peek_val(__caml_parser_env, 1);

-    return /* tuple */[

-            _3,

-            Source.$at$at(/* Encoded */Block.__(1, [

-                    "binary",

-                    _4 + _5

-                  ]), at(/* () */0))

-          ];

+    var _1 = Parsing.peek_val(__caml_parser_env, 0);

+    return Source.$at$at(/* Textual */Block.__(0, [Source.$at$at(Curry._1(_1, empty_context(/* () */0)), at(/* () */0))]), at(/* () */0));

+  },

+  function (__caml_parser_env) {

+    var _1 = Parsing.peek_val(__caml_parser_env, 0);

+    return Source.$at$at(/* Textual */Block.__(0, [Source.$at$at(Curry._1(_1, empty_context(/* () */0)), at(/* () */0))]), at(/* () */0));

   },

   function () {

     return /* None */0;

@@ -27460,6 +26827,31 @@
     return /* Some */[Source.$at$at(_1, at(/* () */0))];

   },

   function (__caml_parser_env) {

+    return Parsing.peek_val(__caml_parser_env, 0);

+  },

+  function (__caml_parser_env) {

+    var _3 = Parsing.peek_val(__caml_parser_env, 3);

+    var _5 = Parsing.peek_val(__caml_parser_env, 1);

+    return /* tuple */[

+            _3,

+            Source.$at$at(/* Encoded */Block.__(1, [

+                    "binary",

+                    _5

+                  ]), at(/* () */0))

+          ];

+  },

+  function (__caml_parser_env) {

+    var _3 = Parsing.peek_val(__caml_parser_env, 3);

+    var _5 = Parsing.peek_val(__caml_parser_env, 1);

+    return /* tuple */[

+            _3,

+            Source.$at$at(/* Quoted */Block.__(2, [

+                    "quote",

+                    _5

+                  ]), at(/* () */0))

+          ];

+  },

+  function (__caml_parser_env) {

     var _3 = Parsing.peek_val(__caml_parser_env, 3);

     var _4 = Parsing.peek_val(__caml_parser_env, 2);

     var _5 = Parsing.peek_val(__caml_parser_env, 1);

@@ -27496,7 +26888,7 @@
   function (__caml_parser_env) {

     var _3 = Parsing.peek_val(__caml_parser_env, 2);

     var _4 = Parsing.peek_val(__caml_parser_env, 1);

-    return Source.$at$at(/* AssertSoftInvalid */Block.__(2, [

+    return Source.$at$at(/* AssertUnlinkable */Block.__(2, [

                   _3[1],

                   _4

                 ]), at(/* () */0));

@@ -27504,7 +26896,7 @@
   function (__caml_parser_env) {

     var _3 = Parsing.peek_val(__caml_parser_env, 2);

     var _4 = Parsing.peek_val(__caml_parser_env, 1);

-    return Source.$at$at(/* AssertUnlinkable */Block.__(3, [

+    return Source.$at$at(/* AssertUninstantiable */Block.__(3, [

                   _3[1],

                   _4

                 ]), at(/* () */0));

@@ -27512,22 +26904,18 @@
   function (__caml_parser_env) {

     var _3 = Parsing.peek_val(__caml_parser_env, 2);

     var _4 = Parsing.peek_val(__caml_parser_env, 1);

-    return Source.$at$at(/* AssertUninstantiable */Block.__(4, [

-                  _3[1],

-                  _4

-                ]), at(/* () */0));

-  },

-  function (__caml_parser_env) {

-    var _3 = Parsing.peek_val(__caml_parser_env, 2);

-    var _4 = Parsing.peek_val(__caml_parser_env, 1);

-    return Source.$at$at(/* AssertReturn */Block.__(5, [

+    return Source.$at$at(/* AssertReturn */Block.__(4, [

                   _3,

                   _4

                 ]), at(/* () */0));

   },

   function (__caml_parser_env) {

     var _3 = Parsing.peek_val(__caml_parser_env, 1);

-    return Source.$at$at(/* AssertReturnNaN */Block.__(6, [_3]), at(/* () */0));

+    return Source.$at$at(/* AssertReturnCanonicalNaN */Block.__(5, [_3]), at(/* () */0));

+  },

+  function (__caml_parser_env) {

+    var _3 = Parsing.peek_val(__caml_parser_env, 1);

+    return Source.$at$at(/* AssertReturnArithmeticNaN */Block.__(6, [_3]), at(/* () */0));

   },

   function (__caml_parser_env) {

     var _3 = Parsing.peek_val(__caml_parser_env, 2);

@@ -27634,6 +27022,16 @@
     return Parsing.peek_val(__caml_parser_env, 1);

   },

   function (__caml_parser_env) {

+    var _1 = Parsing.peek_val(__caml_parser_env, 1);

+    return /* :: */[

+            Source.$at$at(/* Module */Block.__(0, [

+                    /* None */0,

+                    _1

+                  ]), at(/* () */0)),

+            /* [] */0

+          ];

+  },

+  function (__caml_parser_env) {

     var _1 = Parsing.peek_val(__caml_parser_env, 0);

     return /* :: */[

             _1,

@@ -27641,7 +27039,14 @@
           ];

   },

   function (__caml_parser_env) {

-    return Parsing.peek_val(__caml_parser_env, 1)[1];

+    return Parsing.peek_val(__caml_parser_env, 1);

+  },

+  function (__caml_parser_env) {

+    var _1 = Parsing.peek_val(__caml_parser_env, 1);

+    return /* tuple */[

+            /* None */0,

+            _1

+          ];

   },

   function (__caml_parser_env) {

     throw [

@@ -27667,19 +27072,19 @@
   /* actions */yyact,

   /* transl_const */yytransl_const,

   /* transl_block */yytransl_block,

-  /* lhs */'\xff\xff\x04\0\x04\0\x05\0\x05\0\x06\0\x07\0\x07\0\b\0\t\0\t\0\t\0\t\0\x0b\0\r\0\f\0\f\0\x0e\0\x10\0\x10\0\x10\0\x0f\0\x0f\0\x11\0\x11\0\x12\0\x12\0\n\0\x13\0\x13\0\x14\0\x14\0\x15\0\x15\0\x16\0\x16\0\x17\0\x17\0\x17\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x19\0\x19\0\x19\0\x19\0\x1b\0\x1a\0\x1d\0\x1d\0\x1d\0\x1d\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1c\0\x1c\0\x1e\0\x1e\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-\0.\0/\0/\0/\0/\x000\0(\0(\0$\x001\x001\x002\x003\x003\x003\x003\x003\x003\x003\x003\x003\x003\x003\x004\x004\x005\x005\x006\x006\x008\x008\x008\x008\x008\x008\x008\x008\x008\x009\x009\x009\x009\x009\0;\0;\0:\0:\0:\0:\0<\x007\x007\0\x01\0\x02\0\x03\0\0\0\0\0\0\0',

-  /* len */"\x02\0\0\0\x02\0\0\0\x02\0\x01\0\x01\0\x04\0\x04\0\0\0\x05\0\x05\0\x06\0\x02\0\x01\0\x01\0\x02\0\x04\0\x01\0\x01\0\x01\0\x01\0\x01\0\0\0\x02\0\0\0\x01\0\x01\0\0\0\x01\0\0\0\x01\0\0\0\x01\0\0\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x02\0\x02\0\x03\0\x01\0\x02\0\x02\0\x01\0\x01\0\x02\0\x02\0\x02\0\x02\0\x02\0\x03\0\x03\0\x01\0\x01\0\x02\0\x01\0\x01\0\x01\0\x01\0\x01\0\x05\0\x05\0\x05\0\b\0\x02\0\x03\0\x02\0\x03\0\x03\0\x04\0\b\0\x04\0\t\0\x05\0\x03\0\x02\0\0\0\x02\0\0\0\x02\0\x01\0\x01\0\x05\0\x05\0\x06\0\x01\0\x05\0\x06\0\x07\0\x06\0\x06\0\x05\0\x04\0\x01\0\x06\0\x05\0\x06\0\n\0\x06\0\x05\0\x06\0\t\0\b\0\x07\0\x06\0\x05\0\x05\0\x05\0\x05\0\x05\0\x06\0\x06\0\x06\0\x06\0\x06\0\x06\0\x05\0\x04\0\x04\0\x04\0\x04\0\x05\0\0\0\x01\0\x04\0\x04\0\x05\0\x04\0\0\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x05\0\x06\0\0\0\x01\0\x06\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x04\0\x05\0\x05\0\x01\0\x01\0\x01\0\x05\0\x01\0\0\0\x02\0\x05\0\x05\0\x05\0\x04\0\x04\0\0\0\x02\0\x02\0\x01\0\x02\0\x02\0\x02\0\x02\0",

-  /* defred */"\0\0\0\0\0\0\0\0\0\0\0\0\xaf\0\xa0\0\x9e\0\x9f\0\0\0\xa2\0\0\0\xb0\0\xad\0\0\0\xb1\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\xa4\0\xac\0\xae\0\x92\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\0\x01\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\0\0\0\0\0\0\0\0\0\0\0\x9b\0\0\0\0\0\0\0\0\0\0\0\xa8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x89\0\x8a\0\x87\0\x8b\0\x88\0\x86\0\x8d\0\x8e\0\x85\0\x8c\0\x8f\0\xa5\0\xa1\0\0\0\x94\0\x95\0\x96\0\x97\0\x98\0\0\0\x9a\0\xab\0\x99\0\x9c\0\x9d\0\xa6\0\xa7\0\x02\0\x90\0\x1b\0\x1a\0\0\0\x15\0\x16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0a\0\0\0\0\0\0\0\x01\0\0\0\0\0\x93\0\x12\0\x13\0\x14\0\0\0\0\0(\0/\0\0\0\0\x000\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'\x008\x009\0;\0\0\0\0\0$\0%\0&\0Y\0\0\0U\0\0\0\0\0\x83\0\0\0\x81\0\0\0\x06\0\0\0\0\0\0\0\0\0\0\0\x7f\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\x01\0\0\0\0\0\0\0\0\0\xa9\0\0\0\0\0\0\0\0\0\0\0\0\0\x1d\0\0\0\0\0\0\0)\0*\0\0\0-\0.\x001\x002\x003\x004\x005\0!\0\0\0\0\0:\0\0\0\0\0\0\0Q\0_\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x82\0\0\0T\0\0\0\0\0\0\0\0\0\0\0\x05\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0F\0E\0\0\0\x18\0c\0\x01\0\0\0\x0e\0\0\0\0\0\0\0g\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\0\0\0\0+\0#\x006\x007\0]\0\0\0^\0\0\0\0\0t\0s\0\b\0\0\0l\0\0\0w\0\x10\0\0\0d\0\r\0u\0G\0\0\0H\0`\0S\0b\0\0\0\x01\0h\0v\0f\0\0\0\0\0\0\0\0\0r\0\0\0\0\0\0\0\0\0\x11\0\x04\0\0\0\0\0\0\0\0\0\0\0\0\0\x80\0D\0\0\0\0\0\0\0\0\0\\\0\0\0\0\0\0\0\x07\0k\0\0\0\0\0\0\0I\0\0\0\0\0\0\0\0\0\0\0\0\0y\0|\0z\0{\0W\0\0\0\0\0V\0Z\0\0\0x\0\x1f\0@\0B\0\0\0A\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0j\0\0\0\0\0\0\0\0\0\0\0\0\0X\0[\0\0\0\x0b\0\0\0\n\0\0\0\0\0\0\0N\0i\0n\0m\0q\0o\0p\0\0\0\f\0e\0\0\0\0\0C\0\0\0\0\0\0\0\0\0\0\0\0\0J\0\0\0L\0",

-  /* dgoto */'\x04\0\x06\0\r\0\x10\0V\x001\x01\f\x01\xc4\0\x85\0\xff\0\x7f\0\r\x01\x0e\x01\x1d\x01\xb4\0\xd2\0\x96\0\xd3\0\x80\0\xe5\0\x88\x01\xf3\x007\x01\xb5\0\xb6\0\xb7\0\xb8\x002\x01\xb9\0\xd0\0\x15\x01u\x01\x06\x01\xba\0\xbb\x009\0\xbc\0\x8c\0:\0;\0\xc9\0<\0=\0>\0"\x01?\0\xbd\0\xdc\0@\0A\0B\0C\0\x07\0%\0\b\0M\0\t\0\n\0\x0b\0\f\0N\0',

-  /* sindex */'\xd4\0\x17\xff\x17\xff.\xff\0\0a\xff\0\0\0\0\0\0\0\0\x17\xff\0\0@\0\0\0\0\0"\xff\0\0l\0i\xffi\xffw\xffi\xffi\xff.\xff.\xff.\xff.\xffp\xffp\xff~\xffp\xffi\xffi\xff\0\0\0\0\0\0\0\0\xab\xff\x17\xffi\xff\x92\xff\xac\xff\xc9\xff\xd9\xff\xf6\xff\xf9\xff\f\xff\xa1\xff\xaf\xff\xfc\xfe\xfb\xff\xfe\xff\x15\0\x1c\x001\xff\0\0\x17\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\xb1\xff\xb6\xff\x11\0\xa1\xff-\x007\0=\0?\0D\0/\0J\0\xa1\xff\0\0K\0S\0d\0e\0n\0\0\0[\xffR\0\xb7\xff\xc6\xffR\0R\0\x8f\xffR\0\x8f\xffv\0w\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\0y\0\0\0\0\0\0\0\0\0\0\0\x0b\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x16\x02\0\0\0\0z\0V\0\x8a\0\x95\0\xe9\xff\x97\0W\x03\x98\0\0\0\xb7\xff\x99\0\x98\0\0\0\x9b\0\xa1\0\0\0\0\0\0\0\0\0\xbb\0\xd4\x02\0\0\0\0R\0R\0\0\0R\0\xb7\xff\xb7\xff\xb7\xff\xb7\xff\xb7\xff\0\0\xb7\xff\xb7\xff\xb7\xff\xb7\xff\xb7\xff\xa5\0\xa5\0\x0b\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<\x02b\x02\0\0\0\0\0\0\0\0\xbd\0\0\0\x88\x02\xbf\0\0\0\xc7\0\0\0\xd7\0\0\0\r\xffb\x02\xed\xff\xed\xff\xcd\xff\0\0u\xff\xea\0R\0R\0R\0b\x02\xe3\0\xe4\0\xb7\xff\xb7\xff\xec\0\x98\xff\xfe\0\xea\0\xea\0\0\0\x7f\xff\b\x01\xfe\xfe\t\x01\0\0\xb7\xff\x12\0\xe7\0\x12\0\x0e\x01\x10\x01\0\0\xe7\0\xe7\0\xe7\0\0\0\0\0\xb7\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xfa\0\xfa\0\0\x001\x03#\x01\xef\x03\0\0\0\0\x0b\x03<\x02-\x01\xe7\xff.\x01/\x01\x99\xff0\x01\0\0<\x01\0\0I\x01U\x01b\x02T\x01^\x01\0\0W\x01o\x01[\x01y\x01\xe7\0\xe7\0\xe7\0z\x01\xe3\0\0\0\0\0{\x01\0\0\0\0\0\0P\x01\0\0\x82\x01\x84\x01\xa9\xff\0\0d\xff\x85\x01\xb7\xff\xb7\xff\xb7\xff\xb7\xff\0\0\x95\x01\xe7\0\x9f\x01b\x01\xa0\x01\xa1\x01\xa6\x01\xaa\x01\xab\x01b\x02\xb7\x01\xe6\xff\xc1\x01\0\0\0\0\0\0\0\0\0\0\xc6\x01\0\0\x12\0\xe7\0\0\0\0\0\0\0\xc7\x01\0\0\xc8\x01\0\0\0\0\x80\x01\0\0\0\0\0\0\0\0\xcf\x01\0\0\0\0\0\0\0\0\xad\xff\0\0\0\0\0\0\0\0R\0R\0R\0R\0\0\0\xd0\x01\xd1\x01\xe1\x01\xeb\x01\0\0\0\0<\x02\xec\x01\xae\x02\xae\x02\xed\x01\xee\x01\0\0\0\0R\0R\0R\0R\0\0\0\xf6\x01\xf4\x01\xf7\x01\0\0\0\0\xb7\xff}\x03\b\x02\0\0\x11\x02\xbb\xff\xbf\0\xed\xff\xea\0\xea\0\0\0\0\0\0\0\0\0\0\0<\x02\xa3\x03\0\0\0\0\xae\x02\0\0\0\0\0\0\0\0b\x02\0\0\xc7\0\x12\x02\xc7\0\x13\x02b\x02\xc9\x03\xe3\0\0\0\x14\x02\x1a\x02\x1c\x02\x1d\x02-\x027\x02\0\0\0\x004\x02\0\0\xc7\0\0\x009\x02:\x02b\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\0R\0\0\0\0\0\x17\x02@\x02\0\x005\x02C\x02b\x02L\x02]\x02b\x02\0\0^\x02\0\0',

-  /* rindex */"\0\0M\x03\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0O\xff\x14\0\0\0w\0w\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0w\0\xc2\xff\0\0\0\0\0\0\0\0_\x02`\x02f\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\0h\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0_\x02_\x02_\x02_\x02_\x02_\x02_\x02_\x02_\x02_\x02\0\0\0\0\0\0h\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\0h\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0~\x01\0\0\0\0\xf2\xffh\xff\0\0)\xff\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\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\0i\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83\xff\0\0\0\0\0\0y\x02k\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0M\0\x16\0\0\0M\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x9a\0\x9a\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0i\x02t\xff\0\0\0\0\0\0\0\0\0\0\0\0i\x02\x83\x02\0\0\x83\x02\0\0\0\0\0\0\0\0i\x02\0\0\0\0\0\0\0\0\0\0\0\0s\0\xf3\xffs\0i\x02\x84\x02\0\0y\x02\xc0\0\0\0\0\0\x8e\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x86\x02\x86\x02\x86\x02\0\0\0\0\0\0\xa4\x01X\x01\xa4\x01\0\0\0\0\xc0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xe6\0\xe6\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0i\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0i\x02\0\0\xf7\xff\0\0\0\0\0\0\0\0\0\0\xca\x01\x89\x02\xca\x01\0\0\x84\x02\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\0\0\0\0\f\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0t\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x86\x02\x86\x02\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\0\0\0\0\0\0\0\0\0\0<\0\xf2\xff\x95\x02\x95\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\0i\x02\0\0i\x02i\x02\0\0\0\0\0\0\0\x002\x012\x01\xf0\x012\x01\0\0\0\0\0\0\0\0\0\0\0\0y\x02\0\0\0\0\0\0\0\0\0\0\x83\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0i\x02\0\0\0\0\0\0i\x02\0\0\0\0\0\0\0\0\x8a\x02\0\0\x83\x02\0\0\x83\x02\0\0i\x02\0\0\xaf\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x83\x02\0\0\0\0\0\0i\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\x002\x01\0\0\0\0\x8f\x02\0\0\0\0\0\0\x9f\x02i\x02\0\0\0\0i\x02\0\0\0\0\0\0",

-  /* gindex */"\0\0\0\0\0\0\0\0x\xffD\xff\xa5\x02Q\xff.\x03F\xff\xa7\xffG\xffH\xff3\xffL\xff\xbc\xff\n\x03P\xff\xb2\xff\x80\xff\xbd\xfe\f\x03\xc4\x02\0\0\x82\xff\0\0\xa6\xffV\xffN\xff\0\0\xa8\x02\0\0B\xffR\xff\xca\xfe\0\0\xca\xff\xb5\xff\0\0\0\x002\x03\0\0\0\0\0\0\0\0\0\0\xe3\xff\0\0\0\0\0\0\0\0\xac\0t\0\x96\0\xbe\0\xf0\xff\0\0\xbc\x03\0\0!\0\0\0",

-  /* tablesize */1335,

-  /* table */'\x86\0\xa3\0\x8b\0\xf9\0\x8b\0\x02\x01\xf7\0\xd9\0\xfc\0\0\x01\x1e\x01\xcf\0\x87\0\x88\0\xfd\0\x8d\0\x13\x01\x0f\x01\x05\x01\x8f\0\x83\0\x04\x01\b\x01\t\x01\x8a\0\xcf\0\x8e\0\xe6\0\x05\x01\xe7\0\x1c\x01\x1c\x01\x05\0\x17\x01\x18\x01*\x01,\x01-\x01\x89\x01\x8a\x01\x8b\x01#\x01\x19\0!\0\x83\x01\x84\x01\x12\0$\x01\x8b\0%\x01\x19\0&\x01\x8b\0T\0n\0\x0f\0\x15\0\x16\x005\x01U\x003\x014\x01v\0\xd1\0"\0\xe4\0\xe4\0\xd8\0\xe4\0\xe2\0\xe3\0D\0\x15\0\x16\0C\x01\x10\x01\x11\x01\x12\x01:\x01\x9b\x01\x1f\x01\xc5\0\xc8\0\x91\0\x12\0K\x01\x05\x01\xd5\0\x91\0\x91\0\xe8\0\xe9\0\xea\0\xeb\0\xec\0|\0\xed\0\xee\0\xef\0\xf0\0\xf1\0}\0J\x01\xaf\x01L\x01\x19\0\xc6\0\xca\0#\0_\x01$\0\x19\0\xd7\0\x19\0\xe4\0\xe4\0\xe4\0\x14\x01\n\x01\x11\0\xcf\0.\0\xcf\0\'\0\x0b\x01\xcf\0P\0g\x01m\x01o\x01P\0|\0~\0P\0+\x011\0.\x01 \x01~\0*\0+\0,\0-\0U\x01\x81\x002\0P\x01\x12\0\x82\0V\x01F\0W\x01\x89\0X\x01(\x01\x13\0\x14\0\x15\0\x16\0\x17\0\x18\0\x19\0\x1a\0\x1b\0\x1c\0\x1d\0\x1e\0\x1f\0 \0&\0L\0(\0)\0|\0\x99\x017\0G\0|\0\x80\x01T\x018\x005\x006\0v\x01\x81\0O\0\x14\x01k\0\x82\0E\0\x95\x01|\0l\0\x98\x01\x8f\x01\x1c\x01\x96\x01\x94\x01\x91\0<\x01=\x01w\x01\x97\x01~\0\x91\0H\0\x1a\x01\x84\0\xe2\0\xe3\0\x9d\x01\x9a\x01\x9f\x01\x01\0\x02\0\x03\0\x9c\x01/\x000\x003\x004\0I\0\xa1\x01Z\x01[\x01\\\x01]\x01n\x01\xab\x01a\0b\0c\0d\0e\0f\0g\0h\0i\0j\0\xc2\0\xae\x01t\x01\xc3\0\xc2\0i\x01\xcf\0\x07\x01j\x01\x19\0\x1c\0J\0\x19\0\x1c\0K\0\x0f\0P\0\xb4\x01\x0f\0Q\0\xb7\x01\xcf\0\xe2\0\xe3\0x\x01y\x01z\x01{\x01\xa3\0\x93\0\x94\0\x95\0\x87\x01\x87\x01\x87\x01\x87\x01\xcf\0\xde\0<\x01=\x01~\0)\x01R\0\x92\x01m\0\x1c\0\x91\0\x91\0\x1c\0S\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\x008\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0o\0\xa3\x01\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0p\0W\0X\0Y\0\x19\0\x19\0q\0Z\0r\0[\0\\\0]\0^\0s\0_\0`\0\x87\x01t\0\x1c\0u\0w\0\x1c\0~\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0x\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0y\0z\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0{\0\x1c\0\x90\0\x91\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\xbf\0\x1c\0\x92\0\xbe\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\xc0\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x1c\0\x84\0\xda\0\xc7\0\x89\0\xd4\0 \0 \0 \0 \0 \0 \0 \0\xdb\0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0\x1c\0 \0 \0 \0 \0 \0 \0 \0 \0 \0\xdd\0\xf2\0\xfa\0\xfe\0\x17\0\x17\0\x17\0\x17\0\x17\0\x17\0\x17\0\x01\x01\x17\0\x17\0\x17\0\x17\0\x17\0\x17\0\x17\0\x17\0\x17\0\x17\0\x17\0\x17\0\x17\0\x17\0\x17\0\x17\0\x03\x01 \0\x17\0\x17\0\x17\0\x17\0\x17\0\x17\0\x17\0\x17\0\n\x01\xf8\0)\x01\x16\x01"\0"\0"\0"\0"\0"\0"\0\x19\x01"\0"\0"\0"\0"\0"\0"\0"\0"\0"\0"\0"\0"\0"\0"\0"\0\x1b\x01\x17\0"\0"\0"\0"\0"\0"\0"\0"\0!\x01/\x01\'\x010\x01\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\x006\x01\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\x009\x01"\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0;\x01>\x01?\x01@\x01\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0A\x01\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0B\x01\x03\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x04\x01D\x01E\x01F\x01\x03\0\x0b\x01\x03\0\x03\0\x03\0\x03\0\x03\0a\x01\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0G\x01\x1e\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0I\x01M\x01O\x01Q\x01\x19\0\x19\0\x19\0\x19\0\x19\0R\x01\x19\0S\x01Y\x01\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0^\x01\x03\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0`\x01b\x01c\x01d\x01\x03\0e\x01\x03\0\x03\0\x03\0\x03\0\x03\0r\x01f\x01\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0h\x01\x19\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0k\x01l\x01p\x01q\x01\x03\0\x03\0\x03\0\x03\0\x03\0s\x01\x03\0|\x01}\x01\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0~\x01\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x7f\x01\x81\x01\x85\x01\x86\x01\x1e\0\x8d\x01\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x8c\x01\x8e\x01\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x91\x01\x03\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x1e\0\x93\x01\x9e\x01\xa0\x01\xa4\x01\x97\0\xb0\x01\x98\0\x99\0\x9a\0\xa5\x01\x9b\0\xa6\x01\xa7\x01\x9c\0\x9d\0\x9e\0\x9f\0\xa0\0\xa1\0\xa2\0\xa3\0\xa4\0\xa5\0\xa6\0\xa7\0\xa8\0\xa9\0\xaa\0\xa8\x01\x1e\0\xab\0\xac\0\xad\0\xae\0\xaf\0\xb0\0\xb1\0\xb2\0\xa9\x01\xaa\x01\xac\x01\xad\x01\xf6\0\xb2\x01\x98\0\x99\0\x9a\0\xb1\x01\x9b\0\xb3\x01\xa3\0\x9c\0\x9d\0\x9e\0\x9f\0\xa0\0\xa1\0\xa2\0\xa3\0\xa4\0\xa5\0\xa6\0\xa7\0\xa8\0\xa9\0\xaa\0\xb5\x01\xb3\0\xab\0\xac\0\xad\0\xae\0\xaf\0\xb0\0\xb1\0\xb2\0\xb6\x01\xb8\x01\x84\0\xa3\0\xf8\0~\0\x98\0\x99\0\x9a\0\x91\0\x9b\0\xaa\0P\0\x9c\0\x9d\0\x9e\0\x9f\0\xa0\0\xa1\0\xa2\0\xa3\0\xa4\0\xa5\0\xa6\0\xa7\0\xa8\0\xa9\0\xaa\0\x17\0\xb3\0\xab\0\xac\0\xad\0\xae\0\xaf\0\xb0\0\xb1\0\xb2\0\t\0R\0\x7f\0\x03\0\xfb\0\x03\0\x98\0\x99\0\x9a\0\x19\0\x9b\0P\0K\0\x9c\0\x9d\0\x9e\0\x9f\0\xa0\0\xa1\0\xa2\0\xa3\0\xa4\0\xa5\0\xa6\0\xa7\0\xa8\0\xa9\0\xaa\0M\0\xb3\0\xab\0\xac\0\xad\0\xae\0\xaf\0\xb0\0\xb1\0\xb2\0H\x01\xc1\0\xf5\0\xf4\0\x82\x018\x01\x98\0\x99\0\x9a\0N\x01\x9b\0\x0e\0\xd6\0\x9c\0\x9d\0\x9e\0\x9f\0\xa0\0\xa1\0\xa2\0\xa3\0\xa4\0\xa5\0\xa6\0\xa7\0\xa8\0\xa9\0\xaa\0\0\0\xb3\0\xab\0\xac\0\xad\0\xae\0\xaf\0\xb0\0\xb1\0\xb2\0\0\0\0\0\0\0\0\0\0\0\0\0\x98\0\x99\0\xcb\0\0\0\xcc\0\0\0\0\0\x9c\0\xcd\0\x9e\0\x9f\0\xa0\0\xa1\0\xa2\0\xa3\0\xa4\0\xa5\0\xa6\0\xa7\0\xa8\0\xa9\0\xaa\0\0\0\xb3\0\xab\0\xac\0\xad\0\xae\0\xaf\0\xb0\0\xb1\0\xb2\0\0\0\0\0\xde\0\xdf\0\xe0\0\xe1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xe2\0\xe3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x98\0\x99\0\xcb\0\0\0\xcc\0\0\0\xb3\0\x9c\0\xcd\0\x9e\0\x9f\0\xa0\0\xa1\0\xa2\0\xa3\0\xa4\0\xa5\0\xa6\0\xa7\0\xa8\0\xa9\0\xaa\0\0\0\0\0\xab\0\xac\0\xad\0\xae\0\xaf\0\xb0\0\xb1\0\xb2\0\0\0\0\0\xde\0\xdf\0\xe0\0\xe1\0\x98\0\x99\0\xcb\0\0\0\xcc\0\0\0\0\0\x9c\0\xcd\0\x9e\0\x9f\0\xa0\0\xa1\0\xa2\0\xa3\0\xa4\0\xa5\0\xa6\0\xa7\0\xa8\0\xa9\0\xaa\0\0\0\xb3\0\xab\0\xac\0\xad\0\xae\0\xaf\0\xb0\0\xb1\0\xb2\0\0\0\0\0\0\0\xdf\0\xe0\0\xe1\0\x98\0\x99\0\xcb\0\0\0\xcc\0\0\0\0\0\x9c\0\xcd\0\x9e\0\x9f\0\xa0\0\xa1\0\xa2\0\xa3\0\xa4\0\xa5\0\xa6\0\xa7\0\xa8\0\xa9\0\xaa\0\0\0\xb3\0\xab\0\xac\0\xad\0\xae\0\xaf\0\xb0\0\xb1\0\xb2\0\0\0\0\0\0\0\0\0\0\0\0\0\x98\0\x99\0\xcb\0\0\0\xcc\0\x90\x01\xce\0\x9c\0\xcd\0\x9e\0\x9f\0\xa0\0\xa1\0\xa2\0\xa3\0\xa4\0\xa5\0\xa6\0\xa7\0\xa8\0\xa9\0\xaa\0\0\0\xb3\0\xab\0\xac\0\xad\0\xae\0\xaf\0\xb0\0\xb1\0\xb2\0\0\0\0\0\0\0\0\0\0\0\0\0\x98\0\x99\0\xcb\0\0\0\xcc\0\0\0\0\0\x9c\0\xcd\0\x9e\0\x9f\0\xa0\0\xa1\0\xa2\0\xa3\0\xa4\0\xa5\0\xa6\0\xa7\0\xa8\0\xa9\0\xaa\0\0\0\xb3\0\xab\0\xac\0\xad\0\xae\0\xaf\0\xb0\0\xb1\0\xb2\0\0\0\0\0\0\0\0\0\0\0\xe1\0\x98\0\x99\0\xcb\0\0\0\xcc\0\xa2\x01\0\0\x9c\0\xcd\0\x9e\0\x9f\0\xa0\0\xa1\0\xa2\0\xa3\0\xa4\0\xa5\0\xa6\0\xa7\0\xa8\0\xa9\0\xaa\0\0\0\xb3\0\xab\0\xac\0\xad\0\xae\0\xaf\0\xb0\0\xb1\0\xb2\0\0\0\0\0\0\0\0\0\0\0\0\0\x98\0\x99\0\xcb\0\0\0\xcc\0\0\0\0\0\x9c\0\xcd\0\x9e\0\x9f\0\xa0\0\xa1\0\xa2\0\xa3\0\xa4\0\xa5\0\xa6\0\xa7\0\xa8\0\xa9\0\xaa\0\0\0\xb3\0\xab\0\xac\0\xad\0\xae\0\xaf\0\xb0\0\xb1\0\xb2\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\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xb3\0',

-  /* check */"Y\0\0\0\\\0\xb5\0^\0\xbf\0\xb4\0\x8f\0\xbc\0\xbd\0\xd7\0\x89\0Z\0[\0\xbc\0]\0\xce\0\xca\0\xc4\0^\0X\0\b\x01\xc5\0\xc6\0\\\0\x97\0^\0\x9b\0\xce\0\x9d\0\xd6\0\xd7\0\t\x01\xd1\0\xd2\0\xdf\0\xe0\0\xe1\0i\x01j\x01k\x01+\x01\x01\x01\n\0b\x01c\x012\x011\x01\x8a\x003\x01\t\x015\x01\x8e\0\x04\x01F\0\t\x01<\x01=\x01\xea\0\n\x01\xe6\0\xe7\0N\0\x8a\0\0\0\x9a\0\x9b\0\x8e\0\x9d\x008\x019\x01&\0<\x01=\x01\b\x01\xcb\0\xcc\0\xcd\0\xfc\0\x85\x01\xd8\0\x87\0\x88\0\x04\x012\x01\x11\x01\b\x01\x8d\0\t\x01\n\x01\x9e\0\x9f\0\xa0\0\xa1\0\xa2\0\x04\x01\xa4\0\xa5\0\xa6\0\xa7\0\xa8\0\n\x01\x10\x01\xaa\x01\x12\x01\x01\x01\x87\0\x88\0\0\0)\x01\x05\x01\x07\x01\x8d\0\t\x01\xcb\0\xcc\0\xcd\0\xcf\0\x01\x01\x03\0\xf6\0\t\x01\xf8\0\x04\x01\x07\x01\xfb\0\n\x011\x01<\x01=\x01\x0e\x01\x04\x01\x01\x01\x11\x01\xdf\0\t\x01\xe1\0\n\x01\x07\x01\x17\0\x18\0\x19\0\x1a\0+\x01\x01\x01\x1d\0\x1a\x012\x01\x05\x011\x01\x04\x013\x01\t\x015\x01\xde\0:\x01;\x01<\x01=\x01>\x01?\x01@\x01A\x01B\x01C\x01D\x01E\x01F\x01G\x01\x13\0\t\x01\x15\0\x16\0\x04\x01{\x01\x04\x01\x04\x01\x04\x01`\x01\n\x01\t\x01\x1f\0 \0\n\x01\x01\x01\n\x01\x14\x01\n\x01\x05\x01'\0x\x01\x04\x01\n\x01z\x01r\x01{\x01x\x01\n\x01\x04\x01.\x01/\x01Q\x01y\x01\x05\x01\n\x01\x04\x016\x01\t\x018\x019\x01\x8c\x01\x81\x01\x8e\x01\x01\0\x02\0\x03\0\x8a\x01\x1b\0\x1c\0\x1d\0\x1e\0\x04\x01\x90\x01#\x01$\x01%\x01&\x01<\x01\x9e\x019\0:\0;\0<\0=\0>\0?\0@\0A\0B\0\x06\x01\xa2\x01K\x01\t\x01\x06\x01\x0e\x01s\x01\t\x01\x11\x01\x06\x01\x06\x01\x04\x01\t\x01\t\x01\x04\x01\x07\x01\x04\x01\xb2\x01\n\x01\x04\x01\xb5\x01\x82\x018\x019\x01U\x01V\x01W\x01X\x01\n\x01\x01\x01\x02\x01\x03\x01h\x01i\x01j\x01k\x01\x91\x01-\x01.\x01/\x01\x05\x01\x06\x01\x04\x01t\x01\n\x01\x06\x01\t\x01\n\x01\t\x01\x04\x01\x0b\x01\f\x01\r\x01\x0e\x01\x0f\x01\t\x01\x11\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\n\x01\x92\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01\n\x01+\x01,\x01-\x01\t\x01\n\x01\n\x011\x01\n\x013\x014\x015\x016\x01\n\x018\x019\x01\xaa\x01#\x01\x06\x01\n\x01\n\x01\t\x01\x05\x01\x0b\x01\f\x01\r\x01\x0e\x01\x0f\x01\n\x01H\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\n\x01\n\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01\n\x01\x06\x01\x04\x01\x04\x01\t\x01\n\x01\x0b\x01\f\x01\r\x01+\x01\x0f\x01\n\x01\n\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\n\x01H\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01\t\x01\x04\x01\t\x01\t\x01\t\x01\t\x01\n\x01\x0b\x01\f\x01\r\x01\x0e\x01\x0f\x01\t\x01\x11\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01H\x01\"\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01\n\x01!\x01\n\x01\t\x01\t\x01\n\x01\x0b\x01\f\x01\r\x01\x0e\x01\x0f\x01\t\x01\x11\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\n\x01H\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01\x01\x01\t\x01\x06\x01\n\x01\t\x01\n\x01\x0b\x01\f\x01\r\x01\x0e\x01\x0f\x01\n\x01\x11\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\t\x01H\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01\t\x01\x04\x01\n\x01\x04\x01\t\x01\n\x01\x0b\x01\f\x01\r\x01\x0e\x01\x0f\x01\"\x01\x11\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\n\x01H\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01\n\x01\n\x01\n\x01\n\x01\t\x01\n\x01\x0b\x01\f\x01\r\x01\x0e\x01\x0f\x01\x06\x01\x11\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\n\x01H\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01\b\x01\n\x01\x01\x01\t\x01\t\x01\x07\x01\x0b\x01\f\x01\r\x01\x0e\x01\x0f\x01\x06\x01\x11\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\n\x01H\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01\n\x01\n\x01\n\x016\x01\t\x01\n\x01\x0b\x01\f\x01\r\x01\n\x01\x0f\x01\n\x01\n\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\n\x01H\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01\n\x01\n\x01\n\x01\x06\x01\t\x01\x04\x01\x0b\x01\f\x01\r\x01\x0e\x01\x0f\x014\x01\n\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\x0e\x01H\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01\x0e\x01\n\x01\n\x01\n\x01\t\x01\n\x01\x0b\x01\f\x01\r\x01\t\x01\x0f\x01\n\x01\n\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\n\x01H\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01\n\x01\n\x01\n\x01\n\x01\t\x01\x06\x01\x0b\x01\f\x01\r\x01\x0e\x01\x0f\x01\n\x01\n\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\t\x01H\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01\n\x01\n\x01\n\x01\n\x01\t\x01\t\x01\x0b\x01\f\x01\r\x01\n\x01\x0f\x01\n\x01\n\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\n\x01H\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01\n\x01\x0e\x01\n\x01\n\x01\t\x01\x11\x01\x0b\x01\f\x01\r\x01\n\x01\x0f\x01\t\x01\0\0\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\x11\x01H\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01\n\x01\n\x01\n\x01\n\x01\t\x01\x01\x01\x0b\x01\f\x01\r\x01\n\x01\x0f\x01\n\x01\n\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\n\x01H\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01\n\x01\n\x01\x01\x01\n\x01\t\x01\t\x01\x0b\x01\f\x01\r\x01\x01\x01\x0f\x01\x0e\x01\n\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\n\x01H\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01\x0e\x01\x86\0\xab\0\xaa\0\t\x01\xf4\0\x0b\x01\f\x01\r\x01\x14\x01\x0f\x01\x02\0\x8d\0\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\xff\xffH\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0b\x01\f\x01\r\x01\xff\xff\x0f\x01\xff\xff\xff\xff\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\xff\xffH\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01\xff\xff\xff\xff-\x01.\x01/\x010\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff8\x019\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0b\x01\f\x01\r\x01\xff\xff\x0f\x01\xff\xffH\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\xff\xff\xff\xff#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01\xff\xff\xff\xff-\x01.\x01/\x010\x01\x0b\x01\f\x01\r\x01\xff\xff\x0f\x01\xff\xff\xff\xff\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\xff\xffH\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01\xff\xff\xff\xff\xff\xff.\x01/\x010\x01\x0b\x01\f\x01\r\x01\xff\xff\x0f\x01\xff\xff\xff\xff\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\xff\xffH\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0b\x01\f\x01\r\x01\xff\xff\x0f\x01\x10\x017\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\xff\xffH\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0b\x01\f\x01\r\x01\xff\xff\x0f\x01\xff\xff\xff\xff\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\xff\xffH\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff0\x01\x0b\x01\f\x01\r\x01\xff\xff\x0f\x01\x10\x01\xff\xff\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\xff\xffH\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0b\x01\f\x01\r\x01\xff\xff\x0f\x01\xff\xff\xff\xff\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\xff\xffH\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffH\x01",

+  /* lhs */"\xff\xff\x04\0\x05\0\x05\0\x06\0\x06\0\x07\0\b\0\b\0\t\0\n\0\n\0\n\0\n\0\f\0\x0e\0\r\0\r\0\x0f\0\x11\0\x11\0\x11\0\x10\0\x10\0\x12\0\x12\0\x13\0\x13\0\x0b\0\x14\0\x14\0\x15\0\x15\0\x16\0\x16\0\x17\0\x17\0\x18\0\x18\0\x18\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x19\0\x1a\0\x1a\0\x1a\0\x1a\0\x1e\0\x1c\0\x1c\0\x1b\0\x1f\0\x1f\0\x1f\0\x1f\0!\0!\0\"\0\"\0\"\0\x1d\0\x1d\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/\x000\x000\x000\x000\x001\x001\x002\x003\x003\x003\x003\x004\x005\x005\x005\x006\x006\x006\x006\x006\x007\0'\x008\x008\x008\x008\x009\0)\0:\0:\0;\0<\0<\0=\0=\0=\0=\0=\0=\0=\0=\0=\0=\0>\0>\0?\0@\0A\0B\0B\0C\0C\0C\0D\0D\0F\0F\0F\0F\0F\0F\0F\0F\0F\0G\0G\0G\0G\0G\0I\0I\0H\0H\0H\0H\0J\0E\0E\0\x01\0\x01\0\x02\0\x03\0\x03\0\0\0\0\0\0\0",

+  /* len */"\x02\0\x01\0\0\0\x02\0\0\0\x02\0\x01\0\x01\0\x04\0\x04\0\0\0\x05\0\x05\0\x06\0\x02\0\x01\0\x01\0\x02\0\x04\0\x01\0\x01\0\x01\0\x01\0\x01\0\0\0\x02\0\0\0\x01\0\x01\0\0\0\x01\0\0\0\x01\0\0\0\x01\0\0\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x02\0\x02\0\x03\0\x01\0\x02\0\x02\0\x01\0\x01\0\x02\0\x02\0\x02\0\x02\0\x02\0\x03\0\x03\0\x01\0\x01\0\x02\0\x01\0\x01\0\x01\0\x01\0\x01\0\x05\0\x05\0\x05\0\b\0\x04\0\x02\0\x01\0\x03\0\x02\0\x03\0\x03\0\x03\0\x02\0\x01\0\x02\0\b\0\x04\0\0\0\x02\0\0\0\x02\0\x01\0\x05\0\x02\0\x01\0\x03\0\x02\0\x02\0\x01\0\x05\0\x06\0\0\0\x05\0\x01\0\x05\0\x06\0\x01\0\x05\0\x01\0\x05\0\x06\0\x04\0\x01\0\x06\0\x05\0\x05\0\x01\0\x02\0\x02\0\x05\0\x06\0\x05\0\x05\0\x01\0\x02\0\x02\0\x04\0\x05\0\x02\0\x02\0\x02\0\x05\0\x05\0\x05\0\x05\0\x05\0\x06\0\x05\0\x04\0\x04\0\x04\0\x04\0\x05\0\x04\0\x04\0\x05\0\x04\0\0\0\x01\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\x02\0\0\0\x01\0\x05\0\x01\0\x01\0\0\0\x01\0\x01\0\x06\0\x06\0\x06\0\x05\0\x05\0\x05\0\x05\0\x05\0\x05\0\x04\0\x04\0\x05\0\x05\0\x01\0\x01\0\x01\0\x05\0\x01\0\0\0\x02\0\x05\0\x05\0\x05\0\x04\0\x04\0\0\0\x02\0\x02\0\x02\0\x01\0\x02\0\x02\0\x02\0\x02\0\x02\0",

+  /* defred */"\0\0\0\0\0\0\0\0\0\0\0\0\xc2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x9e\0\xa1\0\0\0\xb1\0\xaf\0\xb0\0\0\0\xb3\0\0\0\0\0\xc3\0\xbf\0\0\0\xc4\0\x9d\0\x8f\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\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x94\0\x95\0\x92\0\x96\0\x93\0\x91\0\x98\0\x99\0\x90\0\x97\0\xbe\0\xb5\0\xbd\0\0\0\xc0\0\xc1\0\x1c\0\x1b\0\0\0\x16\0\x17\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0k\0\0\0\0\0\0\0\x02\0\x01\0\0\0\0\0\x9b\0\0\0\xa0\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\0\0\0\0\0)\x000\0\0\0\0\x001\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(\x009\0:\0\0\0\0\0%\0&\0'\0g\0\0\0Y\0\0\0\0\0b\0e\0\x8d\0\0\0\x8b\0\0\0\x07\0\0\0\0\0\0\0\0\0\0\0\0\0\x06\0\0\0\0\0o\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\x0f\0v\0\0\0\0\0\0\0\x02\0\0\0\0\0\0\0\0\0\x02\0\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xab\0\xac\0\0\0\0\0\0\0\0\0\0\0\xb9\0\0\0\0\0\0\0\0\0\0\0\0\0\x1e\0\0\0\0\0\0\0*\0+\0\0\0.\0/\x002\x003\x004\x005\x006\0\"\0\0\0\0\0\x13\0\x14\0\x15\0;\0\0\0X\0\0\0S\0W\0\0\0\0\0[\0]\0\\\0\0\0\0\0\x8c\0\0\0V\0{\0\0\0|\0}\0z\0\x11\0\0\0\x0e\0p\0q\0n\0\0\0\0\0\0\0\0\0\0\0I\0H\0\0\0\x19\0m\0\x02\0w\0x\0u\0\0\0\x03\0t\0\0\0\0\0\0\0\0\0\0\0\0\0\x89\0\0\0\0\0\x9c\0\xb6\0\xb2\0\0\0\xa5\0\xa6\0\xa7\0\xa8\0\0\0\xaa\0\xbc\0\xa9\0\xad\0\xae\0\xb7\0\xb8\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0G\0\0\0\0\0\0\0,\0$\x007\x008\0\0\0\0\0\0\0Z\0\0\0\0\0\t\0\0\0\0\0J\0\0\0\0\0\0\0L\0N\0K\0j\0U\0l\0\0\0s\0\0\0\0\0\0\0\0\0\x83\0\0\0\0\0\0\0\0\0\xa2\0\xa3\0\xa4\0\0\0\x12\0\x05\0\0\0\0\0\0\0\0\0\0\0\0\0\x8a\0\0\0\0\0F\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\b\0\0\0\0\0\0\0O\0M\0y\0\0\0\0\0\0\0\0\0\x85\0\x88\0\x86\0\x87\0\xba\0c\0\0\0\0\0f\0\0\0h\0\0\0\x84\0\0\0 \0A\0C\0\0\0B\0\0\0\0\0\0\0\0\0\0\0\0\0r\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0d\0i\0E\0\0\0^\0\0\0\0\0a\0\f\0\0\0\x0b\0\0\0\x7f\0~\0\x82\0\x80\0\x81\0\0\0_\0\r\0\0\0D\0\0\0\0\0P\0",

+  /* dgoto */"\x04\0\x06\0\x1b\0\x1e\0`\0\xc4\0>\x01\xae\0\xa7\0T\0\x03\x01N\0\xaf\0\xb0\0\xbf\0\x95\0\xbb\0\xf7\0\xbc\0O\0\xe4\0\xa0\x01\xf2\0M\x01\x96\0\x97\0\x98\0\x99\0F\x01\x9a\0H\x01\xb9\0\x17\x01\\\x01]\x01\x07\x01\x07\0\x9b\0\x9c\0\x9d\0\xff\0\x9e\0\0\x01\x9f\0\xa0\0[\0\b\0\t\0\xb3\0\n\0\x0b\0\xc2\0\f\0\xaa\0$\x01\r\0\xc7\0\x0e\0\x0f\0\x10\0\xca\0 \0c\0\x12\0\"\0\x13\0e\0\x14\0\x15\0\xd3\0\x16\0\x17\0\x18\0\x19\0\xd4\0",

+  /* sindex */"%\x01\x1c\xff#\xff%\xff\0\0\x9b\x03\0\0@\xff@\xff@\xff@\xff@\xff@\xff@\xff@\xff@\xff@\xff\0\0\0\0Q\0\0\0\0\0\0\0#\xff\0\0[\0\x91\xff\0\0\0\0y\xff\0\0\0\0\0\0x\0\x87\0\x87\xff\x9f\xff\xaf\xff\x87\xff\x87\xff9\xff\x87\xff9\xff\xa5\xff\xa5\xff\x93\xff\xb0\xff\xa5\xff\x93\xff\x93\xff\xb6\xff\xb6\xff\xb6\xff\xc3\xff\xc3\xff\xc3\xff\xcb\xff\xc3\xff\xb0\xff\xb0\xff\xb1\xff\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\x93\xff\0\0\0\0\0\0\0\0\xa9\x02\0\0\0\0\xde\xff\xd0\xff\xf6\xff\xe6\xff7\xff\x94\xff\x8d\0\xeb\xff\0\0\x9f\xff/\xff\xeb\xff\0\0\0\0\xa5\xff \0\0\0\x14\xff\0\0#\xff\x93\xff\xa5\xff\xa5\xff\xcf\xff\x18\x007\0<\0\xc5\xff&\x008\0H\0\xb2\xffO\0S\0Z\0\\\0H\xff@\xffP\0\0\0\0\0\x87\xff\x87\xff\0\0\x87\xff\x9f\xff\x9f\xff\x9f\xff\x9f\xff\x9f\xff\0\0\x9f\xff\x9f\xff\x9f\xff\x9f\xff\x9f\xff3\x003\0*\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xcc\x02\xef\x02\0\0\0\0\0\0\0\0K\0\0\0X\0\xa9\x02\0\0\0\0\0\0h\0\0\0r\0\0\0,\xff\xef\x02\xea\xff7\xffs\0q\0\0\0\xa8\xffy\0\0\0|\0\x83\0\x94\xff{\0\x87\xff\x87\xff\x87\xff\xef\x02}\0\x80\0\x9f\xff\x9f\xff\x81\0\xe5\xff\0\0\0\0\x83\0/\xff\x82\0\0\0\x84\xff~\x006\xff\x84\0\0\0\0\0\x85\0\x86\0\x88\0&\0\x89\0\x8a\0\x8b\0\x8c\0j\0\x91\0&\0\0\0\0\0\x93\0\xa4\0\xa5\0\xaf\0\xb0\0\0\0\x9f\xff+\0\xb5\0+\0\xa5\xff\xa5\xff\0\0\x12\x03\x12\x03\x12\x03\0\0\0\0\x9f\xff\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0o\0o\0\0\0\0\0\0\0\0\0\xb3\0\0\0\x9a\x03\0\0\0\0\x05\0\x8e\0\0\0\0\0\0\0\x0f\0\xb2\0\0\0\xb7\0\0\0\0\0\xbb\0\0\0\0\0\0\0\0\0\xa0\0\0\0\0\0\0\0\0\0\x12\x03\xb8\0\x12\x03\xcb\0}\0\0\0\0\0\xd5\0\0\0\0\0\0\0\0\0\0\0\0\0\x95\xff\0\0\0\0X\xff\xd6\0\x9f\xff\x9f\xff\x9f\xff\x9f\xff\0\0\xf9\xff\xfd\xff\0\0\0\0\0\0\xd7\0\0\0\0\0\0\0\0\0*\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xde\0\xb5\0\xe0\0\xe5\0\xf1\0\xf2\0\0\x01\xa5\xff\xfd\0F\x01\xfa\0\0\0\xef\x02\xfa\xff\xfb\0\0\0\0\0\0\0\0\0+\0\xb5\0\x19\0\0\0+\0\xb5\0\0\0\x05\x01\x9f\xff\0\0$\x01\b\x01\xb8\0\0\0\0\0\0\0\0\0\0\0\0\0\x02\0\0\0\x87\xff\x87\xff\x87\xff\x87\xff\0\0\x18\x01\x19\x01#\x01+\x01\0\0\0\0\0\0;\x01\0\0\0\0\xcc\x02<\x015\x03X\x03L\x01M\x01\0\0\f\x01\x87\xff\0\0\x87\xff\x87\xff\x87\xff]\x01(\x01^\x01h\x01J\x01i\x01\0\0j\x01\xef\x02y\x03\0\0\0\0\0\0l\x01\xea\xff\x83\0\x83\0\0\0\0\0\0\0\0\0\0\0\0\0\xcc\x02\xda\0\0\0\x01\x01\0\0X\x03\0\0t\x01\0\0\0\0\0\0\xef\x02\0\0\x8e\0\x85\x01\x98\x01h\0\xa8\x01h\0\0\0\xa9\x01\n\0\xba\x01\xcb\x01\xcc\x01\xdd\x01\xee\x01\0\0\0\0\0\0\xeb\x01\0\0\x8e\0\xd4\x01\0\0\0\0h\0\0\0\x01\x02\0\0\0\0\0\0\0\0\0\0\x87\xff\0\0\0\0\n\x02\0\0\xef\x02\x12\x02\0\0",

+  /* rindex */"\0\0+\x03\0\0-\x03\0\0\0\0\0\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\x03\0\0\0\0\0\0\0\0\0\0\0\0\0\x04\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x1d\x02\0\0\0\0\x1a\0\xa1\xff\0\x000\xff\0\0\0\0\0\0\x12\xffA\0\0\0*\x02*\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0:\x02\x06\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\0C\0\0\0\0\0\0\0\0\x005\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0F\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\0G\x02\0\0W\x02X\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\0g\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0G\x02\0\0\0\0\0\0@\x02\xfa\x01\0\0@\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0n\x01n\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x005\x02N\xff\0\0\0\0\0\0\0\0\0\0\0\0i\x025\x02\0\0\0\0\0\0j\x02\0\0\0\0\0\0\0\x005\x02\0\0\0\0\0\0\x1b\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0c\x02%\xffc\x025\x02z\x02\0\0F\x02\x91\x01\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\0g\x02\0\0\0\0\0\0\0\0\0\0\0\0g\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0{\x02{\x02{\x02\0\0\0\0\0\0<\x02\x13\0<\x02\0\0\0\0\x91\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xb4\x01\xb4\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0i\x02\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\0\x005\x02\0\x005\x02\0\0z\x02\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\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\0\0\0\0{\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0N\xff\0\0\0\0\0\0\0\0\0\0\0\0{\x02{\x02\0\0\0\0{\x02{\x02\0\0\0\0F\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0E\0\x1a\0\x8f\x02\x8f\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x005\x02\0\x005\x025\x02\0\0\0\0\0\0\0\0\xd7\x01\0\0\xd7\x01\x86\x02\xd7\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x005\x02\0\0\0\0\0\0\0\0j\x02\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x005\x02\0\0\0\0\0\0\0\x005\x02\0\0\0\0\0\0\0\0\0\0<\x02\0\0i\x02\0\0i\x02j\x02\0\0j\x02\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\0i\x02\0\0\0\0\0\0j\x02\0\0\x8c\x02\0\0\0\0\0\0\0\0\0\0\xd7\x01\0\0\0\0\0\0\0\x005\x02\0\0\0\0",

+  /* gindex */"\0\0\0\0\0\0\0\0\xdc\xffj\xffC\xff\xe7\x02h\xffR\x03\xf5\xfe\xdb\xff^\xff\xa6\xffR\xffq\xff\xed\xfft\x02_\xff\xe0\xff\xc9\xff\xb8\xfe(\x03\xc4\x02\0\0\xa9\xff\0\0\xe2\xffe\xffo\xff\x05\xff\0\0\xa3\x02_\x02p\x02\x14\x03\0\x008\x03x\xff\xc8\xff\x16\xff\xd3\xff4\x02h\x02\xaa\xfe\x01\0\0\0\0\0*\x03\0\0\0\0,\x03\0\0E\x03\0\0\0\0\0\0\0\0\0\0\0\0\xb9\0\xf8\x03\xf7\xff\xfa\x03\0\0\0\0\x16\x01\xc7\0\xe1\0\x96\xff\0\0\xfd\x03\0\0\xfc\xff\0\0",

+  /* tablesize */1254,

+  /* table */"U\0\xb8\0\xbe\0\x8e\0\xb4\0\xfb\0V\0W\0a\0\\\0Z\0f\0Z\0\xf9\0\xfe\0\x0f\x01\t\x01R\0\x1d\x01H\0R\x01Y\0\x06\x01]\0[\x01\x19\x01\x1a\x01\x9a\0\x9a\0<\0\xa8\0\xb1\0\x9b\x01\xb8\0@\x01A\x01\xc0\0\x05\0\x06\x01g\0h\0\xa9\0\xb2\0^\0\x1a\0 \x01\x1d\0\xc1\0\xab\0\x1a\0*\x01+\x01\x05\x01\xa1\x01\xa2\x01\xa3\x01\xbd\0\x1a\0P\0Z\0\xc5\0\xa5\0Q\0Z\0\xa6\0w\0X\0\xcd\0\xce\0\xe5\0\xb3\x01\xe6\0K\x01<\0I\x01J\x01\xdb\0\x9a\0\x9a\0\xc8\0\xc9\0G\0\xdc\0G\x01G\x01G\x01\xe3\0\xe3\0R\0\xe3\0\xba\0I\0R\0\xcc\0\xc3\0R\0[\x01\xcb\0%\x01/\x01\xe1\0\xe2\0\xbe\0\xbe\0&\x01'\x016\x01(\x01\xe7\0\xe8\0\xe9\0\xea\0\xeb\0\xa8\0\xec\0\xed\0\xee\0\xef\0\xf0\0X\x01K\0^\x01\xb1\0\xc7\x01\xa9\0\x12\x01\x13\x01\x14\x01r\x01G\x01\xad\x01G\x01d\x01\xb2\0b\x01L\0!\x01\xc0\0e\x01f\x01M\0g\x01\"\x01\xe3\0\xe3\0\xe3\0\x80\x01\x82\x01\xc1\0\xab\0\x83\x01\x85\x01b\0!\x01\x16\x01\xac\0\xba\x01\xad\0\xbc\x01c\x01P\0\xb8\0\x1a\0\xb8\0Q\0#\0$\0%\0\x1a\0_\0\x1a\0&\0'\0(\0)\0*\0\xc5\x01+\0,\0J\0M\0d\0\x87\x01|\x01S\0?\x01\xb6\x01B\x01\x1f\0C\x01D\x01i\0=\0>\0?\0@\0A\0B\0C\0D\0E\0F\0<\x01-\0m\0\xc4\x01.\0/\x000\x001\x002\x003\0q\x004\x005\x006\x007\x008\x009\0:\0;\0#\0$\0%\0\xe1\0\xe2\0\xb1\x01&\0'\0(\0)\0*\0\xa1\0+\0,\0\x96\x01-\0\xb0\x01\xb8\0S\0\xa5\x000\x001\0\b\x01X\0Z\x01\xaf\x01\xab\x01\x16\x01j\0k\0l\0\xa2\0!\x01\xae\x01r\0\xa3\0!\x01\xb8\0m\x010\x001\0!\x01n\x01}\x01-\0\x9f\0~\x01\x8c\x01\x8e\0\xb4\0\xb2\x01\x9f\0\xb5\x01i\x01j\x01k\x01l\x01n\0o\0p\0s\0t\0\x1c\x01\xcf\0\xe1\0\xe2\0x\x01\x1a\0R\0\x10\0\x1a\0R\0\x10\0\x01\0\x02\0\x03\0\xc6\0\x81\x01\xf4\0\xf5\0\xf6\0\x84\x01\xd2\0M\0=\x01\xb8\0\xdd\0O\x01P\x01\xbe\0\xc9\x01\xdd\0S\x01T\x01\xd0\0Z\x01Z\x01S\x01T\x01\xd1\0\xb8\0\xd5\0\xb8\0\x8d\x01\x8e\x01\x8f\x01\x90\x01O\x01P\x01\x9f\0\x9f\0\x9a\0\x9a\0\x1a\0\x1a\0u\0v\0\xd6\0\xd7\0\xf1\0\xfc\0\x9f\x01\xd8\0\x9f\x01\x9f\x01\x9f\x01y\0z\0\xb4\0\xd9\0\xb5\0\xda\0\xfd\0}\0\xb6\0\x7f\0\x80\0\x81\0\x82\0\x83\0\x84\0\x85\0\x86\0\x87\0\x88\0\x89\0\x8a\0\x8b\0\x02\x01\f\x01\x8c\0\x8d\0\x8e\0\x8f\0\x90\0\x91\0\x92\0\x93\0\x94\0\x04\x01\x0b\x01\xdd\0\xde\0\xdf\0\xe0\0\r\x01\xac\0\xab\0\x11\x01\xfa\0#\x01\xe1\0\xe2\0\x18\x01\x1b\x01\x1f\x014\x01)\x01,\x01-\x01L\x01.\x010\x011\x012\x013\x01Q\x01y\0z\0\xb4\x005\x01\xb5\x007\x01\x9f\x01}\0\xb6\0\x7f\0\x80\0\x81\0\x82\0\x83\0\x84\0\x85\0\x86\0\x87\0\x88\0\x89\0\x8a\0\x8b\x008\x019\x01\x8c\0\x8d\0\x8e\0\x8f\0\x90\0\x91\0\x92\0\x93\0\x94\0:\x01;\x01=\x01U\x01V\x01y\0z\0\xb4\0Y\x01\xb5\0\x05\x01\xb7\0}\0\xb6\0\x7f\0\x80\0\x81\0\x82\0\x83\0\x84\0\x85\0\x86\0\x87\0\x88\0\x89\0\x8a\0\x8b\0W\x01_\x01\x8c\0\x8d\0\x8e\0\x8f\0\x90\0\x91\0\x92\0\x93\0\x94\0a\x01h\x01o\x01\xde\0\xdf\0\xe0\0y\0z\0\xb4\0q\x01\xb5\0s\x01t\x01}\0\xb6\0\x7f\0\x80\0\x81\0\x82\0\x83\0\x84\0\x85\0\x86\0\x87\0\x88\0\x89\0\x8a\0\x8b\0u\x01v\x01\x8c\0\x8d\0\x8e\0\x8f\0\x90\0\x91\0\x92\0\x93\0\x94\0w\x01y\x01{\x01\x7f\x01\xdf\0\xe0\0y\0z\0\xb4\0\x86\x01\xb5\0\x89\x01\x9e\x01}\0\xb6\0\x7f\0\x80\0\x81\0\x82\0\x83\0\x84\0\x85\0\x86\0\x87\0\x88\0\x89\0\x8a\0\x8b\0\x91\x01\x92\x01\x8c\0\x8d\0\x8e\0\x8f\0\x90\0\x91\0\x92\0\x93\0\x94\0\x93\x01\xa5\x01y\0z\0\xb4\0\xe0\0\xb5\0\x88\x01\x94\x01}\0\xb6\0\x7f\0\x80\0\x81\0\x82\0\x83\0\x84\0\x85\0\x86\0\x87\0\x88\0\x89\0\x8a\0\x8b\0\x95\x01\x97\x01\x8c\0\x8d\0\x8e\0\x8f\0\x90\0\x91\0\x92\0\x93\0\x94\0\xa8\x01y\0z\0\xb4\0z\x01\xb5\0\x9c\x01\x9d\x01}\0\xb6\0\x7f\0\x80\0\x81\0\x82\0\x83\0\x84\0\x85\0\x86\0\x87\0\x88\0\x89\0\x8a\0\x8b\0\xa4\x01\xa6\x01\x8c\0\x8d\0\x8e\0\x8f\0\x90\0\x91\0\x92\0\x93\0\x94\0\xa7\x01\xa9\x01\xaa\x01\xac\x01z\x01!\0!\0!\0!\0!\0!\0!\0\xb4\x01!\0!\0!\0!\0!\0!\0!\0!\0!\0!\0!\0!\0!\0!\0!\0!\0\xb7\x01!\0!\0!\0!\0!\0!\0!\0!\0!\0!\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\xb8\x01\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\xbb\x01\xbd\x01\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0\x18\0#\0#\0#\0#\0#\0#\0#\0\xbe\x01#\0#\0#\0#\0#\0#\0#\0#\0#\0#\0#\0#\0#\0#\0#\0#\0\xbf\x01\xc0\x01#\0#\0#\0#\0#\0#\0#\0#\0#\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\xc1\x01\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\xc2\x01\xc3\x01\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1d\0P\x01\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\xc6\x01\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\xc8\x01\xca\x01\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\xb4\0\x1a\0\x8e\0\x9a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x9f\0R\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1a\0\x1d\0R\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x18\0\x8e\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\xb4\0\x9a\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\xbb\0\x1d\0`\0\n\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0T\0\x04\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1d\0\x1f\0\x1a\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0Q\0\x0e\x01\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\xa4\0p\x01\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0\x1f\0x\0\xf3\0y\0z\0{\0N\x01|\0`\x01\x8b\x01}\0~\0\x7f\0\x80\0\x81\0\x82\0\x83\0\x84\0\x85\0\x86\0\x87\0\x88\0\x89\0\x8a\0\x8b\0\x8a\x01\x15\x01\x8c\0\x8d\0\x8e\0\x8f\0\x90\0\x91\0\x92\0\x93\0\x94\0\xf8\0\x01\x01y\0z\0{\0\xb9\x01|\0\x10\x01\x99\x01}\0~\0\x7f\0\x80\0\x81\0\x82\0\x83\0\x84\0\x85\0\x86\0\x87\0\x88\0\x89\0\x8a\0\x8b\0\x1e\x01\n\x01\x8c\0\x8d\0\x8e\0\x8f\0\x90\0\x91\0\x92\0\x93\0\x94\0\xfa\0\x11\0y\0z\0{\0!\0|\0\x1c\0\0\0}\0~\0\x7f\0\x80\0\x81\0\x82\0\x83\0\x84\0\x85\0\x86\0\x87\0\x88\0\x89\0\x8a\0\x8b\0\0\0\0\0\x8c\0\x8d\0\x8e\0\x8f\0\x90\0\x91\0\x92\0\x93\0\x94\0E\x01\0\0y\0z\0{\0\0\0|\0\0\0\0\0}\0~\0\x7f\0\x80\0\x81\0\x82\0\x83\0\x84\0\x85\0\x86\0\x87\0\x88\0\x89\0\x8a\0\x8b\0\0\0\0\0\x8c\0\x8d\0\x8e\0\x8f\0\x90\0\x91\0\x92\0\x93\0\x94\0\x98\x01\0\0y\0z\0{\0\0\0|\0\0\0\0\0}\0~\0\x7f\0\x80\0\x81\0\x82\0\x83\0\x84\0\x85\0\x86\0\x87\0\x88\0\x89\0\x8a\0\x8b\0\0\0\0\0\x8c\0\x8d\0\x8e\0\x8f\0\x90\0\x91\0\x92\0\x93\0\x94\0\x9a\x01\0\0y\0z\0{\0\0\0|\0\0\0\0\0}\0~\0\x7f\0\x80\0\x81\0\x82\0\x83\0\x84\0\x85\0\x86\0\x87\0\x88\0\x89\0\x8a\0\x8b\0\0\0\0\0\x8c\0\x8d\0\x8e\0\x8f\0\x90\0\x91\0\x92\0\x93\0\x94\0y\0z\0\xb4\0\0\0\xb5\0\x88\x01\0\0}\0\xb6\0\x7f\0\x80\0\x81\0\x82\0\x83\0\x84\0\x85\0\x86\0\x87\0\x88\0\x89\0\x8a\0\x8b\0\0\0\0\0\x8c\0\x8d\0\x8e\0\x8f\0\x90\0\x91\0\x92\0\x93\0\x94\0y\0z\0\xb4\0\0\0\xb5\0\0\0\0\0}\0\xb6\0\x7f\0\x80\0\x81\0\x82\0\x83\0\x84\0\x85\0\x86\0\x87\0\x88\0\x89\0\x8a\0\x8b\0\0\0\0\0\x8c\0\x8d\0\x8e\0\x8f\0\x90\0\x91\0\x92\0\x93\0\x94\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/\x000\x001\x002\x003\0\0\x004\x005\x006\x007\x008\x009\0:\0;\0",

+  /* check */"%\0X\0\\\0\0\0\0\0\x96\0&\0'\0,\0)\0(\0/\0*\0\x95\0\x9d\0\xb1\0\xa8\0$\0\xc0\0\x17\0\xfe\0(\0\xa7\0*\0\x13\x01\xba\0\xbb\0\t\x01\n\x01\t\x01V\0W\0v\x01x\0\xdf\0\xe0\0\\\0\t\x01\xb7\x000\x001\0V\0W\0*\0\t\x01\xc3\0\t\x01\\\0\x01\x01\x01\x01\xc8\0\xc9\0\b\x01}\x01~\x01\x7f\x01\t\x01\t\x01\x01\x01Y\0`\0\x06\x01\x05\x01]\0\t\x01J\0\t\x01g\0h\0|\0\x9c\x01~\0\xe9\0\t\x01\xe5\0\xe6\0\x04\x01;\x01<\x01;\x01<\x01\0\0\n\x01\xe4\0\xe5\0\xe6\0{\0|\0\n\x01~\0Y\0\0\0\x0e\x01f\0]\0\x11\x01[\x01e\0,\x01\xcd\x008\x019\x01\xc0\0\xc1\x002\x013\x01\xd4\x005\x01\x7f\0\x80\0\x81\0\x82\0\x83\0\xa9\0\x85\0\x86\0\x87\0\x88\0\x89\0\x12\x01\0\0\x14\x01\xb2\0\xc3\x01\xa9\0\xb4\0\xb5\0\xb6\0=\x01\x12\x01\x8d\x01\x14\x01,\x01\xb2\0\x1c\x01\0\0\x04\x01\xc1\x002\x013\x01\x05\x015\x01\n\x01\xb4\0\xb5\0\xb6\0O\x01P\x01\xc1\0\x01\x01S\x01T\x01\x05\x01\x04\x01\xb8\0\x07\x01\xa7\x01\t\x01\xa9\x01\n\x01\x01\x01\xf8\0\x01\x01\xfa\0\x05\x01,\x01-\x01.\x01\x07\x01\x04\x01\t\x012\x013\x014\x015\x016\x01\xbb\x018\x019\x01:\x01\x05\x01\x05\x01W\x01H\x01\t\x01\xde\0\xa4\x01\xe0\0\x03\0\xe1\0\xe2\0\t\x01\x07\0\b\0\t\0\n\0\x0b\0\f\0\r\0\x0e\0\x0f\0\x10\0\xdd\0:\x01\t\x01\xb7\x01=\x01>\x01?\x01@\x01A\x01B\x01\t\x01D\x01E\x01F\x01G\x01H\x01I\x01J\x01K\x01,\x01-\x01.\x018\x019\x01\x90\x012\x013\x014\x015\x016\x01\n\x018\x019\x01s\x01:\x01\x8f\x01E\x01\t\x01\x06\x01?\x01@\x01\t\x01\t\x01\x13\x01\x8e\x01\x88\x01\x16\x012\x003\x004\0,\x01\x04\x01\x8d\x018\0\n\x01\x04\x01Y\x01\n\x01?\x01@\x01\x04\x01\n\x01\x0e\x01:\x01\x04\x01\x11\x01\n\x01\n\x01\n\x01\x97\x01\n\x01\xa2\x01%\x01&\x01'\x01(\x015\x006\x007\x008\x009\x006\x01\x04\x018\x019\x01C\x01\x06\x01\x0e\x01\x07\x01\t\x01\x11\x01\n\x01\x01\0\x02\0\x03\0\t\x01O\x01\x01\x01\x02\x01\x03\x01S\x01\t\x01\x05\x01\x06\x01\x89\x01.\x01/\x010\x01\x90\x01\xc8\x01.\x01/\x010\x01\x04\x01Z\x01[\x01/\x010\x01\x04\x01\x98\x01\n\x01\x9a\x01d\x01e\x01f\x01g\x01/\x010\x01\t\x01\n\x01\t\x01\n\x01\t\x01\n\x01:\0;\0\n\x01\x04\x01!\x01\n\x01{\x01\x04\x01}\x01~\x01\x7f\x01\x0b\x01\f\x01\r\x01\x04\x01\x0f\x01\x04\x01\t\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\t\x01\x01\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01+\x01\n\x01\n\x01.\x01/\x010\x011\x01\t\x01\x07\x01\x01\x01\n\x01\t\x01\t\x018\x019\x01\n\x01\n\x01\n\x01#\x01\n\x01\n\x01\n\x01\"\x01\n\x01\n\x01\n\x01\n\x01\n\x01\t\x01\x0b\x01\f\x01\r\x01\n\x01\x0f\x01\n\x01\xc3\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\n\x01\n\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01+\x01\n\x01\n\x01\x06\x01\n\x01\x06\x01\x0b\x01\f\x01\r\x01\t\x01\x0f\x01\b\x017\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x014\x01\n\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01+\x01\n\x01\n\x01\n\x01/\x010\x011\x01\x0b\x01\f\x01\r\x01\n\x01\x0f\x01\n\x01\x06\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\n\x01\n\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01+\x01\x06\x01\n\x01\x0e\x01\x0e\x010\x011\x01\x0b\x01\f\x01\r\x01\n\x01\x0f\x01\t\x01\x06\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\n\x01\n\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01+\x01\n\x01\x06\x01\x0b\x01\f\x01\r\x011\x01\x0f\x01\x10\x01\n\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\n\x01\n\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01+\x01\x06\x01\x0b\x01\f\x01\r\x010\x01\x0f\x01\n\x01\n\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\n\x01\n\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01+\x01\n\x01\n\x01\n\x01\t\x010\x01\t\x01\n\x01\x0b\x01\f\x01\r\x01\x0e\x01\x0f\x01\n\x01\x11\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\n\x01\"\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01+\x01\t\x01\n\x01\x0b\x01\f\x01\r\x01\x0e\x01\x0f\x01\t\x01\x11\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\n\x01\n\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01+\x01\t\x01\n\x01\x0b\x01\f\x01\r\x01\x0e\x01\x0f\x01\n\x01\x11\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\n\x01\n\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01+\x01\t\x01\n\x01\x0b\x01\f\x01\r\x01\x0e\x01\x0f\x01\n\x01\x11\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\n\x01\x0e\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01+\x01\t\x010\x01\x0b\x01\f\x01\r\x01\x0e\x01\x0f\x01\t\x01\x11\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\x11\x01\n\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01+\x01\t\x01\n\x01\x0b\x01\f\x01\r\x01\0\0\x0f\x01\0\0\x04\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\x04\x01\n\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01+\x01\t\x01\x0e\x01\x0b\x01\f\x01\r\x01\x0e\x01\x0f\x01\n\x01\n\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\n\x01\n\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01+\x01\t\x01\n\x01\x0b\x01\f\x01\r\x01\n\x01\x0f\x01\n\x01\n\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\n\x01\n\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01+\x01\t\x01\x01\x01\x0b\x01\f\x01\r\x01\x0e\x01\x0f\x01\n\x01\xb0\0\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01U\x004\x01#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01+\x01\t\x01\x8b\0\x0b\x01\f\x01\r\x01\xf3\0\x0f\x01\x16\x01[\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01Z\x01\xb7\0#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01+\x01\t\x01\x9e\0\x0b\x01\f\x01\r\x01\xa6\x01\x0f\x01\xb2\0u\x01\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\xc1\0\xa9\0#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01+\x01\t\x01\x01\0\x0b\x01\f\x01\r\x01\x03\0\x0f\x01\x02\0\xff\xff\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\xff\xff\xff\xff#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01+\x01\t\x01\xff\xff\x0b\x01\f\x01\r\x01\xff\xff\x0f\x01\xff\xff\xff\xff\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\xff\xff\xff\xff#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01+\x01\t\x01\xff\xff\x0b\x01\f\x01\r\x01\xff\xff\x0f\x01\xff\xff\xff\xff\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\xff\xff\xff\xff#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01+\x01\t\x01\xff\xff\x0b\x01\f\x01\r\x01\xff\xff\x0f\x01\xff\xff\xff\xff\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\xff\xff\xff\xff#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01+\x01\x0b\x01\f\x01\r\x01\xff\xff\x0f\x01\x10\x01\xff\xff\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\xff\xff\xff\xff#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01+\x01\x0b\x01\f\x01\r\x01\xff\xff\x0f\x01\xff\xff\xff\xff\x12\x01\x13\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01 \x01\xff\xff\xff\xff#\x01$\x01%\x01&\x01'\x01(\x01)\x01*\x01+\x01\xff\xff,\x01-\x01.\x01\xff\xff\xff\xff\xff\xff2\x013\x014\x015\x016\x01\xff\xff8\x019\x01:\x01\xff\xff\xff\xff=\x01>\x01?\x01@\x01A\x01B\x01\xff\xffD\x01E\x01F\x01G\x01H\x01I\x01J\x01K\x01",

   /* error_function */parse_error,

-  /* names_const */"ANYFUNC\0MUT\0LPAR\0RPAR\0NOP\0DROP\0BLOCK\0END\0IF\0THEN\0ELSE\0SELECT\0LOOP\0BR\0BR_IF\0BR_TABLE\0CALL\0CALL_INDIRECT\0RETURN\0GET_LOCAL\0SET_LOCAL\0TEE_LOCAL\0GET_GLOBAL\0SET_GLOBAL\0UNREACHABLE\0CURRENT_MEMORY\0GROW_MEMORY\0FUNC\0START\0TYPE\0PARAM\0RESULT\0LOCAL\0GLOBAL\0MODULE\0TABLE\0ELEM\0MEMORY\0DATA\0OFFSET\0IMPORT\0EXPORT\0SCRIPT\0REGISTER\0INVOKE\0GET\0ASSERT_MALFORMED\0ASSERT_INVALID\0ASSERT_SOFT_INVALID\0ASSERT_UNLINKABLE\0ASSERT_RETURN\0ASSERT_RETURN_NAN\0ASSERT_TRAP\0ASSERT_EXHAUSTION\0INPUT\0OUTPUT\0EOF\0",

-  /* names_block */"NAT\0INT\0FLOAT\0TEXT\0VAR\0VALUE_TYPE\0LOAD\0STORE\0OFFSET_EQ_NAT\0ALIGN_EQ_NAT\0CONST\0UNARY\0BINARY\0COMPARE\0CONVERT\0TEST\0"

+  /* names_const */"ANYFUNC\0MUT\0LPAR\0RPAR\0NOP\0DROP\0BLOCK\0END\0IF\0THEN\0ELSE\0SELECT\0LOOP\0BR\0BR_IF\0BR_TABLE\0CALL\0CALL_INDIRECT\0RETURN\0GET_LOCAL\0SET_LOCAL\0TEE_LOCAL\0GET_GLOBAL\0SET_GLOBAL\0UNREACHABLE\0CURRENT_MEMORY\0GROW_MEMORY\0FUNC\0START\0TYPE\0PARAM\0RESULT\0LOCAL\0GLOBAL\0TABLE\0ELEM\0MEMORY\0DATA\0OFFSET\0IMPORT\0EXPORT\0MODULE\0BIN\0QUOTE\0SCRIPT\0REGISTER\0INVOKE\0GET\0ASSERT_MALFORMED\0ASSERT_INVALID\0ASSERT_SOFT_INVALID\0ASSERT_UNLINKABLE\0ASSERT_RETURN\0ASSERT_RETURN_CANONICAL_NAN\0ASSERT_RETURN_ARITHMETIC_NAN\0ASSERT_TRAP\0ASSERT_EXHAUSTION\0INPUT\0OUTPUT\0EOF\0",

+  /* names_block */"NAT\0INT\0FLOAT\0STRING\0VAR\0VALUE_TYPE\0LOAD\0STORE\0OFFSET_EQ_NAT\0ALIGN_EQ_NAT\0CONST\0UNARY\0BINARY\0TEST\0COMPARE\0CONVERT\0"

 ];

 

 function script(lexfun, lexbuf) {

@@ -27708,13 +27113,14 @@
 //////// start of parsing.js ////////

 'use strict';

 

-var $$Array         = require("./array");

-var Curry           = require("./curry");

-var Lexing          = require("./lexing");

-var Caml_obj        = require("./caml_obj");

-var Caml_array      = require("./caml_array");

-var Caml_parser     = require("./caml_parser");

-var Caml_exceptions = require("./caml_exceptions");

+var $$Array         = require("./array.js");

+var Curry           = require("./curry.js");

+var Js_exn          = require("./js_exn.js");

+var Lexing          = require("./lexing.js");

+var Caml_obj        = require("./caml_obj.js");

+var Caml_array      = require("./caml_array.js");

+var Caml_parser     = require("./caml_parser.js");

+var Caml_exceptions = require("./caml_exceptions.js");

 

 var YYexit = Caml_exceptions.create("Parsing.YYexit");

 

@@ -27811,7 +27217,7 @@
             try {

               match$1 = /* tuple */[

                 /* Semantic_action_computed */4,

-                Curry._1(tables[/* actions */0][env[/* rule_number */12]], env)

+                Curry._1(Caml_array.caml_array_get(tables[/* actions */0], env[/* rule_number */12]), env)

               ];

             }

             catch (exn){

@@ -27820,8 +27226,7 @@
                   /* Error_detected */5,

                   /* () */0

                 ];

-              }

-              else {

+              } else {

                 throw exn;

               }

             }

@@ -27837,7 +27242,8 @@
       }

     };

   }

-  catch (exn$1){

+  catch (raw_exn){

+    var exn$1 = Js_exn.internalToOCamlException(raw_exn);

     var curr_char = env[/* curr_char */6];

     env[/* asp */10] = init_asp;

     env[/* sp */13] = init_sp;

@@ -27848,14 +27254,12 @@
     env[/* errflag */15] = init_errflag;

     if (exn$1[0] === YYexit) {

       return exn$1[1];

-    }

-    else {

+    } else {

       current_lookahead_fun[0] = function (tok) {

         if (tok.length !== undefined) {

-          return +(tables[/* transl_block */2][tok.tag | 0] === curr_char);

-        }

-        else {

-          return +(tables[/* transl_const */1][tok] === curr_char);

+          return +(Caml_array.caml_array_get(tables[/* transl_block */2], tok.tag | 0) === curr_char);

+        } else {

+          return +(Caml_array.caml_array_get(tables[/* transl_const */1], tok) === curr_char);

         }

       };

       throw exn$1;

@@ -27864,7 +27268,7 @@
 }

 

 function peek_val(env, n) {

-  return env[/* v_stack */1][env[/* asp */10] - n | 0];

+  return Caml_array.caml_array_get(env[/* v_stack */1], env[/* asp */10] - n | 0);

 }

 

 function symbol_start_pos() {

@@ -27872,15 +27276,13 @@
   while(true) {

     var i = _i;

     if (i <= 0) {

-      return env[/* symb_end_stack */3][env[/* asp */10]];

-    }

-    else {

-      var st = env[/* symb_start_stack */2][(env[/* asp */10] - i | 0) + 1 | 0];

-      var en = env[/* symb_end_stack */3][(env[/* asp */10] - i | 0) + 1 | 0];

+      return Caml_array.caml_array_get(env[/* symb_end_stack */3], env[/* asp */10]);

+    } else {

+      var st = Caml_array.caml_array_get(env[/* symb_start_stack */2], (env[/* asp */10] - i | 0) + 1 | 0);

+      var en = Caml_array.caml_array_get(env[/* symb_end_stack */3], (env[/* asp */10] - i | 0) + 1 | 0);

       if (Caml_obj.caml_notequal(st, en)) {

         return st;

-      }

-      else {

+      } else {

         _i = i - 1 | 0;

         continue ;

         

@@ -27890,15 +27292,15 @@
 }

 

 function symbol_end_pos() {

-  return env[/* symb_end_stack */3][env[/* asp */10]];

+  return Caml_array.caml_array_get(env[/* symb_end_stack */3], env[/* asp */10]);

 }

 

 function rhs_start_pos(n) {

-  return env[/* symb_start_stack */2][env[/* asp */10] - (env[/* rule_len */11] - n | 0) | 0];

+  return Caml_array.caml_array_get(env[/* symb_start_stack */2], env[/* asp */10] - (env[/* rule_len */11] - n | 0) | 0);

 }

 

 function rhs_end_pos(n) {

-  return env[/* symb_end_stack */3][env[/* asp */10] - (env[/* rule_len */11] - n | 0) | 0];

+  return Caml_array.caml_array_get(env[/* symb_end_stack */3], env[/* asp */10] - (env[/* rule_len */11] - n | 0) | 0);

 }

 

 function symbol_start() {

@@ -27954,14 +27356,16 @@
 //////// start of pervasives.js ////////

 'use strict';

 

-var Curry                    = require("./curry");

-var Caml_io                  = require("./caml_io");

-var Caml_obj                 = require("./caml_obj");

-var Caml_format              = require("./caml_format");

-var Caml_string              = require("./caml_string");

-var Caml_exceptions          = require("./caml_exceptions");

-var Caml_builtin_exceptions  = require("./caml_builtin_exceptions");

-var CamlinternalFormatBasics = require("./camlinternalFormatBasics");

+var Curry                    = require("./curry.js");

+var Caml_io                  = require("./caml_io.js");

+var Caml_obj                 = require("./caml_obj.js");

+var Caml_sys                 = require("./caml_sys.js");

+var Caml_format              = require("./caml_format.js");

+var Caml_string              = require("./caml_string.js");

+var Caml_exceptions          = require("./caml_exceptions.js");

+var Caml_missing_polyfill    = require("./caml_missing_polyfill.js");

+var Caml_builtin_exceptions  = require("./caml_builtin_exceptions.js");

+var CamlinternalFormatBasics = require("./camlinternalFormatBasics.js");

 

 function failwith(s) {

   throw [

@@ -27982,8 +27386,7 @@
 function min(x, y) {

   if (Caml_obj.caml_lessequal(x, y)) {

     return x;

-  }

-  else {

+  } else {

     return y;

   }

 }

@@ -27991,8 +27394,7 @@
 function max(x, y) {

   if (Caml_obj.caml_greaterequal(x, y)) {

     return x;

-  }

-  else {

+  } else {

     return y;

   }

 }

@@ -28000,8 +27402,7 @@
 function abs(x) {

   if (x >= 0) {

     return x;

-  }

-  else {

+  } else {

     return -x | 0;

   }

 }

@@ -28022,8 +27423,7 @@
           Caml_builtin_exceptions.invalid_argument,

           "char_of_int"

         ];

-  }

-  else {

+  } else {

     return n;

   }

 }

@@ -28031,8 +27431,7 @@
 function string_of_bool(b) {

   if (b) {

     return "true";

-  }

-  else {

+  } else {

     return "false";

   }

 }

@@ -28062,23 +27461,19 @@
     var i = _i;

     if (i >= l) {

       return $caret(s, ".");

-    }

-    else {

+    } else {

       var match = Caml_string.get(s, i);

       if (match >= 48) {

         if (match >= 58) {

           return s;

-        }

-        else {

+        } else {

           _i = i + 1 | 0;

           continue ;

           

         }

-      }

-      else if (match !== 45) {

+      } else if (match !== 45) {

         return s;

-      }

-      else {

+      } else {

         _i = i + 1 | 0;

         continue ;

         

@@ -28097,8 +27492,7 @@
             l1[0],

             $at(l1[1], l2)

           ];

-  }

-  else {

+  } else {

     return l2;

   }

 }

@@ -28110,9 +27504,7 @@
 var stderr = Caml_io.stderr;

 

 function open_out_gen(_, _$1, _$2) {

-  return Caml_io.caml_ml_open_descriptor_out(function () {

-                throw "caml_sys_open not implemented by bucklescript yet\n";

-              }());

+  return Caml_io.caml_ml_open_descriptor_out(Caml_missing_polyfill.not_implemented("caml_sys_open not implemented by bucklescript yet\n"));

 }

 

 function open_out(name) {

@@ -28161,8 +27553,7 @@
       _param = param[1];

       continue ;

       

-    }

-    else {

+    } else {

       return /* () */0;

     }

   };

@@ -28182,8 +27573,7 @@
           Caml_builtin_exceptions.invalid_argument,

           "output"

         ];

-  }

-  else {

+  } else {

     return Caml_io.caml_ml_output(oc, s, ofs, len);

   }

 }

@@ -28194,23 +27584,18 @@
           Caml_builtin_exceptions.invalid_argument,

           "output_substring"

         ];

-  }

-  else {

+  } else {

     return Caml_io.caml_ml_output(oc, s, ofs, len);

   }

 }

 

 function output_value(_, _$1) {

-  return function () {

-            throw "caml_output_value not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_output_value not implemented by bucklescript yet\n");

 }

 

 function close_out(oc) {

   Caml_io.caml_ml_flush(oc);

-  return function () {

-            throw "caml_ml_close_channel not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n");

 }

 

 function close_out_noerr(oc) {

@@ -28221,9 +27606,7 @@
     

   }

   try {

-    return function () {

-              throw "caml_ml_close_channel not implemented by bucklescript yet\n";

-            }();

+    return Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n");

   }

   catch (exn$1){

     return /* () */0;

@@ -28231,9 +27614,7 @@
 }

 

 function open_in_gen(_, _$1, _$2) {

-  return Caml_io.caml_ml_open_descriptor_in(function () {

-                throw "caml_sys_open not implemented by bucklescript yet\n";

-              }());

+  return Caml_io.caml_ml_open_descriptor_in(Caml_missing_polyfill.not_implemented("caml_sys_open not implemented by bucklescript yet\n"));

 }

 

 function open_in(name) {

@@ -28262,11 +27643,8 @@
           Caml_builtin_exceptions.invalid_argument,

           "input"

         ];

-  }

-  else {

-    return function () {

-              throw "caml_ml_input not implemented by bucklescript yet\n";

-            }();

+  } else {

+    return Caml_missing_polyfill.not_implemented("caml_ml_input not implemented by bucklescript yet\n");

   }

 }

 

@@ -28276,18 +27654,14 @@
     var ofs = _ofs;

     if (len <= 0) {

       return /* () */0;

-    }

-    else {

-      var r = function () {

-          throw "caml_ml_input not implemented by bucklescript yet\n";

-        }();

+    } else {

+      var r = Caml_missing_polyfill.not_implemented("caml_ml_input not implemented by bucklescript yet\n");

       if (r) {

         _len = len - r | 0;

         _ofs = ofs + r | 0;

         continue ;

         

-      }

-      else {

+      } else {

         throw Caml_builtin_exceptions.end_of_file;

       }

     }

@@ -28300,8 +27674,7 @@
           Caml_builtin_exceptions.invalid_argument,

           "really_input"

         ];

-  }

-  else {

+  } else {

     return unsafe_really_input(ic, s, ofs, len);

   }

 }

@@ -28325,8 +27698,7 @@
         _pos = pos - len | 0;

         continue ;

         

-      }

-      else {

+      } else {

         return buf;

       }

     };

@@ -28335,15 +27707,11 @@
     while(true) {

       var len = _len;

       var accu = _accu;

-      var n = function () {

-          throw "caml_ml_input_scan_line not implemented by bucklescript yet\n";

-        }();

+      var n = Caml_missing_polyfill.not_implemented("caml_ml_input_scan_line not implemented by bucklescript yet\n");

       if (n) {

         if (n > 0) {

           var res = Caml_string.caml_create_string(n - 1 | 0);

-          (function () {

-                throw "caml_ml_input not implemented by bucklescript yet\n";

-              }());

+          Caml_missing_polyfill.not_implemented("caml_ml_input not implemented by bucklescript yet\n");

           Caml_io.caml_ml_input_char(chan);

           if (accu) {

             var len$1 = (len + n | 0) - 1 | 0;

@@ -28351,16 +27719,12 @@
                         res,

                         accu

                       ]);

-          }

-          else {

+          } else {

             return res;

           }

-        }

-        else {

+        } else {

           var beg = Caml_string.caml_create_string(-n | 0);

-          (function () {

-                throw "caml_ml_input not implemented by bucklescript yet\n";

-              }());

+          Caml_missing_polyfill.not_implemented("caml_ml_input not implemented by bucklescript yet\n");

           _len = len - n | 0;

           _accu = /* :: */[

             beg,

@@ -28369,11 +27733,9 @@
           continue ;

           

         }

-      }

-      else if (accu) {

+      } else if (accu) {

         return build_result(Caml_string.caml_create_string(len), len, accu);

-      }

-      else {

+      } else {

         throw Caml_builtin_exceptions.end_of_file;

       }

     };

@@ -28383,9 +27745,7 @@
 

 function close_in_noerr() {

   try {

-    return function () {

-              throw "caml_ml_close_channel not implemented by bucklescript yet\n";

-            }();

+    return Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n");

   }

   catch (exn){

     return /* () */0;

@@ -28491,11 +27851,9 @@
   return Curry._1(exit_function[0], /* () */0);

 }

 

-function exit() {

+function exit(retcode) {

   do_at_exit(/* () */0);

-  return function () {

-            throw "caml_sys_exit not implemented by bucklescript yet\n";

-          }();

+  return Caml_sys.caml_sys_exit(retcode);

 }

 

 var max_int = 2147483647;

@@ -28519,33 +27877,23 @@
 var output_byte = Caml_io.caml_ml_output_char;

 

 function output_binary_int(_, _$1) {

-  return function () {

-            throw "caml_ml_output_int not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ml_output_int not implemented by bucklescript yet\n");

 }

 

 function seek_out(_, _$1) {

-  return function () {

-            throw "caml_ml_seek_out not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ml_seek_out not implemented by bucklescript yet\n");

 }

 

 function pos_out() {

-  return function () {

-            throw "caml_ml_pos_out not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ml_pos_out not implemented by bucklescript yet\n");

 }

 

 function out_channel_length() {

-  return function () {

-            throw "caml_ml_channel_size not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ml_channel_size not implemented by bucklescript yet\n");

 }

 

 function set_binary_mode_out(_, _$1) {

-  return function () {

-            throw "caml_ml_set_binary_mode not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ml_set_binary_mode not implemented by bucklescript yet\n");

 }

 

 var input_char = Caml_io.caml_ml_input_char;

@@ -28553,81 +27901,55 @@
 var input_byte = Caml_io.caml_ml_input_char;

 

 function input_binary_int() {

-  return function () {

-            throw "caml_ml_input_int not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ml_input_int not implemented by bucklescript yet\n");

 }

 

 function input_value() {

-  return function () {

-            throw "caml_input_value not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_input_value not implemented by bucklescript yet\n");

 }

 

 function seek_in(_, _$1) {

-  return function () {

-            throw "caml_ml_seek_in not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ml_seek_in not implemented by bucklescript yet\n");

 }

 

 function pos_in() {

-  return function () {

-            throw "caml_ml_pos_in not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ml_pos_in not implemented by bucklescript yet\n");

 }

 

 function in_channel_length() {

-  return function () {

-            throw "caml_ml_channel_size not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ml_channel_size not implemented by bucklescript yet\n");

 }

 

 function close_in() {

-  return function () {

-            throw "caml_ml_close_channel not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n");

 }

 

 function set_binary_mode_in(_, _$1) {

-  return function () {

-            throw "caml_ml_set_binary_mode not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ml_set_binary_mode not implemented by bucklescript yet\n");

 }

 

 function LargeFile_000(_, _$1) {

-  return function () {

-            throw "caml_ml_seek_out_64 not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ml_seek_out_64 not implemented by bucklescript yet\n");

 }

 

 function LargeFile_001() {

-  return function () {

-            throw "caml_ml_pos_out_64 not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ml_pos_out_64 not implemented by bucklescript yet\n");

 }

 

 function LargeFile_002() {

-  return function () {

-            throw "caml_ml_channel_size_64 not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ml_channel_size_64 not implemented by bucklescript yet\n");

 }

 

 function LargeFile_003(_, _$1) {

-  return function () {

-            throw "caml_ml_seek_in_64 not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ml_seek_in_64 not implemented by bucklescript yet\n");

 }

 

 function LargeFile_004() {

-  return function () {

-            throw "caml_ml_pos_in_64 not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ml_pos_in_64 not implemented by bucklescript yet\n");

 }

 

 function LargeFile_005() {

-  return function () {

-            throw "caml_ml_channel_size_64 not implemented by bucklescript yet\n";

-          }();

+  return Caml_missing_polyfill.not_implemented("caml_ml_channel_size_64 not implemented by bucklescript yet\n");

 }

 

 var LargeFile = [

@@ -28736,10 +28058,10 @@
 //////// start of printf.js ////////

 'use strict';

 

-var Curry              = require("./curry");

-var Buffer             = require("./buffer");

-var Pervasives         = require("./pervasives");

-var CamlinternalFormat = require("./camlinternalFormat");

+var Curry              = require("./curry.js");

+var Buffer             = require("./buffer.js");

+var Pervasives         = require("./pervasives.js");

+var CamlinternalFormat = require("./camlinternalFormat.js");

 

 function kfprintf(k, o, param) {

   return CamlinternalFormat.make_printf(function (o, acc) {

@@ -28824,12 +28146,12 @@
   _registry['print'] = function() {

     let exports = {};

 //////// start of print.js ////////

-// Generated by BUCKLESCRIPT VERSION 1.4.3 , PLEASE EDIT WITH CARE

+// Generated by BUCKLESCRIPT VERSION 1.7.4, PLEASE EDIT WITH CARE

 'use strict';

 

-var List    = require("bs-platform/lib/js/list");

-var Sexpr   = require("./sexpr");

-var Arrange = require("./arrange");

+var List    = require("bs-platform/lib/js/list.js");

+var Sexpr   = require("./sexpr.js");

+var Arrange = require("./arrange.js");

 

 function instr(oc, width, e) {

   return Sexpr.output(oc, width, Arrange.instr(e));

@@ -28862,10 +28184,10 @@
   _registry['script'] = function() {

     let exports = {};

 //////// start of script.js ////////

-// Generated by BUCKLESCRIPT VERSION 1.4.3 , PLEASE EDIT WITH CARE

+// Generated by BUCKLESCRIPT VERSION 1.7.4, PLEASE EDIT WITH CARE

 'use strict';

 

-var Caml_exceptions = require("bs-platform/lib/js/caml_exceptions");

+var Caml_exceptions = require("bs-platform/lib/js/caml_exceptions.js");

 

 var Syntax = Caml_exceptions.create("Script.Syntax");

 

@@ -28879,14 +28201,14 @@
   _registry['sexpr'] = function() {

     let exports = {};

 //////// start of sexpr.js ////////

-// Generated by BUCKLESCRIPT VERSION 1.4.3 , PLEASE EDIT WITH CARE

+// Generated by BUCKLESCRIPT VERSION 1.7.4, PLEASE EDIT WITH CARE

 'use strict';

 

-var List       = require("bs-platform/lib/js/list");

-var Block      = require("bs-platform/lib/js/block");

-var Curry      = require("bs-platform/lib/js/curry");

-var $$String   = require("bs-platform/lib/js/string");

-var Pervasives = require("bs-platform/lib/js/pervasives");

+var List       = require("bs-platform/lib/js/list.js");

+var Block      = require("bs-platform/lib/js/block.js");

+var Curry      = require("bs-platform/lib/js/curry.js");

+var $$String   = require("bs-platform/lib/js/string.js");

+var Pervasives = require("bs-platform/lib/js/pervasives.js");

 

 function $caret$plus(s, r) {

   return /* Concat */Block.__(1, [/* :: */[

@@ -28913,8 +28235,7 @@
     return List.iter(function (param) {

                 return iter(f, param);

               }, param[0]);

-  }

-  else {

+  } else {

     return Curry._1(f, param[0]);

   }

 }

@@ -28922,8 +28243,7 @@
 function concat(param) {

   if (param.tag) {

     return $$String.concat("", List.map(concat, param[0]));

-  }

-  else {

+  } else {

     return param[0];

   }

 }

@@ -28945,8 +28265,7 @@
         " ",

         ""

       ];

-    }

-    else {

+    } else {

       var indent = $$String.make(off, /* " " */32);

       match$1 = /* tuple */[

         "\n  " + indent,

@@ -28960,8 +28279,7 @@
                                       return $caret$plus(sep, r);

                                     }, rs)]), match$1[1]), ")")))

           ];

-  }

-  else {

+  } else {

     var s$1 = param[0];

     return /* tuple */[

             s$1.length,

@@ -28998,14 +28316,14 @@
   _registry['source'] = function() {

     let exports = {};

 //////// start of source.js ////////

-// Generated by BUCKLESCRIPT VERSION 1.4.3 , PLEASE EDIT WITH CARE

+// Generated by BUCKLESCRIPT VERSION 1.7.4, PLEASE EDIT WITH CARE

 'use strict';

 

-var Block      = require("bs-platform/lib/js/block");

-var Curry      = require("bs-platform/lib/js/curry");

-var Printf     = require("bs-platform/lib/js/printf");

-var Caml_obj   = require("bs-platform/lib/js/caml_obj");

-var Pervasives = require("bs-platform/lib/js/pervasives");

+var Block      = require("bs-platform/lib/js/block.js");

+var Curry      = require("bs-platform/lib/js/curry.js");

+var Printf     = require("bs-platform/lib/js/printf.js");

+var Caml_obj   = require("bs-platform/lib/js/caml_obj.js");

+var Pervasives = require("bs-platform/lib/js/pervasives.js");

 

 function $at$at(x, region) {

   return /* record */[

@@ -29039,8 +28357,7 @@
                       ]),

                     "0x%x"

                   ]), pos[/* column */2]);

-  }

-  else {

+  } else {

     return Pervasives.string_of_int(pos[/* line */1]) + ("." + Pervasives.string_of_int(pos[/* column */2] + 1 | 0));

   }

 }

@@ -29067,10 +28384,10 @@
 //////// start of string.js ////////

 'use strict';

 

-var List        = require("./list");

-var Bytes       = require("./bytes");

-var Caml_int32  = require("./caml_int32");

-var Caml_string = require("./caml_string");

+var List        = require("./list.js");

+var Bytes       = require("./bytes.js");

+var Caml_int32  = require("./caml_int32.js");

+var Caml_string = require("./caml_string.js");

 

 function make(n, c) {

   return Caml_string.bytes_to_string(Bytes.make(n, c));

@@ -29109,8 +28426,7 @@
           return /* () */0;

         }, l[1]);

     return Caml_string.bytes_to_string(r);

-  }

-  else {

+  } else {

     return "";

   }

 }

@@ -29136,15 +28452,12 @@
   if (switcher > 4 || switcher < 0) {

     if (switcher !== 23) {

       return /* false */0;

-    }

-    else {

+    } else {

       return /* true */1;

     }

-  }

-  else if (switcher !== 2) {

+  } else if (switcher !== 2) {

     return /* true */1;

-  }

-  else {

+  } else {

     return /* false */0;

   }

 }

@@ -29152,8 +28465,7 @@
 function trim(s) {

   if (s === "" || !(is_space(s.charCodeAt(0)) || is_space(s.charCodeAt(s.length - 1 | 0)))) {

     return s;

-  }

-  else {

+  } else {

     return Caml_string.bytes_to_string(Bytes.trim(Caml_string.bytes_of_string(s)));

   }

 }

@@ -29164,31 +28476,26 @@
       var i = _i;

       if (i >= s.length) {

         return /* false */0;

-      }

-      else {

+      } else {

         var match = s.charCodeAt(i);

         if (match >= 32) {

           var switcher = match - 34 | 0;

           if (switcher > 58 || switcher < 0) {

             if (switcher >= 93) {

               return /* true */1;

-            }

-            else {

+            } else {

               _i = i + 1 | 0;

               continue ;

               

             }

-          }

-          else if (switcher > 57 || switcher < 1) {

+          } else if (switcher > 57 || switcher < 1) {

             return /* true */1;

-          }

-          else {

+          } else {

             _i = i + 1 | 0;

             continue ;

             

           }

-        }

-        else {

+        } else {

           return /* true */1;

         }

       }

@@ -29196,8 +28503,7 @@
   };

   if (needs_escape(0)) {

     return Caml_string.bytes_to_string(Bytes.escaped(Caml_string.bytes_of_string(s)));

-  }

-  else {

+  } else {

     return s;

   }

 }

@@ -29288,11 +28594,12 @@
 //////// start of sys.js ////////

 'use strict';

 

-var Caml_exceptions = require("./caml_exceptions");

+var Caml_sys        = require("./caml_sys.js");

+var Caml_exceptions = require("./caml_exceptions.js");

 

 var is_js = /* true */1;

 

-var match_001 = /* array */[];

+var match = Caml_sys.caml_sys_get_argv(/* () */0);

 

 var big_endian = /* false */0;

 

@@ -29318,9 +28625,9 @@
   return /* () */0;

 }

 

-var argv = match_001;

+var argv = match[1];

 

-var executable_name = "cmd";

+var executable_name = match[0];

 

 var os_type = "Unix";

 

@@ -29416,23 +28723,106 @@
   _registry['types'] = function() {

     let exports = {};

 //////// start of types.js ////////

-// Generated by BUCKLESCRIPT VERSION 1.4.3 , PLEASE EDIT WITH CARE

+// Generated by BUCKLESCRIPT VERSION 1.7.4, PLEASE EDIT WITH CARE

 'use strict';

 

-var I32      = require("./i32");

-var List     = require("bs-platform/lib/js/list");

-var Curry    = require("bs-platform/lib/js/curry");

-var $$String = require("bs-platform/lib/js/string");

+var I32      = require("./i32.js");

+var List     = require("bs-platform/lib/js/list.js");

+var Curry    = require("bs-platform/lib/js/curry.js");

+var $$String = require("bs-platform/lib/js/string.js");

 

 function size(param) {

   if (param !== 1 && param < 3) {

     return 4;

-  }

-  else {

+  } else {

     return 8;

   }

 }

 

+function funcs(_param) {

+  while(true) {

+    var param = _param;

+    if (param) {

+      var match = param[0];

+      if (match.tag) {

+        _param = param[1];

+        continue ;

+        

+      } else {

+        return /* :: */[

+                match[0],

+                funcs(param[1])

+              ];

+      }

+    } else {

+      return /* [] */0;

+    }

+  };

+}

+

+function tables(_param) {

+  while(true) {

+    var param = _param;

+    if (param) {

+      var match = param[0];

+      if (match.tag === 1) {

+        return /* :: */[

+                match[0],

+                tables(param[1])

+              ];

+      } else {

+        _param = param[1];

+        continue ;

+        

+      }

+    } else {

+      return /* [] */0;

+    }

+  };

+}

+

+function memories(_param) {

+  while(true) {

+    var param = _param;

+    if (param) {

+      var match = param[0];

+      if (match.tag === 2) {

+        return /* :: */[

+                match[0],

+                memories(param[1])

+              ];

+      } else {

+        _param = param[1];

+        continue ;

+        

+      }

+    } else {

+      return /* [] */0;

+    }

+  };

+}

+

+function globals(_param) {

+  while(true) {

+    var param = _param;

+    if (param) {

+      var match = param[0];

+      if (match.tag === 3) {

+        return /* :: */[

+                match[0],

+                globals(param[1])

+              ];

+      } else {

+        _param = param[1];

+        continue ;

+        

+      }

+    } else {

+      return /* [] */0;

+    }

+  };

+}

+

 function string_of_value_type(param) {

   switch (param) {

     case 0 : 

@@ -29452,12 +28842,10 @@
   if (ts) {

     if (ts[1]) {

       exit = 1;

-    }

-    else {

+    } else {

       return string_of_value_type(ts[0]);

     }

-  }

-  else {

+  } else {

     exit = 1;

   }

   if (exit === 1) {

@@ -29489,8 +28877,7 @@
   var t = param[0];

   if (param[1] !== 0) {

     return "(mut " + (string_of_value_type(t) + ")");

-  }

-  else {

+  } else {

     return string_of_value_type(t);

   }

 }

@@ -29504,6 +28891,10 @@
 }

 

 exports.size                  = size;

+exports.funcs                 = funcs;

+exports.tables                = tables;

+exports.memories              = memories;

+exports.globals               = globals;

 exports.string_of_value_type  = string_of_value_type;

 exports.string_of_value_types = string_of_value_types;

 exports.string_of_elem_type   = string_of_elem_type;

@@ -29519,21 +28910,178 @@
   };

 

 

+  _registry['utf8'] = function() {

+    let exports = {};

+//////// start of utf8.js ////////

+// Generated by BUCKLESCRIPT VERSION 1.7.4, PLEASE EDIT WITH CARE

+'use strict';

+

+var Lib             = require("./lib.js");

+var Char            = require("bs-platform/lib/js/char.js");

+var List            = require("bs-platform/lib/js/list.js");

+var Curry           = require("bs-platform/lib/js/curry.js");

+var Caml_exceptions = require("bs-platform/lib/js/caml_exceptions.js");

+

+var Utf8 = Caml_exceptions.create("Utf8.Utf8");

+

+function con(n) {

+  return 128 | n & 63;

+}

+

+function encode$prime(param) {

+  if (param) {

+    var n = param[0];

+    if (n < 0) {

+      throw Utf8;

+    } else {

+      var ns = param[1];

+      if (n < 128) {

+        return /* :: */[

+                n,

+                encode$prime(ns)

+              ];

+      } else if (n < 2048) {

+        return /* :: */[

+                192 | (n >>> 6),

+                /* :: */[

+                  con(n),

+                  encode$prime(ns)

+                ]

+              ];

+      } else if (n < 65536) {

+        return /* :: */[

+                224 | (n >>> 12),

+                /* :: */[

+                  con((n >>> 6)),

+                  /* :: */[

+                    con(n),

+                    encode$prime(ns)

+                  ]

+                ]

+              ];

+      } else if (n < 1114112) {

+        return /* :: */[

+                240 | (n >>> 18),

+                /* :: */[

+                  con((n >>> 12)),

+                  /* :: */[

+                    con((n >>> 6)),

+                    /* :: */[

+                      con(n),

+                      encode$prime(ns)

+                    ]

+                  ]

+                ]

+              ];

+      } else {

+        throw Utf8;

+      }

+    }

+  } else {

+    return /* [] */0;

+  }

+}

+

+function encode(ns) {

+  return Curry._1(Lib.$$String[/* implode */0], List.map(Char.chr, encode$prime(ns)));

+}

+

+function con$1(b) {

+  if ((b & 192) === 128) {

+    return b & 63;

+  } else {

+    throw Utf8;

+  }

+}

+

+function code(min, n) {

+  if (n < min || 55296 <= n && n < 57344 || n >= 1114112) {

+    throw Utf8;

+  } else {

+    return n;

+  }

+}

+

+function decode$prime(param) {

+  if (param) {

+    var bs = param[1];

+    var b1 = param[0];

+    if (b1 < 128) {

+      return /* :: */[

+              code(0, b1),

+              decode$prime(bs)

+            ];

+    } else if (b1 < 192) {

+      throw Utf8;

+    } else if (bs) {

+      var bs$1 = bs[1];

+      var b2 = bs[0];

+      if (b1 < 224) {

+        return /* :: */[

+                code(128, ((b1 & 31) << 6) + con$1(b2) | 0),

+                decode$prime(bs$1)

+              ];

+      } else if (bs$1) {

+        var bs$2 = bs$1[1];

+        var b3 = bs$1[0];

+        if (b1 < 240) {

+          return /* :: */[

+                  code(2048, (((b1 & 15) << 12) + (con$1(b2) << 6) | 0) + con$1(b3) | 0),

+                  decode$prime(bs$2)

+                ];

+        } else if (bs$2) {

+          if (b1 < 248) {

+            return /* :: */[

+                    code(65536, ((((b1 & 7) << 18) + (con$1(b2) << 12) | 0) + (con$1(b3) << 6) | 0) + con$1(bs$2[0]) | 0),

+                    decode$prime(bs$2[1])

+                  ];

+          } else {

+            throw Utf8;

+          }

+        } else {

+          throw Utf8;

+        }

+      } else {

+        throw Utf8;

+      }

+    } else {

+      throw Utf8;

+    }

+  } else {

+    return /* [] */0;

+  }

+}

+

+function decode(s) {

+  return decode$prime(List.map(function (prim) {

+                  return prim;

+                }, Curry._1(Lib.$$String[/* explode */1], s)));

+}

+

+exports.Utf8   = Utf8;

+exports.decode = decode;

+exports.encode = encode;

+/* Lib Not a pure module */

+//////// end of utf8.js ////////

+    return exports;

+  };

+

+

   _registry['values'] = function() {

     let exports = {};

 //////// start of values.js ////////

-// Generated by BUCKLESCRIPT VERSION 1.4.3 , PLEASE EDIT WITH CARE

+// Generated by BUCKLESCRIPT VERSION 1.7.4, PLEASE EDIT WITH CARE

 'use strict';

 

-var F32             = require("./f32");

-var F64             = require("./f64");

-var I32             = require("./i32");

-var I64             = require("./i64");

-var List            = require("bs-platform/lib/js/list");

-var Block           = require("bs-platform/lib/js/block");

-var Curry           = require("bs-platform/lib/js/curry");

-var $$String        = require("bs-platform/lib/js/string");

-var Caml_exceptions = require("bs-platform/lib/js/caml_exceptions");

+var F32             = require("./f32.js");

+var F64             = require("./f64.js");

+var I32             = require("./i32.js");

+var I64             = require("./i64.js");

+var List            = require("bs-platform/lib/js/list.js");

+var Block           = require("bs-platform/lib/js/block.js");

+var Curry           = require("bs-platform/lib/js/curry.js");

+var $$String        = require("bs-platform/lib/js/string.js");

+var Caml_exceptions = require("bs-platform/lib/js/caml_exceptions.js");

 

 function type_of(param) {

   switch (param.tag | 0) {

@@ -29586,12 +29134,10 @@
   if (vs) {

     if (vs[1]) {

       exit = 1;

-    }

-    else {

+    } else {

       return string_of_value(vs[0]);

     }

-  }

-  else {

+  } else {

     exit = 1;

   }

   if (exit === 1) {

@@ -29612,8 +29158,7 @@
           Value,

           /* I32Type */0

         ];

-  }

-  else {

+  } else {

     return param[0];

   }

 }

@@ -29630,8 +29175,7 @@
 function of_value$1(param) {

   if (param.tag === 1) {

     return param[0];

-  }

-  else {

+  } else {

     throw [

           Value,

           /* I64Type */1

@@ -29651,8 +29195,7 @@
 function of_value$2(param) {

   if (param.tag === 2) {

     return param[0];

-  }

-  else {

+  } else {

     throw [

           Value,

           /* F32Type */2

@@ -29672,8 +29215,7 @@
 function of_value$3(param) {

   if (param.tag === 3) {

     return param[0];

-  }

-  else {

+  } else {

     throw [

           Value,

           /* F64Type */3

@@ -29705,25 +29247,34 @@
   _registry['wasm'] = function() {

     let exports = {};

 //////// start of wasm.js ////////

-// Generated by BUCKLESCRIPT VERSION 1.4.3 , PLEASE EDIT WITH CARE

+// Generated by BUCKLESCRIPT VERSION 1.7.4, PLEASE EDIT WITH CARE

 'use strict';

 

-var Parse      = require("./parse");

-var Sexpr      = require("./sexpr");

-var Decode     = require("./decode");

-var Encode     = require("./encode");

-var Arrange    = require("./arrange");

-var Caml_int64 = require("bs-platform/lib/js/caml_int64");

-var Pervasives = require("bs-platform/lib/js/pervasives");

+var Parse                   = require("./parse.js");

+var Sexpr                   = require("./sexpr.js");

+var Decode                  = require("./decode.js");

+var Encode                  = require("./encode.js");

+var Arrange                 = require("./arrange.js");

+var Caml_builtin_exceptions = require("bs-platform/lib/js/caml_builtin_exceptions.js");

 

 function encode(s) {

   var def = Parse.string_to_module(s);

   var match = def[/* it */1];

-  if (match.tag) {

-    return match[1];

-  }

-  else {

-    return Encode.encode(match[0]);

+  switch (match.tag | 0) {

+    case 0 : 

+        return Encode.encode(match[0]);

+    case 1 : 

+        return match[1];

+    case 2 : 

+        throw [

+              Caml_builtin_exceptions.match_failure,

+              [

+                "/usr/local/google/home/rossberg/wasm/spec/interpreter/_build/jslib/src/wasm.ml",

+                3,

+                2

+              ]

+            ];

+    

   }

 }

 

@@ -29732,19 +29283,8 @@
   return Sexpr.to_string(width, Arrange.module_(m));

 }

 

-function f(x) {

-  Pervasives.print_string("f");

-  return x;

-}

-

-function g(x) {

-  return Caml_int64.or_(x, (Pervasives.print_string("f"), x));

-}

-

 exports.encode = encode;

 exports.decode = decode;

-exports.f      = f;

-exports.g      = g;

 /* Parse Not a pure module */

 //////// end of wasm.js ////////

     return exports;

diff --git a/test/WasmSpec/testsuite/js-api/jsapi.js b/test/WasmSpec/testsuite/js-api/jsapi.js
index bfe9224..f82d82b 100644
--- a/test/WasmSpec/testsuite/js-api/jsapi.js
+++ b/test/WasmSpec/testsuite/js-api/jsapi.js
@@ -14,6 +14,8 @@
  * limitations under the License.

 */

 

+const kC0DEFEFE = new Uint8Array([0xC0, 0xDE, 0xFE, 0xFE]);

+

 (function testJSAPI() {

 

 const WasmPage = 64 * 1024;

@@ -46,8 +48,7 @@
         .addFunction('f', kSig_i_v)

         .addBody([

             kExprI32Const,

-            42,

-            kExprEnd

+            42

         ])

         .exportFunc();

 

@@ -59,9 +60,7 @@
 

     builder

         .addFunction('a', kSig_v_v)

-        .addBody([

-            kExprEnd

-        ])

+        .addBody([])

         .exportFunc();

 

     builder.addMemory(1, 1, /* exported */ false);

@@ -97,6 +96,7 @@
 let LinkError;

 let RuntimeError;

 let Memory;

+let instanceProto;

 let memoryProto;

 let mem1;

 let Table;

@@ -199,7 +199,7 @@
     assertThrows(() => new Module(new Uint8Array()), CompileError);

     assertThrows(() => new Module(new ArrayBuffer()), CompileError);

     assert_equals(new Module(emptyModuleBinary) instanceof Module, true);

-    assert_equals(new Module(emptyModuleBinary.buffer) instanceof Module, true);

+    assert_equals(new Module(new Uint8Array(emptyModuleBinary)) instanceof Module, true);

 }, "'WebAssembly.Module' constructor function");

 

 test(() => {

@@ -350,7 +350,7 @@
 }, "'WebAssembly.Instance.prototype' data property");

 

 test(() => {

-    const instanceProto = Instance.prototype;

+    instanceProto = Instance.prototype;

     const instanceProtoDesc = Object.getOwnPropertyDescriptor(Instance, 'prototype');

     assert_equals(instanceProto, instanceProtoDesc.value);

     assert_equals(String(instanceProto), "[object WebAssembly.Instance]");

@@ -366,12 +366,16 @@
 }, "'WebAssembly.Instance' instance objects");

 

 test(() => {

-    const instanceExportsDesc = Object.getOwnPropertyDescriptor(exportingInstance, 'exports');

-    assert_equals(typeof instanceExportsDesc.value, "object");

-    assert_equals(instanceExportsDesc.writable, true);

-    assert_equals(instanceExportsDesc.enumerable, true);

-    assert_equals(instanceExportsDesc.configurable, true);

-}, "'WebAssembly.Instance' 'exports' data property");

+    const exportsDesc = Object.getOwnPropertyDescriptor(instanceProto, 'exports');

+    assert_equals(typeof exportsDesc.get, "function");

+    assert_equals(exportsDesc.set, undefined);

+    assert_equals(exportsDesc.enumerable, false);

+    assert_equals(exportsDesc.configurable, true);

+    const exportsGetter = exportsDesc.get;

+    assertThrows(() => exportsGetter.call(), TypeError);

+    assertThrows(() => exportsGetter.call({}), TypeError);

+    assert_equals(typeof exportsGetter.call(exportingInstance), "object");

+}, "'WebAssembly.Instance.prototype.exports' accessor property");

 

 test(() => {

     exportsObj = exportingInstance.exports;

@@ -385,7 +389,7 @@
     assert_equals(Object.getPrototypeOf(exportsObj), null);

     assertThrows(() => Object.defineProperty(exportsObj, 'g', {}), TypeError);

     assert_equals(Object.keys(exportsObj).join(), "f");

-}, "'WebAssembly.Instance' 'exports' object");

+}, "exports object");

 

 test(() => {

     const f = exportsObj.f;

@@ -645,7 +649,7 @@
     assert_true(WebAssembly.validate(complexImportingModuleBinary));

     assert_false(WebAssembly.validate(moduleBinaryImporting2Memories));

     assert_false(WebAssembly.validate(moduleBinaryWithMemSectionAndMemImport));

-}, "'WebAssembly.validate' method"),

+}, "'WebAssembly.validate' method");

 

 test(() => {

     const compileDesc = Object.getOwnPropertyDescriptor(WebAssembly, 'compile');

@@ -684,8 +688,7 @@
 assertCompileError([{}], TypeError);

 assertCompileError([new Uint8Array()], CompileError);

 assertCompileError([new ArrayBuffer()], CompileError);

-assertCompileError([new Uint8Array("hi!")], CompileError);

-assertCompileError([new ArrayBuffer("hi!")], CompileError);

+assertCompileError([kC0DEFEFE], CompileError);

 

 num_tests = 1;

 function assertCompileSuccess(bytes) {

@@ -698,7 +701,7 @@
 }

 

 assertCompileSuccess(emptyModuleBinary);

-assertCompileSuccess(emptyModuleBinary.buffer);

+assertCompileSuccess(new Uint8Array(emptyModuleBinary));

 

 test(() => {

     const instantiateDesc = Object.getOwnPropertyDescriptor(WebAssembly, 'instantiate');

@@ -722,7 +725,6 @@
                 })

                 .catch(error => {

                     assert_equals(error instanceof err, true);

-                    assert_equals(Boolean(error.stack.match("jsapi.js")), true);

                 })

         }, 'unexpected success in assertInstantiateError');

     }

@@ -734,8 +736,7 @@
     assertInstantiateError([{}], TypeError);

     assertInstantiateError([new Uint8Array()], CompileError);

     assertInstantiateError([new ArrayBuffer()], CompileError);

-    assertInstantiateError([new Uint8Array("hi!")], CompileError);

-    assertInstantiateError([new ArrayBuffer("hi!")], CompileError);

+    assertInstantiateError([kC0DEFEFE], CompileError);

     assertInstantiateError([importingModule], TypeError);

     assertInstantiateError([importingModule, null], TypeError);

     assertInstantiateError([importingModuleBinary, null], TypeError);

@@ -772,10 +773,10 @@
     }

     assertInstantiateSuccess(emptyModule);

     assertInstantiateSuccess(emptyModuleBinary);

-    assertInstantiateSuccess(emptyModuleBinary.buffer);

+    assertInstantiateSuccess(new Uint8Array(emptyModuleBinary));

     assertInstantiateSuccess(importingModule, {"":{f:()=>{}}});

     assertInstantiateSuccess(importingModuleBinary, {"":{f:()=>{}}});

-    assertInstantiateSuccess(importingModuleBinary.buffer, {"":{f:()=>{}}});

+    assertInstantiateSuccess(new Uint8Array(importingModuleBinary), {"":{f:()=>{}}});

     assertInstantiateSuccess(complexImportingModuleBinary, {

         a:{b:()=>{}},

         c:{d:scratch_memory},

diff --git a/test/WasmSpec/updateTests.cmd b/test/WasmSpec/updateTests.cmd
index 1f334f6..6ea51db 100644
--- a/test/WasmSpec/updateTests.cmd
+++ b/test/WasmSpec/updateTests.cmd
@@ -16,7 +16,9 @@
 cd wasm-spec

 git rev-parse HEAD > ..\testsuite.rev

 cd ..

-robocopy /e /mir wasm-spec\test testsuite

+rem Exclude comments.wast because it is intended to test wast->wasm with uncommon characters

+rem This is causing problems with our jenkins checks and it is not worth it to run in chakra

+robocopy /e /mir wasm-spec\test testsuite /xf comments.wast

 rd /q /s wasm-spec

 

 rem regerate testsuite

@@ -26,5 +28,5 @@
 node convert-test-suite --rebase %*

 git add testsuite\*

 git add baselines\*

-echo Test updated and regerated, don't forget to update baselines

+echo Test updated and regenerated

 popd
\ No newline at end of file
diff --git a/test/bailout/rlexe.xml b/test/bailout/rlexe.xml
index 7cff168..b9eb459 100644
--- a/test/bailout/rlexe.xml
+++ b/test/bailout/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
@@ -118,7 +118,6 @@
     <default>
       <files>bailout-argobj.js</files>
       <compile-flags>-bailout:3 -bailout:11 -forcejitloopbody</compile-flags>
-      <tags>exclude_ship</tags>
       <baseline>bailout-argobj.baseline</baseline>
     </default>
   </test>
@@ -173,7 +172,6 @@
       <files>AggressiveIntTypeSpecWithFloatPref.js</files>
       <compile-flags>-on:aggressiveIntTypeSpec</compile-flags>
       <baseline>Void.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -195,14 +193,12 @@
       <files>flags.js</files>
       <compile-flags>-bailoutbytecode:312</compile-flags>
       <baseline>flags.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
     <default>
       <files>initlocals.js</files>
       <compile-flags>-bailout:8</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -233,7 +229,6 @@
     <default>
       <files>bailout-branch.js</files>
       <baseline>bailout-branch.baseline</baseline>
-      <tags>exclude_ship</tags>
       <compile-flags>-forcejitloopbody -force:fieldhoist</compile-flags>
     </default>
   </test>
@@ -241,7 +236,6 @@
     <default>
       <files>bailout-checkthis.js</files>
       <baseline />
-      <tags>exclude_ship</tags>
       <compile-flags>-force:checkthis</compile-flags>
     </default>
   </test>
diff --git a/test/es5/rlexe.xml b/test/es5/rlexe.xml
index d95decf..a8fb0c0 100644
--- a/test/es5/rlexe.xml
+++ b/test/es5/rlexe.xml
@@ -295,7 +295,6 @@
     <default>
       <files>es5array_arrayproto_opt.js</files>
       <baseline>es5array_arrayproto_opt.baseline</baseline>
-      <tags>fail</tags>
     </default>
   </test>
   <test>
diff --git a/test/es6/HTMLComments.baseline b/test/es6/HTMLComments.baseline
index 40935a4..cc8a1a6 100644
--- a/test/es6/HTMLComments.baseline
+++ b/test/es6/HTMLComments.baseline
@@ -8,6 +8,4 @@
 Code before <!-- is reachable

 Code before <!-- --> is reachable

 Code before <!-- LineTerminator --> is reachable

-Code before /* */ --> is reachable

-Code before /* */--> is reachable

 Code after post-decrement with a greater-than comparison (-->) is reachable

diff --git a/test/es6/HTMLComments.js b/test/es6/HTMLComments.js
index 4d49785..1ad1eed 100644
--- a/test/es6/HTMLComments.js
+++ b/test/es6/HTMLComments.js
Binary files differ
diff --git a/test/es6/bug_OS12095746.baseline b/test/es6/bug_OS12095746.baseline
new file mode 100644
index 0000000..3e52b94
--- /dev/null
+++ b/test/es6/bug_OS12095746.baseline
@@ -0,0 +1,6 @@
+NotifyModuleReadyCallback(exception) bug_OS12095746_mod0.js
+NotifyModuleReadyCallback(exception) bug_OS12095746_mod1.js
+mod0 catch:Syntax error
+mod1 catch:Expected ';'
+NotifyModuleReadyCallback(exception) bug_OS12095746_mod2.js
+mod2 catch:Expected ';'
diff --git a/test/es6/bug_OS12095746.js b/test/es6/bug_OS12095746.js
new file mode 100644
index 0000000..a7931d5
--- /dev/null
+++ b/test/es6/bug_OS12095746.js
@@ -0,0 +1,17 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+import("bug_OS12095746_mod0.js")
+    .then((m)=>{ console.log('mod0 fail'); })
+    .catch((e)=>{ console.log("mod0 catch:"+e.message); });
+
+import('bug_OS12095746_mod1.js')
+    .then((m)=>{ console.log('mod1 fail'); })
+    .catch((e)=>{
+        console.log('mod1 catch:'+e.message);
+        import('bug_OS12095746_mod2.js')
+            .then((m)=>{ print('mod2 fail'); })
+            .catch((e)=>{ print('mod2 catch:'+e.message); });
+        });
diff --git a/test/es6/bug_OS12095746_mod0.js b/test/es6/bug_OS12095746_mod0.js
new file mode 100644
index 0000000..aa8461b
--- /dev/null
+++ b/test/es6/bug_OS12095746_mod0.js
@@ -0,0 +1,7 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+var foo = null;
+export foo;
diff --git a/test/es6/bug_OS12095746_mod1.js b/test/es6/bug_OS12095746_mod1.js
new file mode 100644
index 0000000..be9e6ab
--- /dev/null
+++ b/test/es6/bug_OS12095746_mod1.js
@@ -0,0 +1,6 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+import test from "./bug_OS12095746_moddep.js";
diff --git a/test/es6/bug_OS12095746_mod2.js b/test/es6/bug_OS12095746_mod2.js
new file mode 100644
index 0000000..be9e6ab
--- /dev/null
+++ b/test/es6/bug_OS12095746_mod2.js
@@ -0,0 +1,6 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+import test from "./bug_OS12095746_moddep.js";
diff --git a/test/es6/bug_OS12095746_moddep.js b/test/es6/bug_OS12095746_moddep.js
new file mode 100644
index 0000000..179db30
--- /dev/null
+++ b/test/es6/bug_OS12095746_moddep.js
@@ -0,0 +1,7 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// Parse error in a dependent module
+1A
diff --git a/test/es6/bug_OS12113549_module1.js b/test/es6/bug_OS12113549_module1.js
new file mode 100644
index 0000000..c8477b7
--- /dev/null
+++ b/test/es6/bug_OS12113549_module1.js
@@ -0,0 +1,11 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+var obj1 = {"BugID": "OS12113549"};
+    (function () {
+        eval('');
+    })();
+
+export { obj1 as module1_exportbinding_0 };
diff --git a/test/es6/bug_issue_3076.js b/test/es6/bug_issue_3076.js
new file mode 100644
index 0000000..d5ef0aa
--- /dev/null
+++ b/test/es6/bug_issue_3076.js
@@ -0,0 +1,10 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+function test() {
+    import('passmodule.js');
+}
+
+test();
diff --git a/test/es6/classes_bugfixes.js b/test/es6/classes_bugfixes.js
index 74c10ae..eb4add5 100644
--- a/test/es6/classes_bugfixes.js
+++ b/test/es6/classes_bugfixes.js
@@ -350,6 +350,32 @@
         assert.areEqual('B1', B.n1(), "static method.call()");

     }

   },

+  {

+    name: "Issue3054: NULL pointer crash when calling constructor with Proxy new_target",

+    body: function () {

+        var result = "";

+        class B {

+            constructor() {

+                assert.areEqual(P, new.target, "B(): new.target === P");

+                result += "b";

+            }

+        }

+

+        class A extends B {

+            constructor() {

+                assert.areEqual(P, new.target, "A(): new.target === P");

+                result += "a";

+                super();

+                result += "c";

+            }

+        }

+

+        var P = new Proxy(B, {});

+        Reflect.construct(A, [], P);

+

+        assert.areEqual('abc', result, "result == 'abc'");

+    }

+  },

 ];

 

 testRunner.runTests(tests, { verbose: WScript.Arguments[0] != "summary" });

diff --git a/test/es6/es6_all.baseline b/test/es6/es6_all.baseline
deleted file mode 100644
index 343f7a6..0000000
--- a/test/es6/es6_all.baseline
+++ /dev/null
@@ -1,83 +0,0 @@
-FLAG ES6All = 1

-FLAG ES6 = 1 - setting child flag Simdjs = 1

-FLAG Simdjs = 1

-FLAG ES6 = 1 - setting child flag ES6Species = 1

-FLAG ES6Species = 1

-FLAG ES6 = 1 - setting child flag ES7AsyncAwait = 1

-FLAG ES7AsyncAwait = 1

-FLAG ES6 = 1 - setting child flag ES6Classes = 1

-FLAG ES6Classes = 1

-FLAG ES6 = 1 - setting child flag ES6DateParseFix = 1

-FLAG ES6DateParseFix = 1

-FLAG ES6 = 1 - setting child flag ES6DefaultArgs = 1

-FLAG ES6DefaultArgs = 1

-FLAG ES6 = 1 - setting child flag ES6Destructuring = 1

-FLAG ES6Destructuring = 1

-FLAG ES6 = 1 - setting child flag ES6ForLoopSemantics = 1

-FLAG ES6ForLoopSemantics = 1

-FLAG ES6 = 1 - setting child flag ES6FunctionName = 1

-FLAG ES6FunctionName = 1

-FLAG ES6 = 1 - setting child flag ES6FunctionNameFull = 1

-FLAG ES6FunctionNameFull = 1

-FLAG ES6 = 1 - setting child flag ES6Generators = 1

-FLAG ES6Generators = 1

-FLAG ES6 = 1 - setting child flag ES7ExponentiationOperator = 1

-FLAG ES7ExponentiationOperator = 1

-FLAG ES6 = 1 - setting child flag ES7ValuesEntries = 1

-FLAG ES7ValuesEntries = 1

-FLAG ES6 = 1 - setting child flag ES7TrailingComma = 1

-FLAG ES7TrailingComma = 1

-FLAG ES6 = 1 - setting child flag ES6IsConcatSpreadable = 1

-FLAG ES6IsConcatSpreadable = 1

-FLAG ES6 = 1 - setting child flag ES6Math = 1

-FLAG ES6Math = 1

-FLAG ES6 = 1 - setting child flag ES6Module = 1

-FLAG ES6Module = 1

-FLAG ES6 = 1 - setting child flag ES6Object = 1

-FLAG ES6Object = 1

-FLAG ES6 = 1 - setting child flag ES6Number = 1

-FLAG ES6Number = 1

-FLAG ES6 = 1 - setting child flag ES6ObjectLiterals = 1

-FLAG ES6ObjectLiterals = 1

-FLAG ES6 = 1 - setting child flag ES6Promise = 1

-FLAG ES6Promise = 1

-FLAG ES6 = 1 - setting child flag ES6Proxy = 1

-FLAG ES6Proxy = 1

-FLAG ES6 = 1 - setting child flag ES6Rest = 1

-FLAG ES6Rest = 1

-FLAG ES6 = 1 - setting child flag ES6Spread = 1

-FLAG ES6Spread = 1

-FLAG ES6 = 1 - setting child flag ES6String = 1

-FLAG ES6String = 1

-FLAG ES6 = 1 - setting child flag ES6StringPrototypeFixes = 1

-FLAG ES6StringPrototypeFixes = 1

-FLAG ES6 = 1 - setting child flag ES6PrototypeChain = 1

-FLAG ES6PrototypeChain = 1

-FLAG ES6 = 1 - setting child flag ES6ToPrimitive = 1

-FLAG ES6ToPrimitive = 1

-FLAG ES6 = 1 - setting child flag ES6ToLength = 1

-FLAG ES6ToLength = 1

-FLAG ES6 = 1 - setting child flag ES6ToStringTag = 1

-FLAG ES6ToStringTag = 1

-FLAG ES6 = 1 - setting child flag ES6Unicode = 1

-FLAG ES6Unicode = 1

-FLAG ES6 = 1 - setting child flag ES6UnicodeVerbose = 1

-FLAG ES6UnicodeVerbose = 1

-FLAG ES6 = 1 - setting child flag ES6Unscopables = 1

-FLAG ES6Unscopables = 1

-FLAG ES6 = 1 - setting child flag ES6RegExSticky = 1

-FLAG ES6RegExSticky = 1

-FLAG ES6 = 1 - setting child flag ES6RegExPrototypeProperties = 1

-FLAG ES6RegExPrototypeProperties = 1

-FLAG ES6 = 1 - setting child flag ES6RegExSymbols = 1

-FLAG ES6RegExSymbols = 1

-FLAG ES6 = 1 - setting child flag ES6HasInstance = 1

-FLAG ES6HasInstance = 1

-FLAG ES6 = 1 - setting child flag ArrayBufferTransfer = 1

-FLAG ArrayBufferTransfer = 1

-FLAG ES6 = 1 - setting child flag ESObjectGetOwnPropertyDescriptors = 1

-FLAG ESObjectGetOwnPropertyDescriptors = 1

-FLAG ES6 = 1 - setting child flag ESSharedArrayBuffer = 1

-FLAG ESSharedArrayBuffer = 1

-FLAG WERExceptionSupport = 1

-default argument

diff --git a/test/es6/es6_all.js b/test/es6/es6_all.js
deleted file mode 100644
index 2251681..0000000
--- a/test/es6/es6_all.js
+++ /dev/null
@@ -1,11 +0,0 @@
-//-------------------------------------------------------------------------------------------------------

-// Copyright (C) Microsoft. All rights reserved.

-// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.

-//-------------------------------------------------------------------------------------------------------

-

-// uses es6 default parameter values as validation for ES6 'stable' features

-

-function f(x = 'default argument') {

-    print(x);

-}

-f();

diff --git a/test/es6/es6_stable.baseline b/test/es6/es6_stable.baseline
deleted file mode 100644
index ba53ade..0000000
--- a/test/es6/es6_stable.baseline
+++ /dev/null
@@ -1,86 +0,0 @@
-FLAG ES6 = 1

-FLAG ES6 = 1 - setting child flag Simdjs = 0

-FLAG Simdjs = 0

-FLAG ES6 = 1 - setting child flag ES6Species = 1

-FLAG ES6Species = 1

-FLAG ES6 = 1 - setting child flag ES7AsyncAwait = 1

-FLAG ES7AsyncAwait = 1

-FLAG ES6 = 1 - setting child flag ES6Classes = 1

-FLAG ES6Classes = 1

-FLAG ES6 = 1 - setting child flag ES6DateParseFix = 1

-FLAG ES6DateParseFix = 1

-FLAG ES6 = 1 - setting child flag ES6DefaultArgs = 1

-FLAG ES6DefaultArgs = 1

-FLAG ES6 = 1 - setting child flag ES6Destructuring = 1

-FLAG ES6Destructuring = 1

-FLAG ES6 = 1 - setting child flag ES6ForLoopSemantics = 1

-FLAG ES6ForLoopSemantics = 1

-FLAG ES6 = 1 - setting child flag ES6FunctionName = 1

-FLAG ES6FunctionName = 1

-FLAG ES6 = 1 - setting child flag ES6FunctionNameFull = 0

-FLAG ES6FunctionNameFull = 0

-FLAG ES6 = 1 - setting child flag ES6Generators = 1

-FLAG ES6Generators = 1

-FLAG ES6 = 1 - setting child flag ES7ExponentiationOperator = 1

-FLAG ES7ExponentiationOperator = 1

-FLAG ES6 = 1 - setting child flag ES7ValuesEntries = 1

-FLAG ES7ValuesEntries = 1

-FLAG ES6 = 1 - setting child flag ES7TrailingComma = 1

-FLAG ES7TrailingComma = 1

-FLAG ES6 = 1 - setting child flag ES6IsConcatSpreadable = 1

-FLAG ES6IsConcatSpreadable = 1

-FLAG ES6 = 1 - setting child flag ES6Math = 1

-FLAG ES6Math = 1

-FLAG ES6 = 1 - setting child flag ES6Module = 1

-FLAG ES6Module = 1

-FLAG ES6 = 1 - setting child flag ES6Object = 1

-FLAG ES6Object = 1

-FLAG ES6 = 1 - setting child flag ES6Number = 1

-FLAG ES6Number = 1

-FLAG ES6 = 1 - setting child flag ES6ObjectLiterals = 1

-FLAG ES6ObjectLiterals = 1

-FLAG ES6 = 1 - setting child flag ES6Promise = 1

-FLAG ES6Promise = 1

-FLAG ES6 = 1 - setting child flag ES6Proxy = 1

-FLAG ES6Proxy = 1

-FLAG ES6 = 1 - setting child flag ES6Rest = 1

-FLAG ES6Rest = 1

-FLAG ES6 = 1 - setting child flag ES6Spread = 1

-FLAG ES6Spread = 1

-FLAG ES6 = 1 - setting child flag ES6String = 1

-FLAG ES6String = 1

-FLAG ES6 = 1 - setting child flag ES6StringPrototypeFixes = 1

-FLAG ES6StringPrototypeFixes = 1

-FLAG ES6 = 1 - setting child flag ES6PrototypeChain = 0

-FLAG ES6PrototypeChain = 0

-FLAG ES6 = 1 - setting child flag ES6ToPrimitive = 1

-FLAG ES6ToPrimitive = 1

-FLAG ES6 = 1 - setting child flag ES6ToLength = 1

-FLAG ES6ToLength = 1

-FLAG ES6 = 1 - setting child flag ES6ToStringTag = 1

-FLAG ES6ToStringTag = 1

-FLAG ES6 = 1 - setting child flag ES6Unicode = 1

-FLAG ES6Unicode = 1

-FLAG ES6 = 1 - setting child flag ES6UnicodeVerbose = 1

-FLAG ES6UnicodeVerbose = 1

-FLAG ES6 = 1 - setting child flag ES6Unscopables = 1

-FLAG ES6Unscopables = 1

-FLAG ES6 = 1 - setting child flag ES6RegExSticky = 1

-FLAG ES6RegExSticky = 1

-FLAG ES6 = 1 - setting child flag ES6RegExPrototypeProperties = 0

-FLAG ES6RegExPrototypeProperties = 0

-FLAG ES6 = 1 - setting child flag ES6RegExSymbols = 0

-FLAG ES6RegExSymbols = 0

-FLAG ES6 = 1 - setting child flag ES6HasInstance = 1

-FLAG ES6HasInstance = 1

-FLAG ES6 = 1 - setting child flag ES6Verbose = 0

-FLAG ES6Verbose = 0

-FLAG ES6 = 1 - setting child flag ArrayBufferTransfer = 0

-FLAG ArrayBufferTransfer = 0

-FLAG ES6 = 1 - setting child flag ESObjectGetOwnPropertyDescriptors = 1

-FLAG ESObjectGetOwnPropertyDescriptors = 1

-FLAG ES6 = 1 - setting child flag ESSharedArrayBuffer = 1

-FLAG ESSharedArrayBuffer = 1

-FLAG ES6DefaultArgs = 1

-FLAG WERExceptionSupport = 1

-default argument

diff --git a/test/es6/es6_stable.enable_disable.baseline b/test/es6/es6_stable.enable_disable.baseline
deleted file mode 100644
index 2be9c5d..0000000
--- a/test/es6/es6_stable.enable_disable.baseline
+++ /dev/null
@@ -1,169 +0,0 @@
-FLAG ES6 = 1

-FLAG ES6 = 1 - setting child flag Simdjs = 0

-FLAG Simdjs = 0

-FLAG ES6 = 1 - setting child flag ES6Species = 1

-FLAG ES6Species = 1

-FLAG ES6 = 1 - setting child flag ES7AsyncAwait = 1

-FLAG ES7AsyncAwait = 1

-FLAG ES6 = 1 - setting child flag ES6Classes = 1

-FLAG ES6Classes = 1

-FLAG ES6 = 1 - setting child flag ES6DateParseFix = 1

-FLAG ES6DateParseFix = 1

-FLAG ES6 = 1 - setting child flag ES6DefaultArgs = 1

-FLAG ES6DefaultArgs = 1

-FLAG ES6 = 1 - setting child flag ES6Destructuring = 1

-FLAG ES6Destructuring = 1

-FLAG ES6 = 1 - setting child flag ES6ForLoopSemantics = 1

-FLAG ES6ForLoopSemantics = 1

-FLAG ES6 = 1 - setting child flag ES6FunctionName = 1

-FLAG ES6FunctionName = 1

-FLAG ES6 = 1 - setting child flag ES6FunctionNameFull = 0

-FLAG ES6FunctionNameFull = 0

-FLAG ES6 = 1 - setting child flag ES6Generators = 1

-FLAG ES6Generators = 1

-FLAG ES6 = 1 - setting child flag ES7ExponentiationOperator = 1

-FLAG ES7ExponentiationOperator = 1

-FLAG ES6 = 1 - setting child flag ES7ValuesEntries = 1

-FLAG ES7ValuesEntries = 1

-FLAG ES6 = 1 - setting child flag ES7TrailingComma = 1

-FLAG ES7TrailingComma = 1

-FLAG ES6 = 1 - setting child flag ES6IsConcatSpreadable = 1

-FLAG ES6IsConcatSpreadable = 1

-FLAG ES6 = 1 - setting child flag ES6Math = 1

-FLAG ES6Math = 1

-FLAG ES6 = 1 - setting child flag ES6Module = 1

-FLAG ES6Module = 1

-FLAG ES6 = 1 - setting child flag ES6Object = 1

-FLAG ES6Object = 1

-FLAG ES6 = 1 - setting child flag ES6Number = 1

-FLAG ES6Number = 1

-FLAG ES6 = 1 - setting child flag ES6ObjectLiterals = 1

-FLAG ES6ObjectLiterals = 1

-FLAG ES6 = 1 - setting child flag ES6Promise = 1

-FLAG ES6Promise = 1

-FLAG ES6 = 1 - setting child flag ES6Proxy = 1

-FLAG ES6Proxy = 1

-FLAG ES6 = 1 - setting child flag ES6Rest = 1

-FLAG ES6Rest = 1

-FLAG ES6 = 1 - setting child flag ES6Spread = 1

-FLAG ES6Spread = 1

-FLAG ES6 = 1 - setting child flag ES6String = 1

-FLAG ES6String = 1

-FLAG ES6 = 1 - setting child flag ES6StringPrototypeFixes = 1

-FLAG ES6StringPrototypeFixes = 1

-FLAG ES6 = 1 - setting child flag ES6PrototypeChain = 0

-FLAG ES6PrototypeChain = 0

-FLAG ES6 = 1 - setting child flag ES6ToPrimitive = 1

-FLAG ES6ToPrimitive = 1

-FLAG ES6 = 1 - setting child flag ES6ToLength = 1

-FLAG ES6ToLength = 1

-FLAG ES6 = 1 - setting child flag ES6ToStringTag = 1

-FLAG ES6ToStringTag = 1

-FLAG ES6 = 1 - setting child flag ES6Unicode = 1

-FLAG ES6Unicode = 1

-FLAG ES6 = 1 - setting child flag ES6UnicodeVerbose = 1

-FLAG ES6UnicodeVerbose = 1

-FLAG ES6 = 1 - setting child flag ES6Unscopables = 1

-FLAG ES6Unscopables = 1

-FLAG ES6 = 1 - setting child flag ES6RegExSticky = 1

-FLAG ES6RegExSticky = 1

-FLAG ES6 = 1 - setting child flag ES6RegExPrototypeProperties = 0

-FLAG ES6RegExPrototypeProperties = 0

-FLAG ES6 = 1 - setting child flag ES6RegExSymbols = 0

-FLAG ES6RegExSymbols = 0

-FLAG ES6 = 1 - setting child flag ES6HasInstance = 1

-FLAG ES6HasInstance = 1

-FLAG ES6 = 1 - setting child flag ES6Verbose = 0

-FLAG ES6Verbose = 0

-FLAG ES6 = 1 - setting child flag ArrayBufferTransfer = 0

-FLAG ArrayBufferTransfer = 0

-FLAG ES6 = 1 - setting child flag ESObjectGetOwnPropertyDescriptors = 1

-FLAG ESObjectGetOwnPropertyDescriptors = 1

-FLAG ES6 = 1 - setting child flag ESSharedArrayBuffer = 1

-FLAG ESSharedArrayBuffer = 1

-FLAG ES6 = 0

-FLAG ES6 = 0 - setting child flag Simdjs = 0

-FLAG Simdjs = 0

-FLAG ES6 = 0 - setting child flag ES6Species = 0

-FLAG ES6Species = 0

-FLAG ES6 = 0 - setting child flag ES7AsyncAwait = 0

-FLAG ES7AsyncAwait = 0

-FLAG ES6 = 0 - setting child flag ES6Classes = 0

-FLAG ES6Classes = 0

-FLAG ES6 = 0 - setting child flag ES6DateParseFix = 0

-FLAG ES6DateParseFix = 0

-FLAG ES6 = 0 - setting child flag ES6DefaultArgs = 0

-FLAG ES6DefaultArgs = 0

-FLAG ES6 = 0 - setting child flag ES6Destructuring = 0

-FLAG ES6Destructuring = 0

-FLAG ES6 = 0 - setting child flag ES6ForLoopSemantics = 0

-FLAG ES6ForLoopSemantics = 0

-FLAG ES6 = 0 - setting child flag ES6FunctionName = 0

-FLAG ES6FunctionName = 0

-FLAG ES6 = 0 - setting child flag ES6FunctionNameFull = 0

-FLAG ES6FunctionNameFull = 0

-FLAG ES6 = 0 - setting child flag ES6Generators = 0

-FLAG ES6Generators = 0

-FLAG ES6 = 0 - setting child flag ES7ExponentiationOperator = 0

-FLAG ES7ExponentiationOperator = 0

-FLAG ES6 = 0 - setting child flag ES7ValuesEntries = 0

-FLAG ES7ValuesEntries = 0

-FLAG ES6 = 0 - setting child flag ES7TrailingComma = 0

-FLAG ES7TrailingComma = 0

-FLAG ES6 = 0 - setting child flag ES6IsConcatSpreadable = 0

-FLAG ES6IsConcatSpreadable = 0

-FLAG ES6 = 0 - setting child flag ES6Math = 0

-FLAG ES6Math = 0

-FLAG ES6 = 0 - setting child flag ES6Module = 0

-FLAG ES6Module = 0

-FLAG ES6 = 0 - setting child flag ES6Object = 0

-FLAG ES6Object = 0

-FLAG ES6 = 0 - setting child flag ES6Number = 0

-FLAG ES6Number = 0

-FLAG ES6 = 0 - setting child flag ES6ObjectLiterals = 0

-FLAG ES6ObjectLiterals = 0

-FLAG ES6 = 0 - setting child flag ES6Promise = 0

-FLAG ES6Promise = 0

-FLAG ES6 = 0 - setting child flag ES6Proxy = 0

-FLAG ES6Proxy = 0

-FLAG ES6 = 0 - setting child flag ES6Rest = 0

-FLAG ES6Rest = 0

-FLAG ES6 = 0 - setting child flag ES6Spread = 0

-FLAG ES6Spread = 0

-FLAG ES6 = 0 - setting child flag ES6String = 0

-FLAG ES6String = 0

-FLAG ES6 = 0 - setting child flag ES6StringPrototypeFixes = 0

-FLAG ES6StringPrototypeFixes = 0

-FLAG ES6 = 0 - setting child flag ES6PrototypeChain = 0

-FLAG ES6PrototypeChain = 0

-FLAG ES6 = 0 - setting child flag ES6ToPrimitive = 0

-FLAG ES6ToPrimitive = 0

-FLAG ES6 = 0 - setting child flag ES6ToLength = 0

-FLAG ES6ToLength = 0

-FLAG ES6 = 0 - setting child flag ES6ToStringTag = 0

-FLAG ES6ToStringTag = 0

-FLAG ES6 = 0 - setting child flag ES6Unicode = 0

-FLAG ES6Unicode = 0

-FLAG ES6 = 0 - setting child flag ES6UnicodeVerbose = 0

-FLAG ES6UnicodeVerbose = 0

-FLAG ES6 = 0 - setting child flag ES6Unscopables = 0

-FLAG ES6Unscopables = 0

-FLAG ES6 = 0 - setting child flag ES6RegExSticky = 0

-FLAG ES6RegExSticky = 0

-FLAG ES6 = 0 - setting child flag ES6RegExPrototypeProperties = 0

-FLAG ES6RegExPrototypeProperties = 0

-FLAG ES6 = 0 - setting child flag ES6RegExSymbols = 0

-FLAG ES6RegExSymbols = 0

-FLAG ES6 = 0 - setting child flag ES6HasInstance = 0

-FLAG ES6HasInstance = 0

-FLAG ES6 = 0 - setting child flag ES6Verbose = 0

-FLAG ES6Verbose = 0

-FLAG ES6 = 0 - setting child flag ArrayBufferTransfer = 0

-FLAG ArrayBufferTransfer = 0

-FLAG ES6 = 0 - setting child flag ESObjectGetOwnPropertyDescriptors = 0

-FLAG ESObjectGetOwnPropertyDescriptors = 0

-FLAG ES6 = 0 - setting child flag ESSharedArrayBuffer = 0

-FLAG ESSharedArrayBuffer = 0

-FLAG ES6DefaultArgs = 1

-FLAG WERExceptionSupport = 1

-default argument

diff --git a/test/es6/es6_stable.js b/test/es6/es6_stable.js
deleted file mode 100644
index 2251681..0000000
--- a/test/es6/es6_stable.js
+++ /dev/null
@@ -1,11 +0,0 @@
-//-------------------------------------------------------------------------------------------------------

-// Copyright (C) Microsoft. All rights reserved.

-// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.

-//-------------------------------------------------------------------------------------------------------

-

-// uses es6 default parameter values as validation for ES6 'stable' features

-

-function f(x = 'default argument') {

-    print(x);

-}

-f();

diff --git a/test/es6/lambda1.js b/test/es6/lambda1.js
index 3329f45..d6e717d 100644
--- a/test/es6/lambda1.js
+++ b/test/es6/lambda1.js
@@ -429,6 +429,13 @@
                 assert.areEqual(globalObject, globalEvalLambdaThisWithNestedEval(), "globalEvalLambdaThisWithNestedEval() should equal the global object");

                 assert.areEqual(globalObject, globalEvalNestedEvalLambdaThis(), "globalEvalNestedEvalLambdaThis() should equal the global object");

                 assert.areEqual(globalObject, globalEvalNestedEvalLambdaThisWithNestedEval(), "globalEvalNestedEvalLambdaThisWithNestedEval() should equal the global object");

+

+                this.x = 10;

+                with ({x : 100}) {

+                    lambdaInsideWithEval = (s) => eval(s);

+                    assert.areEqual(10, lambdaInsideWithEval("this.x"), "Arrow function should be able to access this variable within eval");

+                    assert.areEqual(100, x, "Property access on the with construct should work with eval and arrow in the body");

+                }

             }

 

             test.call(thisVal);

diff --git a/test/es6/module-bugfixes.js b/test/es6/module-bugfixes.js
new file mode 100644
index 0000000..3cb5c13
--- /dev/null
+++ b/test/es6/module-bugfixes.js
@@ -0,0 +1,47 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// ES6 Module tests for bugfixes
+
+WScript.LoadScriptFile("..\\UnitTestFramework\\UnitTestFramework.js");
+
+function testModuleScript(source, message, shouldFail = false) {
+    let testfunc = () => testRunner.LoadModule(source, 'samethread', shouldFail);
+
+    if (shouldFail) {
+        let caught = false;
+
+        // We can't use assert.throws here because the SyntaxError used to construct the thrown error
+        // is from a different context so it won't be strictly equal to our SyntaxError.
+        try {
+            testfunc();
+        } catch(e) {
+            caught = true;
+
+            // Compare toString output of SyntaxError and other context SyntaxError constructor.
+            assert.areEqual(e.constructor.toString(), SyntaxError.toString(), message);
+        }
+
+        assert.isTrue(caught, `Expected error not thrown: ${message}`);
+    } else {
+        assert.doesNotThrow(testfunc, message);
+    }
+}
+
+var tests = [
+    {
+        name: "OS12113549: Assertion on module export in ProcessCapturedSym",
+        body: function() {
+            let functionBody =
+                `
+                import { module1_exportbinding_0 as module2_localbinding_0 } from 'bug_OS12113549_module1.js';
+                assert.areEqual({"BugID": "OS12113549"}, module2_localbinding_0);
+                `
+            testRunner.LoadModule(functionBody, 'samethread');
+        }
+    },
+];
+
+testRunner.runTests(tests, { verbose: WScript.Arguments[0] != "summary" });
diff --git a/test/es6/rlexe.xml b/test/es6/rlexe.xml
index 13e2c48..13c4732 100644
--- a/test/es6/rlexe.xml
+++ b/test/es6/rlexe.xml
@@ -76,14 +76,6 @@
   </test>
   <test>
     <default>
-      <files>toPrimitiveJitBug654983.js</files>
-      <compile-flags>-trace:bailout</compile-flags>
-      <!-- This test sometimes fails with bailout trace output.  Pending investigation in bug OS 5244610. -->
-      <tags>fail</tags>
-    </default>
-  </test>
-  <test>
-    <default>
       <files>es6IsConcatSpreadable.js</files>
       <compile-flags>-es6tolength -args summary -endargs</compile-flags>
     </default>
@@ -132,12 +124,14 @@
       <baseline>proto_basic.baseline</baseline>
     </default>
   </test>
+  <!-- Microsoft/ChakraCore#2667 - Fix and Re-enable flaky test proto_disable.js
   <test>
     <default>
       <files>proto_disable.js</files>
       <baseline>proto_disable.baseline</baseline>
     </default>
   </test>
+  -->
   <test>
     <default>
       <files>proto_initializer.js</files>
@@ -504,33 +498,6 @@
   </test>
   <test>
     <default>
-      <files>es6_stable.js</files>
-      <!-- Disable OOP JIT which would cause output to print twice. -->
-      <compile-flags>-verbose -es6 -ES6DefaultArgs -WERExceptionSupport -oopjit-</compile-flags>
-      <baseline>es6_stable.baseline</baseline>
-      <tags>exclude_dynapogo</tags>
-    </default>
-  </test>
-  <test>
-    <default>
-      <files>es6_stable.js</files>
-      <!-- Disable OOP JIT which would cause output to print twice. -->
-      <compile-flags>-verbose -es6 -es6- -ES6DefaultArgs -WERExceptionSupport -oopjit-</compile-flags>
-      <baseline>es6_stable.enable_disable.baseline</baseline>
-      <tags>exclude_dynapogo</tags>
-    </default>
-  </test>
-  <test>
-    <default>
-      <files>es6_all.js</files>
-      <!-- Disable OOP JIT which would cause output to print twice. -->
-      <compile-flags>-verbose -es6all -oopjit- -WERExceptionSupport</compile-flags>
-      <baseline>es6_all.baseline</baseline>
-      <tags>exclude_dynapogo</tags>
-    </default>
-  </test>
-  <test>
-    <default>
       <files>normalize.js</files>
       <baseline>normalize.baseline</baseline>
       <compile-flags> -ES6Unicode</compile-flags>
@@ -547,7 +514,6 @@
       <files>unicode_escape_sequences.js</files>
       <baseline>unicode_escape_sequences.baseline</baseline>
       <compile-flags> -ES6Unicode -ES6RegExSticky</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -555,7 +521,7 @@
       <files>unicode_6_identifiers_utf8.js</files>
       <baseline>unicode_6_identifiers_utf8.baseline</baseline>
       <compile-flags> -ES6Unicode</compile-flags>
-      <tags>exclude_win7,exclude_ship</tags>
+      <tags>exclude_win7</tags>
     </default>
   </test>
   <test>
@@ -563,7 +529,6 @@
       <files>unicode_regex_surrogate_atoms.js</files>
       <baseline>unicode_regex_surrogate_atoms.baseline</baseline>
       <compile-flags> -ES6Unicode -ES6RegExSticky</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -687,7 +652,7 @@
       <files>unicode_regex_surrogate_utf8.js</files>
       <baseline>unicode_regex_surrogate_utf8.baseline</baseline>
       <compile-flags> -ES6Unicode -ES6RegExSticky</compile-flags>
-      <tags>exclude_ship,Slow</tags>
+      <tags>Slow</tags>
       <timeout>300</timeout>
     </default>
   </test>
@@ -696,7 +661,6 @@
       <files>unicode_blue_533163_utf8.js</files>
       <baseline>unicode_blue_533163_utf8.baseline</baseline>
       <compile-flags> -ES6Unicode</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -1096,7 +1060,7 @@
       <files>utfbug.js</files>
       <baseline />
       <compile-flags>-dump:bytecode</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -1328,7 +1292,7 @@
 <test>
   <default>
     <files>await-futreserved-only-in-modules.js</files>
-    <compile-flags>-ES6Module</compile-flags>
+    <compile-flags>-MuteHostErrorMsg -ES6Module</compile-flags>
     <tags>exclude_dynapogo, exclude_xplat</tags>
   </default>
 </test>
@@ -1349,7 +1313,7 @@
 <test>
     <default>
         <files>module-syntax.js</files>
-        <compile-flags>-ES6Module -args summary -endargs</compile-flags>
+        <compile-flags>-MuteHostErrorMsg -ES6Module -args summary -endargs</compile-flags>
         <tags>exclude_dynapogo,exclude_sanitize_address</tags>
     </default>
 </test>
@@ -1363,7 +1327,7 @@
 <test>
     <default>
         <files>module-functionality.js</files>
-        <compile-flags>-ES6Module -args summary -endargs</compile-flags>
+        <compile-flags>-MuteHostErrorMsg -ES6Module -args summary -endargs</compile-flags>
         <tags>exclude_dynapogo,exclude_sanitize_address</tags>
     </default>
 </test>
@@ -1377,14 +1341,14 @@
 <test>
     <default>
         <files>dynamic-module-import-specifier.js</files>
-        <compile-flags>-AsyncModuleLoad -ES6Module -args summary -endargs</compile-flags>
+        <compile-flags>-MuteHostErrorMsg -ES6Module -args summary -endargs</compile-flags>
         <tags>exclude_sanitize_address</tags>
     </default>
 </test>
 <test>
     <default>
         <files>module-syntax.js</files>
-        <compile-flags>-ES6Module -force:deferparse -args summary -endargs</compile-flags>
+        <compile-flags>-MuteHostErrorMsg -ES6Module -force:deferparse -args summary -endargs</compile-flags>
         <tags>exclude_sanitize_address</tags>
     </default>
 </test>
@@ -1404,6 +1368,21 @@
 </test>
 <test>
     <default>
+        <files>module-bugfixes.js</files>
+        <compile-flags>-ES6Module -args summary -endargs</compile-flags>
+        <tags>exclude_dynapogo,exclude_sanitize_address,bugfix</tags>
+    </default>
+</test>
+<test>
+    <default>
+        <files>bug_OS12095746.js</files>
+        <compile-flags>-MuteHostErrorMsg -IgnoreScriptErrorCode -TraceHostCallback -ES6Module</compile-flags>
+        <tags>exclude_dynapogo,exclude_sanitize_address,bugfix</tags>
+        <baseline>bug_OS12095746.baseline</baseline>
+    </default>
+</test>
+<test>
+    <default>
         <files>test_bug_2645.js</files>
         <compile-flags>-ES6Module</compile-flags>
         <tags>exclude_sanitize_address</tags>
@@ -1445,6 +1424,13 @@
 </test>
 <test>
   <default>
+    <files>bug_issue_3076.js</files>
+    <compile-flags>-force:deferparse</compile-flags>
+    <tags>BugFix,exclude_sanitize_address</tags>
+  </default>
+</test>
+<test>
+  <default>
     <files>typedarray_bugs.js</files>
     <compile-flags>-args summary -endargs</compile-flags>
     <tags>BugFix</tags>
diff --git a/test/es7/atomics_test.js b/test/es7/atomics_test.js
index fc32e78..28bd65f 100644
--- a/test/es7/atomics_test.js
+++ b/test/es7/atomics_test.js
@@ -101,8 +101,12 @@
                         

                         assert.throws(() => atomicFunction.op(view), RangeError, "Calling "+atomicFunction.fullname+" with 1 param only is not valid", atomicFunction.fullname+": function called with too few arguments");

                         assert.throws(() => atomicFunction.op(view, 0), RangeError, "Calling "+atomicFunction.fullname+" with 2 params only is not valid", atomicFunction.fullname+": function called with too few arguments");

-                        [undefined, -1, 1.1, "hi", NaN, {}, Infinity, -Infinity].forEach(function (index) {

-                            assert.throws(() => atomicFunction.op(view, index, 1), RangeError, "Only positive interger allowed, not " + index, "Access index is out of range");

+                        [undefined, 1.1, "hi", NaN, {}].forEach(function (index) {

+                            atomicFunction.op(view, index, 1);

+                        });

+                        

+                        [-1, Infinity, -Infinity].forEach(function (index) {

+                           assert.throws(() => atomicFunction.op(view, index, 1), RangeError, "Only positive interger allowed, not " + index, "Access index is out of range");

                         });

                         

                         assert.throws(() => atomicFunction.op(view, elements, 1), RangeError, "index is out of bound " + elements, "Access index is out of range");

@@ -131,7 +135,11 @@
                     assert.throws(() => Atomics.compareExchange(view), RangeError, "Calling Atomics.compareExchange with 1 param only is not valid", "Atomics.compareExchange: function called with too few arguments");

                     assert.throws(() => Atomics.compareExchange(view, 0), RangeError, "Calling Atomics.compareExchange with 2 params only is not valid", "Atomics.compareExchange: function called with too few arguments");

                     assert.throws(() => Atomics.compareExchange(view, 0, 0), RangeError, "Calling Atomics.compareExchange with 3 params only is not valid", "Atomics.compareExchange: function called with too few arguments");

-                    [undefined, -1, 1.1, "hi", NaN, {}, Infinity, -Infinity].forEach(function (index) {

+                    [undefined, 1.1, "hi", NaN, {}].forEach(function (index) {

+                        Atomics.compareExchange(view, index, 0, 0);

+                    });

+                    

+                    [-1, Infinity, -Infinity].forEach(function (index) {

                         assert.throws(() => Atomics.compareExchange(view, index, 0, 0), RangeError, "Only positive interger allowed not, " + index, "Access index is out of range");

                     });

                     

@@ -150,7 +158,11 @@
                     var view = new item.ctor(sab, offset * item.ctor.BYTES_PER_ELEMENT, length);

                     

                     assert.throws(() => Atomics.load(view), RangeError, "Calling Atomics.load with 1 param only is not valid", "Atomics.load: function called with too few arguments");

-                    [undefined, -1, 1.1, "hi", NaN, {}, Infinity, -Infinity].forEach(function (index) {

+                    [undefined, 1.1, "hi", NaN, {}].forEach(function (index) {

+                        Atomics.load(view, index);

+                    });

+                    

+                    [-1, Infinity, -Infinity].forEach(function (index) {

                         assert.throws(() => Atomics.load(view, index), RangeError, "Only positive interger allowed, not " + index, "Access index is out of range");

                     });

                     

@@ -169,7 +181,11 @@
                 

                 assert.throws(() => Atomics.wait(view), RangeError, "Calling Atomics.wait with 1 param only is not valid", "Atomics.wait: function called with too few arguments");

                 assert.throws(() => Atomics.wait(view, 0), RangeError, "Calling Atomics.wait with 1 param only is not valid", "Atomics.wait: function called with too few arguments");

-                [undefined, -1, 1.1, "hi", NaN, {}, Infinity, -Infinity].forEach(function (index) {

+                [undefined, 1.1, "hi", NaN, {}].forEach(function (index) {

+                    Atomics.wait(view, index, 1);

+                });

+                

+                [-1, Infinity, -Infinity].forEach(function (index) {

                     assert.throws(() => Atomics.wait(view, index, 0), RangeError, "Only positive interger allowed, not " + index, "Access index is out of range");

                 });

                 

@@ -186,7 +202,11 @@
                 var view = new Int32Array(sab, offset * Int32Array.BYTES_PER_ELEMENT, length);

                 

                 assert.throws(() => Atomics.wake(view), RangeError, "Calling Atomics.wake with 1 param only is not valid", "Atomics.wake: function called with too few arguments");

-                [undefined, -1, 1.1, "hi", NaN, {}, Infinity, -Infinity].forEach(function (index) {

+                [undefined, 1.1, "hi", NaN, {}].forEach(function (index) {

+                    Atomics.wake(view, index, 1);

+                });

+                

+                [-1, Infinity, -Infinity].forEach(function (index) {

                     assert.throws(() => Atomics.wake(view, index, 1), RangeError, "Only positive interger allowed, not " + index, "Access index is out of range");

                 });

                 

diff --git a/test/fieldopts/rlexe.xml b/test/fieldopts/rlexe.xml
index 1bfb53b..fae78b3 100644
--- a/test/fieldopts/rlexe.xml
+++ b/test/fieldopts/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
@@ -41,14 +41,12 @@
     <default>
       <files>fieldconstprop_ldmethodfld.js</files>
       <compile-flags>-force:fieldcopyprop</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
     <default>
       <files>fieldcopyprop_assign.js</files>
       <compile-flags>-force:fieldcopyprop</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -56,21 +54,18 @@
       <files>fieldcopyprop_delete.js</files>
       <compile-flags>-force:fieldcopyprop</compile-flags>
       <baseline>fieldcopyprop_delete.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
     <default>
       <files>fieldcopyprop_deletestrict.js</files>
       <compile-flags>-force:fieldcopyprop</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
     <default>
       <files>fieldhoist2.js</files>
       <compile-flags>-force:fieldhoist -force:fieldcopyprop</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -78,7 +73,6 @@
       <files>fieldhoist4.js</files>
       <compile-flags>-force:fieldhoist -force:fieldcopyprop</compile-flags>
       <baseline>fieldhoist4.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -86,7 +80,6 @@
       <files>fieldhoist5.js</files>
       <compile-flags>-force:fieldhoist -force:fieldcopyprop</compile-flags>
       <baseline />
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -94,7 +87,6 @@
       <files>fieldhoist6.js</files>
       <compile-flags>-force:fieldhoist</compile-flags>
       <baseline>fieldhoist6.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -102,7 +94,6 @@
       <files>fieldhoist6b.js</files>
       <compile-flags>-force:fieldhoist</compile-flags>
       <baseline>fieldhoist6b.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -110,7 +101,6 @@
       <files>fieldhoist7.js</files>
       <compile-flags>-force:fieldhoist</compile-flags>
       <baseline>fieldhoist7.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -118,7 +108,6 @@
       <files>fieldhoist8.js</files>
       <compile-flags>-force:fieldhoist</compile-flags>
       <baseline>fieldhoist8.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -126,14 +115,13 @@
       <files>fieldhoist_nullfieldhoist.js</files>
       <compile-flags>-force:fieldhoist</compile-flags>
       <baseline>fieldhoist_nullfieldhoist.baseline</baseline>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
     <default>
       <files>fieldhoist9.js</files>
       <compile-flags>-force:fieldhoist</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -141,7 +129,6 @@
       <files>fieldhoist_unreachable.js</files>
       <compile-flags>-force:fieldhoist</compile-flags>
       <baseline>fieldhoist_unreachable.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -149,7 +136,6 @@
       <files>fieldhoist_typespec.js</files>
       <baseline>fieldhoist_typespec.baseline</baseline>
       <compile-flags>-force:fieldhoist</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -157,7 +143,6 @@
       <files>fieldhoist_typespec.js</files>
       <baseline>fieldhoist_typespec.baseline</baseline>
       <compile-flags>-force:fieldhoist -off:aggressiveIntTypeSpec</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -165,21 +150,20 @@
       <files>fieldhoist_typespec.js</files>
       <baseline>fieldhoist_typespec.baseline</baseline>
       <compile-flags>-force:fieldhoist -off:aggressiveIntTypeSpec -off:inline</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
     <default>
       <files>fieldhoist_typespec2.js</files>
       <compile-flags>-force:fieldHoist -force:jitLoopBody -off:aggressiveIntTypeSpec</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
     <default>
       <files>fieldhoist_typespec3.js</files>
       <baseline>fieldhoist_typespec3.baseline</baseline>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -187,7 +171,6 @@
       <files>fieldhoist_undefined_global.js</files>
       <compile-flags>-force:fieldhoist</compile-flags>
       <baseline>fieldhoist_undefined_global.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -195,7 +178,6 @@
       <files>fieldhoist_negzero.js</files>
       <compile-flags>-force:fieldhoist</compile-flags>
       <baseline>fieldhoist_negzero.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -203,7 +185,7 @@
       <files>fieldhoist_negzero.js</files>
       <compile-flags>-force:fieldhoist -Serialized</compile-flags>
       <baseline>fieldhoist_negzero.baseline</baseline>
-      <tags>exclude_ship,exclude_forceserialized</tags>
+      <tags>exclude_forceserialized</tags>
     </default>
   </test>
   <test>
@@ -211,7 +193,6 @@
       <files>fieldhoist_typeof.js</files>
       <compile-flags>-force:fieldhoist</compile-flags>
       <baseline>fieldhoist_typeof.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -219,7 +200,6 @@
       <files>fieldhoist_sideeffect.js</files>
       <compile-flags>-force:fieldhoist</compile-flags>
       <baseline>fieldhoist_sideeffect.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -227,7 +207,6 @@
       <files>fieldcopyprop_nonwritable.js</files>
       <compile-flags>-force:fieldhoist -force:fieldcopyprop</compile-flags>
       <baseline>fieldcopyprop_nonwritable.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -235,7 +214,6 @@
       <files>fieldcopyprop_primitive.js</files>
       <compile-flags>-force:fieldcopyprop</compile-flags>
       <baseline>fieldcopyprop_primitive.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -243,7 +221,6 @@
       <files>fieldcopyprop_preventextensions.js</files>
       <compile-flags>-force:fieldcopyprop</compile-flags>
       <baseline>fieldcopyprop_preventextensions.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -251,7 +228,6 @@
       <files>fieldcopyprop_freeze.js</files>
       <compile-flags>-force:fieldcopyprop</compile-flags>
       <baseline>fieldcopyprop_freeze.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -265,7 +241,6 @@
       <files>fieldhoist_join.js</files>
       <compile-flags>-force:fieldhoist</compile-flags>
       <baseline>fieldhoist_join.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -273,14 +248,12 @@
       <files>fieldhoist_slots.js</files>
       <compile-flags>-force:fieldhoist</compile-flags>
       <baseline>fieldhoist_slots.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
     <default>
       <files>fieldhoist_slots2.js</files>
       <baseline>fieldhoist_slots2.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -288,7 +261,6 @@
       <files>fieldhoist_objptrcopyprop.js</files>
       <compile-flags>-force:fieldhoist</compile-flags>
       <baseline />
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -296,7 +268,6 @@
       <files>fieldhoist_objptrcopyprop2.js</files>
       <compile-flags>-force:fieldhoist</compile-flags>
       <baseline>fieldhoist_objptrcopyprop2.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -304,7 +275,6 @@
       <files>fieldhoist_kills.js</files>
       <baseline>fieldhoist_kills.baseline</baseline>
       <compile-flags>-force:fieldHoist</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -324,7 +294,6 @@
       <files>CheckThis.js</files>
       <compile-flags>-force:inline -force:checkthis</compile-flags>
       <baseline>CheckThis.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -343,7 +312,6 @@
       <files>fieldcopyprop_typespec.js</files>
       <baseline>fieldcopyprop_typespec.baseline</baseline>
       <compile-flags>-force:fieldcopyprop</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -356,7 +324,6 @@
     <default>
       <files>forcefixdataprops.js</files>
       <compile-flags>-off:simplejit -force:fixdataprops</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -386,7 +353,7 @@
       <files>objtypespec1.js</files>
       <baseline>objtypespec1.baseline</baseline>
       <compile-flags>-maxinterpretcount:1 -off:simpleJit</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -394,7 +361,7 @@
       <files>objtypespec2.js</files>
       <baseline>objtypespec2.baseline</baseline>
       <compile-flags>-maxinterpretcount:1 -off:simpleJit</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -402,7 +369,7 @@
       <files>objtypespec3.js</files>
       <baseline>objtypespec3.baseline</baseline>
       <compile-flags>-maxinterpretcount:1 -off:simpleJit</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -410,7 +377,7 @@
       <files>objtypespec-fieldhoist.js</files>
       <baseline>objtypespec-fieldhoist.baseline</baseline>
       <compile-flags>-maxinterpretcount:1 -off:simpleJit -bgjit- -loopinterpretcount:0 -force:fieldhoist</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -418,7 +385,7 @@
       <files>objtypespec-fieldhoist.2.js</files>
       <baseline>objtypespec-fieldhoist.2.baseline</baseline>
       <compile-flags>-maxinterpretcount:1 -off:simpleJit</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -426,7 +393,7 @@
       <files>objtypespec_proto.js</files>
       <baseline>objtypespec_proto.baseline</baseline>
       <compile-flags>-maxinterpretcount:1 -off:simpleJit</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -434,7 +401,7 @@
       <files>objtypespec-add.js</files>
       <baseline>objtypespec-add.baseline</baseline>
       <compile-flags>-maxinterpretcount:1 -off:simpleJit</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -442,7 +409,7 @@
       <files>objtypespec-add-2.js</files>
       <baseline>objtypespec-add-2.baseline</baseline>
       <compile-flags>-maxinterpretcount:1 -loopInterpretCount:1</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -450,7 +417,7 @@
       <files>objtypespec-add-4.js</files>
       <baseline>objtypespec-add-4.baseline</baseline>
       <compile-flags>-maxinterpretcount:2</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -466,7 +433,7 @@
       <files>objtypespec-newobj.1.js</files>
       <baseline>objtypespec-newobj.1.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:globOpt</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -474,7 +441,7 @@
       <files>objtypespec-newobj.1.js</files>
       <baseline>objtypespec-newobj.1.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:inline</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -482,7 +449,7 @@
       <files>objtypespec-newobj.1.js</files>
       <baseline>objtypespec-newobj.1.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:objTypeSpec</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -490,7 +457,7 @@
       <files>objtypespec-newobj.1.js</files>
       <baseline>objtypespec-newobj.1.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:objTypeSpecNewObj</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -498,7 +465,7 @@
       <files>objtypespec-newobj.1.js</files>
       <baseline>objtypespec-newobj.1.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:objTypeSpecNewObj -off:fixedNewObj</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -506,7 +473,7 @@
       <files>objtypespec-newobj.1.js</files>
       <baseline>objtypespec-newobj.1.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:fixedMethods</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -514,7 +481,7 @@
       <files>objtypespec-newobj.1.js</files>
       <baseline>objtypespec-newobj.1.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:splitNewScObject</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -522,7 +489,7 @@
       <files>objtypespec-newobj.1.js</files>
       <baseline>objtypespec-newobj.1.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:objTypeSpecNewObj -off:splitNewScObject</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -530,7 +497,7 @@
       <files>objtypespec-newobj.1.js</files>
       <baseline>objtypespec-newobj.1.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:objTypeSpecNewObj -off:fixedNewObj -off:splitNewScObject</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -538,7 +505,7 @@
       <files>objtypespec-newobj.2.js</files>
       <baseline>objtypespec-newobj.2.baseline</baseline>
       <compile-flags>-maxinterpretcount:2</compile-flags>
-      <!-- test is timezone-sensitive; remove exclude_jenkins after fix -->
+      <!-- test is timezone-sensitive; remove exclude_jenkins after fix (Microsoft/ChakraCore#319) -->
       <tags>exclude_dynapogo,exclude_jenkins</tags>
     </default>
   </test>
@@ -547,8 +514,8 @@
       <files>objtypespec-newobj.2.js</files>
       <baseline>objtypespec-newobj.2.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:globOpt</compile-flags>
-      <!-- test is timezone-sensitive; remove exclude_jenkins after fix -->
-      <tags>exclude_ship,exclude_dynapogo,exclude_jenkins</tags>
+      <!-- test is timezone-sensitive; remove exclude_jenkins after fix (Microsoft/ChakraCore#319) -->
+      <tags>exclude_dynapogo,exclude_jenkins</tags>
     </default>
   </test>
   <test>
@@ -556,8 +523,8 @@
       <files>objtypespec-newobj.2.js</files>
       <baseline>objtypespec-newobj.2.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:inline</compile-flags>
-      <!-- test is timezone-sensitive; remove exclude_jenkins after fix -->
-      <tags>exclude_ship,exclude_dynapogo,exclude_jenkins</tags>
+      <!-- test is timezone-sensitive; remove exclude_jenkins after fix (Microsoft/ChakraCore#319) -->
+      <tags>exclude_dynapogo,exclude_jenkins</tags>
     </default>
   </test>
   <test>
@@ -565,8 +532,8 @@
       <files>objtypespec-newobj.2.js</files>
       <baseline>objtypespec-newobj.2.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:objTypeSpec</compile-flags>
-      <!-- test is timezone-sensitive; remove exclude_jenkins after fix -->
-      <tags>exclude_ship,exclude_dynapogo,exclude_jenkins</tags>
+      <!-- test is timezone-sensitive; remove exclude_jenkins after fix (Microsoft/ChakraCore#319) -->
+      <tags>exclude_dynapogo,exclude_jenkins</tags>
     </default>
   </test>
   <test>
@@ -574,8 +541,8 @@
       <files>objtypespec-newobj.2.js</files>
       <baseline>objtypespec-newobj.2.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:objTypeSpecNewObj</compile-flags>
-      <!-- test is timezone-sensitive; remove exclude_jenkins after fix -->
-      <tags>exclude_ship,exclude_dynapogo,exclude_jenkins</tags>
+      <!-- test is timezone-sensitive; remove exclude_jenkins after fix (Microsoft/ChakraCore#319) -->
+      <tags>exclude_dynapogo,exclude_jenkins</tags>
     </default>
   </test>
   <test>
@@ -583,8 +550,8 @@
       <files>objtypespec-newobj.2.js</files>
       <baseline>objtypespec-newobj.2.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:objTypeSpecNewObj -off:fixedNewObj</compile-flags>
-      <!-- test is timezone-sensitive; remove exclude_jenkins after fix -->
-      <tags>exclude_ship,exclude_dynapogo,exclude_jenkins</tags>
+      <!-- test is timezone-sensitive; remove exclude_jenkins after fix (Microsoft/ChakraCore#319) -->
+      <tags>exclude_dynapogo,exclude_jenkins</tags>
     </default>
   </test>
   <test>
@@ -592,8 +559,8 @@
       <files>objtypespec-newobj.2.js</files>
       <baseline>objtypespec-newobj.2.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:fixedMethods</compile-flags>
-      <!-- test is timezone-sensitive; remove exclude_jenkins after fix -->
-      <tags>exclude_ship,exclude_dynapogo,exclude_jenkins</tags>
+      <!-- test is timezone-sensitive; remove exclude_jenkins after fix (Microsoft/ChakraCore#319) -->
+      <tags>exclude_dynapogo,exclude_jenkins</tags>
     </default>
   </test>
   <test>
@@ -601,8 +568,8 @@
       <files>objtypespec-newobj.2.js</files>
       <baseline>objtypespec-newobj.2.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:splitNewScObject</compile-flags>
-      <!-- test is timezone-sensitive; remove exclude_jenkins after fix -->
-      <tags>exclude_ship,exclude_dynapogo,exclude_jenkins</tags>
+      <!-- test is timezone-sensitive; remove exclude_jenkins after fix (Microsoft/ChakraCore#319) -->
+      <tags>exclude_dynapogo,exclude_jenkins</tags>
     </default>
   </test>
   <test>
@@ -610,8 +577,8 @@
       <files>objtypespec-newobj.2.js</files>
       <baseline>objtypespec-newobj.2.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:objTypeSpecNewObj -off:splitNewScObject</compile-flags>
-      <!-- test is timezone-sensitive; remove exclude_jenkins after fix -->
-      <tags>exclude_ship,exclude_dynapogo,exclude_jenkins</tags>
+      <!-- test is timezone-sensitive; remove exclude_jenkins after fix (Microsoft/ChakraCore#319) -->
+      <tags>exclude_dynapogo,exclude_jenkins</tags>
     </default>
   </test>
   <test>
@@ -619,8 +586,8 @@
       <files>objtypespec-newobj.2.js</files>
       <baseline>objtypespec-newobj.2.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:objTypeSpecNewObj -off:fixedNewObj -off:splitNewScObject</compile-flags>
-      <!-- test is timezone-sensitive; remove exclude_jenkins after fix -->
-      <tags>exclude_ship,exclude_dynapogo,exclude_jenkins</tags>
+      <!-- test is timezone-sensitive; remove exclude_jenkins after fix (Microsoft/ChakraCore#319) -->
+      <tags>exclude_dynapogo,exclude_jenkins</tags>
     </default>
   </test>
   <test>
@@ -636,7 +603,7 @@
       <files>objtypespec-newobj-invalidation.1.js</files>
       <baseline>objtypespec-newobj-invalidation.1.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:globOpt</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -644,7 +611,7 @@
       <files>objtypespec-newobj-invalidation.1.js</files>
       <baseline>objtypespec-newobj-invalidation.1.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:inline</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -652,7 +619,7 @@
       <files>objtypespec-newobj-invalidation.1.js</files>
       <baseline>objtypespec-newobj-invalidation.1.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:objTypeSpec</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -660,7 +627,7 @@
       <files>objtypespec-newobj-invalidation.1.js</files>
       <baseline>objtypespec-newobj-invalidation.1.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:objTypeSpecNewObj</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -668,7 +635,7 @@
       <files>objtypespec-newobj-invalidation.1.js</files>
       <baseline>objtypespec-newobj-invalidation.1.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:objTypeSpecNewObj -off:fixedNewObj</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -676,7 +643,7 @@
       <files>objtypespec-newobj-invalidation.1.js</files>
       <baseline>objtypespec-newobj-invalidation.1.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:splitNewScObject</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -684,7 +651,7 @@
       <files>objtypespec-newobj-invalidation.1.js</files>
       <baseline>objtypespec-newobj-invalidation.1.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:objTypeSpecNewObj -off:splitNewScObject</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -692,7 +659,7 @@
       <files>objtypespec-newobj-invalidation.1.js</files>
       <baseline>objtypespec-newobj-invalidation.1.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:objTypeSpecNewObj -off:fixedNewObj-off:splitNewScObject</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -708,7 +675,7 @@
       <files>objtypespec-newobj-invalidation.2.js</files>
       <baseline>objtypespec-newobj-invalidation.2.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:globOpt</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -716,7 +683,7 @@
       <files>objtypespec-newobj-invalidation.2.js</files>
       <baseline>objtypespec-newobj-invalidation.2.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:inline</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -724,7 +691,7 @@
       <files>objtypespec-newobj-invalidation.2.js</files>
       <baseline>objtypespec-newobj-invalidation.2.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:objTypeSpec</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -732,7 +699,7 @@
       <files>objtypespec-newobj-invalidation.2.js</files>
       <baseline>objtypespec-newobj-invalidation.2.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:objTypeSpecNewObj</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -740,7 +707,7 @@
       <files>objtypespec-newobj-invalidation.2.js</files>
       <baseline>objtypespec-newobj-invalidation.2.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:objTypeSpecNewObj -off:fixedNewObj</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -748,7 +715,7 @@
       <files>objtypespec-newobj-invalidation.2.js</files>
       <baseline>objtypespec-newobj-invalidation.2.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:splitNewScObject</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -756,7 +723,7 @@
       <files>objtypespec-newobj-invalidation.2.js</files>
       <baseline>objtypespec-newobj-invalidation.2.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:objTypeSpecNewObj -off:splitNewScObject</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -764,14 +731,14 @@
       <files>objtypespec-newobj-invalidation.2.js</files>
       <baseline>objtypespec-newobj-invalidation.2.baseline</baseline>
       <compile-flags>-maxinterpretcount:2 -off:objTypeSpecNewObj -off:fixedNewObj-off:splitNewScObject</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
     <default>
       <files>FieldHoist_MaxInterpret.js</files>
       <compile-flags>-minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
diff --git a/test/inlining/linenumber1.baseline b/test/inlining/linenumber1.baseline
index fed81f3..68aad4c 100644
--- a/test/inlining/linenumber1.baseline
+++ b/test/inlining/linenumber1.baseline
@@ -1 +1,3 @@
-linenumber1.js(5, 5) JavaScript runtime error: 'p0' is undefined

+ReferenceError: 'p0' is not defined

+   at main (linenumber1.js:15:9)

+   at Global code (linenumber1.js:21:1)

diff --git a/test/inlining/linenumber1.js b/test/inlining/linenumber1.js
index 2b19a70..a3905e2 100644
--- a/test/inlining/linenumber1.js
+++ b/test/inlining/linenumber1.js
@@ -3,11 +3,19 @@
 // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.

 //-------------------------------------------------------------------------------------------------------

 

+if (this.WScript && this.WScript.LoadScriptFile) {

+    this.WScript.LoadScriptFile("../UnitTestFramework/TrimStackTracePath.js");

+}

+

 function f() { return 42; }

 function main()

 {

-    var i = 0;

-    return f() - p0;

+    try {

+        var i = 0;

+        return f() - p0;

+    } catch (e) {

+        console.log(TrimStackTracePath(e.stack));

+    }

 }

 

 main();

diff --git a/test/inlining/linenumber2.baseline b/test/inlining/linenumber2.baseline
index 6395bec..241d59d 100644
--- a/test/inlining/linenumber2.baseline
+++ b/test/inlining/linenumber2.baseline
@@ -1 +1,3 @@
-linenumber2.js(88, 10) JavaScript runtime error: 'd' is undefined

+ReferenceError: 'd' is not defined

+   at Anonymous function (linenumber2.js:99:10)

+   at Global code (linenumber2.js:12:2)

diff --git a/test/inlining/linenumber2.js b/test/inlining/linenumber2.js
index f119657..b12ce0e 100644
--- a/test/inlining/linenumber2.js
+++ b/test/inlining/linenumber2.js
@@ -3,6 +3,12 @@
 // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.

 //-------------------------------------------------------------------------------------------------------

 

+if (this.WScript && this.WScript.LoadScriptFile) {

+    this.WScript.LoadScriptFile("../UnitTestFramework/TrimStackTracePath.js");

+}

+

+try {

+

 (function(){

   var obj0 = 1;

   var obj1 = 1;

@@ -47,8 +53,8 @@
           c = (! (((obj0.c &= ary[(3)]) || obj1.c) > ((intary[((((obj0.b++ ) >= 0 ? (obj0.b++ ) : 0)) & 0XF)] >= 2147483647) >> a)));

         }

         var __loopvar3 = 0;

-        LABEL0: 

-        LABEL1: 

+        LABEL0:

+        LABEL1:

         while((209) && __loopvar3 < 3) {

           __loopvar3++;

           continue LABEL0;

@@ -81,7 +87,7 @@
     }

     else {

       var __loopvar2 = 0;

-      LABEL0: 

+      LABEL0:

       do {

         __loopvar2++;

         for(var __loopvar3 = 0; obj0.b < (ary[(7)]) && __loopvar3 < 3; obj0.b++ + __loopvar3++) {

@@ -97,3 +103,7 @@
     }

   }

 })();

+

+} catch (e) {

+    console.log(TrimStackTracePath(e.stack));

+}

diff --git a/test/inlining/linenumber3.baseline b/test/inlining/linenumber3.baseline
index 79643ce..d092009 100644
--- a/test/inlining/linenumber3.baseline
+++ b/test/inlining/linenumber3.baseline
@@ -1 +1,3 @@
-linenumber3.js(14, 8) JavaScript runtime error: 'ary' is undefined

+ReferenceError: 'ary' is not defined

+   at Anonymous function (linenumber3.js:28:6)

+   at Global code (linenumber3.js:12:2)

diff --git a/test/inlining/linenumber3.js b/test/inlining/linenumber3.js
index 3d6bc8c..4c27814 100644
--- a/test/inlining/linenumber3.js
+++ b/test/inlining/linenumber3.js
@@ -3,13 +3,19 @@
 // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.

 //-------------------------------------------------------------------------------------------------------

 

+if (this.WScript && this.WScript.LoadScriptFile) {

+    this.WScript.LoadScriptFile("../UnitTestFramework/TrimStackTracePath.js");

+}

+

+try {

+

 (function(){

   var __loopvar0 = 0;

   do {

     __loopvar0++;

     if(Math.acos(1)) {

       var __loopvar3 = 0;

-      LABEL2: 

+      LABEL2:

       while((1) && __loopvar3 < 3) {

         __loopvar3++;

         obj1.a *=Math.pow((1.1 / (-7.9574794502888E+18 == 0 ? 1 : -7.9574794502888E+18)), 1.1);

@@ -22,3 +28,7 @@
     (ary[(((1 >= 0 ? 1 : 0)) & 0XF)]);

   } while((1) && __loopvar0 < 3)

 })();

+

+} catch (e) {

+    console.log(TrimStackTracePath(e.stack));

+}

diff --git a/test/inlining/polyInliningFixedMethods.baseline b/test/inlining/polyInliningFixedMethods.baseline
index eaf85d8..608a2e2 100644
--- a/test/inlining/polyInliningFixedMethods.baseline
+++ b/test/inlining/polyInliningFixedMethods.baseline
@@ -8,6 +8,6 @@
 f

 f

 TypeError: Unable to get property 'method0' of undefined or null reference

-	at v15 (polyinliningfixedmethods.js:94:7)

-	at func3 (polyinliningfixedmethods.js:99:3)

-	at Global code (polyinliningfixedmethods.js:104:3)

+   at v15 (polyinliningfixedmethods.js:94:7)

+   at func3 (polyinliningfixedmethods.js:99:3)

+   at Global code (polyinliningfixedmethods.js:104:3)

diff --git a/test/inlining/rlexe.xml b/test/inlining/rlexe.xml
index 502998c..96eb0e2 100644
--- a/test/inlining/rlexe.xml
+++ b/test/inlining/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
@@ -10,28 +10,61 @@
   <test>
     <default>
       <files>linenumber1.js</files>
-      <tags>fail</tags>
-      <compile-flags>-force:inline</compile-flags>
-      <tags>exclude_arm</tags>
+      <!-- TODO investigate why -ExtendedErrorStackForTestHost inserts tabs at the beginning of some frames (Microsoft/ChakraCore#3130) -->
+      <compile-flags>-force:inline -ExtendedErrorStackForTestHost-</compile-flags>
       <baseline>linenumber1.baseline</baseline>
+      <tags>exclude_arm</tags>
+    </default>
+  </test>
+  <test>
+    <default>
+      <files>linenumber1.js</files>
+      <!-- Variant of test without -force:inline to ensure output is the same -->
+      <!-- TODO investigate why -ExtendedErrorStackForTestHost inserts tabs at the beginning of some frames (Microsoft/ChakraCore#3130) -->
+      <!-- <compile-flags>-force:inline -ExtendedErrorStackForTestHost-</compile-flags> -->
+      <compile-flags>-ExtendedErrorStackForTestHost-</compile-flags>
+      <baseline>linenumber1.baseline</baseline>
+      <tags>exclude_arm</tags>
     </default>
   </test>
   <test>
     <default>
       <files>linenumber2.js</files>
-      <tags>fail</tags>
-      <compile-flags>-force:inline</compile-flags>
-      <tags>exclude_arm</tags>
+      <!-- TODO investigate why -ExtendedErrorStackForTestHost inserts tabs at the beginning of some frames (Microsoft/ChakraCore#3130) -->
+      <compile-flags>-force:inline -ExtendedErrorStackForTestHost-</compile-flags>
       <baseline>linenumber2.baseline</baseline>
+      <tags>exclude_arm</tags>
+    </default>
+  </test>
+  <test>
+    <default>
+      <files>linenumber2.js</files>
+      <!-- Variant of test without -force:inline to ensure output is the same -->
+      <!-- TODO investigate why -ExtendedErrorStackForTestHost inserts tabs at the beginning of some frames (Microsoft/ChakraCore#3130) -->
+      <!-- <compile-flags>-force:inline -ExtendedErrorStackForTestHost-</compile-flags> -->
+      <compile-flags>-ExtendedErrorStackForTestHost-</compile-flags>
+      <baseline>linenumber2.baseline</baseline>
+      <tags>exclude_arm</tags>
     </default>
   </test>
   <test>
     <default>
       <files>linenumber3.js</files>
-      <tags>fail</tags>
-      <compile-flags>-force:inline</compile-flags>
-      <tags>exclude_arm</tags>
+      <!-- TODO investigate why -ExtendedErrorStackForTestHost inserts tabs at the beginning of some frames (Microsoft/ChakraCore#3130) -->
+      <compile-flags>-force:inline -ExtendedErrorStackForTestHost-</compile-flags>
       <baseline>linenumber3.baseline</baseline>
+      <tags>exclude_arm</tags>
+    </default>
+  </test>
+  <test>
+    <default>
+      <files>linenumber3.js</files>
+      <!-- Variant of test without -force:inline to ensure output is the same -->
+      <!-- TODO investigate why -ExtendedErrorStackForTestHost inserts tabs at the beginning of some frames (Microsoft/ChakraCore#3130) -->
+      <!-- <compile-flags>-force:inline -ExtendedErrorStackForTestHost-</compile-flags> -->
+      <compile-flags>-ExtendedErrorStackForTestHost-</compile-flags>
+      <baseline>linenumber3.baseline</baseline>
+      <tags>exclude_arm</tags>
     </default>
   </test>
   <test>
@@ -39,7 +72,7 @@
       <files>InlineConstructors.js</files>
       <baseline>InlineConstructors.baseline</baseline>
       <compile-flags>-force:inline</compile-flags>
-      <tags>exclude_ship,exclude_arm,Slow</tags>
+      <tags>exclude_arm,Slow</tags>
       <timeout>300</timeout>
     </default>
   </test>
@@ -48,14 +81,13 @@
       <files>InlinedConstructorBailout.js</files>
       <baseline>InlinedConstructorBailout.baseline</baseline>
       <compile-flags>-force:inline</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
     <default>
       <files>inliningWithArguments.js</files>
       <compile-flags>-force:inline</compile-flags>
-      <tags>exclude_ship,exclude_arm</tags>
+      <tags>exclude_arm</tags>
     </default>
   </test>
   <test>
@@ -86,7 +118,7 @@
       <files>linenumber4.js</files>
       <baseline>linenumber4.baseline</baseline>
       <compile-flags>-maxinterpretcount:1 -off:simpleJit -loopinterpretcount:0 -force:inline -bgjit-</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -94,7 +126,7 @@
       <files>Miscellaneous_MaxInterpret.js</files>
       <baseline>Miscellaneous_MaxInterpret.baseline</baseline>
       <compile-flags>-minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit -force:inline</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -107,14 +139,12 @@
       <files>bug515849.js</files>
       <baseline>bug515849.baseline</baseline>
       <compile-flags>-minInterpretCount:1 -maxInterpretCount:1 -msjrc:0 -force:inline</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
     <default>
       <files>inlineBuiltIns.js</files>
       <compile-flags> -maxInterpretCount:1 -msjrc:0 </compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -127,7 +157,7 @@
     <default>
       <files>polyInliningFixedMethods.js</files>
       <baseline>polyInliningFixedMethods.baseline</baseline>
-      <compile-flags>-maxInterpretCount:1 -maxSimpleJitRunCount:1 -extendederrorstackfortesthost</compile-flags>
+      <compile-flags>-maxInterpretCount:1 -maxSimpleJitRunCount:1 -ExtendedErrorStackForTestHost</compile-flags>
     </default>
   </test>
   <test>
@@ -229,7 +259,7 @@
   <test>
     <default>
       <files>stackTrace.js</files>
-      <compile-flags>-extendederrorstackfortesthost</compile-flags>
+      <compile-flags>-ExtendedErrorStackForTestHost</compile-flags>
       <baseline>stackTrace.baseline</baseline>
     </default>
   </test>
diff --git a/test/inlining/stackTrace.baseline b/test/inlining/stackTrace.baseline
index 48650c2..3e3e305 100644
--- a/test/inlining/stackTrace.baseline
+++ b/test/inlining/stackTrace.baseline
@@ -1,5 +1,5 @@
 ReferenceError: 'argMath5' is not defined

-	at func0 (stacktrace.js:31:7)

-	at func4 (stacktrace.js:27:5)

-	at test0 (stacktrace.js:39:3)

-	at Global code (stacktrace.js:43:3)

+   at func0 (stacktrace.js:31:7)

+   at func4 (stacktrace.js:27:5)

+   at test0 (stacktrace.js:39:3)

+   at Global code (stacktrace.js:43:3)

diff --git a/test/loop/rlexe.xml b/test/loop/rlexe.xml
index 7e78257..ff39d74 100644
--- a/test/loop/rlexe.xml
+++ b/test/loop/rlexe.xml
@@ -1,11 +1,10 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
       <files>loop.js</files>
       <compile-flags>-forcejitloopbody</compile-flags>
       <baseline>loop.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -13,7 +12,6 @@
       <files>loop.js</files>
       <compile-flags>-forcejitloopbody -on:interruptprobe</compile-flags>
       <baseline>loop.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -21,7 +19,6 @@
       <files>loopinversion.js</files>
       <compile-flags>-force:deferparse</compile-flags>
       <baseline>loopinversion.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -29,7 +26,6 @@
       <files>loopinversion.js</files>
       <compile-flags>-on:interruptprobe</compile-flags>
       <baseline>loopinversion.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
diff --git a/test/rlexedirs.xml b/test/rlexedirs.xml
index 6bf7501..adea1b8 100644
--- a/test/rlexedirs.xml
+++ b/test/rlexedirs.xml
@@ -7,6 +7,11 @@
 </dir>
 <dir>
   <default>
+    <files>$262</files>
+  </default>
+</dir>
+<dir>
+  <default>
     <files>Array</files>
   </default>
 </dir>
diff --git a/test/runtests.sh b/test/runtests.sh
index 3ac0e4b..02da59e 100755
--- a/test/runtests.sh
+++ b/test/runtests.sh
@@ -8,8 +8,9 @@
 # This script is mainly for CI only. In case you have ChakraCore is compiled for multiple
 # targets, this script may fail to test all of them. Use runtests.py instead.
 
-test_path=`dirname "$0"`
-
+pushd `dirname $0` > /dev/null
+test_path=`pwd -P`
+popd > /dev/null
 build_type=
 binary_path=
 release_build=0
@@ -52,9 +53,8 @@
     fi
 fi
 
-RES=$(pwd)
-CH_ABSOLUTE_PATH="$RES/${test_path}/../out/${binary_path}/ch"
-RES=$(cd $RES/$test_path/native-tests; ./test_native.sh ${CH_ABSOLUTE_PATH} ${binary_path} 2>&1)
+CH_ABSOLUTE_PATH="${test_path}/../out/${binary_path}/ch"
+RES=$(cd $test_path/native-tests; ./test_native.sh ${CH_ABSOLUTE_PATH} ${binary_path} 2>&1)
 if [[ $? != 0 ]]; then
     echo "Error: Native tests failed"
     echo -e "$RES"
diff --git a/test/stackfunc/rlexe.xml b/test/stackfunc/rlexe.xml
index 6347ffc..6930cf9 100644
--- a/test/stackfunc/rlexe.xml
+++ b/test/stackfunc/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
diff --git a/test/strict/rlexe.xml b/test/strict/rlexe.xml
index a257341..4fe0904 100644
--- a/test/strict/rlexe.xml
+++ b/test/strict/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
@@ -17,7 +17,6 @@
       <files>basics_function_in_SM.js</files>
       <baseline>basics_function_in_SM.baseline</baseline>
       <compile-flags>-Force:Deferparse</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -25,7 +24,6 @@
       <files>callerOrArgsNoAccess.js</files>
       <baseline>callerOrArgsNoAccess.baseline</baseline>
       <compile-flags>-Force:Deferparse</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -33,7 +31,7 @@
       <files>stricteval-deferred.js</files>
       <baseline>stricteval-deferred.baseline</baseline>
       <compile-flags>-Force:Deferparse</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -41,7 +39,7 @@
       <files>stricteval2-deferred.js</files>
       <baseline>stricteval2-deferred.baseline</baseline>
       <compile-flags>-Force:Deferparse</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -49,7 +47,7 @@
       <files>stricteval3-deferred.js</files>
       <baseline>stricteval3-deferred.baseline</baseline>
       <compile-flags>-Force:Deferparse</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -57,7 +55,7 @@
       <files>strictargs-deferred.js</files>
       <baseline>strictargs-deferred.baseline</baseline>
       <compile-flags>-Force:Deferparse</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -65,7 +63,7 @@
       <files>strictargs2-deferred.js</files>
       <baseline>strictargs2-deferred.baseline</baseline>
       <compile-flags>-Force:Deferparse</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -73,7 +71,7 @@
       <files>strictargs3-deferred.js</files>
       <baseline>strictargs3-deferred.baseline</baseline>
       <compile-flags>-Force:Deferparse</compile-flags>
-      <tags>exclude_ship,exclude_dynapogo</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -120,7 +118,7 @@
       <files>formal_samename1.js</files>
       <baseline>formal_samename1.baseline</baseline>
       <compile-flags>-Force:Deferparse</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -135,7 +133,7 @@
       <files>formal_samename2.js</files>
       <baseline>formal_samename2.baseline</baseline>
       <compile-flags>-Force:Deferparse</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -157,7 +155,7 @@
       <files>delete.js</files>
       <baseline>delete.baseline</baseline>
       <compile-flags>-Force:Deferparse</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -639,7 +637,7 @@
       <files>strictkwd.js</files>
       <baseline>strictkwd.baseline</baseline>
       <compile-flags>-Force:Deferparse</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -647,7 +645,7 @@
       <files>strictkwd.js</files>
       <baseline>strictkwd.baseline</baseline>
       <compile-flags>-Off:Deferparse</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -655,7 +653,7 @@
       <files>strictkwd-deferred.js</files>
       <baseline>strictkwd-deferred.baseline</baseline>
       <compile-flags>-Force:Deferparse</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
diff --git a/test/switchStatement/rlexe.xml b/test/switchStatement/rlexe.xml
index 2764e19..04795cd 100644
--- a/test/switchStatement/rlexe.xml
+++ b/test/switchStatement/rlexe.xml
@@ -1,80 +1,69 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
       <files>allIIntCases.js</files>
       <baseline>allIIntCases.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
     <default>
       <files>emptyCases.js</files>
       <baseline>emptyCases.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
     <default>
       <files>moreSwitches1.js</files>
       <baseline>moreSwitches1.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
     <default>
       <files>moreSwitches2.js</files>
       <baseline>moreSwitches2.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
     <default>
       <files>switchMathExp.js</files>
       <baseline>switchMathExp.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
     <default>
       <files>allStringCases.js</files>
       <baseline>allStringCases.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
     <default>
       <files>stringAndNonStrings.js</files>
       <baseline>stringAndNonStrings.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
     <default>
       <files>repeatIntCases.js</files>
       <baseline>repeatIntCases.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
     <default>
       <files>emptyStringCases.js</files>
       <baseline>emptyStringCases.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
     <default>
       <files>repeatStringCases.js</files>
       <baseline>repeatStringCases.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
     <default>
       <files>loopAndRetarget.js</files>
       <baseline>loopAndRetarget.baseline</baseline>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -82,7 +71,6 @@
       <files>implicitCallSwitchExpr.js</files>
       <baseline>implicitCallSwitchExpr.baseline</baseline>
       <compile-flags>-maxinterpretcount:1 -off:simpleJit -bgjit- -loopinterpretcount:0</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
@@ -90,17 +78,16 @@
       <files>simpleSwitch.js</files>
       <baseline>simpleSwitch.baseline</baseline>
       <compile-flags>-maxinterpretcount:1 -off:simpleJit</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <!--
-Disabled -testtrace cases to eliminate maintenance headache
+Disabled -testtrace cases to eliminate maintenance headache (Microsoft/ChakraCore#3037)
 <test>
    <default>
       <files>moreSwitches1_1.js</files>
       <baseline>moreSwitches1_1.baseline</baseline>
       <compile-flags>-testtrace:bailout -testtrace:rejit</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
    </default>
    <condition order="1" type="include">
           <target>arm</target>
@@ -115,7 +102,7 @@
       <files>nonIntCases.js</files>
       <baseline>nonIntCases.baseline</baseline>
       <compile-flags>-testtrace:bailout -testtrace:rejit</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
    </default>
    <condition order="1" type="include">
           <target>arm</target>
@@ -130,7 +117,7 @@
       <files>stringBailOut.js</files>
       <baseline>stringBailOut.baseline</baseline>
       <compile-flags>-testtrace:bailout -testtrace:rejit</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
    </default>
 </test>
 
@@ -139,7 +126,7 @@
       <files>intBailOut.js</files>
       <baseline>intBailOut.baseline</baseline>
       <compile-flags>-testtrace:bailout -testtrace:rejit</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
    </default>
    <condition order="1" type="include">
       <target>arm</target>
@@ -159,7 +146,7 @@
     <default>
       <files>BugFixRegression_MaxInterpret.js</files>
       <compile-flags>-minInterpretCount:1 -maxInterpretCount:1 -off:simpleJit</compile-flags>
-      <tags>exclude_dynapogo,exclude_ship</tags>
+      <tags>exclude_dynapogo</tags>
     </default>
   </test>
   <test>
@@ -167,7 +154,6 @@
       <files>amd64JScriptNumberRegression.js</files>
       <baseline>amd64JScriptNumberRegression.baseline</baseline>
       <compile-flags>-maxInterpretCount:1 -off:simpleJit -off:aggressiveinttypespec</compile-flags>
-      <tags>exclude_ship</tags>
     </default>
   </test>
   <test>
diff --git a/test/typedarray/floathelperaccess.js b/test/typedarray/FloatHelperAccess.js
similarity index 100%
rename from test/typedarray/floathelperaccess.js
rename to test/typedarray/FloatHelperAccess.js
diff --git a/test/typedarray/rlexe.xml b/test/typedarray/rlexe.xml
index 7f7010f..1e3d9b5 100644
--- a/test/typedarray/rlexe.xml
+++ b/test/typedarray/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
@@ -139,7 +139,7 @@
     </default>
   </test>
   <!--
-Below test fails with difference in space. Investigate the cause and re-enable them
+Below test fails with difference in space. Investigate the cause and re-enable them (Microsoft/ChakraCore#3038)
 <test>
     <default>
         <files>crossthread.js</files>
@@ -198,7 +198,7 @@
   </test>
   <test>
     <default>
-      <files>FloatHelperAccess.js</files>
+      <files>floathelperaccess.js</files>
       <tags>typedarray</tags>
     </default>
   </test>
@@ -219,14 +219,14 @@
   <test>
     <default>
       <files>allocation.js</files>
-      <tags>typedarray,exclude_arm,xplatslow</tags>
+      <tags>typedarray,exclude_arm,xplatslow,Slow</tags>
       <timeout>300</timeout>
     </default>
   </test>
   <test>
     <default>
       <files>allocation2.js</files>
-      <tags>typedarray,exclude_arm,xplatslow</tags>
+      <tags>typedarray,exclude_arm,xplatslow,Slow</tags>
       <timeout>300</timeout>
     </default>
   </test>
diff --git a/test/utf8/rlexe.xml b/test/utf8/rlexe.xml
index e79fd8a..401f68a 100644
--- a/test/utf8/rlexe.xml
+++ b/test/utf8/rlexe.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <regress-exe>
   <test>
     <default>
diff --git a/test/wasm/api.js b/test/wasm/api.js
index 929d31f..939dbbc 100644
--- a/test/wasm/api.js
+++ b/test/wasm/api.js
@@ -180,7 +180,6 @@
   console.log("\nWebAssembly.Module.customSections tests");

   await testInvalidCases([

     ...(invalidModules.map(b => () => WebAssembly.Module.customSections(b))),

-    () => WebAssembly.Module.customSections(baseModule),

     () => WebAssembly.Module.customSections(baseModule, {toString() {throw new Error("Doesn't support toString");}}),

     () => WebAssembly.Module.customSections(baseModule, Symbol()),

   ]);

diff --git a/test/wasm/baselines/api.baseline b/test/wasm/baselines/api.baseline
index afa5e85..f1aae0a 100644
--- a/test/wasm/baselines/api.baseline
+++ b/test/wasm/baselines/api.baseline
@@ -22,8 +22,8 @@
 Test 4 passed. Expected Error: TypeError: BufferSource expected

 Test 5 passed. Expected Error: TypeError: BufferSource expected

 Test 6 passed. Expected Error: TypeError: BufferSource expected

-Test 7 passed. Expected Error: WebAssemblyCompileError: Out of file: Needed: 4, Left: 0

-Test 8 passed. Expected Error: WebAssemblyCompileError: Out of file: Needed: 1, Left: 0

+Test 7 passed. Expected Error: CompileError: Out of file: Needed: 4, Left: 0

+Test 8 passed. Expected Error: CompileError: Out of file: Needed: 1, Left: 0

 Test 9 passed. Expected Error: TypeError: BufferSource expected

 Testing module

 exports

@@ -39,8 +39,8 @@
 Test 4 passed. Expected Error: TypeError: BufferSource expected

 Test 5 passed. Expected Error: TypeError: BufferSource expected

 Test 6 passed. Expected Error: TypeError: BufferSource expected

-Test 7 passed. Expected Error: WebAssemblyCompileError: Out of file: Needed: 4, Left: 0

-Test 8 passed. Expected Error: WebAssemblyCompileError: Out of file: Needed: 1, Left: 0

+Test 7 passed. Expected Error: CompileError: Out of file: Needed: 4, Left: 0

+Test 8 passed. Expected Error: CompileError: Out of file: Needed: 1, Left: 0

 Test 9 passed. Expected Error: TypeError: BufferSource expected

 Test 10 passed. Expected Error: TypeError: Object expected

 Test 11 passed. Expected Error: TypeError: Object expected

@@ -87,8 +87,8 @@
 Test 6 passed. Expected Error: TypeError: BufferSource expected

 Test 7 passed. Expected Error: TypeError: BufferSource expected

 Test 8 passed. Expected Error: TypeError: BufferSource expected

-Test 9 passed. Expected Error: WebAssemblyCompileError: Out of file: Needed: 4, Left: 0

-Test 10 passed. Expected Error: WebAssemblyCompileError: Out of file: Needed: 1, Left: 0

+Test 9 passed. Expected Error: CompileError: Out of file: Needed: 4, Left: 0

+Test 10 passed. Expected Error: CompileError: Out of file: Needed: 1, Left: 0

 Test 11 passed. Expected Error: TypeError: BufferSource expected

 Testing module

 exports

@@ -115,9 +115,8 @@
 Test 1 passed. Expected Error: TypeError: WebAssembly.Module expected

 Test 2 passed. Expected Error: TypeError: WebAssembly.Module expected

 Test 3 passed. Expected Error: TypeError: WebAssembly.Module expected

-Test 4 passed. Expected Error: TypeError: 'sectionName' is not a string

-Test 5 passed. Expected Error: Error: Doesn't support toString

-Test 6 passed. Expected Error: TypeError: Object doesn't support property or method 'ToString'

+Test 4 passed. Expected Error: Error: Doesn't support toString

+Test 5 passed. Expected Error: TypeError: Object doesn't support property or method 'ToString'

 6/6 tests passed

 

 new WebAssembly.Instance tests

@@ -128,14 +127,14 @@
 Test 4 passed. Expected Error: TypeError: Object expected

 Test 5 passed. Expected Error: TypeError: Unable to get property 'fn' of undefined or null reference

 Test 6 passed. Expected Error: TypeError: Unable to get property 'fn' of undefined or null reference

-Test 7 passed. Expected Error: WebAssemblyLinkError: Function expected

-Test 8 passed. Expected Error: WebAssemblyLinkError: Function called with invalid signature

-Test 9 passed. Expected Error: WebAssemblyLinkError: WebAssembly.Memory object expected

-Test 10 passed. Expected Error: WebAssemblyLinkError: WebAssembly.Memory object expected

-Test 11 passed. Expected Error: WebAssemblyLinkError: WebAssembly.Memory object expected

-Test 12 passed. Expected Error: WebAssemblyLinkError: WebAssembly.Table object expected

-Test 13 passed. Expected Error: WebAssemblyLinkError: WebAssembly.Table object expected

-Test 14 passed. Expected Error: WebAssemblyLinkError: WebAssembly.Table object expected

+Test 7 passed. Expected Error: LinkError: Function expected

+Test 8 passed. Expected Error: LinkError: Cannot link import test.fn.Thunk[0]()->i32 to fn2()->f32 in link table due to a signature mismatch

+Test 9 passed. Expected Error: LinkError: WebAssembly.Memory object expected

+Test 10 passed. Expected Error: LinkError: WebAssembly.Memory object expected

+Test 11 passed. Expected Error: LinkError: WebAssembly.Memory object expected

+Test 12 passed. Expected Error: LinkError: WebAssembly.Table object expected

+Test 13 passed. Expected Error: LinkError: WebAssembly.Table object expected

+Test 14 passed. Expected Error: LinkError: WebAssembly.Table object expected

 Testing instance

 f1: 5

 fn: 1

@@ -206,12 +205,12 @@
 Test 5 passed. Expected Error: TypeError: WebAssembly exported function expected

 Test 6 passed. Expected Error: TypeError: WebAssembly exported function expected

 Test 7 passed. Expected Error: TypeError: WebAssembly exported function expected

-Test 8 passed. Expected Error: WebAssemblyRuntimeError: WebAssembly exported function expected

-Test 9 passed. Expected Error: WebAssemblyRuntimeError: WebAssembly exported function expected

-Test 10 passed. Expected Error: WebAssemblyRuntimeError: WebAssembly exported function expected

-Test 11 passed. Expected Error: WebAssemblyRuntimeError: Table index is out of range

-Test 12 passed. Expected Error: WebAssemblyRuntimeError: Function called with invalid signature

-Test 13 passed. Expected Error: WebAssemblyRuntimeError: Function called with invalid signature

+Test 8 passed. Expected Error: RuntimeError: WebAssembly exported function expected

+Test 9 passed. Expected Error: RuntimeError: WebAssembly exported function expected

+Test 10 passed. Expected Error: RuntimeError: WebAssembly exported function expected

+Test 11 passed. Expected Error: RuntimeError: Table index is out of range

+Test 12 passed. Expected Error: RuntimeError: Function called with invalid signature

+Test 13 passed. Expected Error: RuntimeError: Function called with invalid signature

 Current length: 30

 Length after attempt to modify : 30

 Is element in table the same as the one exported: true

diff --git a/test/wasm/limits.js b/test/wasm/limits.js
new file mode 100644
index 0000000..67d08e3
--- /dev/null
+++ b/test/wasm/limits.js
@@ -0,0 +1,298 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+// Limits taken from WasmLimits.h
+const MaxTypes = 1000000;
+const MaxFunctions = 1000000;
+const MaxImports = 100000;
+const MaxExports = 100000;
+const MaxGlobals = 1000000;
+const MaxDataSegments = 100000;
+const MaxElementSegments = 10000000;
+const MaxTableSize = 10000000;
+
+const MaxStringSize = 100000;
+const MaxFunctionLocals = 50000;
+const MaxFunctionParams = 1000;
+const MaxBrTableElems = 1000000;
+
+const MaxMemoryInitialPages = 16384;
+const MaxMemoryMaximumPages = 65536;
+const MaxModuleSize = 1024 * 1024 * 1024;
+const MaxFunctionSize = 128 * 1024;
+
+/* global assert,testRunner */ // eslint rule
+WScript.LoadScriptFile("../UnitTestFrameWork/UnitTestFrameWork.js");
+WScript.LoadScriptFile("../wasmspec/testsuite/harness/wasm-constants.js");
+WScript.LoadScriptFile("../wasmspec/testsuite/harness/wasm-module-builder.js");
+WScript.Flag("-off:wasmdeferred");
+
+function compile(moduleStr) {
+  const buf = WebAssembly.wabt.convertWast2Wasm(moduleStr);
+  return new WebAssembly.Module(buf);
+}
+
+const notTooLongName = "a".repeat(MaxStringSize);
+const tooLongName = "a".repeat(MaxStringSize + 1);
+
+function makeLimitTests(opt) {
+  return [{
+    name: "valid: " + opt.name,
+    validTest: true,
+    body() {
+      const builder = new WasmModuleBuilder();
+      opt.makeModule(builder, opt.limit);
+      assert.doesNotThrow(() => new WebAssembly.Module(builder.toBuffer()), `WebAssembly should allow up to ${opt.limit} ${opt.type}`);
+    }
+  }, {
+    name: "invalid: " + opt.name,
+    invalidTest: true,
+    body() {
+      const builder = new WasmModuleBuilder();
+      opt.makeModule(builder, opt.limit + 1);
+      assert.throws(() => new WebAssembly.Module(builder.toBuffer()), WebAssembly.CompileError, `WebAssembly should not allow ${opt.limit + 1} ${opt.type}`, opt.errorMsg);
+    }
+  }];
+}
+
+const tests = [
+  // Tests 0,1
+  ...makeLimitTests({
+    name: "test max types",
+    limit: MaxTypes,
+    type: "types",
+    errorMsg: "Too many signatures",
+    makeModule: (builder, limit) => {for (let i = 0; i < limit; ++i) {builder.addType(kSig_v_v);}}
+  }),
+  // Tests 2,3
+  ...makeLimitTests({
+    name: "test max functions",
+    limit: MaxFunctions,
+    type: "functions",
+    errorMsg: "Too many functions",
+    makeModule: (builder, limit) => {
+      const typeIndex = builder.addType(kSig_v_v);
+      for (let i = 0; i < limit; ++i) {builder.addFunction(null, typeIndex).end();}
+    }
+  }),
+  // Tests 4,5
+  ...makeLimitTests({
+    name: "test max imports",
+    limit: MaxImports,
+    type: "imports",
+    errorMsg: "Too many imports",
+    makeModule: (builder, limit) => {
+      const typeIndex = builder.addType(kSig_v_v);
+      for (let i = 0; i < limit; ++i) {builder.addImport("", "", typeIndex);}
+    }
+  }),
+  // Tests 6,7
+  ...makeLimitTests({
+    name: "test max exports",
+    limit: MaxExports,
+    type: "exports",
+    errorMsg: "Too many exports",
+    makeModule: (builder, limit) => {
+      builder.addFunction(null, kSig_v_v).end();
+      for (let i = 0; i < limit; ++i) {builder.addExport("" + i, 0);}
+    }
+  }),
+  // Tests 8,9
+  ...makeLimitTests({
+    name: "test max globals",
+    limit: MaxGlobals,
+    type: "globals",
+    errorMsg: "Too many globals",
+    makeModule: (builder, limit) => {for (let i = 0; i < limit; ++i) {builder.addGlobal(kWasmI32, /* mutable */ false);}}
+  }),
+  // Tests 10,11
+  ...makeLimitTests({
+    name: "test max data segments",
+    limit: MaxDataSegments,
+    type: "data segments",
+    errorMsg: "Too many data segments",
+    makeModule: (builder, limit) => {
+      builder.addMemory(0);
+      for (let i = 0; i < limit; ++i) {builder.addDataSegment(0, "");}
+    }
+  }),
+  // Tests 12,13
+  ...makeLimitTests({
+    name: "test max element segments",
+    limit: MaxElementSegments,
+    type: "element segments",
+    errorMsg: "Too many element segments",
+    makeModule: (builder, limit) => {
+      builder.addFunction(null, kSig_v_v).end();
+      builder.setFunctionTableLength(1);
+      builder.function_table_inits.length = limit;
+      builder.function_table_inits.fill({base: 0, is_global: false, array: [0]})
+    }
+  }),
+  // Test 14
+  {
+    name: "test max table size",
+    body() {
+      assert.doesNotThrow(() => new WebAssembly.Table({element: "anyfunc", initial: MaxTableSize}));
+      assert.doesNotThrow(() => new WebAssembly.Table({element: "anyfunc", initial: MaxTableSize, maximum: MaxTableSize}));
+      assert.doesNotThrow(() => new WebAssembly.Table({element: "anyfunc", maximum: MaxTableSize}));
+      assert.throws(() => new WebAssembly.Table({element: "anyfunc", initial: MaxTableSize + 1}));
+      assert.throws(() => new WebAssembly.Table({element: "anyfunc", initial: MaxTableSize + 1, maximum: MaxTableSize + 1}));
+      assert.throws(() => new WebAssembly.Table({element: "anyfunc", maximum: MaxTableSize + 1}));
+
+      assert.doesNotThrow(() => compile(`(module (table ${MaxTableSize} anyfunc))`));
+      assert.doesNotThrow(() => compile(`(module (table ${MaxTableSize} ${MaxTableSize} anyfunc))`));
+      assert.doesNotThrow(() => compile(`(module (table 0 ${MaxTableSize} anyfunc))`));
+      assert.throws(() => compile(`(module (table ${MaxTableSize + 1} anyfunc))`), WebAssembly.CompileError, "table too big");
+      assert.throws(() => compile(`(module (table ${MaxTableSize + 1} ${MaxTableSize + 1} anyfunc))`), WebAssembly.CompileError, "table too big");
+      assert.throws(() => compile(`(module (table 0 ${MaxTableSize + 1} anyfunc))`), WebAssembly.CompileError, "table too big");
+    }
+  },
+  // Test 15
+  {
+    name: "test custom sections with long names",
+    body() {
+      function makeCustomSection(name) {
+        const customSection = new Binary();
+        customSection.emit_section(0, section => {
+          section.emit_string(name)
+          section.emit_string("payload")
+        });
+        const builder = new WasmModuleBuilder();
+        builder.addExplicitSection(customSection);
+        return new WebAssembly.Module(builder.toBuffer());
+      }
+      assert.doesNotThrow(() => makeCustomSection(notTooLongName));
+      assert.throws(() => makeCustomSection(tooLongName), WebAssembly.CompileError, "Name too long");
+    }
+  },
+  // Test 16
+  {
+    name: "test exports with long names",
+    body() {
+      function makeExportName(name)
+      {
+        const builder = new WasmModuleBuilder();
+        builder
+          .addFunction(name, kSig_v_v)
+          .exportFunc()
+          .end();
+        return new WebAssembly.Module(builder.toBuffer());
+      }
+      assert.doesNotThrow(() => makeExportName(notTooLongName));
+      assert.throws(() => makeExportName(tooLongName), WebAssembly.CompileError, "Name too long");
+    }
+  },
+  // Test 17
+  {
+    name: "test imports with long names",
+    body() {
+      function makeImportName(name)
+      {
+        const builder = new WasmModuleBuilder();
+        builder.addImport(name, 'b', kSig_v_v);
+        return new WebAssembly.Module(builder.toBuffer());
+      }
+      assert.doesNotThrow(() => makeImportName(notTooLongName));
+      assert.throws(() => makeImportName(tooLongName), WebAssembly.CompileError, "Name too long");
+    }
+  },
+  // Test 18
+  {
+    name: "test Name section with long names",
+    body() {
+      function makeName(name)
+      {
+        const builder = new WasmModuleBuilder();
+        builder
+          .addFunction(notTooLongName, kSig_v_v)
+          .end();
+        return new WebAssembly.Module(builder.toBuffer());
+      }
+      assert.doesNotThrow(() => makeName(notTooLongName));
+      // todo:: enable test once we start using the Name section
+      // assert.throws(() => makeName(tooLongName), WebAssembly.CompileError, "Name too long");
+    }
+  },
+  // Tests 19,20
+  ...makeLimitTests({
+    name: "test max function locals",
+    limit: MaxFunctionLocals,
+    type: "locals",
+    makeModule: (builder, limit) => {
+      builder.addFunction(null, kSig_v_v).addLocals({i32_count: limit}).end();
+    }
+  }),
+  // Tests 21,22
+  ...makeLimitTests({
+    name: "test max function params",
+    limit: MaxFunctionParams,
+    type: "params",
+    errorMsg: "Too many arguments in signature",
+    makeModule: (builder, limit) => {
+      builder.addFunction(null, {params: (new Array(limit)).fill(kWasmI32), results: []}).end();
+    }
+  }),
+  // Tests 23
+  {
+    name: "test max memory pages",
+    body() {
+      assert.doesNotThrow(() => new WebAssembly.Memory({initial: MaxMemoryInitialPages}));
+      assert.doesNotThrow(() => new WebAssembly.Memory({initial: MaxMemoryInitialPages, maximum: MaxMemoryMaximumPages}));
+      assert.doesNotThrow(() => new WebAssembly.Memory({maximum: MaxMemoryMaximumPages}));
+      assert.throws(() => new WebAssembly.Memory({initial: MaxMemoryInitialPages + 1}));
+      assert.throws(() => new WebAssembly.Memory({initial: MaxMemoryInitialPages + 1, maximum: MaxMemoryMaximumPages + 1}));
+      assert.throws(() => new WebAssembly.Memory({maximum: MaxMemoryMaximumPages + 1}));
+
+      assert.doesNotThrow(() => compile(`(module (memory ${MaxMemoryInitialPages}))`));
+      assert.doesNotThrow(() => compile(`(module (memory ${MaxMemoryInitialPages} ${MaxMemoryMaximumPages}))`));
+      assert.doesNotThrow(() => compile(`(module (memory 0 ${MaxMemoryMaximumPages}))`));
+      assert.throws(() => compile(`(module (memory ${MaxMemoryInitialPages + 1}))`), WebAssembly.CompileError, "Minimum memory size too big");
+      assert.throws(() => compile(`(module (memory ${MaxMemoryInitialPages + 1} ${MaxMemoryMaximumPages + 1}))`), WebAssembly.CompileError, "Minimum memory size too big");
+      assert.throws(() => compile(`(module (memory 0 ${MaxMemoryMaximumPages + 1}))`), WebAssembly.CompileError, "Maximum memory size too big");
+    }
+  },
+  // Tests 24
+  {
+    name: "test max module size",
+    body() {
+      assert.throws(() => new WebAssembly.Module(new ArrayBuffer(MaxModuleSize)), WebAssembly.CompileError, "Malformed WASM module header");
+      assert.throws(() => new WebAssembly.Module(new ArrayBuffer(MaxModuleSize + 1)), WebAssembly.CompileError, "Module too big");
+    }
+  },
+  // Tests 25,26
+  ...makeLimitTests({
+    name: "test max function size",
+    limit: MaxFunctionSize,
+    type: "size",
+    errorMsg: "Function body too big",
+    makeModule: (builder, limit) => {
+      // limit -1 (number of locals byte) -1 (endOpCode)
+      builder.addFunction(null, kSig_v_v).addBody((new Array(limit - 2)).fill(kExprNop)).end();
+    }
+  }),
+  // todo:: test MaxBrTableElems
+];
+
+WScript.LoadScriptFile("../UnitTestFrameWork/yargs.js");
+const argv = yargsParse(WScript.Arguments, {
+  boolean: ["valid", "invalid", "verbose"],
+  number: ["start", "end"],
+  default: {
+    verbose: true,
+    valid: true,
+    invalid: true,
+    start: 0,
+    end: tests.length
+  }
+}).argv;
+
+const todoTests = tests
+  .slice(argv.start, argv.end)
+  .filter(test => (!test.slow || argv.slow) &&
+                  (!test.invalidTest || argv.invalid) &&
+                  (!test.validTest || argv.valid));
+
+testRunner.run(todoTests, {verbose: argv.verbose});
diff --git a/test/wasm/memory.js b/test/wasm/memory.js
new file mode 100644
index 0000000..bca0bde
--- /dev/null
+++ b/test/wasm/memory.js
@@ -0,0 +1,158 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft Corporation and contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+const cliArgs = WScript.Arguments || [];
+
+if (cliArgs.indexOf("--help") !== -1) {
+  print("usage: ch memory.js -args [-verbose] -endargs");
+  WScript.quit(0);
+}
+
+// Parse arguments
+let verbose = 0;
+while (true) {
+  const iVerbose = cliArgs.indexOf("-verbose");
+  if (iVerbose === -1) {
+    break;
+  }
+  cliArgs.splice(iVerbose, 1);
+  ++verbose;
+}
+
+function testTransfer(buffer) {
+  if (ArrayBuffer.transfer) {
+    try {
+      ArrayBuffer.transfer(buffer);
+      print("Failed. Expected an error when trying to transfer ");
+    } catch (e) {
+      if (verbose > 1) {
+        print(`Passed. Expected error: ${e.message}`);
+      }
+    }
+  } else {
+    print("ArrayBuffer.tranfer is missing");
+  }
+}
+
+
+
+function test({init, max, checkOOM} = {}) {
+  if (verbose) {
+    print(`Testing memory {init: ${init|0}, max: ${max}}`);
+  }
+  const moduleTxt = `
+  (module
+    (memory (export "mem") ${init|0} ${max !== undefined ? max|0 : ""})
+    (func (export "grow") (param i32) (result i32) (grow_memory (get_local 0)))
+    (func (export "current") (result i32) (current_memory))
+    (func (export "load") (param i32) (result i32) (i32.load (get_local 0)))
+    (func (export "store") (param i32 i32) (i32.store (get_local 0) (get_local 1)))
+  )`;
+  if (verbose > 1) {
+    print(moduleTxt);
+  }
+  const module = new WebAssembly.Module(WebAssembly.wabt.convertWast2Wasm(moduleTxt));
+  let instance;
+  try {
+    instance = new WebAssembly.Instance(module);
+  } catch (e) {
+    if (!checkOOM || !e.message.includes("Failed to create WebAssembly.Memory")) {
+      print(`FAILED. failed to instanciate module with error: ${e}`);
+    } else if (verbose) {
+      print(e.message);
+    }
+    return;
+  }
+  const {exports: {grow, current, load, store, mem}} = instance;
+  function testReadWrite(index, value, currentSize) {
+    const shouldTrap = index < 0 || (index + 4) > currentSize;
+    const commonMsg = op => `trap on ${op}(${index}, ${value})`;
+    try {
+      store(index, value);
+      if (shouldTrap) {
+        print(`Failed. Expected ${commonMsg("store")}`);
+        return;
+      }
+    } catch (e) {
+      if (shouldTrap) {
+        if (verbose) {
+          print(`Passed. Expected ${commonMsg("store")}`);
+        }
+      } else {
+        print(`Failed. Unexpected ${commonMsg("store")}`);
+      }
+    }
+
+    try {
+      const loadedValue = load(index);
+      if (shouldTrap) {
+        print(`Failed. Expected ${commonMsg("load")}`);
+        return;
+      }
+      if ((loadedValue|0) !== (value|0)) {
+        print(`Failed. Expected value ${value|0} after load. Got ${loadedValue|0}`);
+      }
+    } catch (e) {
+      if (shouldTrap) {
+        if (verbose) {
+          print(`Passed. Expected ${commonMsg("load")}`);
+        }
+      } else {
+        print(`Failed. Unexpected ${commonMsg("load")}`);
+      }
+    }
+  }
+  function run(delta) {
+    testTransfer(mem.buffer);
+    const beforePages = current();
+    const growRes = grow(delta);
+    if (growRes !== -1 && growRes !== beforePages) {
+      print(`FAILED. Expected grow(${delta}) to return ${beforePages}`);
+    }
+    const afterPages = current();
+    if (growRes !== -1 && beforePages + delta !== afterPages) {
+      print(`FAILED. Expected to have ${beforePages + delta} pages. Got ${afterPages} pages`);
+    }
+    if (verbose) {
+      print(`current: ${beforePages}, grow(${delta}): ${growRes}, after: ${afterPages}`);
+    }
+    const currentSize = afterPages * 0x10000;
+    testReadWrite(-4, -4, currentSize);
+    testReadWrite(-3, -3, currentSize);
+    testReadWrite(-2, -2, currentSize);
+    testReadWrite(-1, -1, currentSize);
+    testReadWrite(0, 6, currentSize);
+    testTransfer(mem.buffer);
+    testReadWrite(1, 7, currentSize);
+    testTransfer(mem.buffer);
+    testReadWrite(1, 7, currentSize);
+    testReadWrite(currentSize - 4, 457, currentSize);
+    testReadWrite(currentSize - 3, -98745, currentSize);
+    testReadWrite(currentSize - 2, 786452, currentSize);
+    testReadWrite(currentSize - 1, -1324, currentSize);
+    testReadWrite(currentSize, 123, currentSize);
+    testTransfer(mem.buffer);
+  }
+  run(0);
+  run(3);
+  run(5);
+  run(1 << 13);
+}
+
+test({init: 0});
+test({init: 0, max: 5});
+test({init: 0, max: 10});
+test({init: 5});
+test({init: 5, max: 10});
+test({init: 1 << 14, checkOOM: true});
+try {
+  test({init: 1 << 15});
+  print("Failed. Expected an error when allocating WebAssembly.Memory too big");
+} catch (e) {
+  if (verbose) {
+    print(`Passed. Expected error: ${e.message}`);
+  }
+}
+print("PASSED");
diff --git a/test/wasm/nestedblocks.js b/test/wasm/nestedblocks.js
index 3c2c5f4..4229185 100644
--- a/test/wasm/nestedblocks.js
+++ b/test/wasm/nestedblocks.js
@@ -8,7 +8,7 @@
   // print(`Test(${nNestedBlocks})`)
   let nestedBlocks = "";
   for (let i = 0; i < nNestedBlocks; ++i) {
-    nestedBlocks += "(block i32 ";
+    nestedBlocks += "(block (result i32) ";
   }
   nestedBlocks += "(i32.const 5)";
   for (let i = 0; i < nNestedBlocks; ++i) {
diff --git a/test/wasm/rlexe.xml b/test/wasm/rlexe.xml
index 6f5cb66..8cfa068 100644
--- a/test/wasm/rlexe.xml
+++ b/test/wasm/rlexe.xml
@@ -89,6 +89,14 @@
     <files>basic.js</files>
     <baseline>basic.baseline</baseline>
     <compile-flags>-wasm</compile-flags>
+    <tags>exclude_xplat</tags>
+  </default>
+</test>
+<test>
+  <default>
+    <files>basic.js</files>
+    <baseline>basic.baseline</baseline>
+    <compile-flags>-ForceStaticInterpreterThunk -wasm</compile-flags>
   </default>
 </test>
 <test>
@@ -218,7 +226,7 @@
   <default>
     <files>nestedblocks.js</files>
     <compile-flags>-wasm</compile-flags>
-    <tags>exclude_jshost,exclude_win7,exclude_dynapogo</tags>
+    <tags>exclude_jshost,exclude_win7,exclude_dynapogo,exclude_xplat</tags>
   </default>
 </test>
 <test>
@@ -233,10 +241,53 @@
   <default>
     <files>unsigned.js</files>
     <baseline>baselines/unsigned.baseline</baseline>
-    <!-- Todo:: Remove -off:cse once bugs have been worked out
-    Issue: https://github.com/Microsoft/ChakraCore/issues/2975 -->
-    <compile-flags>-wasm -off:cse</compile-flags>
+    <compile-flags>-wasm</compile-flags>
     <tags>exclude_jshost,exclude_win7,exclude_xplat</tags>
   </default>
 </test>
+<test>
+  <default>
+    <files>memory.js</files>
+    <compile-flags>-wasm -ArrayBufferTransfer</compile-flags>
+    <tags>exclude_jshost,exclude_win7,exclude_xplat</tags>
+  </default>
+</test>
+<test>
+  <default>
+    <files>memory.js</files>
+    <compile-flags>-wasm -ArrayBufferTransfer -wasmfastarray-</compile-flags>
+    <tags>exclude_jshost,exclude_win7,exclude_xplat</tags>
+  </default>
+</test>
+<test>
+  <default>
+    <files>superlongsignaturemismatch.js</files>
+    <compile-flags>-wasm</compile-flags>
+    <tags>exclude_xplat,exclude_jshost,exclude_win7</tags>
+  </default>
+</test>
+<test>
+  <default>
+    <files>limits.js</files>
+    <compile-flags>-wasm -args --no-verbose --end 4 -endargs</compile-flags>
+    <timeout>300</timeout>
+    <tags>exclude_xplat,exclude_jshost,exclude_win7,exclude_chk,exclude_dynapogo,exclude_x86,Slow</tags>
+  </default>
+</test>
+<test>
+  <default>
+    <files>limits.js</files>
+    <compile-flags>-wasm -args --no-verbose --start 4 --end 12 -endargs</compile-flags>
+    <timeout>300</timeout>
+    <tags>exclude_xplat,exclude_jshost,exclude_win7,exclude_chk,exclude_dynapogo,exclude_x86,Slow</tags>
+  </default>
+</test>
+<test>
+  <default>
+    <files>limits.js</files>
+    <compile-flags>-wasm -args --no-verbose --start 12 -endargs</compile-flags>
+    <timeout>300</timeout>
+    <tags>exclude_xplat,exclude_jshost,exclude_win7,exclude_chk,exclude_dynapogo,exclude_x86,Slow</tags>
+  </default>
+</test>
 </regress-exe>
diff --git a/test/wasm/superlongsignaturemismatch.js b/test/wasm/superlongsignaturemismatch.js
new file mode 100644
index 0000000..a200a42
--- /dev/null
+++ b/test/wasm/superlongsignaturemismatch.js
@@ -0,0 +1,55 @@
+//-------------------------------------------------------------------------------------------------------
+// Copyright (C) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
+//-------------------------------------------------------------------------------------------------------
+
+const module1src = `
+(module
+  (func (export "longsig")
+    (param ${(new Array(1000)).fill("f32").join(" ")})
+    (result f32)
+    (f32.const 0)
+  )
+)`;
+
+const module2src = `
+(module
+  (import "declmod" "shortsig" (func $foo (param f32) (result f32)))
+)`;
+
+const buf1 = WebAssembly.wabt.convertWast2Wasm(module1src);
+const mod1 = new WebAssembly.Module(buf1);
+const {exports: {longsig}} = new WebAssembly.Instance(mod1, {});
+
+const buf2 = WebAssembly.wabt.convertWast2Wasm(module2src);
+const mod2 = new WebAssembly.Module(buf2);
+try {
+  new WebAssembly.Instance(mod2, {declmod: {shortsig: longsig}});
+  throw new Error("Expected link error");
+} catch (err) {
+  if (err.message !== "Cannot link import longsig[0](f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f3...)->f32 to shortsig(f32)->f32 in link table due to a signature mismatch") {
+    throw err;
+  }
+}
+
+const module3src = `
+(module
+  (import "declmod" "notLongEnoughSig"
+    (func $foo
+      (param ${(new Array(999)).fill("f32").join(" ")})
+      (result f32)
+    )
+  )
+)`;
+
+const buf3 = WebAssembly.wabt.convertWast2Wasm(module3src);
+const mod3 = new WebAssembly.Module(buf3);
+try {
+  new WebAssembly.Instance(mod3, {declmod: {notLongEnoughSig: longsig}});
+  throw new Error("Expected link error");
+} catch (err) {
+  if (err.message !== "Cannot link import longsig[0](f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f3...)->f32 to notLongEnoughSig(f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f...)->f32 in link table due to a signature mismatch") {
+    throw err;
+  }
+}
+print("PASSED");
diff --git a/tools/RecyclerChecker/build.sh b/tools/RecyclerChecker/build.sh
index 7d4461b..d2e37cf 100755
--- a/tools/RecyclerChecker/build.sh
+++ b/tools/RecyclerChecker/build.sh
@@ -17,7 +17,9 @@
 echo ""
 }
 
-SCRIPT_DIR=`dirname $0`
+pushd `dirname $0` > /dev/null
+SCRIPT_DIR=`pwd -P`
+popd > /dev/null
 CLANG_INC=
 CXX_COMPILER=
 LLVM_CONFIG=
@@ -80,4 +82,4 @@
 _RET=$?
 
 popd > /dev/null
-exit $_RET
\ No newline at end of file
+exit $_RET
diff --git a/tools/XPlatInstall/install_ch.sh b/tools/XPlatInstall/install_ch.sh
index 49f5ef2..52a9507 100755
--- a/tools/XPlatInstall/install_ch.sh
+++ b/tools/XPlatInstall/install_ch.sh
@@ -52,7 +52,6 @@
     exit
 }
 
-
 GET_LATEST()
 {
     GET_OS
@@ -61,12 +60,13 @@
     CHAKRA_VERSION=$(curl -k -s -SL "https://aka.ms/chakracore/version")
 
     if [[ "$CHAKRA_VERSION" == *"Error"* ]]; then
-        PRINT $ERROR_COLOR "] Download Failed. Do you have an Internet connection?"
+        PRINT $ERROR_COLOR "] Please ensure you are connected to the internet and try again."
         exit 1
     fi
 
     PRINT $SUCCESS_COLOR "] Found ChakraCore ${CHAKRA_VERSION//_/.} for ${CURRENT_OS}"
-    BINARY_NAME="https://aka.ms/chakracore/${BINARY_NAME}_${CHAKRA_VERSION}.tar.gz"
+    BINARY_NAME="https://aka.ms/chakracore/${BINARY_NAME}_${CHAKRA_VERSION}"
+    SHASUM_NAME="${BINARY_NAME}_s"
 }
 
 PRINT $DEFAULT_COLOR "ChakraCore Installation Script 0.1b\n"
@@ -75,11 +75,11 @@
 GET_LATEST
 
 PRINT $DEFAULT_COLOR "----------------------------------------------------------------"
-PRINT $SUCCESS_COLOR   "\nThis script will download ChakraCore from"
-PRINT $DEFAULT_COLOR "${BINARY_NAME}\n"
+PRINT $SUCCESS_COLOR   "\nThis script will download & execute ChakraCore binary"
+PRINT $DEFAULT_COLOR "located at ${BINARY_NAME}\n"
 PRINT $DEFAULT_COLOR "----------------------------------------------------------------"
 PRINT $DEFAULT_COLOR "If you don't agree, press Ctrl+C to terminate"
-read -t 10 -p "Hit ENTER to continue (or wait 10 seconds)"
+read -t 20 -p "Hit ENTER to continue (or wait 20 seconds)"
 
 if [ -d "./ChakraCoreFiles" ]; then
     PRINT $ERROR_COLOR "] Found 'ChakraCoreFiles' folder on the current path."
@@ -87,29 +87,65 @@
     exit 1
 fi
 
+CHECK_DOWNLOAD_FAIL()
+{
+    if [[ $? != 0 ]]; then
+        PRINT $ERROR_COLOR "] Download failed."
+        PRINT $DEFAULT_COLOR "] ${___}"
+        exit 1
+    fi
+}
+
 PRINT $DEFAULT_COLOR "\n] Downloading ChakraCore"
 PRINT $SUCCESS_COLOR "] ${BINARY_NAME}"
-
 ___=$(curl -kSL -o "chakracore.tar.gz" "${BINARY_NAME}" 2>&1)
+CHECK_DOWNLOAD_FAIL
 
-if [[ $? != 0 ]]; then
-    PRINT $ERROR_COLOR "] Download failed."
-    PRINT $DEFAULT_COLOR "] ${___}"
-    exit 1
-fi
+PRINT $DEFAULT_COLOR "\n] Downloading ChakraCore shasum"
+PRINT $SUCCESS_COLOR "] ${SHASUM_NAME}"
+___=$(curl -kSL -o "chakracore_s.tar.gz" "${SHASUM_NAME}" 2>&1)
+CHECK_DOWNLOAD_FAIL
 
 PRINT $SUCCESS_COLOR "] Download completed"
 
-___=$(tar -xzf chakracore.tar.gz 2>&1)
+CHECK_EXT_FAIL()
+{
+    if [[ $? != 0 ]]; then
+        PRINT $ERROR_COLOR "] Extracting the compressed file failed."
+        PRINT $DEFAULT_COLOR "] ${___}"
+        rm -rf ChakraCoreFiles/
+        rm -rf chakracore.tar.gz
+        rm -rf chakracore_s.tar.gz
+        exit 1
+    fi
+}
 
-if [[ $? != 0 ]]; then
-    PRINT $ERROR_COLOR "] Extracting the compressed file is failed."
-    PRINT $DEFAULT_COLOR "] ${___}"
-    rm -rf ChakraCoreFiles/
+___=$(tar -xzf chakracore_s.tar.gz 2>&1)
+CHECK_EXT_FAIL
+
+SUM1=`shasum -a 512256 chakracore.tar.gz`
+SUM2=`cat ChakraCoreFiles/shasum`
+SUM1="${SUM1}@"
+SUM2="${SUM2}@"
+
+if [[ ! $SUM1 =~ $SUM2 ]]; then
+    PRINT $ERROR_COLOR "] Corrupted binary package."
+    PRINT $DEFAULT_COLOR "] Check your network connection."
+    PRINT $ERROR_COLOR "] If you suspect there is some other problem,\
+ https://github.com/Microsoft/ChakraCore#contact-us"
     rm -rf chakracore.tar.gz
+    rm -rf chakracore_s.tar.gz
+    rm -rf ChakraCoreFiles/
     exit 1
 fi
 
+rm -rf chakracore_s.tar.gz
+
+PRINT $SUCCESS_COLOR "] ChakraCore package SHASUM matches"
+
+___=$(tar -xzf chakracore.tar.gz 2>&1)
+CHECK_EXT_FAIL
+
 rm -rf chakracore.tar.gz
 
 # test ch
diff --git a/tools/compile_clang.sh b/tools/compile_clang.sh
index 8d7f65d..dcb4477 100755
--- a/tools/compile_clang.sh
+++ b/tools/compile_clang.sh
@@ -22,7 +22,7 @@
     echo -e "This script will download LLVM/CLANG and LLVM Gold Bintools from\n${CC_URL}\n"
     echo "These software are licensed to you by its publisher(s), not Microsoft."
     echo "Microsoft is not responsible for the software."
-    echo "Your installation and use of the software is subject to the publisher’s terms available here:"
+    echo "Your installation and use of the software is subject to the publisher's terms available here:"
     echo -e "http://llvm.org/docs/DeveloperPolicy.html#license\nhttp://llvm.org/docs/GoldPlugin.html#licensing"
     echo -e "${ERROR_COLOR}"
     echo -e "----------------------------------------------------------------\n"
@@ -105,7 +105,7 @@
     cd "${ROOT}/src/"
 
     echo "Downloading LLVM ${LLVM_VERSION}"
-    wget –quiet "http://llvm.org/releases/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.xz" >/dev/null 2>&1
+    wget --quiet "http://llvm.org/releases/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.xz" >/dev/null 2>&1
     tar -xf "llvm-${LLVM_VERSION}.src.tar.xz"
     if [ $? == 0 ]; then
         rm "llvm-${LLVM_VERSION}.src.tar.xz"
@@ -116,7 +116,7 @@
 
     cd llvm/tools/
     echo "Downloading Clang ${LLVM_VERSION}"
-    wget –quiet "http://llvm.org/releases/${LLVM_VERSION}/cfe-${LLVM_VERSION}.src.tar.xz" >/dev/null 2>&1
+    wget --quiet "http://llvm.org/releases/${LLVM_VERSION}/cfe-${LLVM_VERSION}.src.tar.xz" >/dev/null 2>&1
     tar -xf "cfe-${LLVM_VERSION}.src.tar.xz"
     if [ $? == 0 ]; then
         mv "cfe-${LLVM_VERSION}.src" clang
@@ -128,7 +128,7 @@
     mkdir -p ../projects/
     cd ../projects/
     echo "Downloading Compiler-RT ${LLVM_VERSION}"
-    wget –quiet "http://llvm.org/releases/${LLVM_VERSION}/compiler-rt-${LLVM_VERSION}.src.tar.xz" >/dev/null 2>&1
+    wget --quiet "http://llvm.org/releases/${LLVM_VERSION}/compiler-rt-${LLVM_VERSION}.src.tar.xz" >/dev/null 2>&1
     tar -xf "compiler-rt-${LLVM_VERSION}.src.tar.xz"
     if [ $? == 0 ]; then
         mv "compiler-rt-${LLVM_VERSION}.src" compiler-rt
diff --git a/tools/create_package.sh b/tools/create_package.sh
index 4fb15ee..adf0a96 100755
--- a/tools/create_package.sh
+++ b/tools/create_package.sh
@@ -82,7 +82,7 @@
 cat tools/XPlatInstall/BINARY-DIST-ONLY-NOTICES.txt >> out/ChakraCoreFiles/LICENSE
 # sample
 cp "tools/XPlatInstall/sample/README.md"  out/ChakraCoreFiles/sample/README.md
-cp "tools/XPlatInstall/sample/Makefile.txt"   out/ChakraCoreFiles/sample/Makefile
+cp "tools/XPlatInstall/sample/Makefile"   out/ChakraCoreFiles/sample/Makefile
 cp "tools/XPlatInstall/sample/sample.cpp.txt" out/ChakraCoreFiles/sample/sample.cpp
 
 ## Test
@@ -97,7 +97,16 @@
 pushd out/ > /dev/null
 PACKAGE_FILE="cc_${HOST_OS}_x64_${CHAKRA_VERSION}.tar.gz"
 tar -czf "${PACKAGE_FILE}" ChakraCoreFiles/
+mkdir -p temp/ChakraCoreFiles/
+cp "${PACKAGE_FILE}" temp/chakracore.tar.gz
+cd temp
+SHASUM_FILE="cc_${HOST_OS}_x64_${CHAKRA_VERSION}_s.tar.gz"
+shasum -a 512256 chakracore.tar.gz > ChakraCoreFiles/shasum
+tar -czf "$SHASUM_FILE" ChakraCoreFiles
+mv $SHASUM_FILE ../
+cd ..
+rm -rf temp/
 popd > /dev/null
 
 ## Credits
-echo -e "\nPackage file is ready at ${GREEN_COLOR}${PACKAGE_FILE}${DEFAULT_COLOR}"
+echo -e "\nPackage & Shasum files are ready under ${GREEN_COLOR}out/${DEFAULT_COLOR}"